@graphhopper/graphhopper-maps-bundle 0.0.0-df1ca0953b72dfd8e75d12e21d7eeb3fb6ea6491 → 0.0.0-df90f09
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -5
- package/dist/01f24e0d2b07a8c8b132.png +0 -0
- package/dist/assets/android-chrome-144x144.png +0 -0
- package/dist/assets/android-chrome-192x192.png +0 -0
- package/dist/assets/android-chrome-256x256.png +0 -0
- package/dist/assets/android-chrome-384x384.png +0 -0
- package/dist/assets/android-chrome-512x512.png +0 -0
- package/dist/assets/android-chrome-96x96.png +0 -0
- package/dist/assets/apple-touch-icon-1024x1024.png +0 -0
- package/dist/assets/apple-touch-icon-114x114.png +0 -0
- package/dist/assets/apple-touch-icon-120x120.png +0 -0
- package/dist/assets/apple-touch-icon-144x144.png +0 -0
- package/dist/assets/apple-touch-icon-152x152.png +0 -0
- package/dist/assets/apple-touch-icon-167x167.png +0 -0
- package/dist/assets/apple-touch-icon-180x180.png +0 -0
- package/dist/assets/apple-touch-icon-72x72.png +0 -0
- package/dist/assets/apple-touch-icon-76x76.png +0 -0
- package/dist/assets/apple-touch-icon-precomposed.png +0 -0
- package/dist/assets/apple-touch-icon.png +0 -0
- package/dist/assets/mstile-144x144.png +0 -0
- package/dist/assets/mstile-150x150.png +0 -0
- package/dist/assets/mstile-310x150.png +0 -0
- package/dist/assets/mstile-310x310.png +0 -0
- package/dist/bundle.d77660ff2fad9b3f48ef.js +2 -0
- package/dist/bundle.d77660ff2fad9b3f48ef.js.LICENSE.txt +49 -0
- package/dist/config.js +1 -1
- package/dist/index.html +8 -2
- package/dist/manifest.json +1 -1
- package/package.json +1 -1
- package/dist/bundle.aa33d1c68d2f04ffcca4.js +0 -2
- package/dist/bundle.aa33d1c68d2f04ffcca4.js.LICENSE.txt +0 -168
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see bundle.aa33d1c68d2f04ffcca4.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={5734:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".CodeMirror-hints {\n position: absolute;\n z-index: 10;\n overflow: hidden;\n list-style: none;\n\n margin: 0;\n padding: 2px;\n\n -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n border-radius: 3px;\n border: 1px solid silver;\n\n background: white;\n font-size: 90%;\n font-family: monospace;\n\n max-height: 20em;\n overflow-y: auto;\n box-sizing: border-box;\n}\n\n.CodeMirror-hint {\n margin: 0;\n padding: 0 4px;\n border-radius: 2px;\n white-space: pre;\n color: black;\n cursor: pointer;\n}\n\nli.CodeMirror-hint-active {\n background: #08f;\n color: white;\n}\n",""]);const a=s},9735:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o),a=n(8393),l=n.n(a),u=new URL(n(7735),n.b),c=new URL(n(6089),n.b),d=new URL(n(6050),n.b),h=new URL(n(1090),n.b),p=new URL(n(6192),n.b),f=s()(i()),m=l()(u),g=l()(c),_=l()(d),y=l()(h),v=l()(p);f.push([e.id,`/* The lint marker gutter */\n.CodeMirror-lint-markers {\n width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n background-color: #ffd;\n border: 1px solid black;\n border-radius: 4px 4px 4px 4px;\n color: black;\n font-family: monospace;\n font-size: 10pt;\n overflow: hidden;\n padding: 2px 5px;\n position: fixed;\n white-space: pre;\n white-space: pre-wrap;\n z-index: 100;\n max-width: 600px;\n opacity: 0;\n transition: opacity .4s;\n -moz-transition: opacity .4s;\n -webkit-transition: opacity .4s;\n -o-transition: opacity .4s;\n -ms-transition: opacity .4s;\n}\n\n.CodeMirror-lint-mark {\n background-position: left bottom;\n background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-warning {\n background-image: url(${m});\n}\n\n.CodeMirror-lint-mark-error {\n background-image: url(${g});\n}\n\n.CodeMirror-lint-marker {\n background-position: center center;\n background-repeat: no-repeat;\n cursor: pointer;\n display: inline-block;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n position: relative;\n}\n\n.CodeMirror-lint-message {\n padding-left: 18px;\n background-position: top left;\n background-repeat: no-repeat;\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n background-image: url(${_});\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n background-image: url(${y});\n}\n\n.CodeMirror-lint-marker-multiple {\n background-image: url(${v});\n background-repeat: no-repeat;\n background-position: right bottom;\n width: 100%; height: 100%;\n}\n\n.CodeMirror-lint-line-error {\n background-color: rgba(183, 76, 81, 0.08);\n}\n\n.CodeMirror-lint-line-warning {\n background-color: rgba(255, 211, 0, 0.1);\n}\n`,""]);const b=f},1240:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,"/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n direction: ltr;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n.cm-fat-cursor .CodeMirror-line::selection,\n.cm-fat-cursor .CodeMirror-line > span::selection, \n.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; }\n.cm-fat-cursor .CodeMirror-line::-moz-selection,\n.cm-fat-cursor .CodeMirror-line > span::-moz-selection,\n.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; }\n.cm-fat-cursor { caret-color: transparent; }\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0; right: 0; top: -50px; bottom: 0;\n overflow: hidden;\n}\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0; bottom: 0;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 50px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -50px; margin-right: -50px;\n padding-bottom: 50px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n z-index: 0;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n outline: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -50px;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background-color: #ffa;\n background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n",""]);const a=s},1788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const a=s},9502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o),a=n(8393),l=n.n(a),u=new URL(n(9343),n.b),c=new URL(n(8604),n.b),d=s()(i()),h=l()(u),p=l()(c);d.push([e.id,`.heightgraph-container {\n background-color: rgba(250, 250, 250, 0.8);\n border-radius: 10px;\n display: none;\n cursor: default;\n user-select: none;\n}\n\n.heightgraph-toggle {\n cursor: pointer;\n box-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);\n border-radius: 5px;\n width: 28px;\n height: 28px;\n background: #f8f8f9;\n display: block;\n}\n\n.heightgraph-toggle-icon {\n background: url(${h}) no-repeat center center;\n background-size: 14px 14px;\n width: 26px;\n height: 26px;\n position: absolute;\n}\n\n.heightgraph-close-icon {\n background: url(${p}) no-repeat center center;\n background-size: 14px 14px;\n width: 26px;\n height: 26px;\n position: absolute;\n right: 0;\n display: none;\n cursor: pointer;\n}\n\n.border-top {\n fill: none;\n}\n\n.legend-text {\n fill: #000;\n font-size: 10px;\n cursor: pointer;\n}\n\n.tick,\n.tick text {\n fill: #000;\n pointer-events: none;\n}\n\n.axis .tick line {\n visibility: hidden;\n pointer-events: none;\n}\n\n.axis path {\n stroke: black;\n fill: none;\n stroke-width: 2px;\n shape-rendering: crispEdges;\n pointer-events: none;\n}\n\n.focusbox {\n display: none;\n font-size: 10px;\n fill: #000;\n pointer-events: none;\n}\n\n.focusbox rect {\n fill: rgba(255, 255, 255, 0.8);\n stroke-width: 1px;\n stroke: #888;\n pointer-events: none;\n}\n\n.focusbox text {\n font-size: 12px;\n}\n\n.focusLine line {\n stroke-width: 1px;\n stroke: rgb(20, 20, 20);\n display: none;\n cursor: default;\n shape-rendering: crispEdges;\n}\n\n.height-focus.label rect {\n fill: rgba(255, 255, 255, 0.5);\n stroke-width: 1px;\n stroke: #888;\n pointer-events: none;\n shape-rendering: crispEdges;\n}\n\n.height-focus.line {\n stroke: rgb(20, 20, 20);\n stroke-width: 1px;\n shape-rendering: crispEdges;\n}\n\n.height-focus.circle {\n stroke: #fff;\n stroke-width: 1px;\n}\n\n.mouse-height-box-text {\n font-size: 12px;\n}\n\n.grid .tick {\n pointer-events: none;\n}\n\n.grid .tick line {\n stroke: #eee;\n stroke-width: 1px;\n shape-rendering: crispEdges;\n}\n\n.grid path {\n stroke-width: 0;\n pointer-events: none;\n}\n\n.tspan {\n font-weight: bold;\n}\n\n.select-symbol {\n cursor: pointer;\n}\n\n.select-info {\n cursor: default;\n}\n\n.lineSelection {\n cursor: move;\n}\n\n.heightgraph-show {\n display: block !important;\n}\n\n#heightgraph-legend {\n position: absolute;\n\n cursor: pointer;\n right: 15px;\n bottom: 10px;\n font-size: 14px;\n}\n\n#heightgraph-legend-text {\n float: right;\n}\n\n#heightgraph-legend-icon {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin-right: 5px;\n}\n\n#heightgraph-legend ul {\n position: relative;\n right: -7px;\n min-width: 30px;\n display: none;\n\n margin: 0 5px 7px 5px;\n padding: 0 15px 5px 5px; /* Add padding to the right to avoid that the scrollbar hides content */\n list-style: none;\n background-color: white;\n border: 1px solid #ccc;\n border-radius: 4px;\n\n max-height: 120px;\n overflow-y: auto;\n}\n\n#heightgraph-selector {\n position: absolute;\n bottom: 0;\n width: 200px;\n}\n\n#arrow-icon-for-input {\n font-size: 16px;\n\n position: absolute;\n right: 11px;\n bottom: 9px;\n pointer-events: none; /* let clicks through to input */\n}\n\n#heightgraph-selector input {\n font-size: 14px;\n\n width: 180px;\n background-color: transparent;\n cursor: pointer;\n\n margin: 0 5px 5px 5px;\n padding: 3px 5px;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n\n#heightgraph-selector ul {\n font-size: 14px;\n display: none;\n top: -100%;\n\n margin: 0 5px;\n padding: 0 5px;\n list-style: none;\n background-color: white;\n border: 1px solid #ccc;\n border-radius: 4px;\n\n max-height: 120px;\n overflow-y: auto;\n}\n\n#heightgraph-selector ul li {\n padding: 5px 0;\n cursor: pointer;\n}\n\n#heightgraph-selector ul li:hover {\n background-color: #f5f5f5;\n}\n`,""]);const f=d},8116:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".cm-s-default .cm-string {\n color: #067d17;\n}\n\n.cm-s-default .cm-property {\n color: #871094;\n}\n\n.cm-s-default .cm-number {\n color: #1750eb;\n}\n\n.cm-s-default .cm-atom {\n color: #0033b3;\n}\n",""]);const a=s},5481:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o),a=n(8393),l=n.n(a),u=new URL(n(9435),n.b),c=new URL(n(8267),n.b),d=new URL(n(6372),n.b),h=new URL(n(6375),n.b),p=s()(i()),f=l()(u),m=l()(c),g=l()(d),_=l()(h);p.push([e.id,`.src-App-module__appWrapper {\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n display: grid;\n grid-template-columns: 26rem 1fr auto;\n grid-template-rows: 100%;\n justify-content: space-between;\n overflow: auto;\n -webkit-user-select: none;\n user-select: none; /* firefox does not ignore -webkit-user-select so make this explicit, see #217 */\n}\n\n.src-App-module__map {\n grid-column: 1 / span 3;\n grid-row: 1 / span 1;\n}\n\n.src-App-module__sidebar {\n grid-column: 1 / span 1;\n grid-row: 1 / span 1;\n background-color: transparent;\n pointer-events: none;\n z-index: 1;\n align-self: stretch;\n}\n\n.src-App-module__popupContainer {\n grid-column: 1 / span 1;\n grid-row: 1 / span 1;\n background-color: transparent;\n pointer-events: none;\n z-index: 2;\n align-self: stretch;\n\n margin: 0 0.5rem 0 0.5rem;\n overflow: hidden;\n position: relative;\n}\n\n.src-App-module__sidebarContent {\n position: relative;\n display: flex;\n flex-direction: column;\n border-radius: 0.5rem;\n background-color: white;\n max-height: calc(100% - 2rem);\n margin: 0.5rem;\n\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);\n pointer-events: all;\n overflow: auto;\n}\n\n.src-App-module__onMapRightSide {\n position: relative;\n grid-column: 3 / span 1;\n grid-row: 1 / span 1;\n z-index: 1;\n\n padding: 0.5rem;\n}\n\n.src-App-module__onMapRightSide > div {\n cursor: pointer !important;\n}\n\n.src-App-module__onMapRightSide > div {\n background-color: white;\n border-radius: 0.5rem;\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);\n}\n\n.src-App-module__pathDetails {\n grid-column: 2 / span 2;\n grid-row: 1 / span 1;\n z-index: 1;\n align-self: end;\n overflow: hidden; /* This is important to make the heightgraph shrink */\n margin: 0;\n pointer-events: none;\n}\n\n.src-App-module__smallScreenMap {\n grid-row: 1 / span 3;\n grid-column: 1 / span 1;\n}\n\n.src-App-module__smallScreenSidebar {\n grid-row: 1 / span 1;\n grid-column: 1 / span 1;\n margin: 0;\n border-radius: 0;\n z-index: 3;\n}\n\n.src-App-module__smallScreenMapOptions {\n grid-row: 2 / span 1;\n grid-column: 1 / span 1;\n justify-self: end;\n}\n\n.src-App-module__onMapRightSide > div {\n background-color: white;\n border-radius: 0.5rem;\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);\n}\n\n.src-App-module__smallScreenRoutingResult {\n grid-row: 4 / span 1;\n grid-column: 1 / span 1;\n margin: 0;\n z-index: 2;\n background-color: white;\n}\n\n.src-App-module__smallScreenPoweredBy {\n grid-row: 5 / span 1;\n grid-column: 1 / span 1;\n margin: 0;\n border-radius: 0;\n z-index: 2;\n}\n\n@media (max-width: 44rem) {\n .src-App-module__appWrapper {\n grid-template-columns: 100%;\n grid-template-rows: auto 0 1fr auto auto;\n }\n}\n\n/* mapilion */\n@font-face {\n font-family: 'Open Sans';\n src: url(${f}) format('truetype');\n}\n\n/* maptiler */\n@font-face {\n font-family: 'Noto Sans';\n src: url(${m}) format('truetype');\n}\n\n@font-face {\n font-family: 'Roboto';\n src: url(${g}) format('truetype');\n}\n\n@font-face {\n font-family: 'Roboto Condensed';\n src: url(${_}) format('truetype');\n}\n\n.src-App-module__sidebarCloseButton {\n position: absolute;\n\n color: lightgray !important; /* unsure why !important is necessary here but not in ErrorMessage.module.css for same <Cross/> */\n\n height: 10px;\n width: 10px;\n\n right: 7px;\n top: 6px;\n}\n\n.src-App-module__sidebarCloseButton:hover {\n color: black !important;\n}\n\n.src-App-module__sidebarWhenClosed {\n z-index: 1;\n position: absolute;\n background-color: white;\n border-radius: 0.5rem;\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);\n padding: 0.25em;\n margin: 0.5em;\n}\n\n.src-App-module__sidebarOpenButton svg {\n fill: gray;\n\n width: 30px;\n height: 24px;\n}\n\n.src-App-module__sidebarOpenButton:hover svg {\n fill: black;\n}\n`,""]),p.locals={appWrapper:"src-App-module__appWrapper",map:"src-App-module__map",sidebar:"src-App-module__sidebar",popupContainer:"src-App-module__popupContainer",sidebarContent:"src-App-module__sidebarContent",onMapRightSide:"src-App-module__onMapRightSide",pathDetails:"src-App-module__pathDetails",smallScreenMap:"src-App-module__smallScreenMap",smallScreenSidebar:"src-App-module__smallScreenSidebar",smallScreenMapOptions:"src-App-module__smallScreenMapOptions",smallScreenRoutingResult:"src-App-module__smallScreenRoutingResult",smallScreenPoweredBy:"src-App-module__smallScreenPoweredBy",sidebarCloseButton:"src-App-module__sidebarCloseButton",sidebarWhenClosed:"src-App-module__sidebarWhenClosed",sidebarOpenButton:"src-App-module__sidebarOpenButton"};const y=p},2963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-PlainButton-module__button {\n outline-color: #368fe8; /* doesn't work for firefox? force blue for chrome too */\n border: none;\n padding: 0;\n margin: 0;\n background-color: inherit;\n color: #5b616a;\n font-size: 1rem;\n}\n\n.src-PlainButton-module__button:hover {\n cursor: pointer;\n color: #2a2b31;\n}\n\n.src-PlainButton-module__button:active {\n color: lightgray;\n}\n",""]),s.locals={button:"src-PlainButton-module__button"};const a=s},9105:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-layers-ContextMenu-module__contextMenu {\n background-color: white;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n padding: 0.5em 0;\n border-radius: 3px 3px 3px 3px;\n}\n",""]),s.locals={contextMenu:"src-layers-ContextMenu-module__contextMenu"};const a=s},378:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,"/* todo: this was just copy-pasted from https://openlayers.org/en/latest/examples/popup.html.\n the popup looks ugly still, but at the very minimum the background color needs to be set to make it visible.\n the popup design needs an overhaul anyway... https://github.com/graphhopper/graphhopper-maps/issues/136\n */\n.src-layers-DefaultMapPopup-module__popup {\n position: absolute;\n bottom: 12px;\n left: -50px;\n background-color: white;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n padding: 0 15px 0 15px;\n border-radius: 10px;\n border: 1px solid #cccccc;\n font-size: small;\n width: 110px;\n}\n.src-layers-DefaultMapPopup-module__popup:after,\n.src-layers-DefaultMapPopup-module__popup:before {\n top: 100%;\n border: solid transparent;\n content: ' ';\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n.src-layers-DefaultMapPopup-module__popup:after {\n border-top-color: white;\n border-width: 10px;\n left: 48px;\n margin-left: -10px;\n}\n.src-layers-DefaultMapPopup-module__popup:before {\n border-top-color: #cccccc;\n border-width: 11px;\n left: 48px;\n margin-left: -11px;\n}\n",""]),s.locals={popup:"src-layers-DefaultMapPopup-module__popup"};const a=s},9690:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-layers-MapFeaturePopup-module__popup {\n background-color: white;\n font-size: small;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n padding: 5px 10px 5px 10px;\n border-radius: 10px;\n}\n",""]),s.locals={popup:"src-layers-MapFeaturePopup-module__popup"};const a=s},7244:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-map-ContextMenuContent-module__wrapper {\n display: flex;\n flex-direction: column;\n max-width: 11em;\n}\n\nbutton.src-map-ContextMenuContent-module__entry div {\n margin-bottom: 2px;\n padding-right: 8px;\n}\n\n.src-map-ContextMenuContent-module__entry {\n display: flex;\n align-items: center;\n\n border: none;\n background: none;\n text-align: left;\n cursor: pointer;\n outline: inherit;\n font-size: 16px;\n padding: 0.15em 0.8em;\n}\n\n.src-map-ContextMenuContent-module__entry:hover {\n background-color: #ececec;\n}\n\n.src-map-ContextMenuContent-module__entry:active {\n background-color: #c6c6c6;\n}\n\n.src-map-ContextMenuContent-module__entry:disabled {\n color: lightgray;\n}\n",""]),s.locals={wrapper:"src-map-ContextMenuContent-module__wrapper",entry:"src-map-ContextMenuContent-module__entry"};const a=s},173:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-map-LocationButton-module__locationOnOff {\n position: absolute;\n right: 10px;\n top: 62px;\n background-color: red;\n\n padding: 4px;\n width: 34px;\n height: 34px;\n}\n\n.src-map-LocationButton-module__locationOnOff svg {\n color: gray;\n width: 100%;\n height: 100%;\n}\n",""]),s.locals={locationOnOff:"src-map-LocationButton-module__locationOnOff"};const a=s},961:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-map-Map-module__contextMenu {\n z-index: 3;\n}\n\n.src-map-Map-module__mapContainer {\n height: 100%;\n width: 100%;\n}\n\n.src-map-Map-module__customZoom {\n right: 17px;\n top: 115px;\n}\n\n@media (max-width: 44rem) {\n .src-map-Map-module__customZoom {\n top: unset;\n bottom: 0.5em;\n }\n}\n\n/* changing the position of the attribution is a bit complex as we have to repeat the other css */\n.src-map-Map-module__customAttribution {\n left: 0;\n bottom: 0;\n padding: 1px 5px;\n background-color: rgba(255, 255, 255, 0.8);\n border-radius: 0 4px 0 0;\n}\n\n.src-map-Map-module__customAttribution ul {\n font-size: 12px;\n}\n\n.src-map-Map-module__customAttribution a {\n padding-right: 3px;\n color: rgba(0, 60, 136, 0.7);\n text-decoration: none;\n}\n\n.src-map-Map-module__customAttribution button {\n display: none;\n}\n",""]),s.locals={contextMenu:"src-map-Map-module__contextMenu",mapContainer:"src-map-Map-module__mapContainer",customZoom:"src-map-Map-module__customZoom",customAttribution:"src-map-Map-module__customAttribution"};const a=s},2665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-map-MapOptions-module__mapOptionsContainer {\n position: absolute;\n z-index: 2;\n top: 10px;\n right: 10px;\n display: flex;\n}\n\n.src-map-MapOptions-module__options {\n width: 220px;\n display: flex;\n flex-direction: column;\n margin: 0.5rem;\n}\n\n.src-map-MapOptions-module__option {\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n align-items: center;\n}\n\n.src-map-MapOptions-module__layerButton {\n margin: 5px !important;\n width: 32px;\n height: 32px;\n}\n\n.src-map-MapOptions-module__layerButton svg {\n color: gray;\n height: 100%;\n width: 100%;\n}\n",""]),s.locals={mapOptionsContainer:"src-map-MapOptions-module__mapOptionsContainer",options:"src-map-MapOptions-module__options",option:"src-map-MapOptions-module__option",layerButton:"src-map-MapOptions-module__layerButton"};const a=s},4795:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-pathDetails-PathDetails-module__heightgraphContainer {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n\n.src-pathDetails-PathDetails-module__innerDiv {\n position: relative;\n pointer-events: auto;\n background-color: white;\n border-radius: 0.4rem 0 0 0;\n}\n",""]),s.locals={heightgraphContainer:"src-pathDetails-PathDetails-module__heightgraphContainer",innerDiv:"src-pathDetails-PathDetails-module__innerDiv"};const a=s},2897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-CustomModelBox-module__customModelBox {\n margin: 0.6em 0;\n padding: 0 0;\n border-top: lightgray solid 1px;\n height: 18rem;\n}\n\n.src-sidebar-CustomModelBox-module__customModelOptionTable {\n display: grid;\n font-size: 14px;\n grid-template-columns: 50px auto 50px;\n grid-template-rows: 1.3rem;\n align-content: center;\n align-items: center;\n margin: 1.5rem 0.5rem 0.5rem 0;\n}\n\n.src-sidebar-CustomModelBox-module__customModelOptionTable svg {\n scale: 0.7;\n}\n\n.src-sidebar-CustomModelBox-module__drawAreas {\n justify-content: end;\n scale: 0.8;\n}\n\n#src-sidebar-CustomModelBox-module__element::-webkit-scrollbar {\n display: none;\n}\n\n.src-sidebar-CustomModelBox-module__customModelBoxBottomBar {\n display: flex;\n border-bottom: lightgray solid 1px;\n}\n\n.src-sidebar-CustomModelBox-module__helpLink {\n text-decoration: none;\n flex-grow: 1;\n}\n\n.src-sidebar-CustomModelBox-module__examples,\n.src-sidebar-CustomModelBox-module__helpLink,\n.src-sidebar-CustomModelBox-module__applyButton button {\n font-size: 14px;\n}\n\n.src-sidebar-CustomModelBox-module__examples {\n border: none;\n border-top: #ececec solid 1px;\n border-right: #ececec solid 1px;\n padding-left: 1em;\n margin-left: 0;\n background-color: white;\n color: rgba(0, 60, 136, 0.7);\n}\n\n.src-sidebar-CustomModelBox-module__examples option {\n background-color: white;\n color: rgba(0, 60, 136, 0.7);\n}\n\n/* show disabled button while route calculation */\n.src-sidebar-CustomModelBox-module__applyButtonProgress button,\n.src-sidebar-CustomModelBox-module__applyButtonInvalid button {\n cursor: default !important;\n color: lightgray !important;\n}\n\n.src-sidebar-CustomModelBox-module__infiniteProgressBar {\n animation: src-sidebar-CustomModelBox-module__progress 4s infinite normal;\n height: 2px;\n margin-top: -2px; /* when visible it should not occupy space */\n background-color: rgb(65, 121, 0);\n}\n\n@keyframes src-sidebar-CustomModelBox-module__progress {\n 0% {\n width: 0;\n margin-left: 0;\n }\n 50% {\n width: 100%;\n margin-left: 0;\n }\n 100% {\n width: 0;\n margin-left: 100%;\n }\n}\n\n.src-sidebar-CustomModelBox-module__helpLink:hover {\n color: black;\n}\n\n.src-sidebar-CustomModelBox-module__helpLink,\n.src-sidebar-CustomModelBox-module__examples {\n cursor: pointer;\n color: #5b616a;\n}\n\n.src-sidebar-CustomModelBox-module__applyButton button {\n background-color: rgb(124, 179, 66, 0.1);\n}\n\n.src-sidebar-CustomModelBox-module__applyButton button,\n.src-sidebar-CustomModelBox-module__helpLink {\n padding: 0.8em 1.7em;\n}\n",""]),s.locals={customModelBox:"src-sidebar-CustomModelBox-module__customModelBox",customModelOptionTable:"src-sidebar-CustomModelBox-module__customModelOptionTable",drawAreas:"src-sidebar-CustomModelBox-module__drawAreas",element:"src-sidebar-CustomModelBox-module__element",customModelBoxBottomBar:"src-sidebar-CustomModelBox-module__customModelBoxBottomBar",helpLink:"src-sidebar-CustomModelBox-module__helpLink",examples:"src-sidebar-CustomModelBox-module__examples",applyButton:"src-sidebar-CustomModelBox-module__applyButton",applyButtonProgress:"src-sidebar-CustomModelBox-module__applyButtonProgress",applyButtonInvalid:"src-sidebar-CustomModelBox-module__applyButtonInvalid",infiniteProgressBar:"src-sidebar-CustomModelBox-module__infiniteProgressBar",progress:"src-sidebar-CustomModelBox-module__progress"};const a=s},593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-ErrorMessage-module__errorMessageContainer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background-color: #f97777;\n color: white;\n margin: 0.5rem;\n padding: 0.5rem;\n border-radius: 0.3rem;\n}\n\n.src-sidebar-ErrorMessage-module__errorMessage {\n font-size: smaller;\n word-break: break-word;\n max-width: 90%;\n user-select: all;\n}\n\n.src-sidebar-ErrorMessage-module__errorMessageCloseBtn {\n width: 0.8rem;\n color: white;\n align-self: flex-start;\n flex-shrink: 0;\n}\n\n.src-sidebar-ErrorMessage-module__errorMessageCloseBtn svg {\n width: 100%;\n}\n",""]),s.locals={errorMessageContainer:"src-sidebar-ErrorMessage-module__errorMessageContainer",errorMessage:"src-sidebar-ErrorMessage-module__errorMessage",errorMessageCloseBtn:"src-sidebar-ErrorMessage-module__errorMessageCloseBtn"};const a=s},2185:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-MobileSidebar-module__sidebar {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.src-sidebar-MobileSidebar-module__background {\n pointer-events: all; /* we want all the content to behave normally*/\n background-color: white;\n}\n\n.src-sidebar-MobileSidebar-module__fullHeight {\n height: 100%;\n}\n\n.src-sidebar-MobileSidebar-module__addressSearch {\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n padding: 0.5rem;\n}\n\n.src-sidebar-MobileSidebar-module__addressInputContainer {\n flex-grow: 1;\n}\n\n.src-sidebar-MobileSidebar-module__mapView {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.src-sidebar-MobileSidebar-module__mapViewRow {\n display: flex;\n flex-direction: row;\n}\n\n.src-sidebar-MobileSidebar-module__queryPointText {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: #5b616a;\n}\n\n.src-sidebar-MobileSidebar-module__queryPointTextTo {\n font-size: large;\n font-weight: bold;\n color: inherit;\n}\n\n.src-sidebar-MobileSidebar-module__queryPointTextVia {\n font-size: small;\n}\n\n.src-sidebar-MobileSidebar-module__markerContainer {\n align-self: center;\n justify-self: center;\n width: 0.6rem;\n margin-right: 0.5rem;\n flex-shrink: 0;\n}\n\n.src-sidebar-MobileSidebar-module__markerContainer > svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.src-sidebar-MobileSidebar-module__btnCloseContainer {\n display: flex;\n flex-direction: column;\n}\n\n.src-sidebar-MobileSidebar-module__btnCloseInputs svg {\n width: 34px;\n color: #adadad;\n}\n\n.src-sidebar-MobileSidebar-module__btnCloseInputs {\n z-index: 0; /* without it the button isn't clickable */\n position: absolute;\n top: 10px;\n right: 1px;\n}\n\n.src-sidebar-MobileSidebar-module__btnOpenContainer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n padding: 0.25rem 0.5rem;\n border: 1px black solid;\n margin: 0.5rem;\n border-radius: 0.2rem;\n}\n\n.src-sidebar-MobileSidebar-module__btnOpenContainer .src-sidebar-MobileSidebar-module__mapView {\n width: calc(100% - 34px);\n}\n\n.src-sidebar-MobileSidebar-module__btnOpenInputs svg {\n color: #adadad;\n}\n\n.src-sidebar-MobileSidebar-module__btnOpenInputs {\n width: 34px;\n}\n",""]),s.locals={sidebar:"src-sidebar-MobileSidebar-module__sidebar",background:"src-sidebar-MobileSidebar-module__background",fullHeight:"src-sidebar-MobileSidebar-module__fullHeight",addressSearch:"src-sidebar-MobileSidebar-module__addressSearch",addressInputContainer:"src-sidebar-MobileSidebar-module__addressInputContainer",mapView:"src-sidebar-MobileSidebar-module__mapView",mapViewRow:"src-sidebar-MobileSidebar-module__mapViewRow",queryPointText:"src-sidebar-MobileSidebar-module__queryPointText",queryPointTextTo:"src-sidebar-MobileSidebar-module__queryPointTextTo",queryPointTextVia:"src-sidebar-MobileSidebar-module__queryPointTextVia",markerContainer:"src-sidebar-MobileSidebar-module__markerContainer",btnCloseContainer:"src-sidebar-MobileSidebar-module__btnCloseContainer",btnCloseInputs:"src-sidebar-MobileSidebar-module__btnCloseInputs",btnOpenContainer:"src-sidebar-MobileSidebar-module__btnOpenContainer",btnOpenInputs:"src-sidebar-MobileSidebar-module__btnOpenInputs"};const a=s},6510:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-PoweredBy-module__poweredByContainer {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 0.3rem;\n padding: 0.1rem;\n font-size: x-small;\n}\n\n.src-sidebar-PoweredBy-module__logoContainer {\n width: 7rem;\n display: flex;\n}\n",""]),s.locals={poweredByContainer:"src-sidebar-PoweredBy-module__poweredByContainer",logoContainer:"src-sidebar-PoweredBy-module__logoContainer"};const a=s},8192:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,'.src-sidebar-RoutingResult-module__resultRow {\n border-bottom: 1px lightgray solid;\n}\n\n.src-sidebar-RoutingResult-module__resultSelectableArea {\n padding: 1rem 0;\n border-left: white solid 0.25rem;\n}\n\n.src-sidebar-RoutingResult-module__resultSelectableArea:hover .src-sidebar-RoutingResult-module__resultSummary {\n border-left: lightgray solid 0.25rem;\n padding: 0 1rem 0 15px;\n}\n\n.src-sidebar-RoutingResult-module__resultSummary {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 1rem 0 15px;\n border-left: white solid 0.25rem;\n}\n\n.src-sidebar-RoutingResult-module__selectedResultSummary {\n border-left: #275dad solid 0.25rem !important;\n padding: 0 1rem 0 15px;\n}\n\n.src-sidebar-RoutingResult-module__resultValues {\n cursor: pointer;\n width: 50%;\n\n display: flex;\n flex-direction: column;\n}\n\n.src-sidebar-RoutingResult-module__resultMainText {\n font-size: large;\n font-weight: bold;\n margin-bottom: 0.1rem;\n}\n\n.src-sidebar-RoutingResult-module__resultSecondaryText,\n.src-sidebar-RoutingResult-module__exportButton div,\n.src-sidebar-RoutingResult-module__elevationHint {\n color: #5b616a;\n}\n\n.src-sidebar-RoutingResult-module__resultTertiaryText {\n color: #5b616a;\n font-size: 12px;\n}\n\n.src-sidebar-RoutingResult-module__detailsButton,\n.src-sidebar-RoutingResult-module__exportButton {\n padding-top: 1px; /* correction for "height: auto" of svg */\n}\n\n.src-sidebar-RoutingResult-module__detailsButton div,\n.src-sidebar-RoutingResult-module__detailsButtonExpanded div,\n.src-sidebar-RoutingResult-module__exportButton div {\n color: #5b616a;\n font-size: 12px;\n float: left;\n padding-top: 0.15em;\n padding-left: 0.5em;\n}\n\n.src-sidebar-RoutingResult-module__detailsButton svg,\n.src-sidebar-RoutingResult-module__detailsButtonExpanded svg,\n.src-sidebar-RoutingResult-module__exportButton svg {\n float: left;\n width: 1.2em;\n height: auto;\n}\n\n.src-sidebar-RoutingResult-module__exportButton:active div,\n.src-sidebar-RoutingResult-module__detailsButton:active div,\n.src-sidebar-RoutingResult-module__detailsButtonExpanded:active div {\n color: lightgray;\n}\n\n.src-sidebar-RoutingResult-module__detailsButton:active svg path,\n.src-sidebar-RoutingResult-module__exportButton:active svg path,\n.src-sidebar-RoutingResult-module__detailsButtonExpanded:active svg path {\n fill: lightgray;\n}\n\n.src-sidebar-RoutingResult-module__exportButton:hover div,\n.src-sidebar-RoutingResult-module__detailsButton:hover div,\n.src-sidebar-RoutingResult-module__detailsButtonExpanded:hover div {\n color: black;\n}\n\n.src-sidebar-RoutingResult-module__detailsButton:hover svg path,\n.src-sidebar-RoutingResult-module__exportButton:hover svg path,\n.src-sidebar-RoutingResult-module__detailsButtonExpanded:hover svg path {\n fill: black;\n}\n\n.src-sidebar-RoutingResult-module__detailsButton svg path,\n.src-sidebar-RoutingResult-module__exportButton svg path {\n fill: #5b616a;\n stroke: #5b616a;\n}\n\n.src-sidebar-RoutingResult-module__placeholderContainer {\n margin: 1.08rem 1rem;\n}\n\n.src-sidebar-RoutingResult-module__placeholderMain {\n height: 1.25rem;\n width: 7rem;\n background-color: lightgray;\n margin-bottom: 0.5rem;\n border-radius: 0.2rem;\n animation-name: src-sidebar-RoutingResult-module__pulse;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n}\n\n.src-sidebar-RoutingResult-module__placeholderSecondary {\n height: 1rem;\n width: 5rem;\n margin-bottom: 0;\n animation-delay: 0.25s;\n}\n\n@keyframes src-sidebar-RoutingResult-module__pulse {\n from {\n opacity: 0.5;\n }\n to {\n opacity: 1;\n }\n}\n\n.src-sidebar-RoutingResult-module__routeHints div {\n padding: 0 1.5em 0.2em 1.4em;\n}\n\n.src-sidebar-RoutingResult-module__routeHints div {\n font-size: small;\n color: #383838;\n}\n\n.src-sidebar-RoutingResult-module__routeHints {\n margin-top: -0.3rem;\n padding-bottom: 0.2em;\n}\n\n.src-sidebar-RoutingResult-module__routeHints .src-sidebar-RoutingResult-module__icons {\n display: flex;\n flex-direction: row;\n column-gap: 1rem;\n padding-bottom: 0.5rem;\n}\n\n.src-sidebar-RoutingResult-module__routeHintButton span,\n.src-sidebar-RoutingResult-module__selectedRouteHintButton span {\n font-size: xx-small;\n}\n\n.src-sidebar-RoutingResult-module__routeHintButton,\n.src-sidebar-RoutingResult-module__selectedRouteHintButton {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.src-sidebar-RoutingResult-module__routeHintButton:hover,\n.src-sidebar-RoutingResult-module__selectedRouteHintButton:hover,\n.src-sidebar-RoutingResult-module__routeHintButton:hover span {\n color: black;\n}\n\n.src-sidebar-RoutingResult-module__routeHintButton,\n.src-sidebar-RoutingResult-module__routeHintButton span {\n color: gray;\n padding-top: 1px;\n}\n\n.src-sidebar-RoutingResult-module__selectedRouteHintButton,\n.src-sidebar-RoutingResult-module__selectedRouteHintButton span {\n color: #383838;\n padding-top: 1px;\n}\n\n.src-sidebar-RoutingResult-module__routingResultRoadData {\n color: gray;\n font-size: small;\n padding: 10px 5px 10px 3rem;\n}\n',""]),s.locals={resultRow:"src-sidebar-RoutingResult-module__resultRow",resultSelectableArea:"src-sidebar-RoutingResult-module__resultSelectableArea",resultSummary:"src-sidebar-RoutingResult-module__resultSummary",selectedResultSummary:"src-sidebar-RoutingResult-module__selectedResultSummary",resultValues:"src-sidebar-RoutingResult-module__resultValues",resultMainText:"src-sidebar-RoutingResult-module__resultMainText",resultSecondaryText:"src-sidebar-RoutingResult-module__resultSecondaryText",exportButton:"src-sidebar-RoutingResult-module__exportButton",elevationHint:"src-sidebar-RoutingResult-module__elevationHint",resultTertiaryText:"src-sidebar-RoutingResult-module__resultTertiaryText",detailsButton:"src-sidebar-RoutingResult-module__detailsButton",detailsButtonExpanded:"src-sidebar-RoutingResult-module__detailsButtonExpanded",placeholderContainer:"src-sidebar-RoutingResult-module__placeholderContainer",placeholderMain:"src-sidebar-RoutingResult-module__placeholderMain",pulse:"src-sidebar-RoutingResult-module__pulse",placeholderSecondary:"src-sidebar-RoutingResult-module__placeholderSecondary",routeHints:"src-sidebar-RoutingResult-module__routeHints",icons:"src-sidebar-RoutingResult-module__icons",routeHintButton:"src-sidebar-RoutingResult-module__routeHintButton",selectedRouteHintButton:"src-sidebar-RoutingResult-module__selectedRouteHintButton",routingResultRoadData:"src-sidebar-RoutingResult-module__routingResultRoadData"};const a=s},4507:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-SettingsBox-module__parent {\n margin-top: 15px;\n padding: 15px 5px 10px 5px;\n border-top: 1px lightgray solid;\n border-bottom: 1px lightgray solid;\n}\n\n.src-sidebar-SettingsBox-module__settingsTable {\n display: grid;\n grid-template-columns: 50px auto;\n grid-template-rows: 1.3rem;\n align-content: flex-start;\n align-items: center;\n margin: 1rem 0.5rem 1.5rem 0;\n}\n\n.src-sidebar-SettingsBox-module__settingsTable svg {\n scale: 0.7;\n margin-left: calc(-8px); /* scaling svg creates white space around it */\n}\n\n.src-sidebar-SettingsBox-module__settingsTable button {\n}\n\n.src-sidebar-SettingsBox-module__infoLine {\n padding: 10px 2px 0 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n.src-sidebar-SettingsBox-module__infoLine a {\n color: gray;\n text-decoration: none;\n}\n\n.src-sidebar-SettingsBox-module__infoLine a:hover {\n color: black;\n}\n\n.src-sidebar-SettingsBox-module__title {\n font-weight: bold;\n}\n\n.src-sidebar-SettingsBox-module__title,\n.src-sidebar-SettingsBox-module__infoLine,\n.src-sidebar-SettingsBox-module__settingsTable {\n font-size: 14px;\n color: gray;\n}\n",""]),s.locals={parent:"src-sidebar-SettingsBox-module__parent",settingsTable:"src-sidebar-SettingsBox-module__settingsTable",infoLine:"src-sidebar-SettingsBox-module__infoLine",title:"src-sidebar-SettingsBox-module__title"};const a=s},7936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-instructions-Instructions-module__instructionsList {\n}\n\n.src-sidebar-instructions-Instructions-module__instruction {\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: 3rem auto;\n align-items: center;\n cursor: pointer;\n}\n\n.src-sidebar-instructions-Instructions-module__sign {\n grid-row: 1 / span 2;\n justify-self: center;\n align-self: center;\n height: 1.5rem;\n}\n\n.src-sidebar-instructions-Instructions-module__sign > svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.src-sidebar-instructions-Instructions-module__mainText {\n margin-top: 1rem;\n}\n\n.src-sidebar-instructions-Instructions-module__distance {\n grid-column: 2 / span 1;\n font-size: small;\n color: #5b616a;\n padding-bottom: 1rem;\n border-bottom: 1px solid lightgray;\n}\n",""]),s.locals={instructionsList:"src-sidebar-instructions-Instructions-module__instructionsList",instruction:"src-sidebar-instructions-Instructions-module__instruction",sign:"src-sidebar-instructions-Instructions-module__sign",mainText:"src-sidebar-instructions-Instructions-module__mainText",distance:"src-sidebar-instructions-Instructions-module__distance"};const a=s},515:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-search-AddressInput-module__btnInputClear {\n display: none;\n padding: 0 5px;\n color: gray;\n scale: 0.7;\n}\n\n.src-sidebar-search-AddressInput-module__btnClose {\n display: none;\n}\n\n.src-sidebar-search-AddressInput-module__inputContainer {\n display: grid;\n grid-template-columns: 1fr auto auto;\n grid-gap: 0;\n\n box-sizing: border-box;\n border: 1px solid #5b616a;\n border-radius: 0.2rem;\n /* for the radius we need some padding otherwise the corners will be nearly hidden */\n padding: 1px;\n}\n\n.src-sidebar-search-AddressInput-module__input {\n border: none;\n padding: 0.25rem 0.5rem;\n font-size: 1.05rem;\n}\n\n.src-sidebar-search-AddressInput-module__input:focus {\n outline: none;\n}\n\n.src-sidebar-search-AddressInput-module__smallList {\n grid-column: 2 / 3;\n overflow-x: hidden;\n}\n\n@media (max-width: 44rem) {\n .src-sidebar-search-AddressInput-module__fullscreen {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: white;\n z-index: 5;\n padding: 0.5rem;\n }\n\n .src-sidebar-search-AddressInput-module__fullscreen .src-sidebar-search-AddressInput-module__inputContainer {\n grid-template-columns: auto 1fr auto;\n }\n\n .src-sidebar-search-AddressInput-module__fullscreen .src-sidebar-search-AddressInput-module__btnClose {\n display: block;\n margin: 0;\n padding: 5px 15px 5px 5px;\n }\n\n .src-sidebar-search-AddressInput-module__fullscreen .src-sidebar-search-AddressInput-module__btnInputClear {\n display: block;\n }\n /* when showing btnInputClear => remove the padding */\n .src-sidebar-search-AddressInput-module__fullscreen .src-sidebar-search-AddressInput-module__input {\n padding-right: 0;\n }\n}\n\n@media not all and (max-width: 44rem) {\n .src-sidebar-search-AddressInput-module__inputContainer:hover .src-sidebar-search-AddressInput-module__btnInputClear {\n display: block;\n }\n /* when showing btnInputClear => remove the padding */\n .src-sidebar-search-AddressInput-module__inputContainer:hover .src-sidebar-search-AddressInput-module__input {\n padding-right: 0;\n }\n}\n\n.src-sidebar-search-AddressInput-module__topBorder {\n padding-top: 3px;\n margin-top: -5px;\n border-top: dashed gray 2px;\n}\n\n.src-sidebar-search-AddressInput-module__bottomBorder {\n padding-bottom: 3px;\n margin-bottom: -5px;\n border-bottom: dashed gray 2px;\n}\n",""]),s.locals={btnInputClear:"src-sidebar-search-AddressInput-module__btnInputClear",btnClose:"src-sidebar-search-AddressInput-module__btnClose",inputContainer:"src-sidebar-search-AddressInput-module__inputContainer",input:"src-sidebar-search-AddressInput-module__input",smallList:"src-sidebar-search-AddressInput-module__smallList",fullscreen:"src-sidebar-search-AddressInput-module__fullscreen",topBorder:"src-sidebar-search-AddressInput-module__topBorder",bottomBorder:"src-sidebar-search-AddressInput-module__bottomBorder"};const a=s},4023:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-search-AddressInputAutocomplete-module__autocompleteItem:not(:last-child) {\n border-bottom: 1px lightgray solid;\n}\n\n@media (max-width: 44rem) {\n .src-sidebar-search-AddressInputAutocomplete-module__autocompleteItem:first-child {\n border-top: 1px lightgray solid;\n }\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__selectableItem {\n display: block;\n width: 100%;\n border: none;\n background: none;\n color: inherit;\n font: inherit;\n padding: 0;\n cursor: pointer;\n outline: inherit;\n overflow: hidden;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__highlightedItem,\n.src-sidebar-search-AddressInputAutocomplete-module__selectableItem:hover {\n background-color: #ececec;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__selectableItem:active {\n background-color: #c6c6c6;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__currentLocationEntry {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5rem;\n margin: 0.5rem 0.5rem;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__currentLocationIcon {\n width: 1.2rem;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__currentLocationIcon > svg {\n height: 100%;\n width: 100%;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__moreResultsEntry {\n padding: 0.5em 0em;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__geocodingEntry {\n display: flex;\n flex-direction: column;\n text-align: start;\n margin: 0.4rem 0.5rem;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__mainText {\n font-weight: bold;\n}\n\n.src-sidebar-search-AddressInputAutocomplete-module__moreResultsText,\n.src-sidebar-search-AddressInputAutocomplete-module__secondaryText {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n font-size: small;\n color: #5b616a;\n}\n",""]),s.locals={autocompleteItem:"src-sidebar-search-AddressInputAutocomplete-module__autocompleteItem",selectableItem:"src-sidebar-search-AddressInputAutocomplete-module__selectableItem",highlightedItem:"src-sidebar-search-AddressInputAutocomplete-module__highlightedItem",currentLocationEntry:"src-sidebar-search-AddressInputAutocomplete-module__currentLocationEntry",currentLocationIcon:"src-sidebar-search-AddressInputAutocomplete-module__currentLocationIcon",moreResultsEntry:"src-sidebar-search-AddressInputAutocomplete-module__moreResultsEntry",geocodingEntry:"src-sidebar-search-AddressInputAutocomplete-module__geocodingEntry",mainText:"src-sidebar-search-AddressInputAutocomplete-module__mainText",moreResultsText:"src-sidebar-search-AddressInputAutocomplete-module__moreResultsText",secondaryText:"src-sidebar-search-AddressInputAutocomplete-module__secondaryText"};const a=s},7878:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-search-PopUp-module__popup {\n box-sizing: border-box;\n background-color: white;\n border: solid 1px lightgray;\n box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);\n border-radius: 0.2rem;\n position: absolute;\n pointer-events: all;\n}\n",""]),s.locals={popup:"src-sidebar-search-PopUp-module__popup"};const a=s},271:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-search-Search-module__searchBoxParent {\n margin: 0.1rem 0.5rem 0.5rem 0.5rem;\n}\n\n.src-sidebar-search-Search-module__searchBox {\n display: grid;\n grid-template-columns: auto 1fr auto;\n align-items: center;\n grid-gap: 0.5rem;\n margin: 0.5rem 0.1rem 0.7rem 0;\n}\n\n.src-sidebar-search-Search-module__searchBoxScrollable {\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.src-sidebar-search-Search-module__searchBoxInput {\n grid-column: 2 / span 2;\n}\n\n.src-sidebar-search-Search-module__removeSearchBox {\n grid-column: 4;\n width: 1rem;\n color: #adadad;\n justify-self: center;\n}\n\n.src-sidebar-search-Search-module__markerContainer {\n grid-column: 1 / span 1;\n align-self: center;\n justify-self: center;\n width: 1rem;\n}\n\n.src-sidebar-search-Search-module__markerContainer > svg {\n height: 100%;\n width: 100%;\n}\n\n.src-sidebar-search-Search-module__searchOptions {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin: 1rem 0;\n}\n\n.src-sidebar-search-Search-module__geocodingResults {\n grid-column: 1 / span 3;\n}\n\n.src-sidebar-search-Search-module__addSearchBox,\n.src-sidebar-search-Search-module__settingsButton {\n font-size: 14px;\n color: gray;\n}\n\n.src-sidebar-search-Search-module__lastSearchLine {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n margin-right: 2px;\n}\n\n.src-sidebar-search-Search-module__addSearchBox:hover path,\n.src-sidebar-search-Search-module__infoButton:hover path {\n fill: black;\n}\n\n.src-sidebar-search-Search-module__infoButton:active path,\n.src-sidebar-search-Search-module__addSearchBox:active path,\n.src-sidebar-search-Search-module__markerTarget:active path {\n fill: lightgray;\n}\n\n.src-sidebar-search-Search-module__addSearchBox svg {\n width: 18px;\n height: 18px;\n}\n\n.src-sidebar-search-Search-module__addSearchBox svg {\n color: #adadad;\n padding: 0 1.25em 0 0;\n}\n\n.src-sidebar-search-Search-module__addSearchBox {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n}\n\n.src-sidebar-search-Search-module__infoButton svg {\n fill: #adadad;\n}\n\n.src-sidebar-search-Search-module__markerContainer:hover svg {\n fill: black !important;\n}\n\n.src-sidebar-search-Search-module__markerContainer,\n.src-sidebar-search-Search-module__markerSelected,\n.src-sidebar-search-Search-module__markerTarget {\n grid-column: 1 / span 1;\n align-self: center;\n justify-self: center;\n width: 1rem;\n}\n\n.src-sidebar-search-Search-module__markerContainer {\n outline: none;\n}\n\n.src-sidebar-search-Search-module__markerTarget:hover svg {\n fill: black;\n}\n\n.src-sidebar-search-Search-module__markerContainer > svg,\n.src-sidebar-search-Search-module__markerTarget > svg {\n height: 100%;\n width: 100%;\n}\n\n.src-sidebar-search-Search-module__markerSelected {\n margin-left: -4px;\n}\n\n.src-sidebar-search-Search-module__markerTarget > svg {\n transform: scaleX(1.7) scaleY(1.5);\n margin-left: 3px;\n fill: gray;\n}\n\n.src-sidebar-search-Search-module__dropPreview > svg {\n fill: black;\n}\n\n.src-sidebar-search-Search-module__hide {\n visibility: hidden;\n}\n",""]),s.locals={searchBoxParent:"src-sidebar-search-Search-module__searchBoxParent",searchBox:"src-sidebar-search-Search-module__searchBox",searchBoxScrollable:"src-sidebar-search-Search-module__searchBoxScrollable",searchBoxInput:"src-sidebar-search-Search-module__searchBoxInput",removeSearchBox:"src-sidebar-search-Search-module__removeSearchBox",markerContainer:"src-sidebar-search-Search-module__markerContainer",searchOptions:"src-sidebar-search-Search-module__searchOptions",geocodingResults:"src-sidebar-search-Search-module__geocodingResults",addSearchBox:"src-sidebar-search-Search-module__addSearchBox",settingsButton:"src-sidebar-search-Search-module__settingsButton",lastSearchLine:"src-sidebar-search-Search-module__lastSearchLine",infoButton:"src-sidebar-search-Search-module__infoButton",markerTarget:"src-sidebar-search-Search-module__markerTarget",markerSelected:"src-sidebar-search-Search-module__markerSelected",dropPreview:"src-sidebar-search-Search-module__dropPreview",hide:"src-sidebar-search-Search-module__hide"};const a=s},6629:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5402),i=n.n(r),o=n(352),s=n.n(o)()(i());s.push([e.id,".src-sidebar-search-routingProfiles-RoutingProfiles-module__profilesParent {\n display: flex;\n flex-direction: row;\n padding: 0.6em 0 0 0;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__profiles {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n padding-right: 0.5em;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__selectedProfile {\n background-color: rgba(39, 93, 173, 0.2);\n color: #275dad;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__selectedProfile:hover {\n color: #275dad;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__profileBtn {\n border-radius: 50%;\n margin: 0.1em;\n padding: 0.3em;\n transform: scale(1.1);\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__asIndicator {\n position: absolute;\n left: -21px;\n top: -40px;\n z-index: 1;\n scale: 0.1;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox,\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox {\n border-radius: 50%;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox svg path,\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox svg path {\n fill: #a8a8a8;\n stroke: #a8a8a8;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox:active svg path,\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox:active svg path {\n fill: lightgray;\n stroke: lightgray;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox:hover svg path,\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox:hover svg path {\n fill: #000000;\n stroke: #000000;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox:active svg path,\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox:active svg path {\n fill: lightgray;\n stroke: lightgray;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox svg,\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox svg {\n margin: 0;\n padding: 8px;\n width: 18px;\n height: 18px;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox svg {\n transform: rotate(0);\n animation-name: src-sidebar-search-routingProfiles-RoutingProfiles-module__reverse_rotate;\n animation-duration: 0.2s;\n}\n\n.src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox svg {\n transform: rotate(180deg);\n animation-name: src-sidebar-search-routingProfiles-RoutingProfiles-module__setting_rotate;\n animation-duration: 0.2s;\n}\n\n@keyframes src-sidebar-search-routingProfiles-RoutingProfiles-module__setting_rotate {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(180deg);\n }\n}\n\n@keyframes src-sidebar-search-routingProfiles-RoutingProfiles-module__reverse_rotate {\n 0% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(0);\n }\n}\n",""]),s.locals={profilesParent:"src-sidebar-search-routingProfiles-RoutingProfiles-module__profilesParent",profiles:"src-sidebar-search-routingProfiles-RoutingProfiles-module__profiles",selectedProfile:"src-sidebar-search-routingProfiles-RoutingProfiles-module__selectedProfile",profileBtn:"src-sidebar-search-routingProfiles-RoutingProfiles-module__profileBtn",asIndicator:"src-sidebar-search-routingProfiles-RoutingProfiles-module__asIndicator",enabledCMBox:"src-sidebar-search-routingProfiles-RoutingProfiles-module__enabledCMBox",cmBox:"src-sidebar-search-routingProfiles-RoutingProfiles-module__cmBox",reverse_rotate:"src-sidebar-search-routingProfiles-RoutingProfiles-module__reverse_rotate",setting_rotate:"src-sidebar-search-routingProfiles-RoutingProfiles-module__setting_rotate"};const a=s},9103:(e,t,n)=>{!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,s){s&&s!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=a(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),s=t.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return e.Pass;var u=c(t,s[l].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}for(l=s.length-1;l>=0;l--){var d=s[l].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var u=c(t,o[s].head);if(!u||i.indexOf(u)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),l(t,-1),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=s(n))}}function s(t){return function(i){return function(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var s=r(o,"pairs"),c=s.indexOf(i);if(-1==c)return e.Pass;for(var h,p=r(o,"closeBefore"),f=r(o,"triples"),m=s.charAt(c+1)==i,g=t.listSelections(),_=c%2==0,y=0;y<g.length;y++){var v,b=g[y],x=b.head,w=t.getRange(x,n(x.line,x.ch+1));if(_&&!b.empty())v="surround";else if(!m&&_||w!=i)if(m&&x.ch>1&&f.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;v="addFour"}else if(m){var k=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(w)||k==i||e.isWordChar(k))return e.Pass;v="both"}else{if(!_||!(0===w.length||/\s/.test(w)||p.indexOf(w)>-1))return e.Pass;v="both"}else v=m&&d(t,x)?"both":f.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(h){if(h!=v)return e.Pass}else h=v}var C=c%2?s.charAt(c-1):i,S=c%2?i:s.charAt(c+1);t.operation((function(){if("skip"==h)l(t,1);else if("skipThree"==h)l(t,3);else if("surround"==h){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=C+e[n]+S;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),n=0;n<e.length;n++)e[n]=u(e[n]);t.setSelections(e)}else"both"==h?(t.replaceSelection(C+S,null),t.triggerElectric(C+S),l(t,-1)):"addFour"==h&&(t.replaceSelection(C+C+C+C,"before"),l(t,1))}))}(i,t)}}function a(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){for(var n=[],r=e.listSelections(),i=0,o=0;o<r.length;o++){var s=r[o];s.head==e.getCursor()&&(i=o);var a=s.head.ch||t>0?{line:s.head.line,ch:s.head.ch+t}:{line:s.head.line-1};n.push({anchor:a,head:a})}e.setSelections(n,i)}function u(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function c(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function d(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(3710))},7885:(e,t,n)=>{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var a=e.getLineHandle(t.line),l=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),d=!u&&l>=0&&c.test(a.text.charAt(l))&&r[a.text.charAt(l)]||c.test(a.text.charAt(l+1))&&r[a.text.charAt(++l)];if(!d)return null;var h=">"==d.charAt(1)?1:-1;if(o&&o.strict&&h>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),f=s(e,n(t.line,l+(h>0?1:0)),h,p,o);return null==f?null:{from:n(t.line,l),to:f&&f.pos,match:f&&f.ch==d.charAt(0),forward:h>0}}function s(e,t,o,s,a){for(var l=a&&a.maxScanLineLength||1e4,u=a&&a.maxScanLines||1e3,c=[],d=i(a),h=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),p=t.line;p!=h;p+=o){var f=e.getLine(p);if(f){var m=o>0?0:f.length-1,g=o>0?f.length:-1;if(!(f.length>l))for(p==t.line&&(m=t.ch-(o<0?1:0));m!=g;m+=o){var _=f.charAt(m);if(d.test(_)&&(void 0===s||(e.getTokenTypeAt(n(p,m+1))||"")==(s||""))){var y=r[_];if(y&&">"==y.charAt(1)==o>0)c.push(_);else{if(!c.length)return{pos:n(p,m),ch:_};c.pop()}}}}}return p-o!=(o>0?e.lastLine():e.firstLine())&&null}function a(e,r,i){for(var s=e.state.matchBrackets.maxHighlightLineLength||1e3,a=i&&i.highlightNonMatching,l=[],u=e.listSelections(),c=0;c<u.length;c++){var d=u[c].empty()&&o(e,u[c].head,i);if(d&&(d.match||!1!==a)&&e.getLine(d.from.line).length<=s){var h=d.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(d.from,n(d.from.line,d.from.ch+1),{className:h})),d.to&&e.getLine(d.to.line).length<=s&&l.push(e.markText(d.to,n(d.to.line,d.to.ch+1),{className:h}))}}if(l.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<l.length;e++)l[e].clear()}))};if(!r)return p;setTimeout(p,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=a(e,!1,e.state.matchBrackets)}))}function u(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",u),u(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",u))})),e.defineExtension("matchBrackets",(function(){a(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return s(this,e,t,n,r)}))}(n(3710))},3395:(e,t,n)=>{!function(e){"use strict";var t="CodeMirror-hint-active";function n(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in u)i[o]=u[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),t);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<r.length;i++)if(r[i].head.line!=r[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new n(this,t);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var r=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},i=window.cancelAnimationFrame||clearTimeout;function o(e){return"string"==typeof e?e:e.text}function s(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(n,r){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=n,this.data=r,this.picked=!1;var i=this,a=n.cm,l=a.getInputField().ownerDocument,u=l.defaultView||l.parentWindow,c=this.hints=l.createElement("ul");c.setAttribute("role","listbox"),c.setAttribute("aria-expanded","true"),c.id=this.id;var d=n.cm.options.theme;c.className="CodeMirror-hints "+d,this.selectedHint=r.selectedHint||0;for(var h=r.list,p=0;p<h.length;++p){var f=c.appendChild(l.createElement("li")),m=h[p],g="CodeMirror-hint"+(p!=this.selectedHint?"":" "+t);null!=m.className&&(g=m.className+" "+g),f.className=g,p==this.selectedHint&&f.setAttribute("aria-selected","true"),f.id=this.id+"-"+p,f.setAttribute("role","option"),m.render?m.render(f,r,m):f.appendChild(l.createTextNode(m.displayText||o(m))),f.hintId=p}var _=n.options.container||l.body,y=a.cursorCoords(n.options.alignWithWord?r.from:null),v=y.left,b=y.bottom,x=!0,w=0,k=0;if(_!==l.body){var C=-1!==["absolute","relative","fixed"].indexOf(u.getComputedStyle(_).position)?_:_.offsetParent,S=C.getBoundingClientRect(),A=l.body.getBoundingClientRect();w=S.left-A.left-C.scrollLeft,k=S.top-A.top-C.scrollTop}c.style.left=v-w+"px",c.style.top=b-k+"px";var E=u.innerWidth||Math.max(l.body.offsetWidth,l.documentElement.offsetWidth),M=u.innerHeight||Math.max(l.body.offsetHeight,l.documentElement.offsetHeight);_.appendChild(c),a.getInputField().setAttribute("aria-autocomplete","list"),a.getInputField().setAttribute("aria-owns",this.id),a.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var T,P=n.options.moveOnOverlap?c.getBoundingClientRect():new DOMRect,R=!!n.options.paddingForScrollbar&&c.scrollHeight>c.clientHeight+1;if(setTimeout((function(){T=a.getScrollInfo()})),P.bottom-M>0){var I=P.bottom-P.top,L=P.top-(y.bottom-y.top)-2;M-P.top<L?(I>L&&(c.style.height=(I=L)+"px"),c.style.top=(b=y.top-I)+k+"px",x=!1):c.style.height=M-P.top-2+"px"}var O,z=P.right-E;if(R&&(z+=a.display.nativeBarWidth),z>0&&(P.right-P.left>E&&(c.style.width=E-5+"px",z-=P.right-P.left-E),c.style.left=(v=Math.max(y.left-z-w,0))+"px"),R)for(var F=c.firstChild;F;F=F.nextSibling)F.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var s in r)r.hasOwnProperty(s)&&o(s,r[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&o(s,a[s]);return i}(n,{moveFocus:function(e,t){i.changeActive(i.selectedHint+e,t)},setFocus:function(e){i.changeActive(e)},menuSize:function(){return i.screenAmount()},length:h.length,close:function(){n.close()},pick:function(){i.pick()},data:r})),n.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){O=setTimeout((function(){n.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(O)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();T||(T=a.getScrollInfo());var r=b+T.top-e.top,i=r-(u.pageYOffset||(l.documentElement||l.body).scrollTop);if(x||(i+=c.offsetHeight),i<=t.top||i>=t.bottom)return n.close();c.style.top=r+"px",c.style.left=v+T.left-e.left+"px"}),e.on(c,"dblclick",(function(e){var t=s(c,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),i.pick())})),e.on(c,"click",(function(e){var t=s(c,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),n.options.completeOnSingleClick&&i.pick())})),e.on(c,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var D=this.getSelectedHintRange();return 0===D.from&&0===D.to||this.scrollToActive(),e.signal(r,"select",h[this.selectedHint],c.childNodes[this.selectedHint]),!0}function l(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(o(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var o=this;this.debounce=r((function(){o.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;l(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new a(this,t),e.signal(t,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(n,r){if(n>=this.data.list.length?n=r?this.data.list.length-1:0:n<0&&(n=r?0:this.data.list.length-1),this.selectedHint!=n){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+t,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=n]).className+=" "+t,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}(e,i);!function i(o){if(o==r.length)return t(null);l(r[o],e,n,(function(e){e&&e.list.length>0?t(e):i(o+1)}))}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),s=e.Pos(i.line,o.start),a=i;o.start<i.ch&&/\w/.test(o.string.charAt(i.ch-o.start-1))?r=o.string.substr(0,i.ch-o.start):(r="",s=i);for(var l=[],u=0;u<n.words.length;u++){var c=n.words[u];c.slice(0,r.length)==r&&l.push(c)}if(l.length)return{list:l,from:s,to:a}})),e.commands.autocomplete=e.showHint;var u={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(3710))},3520:(e,t,n)=>{!function(e){"use strict";var t="CodeMirror-lint-markers",n="CodeMirror-lint-line-";function r(e){e.parentNode&&e.parentNode.removeChild(e)}function i(t,n,i,o){var s=function(t,n,r){var i=document.createElement("div");function o(t){if(!i.parentNode)return e.off(document,"mousemove",o);i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",i.style.left=t.clientX+5+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(n),null!=i.style.opacity&&(i.style.opacity=1),i}(t,n,i);function a(){var t;e.off(o,"mouseout",a),s&&((t=s).parentNode&&(null==t.style.opacity&&r(t),t.style.opacity=0,setTimeout((function(){r(t)}),600)),s=null)}var l=setInterval((function(){if(s)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}if(!s)return clearInterval(l)}),400);e.on(o,"mouseout",a)}function o(e,t,n){for(var r in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},s)this.options[r]=s[r];for(var r in t)s.hasOwnProperty(r)?null!=t[r]&&(this.options[r]=t[r]):t.options||(this.linterOptions[r]=t[r]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){!function(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var r=n.getBoundingClientRect(),o=(r.left+r.right)/2,s=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:o,top:s},"client")),l=[],c=0;c<a.length;++c){var d=a[c].__annotation;d&&l.push(d)}l.length&&function(e,t,n){for(var r=n.target||n.srcElement,o=document.createDocumentFragment(),s=0;s<t.length;s++){var a=t[s];o.appendChild(u(a))}i(e,n,o,r)}(e,l,t)}}(e,t)},this.waitingFor=0}var s={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function a(e){var n=e.state.lint;n.hasGutter&&e.clearGutter(t),n.options.highlightLines&&function(e){e.eachLine((function(t){var n=t.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(t.wrapClass);n&&e.removeLineClass(t,"wrap",n[0])}))}(e);for(var r=0;r<n.marked.length;++r)n.marked[r].clear();n.marked.length=0}function l(t,n,r,o,s){var a=document.createElement("div"),l=a;return a.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,o&&((l=a.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=s&&e.on(l,"mouseover",(function(e){i(t,e,n,l)})),a}function u(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+t,void 0!==e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function c(t){var n=t.state.lint;if(n){var r=n.options,i=r.getAnnotations||t.getHelper(e.Pos(0,0),"lint");if(i)if(r.async||i.async)!function(t,n){var r=t.state.lint,i=++r.waitingFor;function o(){i=-1,t.off("change",o)}t.on("change",o),n(t.getValue(),(function(n,s){t.off("change",o),r.waitingFor==i&&(s&&n instanceof e&&(n=s),t.operation((function(){d(t,n)})))}),r.linterOptions,t)}(t,i);else{var o=i(t.getValue(),n.linterOptions,t);if(!o)return;o.then?o.then((function(e){t.operation((function(){d(t,e)}))})):t.operation((function(){d(t,o)}))}}}function d(e,r){var i,o,s=e.state.lint;if(s){var c=s.options;a(e);for(var d=function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}(r),h=0;h<d.length;++h){var p=d[h];if(p){var f=[];p=p.filter((function(e){return!(f.indexOf(e.message)>-1)&&f.push(e.message)}));for(var m=null,g=s.hasGutter&&document.createDocumentFragment(),_=0;_<p.length;++_){var y=p[_],v=y.severity;v||(v="error"),o=v,m="error"==(i=m)?i:o,c.formatAnnotation&&(y=c.formatAnnotation(y)),s.hasGutter&&g.appendChild(u(y)),y.to&&s.marked.push(e.markText(y.from,y.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+v,__annotation:y}))}s.hasGutter&&e.setGutterMarker(h,t,l(e,g,m,d[h].length>1,c.tooltips)),c.highlightLines&&e.addLineClass(h,"wrap",n+m)}}c.onUpdateLinting&&c.onUpdateLinting(r,d,e)}}function h(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){c(e)}),t.options.delay))}e.defineOption("lint",!1,(function(n,r,i){if(i&&i!=e.Init&&(a(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",h),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var s=n.getOption("gutters"),l=!1,u=0;u<s.length;++u)s[u]==t&&(l=!0);var d=n.state.lint=new o(n,r,l);d.options.lintOnChange&&n.on("change",h),0!=d.options.tooltips&&"gutter"!=d.options.tooltips&&e.on(n.getWrapperElement(),"mouseover",d.onMouseOver),c(n)}})),e.defineExtension("performLint",(function(){c(this)}))}(n(3710))},3710:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),s=r||i||o,a=s&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),u=l&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),d=c&&+c[1],h=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),_=/Android/.test(e),y=g||_||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),v=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var k=v&&(u||h&&(null==w||w<12.11)),C=n||s&&a>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var A,E=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return M(e).appendChild(t)}function P(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function R(e,t,n,r){var i=P(e,t,n,r);return i.setAttribute("role","presentation"),i}function I(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 L(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 z(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(t)&&(t+=" "+n[r]);return t}A=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var F=function(e){e.select()};function D(e){return e.display.wrapper.ownerDocument}function j(e){return D(e).defaultView}function N(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function q(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,s=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}}g?F=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(F=function(e){try{e.select()}catch(e){}});var G=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function V(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}G.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},G.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 W=50,H={toString:function(){return"CodeMirror.Pass"}},U={scroll:!1},Z={origin:"*mouse"},X={origin:"+move"};function K(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var $=[""];function Y(e){for(;$.length<=e;)$.push(Q($)+" ");return $[e]}function Q(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ee(){}function te(e,t){var n;return Object.create?n=Object.create(e):(ee.prototype=e,n=new ee),t&&B(t,n),n}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function ie(e,t){return t?!!(t.source.indexOf("\\w")>-1&&re(e))||t.test(e):re(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var se=/[\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&&se.test(e)}function le(e,t,n){for(;(n<0?t>0:t<e.length)&&ae(e.charAt(t));)t+=n;return t}function ue(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ce=null;function de(e,t,n){var r;ce=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var he=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(s,a){var l,u="ltr"==a?"L":"R";if(0==s.length||"ltr"==a&&!e.test(s))return!1;for(var c=s.length,d=[],h=0;h<c;++h)d.push((l=s.charCodeAt(h))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(l):1424<=l&&l<=1524?"R":1536<=l&&l<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(l-1536):1774<=l&&l<=2220?"r":8192<=l&&l<=8203?"w":8204==l?"b":"L");for(var p=0,f=u;p<c;++p){var m=d[p];"m"==m?d[p]=f:f=m}for(var g=0,_=u;g<c;++g){var y=d[g];"1"==y&&"r"==_?d[g]="n":n.test(y)&&(_=y,"r"==y&&(d[g]="R"))}for(var v=1,b=d[0];v<c-1;++v){var x=d[v];"+"==x&&"1"==b&&"1"==d[v+1]?d[v]="1":","!=x||b!=d[v+1]||"1"!=b&&"n"!=b||(d[v]=b),b=x}for(var w=0;w<c;++w){var k=d[w];if(","==k)d[w]="N";else if("%"==k){var C=void 0;for(C=w+1;C<c&&"%"==d[C];++C);for(var S=w&&"!"==d[w-1]||C<c&&"1"==d[C]?"1":"N",A=w;A<C;++A)d[A]=S;w=C-1}}for(var E=0,M=u;E<c;++E){var T=d[E];"L"==M&&"1"==T?d[E]="L":n.test(T)&&(M=T)}for(var P=0;P<c;++P)if(t.test(d[P])){var R=void 0;for(R=P+1;R<c&&t.test(d[R]);++R);for(var I="L"==(P?d[P-1]:u),L=I==("L"==(R<c?d[R]:u))?I?"L":"R":u,O=P;O<R;++O)d[O]=L;P=R-1}for(var z,F=[],D=0;D<c;)if(r.test(d[D])){var j=D;for(++D;D<c&&r.test(d[D]);++D);F.push(new o(0,j,D))}else{var N=D,B=F.length,q="rtl"==a?1:0;for(++D;D<c&&"L"!=d[D];++D);for(var G=N;G<D;)if(i.test(d[G])){N<G&&(F.splice(B,0,new o(1,N,G)),B+=q);var V=G;for(++G;G<D&&i.test(d[G]);++G);F.splice(B,0,new o(2,V,G)),B+=q,N=G}else++G;N<D&&F.splice(B,0,new o(1,N,D))}return"ltr"==a&&(1==F[0].level&&(z=s.match(/^\s+/))&&(F[0].from=z[0].length,F.unshift(new o(0,0,z[0].length))),1==Q(F).level&&(z=s.match(/\s+$/))&&(Q(F).to-=z[0].length,F.push(new o(0,c-z[0].length,c)))),"rtl"==a?F.reverse():F}}();function pe(e,t){var n=e.order;return null==n&&(n=e.order=he(e.text,t)),n}var fe=[],me=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||fe).concat(n)}};function ge(e,t){return e._handlers&&e._handlers[t]||fe}function _e(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=V(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ye(e,t){var n=ge(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ve(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,n||t.type,e,t),Se(t)||t.codemirrorIgnore}function be(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==V(n,t[r])&&n.push(t[r])}function xe(e,t){return ge(e,t).length>0}function we(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){_e(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ae(e){ke(e),Ce(e)}function Ee(e){return e.target||e.srcElement}function Me(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),v&&e.ctrlKey&&1==t&&(t=3),t}var Te,Pe,Re=function(){if(s&&a<9)return!1;var e=P("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==Te){var t=P("span","");T(e,P("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&a<8))}var n=Te?P("span",""):P("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Le(e){if(null!=Pe)return Pe;var t=T(e,document.createTextNode("AخA")),n=A(t,0,1).getBoundingClientRect(),r=A(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Pe=r.right-n.right<3)}var Oe,ze=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Fe=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)},De="oncopy"in(Oe=P("div"))||(Oe.setAttribute("oncopy","return;"),"function"==typeof Oe.oncopy),je=null;var Ne={},Be={};function qe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ne[e]=t}function Ge(e){if("string"==typeof e&&Be.hasOwnProperty(e))e=Be[e];else if(e&&"string"==typeof e.name&&Be.hasOwnProperty(e.name)){var t=Be[e.name];"string"==typeof t&&(t={name:t}),(e=te(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ge("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ge("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=Ge(t);var n=Ne[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var i=We[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var s in t.modeProps)r[s]=t.modeProps[s];return r}var We={};function He(e,t){B(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function Ue(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ze(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 Xe(e,t,n){return!e.startState||e.startState(t,n)}var Ke=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 $e(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 r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ye(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Qe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Je(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function et(e){if(null==e.parent)return null;for(var t=e.parent,n=V(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function tt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var s=0;s<e.lines.length;++s){var a=e.lines[s].height;if(t<a)break;t-=a}return n+s}function nt(e,t){return t>=e.first&&t<e.first+e.size}function rt(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 ot(e,t){return e.line-t.line||e.ch-t.ch}function st(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function at(e){return it(e.line,e.ch)}function lt(e,t){return ot(e,t)<0?t:e}function ut(e,t){return ot(e,t)<0?e:t}function ct(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function dt(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,$e(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,$e(e,t.line).text.length)}function ht(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=dt(e,t[r]);return n}Ke.prototype.eol=function(){return this.pos>=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ke.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},Ke.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=q(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?q(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.indentation=function(){return q(this.string,null,this.tabSize)-(this.lineStart?q(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var pt=function(e,t){this.state=e,this.lookAhead=t},ft=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,n,r){var i=[e.state.modeGen],o={};Ct(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var s=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],l=1,u=0;n.state=!0,Ct(e,t.text,a.mode,n,(function(e,t){for(var n=l;u<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=s,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)a(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function gt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=_t(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&Ue(e.doc.mode,r.state),o=mt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),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 _t(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ft(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=$e(o,a-1),u=l.stateAfter;if(u&&(!n||a+(u instanceof pt?u.lookAhead:0)<=o.modeFrontier))return a;var c=q(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}(e,t,n),s=o>r.first&&$e(r,o-1).stateAfter,a=s?ft.fromSaved(r,s,o):new ft(r,Xe(r.mode),o);return r.iter(o,t,(function(n){yt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?a.save():null,a.nextLine()})),n&&(r.modeFrontier=a.line),a}function yt(e,t,n,r){var i=e.doc.mode,o=new Ke(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&vt(i,n.state);!o.eol();)bt(i,o,n.state),o.start=o.pos}function vt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function bt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ze(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 pt?new ft(e,Ue(e.mode,t.state),n,t.lookAhead):new ft(e,Ue(e.mode,t),n)},ft.prototype.save=function(e){var t=!1!==e?Ue(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pt(t,this.maxLookAhead):t};var xt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function wt(e,t,n,r){var i,o,s=e.doc,a=s.mode,l=$e(s,(t=dt(s,t)).line),u=_t(e,t.line,n),c=new Ke(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=bt(a,c,u.state),r&&o.push(new xt(c,i,Ue(s.mode,u.state)));return r?o:new xt(c,i,u.state)}function kt(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 r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Ct(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,u=0,c=null,d=new Ke(t,e.options.tabSize,r),h=e.options.addModeClass&&[null];for(""==t&&kt(vt(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(a=!1,s&&yt(e,t,r,d.pos),d.pos=t.length,l=null):l=kt(bt(n,d,r.state,h),o),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||c!=l){for(;u<d.start;)i(u=Math.min(d.start,u+5e3),c);c=l}d.start=d.pos}for(;u<d.pos;){var f=Math.min(d.pos,u+5e3);i(f,c),u=f}}var St=!1,At=!1;function Et(e,t,n){this.marker=e,this.from=t,this.to=n}function Mt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Tt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Pt(e,t){if(t.full)return null;var n=nt(e,t.from.line)&&$e(e,t.from.line).markedSpans,r=nt(e,t.to.line)&&$e(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==ot(t.from,t.to),a=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Et(s,o.from,a?null:o.to))}}return r}(n,i,s),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Et(s,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,s),u=1==t.text.length,c=Q(t.text).length+(u?i:0);if(a)for(var d=0;d<a.length;++d){var h=a[d];if(null==h.to){var p=Mt(l,h.marker);p?u&&(h.to=null==p.to?null:p.to+c):h.to=i}}if(l)for(var f=0;f<l.length;++f){var m=l[f];null!=m.to&&(m.to+=c),null==m.from?Mt(a,m.marker)||(m.from=c,u&&(a||(a=[])).push(m)):(m.from+=c,u&&(a||(a=[])).push(m))}a&&(a=Rt(a)),l&&l!=a&&(l=Rt(l));var g=[a];if(!u){var _,y=t.text.length-2;if(y>0&&a)for(var v=0;v<a.length;++v)null==a[v].to&&(_||(_=[])).push(new Et(a[v].marker,null,null));for(var b=0;b<y;++b)g.push(_);g.push(l)}return g}function Rt(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 It(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Lt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Ot(e){return e.inclusiveLeft?-1:0}function zt(e){return e.inclusiveRight?1:0}function Ft(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ot(r.from,i.from)||Ot(e)-Ot(t);return o?-o:ot(r.to,i.to)||zt(e)-zt(t)||t.id-e.id}function Dt(e,t){var n,r=At&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Ft(n,i.marker)<0)&&(n=i.marker);return n}function jt(e){return Dt(e,!0)}function Nt(e){return Dt(e,!1)}function Bt(e,t){var n,r=At&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Ft(n,o.marker)<0)&&(n=o.marker)}return n}function qt(e,t,n,r,i){var o=$e(e,t),s=At&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var u=l.marker.find(0),c=ot(u.from,n)||Ot(l.marker)-Ot(i),d=ot(u.to,r)||zt(l.marker)-zt(i);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(u.to,n)>=0:ot(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(u.from,r)<=0:ot(u.from,r)<0)))return!0}}}function Gt(e){for(var t;t=jt(e);)e=t.find(-1,!0).line;return e}function Vt(e,t){var n=$e(e,t),r=Gt(n);return n==r?t:et(r)}function Wt(e,t){if(t>e.lastLine())return t;var n,r=$e(e,t);if(!Ht(e,r))return t;for(;n=Nt(r);)r=n.find(1,!0).line;return et(r)+1}function Ht(e,t){var n=At&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Ut(e,t,r))return!0}}function Ut(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Ut(e,r.line,Mt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ut(e,t,i))return!0}function Zt(e){for(var t=0,n=(e=Gt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==n)break;t+=a.height}return t}function Xt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=jt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Nt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function Kt(e){var t=e.display,n=e.doc;t.maxLine=$e(n,n.first),t.maxLineLength=Xt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Xt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var $t=function(e,t,n){this.text=e,Lt(this,t),this.height=n?n(this):1};function Yt(e){e.parent=null,It(e)}$t.prototype.lineNo=function(){return et(this)},we($t);var Qt={},Jt={};function en(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function tn(e,t){var n=R("span",null,null,l?"padding-right: .1px":null),r={pre:R("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;r.pos=0,r.addToken=rn,Le(e.display.measure)&&(s=pe(o,e.doc.direction))&&(r.addToken=on(r.addToken,s)),r.map=[],an(o,r,gt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=z(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=z(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ie(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=z(r.pre.className,r.textClass||"")),r}function nn(e){var t=P("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function rn(e,t,n,r,i,o,l){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){u=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var f=d.exec(t),m=f?f.index-p:t.length-p;if(m){var g=document.createTextNode(c.slice(p,p+m));s&&a<9?u.appendChild(P("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!f)break;p+=m+1;var _=void 0;if("\t"==f[0]){var y=e.cm.options.tabSize,v=y-e.col%y;(_=u.appendChild(P("span",Y(v),"cm-tab"))).setAttribute("role","presentation"),_.setAttribute("cm-text","\t"),e.col+=v}else"\r"==f[0]||"\n"==f[0]?((_=u.appendChild(P("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((_=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),s&&a<9?u.appendChild(P("span",[_])):u.appendChild(_),e.col+=1);e.map.push(e.pos,e.pos+1,_),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),s&&a<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||h||o||l){var b=n||"";r&&(b+=r),i&&(b+=i);var x=P("span",[u],b,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,l[w]);return e.content.appendChild(x)}e.content.appendChild(u)}}function on(e,t){return function(n,r,i,o,s,a,l){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.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,r,i,o,s,a,l);e(n,r.slice(0,d.to-u),i,o,null,a,l),o=null,r=r.slice(d.to-u),u=d.to}}}function sn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function an(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,u,c,d,h,p=i.length,f=0,m=1,g="",_=0;;){if(_==f){l=u=c=a="",h=null,d=null,_=1/0;for(var y=[],v=void 0,b=0;b<r.length;++b){var x=r[b],w=x.marker;if("bookmark"==w.type&&x.from==f&&w.widgetNode)y.push(w);else if(x.from<=f&&(null==x.to||x.to>f||w.collapsed&&x.to==f&&x.from==f)){if(null!=x.to&&x.to!=f&&_>x.to&&(_=x.to,u=""),w.className&&(l+=" "+w.className),w.css&&(a=(a?a+";":"")+w.css),w.startStyle&&x.from==f&&(c+=" "+w.startStyle),w.endStyle&&x.to==_&&(v||(v=[])).push(w.endStyle,x.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var k in w.attributes)(h||(h={}))[k]=w.attributes[k];w.collapsed&&(!d||Ft(d.marker,w)<0)&&(d=x)}else x.from>f&&_>x.from&&(_=x.from)}if(v)for(var C=0;C<v.length;C+=2)v[C+1]==_&&(u+=" "+v[C]);if(!d||d.from==f)for(var S=0;S<y.length;++S)sn(t,0,y[S]);if(d&&(d.from||0)==f){if(sn(t,(null==d.to?p+1:d.to)-f,d.marker,null==d.from),null==d.to)return;d.to==f&&(d=!1)}}if(f>=p)break;for(var A=Math.min(p,_);;){if(g){var E=f+g.length;if(!d){var M=E>A?g.slice(0,A-f):g;t.addToken(t,M,s?s+l:l,c,f+M.length==_?u:"",a,h)}if(E>=A){g=g.slice(A-f),f=A;break}f=E,c=""}g=i.slice(o,o=n[m++]),s=en(n[m++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,i.slice(o,o=n[T]),en(n[T+1],t.cm.options))}function ln(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Nt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?et(Q(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ht(e,t)}function un(e,t,n){for(var r,i=[],o=t;o<n;o=r){var s=new ln(e.doc,$e(e.doc,o),o);r=o+s.size,i.push(s)}return i}var cn=null;var dn=null;function hn(e,t){var n=ge(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);cn?r=cn.delayedCallbacks:dn?r=dn:(r=dn=[],setTimeout(pn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},s=0;s<n.length;++s)o(s)}}function pn(){var e=dn;dn=null;for(var t=0;t<e.length;++t)e[t]()}function fn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?_n(e,t):"gutter"==o?vn(e,t,n,r):"class"==o?yn(e,t):"widget"==o&&bn(e,t,r)}t.changes=null}function mn(e){return e.node==e.text&&(e.node=P("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),s&&a<8&&(e.node.style.zIndex=2)),e.node}function gn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):tn(e,t)}function _n(e,t){var n=t.text.className,r=gn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,yn(e,t)):n&&(t.text.className=n)}function yn(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 r=mn(t);t.background=r.insertBefore(P("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?mn(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 vn(e,t,n,r){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 i=mn(t);t.gutterBackground=P("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var s=mn(t),a=t.gutter=P("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(P("div",rt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var u=e.display.gutterSpecs[l].className,c=o.hasOwnProperty(u)&&o[u];c&&a.appendChild(P("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function bn(e,t,n){t.alignable&&(t.alignable=null);for(var r=S("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);wn(e,t,n)}function xn(e,t,n,r){var i=gn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),yn(e,t),vn(e,t,n,r),wn(e,t,r),t.node}function wn(e,t,n){if(kn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)kn(e,t.rest[r],t,n,!1)}function kn(e,t,n,r,i){if(t.widgets)for(var o=mn(n),s=0,a=t.widgets;s<a.length;++s){var l=a[s],u=P("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Cn(l,u,n,r),e.display.input.setUneditable(u),i&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),hn(l,"redraw")}}function Cn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Sn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!I(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;"),T(t.display.measure,P("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function An(e,t){for(var n=Ee(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 En(e){return e.lineSpace.offsetTop}function Mn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Tn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,P("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Pn(e){return W-e.display.nativeBarWidth}function Rn(e){return e.display.scroller.clientWidth-Pn(e)-e.display.barWidth}function In(e){return e.display.scroller.clientHeight-Pn(e)-e.display.barHeight}function Ln(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function On(e,t,n,r){return Dn(e,Fn(e,t),n,r)}function zn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[fr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Fn(e,t){var n=et(t),r=zn(e,n);r&&!r.text?r=null:r&&r.changes&&(fn(e,r,n,ur(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=et(t=Gt(t)),r=e.display.externalMeasured=new ln(e.doc,t,n);r.lineN=n;var i=r.built=tn(e,r);return r.text=i.pre,T(e.display.lineMeasure,i.pre),r}(e,t));var i=Ln(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Dn(e,t,n,r,i){t.before&&(n=-1);var o,l=n+(r||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Rn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],u=s[a+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.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,r){var i,o=Bn(t.map,n,r),l=o.node,u=o.start,c=o.end,d=o.collapse;if(3==l.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((i=s&&a<9&&0==u&&c==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():qn(A(l,u,c).getClientRects(),r)).left||i.right||0==u)break;c=u,u-=1,d="right"}s&&a<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=je)return je;var t=T(e,P("span","x")),n=t.getBoundingClientRect(),r=A(t,0,1).getBoundingClientRect();return je=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var p;u>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!u&&(!i||!i.left&&!i.right)){var f=l.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+lr(e.display),top:f.top,bottom:f.bottom}:Nn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,_=(m+g)/2,y=t.view.measure.heights,v=0;v<y.length-1&&!(_<y[v]);v++);var b=v?y[v-1]:0,x=y[v],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:b,bottom:x};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}(e,t,n,r)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var jn,Nn={left:0,right:0,top:0,bottom:0};function Bn(e,t,n){for(var r,i,o,s,a,l,u=0;u<e.length;u+=3)if(a=e[u],l=e[u+1],t<a?(i=0,o=1,s="left"):t<l?o=1+(i=t-a):(u==e.length-3||t==l&&e[u+3]>t)&&(i=(o=l-a)-1,t>=l&&(s="right")),null!=i){if(r=e[u+2],a==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],s="left";if("right"==n&&i==l-a)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],s="right";break}return{node:r,start:i,end:o,collapse:s,coverStart:a,coverEnd:l}}function qn(e,t){var n=Nn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Gn(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 Vn(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Gn(e.display.view[t])}function Wn(e){Vn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hn(e){return c&&_?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Un(e){return c&&_?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Zn(e){var t=Gt(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Sn(t[r]));return n}function Xn(e,t,n,r,i){if(!i){var o=Zn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var s=Zt(t);if("local"==r?s+=En(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:Un(D(e)));var l=a.left+("window"==r?0:Hn(D(e)));n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function Kn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Hn(D(e)),i-=Un(D(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function $n(e,t,n,r,i){return r||(r=$e(e.doc,t.line)),Xn(e,r,On(e,r,t.ch,i),n)}function Yn(e,t,n,r,i,o){function s(t,s){var a=Dn(e,i,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,Xn(e,r,a,n)}r=r||$e(e.doc,t.line),i||(i=Fn(e,r));var a=pe(r,e.doc.direction),l=t.ch,u=t.sticky;if(l>=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!a)return s("before"==u?l-1:l,"before"==u);function c(e,t,n){return s(n?e-1:e,1==a[t].level!=n)}var d=de(a,l,u),h=ce,p=c(l,d,"before"==u);return null!=h&&(p.other=c(l,h,"before"!=u)),p}function Qn(e,t){var n=0;t=dt(e.doc,t),e.options.lineWrapping||(n=lr(e.display)*t.ch);var r=$e(e.doc,t.line),i=Zt(r)+En(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Jn(e,t,n,r,i){var o=it(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function er(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var i=tt(r,n),o=r.first+r.size-1;if(i>o)return Jn(r.first+r.size-1,$e(r,o).text.length,null,1,1);t<0&&(t=0);for(var s=$e(r,i);;){var a=ir(e,s,i,t,n),l=Bt(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var u=l.find(1);if(u.line==i)return u;s=$e(r,i=u.line)}}function tr(e,t,n,r){r-=Zn(t);var i=t.text.length,o=ue((function(t){return Dn(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=ue((function(t){return Dn(e,n,t).top>r}),o,i)}}function nr(e,t,n,r){return n||(n=Fn(e,t)),tr(e,t,n,Xn(e,t,Dn(e,n,r),"line").top)}function rr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function ir(e,t,n,r,i){i-=Zt(t);var o=Fn(e,t),s=Zn(t),a=0,l=t.text.length,u=!0,c=pe(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?sr:or)(e,t,n,o,c,r,i);a=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var h,p,f=null,m=null,g=ue((function(t){var n=Dn(e,o,t);return n.top+=s,n.bottom+=s,!!rr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(f=t,m=n),!0)}),a,l),_=!1;if(m){var y=r-m.left<m.right-r,v=y==u;g=f+(v?0:1),p=v?"after":"before",h=y?m.left:m.right}else{u||g!=l&&g!=a||g++,p=0==g?"after":g==t.text.length?"before":Dn(e,o,g-(u?1:0)).bottom+s<=i==u?"after":"before";var b=Yn(e,it(n,g,p),"line",t,o);h=b.left,_=i<b.top?-1:i>=b.bottom?1:0}return Jn(n,g=le(t.text,g,1),p,_,r-h)}function or(e,t,n,r,i,o,s){var a=ue((function(a){var l=i[a],u=1!=l.level;return rr(Yn(e,it(n,u?l.to:l.from,u?"before":"after"),"line",t,r),o,s,!0)}),0,i.length-1),l=i[a];if(a>0){var u=1!=l.level,c=Yn(e,it(n,u?l.from:l.to,u?"after":"before"),"line",t,r);rr(c,o,s,!0)&&c.top>s&&(l=i[a-1])}return l}function sr(e,t,n,r,i,o,s){var a=tr(e,t,r,s),l=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,h=0;h<i.length;h++){var p=i[h];if(!(p.from>=u||p.to<=l)){var f=Dn(e,r,1!=p.level?Math.min(u,p.to)-1:Math.max(l,p.from)).right,m=f<o?o-f+1e9:f-o;(!c||d>m)&&(c=p,d=m)}}return c||(c=i[i.length-1]),c.from<l&&(c={from:l,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function ar(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jn){jn=P("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)jn.appendChild(document.createTextNode("x")),jn.appendChild(P("br"));jn.appendChild(document.createTextNode("x"))}T(e.measure,jn);var n=jn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function lr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=P("span","xxxxxxxxxx"),n=P("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ur(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s){var a=e.display.gutterSpecs[s].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:cr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function cr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function dr(e){var t=ar(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/lr(e.display)-3);return function(i){if(Ht(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function hr(e){var t=e.doc,n=dr(e);t.iter((function(e){var t=n(e);t!=e.height&&Je(e,t)}))}function pr(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(e){return null}var l,u=er(e,o,s);if(r&&u.xRel>0&&(l=$e(e.doc,u.line).text).length==u.ch){var c=q(l,l.length,e.options.tabSize)-l.length;u=it(u.line,Math.max(0,Math.round((o-Tn(e.display).left)/lr(e.display))-c))}return u}function fr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function mr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)At&&Vt(e.doc,t)<i.viewTo&&_r(e);else if(n<=i.viewFrom)At&&Wt(e.doc,n+r)>i.viewFrom?_r(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)_r(e);else if(t<=i.viewFrom){var o=yr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):_r(e)}else if(n>=i.viewTo){var s=yr(e,t,t,-1);s?(i.view=i.view.slice(0,s.index),i.viewTo=s.lineN):_r(e)}else{var a=yr(e,t,t,-1),l=yr(e,n,n+r,1);a&&l?(i.view=i.view.slice(0,a.index).concat(un(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):_r(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function gr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[fr(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==V(s,n)&&s.push(n)}}}function _r(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function yr(e,t,n,r){var i,o=fr(e,t),s=e.display.view;if(!At||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=t){if(r>0){if(o==s.length-1)return null;i=a+s[o].size-t,o++}else i=a-t;t+=i,n+=i}for(;Vt(e.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function vr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function br(e){e.display.input.showSelection(e.display.input.prepareSelection())}function xr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=e.options.$customCursor;s&&(t=!0);for(var a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var u=l.empty();if(s){var c=s(e,l);c&&wr(e,c,i)}else(u||e.options.showCursorWhenSelecting)&&wr(e,l.head,i);u||Cr(e,l,o)}}return r}function wr(e,t,n){var r=Yn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(P("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=$n(e,t,"div",null,null),s=o.right-o.left;i.style.width=(s>0?s:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(P("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function kr(e,t){return e.top-t.top||e.left-t.left}function Cr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),s=Tn(e.display),a=s.left,l=Math.max(r.sizerWidth,Rn(e)-r.sizer.offsetLeft)-s.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(P("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var o,s,d=$e(i,t),h=d.text.length;function p(n,r){return $n(e,it(t,n),"div",d,r)}function f(t,n,r){var i=nr(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=pe(d,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var s=e[o];(s.from<n&&s.to>t||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?h:r,(function(e,t,i,d){var g="ltr"==i,_=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),v=null==n&&0==e,b=null==r&&t==h,x=0==d,w=!m||d==m.length-1;if(y.top-_.top<=3){var k=(u?b:v)&&w,C=(u?v:b)&&x?a:(g?_:y).left,S=k?l:(g?y:_).right;c(C,_.top,S-C,_.bottom)}else{var A,E,M,T;g?(A=u&&v&&x?a:_.left,E=u?l:f(e,i,"before"),M=u?a:f(t,i,"after"),T=u&&b&&w?l:y.right):(A=u?f(e,i,"before"):a,E=!u&&v&&x?l:_.right,M=!u&&b&&w?a:y.left,T=u?f(t,i,"after"):l),c(A,_.top,E-A,_.bottom),_.bottom<y.top&&c(a,_.bottom,null,y.top),c(M,y.top,T-M,y.bottom)}(!o||kr(_,o)<0)&&(o=_),kr(y,o)<0&&(o=y),(!s||kr(_,s)<0)&&(s=_),kr(y,s)<0&&(s=y)})),{start:o,end:s}}var h=t.from(),p=t.to();if(h.line==p.line)d(h.line,h.ch,p.ch);else{var f=$e(i,h.line),m=$e(i,p.line),g=Gt(f)==Gt(m),_=d(h.line,h.ch,g?f.text.length+1:null).end,y=d(p.line,g?0:null,p.ch).start;g&&(_.top<y.top-2?(c(_.right,_.top,null,_.bottom),c(a,y.top,y.left,y.bottom)):c(_.right,_.top,y.left-_.right,_.bottom)),_.bottom<y.top&&c(a,_.bottom,null,y.top)}n.appendChild(o)}function Sr(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()||Tr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ar(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Mr(e))}function Er(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Tr(e))}),100)}function Mr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(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(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Sr(e))}function Tr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Pr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var u=t.view[l],c=e.options.lineWrapping,d=void 0,h=0;if(!u.hidden){if(i+=u.line.height,s&&a<8){var p=u.node.offsetTop+u.node.offsetHeight;d=p-n,n=p}else{var f=u.node.getBoundingClientRect();d=f.bottom-f.top,!c&&u.text.firstChild&&(h=u.text.firstChild.getBoundingClientRect().right-f.left-1)}var m=u.line.height-d;if((m>.005||m<-.005)&&(i<r&&(o-=m),Je(u.line,d),Rr(u.line),u.rest))for(var g=0;g<u.rest.length;g++)Rr(u.rest[g]);if(h>e.display.sizerWidth){var _=Math.ceil(h/lr(e.display));_>e.display.maxLineLength&&(e.display.maxLineLength=_,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Rr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Ir(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-En(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=tt(t,r),s=tt(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=tt(t,Zt($e(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=tt(t,Zt($e(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Lr(e,t){var n=e.display,r=ar(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=In(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mn(n),l=t.top<r,u=t.bottom>a-r;if(t.top<i)s.scrollTop=l?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(s.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,p=Rn(e)-n.gutters.offsetWidth,f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?s.scrollLeft=0:t.left<h?s.scrollLeft=Math.max(0,t.left+d-(f?0:10)):t.right>p+h-3&&(s.scrollLeft=t.right+(f?0:10)-p),s}function Or(e,t){null!=t&&(Dr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function zr(e){Dr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Fr(e,t,n){null==t&&null==n||Dr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Dr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,jr(e,Qn(e,t.from),Qn(e,t.to),t.margin))}function jr(e,t,n,r){var i=Lr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Fr(e,i.scrollLeft,i.scrollTop)}function Nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||pi(e,{top:t}),Br(e,t,!0),n&&pi(e),ai(e,100))}function Br(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 qr(e,t,n,r){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)&&!r||(e.doc.scrollLeft=t,gi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Gr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mn(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:r,scrollHeight:r+Pn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Vr=function(e,t,n){this.cm=n;var r=this.vert=P("div",[P("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=P("div",[P("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),me(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),me(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Vr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"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?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r: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==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Vr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Vr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Vr.prototype.zeroWidthHack=function(){var e=v&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new G,this.disableVert=new G},Vr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,r)}))},Vr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Wr=function(){};function Hr(e,t){t||(t=Gr(e));var n=e.display.barWidth,r=e.display.barHeight;Ur(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Pr(e),Ur(e,Gr(e)),n=e.display.barWidth,r=e.display.barHeight}function Ur(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Zr={native:Vr,null:Wr};function Xr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Zr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(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?qr(e,t):Nr(e,t)}),e),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)}var Kr=0;function $r(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:++Kr,markArrays:null},t=e.curOp,cn?cn.ops.push(t):t.ownsGroup=cn={ops:[t],delayedCallbacks:[]}}function Yr(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 r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{cn=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++)Qr(t[n]);for(var r=0;r<t.length;r++)Jr(t[r]);for(var i=0;i<t.length;i++)ei(t[i]);for(var o=0;o<t.length;o++)ti(t[o]);for(var s=0;s<t.length;s++)ni(t[s])}(e)}))}function Qr(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=Pn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Pn(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&Kt(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 ui(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&di(e.cm,e.update)}function ei(e){var t=e.cm,n=t.display;e.updatedDisplay&&Pr(t),e.barMeasure=Gr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=On(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+Pn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Rn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ti(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&qr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==L(D(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hr(t,e.barMeasure),e.updatedDisplay&&mi(t,e.barMeasure),e.selectionChanged&&Sr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Ar(e.cm)}function ni(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&hi(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Br(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&qr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!m){var s=P("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-En(e.display))+"px;\n height: "+(t.bottom-t.top+Pn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(i),e.display.lineSpace.removeChild(s)}}}(t,function(e,t,n,r){var i;null==r&&(r=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 s=!1,a=Yn(e,t),l=n&&n!=t?Yn(e,n):a,u=Lr(e,i={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-r,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Nr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(s=!0)),null!=u.scrollLeft&&(qr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(s=!0)),!s)break}return i}(t,dt(r,e.scrollToPos.from),dt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||ye(i[s],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&ye(o[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ri(e,t){if(e.curOp)return t();$r(e);try{return t()}finally{Yr(e)}}function ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);$r(e);try{return t.apply(e,arguments)}finally{Yr(e)}}}function oi(e){return function(){if(this.curOp)return e.apply(this,arguments);$r(this);try{return e.apply(this,arguments)}finally{Yr(this)}}}function si(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);$r(t);try{return e.apply(this,arguments)}finally{Yr(t)}}}function ai(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,N(li,e))}function li(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=_t(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength?Ue(t.mode,r.state):null,l=mt(e,o,r,!0);a&&(r.state=a),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!d&&h<s.length;++h)d=s[h]!=o.styles[h];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&yt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ai(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&ri(e,(function(){for(var t=0;t<i.length;t++)gr(e,i[t],"text")}))}}var ui=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Ir(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Rn(e),this.force=n,this.dims=ur(e),this.events=[]};function ci(e){if(e.hasFocus())return null;var t=L(D(e));if(!t||!I(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=j(e).getSelection();r.anchorNode&&r.extend&&I(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function di(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return _r(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==vr(e))return!1;_i(e)&&(_r(e),t.dims=ur(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),At&&(o=Vt(e.doc,o),s=Wt(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=un(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=un(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(fr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(un(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,fr(e,n)))),r.viewTo=n})(e,o,s),n.viewOffset=Zt($e(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=vr(e);if(!a&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=ci(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,s=o.firstChild;function a(t){var n=t.nextSibling;return l&&v&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d<u.length;d++){var h=u[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;s!=h.node;)s=a(s);var p=i&&null!=t&&t<=c&&h.lineNumber;h.changes&&(V(h.changes,"gutter")>-1&&(p=!1),fn(e,h,c,n)),p&&(M(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(rt(e.options,c)))),s=h.node.nextSibling}else{var f=xn(e,h,c,n);o.insertBefore(f,s)}c+=h.size}for(;s;)s=a(s)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=L(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ai(e,400)),n.updateLineNumbers=null,!0}function hi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Rn(e))r&&(t.visible=Ir(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Mn(e.display)-In(e),n.top)}),t.visible=Ir(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!di(e,t))break;Pr(e);var i=Gr(e);br(e),Hr(e,i),mi(e,i),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 pi(e,t){var n=new ui(e,t);if(di(e,n)){Pr(e),hi(e,n);var r=Gr(e);br(e),Hr(e,r),mi(e,r),n.finish()}}function fi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",hn(e,"gutterChanged",e)}function mi(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+Pn(e)+"px"}function gi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=cr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&(n[s].gutter&&(n[s].gutter.style.left=o),n[s].gutterBackground&&(n[s].gutterBackground.style.left=o));var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function _i(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=rt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(P("div",[P("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",fi(e.display),!0}return!1}function yi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],s=null;if("string"!=typeof o&&(s=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:s})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function vi(e){var t=e.gutters,n=e.gutterSpecs;M(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,s=i.style,a=t.appendChild(P("div",null,"CodeMirror-gutter "+o));s&&(a.style.cssText=s),"CodeMirror-linenumbers"==o&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",fi(e)}function bi(e){vi(e.display),mr(e),gi(e)}function xi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=P("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=P("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=R("div",null,"CodeMirror-code"),o.selectionDiv=P("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=P("div",null,"CodeMirror-cursors"),o.measure=P("div",null,"CodeMirror-measure"),o.lineMeasure=P("div",null,"CodeMirror-measure"),o.lineSpace=R("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var u=R("div",[o.lineSpace],"CodeMirror-lines");o.mover=P("div",[u],null,"position: relative"),o.sizer=P("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=P("div",null,null,"position: absolute; height: "+W+"px; width: 1px;"),o.gutters=P("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=P("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=P("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),c&&d>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),s&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&y||(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=yi(i.gutters,i.lineNumbers),vi(o),r.init(o)}ui.prototype.signal=function(e,t){xe(e,t)&&this.events.push(arguments)},ui.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var wi=0,ki=null;function Ci(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 Si(e){var t=Ci(e);return t.x*=ki,t.y*=ki,t}function Ai(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 r=Ci(t),i=r.x,o=r.y,s=ki;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,s=1);var a=e.display,u=a.scroller,p=u.scrollWidth>u.clientWidth,f=u.scrollHeight>u.clientHeight;if(i&&p||o&&f){if(o&&v&&l)e:for(var m=t.target,g=a.view;m!=u;m=m.parentNode)for(var _=0;_<g.length;_++)if(g[_].node==m){e.display.currentWheelTarget=m;break e}if(i&&!n&&!h&&null!=s)return o&&f&&Nr(e,Math.max(0,u.scrollTop+o*s)),qr(e,Math.max(0,u.scrollLeft+i*s)),(!o||o&&f)&&ke(t),void(a.wheelStartX=null);if(o&&null!=s){var y=o*s,b=e.doc.scrollTop,x=b+a.wrapper.clientHeight;y<0?b=Math.max(0,b+y-50):x=Math.min(e.doc.height,x+y+50),pi(e,{top:b,bottom:x})}wi<20&&0!==t.deltaMode&&(null==a.wheelStartX?(a.wheelStartX=u.scrollLeft,a.wheelStartY=u.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=u.scrollLeft-a.wheelStartX,t=u.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(ki=(ki*wi+n)/(wi+1),++wi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}s?ki=-.53:n?ki=15:c?ki=-.7:p&&(ki=-1/3);var Ei=function(e,t){this.ranges=e,this.primIndex=t};Ei.prototype.primary=function(){return this.ranges[this.primIndex]},Ei.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],r=e.ranges[t];if(!st(n.anchor,r.anchor)||!st(n.head,r.head))return!1}return!0},Ei.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Mi(at(this.ranges[t].anchor),at(this.ranges[t].head));return new Ei(e,this.primIndex)},Ei.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ei.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ot(t,r.from())>=0&&ot(e,r.to())<=0)return n}return-1};var Mi=function(e,t){this.anchor=e,this.head=t};function Ti(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return ot(e.from(),t.from())})),n=V(t,i);for(var o=1;o<t.length;o++){var s=t[o],a=t[o-1],l=ot(a.to(),s.from());if(r&&!s.empty()?l>0:l>=0){var u=ut(a.from(),s.from()),c=lt(a.to(),s.to()),d=a.empty()?s.from()==s.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new Mi(d?c:u,d?u:c))}}return new Ei(t,n)}function Pi(e,t){return new Ei([new Mi(e,t||e)],0)}function Ri(e){return e.text?it(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ii(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return Ri(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ri(t).ch-t.to.ch),it(n,r)}function Li(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Mi(Ii(i.anchor,t),Ii(i.head,t)))}return Ti(e.cm,n,e.sel.primIndex)}function Oi(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 zi(e){e.doc.mode=Ve(e.options,e.doc.modeOption),Fi(e)}function Fi(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,ai(e,100),e.state.modeGen++,e.curOp&&mr(e)}function Di(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ji(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){(function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),It(e),Lt(e,n);var i=r?r(e):1;i!=e.height&&Je(e,i)})(e,n,i,r),hn(e,"change",e,t)}function s(e,t){for(var n=[],o=e;o<t;++o)n.push(new $t(u[o],i(o),r));return n}var a=t.from,l=t.to,u=t.text,c=$e(e,a.line),d=$e(e,l.line),h=Q(u),p=i(u.length-1),f=l.line-a.line;if(t.full)e.insert(0,s(0,u.length)),e.remove(u.length,e.size-u.length);else if(Di(e,t)){var m=s(0,u.length-1);o(d,d.text,p),f&&e.remove(a.line,f),m.length&&e.insert(a.line,m)}else if(c==d)if(1==u.length)o(c,c.text.slice(0,a.ch)+h+c.text.slice(l.ch),p);else{var g=s(1,u.length-1);g.push(new $t(h+c.text.slice(l.ch),p,r)),o(c,c.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,a.ch)+u[0]+d.text.slice(l.ch),i(0)),e.remove(a.line+1,f);else{o(c,c.text.slice(0,a.ch)+u[0],i(0)),o(d,h+d.text.slice(l.ch),p);var _=s(1,u.length-1);f>1&&e.remove(a.line+1,f-1),e.insert(a.line+1,_)}hn(e,"change",e,t)}function Ni(e,t,n){!function e(r,i,o){if(r.linked)for(var s=0;s<r.linked.length;++s){var a=r.linked[s];if(a.doc!=i){var l=o&&a.sharedHist;n&&!l||(t(a.doc,l),e(a.doc,r,l))}}}(e,null,!0)}function Bi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,hr(e),zi(e),qi(e),e.options.direction=t.direction,e.options.lineWrapping||Kt(e),e.options.mode=t.modeOption,mr(e)}function qi(e){("rtl"==e.doc.direction?O:E)(e.display.lineDiv,"CodeMirror-rtl")}function Gi(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 Vi(e,t){var n={from:at(t.from),to:Ri(t),text:Ye(e,t.from,t.to)};return Xi(e,n,t.from.line,t.to.line+1),Ni(e,(function(e){return Xi(e,n,t.from.line,t.to.line+1)}),!0),n}function Wi(e){for(;e.length&&Q(e).ranges;)e.pop()}function Hi(e,t,n,r){var i=e.history;i.undone.length=0;var o,s,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Wi(e.done),Q(e.done)):e.done.length&&!Q(e.done).ranges?Q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}(i,i.lastOp==r)))s=Q(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,s.to)?s.to=Ri(t):o.changes.push(Vi(e,t));else{var l=Q(i.done);for(l&&l.ranges||Zi(e.sel,i.done),o={changes:[Vi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||ye(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Q(i.done),t))?i.done[i.done.length-1]=t:Zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Wi(i.undone)}function Zi(e,t){var n=Q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Xi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Ki(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 $i(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Ki(n[i]));return r}(e,t),r=Pt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function Yi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Ei.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];r.push({changes:a});for(var l=0;l<s.length;++l){var u=s[l],c=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&V(t,Number(c[1]))>-1&&(Q(a)[d]=u[d],delete u[d])}}}return r}function Qi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ot(t,i)<0;o!=ot(n,i)<0?(i=t,t=n):o!=ot(t,n)<0&&(t=n)}return new Mi(i,t)}return new Mi(n||t,t)}function Ji(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),io(e,new Ei([Qi(e.sel.primary(),t,n,i)],0),r)}function eo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Qi(e.sel.ranges[o],t[o],null,i);io(e,Ti(e.cm,r,e.sel.primIndex),n)}function to(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,io(e,Ti(e.cm,i,e.sel.primIndex),r)}function no(e,t,n,r){io(e,Pi(t,n),r)}function ro(e,t,n){var r=e.history.done,i=Q(r);i&&i.ranges?(r[r.length-1]=t,oo(e,t,n)):io(e,t,n)}function io(e,t,n){oo(e,t,n),Ui(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function oo(e,t,n){(xe(e,"beforeSelectionChange")||e.cm&&xe(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Mi(dt(e,t[n].anchor),dt(e,t[n].head))},origin:n&&n.origin};return ye(e,"beforeSelectionChange",e,r),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Ti(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);so(e,lo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||zr(e.cm)}function so(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,be(e.cm)),hn(e,"cursorActivity",e))}function ao(e){so(e,lo(e,e.sel,null,!1))}function lo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=co(e,s.anchor,a&&a.anchor,n,r),u=s.head==s.anchor?l:co(e,s.head,a&&a.head,n,r);(i||l!=s.anchor||u!=s.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Mi(l,u))}return i?Ti(e.cm,i,t.primIndex):t}function uo(e,t,n,r,i){var o=$e(e,t.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,c="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(u?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(c?a.to>=t.ch:a.to>t.ch))){if(i&&(ye(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?c:u)&&(d=ho(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=ot(d,n))&&(r<0?h<0:h>0))return uo(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?u:c)&&(p=ho(e,p,r,p.line==t.line?o:null)),p?uo(e,p,t,r,i):null}}return t}function co(e,t,n,r,i){var o=r||1;return uo(e,t,n,o,i)||!i&&uo(e,t,n,o,!0)||uo(e,t,n,-o,i)||!i&&uo(e,t,n,-o,!0)||(e.cantEdit=!0,it(e.first,0))}function ho(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?dt(e,it(t.line-1)):null:n>0&&t.ch==(r||$e(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 po(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),U)}function fo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=dt(e,t)),n&&(r.to=dt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ye(e,"beforeChange",e,r),e.cm&&ye(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function mo(e,t,n){if(e.cm){if(!e.cm.curOp)return ii(e.cm,mo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"))||(t=fo(e,t,!0))){var r=St&&!n&&function(e,t,n){var r=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||r&&-1!=V(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var u=i[l];if(!(ot(u.to,a.from)<0||ot(u.from,a.to)>0)){var c=[l,1],d=ot(u.from,a.from),h=ot(u.to,a.to);(d<0||!s.inclusiveLeft&&!d)&&c.push({from:u.from,to:a.from}),(h>0||!s.inclusiveRight&&!h)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)go(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else go(e,t)}}function go(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var n=Li(e,t);Hi(e,t,n,e.cm?e.cm.curOp.id:NaN),vo(e,t,n,Pt(e,t));var r=[];Ni(e,(function(e,n){n||-1!=V(r,e.history)||(ko(e.history,t),r.push(e.history)),vo(e,t,null,Pt(e,t))}))}}function _o(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,s=e.sel,a="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,u=0;u<a.length&&(i=a[u],n?!i.ranges||i.equals(e.sel):i.ranges);u++);if(u!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=a.pop()).ranges){if(r)return void a.push(i);break}if(Zi(i,l),n&&!i.equals(e.sel))return void io(e,i,{clearRedo:!1});s=i}var c=[];Zi(s,l),l.push({changes:c,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"),h=function(n){var r=i.changes[n];if(r.origin=t,d&&!fo(e,r,!1))return a.length=0,{};c.push(Vi(e,r));var o=n?Li(e,r):Q(a);vo(e,r,o,$i(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Ri(r)});var s=[];Ni(e,(function(e,t){t||-1!=V(s,e.history)||(ko(e.history,r),s.push(e.history)),vo(e,r,null,$i(e,r))}))},p=i.changes.length-1;p>=0;--p){var f=h(p);if(f)return f.v}}}}function yo(e,t){if(0!=t&&(e.first+=t,e.sel=new Ei(J(e.sel.ranges,(function(e){return new Mi(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){mr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)gr(e.cm,r,"gutter")}}function vo(e,t,n,r){if(e.cm&&!e.cm.curOp)return ii(e.cm,vo)(e,t,n,r);if(t.to.line<e.first)yo(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 i=t.text.length-1-(e.first-t.from.line);yo(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[Q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,$e(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),n||(n=Li(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=et(Gt($e(r,o.line))),r.iter(l,s.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),ji(r,t,n,dr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=Xt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=$e(e,r).stateAfter;if(i&&(!(i instanceof pt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),ai(e,400);var u=t.text.length-(s.line-o.line)-1;t.full?mr(e):o.line!=s.line||1!=t.text.length||Di(e.doc,t)?mr(e,o.line,s.line+1,u):gr(e,o.line,"text");var c=xe(e,"changes"),d=xe(e,"change");if(d||c){var h={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&hn(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,r):ji(e,t,r),oo(e,n,U),e.cantEdit&&co(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function bo(e,t,n,r,i){var o;r||(r=n),ot(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),mo(e,{from:n,to:r,text:t,origin:i})}function xo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function wo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)xo(o.ranges[a].anchor,t,n,r),xo(o.ranges[a].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var u=o.changes[l];if(n<u.from.line)u.from=it(u.from.line+r,u.from.ch),u.to=it(u.to.line+r,u.to.ch);else if(t<=u.to.line){s=!1;break}}s||(e.splice(0,i+1),i=0)}}}function ko(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;wo(e.done,n,r,i),wo(e.undone,n,r,i)}function Co(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=$e(e,ct(e,t)):i=et(t),null==i?null:(r(o,i)&&e.cm&&gr(e.cm,i,n),o)}function So(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 Ao(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Mi.prototype.from=function(){return ut(this.anchor,this.head)},Mi.prototype.to=function(){return lt(this.anchor,this.head)},Mi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},So.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Yt(i),hn(i,"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 r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Ao.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof So))){var a=[];this.collapse(a),this.children=[new So(a)],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 r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var s=i.lines.length%25+25,a=s;a<i.lines.length;){var l=new So(i.lines.slice(a,a+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,s),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Ao(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=V(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new Ao(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var Eo=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function Mo(e,t,n){Zt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Or(e,n)}Eo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=et(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Sn(this);Je(n,Math.max(0,n.height-o)),e&&(ri(e,(function(){Mo(e,n,-o),gr(e,r,"widget")})),hn(e,"lineWidgetCleared",e,this,r))}},Eo.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Sn(this)-t;i&&(Ht(this.doc,r)||Je(r,r.height+i),n&&ri(n,(function(){n.curOp.forceUpdate=!0,Mo(n,r,i),hn(n,"lineWidgetChanged",n,e,et(r))})))},we(Eo);var To=0,Po=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++To};function Ro(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=B(r)).shared=!1;var o=[Ro(e,t,n,r,i)],s=o[0],a=r.widgetNode;return Ni(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Ro(e,dt(e,t),dt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=Q(o)})),new Io(o,s)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ii(e.cm,Ro)(e,t,n,r,i);var o=new Po(e,i),s=ot(t,n);if(r&&B(r,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=R("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(qt(e,t.line,t,n,o)||t.line!=n.line&&qt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");At=!0}o.addToHistory&&Hi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(r){u&&o.collapsed&&!u.options.lineWrapping&&Gt(r)==u.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&Je(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new Et(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Je(t,0)})),o.clearOnEnter&&me(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(St=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++To,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)mr(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++)gr(u,c,"text");o.atomic&&ao(u.doc),hn(u,"markerAdded",u,o)}return o}Po.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&$r(e),xe(this,"clear")){var n=this.find();n&&hn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Mt(s.markedSpans,this);e&&!this.collapsed?gr(e,et(s),"text"):e&&(null!=a.to&&(i=et(s)),null!=a.from&&(r=et(s))),s.markedSpans=Tt(s.markedSpans,a),null==a.from&&this.collapsed&&!Ht(this.doc,s)&&e&&Je(s,ar(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=Gt(this.lines[l]),c=Xt(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ao(e.doc)),e&&hn(e,"markerCleared",e,this,r,i),t&&Yr(e),this.parent&&this.parent.clear()}},Po.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],s=Mt(o.markedSpans,this);if(null!=s.from&&(n=it(t?o:et(o),s.from),-1==e))return n;if(null!=s.to&&(r=it(t?o:et(o),s.to),1==e))return r}return n&&{from:n,to:r}},Po.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&ri(r,(function(){var i=t.line,o=et(t.line),s=zn(r,o);if(s&&(Gn(s),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ht(n.doc,i)&&null!=n.height){var a=n.height;n.height=null;var l=Sn(n)-a;l&&Je(i,i.height+l)}hn(r,"markerChanged",r,e)}))},Po.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=V(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Po.prototype.detachLine=function(e){if(this.lines.splice(V(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(Po);var Io=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Lo(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function Oo(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Ni(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==V(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Io.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();hn(this,"clear")}},Io.prototype.find=function(e,t){return this.primary.find(e,t)},we(Io);var zo=0,Fo=function(e,t,n,r,i){if(!(this instanceof Fo))return new Fo(e,t,n,r,i);null==n&&(n=0),Ao.call(this,[new So([new $t("",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=Pi(o),this.history=new Gi(null),this.id=++zo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),ji(this,{from:o,to:o,text:e}),io(this,Pi(o),U)};Fo.prototype=te(Ao.prototype,{constructor:Fo,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,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Qe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:si((function(e){var t=it(this.first,0),n=this.first+this.size-1;mo(this,{from:t,to:it(n,$e(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Fr(this.cm,0,0),io(this,Pi(t),U)})),replaceRange:function(e,t,n,r){bo(this,e,t=dt(this,t),n=n?dt(this,n):t,r)},getRange:function(e,t,n){var r=Ye(this,dt(this,e),dt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(nt(this,e))return $e(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=$e(this,e)),Gt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return dt(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:si((function(e,t,n){no(this,dt(this,"number"==typeof e?it(e,t||0):e),null,n)})),setSelection:si((function(e,t,n){no(this,dt(this,e),dt(this,t||e),n)})),extendSelection:si((function(e,t,n){Ji(this,dt(this,e),t&&dt(this,t),n)})),extendSelections:si((function(e,t){eo(this,ht(this,e),t)})),extendSelectionsBy:si((function(e,t){eo(this,ht(this,J(this.sel.ranges,e)),t)})),setSelections:si((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Mi(dt(this,e[i].anchor),dt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),io(this,Ti(this.cm,r,t),n)}})),addSelection:si((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Mi(dt(this,e),dt(this,t||e))),io(this,Ti(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ye(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ye(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:si((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&"end"!=t&&function(e,t,n){for(var r=[],i=it(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=Oi(a.from,i,o),u=Oi(Ri(a),i,o);if(i=a.to,o=u,"around"==n){var c=e.sel.ranges[s],d=ot(c.head,c.anchor)<0;r[s]=new Mi(d?u:l,d?l:u)}else r[s]=new Mi(l,l)}return new Ei(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)mo(this,r[l]);a?ro(this,a):this.cm&&zr(this.cm)})),undo:si((function(){_o(this,"undo")})),redo:si((function(){_o(this,"redo")})),undoSelection:si((function(){_o(this,"undo",!0)})),redoSelection:si((function(){_o(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,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Gi(this.history),Ni(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:Yi(this.history.done),undone:Yi(this.history.undone)}},setHistory:function(e){var t=this.history=new Gi(this.history);t.done=Yi(e.done.slice(0),null,!0),t.undone=Yi(e.undone.slice(0),null,!0)},setGutterMarker:si((function(e,t,n){return Co(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&oe(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:si((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Co(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,oe(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!nt(this,e))return null;if(t=e,!(e=$e(this,e)))return null}else if(null==(t=et(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:si((function(e,t,n){return Co(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(S(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:si((function(e,t,n){return Co(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(S(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0}))})),addLineWidget:si((function(e,t,n){return function(e,t,n,r){var i=new Eo(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Co(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ht(e,t)){var r=Zt(t)<e.scrollTop;Je(t,t.height+Sn(i)),r&&Or(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&hn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ro(this,dt(this,e),dt(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 Ro(this,e=dt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=$e(this,(e=dt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=dt(this,e),t=dt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),dt(this,it(n,t))},indexFromPos:function(e){var t=(e=dt(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 Fo(Qe(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 r=new Fo(Qe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(ot(o,s)){var a=Ro(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}(r,Lo(this)),r},unlinkDoc:function(e){if(e instanceof Is&&(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),Oo(Lo(this));break}if(e.history==this.history){var n=[e.id];Ni(e,(function(e){return n.push(e.id)}),!0),e.history=new Gi(null),e.history.done=Yi(this.history.done,n),e.history.undone=Yi(this.history.undone,n)}},iterLinkedDocs:function(e){Ni(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ze(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:si((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&ri(t=this.cm,(function(){qi(t),mr(t)})))}))}),Fo.prototype.eachLine=Fo.prototype.iter;var Do=0;function jo(e){var t=this;if(No(t),!ve(t,e)&&!An(t.display,e)){ke(e),s&&(Do=+new Date);var n=pr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&ii(t,(function(){var e={from:n=dt(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};mo(t.doc,e),ro(t.doc,Pi(dt(t.doc,n),dt(t.doc,Ri(e))))}))()},u=function(e,n){if(t.options.allowDropFileTypes&&-1==V(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},c=0;c<r.length;c++)u(r[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()),oo(t.doc,Pi(n,n)),h)for(var p=0;p<h.length;++p)bo(t.doc,"",h[p].anchor,h[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function No(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Bo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var qo=!1;function Go(){var e;qo||(me(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Bo(Vo)}),100))})),me(window,"blur",(function(){return Bo(Tr)})),qo=!0)}function Vo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Wo={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"},Ho=0;Ho<10;Ho++)Wo[Ho+48]=Wo[Ho+96]=String(Ho);for(var Uo=65;Uo<=90;Uo++)Wo[Uo]=String.fromCharCode(Uo);for(var Zo=1;Zo<=12;Zo++)Wo[Zo+111]=Wo[Zo+63235]="F"+Zo;var Xo={};function Ko(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function $o(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=J(n.split(" "),Ko),o=0;o<i.length;o++){var s=void 0,a=void 0;o==i.length-1?(a=i.join(" "),s=r):(a=i.slice(0,o+1).join(" "),s="...");var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[n]}for(var u in t)e[u]=t[u];return e}function Yo(e,t,n,r){var i=(t=ts(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Yo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=Yo(e,t.fallthrough[o],n,r);if(s)return s}}}function Qo(e){var t="string"==typeof e?e:Wo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Jo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function es(e,t){if(h&&34==e.keyCode&&e.char)return!1;var n=Wo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Jo(n,e,t))}function ts(e){return"string"==typeof e?Xo[e]:e}function ns(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&ot(o.from,Q(r).to)<=0;){var s=r.pop();if(ot(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}ri(e,(function(){for(var t=r.length-1;t>=0;t--)bo(e.doc,"",r[t].from,r[t].to,"+delete");zr(e)}))}function rs(e,t,n){var r=le(e.text,t+n,n);return r<0||r>e.text.length?null:r}function is(e,t,n){var r=rs(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function os(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=pe(n,t.doc.direction);if(o){var s,a=i<0?Q(o):o[0],l=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=Fn(t,n);s=i<0?n.text.length-1:0;var c=Dn(t,u,s).top;s=ue((function(e){return Dn(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=rs(n,s,1))}else s=i<0?a.to:a.from;return new it(r,s,l)}}return new it(r,i<0?n.text.length:0,i<0?"before":"after")}Xo.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"},Xo.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"},Xo.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"},Xo.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"]},Xo.default=v?Xo.macDefault:Xo.pcDefault;var ss={selectAll:po,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),U)},killLine:function(e){return ns(e,(function(t){if(t.empty()){var n=$e(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 ns(e,(function(t){return{from:it(t.from().line,0),to:dt(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return ns(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return ns(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 ns(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},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 as(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ls(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=$e(e.doc,t),r=function(e){for(var t;t=Nt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=et(r)),os(!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")}),X)},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")}),X)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ls(e,t.head):r}),X)},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(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=q(e.getLine(o.line),o.ch,r);t.push(Y(r-s%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return ri(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=$e(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=$e(e.doc,i.line-1).text;s&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),it(i.line-1,s.length-1),i,"+transpose"))}n.push(new Mi(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return ri(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 r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);zr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function as(e,t){var n=$e(e.doc,t),r=Gt(n);return r!=n&&(t=et(r)),os(!0,e,r,t,1)}function ls(e,t){var n=as(e,t.line),r=$e(e.doc,n.line),i=pe(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return it(n.line,s?0:o,n.sticky)}return n}function us(e,t,n){if("string"==typeof t&&!(t=ss[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=H}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var cs=new G;function ds(e,t,n,r){var i=e.state.keySeq;if(i){if(Qo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:cs.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),hs(e,i+" "+t,n,r))return!0}return hs(e,t,n,r)}function hs(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Yo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Yo(t,e.options.extraKeys,n,e)||Yo(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&hn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(ke(n),Sr(e)),!!i}function ps(e,t){var n=es(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ds(e,"Shift-"+n,t,(function(t){return us(e,t,!0)}))||ds(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return us(e,t)})):ds(e,n,t,(function(t){return us(e,t)})))}var fs=null;function ms(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=L(D(t)),ve(t,e)))){s&&a<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=ps(t,e);h&&(fs=i?r:null,i||88!=r||De||!(v?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!v&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(E(t,"CodeMirror-crosshair"),_e(document,"keyup",n),_e(document,"mouseover",n))}O(t,"CodeMirror-crosshair"),me(document,"keyup",n),me(document,"mouseover",n)}(t)}}function gs(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function _s(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||An(t.display,e)||ve(t,e)||e.ctrlKey&&!e.altKey||v&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(h&&n==fs)return fs=null,void ke(e);if(!h||e.which&&!(e.which<10)||!ps(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return ds(e,"'"+n+"'",t,(function(t){return us(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var ys,vs,bs=function(e,t,n){this.time=e,this.pos=t,this.button=n};function xs(e){var t=this,n=t.display;if(!(ve(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,An(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Cs(t,e)){var r=pr(t,e),i=Me(e),o=r?function(e,t){var n=+new Date;return vs&&vs.compare(n,e,t)?(ys=vs=null,"triple"):ys&&ys.compare(n,e,t)?(vs=new bs(n,e,t),ys=null,"double"):(ys=new bs(n,e,t),vs=null,"single")}(r,i):"single";j(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),ds(e,Jo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=ss[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=H}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){s?setTimeout(N(Ar,e),0):e.curOp.focus=L(D(e));var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=v?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(v?n.altKey:n.ctrlKey)),i}(e,n,r),u=e.doc.sel;e.options.dragDrop&&Re&&!e.isReadOnly()&&"single"==n&&(i=u.contains(t))>-1&&(ot((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,u=ii(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Er(e)),_e(i.wrapper.ownerDocument,"mouseup",u),_e(i.wrapper.ownerDocument,"mousemove",c),_e(i.scroller,"dragstart",d),_e(i.scroller,"drop",u),o||(ke(t),r.addNew||Ji(e.doc,n,null,null,r.extend),l&&!p||s&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.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};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,me(i.wrapper.ownerDocument,"mouseup",u),me(i.wrapper.ownerDocument,"mousemove",c),me(i.scroller,"dragstart",d),me(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,r,t,o):function(e,t,n,r){s&&Er(e);var i=e.display,o=e.doc;ke(t);var a,l,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),a=l>-1?c[l]:new Mi(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Mi(n,n)),n=pr(e,t,!0,!0),l=-1;else{var d=ws(e,n,r.unit);a=r.extend?Qi(a,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=c.length,io(o,Ti(e,c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(io(o,Ti(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):to(o,l,a,Z):(l=0,io(o,new Ei([a],0),Z),u=o.sel);var h=n;function p(t){if(0!=ot(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],s=e.options.tabSize,c=q($e(o,n.line).text,n.ch,s),d=q($e(o,t.line).text,t.ch,s),p=Math.min(c,d),f=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 _=$e(o,m).text,y=K(_,p,s);p==f?i.push(new Mi(it(m,y),it(m,y))):_.length>y&&i.push(new Mi(it(m,y),it(m,K(_,f,s))))}i.length||i.push(new Mi(n,n)),io(o,Ti(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var v,b=a,x=ws(e,t,r.unit),w=b.anchor;ot(x.anchor,w)>0?(v=x.head,w=ut(b.from(),x.anchor)):(v=x.anchor,w=lt(b.to(),x.head));var k=u.ranges.slice(0);k[l]=function(e,t){var n=t.anchor,r=t.head,i=$e(e.doc,n.line);if(0==ot(n,r)&&n.sticky==r.sticky)return t;var o=pe(i);if(!o)return t;var s=de(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return t;var l,u=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=de(o,r.ch,r.sticky),d=c-s||(r.ch-n.ch)*(1==a.level?-1:1);l=c==u-1||c==u?d<0:d>0}var h=o[u+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,m=p?"after":"before";return n.ch==f&&n.sticky==m?t:new Mi(new it(n.line,f,m),r)}(e,new Mi(dt(o,w),v)),io(o,Ti(e,k,l),Z)}}var f=i.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,s=pr(e,t,!0,"rectangle"==r.unit);if(s)if(0!=ot(s,h)){e.curOp.focus=L(D(e)),p(s);var a=Ir(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(ii(e,(function(){m==n&&g(t)})),150)}else{var l=t.clientY<f.top?-20:t.clientY>f.bottom?20:0;l&&setTimeout(ii(e,(function(){m==n&&(i.scroller.scrollTop+=l,g(t))})),50)}}function _(t){e.state.selectingText=!1,m=1/0,t&&(ke(t),i.input.focus()),_e(i.wrapper.ownerDocument,"mousemove",y),_e(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var y=ii(e,(function(e){0!==e.buttons&&Me(e)?g(e):_(e)})),v=ii(e,_);e.state.selectingText=v,me(i.wrapper.ownerDocument,"mousemove",y),me(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):Ee(e)==n.scroller&&ke(e):2==i?(r&&Ji(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Er(t)))}}function ws(e,t,n){if("char"==n)return new Mi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Mi(it(t.line,0),dt(e.doc,it(t.line+1,0)));var r=n(e,t);return new Mi(r.from,r.to)}function ks(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ke(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!xe(e,n))return Se(t);o-=a.top-s.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var u=s.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=i)return ye(e,n,e,tt(e.doc,o),e.display.gutterSpecs[l].className,t),Se(t)}}function Cs(e,t){return ks(e,t,"gutterClick",!0)}function Ss(e,t){An(e.display,t)||function(e,t){return!!xe(e,"gutterContextMenu")&&ks(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function As(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(e)}bs.prototype.compare=function(e,t,n){return this.time+400>e&&0==ot(t,this.pos)&&n==this.button};var Es={toString:function(){return"CodeMirror.Init"}},Ms={},Ts={};function Ps(e,t,n){if(!t!=!(n&&n!=Es)){var r=e.display.dragFunctions,i=t?me:_e;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Rs(e){e.options.lineWrapping?(O(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),Kt(e)),hr(e),mr(e),Wn(e),setTimeout((function(){return Hr(e)}),100)}function Is(e,t){var n=this;if(!(this instanceof Is))return new Is(e,t);this.options=t=t?B(t):{},B(Ms,t,!1);var r=t.value;"string"==typeof r?r=new Fo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Is.inputStyles[t.inputStyle](this),o=this.display=new xi(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,As(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Xr(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 G,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),s&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;me(t.scroller,"mousedown",ii(e,xs)),me(t.scroller,"dblclick",s&&a<11?ii(e,(function(t){if(!ve(e,t)){var n=pr(e,t);if(n&&!Cs(e,t)&&!An(e.display,t)){ke(t);var r=e.findWordAt(n);Ji(e.doc,r.anchor,r.head)}}})):function(t){return ve(e,t)||ke(t)}),me(t.scroller,"contextmenu",(function(t){return Ss(e,t)})),me(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ss(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=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 l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}me(t.scroller,"touchstart",(function(i){if(!ve(e,i)&&!o(i)&&!Cs(e,i)){t.input.ensurePolled(),clearTimeout(n);var s=+new Date;t.activeTouch={start:s,moved:!1,prev:s-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),me(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),me(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!An(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new Mi(s,s):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(s):new Mi(it(s.line,0),dt(e.doc,it(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ke(n)}i()})),me(t.scroller,"touchcancel",i),me(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Nr(e,t.scroller.scrollTop),qr(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),me(t.scroller,"mousewheel",(function(t){return Ai(e,t)})),me(t.scroller,"DOMMouseScroll",(function(t){return Ai(e,t)})),me(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||Ae(t)},over:function(t){ve(e,t)||(function(e,t){var n=pr(e,t);if(n){var r=document.createDocumentFragment();wr(e,n,r),e.display.dragCursor||(e.display.dragCursor=P("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),Ae(t))},start:function(t){return function(e,t){if(s&&(!e.state.draggingText||+new Date-Do<100))Ae(t);else if(!ve(e,t)&&!An(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=P("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:ii(e,jo),leave:function(t){ve(e,t)||No(e)}};var u=t.input.getField();me(u,"keyup",(function(t){return gs.call(e,t)})),me(u,"keydown",ii(e,ms)),me(u,"keypress",ii(e,_s)),me(u,"focus",(function(t){return Mr(e,t)})),me(u,"blur",(function(t){return Tr(e,t)}))}(this),Go(),$r(this),this.curOp.forceUpdate=!0,Bi(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Mr(n)}),20):Tr(this),Ts)Ts.hasOwnProperty(u)&&Ts[u](this,t[u],Es);_i(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ls.length;++c)Ls[c](this);Yr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Is.defaults=Ms,Is.optionHandlers=Ts;var Ls=[];function Os(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=_t(e,t).state:n="prev");var s=e.options.tabSize,a=$e(o,t),l=q(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==H||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?q($e(o,t-1).text,null,s):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/s);p;--p)h+=s,d+="\t";if(h<u&&(d+=Y(u-h)),d!=c)return bo(o,d,it(t,0),it(t,c.length),"+input"),a.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var m=o.sel.ranges[f];if(m.head.line==t&&m.head.ch<c.length){var g=it(t,c.length);to(o,f,new Mi(g,g));break}}}Is.defineInitHook=function(e){return Ls.push(e)};var zs=null;function Fs(e){zs=e}function Ds(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var s=+new Date-200,a="paste"==i||e.state.pasteIncoming>s,l=ze(t),u=null;if(a&&r.ranges.length>1)if(zs&&zs.text.join("\n")==t){if(r.ranges.length%zs.text.length==0){u=[];for(var c=0;c<zs.text.length;c++)u.push(o.splitLines(zs.text[c]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=J(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=r.ranges.length-1;h>=0;h--){var p=r.ranges[h],f=p.from(),m=p.to();p.empty()&&(n&&n>0?f=it(f.line,f.ch-n):e.state.overwrite&&!a?m=it(m.line,Math.min($e(o,m.line).text.length,m.ch+Q(l).length)):a&&zs&&zs.lineWise&&zs.text.join("\n")==l.join("\n")&&(f=m=it(f.line,0)));var g={from:f,to:m,text:u?u[h%u.length]:l,origin:i||(a?"paste":e.state.cutIncoming>s?"cut":"+input")};mo(e.doc,g),hn(e,"inputRead",e,g)}t&&!a&&Ns(e,t),zr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function js(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||ri(t,(function(){return Ds(t,n,0,null,"paste")})),!0}function Ns(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){s=Os(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test($e(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Os(e,i.head.line,"smart"));s&&hn(e,"electricInput",e,i.head.line)}}}function Bs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:it(i,0),head:it(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function qs(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function Gs(){var e=P("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=P("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),t}function Vs(e,t,n,r,i){var o=t,s=n,a=$e(e,t.line),l=i&&"rtl"==e.direction?-n:n;function u(o){var s,u;if("codepoint"==r){var c=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))s=null;else{var d=n>0?c>=55296&&c<56320:c>=56320&&c<57343;s=new it(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(d?2:1))),-n)}}else s=i?function(e,t,n,r){var i=pe(t,e.doc.direction);if(!i)return is(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=de(i,n.ch,n.sticky),s=i[o];if("ltr"==e.doc.direction&&s.level%2==0&&(r>0?s.to>n.ch:s.from<n.ch))return is(t,n,r);var a,l=function(e,n){return rs(t,e instanceof it?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(a=a||Fn(e,t),nr(e,t,a,n)):{begin:0,end:t.text.length}},c=u("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==s.level){var d=1==s.level==r<0,h=l(n,d?1:-1);if(null!=h&&(d?h<=s.to&&h<=c.end:h>=s.from&&h>=c.begin)){var p=d?"before":"after";return new it(n.line,h,p)}}var f=function(e,t,r){for(var o=function(e,t){return t?new it(n.line,l(e,1),"before"):new it(n.line,e,"after")};e>=0&&e<i.length;e+=t){var s=i[e],a=t>0==(1!=s.level),u=a?r.begin:l(r.end,-1);if(s.from<=u&&u<s.to)return o(u,a);if(u=a?s.from:l(s.to,-1),r.begin<=u&&u<r.end)return o(u,a)}},m=f(o+r,r,c);if(m)return m;var g=r>0?c.end:l(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=f(r>0?0:i.length-1,r,u(g)))?null:m}(e.cm,a,t,n):is(a,t,n);if(null==s){if(o||((u=t.line+l)<e.first||u>=e.first+e.size||(t=new it(u,t.ch,t.sticky),!(a=$e(e,u)))))return!1;t=os(i,e.cm,a,t.line,l)}else t=s;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var f=a.text.charAt(t.ch)||"\n",m=ie(f,h)?"w":d&&"\n"==f?"n":!d||/\s/.test(f)?null:"p";if(!d||p||m||(m="s"),c&&c!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(c=m),n>0&&!u(!p))break}var g=co(e,t,o,s,!0);return st(o,g)&&(g.hitSide=!0),g}function Ws(e,t,n,r){var i,o,s=e.doc,a=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,j(e).innerHeight||s(e).documentElement.clientHeight),u=Math.max(l-.5*ar(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=er(e,a,i)).outside;){if(n<0?i<=0:i>=s.height){o.hitSide=!0;break}i+=5*n}return o}var Hs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new G,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Us(e,t){var n=zn(e,t.line);if(!n||n.hidden)return null;var r=$e(e.doc,t.line),i=Ln(n,r,t.line),o=pe(r,e.doc.direction),s="left";o&&(s=de(o,t.ch)%2?"right":"left");var a=Bn(i.map,t.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Zs(e,t){return t&&(e.bad=!0),e}function Xs(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Zs(e.clipPos(it(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Ks(o,t,n)}}function Ks(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!I(r,t))return Zs(it(et(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Q(e.rest):e.line;return Zs(it(et(o),o.text.length),i)}var s=3==t.nodeType?t:null,a=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var l=e.measure,u=l.maps;function c(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?l.map:u[i],s=0;s<o.length;s+=3){var a=o[s+2];if(a==t||a==n){var c=et(i<0?e.line:e.rest[i]),d=o[s]+r;return(r<0||a!=t)&&(d=o[s+(r?1:0)]),it(c,d)}}}var d=c(s,a,n);if(d)return Zs(d,i);for(var h=a.nextSibling,p=s?s.nodeValue.length-n:0;h;h=h.nextSibling){if(d=c(h,h.firstChild,0))return Zs(it(d.line,d.ch-p),i);p+=h.textContent.length}for(var f=a.previousSibling,m=n;f;f=f.previousSibling){if(d=c(f,f.firstChild,-1))return Zs(it(d.line,d.ch+m),i);m+=f.textContent.length}}Hs.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function s(e){if(o(e)&&!ve(r,e)){if(r.somethingSelected())Fs({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Bs(r);Fs({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,U),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var s=zs.text.join("\n");if(e.clipboardData.setData("Text",s),e.clipboardData.getData("Text")==s)return void e.preventDefault()}var a=Gs(),l=a.firstChild;qs(l),r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),l.value=zs.text.join("\n");var u=L(i.ownerDocument);F(l),setTimeout((function(){r.display.lineSpace.removeChild(a),u.focus(),u==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,qs(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),me(i,"paste",(function(e){!o(e)||ve(r,e)||js(e,r)||a<=11&&setTimeout(ii(r,(function(){return t.updateFromDOM()})),20)})),me(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),me(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),me(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),me(i,"touchstart",(function(){return n.forceCompositionEnd()})),me(i,"input",(function(){t.composing||t.readFromDOMSoon()})),me(i,"copy",s),me(i,"cut",s)},Hs.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Hs.prototype.prepareSelection=function(){var e=xr(this.cm,!1);return e.focus=L(this.div.ownerDocument)==this.div,e},Hs.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Hs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Hs.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var s=Xs(t,e.anchorNode,e.anchorOffset),a=Xs(t,e.focusNode,e.focusOffset);if(!s||s.bad||!a||a.bad||0!=ot(ut(s,a),i)||0!=ot(lt(s,a),o)){var l=t.display.view,u=i.line>=t.display.viewFrom&&Us(t,i)||{node:l[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&Us(t,o);if(!c){var d=l[l.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 p,f=e.rangeCount&&e.getRangeAt(0);try{p=A(u.node,u.offset,c.offset,c.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(u.node,u.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),f&&null==e.anchorNode?e.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Hs.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)},Hs.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Hs.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Hs.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return I(this.div,t)},Hs.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&L(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Hs.prototype.blur=function(){this.div.blur()},Hs.prototype.getField=function(){return this.div},Hs.prototype.supportsTouch=function(){return!0},Hs.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):ri(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))}))},Hs.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Hs.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(_&&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=Xs(t,e.anchorNode,e.anchorOffset),r=Xs(t,e.focusNode,e.focusOffset);n&&r&&ri(t,(function(){io(t.doc,Pi(n,r),U),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Hs.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>r.firstLine()&&(s=it(s.line-1,$e(r.doc,s.line-1).length)),a.ch==$e(r.doc,a.line).text.length&&a.line<r.lastLine()&&(a=it(a.line+1,0)),s.line<i.viewFrom||a.line>i.viewTo-1)return!1;s.line==i.viewFrom||0==(e=fr(r,s.line))?(t=et(i.view[0].line),n=i.view[0].node):(t=et(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=fr(r,a.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=et(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",s=!1,a=e.doc.lineSeparator(),l=!1;function u(){s&&(o+=a,l&&(o+=a),s=l=!1)}function c(e){e&&(u(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(it(r,0),it(i+1,0),(g=+h,function(e){return e.id==g}));return void(p.length&&(o=p[0].find(0))&&c(Ye(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&u();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),f&&(s=!0)}else 3==t.nodeType&&c(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,l=!1;return o}(r,n,u,t,l)),h=Ye(r.doc,it(t,0),it(l,$e(r.doc,l).text.length));d.length>1&&h.length>1;)if(Q(d)==Q(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var p=0,f=0,m=d[0],g=h[0],_=Math.min(m.length,g.length);p<_&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=Q(d),v=Q(h),b=Math.min(y.length-(1==d.length?p:0),v.length-(1==h.length?p:0));f<b&&y.charCodeAt(y.length-f-1)==v.charCodeAt(v.length-f-1);)++f;if(1==d.length&&1==h.length&&t==s.line)for(;p&&p>s.ch&&y.charCodeAt(y.length-f-1)==v.charCodeAt(v.length-f-1);)p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=it(t,p),w=it(l,h.length?Q(h).length-f:0);return d.length>1||d[0]||ot(x,w)?(bo(r.doc,d,x,w,"+input"),!0):void 0},Hs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Hs.prototype.reset=function(){this.forceCompositionEnd()},Hs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Hs.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))},Hs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ri(this.cm,(function(){return mr(e.cm)}))},Hs.prototype.setUneditable=function(e){e.contentEditable="false"},Hs.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ii(this.cm,Ds)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Hs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Hs.prototype.onContextMenu=function(){},Hs.prototype.resetPosition=function(){},Hs.prototype.needsContentAttribute=!0;var $s=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new G,this.hasSelection=!1,this.composing=null,this.resetting=!1};$s.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ve(r,e)){if(r.somethingSelected())Fs({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Bs(r);Fs({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,U):(n.prevInput="",i.value=t.text.join("\n"),F(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),me(i,"input",(function(){s&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),me(i,"paste",(function(e){ve(r,e)||js(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),me(i,"cut",o),me(i,"copy",o),me(e.scroller,"paste",(function(t){if(!An(e,t)&&!ve(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),me(e.lineSpace,"selectstart",(function(t){An(e,t)||ke(t)})),me(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),me(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},$s.prototype.createField=function(e){this.wrapper=Gs(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;qs(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$s.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$s.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=xr(e);if(e.options.moveInputWithCursor){var i=Yn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},$s.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$s.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&&F(this.textarea),s&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null));this.resetting=!1}},$s.prototype.getField=function(){return this.textarea},$s.prototype.supportsTouch=function(){return!1},$s.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||L(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},$s.prototype.blur=function(){this.textarea.blur()},$s.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$s.prototype.receivedFocus=function(){this.slowPoll()},$s.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},$s.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))}))},$s.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Fe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===i||v&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l<u&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return ri(t,(function(){Ds(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},$s.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$s.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},$s.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=pr(n,e),u=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ii(n,io)(n.doc,Pi(o),U);var c,d=i.style.cssText,p=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=i.ownerDocument.defaultView.scrollY),r.input.focus(),l&&i.ownerDocument.defaultView.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=_,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),s&&a>=9&&g(),C){Ae(e);var m=function(){_e(window,"mouseup",m),setTimeout(_,20)};me(window,"mouseup",m)}else setTimeout(_,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function _(){if(t.contextMenuPending==_&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,s&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!s||s&&a<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ii(n,po)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},$s.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},$s.prototype.setUneditable=function(){},$s.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Es&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Es,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,zi(e)}),!0),n("indentUnit",2,zi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Fi(e),Wn(e),mr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(it(r,o))}r++}));for(var i=n.length-1;i>=0;i--)bo(e.doc,t,n[i],it(n[i].line,n[i].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!=Es&&e.refresh()})),n("specialCharPlaceholder",nn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"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",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){As(e),bi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=ts(t),i=n!=Es&&ts(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Rs,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=yi(t,e.options.lineNumbers),bi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?cr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Xr(e),Hr(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=yi(e.options.gutters,t),bi(e)}),!0),n("firstLineNumber",1,bi,!0),n("lineNumberFormatter",(function(e){return e}),bi,!0),n("showCursorWhenSelecting",!1,br,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Tr(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,Ps),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,br,!0),n("singleCursorHeightPerLine",!0,br,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Fi,!0),n("addModeClass",!1,Fi,!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,Fi,!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)}(Is),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){j(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ii(this,t[e])(this,n,i),ye(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"](ts(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:oi((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");(function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)})(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,mr(this)})),removeOverlay:oi((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void mr(this)}})),indentLine:oi((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),nt(this.doc,e)&&Os(this,e,t,n)})),indentSelection:oi((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Os(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&zr(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)Os(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&to(this.doc,r,new Mi(o,u[r].to()),U)}}})),getTokenAt:function(e,t){return wt(this,e,t)},getLineTokens:function(e,t){return wt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,n=gt(this,$e(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf("overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-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 r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var s=0;s<o[t].length;s++){var a=i[o[t][s]];a&&r.push(a)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var u=i._global[l];u.pred(o,this)&&-1==V(r,u.val)&&r.push(u.val)}return r},getStateAfter:function(e,t){var n=this.doc;return _t(this,(e=ct(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Yn(this,null==e?n.head:"object"==typeof e?dt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return $n(this,dt(this.doc,e),t||"page")},coordsChar:function(e,t){return er(this,(e=Kn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Kn(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!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,i=!0),r=$e(this.doc,e)}else r=e;return Xn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Zt(r):0)},defaultTextHeight:function(){return ar(this.display)},defaultCharWidth:function(){return lr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,s,a,l=this.display,u=(e=Yn(this,dt(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||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"==i?(c=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,s={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(a=Lr(o,s)).scrollTop&&Nr(o,a.scrollTop),null!=a.scrollLeft&&qr(o,a.scrollLeft))},triggerOnKeyDown:oi(ms),triggerOnKeyPress:oi(_s),triggerOnKeyUp:gs,triggerOnMouseDown:oi(xs),execCommand:function(e){if(ss.hasOwnProperty(e))return ss[e].call(null,this)},triggerElectric:oi((function(e){Ns(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),s=0;s<t&&!(o=Vs(this.doc,o,i,n,r)).hitSide;++s);return o},moveH:oi((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Vs(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),X)})),deleteH:oi((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):ns(this,(function(n){var i=Vs(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var s=dt(this.doc,e),a=0;a<t;++a){var l=Yn(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Ws(this,l,i,n)).hitSide)break}return s},moveV:oi((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(s){if(o)return e<0?s.from():s.to();var a=Yn(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=Ws(n,a,e,t);return"page"==t&&s==r.sel.primary()&&Or(n,$n(n,l,"div").top-a.top),l}),X),i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]})),findWordAt:function(e){var t=$e(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),s=ie(o,i)?function(e){return ie(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ie(e)};n>0&&s(t.charAt(n-1));)--n;for(;r<t.length&&s(t.charAt(r));)++r}return new Mi(it(e.line,n),it(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?O(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==L(D(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:oi((function(e,t){Fr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Pn(this)-this.display.barHeight,width:e.scrollWidth-Pn(this)-this.display.barWidth,clientHeight:In(this),clientWidth:Rn(this)}},scrollIntoView:oi((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){Dr(e),e.curOp.scrollToPos=t}(this,e):jr(this,e.from,e.to,e.margin)})),setSize:oi((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Vn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){gr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ye(this,"refresh",this)})),operation:function(e){return ri(this,e)},startOperation:function(){return $r(this)},endOperation:function(){return Yr(this)},refresh:oi((function(){var e=this.display.cachedTextHeight;mr(this),this.curOp.forceUpdate=!0,Wn(this),Fr(this,this.doc.scrollLeft,this.doc.scrollTop),fi(this.display),(null==e||Math.abs(e-ar(this.display))>.5||this.options.lineWrapping)&&hr(this),ye(this,"refresh",this)})),swapDoc:oi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Bi(this,e),Wn(this),this.display.input.reset(),Fr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,hn(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}},we(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Is);var Ys="iter insert remove copy getEditor constructor".split(" ");for(var Qs in Fo.prototype)Fo.prototype.hasOwnProperty(Qs)&&V(Ys,Qs)<0&&(Is.prototype[Qs]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fo.prototype[Qs]));return we(Fo),Is.inputStyles={textarea:$s,contenteditable:Hs},Is.defineMode=function(e){Is.defaults.mode||"null"==e||(Is.defaults.mode=e),qe.apply(this,arguments)},Is.defineMIME=function(e,t){Be[e]=t},Is.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Is.defineMIME("text/plain","null"),Is.defineExtension=function(e,t){Is.prototype[e]=t},Is.defineDocExtension=function(e,t){Fo.prototype[e]=t},Is.fromTextArea=function(e,t){if((t=t?B(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=L(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(me(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var s=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=s}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(_e(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Is((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a},function(e){e.off=_e,e.on=me,e.wheelEventPixels=Si,e.Doc=Fo,e.splitLines=ze,e.countColumn=q,e.findColumn=K,e.isWordChar=re,e.Pass=H,e.signal=ye,e.Line=$t,e.changeEnd=Ri,e.scrollbarModel=Zr,e.Pos=it,e.cmpPos=ot,e.modes=Ne,e.mimeModes=Be,e.resolveMode=Ge,e.getMode=Ve,e.modeExtensions=We,e.extendMode=He,e.copyState=Ue,e.startState=Xe,e.innerMode=Ze,e.commands=ss,e.keyMap=Xo,e.keyName=es,e.isModifierKey=Qo,e.lookupKey=Yo,e.normalizeKeyMap=$o,e.StringStream=Ke,e.SharedTextMarker=Io,e.TextMarker=Po,e.LineWidget=Eo,e.e_preventDefault=ke,e.e_stopPropagation=Ce,e.e_stop=Ae,e.addClass=O,e.contains=I,e.rmClass=E,e.keyNames=Wo}(Is),Is.version="5.65.13",Is}()},3457:(e,t,n)=>{!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,o=t.indentUnit,s=n.statementIndent,a=n.jsonld,l=n.json||a,u=!1!==n.trackScope,c=n.typescript,d=n.wordCharacters||/[\w$\xa1-\uffff]/,h=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),p=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,n){return r=e,i=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(a&&"@"==e.peek()&&e.match(f))return t.tokenize=g,m("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=g),m("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==r&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return m(r);if("="==r&&e.eat(">"))return m("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==r)return e.eat("*")?(t.tokenize=_,_(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):et(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==r)return t.tokenize=y,y(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==r&&e.eatWhile(d))return m("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?m("."):m("operator","operator",e.current());if(d.test(r)){e.eatWhile(d);var i=e.current();if("."!=t.lastType){if(h.propertyIsEnumerable(i)){var o=h[i];return m(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",i)}return m("variable","variable",i)}}function _(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return m("comment","comment")}function y(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return m("quasi","string-2",e.current())}var v="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,s=n-1;s>=0;--s){var a=e.string.charAt(s),l=v.indexOf(a);if(l>=0&&l<3){if(!i){++s;break}if(0==--i){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(d.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(e.string.charAt(s-1)==a&&"\\"!=e.string.charAt(s-2)){s--;break}}else if(o&&!i){++s;break}}o&&!i&&(t.fatArrowAt=s)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function k(e,t){if(!u)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function C(e,t,n,r,i){var o=e.cc;for(S.state=e,S.stream=i,S.marked=null,S.cc=o,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?V:q)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return S.marked?S.marked:"variable"==n&&k(e,r)?"variable-2":t}}var S={state:null,column:null,marked:null,cc:null};function A(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}function E(){return A.apply(null,arguments),!0}function M(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function T(e){var t=S.state;if(S.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=P(e,t.context);if(null!=r)return void(t.context=r)}else if(!M(e,t.localVars))return void(t.localVars=new L(e,t.localVars));n.globalVars&&!M(e,t.globalVars)&&(t.globalVars=new L(e,t.globalVars))}}function P(e,t){if(t){if(t.block){var n=P(e,t.prev);return n?n==t.prev?t:new I(n,t.vars,!0):null}return M(e,t.vars)?t:new I(t.prev,new L(e,t.vars),!1)}return null}function R(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function I(e,t,n){this.prev=e,this.vars=t,this.block=n}function L(e,t){this.name=e,this.next=t}var O=new L("this",new L("arguments",null));function z(){S.state.context=new I(S.state.context,S.state.localVars,!1),S.state.localVars=O}function F(){S.state.context=new I(S.state.context,S.state.localVars,!0),S.state.localVars=null}function D(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function j(e,t){var n=function(){var n=S.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,S.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function N(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function B(e){return function t(n){return n==e?E():";"==e||"}"==n||")"==n||"]"==n?A():E(t)}}function q(e,t){return"var"==e?E(j("vardef",t),Se,B(";"),N):"keyword a"==e?E(j("form"),H,q,N):"keyword b"==e?E(j("form"),q,N):"keyword d"==e?S.stream.match(/^\s*$/,!1)?E():E(j("stat"),Z,B(";"),N):"debugger"==e?E(B(";")):"{"==e?E(j("}"),F,ue,N,D):";"==e?E():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==N&&S.state.cc.pop()(),E(j("form"),H,q,N,Re)):"function"==e?E(ze):"for"==e?E(j("form"),F,Ie,q,D,N):"class"==e||c&&"interface"==t?(S.marked="keyword",E(j("form","class"==e?e:t),Be,N)):"variable"==e?c&&"declare"==t?(S.marked="keyword",E(q)):c&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?E(Qe):"type"==t?E(De,B("operator"),fe,B(";")):E(j("form"),Ae,B("{"),j("}"),ue,N,N)):c&&"namespace"==t?(S.marked="keyword",E(j("form"),V,q,N)):c&&"abstract"==t?(S.marked="keyword",E(q)):E(j("stat"),ne):"switch"==e?E(j("form"),H,B("{"),j("}","switch"),F,ue,N,N,D):"case"==e?E(V,B(":")):"default"==e?E(B(":")):"catch"==e?E(j("form"),z,G,q,N,D):"export"==e?E(j("stat"),We,N):"import"==e?E(j("stat"),Ue,N):"async"==e?E(q):"@"==t?E(V,q):A(j("stat"),V,B(";"),N)}function G(e){if("("==e)return E(je,B(")"))}function V(e,t){return U(e,t,!1)}function W(e,t){return U(e,t,!0)}function H(e){return"("!=e?A():E(j(")"),Z,B(")"),N)}function U(e,t,n){if(S.state.fatArrowAt==S.stream.start){var r=n?J:Q;if("("==e)return E(z,j(")"),ae(je,")"),N,B("=>"),r,D);if("variable"==e)return A(z,Ae,B("=>"),r,D)}var i=n?K:X;return x.hasOwnProperty(e)?E(i):"function"==e?E(ze,i):"class"==e||c&&"interface"==t?(S.marked="keyword",E(j("form"),Ne,N)):"keyword c"==e||"async"==e?E(n?W:V):"("==e?E(j(")"),Z,B(")"),N,i):"operator"==e||"spread"==e?E(n?W:V):"["==e?E(j("]"),Ye,N,i):"{"==e?le(ie,"}",null,i):"quasi"==e?A($,i):"new"==e?E(function(e){return function(t){return"."==t?E(e?te:ee):"variable"==t&&c?E(we,e?K:X):A(e?W:V)}}(n)):E()}function Z(e){return e.match(/[;\}\)\],]/)?A():A(V)}function X(e,t){return","==e?E(Z):K(e,t,!1)}function K(e,t,n){var r=0==n?X:K,i=0==n?V:W;return"=>"==e?E(z,n?J:Q,D):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?E(r):c&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(j(">"),ae(fe,">"),N,r):"?"==t?E(V,B(":"),i):E(i):"quasi"==e?A($,r):";"!=e?"("==e?le(W,")","call",r):"."==e?E(re,r):"["==e?E(j("]"),Z,B("]"),N,r):c&&"as"==t?(S.marked="keyword",E(fe,r)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),E(i)):void 0:void 0}function $(e,t){return"quasi"!=e?A():"${"!=t.slice(t.length-2)?E($):E(Z,Y)}function Y(e){if("}"==e)return S.marked="string-2",S.state.tokenize=y,E($)}function Q(e){return b(S.stream,S.state),A("{"==e?q:V)}function J(e){return b(S.stream,S.state),A("{"==e?q:W)}function ee(e,t){if("target"==t)return S.marked="keyword",E(X)}function te(e,t){if("target"==t)return S.marked="keyword",E(K)}function ne(e){return":"==e?E(N,q):A(X,B(";"),N)}function re(e){if("variable"==e)return S.marked="property",E()}function ie(e,t){return"async"==e?(S.marked="property",E(ie)):"variable"==e||"keyword"==S.style?(S.marked="property","get"==t||"set"==t?E(oe):(c&&S.state.fatArrowAt==S.stream.start&&(n=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+n[0].length),E(se))):"number"==e||"string"==e?(S.marked=a?"property":S.style+" property",E(se)):"jsonld-keyword"==e?E(se):c&&R(t)?(S.marked="keyword",E(ie)):"["==e?E(V,ce,B("]"),se):"spread"==e?E(W,se):"*"==t?(S.marked="keyword",E(ie)):":"==e?A(se):void 0;var n}function oe(e){return"variable"!=e?A(se):(S.marked="property",E(ze))}function se(e){return":"==e?E(W):"("==e?A(ze):void 0}function ae(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var s=S.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),E((function(n,r){return n==t||r==t?A():A(e)}),r)}return i==t||o==t?E():n&&n.indexOf(";")>-1?A(e):E(B(t))}return function(n,i){return n==t||i==t?E():A(e,r)}}function le(e,t,n){for(var r=3;r<arguments.length;r++)S.cc.push(arguments[r]);return E(j(t,n),ae(e,t),N)}function ue(e){return"}"==e?E():A(q,ue)}function ce(e,t){if(c){if(":"==e)return E(fe);if("?"==t)return E(ce)}}function de(e,t){if(c&&(":"==e||"in"==t))return E(fe)}function he(e){if(c&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?E(V,pe,fe):E(fe)}function pe(e,t){if("is"==t)return S.marked="keyword",E()}function fe(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(S.marked="keyword",E("typeof"==t?W:fe)):"variable"==e||"void"==t?(S.marked="type",E(xe)):"|"==t||"&"==t?E(fe):"string"==e||"number"==e||"atom"==e?E(xe):"["==e?E(j("]"),ae(fe,"]",","),N,xe):"{"==e?E(j("}"),ge,N,xe):"("==e?E(ae(be,")"),me,xe):"<"==e?E(ae(fe,">"),fe):"quasi"==e?A(ye,xe):void 0}function me(e){if("=>"==e)return E(fe)}function ge(e){return e.match(/[\}\)\]]/)?E():","==e||";"==e?E(ge):A(_e,ge)}function _e(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",E(_e)):"?"==t||"number"==e||"string"==e?E(_e):":"==e?E(fe):"["==e?E(B("variable"),de,B("]"),_e):"("==e?A(Fe,_e):e.match(/[;\}\)\],]/)?void 0:E()}function ye(e,t){return"quasi"!=e?A():"${"!=t.slice(t.length-2)?E(ye):E(fe,ve)}function ve(e){if("}"==e)return S.marked="string-2",S.state.tokenize=y,E(ye)}function be(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?E(be):":"==e?E(fe):"spread"==e?E(be):A(fe)}function xe(e,t){return"<"==t?E(j(">"),ae(fe,">"),N,xe):"|"==t||"."==e||"&"==t?E(fe):"["==e?E(fe,B("]"),xe):"extends"==t||"implements"==t?(S.marked="keyword",E(fe)):"?"==t?E(fe,B(":"),fe):void 0}function we(e,t){if("<"==t)return E(j(">"),ae(fe,">"),N,xe)}function ke(){return A(fe,Ce)}function Ce(e,t){if("="==t)return E(fe)}function Se(e,t){return"enum"==t?(S.marked="keyword",E(Qe)):A(Ae,ce,Te,Pe)}function Ae(e,t){return c&&R(t)?(S.marked="keyword",E(Ae)):"variable"==e?(T(t),E()):"spread"==e?E(Ae):"["==e?le(Me,"]"):"{"==e?le(Ee,"}"):void 0}function Ee(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?E(Ae):"}"==e?A():"["==e?E(V,B("]"),B(":"),Ee):E(B(":"),Ae,Te)):(T(t),E(Te))}function Me(){return A(Ae,Te)}function Te(e,t){if("="==t)return E(W)}function Pe(e){if(","==e)return E(Se)}function Re(e,t){if("keyword b"==e&&"else"==t)return E(j("form","else"),q,N)}function Ie(e,t){return"await"==t?E(Ie):"("==e?E(j(")"),Le,N):void 0}function Le(e){return"var"==e?E(Se,Oe):"variable"==e?E(Oe):A(Oe)}function Oe(e,t){return")"==e?E():";"==e?E(Oe):"in"==t||"of"==t?(S.marked="keyword",E(V,Oe)):A(V,Oe)}function ze(e,t){return"*"==t?(S.marked="keyword",E(ze)):"variable"==e?(T(t),E(ze)):"("==e?E(z,j(")"),ae(je,")"),N,he,q,D):c&&"<"==t?E(j(">"),ae(ke,">"),N,ze):void 0}function Fe(e,t){return"*"==t?(S.marked="keyword",E(Fe)):"variable"==e?(T(t),E(Fe)):"("==e?E(z,j(")"),ae(je,")"),N,he,D):c&&"<"==t?E(j(">"),ae(ke,">"),N,Fe):void 0}function De(e,t){return"keyword"==e||"variable"==e?(S.marked="type",E(De)):"<"==t?E(j(">"),ae(ke,">"),N):void 0}function je(e,t){return"@"==t&&E(V,je),"spread"==e?E(je):c&&R(t)?(S.marked="keyword",E(je)):c&&"this"==e?E(ce,Te):A(Ae,ce,Te)}function Ne(e,t){return"variable"==e?Be(e,t):qe(e,t)}function Be(e,t){if("variable"==e)return T(t),E(qe)}function qe(e,t){return"<"==t?E(j(">"),ae(ke,">"),N,qe):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(S.marked="keyword"),E(c?fe:V,qe)):"{"==e?E(j("}"),Ge,N):void 0}function Ge(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&R(t))&&S.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",E(Ge)):"variable"==e||"keyword"==S.style?(S.marked="property",E(Ve,Ge)):"number"==e||"string"==e?E(Ve,Ge):"["==e?E(V,ce,B("]"),Ve,Ge):"*"==t?(S.marked="keyword",E(Ge)):c&&"("==e?A(Fe,Ge):";"==e||","==e?E(Ge):"}"==e?E():"@"==t?E(V,Ge):void 0}function Ve(e,t){if("!"==t)return E(Ve);if("?"==t)return E(Ve);if(":"==e)return E(fe,Te);if("="==t)return E(W);var n=S.state.lexical.prev;return A(n&&"interface"==n.info?Fe:ze)}function We(e,t){return"*"==t?(S.marked="keyword",E($e,B(";"))):"default"==t?(S.marked="keyword",E(V,B(";"))):"{"==e?E(ae(He,"}"),$e,B(";")):A(q)}function He(e,t){return"as"==t?(S.marked="keyword",E(B("variable"))):"variable"==e?A(W,He):void 0}function Ue(e){return"string"==e?E():"("==e?A(V):"."==e?A(X):A(Ze,Xe,$e)}function Ze(e,t){return"{"==e?le(Ze,"}"):("variable"==e&&T(t),"*"==t&&(S.marked="keyword"),E(Ke))}function Xe(e){if(","==e)return E(Ze,Xe)}function Ke(e,t){if("as"==t)return S.marked="keyword",E(Ze)}function $e(e,t){if("from"==t)return S.marked="keyword",E(V)}function Ye(e){return"]"==e?E():A(ae(W,"]"))}function Qe(){return A(j("form"),Ae,B("{"),j("}"),ae(Je,"}"),N,N)}function Je(){return A(Ae,Te)}function et(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return z.lex=F.lex=!0,D.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new w((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new I(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=_&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",C(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==_||t.tokenize==y)return e.Pass;if(t.tokenize!=g)return 0;var i,a=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==N)l=l.prev;else if(c!=Re&&c!=D)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==X||i==K)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,h=a==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==d&&"{"==a?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?s||o:0):"switch"!=l.info||h||0==n.doubleIndentSwitch?l.align?l.column+(h?0:1):l.indented+(h?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:et,skipExpression:function(t){C(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(3710))},352:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&s[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},8393:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},5402:e=>{"use strict";e.exports=function(e){return e[1]}},4525:(e,t)=>{t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+d],d+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+d],d+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=u}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,u=8*o-i-1,c=(1<<u)-1,d=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=c?(a=0,s=c):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+p]=255&s,p+=f,s/=256,u-=8);e[n+p-f]|=128*m}},4459:(e,t,n)=>{"use strict";e.exports=i;var r=n(4525);function i(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o=4294967296,s=1/o,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(e){return e.type===i.Bytes?e.readVarint()+e.pos:e.pos+1}function u(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function c(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function d(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function h(e,t){for(var n=0;n<e.length;n++)t.writeSVarint(e[n])}function p(e,t){for(var n=0;n<e.length;n++)t.writeFloat(e[n])}function f(e,t){for(var n=0;n<e.length;n++)t.writeDouble(e[n])}function m(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function g(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function _(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function y(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function v(e,t){for(var n=0;n<e.length;n++)t.writeSFixed64(e[n])}function b(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function x(e,t,n){e[n]=t,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function w(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,e(i,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=b(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=w(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=b(this.buf,this.pos)+b(this.buf,this.pos+4)*o;return this.pos+=8,e},readSFixed64:function(){var e=b(this.buf,this.pos)+w(this.buf,this.pos+4)*o;return this.pos+=8,e},readFloat:function(){var e=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return u(e,r,t);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return u(e,r,t);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return u(e,r,t);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return u(e,r,t);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return u(e,r,t);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return u(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&a?function(e,t,n){return a.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){for(var r="",i=t;i<n;){var o,s,a,l=e[i],u=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&((u=(15&l)<<12|(63&o)<<6|63&s)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==i.Bytes)return e.push(this.readVarint(t));var n=l(this);for(e=e||[];this.pos<n;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==i.Bytes)return e.push(this.readSVarint());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==i.Bytes)return e.push(this.readBoolean());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==i.Bytes)return e.push(this.readFloat());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==i.Bytes)return e.push(this.readDouble());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==i.Bytes)return e.push(this.readFixed32());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==i.Bytes)return e.push(this.readSFixed32());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==i.Bytes)return e.push(this.readFixed64());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==i.Bytes)return e.push(this.readSFixed64());var t=l(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===i.Varint)for(;this.buf[this.pos++]>127;);else if(t===i.Bytes)this.pos=this.readVarint()+this.pos;else if(t===i.Fixed32)this.pos+=4;else{if(t!==i.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var n=new Uint8Array(t);n.set(this.buf),this.buf=n,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),x(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),x(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),x(this.buf,-1&e,this.pos),x(this.buf,Math.floor(e*s),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),x(this.buf,-1&e,this.pos),x(this.buf,Math.floor(e*s),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,o=0;o<t.length;o++){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&c(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),r.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),r.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n<t;n++)this.buf[this.pos++]=e[n]},writeRawMessage:function(e,t){this.pos++;var n=this.pos;e(t,this);var r=this.pos-n;r>=128&&c(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,i.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,m,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,g,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,_,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,y,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,v,t)},writeBytesField:function(e,t){this.writeTag(e,i.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,i.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,i.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,i.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}},6656:function(e){e.exports=function(){"use strict";function e(e,r,i,o,s){!function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/a+d)),Math.min(o,Math.floor(r+(a-l)*c/a+d)),s)}var h=n[r],p=i,f=o;for(t(n,i,r),s(n[o],h)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],h)<0;)p++;for(;s(n[f],h)>0;)f--}0===s(n[i],h)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}(e,r,i||0,o||e.length-1,s||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function o(e,t){s(e,0,e.children.length,t,e)}function s(e,t,n,r,i){i||(i=f(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var s=e.children[o];a(i,e.leaf?r(s):s)}return i}function a(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function h(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function p(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function f(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;e(t,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!p(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var s=t.children[o],a=t.leaf?r(s):s;p(e,a)&&(t.leaf?n.push(s):h(e,a)?this._all(s,n):i.push(s))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!p(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(p(e,o)){if(t.leaf||h(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=f([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,s=this.data,a=this.toBBox(e),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(e,s.children,t);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!h(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var i,s=n-t+1,a=this._maxEntries;if(s<=a)return o(i=f(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=f([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));m(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var d=Math.min(c+u-1,n);m(e,c,d,l,this.compareMinY);for(var h=c;h<=d;h+=l){var p=Math.min(h+l-1,d);i.children.push(this._build(e,h,p,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<t.children.length;a++){var l=t.children[a],u=c(l),d=(h=e,p=l,(Math.max(p.maxX,h.maxX)-Math.min(p.minX,h.minX))*(Math.max(p.maxY,h.maxY)-Math.min(p.minY,h.minY))-u);d<o?(o=d,i=u<i?u:i,s=l):d===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var h,p;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),a(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=f(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(e,t){this.data=f([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,a,l,u,d,h=1/0,p=1/0,f=t;f<=n-t;f++){var m=s(e,0,f,this.toBBox),g=s(e,f,n,this.toBBox),_=(i=m,o=g,void 0,void 0,void 0,void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),d=Math.min(i.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,d-l)),y=c(m)+c(g);_<h?(h=_,r=f,p=y<p?y:p):_===h&&y<p&&(p=y,r=f)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:l,i=e.leaf?this.compareMinY:u;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=s(e,0,t,i),l=s(e,n-t,n,i),u=d(o)+d(l),c=t;c<n-t;c++){var h=e.children[c];a(o,e.leaf?i(h):h),u+=d(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];a(l,e.leaf?i(f):f),u+=d(l)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)a(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r}()},7799:(e,t,n)=>{"use strict";var r=n(9526),i=n(2851);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function m(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var _=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function v(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(_,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(_,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(_,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),I=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function z(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var F,D=Object.assign;function j(e){if(void 0===F)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var N=!1;function B(e,t){if(!e||N)return"";N=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{N=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function q(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return B(e.type,!1);case 11:return B(e.type.render,!1);case 1:return B(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case k:return"Fragment";case w:return"Portal";case S:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:G(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return G(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return G(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function U(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=H(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function $(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function Q(e,t){Y(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function oe(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var _e=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(_e[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,ke=null,Ce=null;function Se(e){if(e=vi(e)){if("function"!=typeof we)throw Error(o(280));var t=e.stateNode;t&&(t=xi(t),we(e.stateNode,e.type,t))}}function Ae(e){ke?Ce?Ce.push(e):Ce=[e]:ke=e}function Ee(){if(ke){var e=ke,t=Ce;if(Ce=ke=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Me(e,t){return e(t)}function Te(){}var Pe=!1;function Re(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Me(e,t,n)}finally{Pe=!1,(null!==ke||null!==Ce)&&(Te(),Ee())}}function Ie(e,t){var n=e.stateNode;if(null===n)return null;var r=xi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Le=!1;if(c)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){Le=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch(ce){Le=!1}function ze(e,t,n,r,i,o,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Fe=!1,De=null,je=!1,Ne=null,Be={onError:function(e){Fe=!0,De=e}};function qe(e,t,n,r,i,o,s,a,l){Fe=!1,De=null,ze.apply(Be,arguments)}function Ge(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function We(e){if(Ge(e)!==e)throw Error(o(188))}function He(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ge(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return We(i),e;if(s===r)return We(i),t;s=s.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?Ue(e):null}function Ue(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ue(e);if(null!==t)return t;e=e.sibling}return null}var Ze=i.unstable_scheduleCallback,Xe=i.unstable_cancelCallback,Ke=i.unstable_shouldYield,$e=i.unstable_requestPaint,Ye=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null,st=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2,ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=dt(a):0!=(o&=s)&&(r=dt(o))}else 0!=(s=n&~i)?r=dt(s):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-st(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ut;return 0==(4194240&(ut<<=1))&&(ut=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _t(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var vt=0;function bt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var xt,wt,kt,Ct,St,At=!1,Et=[],Mt=null,Tt=null,Pt=null,Rt=new Map,It=new Map,Lt=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zt(e,t){switch(e){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":It.delete(t.pointerId)}}function Ft(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=vi(t))&&wt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Dt(e){var t=yi(e.target);if(null!==t){var n=Ge(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void St(e.priority,(function(){kt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function jt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=vi(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Nt(e,t,n){jt(e)&&n.delete(t)}function Bt(){At=!1,null!==Mt&&jt(Mt)&&(Mt=null),null!==Tt&&jt(Tt)&&(Tt=null),null!==Pt&&jt(Pt)&&(Pt=null),Rt.forEach(Nt),It.forEach(Nt)}function qt(e,t){e.blockedOn===t&&(e.blockedOn=null,At||(At=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bt)))}function Gt(e){function t(t){return qt(t,e)}if(0<Et.length){qt(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Mt&&qt(Mt,e),null!==Tt&&qt(Tt,e),null!==Pt&&qt(Pt,e),Rt.forEach(t),It.forEach(t),n=0;n<Lt.length;n++)(r=Lt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Lt.length&&null===(n=Lt[0]).blockedOn;)Dt(n),null===n.blockedOn&&Lt.shift()}var Vt=b.ReactCurrentBatchConfig,Wt=!0;function Ht(e,t,n,r){var i=vt,o=Vt.transition;Vt.transition=null;try{vt=1,Zt(e,t,n,r)}finally{vt=i,Vt.transition=o}}function Ut(e,t,n,r){var i=vt,o=Vt.transition;Vt.transition=null;try{vt=4,Zt(e,t,n,r)}finally{vt=i,Vt.transition=o}}function Zt(e,t,n,r){if(Wt){var i=Kt(e,t,n,r);if(null===i)Wr(e,t,r,Xt,n),zt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Mt=Ft(Mt,e,t,n,r,i),!0;case"dragenter":return Tt=Ft(Tt,e,t,n,r,i),!0;case"mouseover":return Pt=Ft(Pt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Rt.set(o,Ft(Rt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,It.set(o,Ft(It.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(zt(e,r),4&t&&-1<Ot.indexOf(e)){for(;null!==i;){var o=vi(i);if(null!==o&&xt(o),null===(o=Kt(e,t,n,r))&&Wr(e,t,r,Xt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Xt=null;function Kt(e,t,n,r){if(Xt=null,null!==(e=yi(e=xe(r))))if(null===(t=Ge(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xt=e,null}function $t(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Yt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var sn,an,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),dn=D({},un,{view:0,detail:0}),hn=on(dn),pn=D({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(sn=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=sn=0,ln=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:an}}),fn=on(pn),mn=on(D({},pn,{dataTransfer:0})),gn=on(D({},dn,{relatedTarget:0})),_n=on(D({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=D({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vn=on(yn),bn=on(D({},un,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function Sn(){return Cn}var An=D({},dn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=on(An),Mn=on(D({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=on(D({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),Pn=on(D({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=D({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=on(Rn),Ln=[9,13,27,32],On=c&&"CompositionEvent"in window,zn=null;c&&"documentMode"in document&&(zn=document.documentMode);var Fn=c&&"TextEvent"in window&&!zn,Dn=c&&(!On||zn&&8<zn&&11>=zn),jn=String.fromCharCode(32),Nn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Hn(e,t,n,r){Ae(r),0<(t=Ur(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Un=null,Zn=null;function Xn(e){jr(e,0)}function Kn(e){if(Z(bi(e)))return e}function $n(e,t){if("change"===e)return t}var Yn=!1;if(c){var Qn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Qn=Jn}else Qn=!1;Yn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Un&&(Un.detachEvent("onpropertychange",nr),Zn=Un=null)}function nr(e){if("value"===e.propertyName&&Kn(Zn)){var t=[];Hn(t,Zn,e,xe(e)),Re(Xn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Zn=n,(Un=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Zn)}function or(e,t){if("click"===e)return Kn(t)}function sr(e,t){if("input"===e||"change"===e)return Kn(t)}var ar="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(ar(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!ar(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=cr(n,o);var s=cr(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=c&&"documentMode"in document&&11>=document.documentMode,gr=null,_r=null,yr=null,vr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==gr||gr!==X(r)||(r="selectionStart"in(r=gr)&&pr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Ur(_r,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},kr={},Cr={};function Sr(e){if(kr[e])return kr[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return kr[e]=n[t];return e}c&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Ar=Sr("animationend"),Er=Sr("animationiteration"),Mr=Sr("animationstart"),Tr=Sr("transitionend"),Pr=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ir(e,t){Pr.set(e,t),l(t,[e])}for(var Lr=0;Lr<Rr.length;Lr++){var Or=Rr[Lr];Ir(Or.toLowerCase(),"on"+(Or[0].toUpperCase()+Or.slice(1)))}Ir(Ar,"onAnimationEnd"),Ir(Er,"onAnimationIteration"),Ir(Mr,"onAnimationStart"),Ir("dblclick","onDoubleClick"),Ir("focusin","onFocus"),Ir("focusout","onBlur"),Ir(Tr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fr=new Set("cancel close invalid load scroll toggle".split(" ").concat(zr));function Dr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,s,a,l,u){if(qe.apply(this,arguments),Fe){if(!Fe)throw Error(o(198));var c=De;Fe=!1,De=null,je||(je=!0,Ne=c)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;Dr(i,a,u),o=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,u=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;Dr(i,a,u),o=l}}}if(je)throw e=Ne,je=!1,Ne=null,e}function Nr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function Gr(e){if(!e[qr]){e[qr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Fr.has(t)||Br(t,!1,e),Br(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[qr]||(t[qr]=!0,Br("selectionchange",!1,t))}}function Vr(e,t,n,r){switch($t(t)){case 1:var i=Ht;break;case 4:i=Ut;break;default:i=Zt}n=i.bind(null,t,n,e),i=void 0,!Le||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=yi(a)))return;if(5===(l=s.tag)||6===l){r=o=s;continue e}a=a.parentNode}}r=r.return}Re((function(){var r=o,i=xe(n),s=[];e:{var a=Pr.get(e);if(void 0!==a){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Ar:case Er:case Mr:l=_n;break;case Tr:l=Pn;break;case"scroll":l=hn;break;case"wheel":l=In;break;case"copy":case"cut":case"paste":l=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Mn}var c=0!=(4&t),d=!c&&"scroll"===e,h=c?null!==a?a+"Capture":null:a;c=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==h&&null!=(m=Ie(f,h))&&c.push(Hr(f,m,p))),d)break;f=f.return}0<c.length&&(a=new l(a,u,null,n,i),s.push({event:a,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===be||!(u=n.relatedTarget||n.fromElement)||!yi(u)&&!u[fi])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?yi(u):null)&&(u!==(d=Ge(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=fn,m="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(c=Mn,m="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?a:bi(l),p=null==u?a:bi(u),(a=new c(m,f+"leave",l,n,i)).target=d,a.relatedTarget=p,m=null,yi(i)===r&&((c=new c(h,f+"enter",u,n,i)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(h=u,f=0,p=c=l;p;p=Zr(p))f++;for(p=0,m=h;m;m=Zr(m))p++;for(;0<f-p;)c=Zr(c),f--;for(;0<p-f;)h=Zr(h),p--;for(;f--;){if(c===h||null!==h&&c===h.alternate)break e;c=Zr(c),h=Zr(h)}c=null}else c=null;null!==l&&Xr(s,a,l,c,!1),null!==u&&null!==d&&Xr(s,d,u,c,!0)}if("select"===(l=(a=r?bi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=$n;else if(Wn(a))if(Yn)g=sr;else{g=ir;var _=rr}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=or);switch(g&&(g=g(e,r))?Hn(s,g,n,i):(_&&_(e,a,r),"focusout"===e&&(_=a._wrapperState)&&_.controlled&&"number"===a.type&&ee(a,"number",a.value)),_=r?bi(r):window,e){case"focusin":(Wn(_)||"true"===_.contentEditable)&&(gr=_,_r=r,yr=null);break;case"focusout":yr=_r=gr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,br(s,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":br(s,n,i)}var y;if(On)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Gn?Bn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Dn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==v?"onCompositionEnd"===v&&Gn&&(y=en()):(Qt="value"in(Yt=i)?Yt.value:Yt.textContent,Gn=!0)),0<(_=Ur(r,v)).length&&(v=new bn(v,e,null,n,i),s.push({event:v,listeners:_}),(y||null!==(y=qn(n)))&&(v.data=y))),(y=Fn?function(e,t){switch(e){case"compositionend":return qn(t);case"keypress":return 32!==t.which?null:(Nn=!0,jn);case"textInput":return(e=t.data)===jn&&Nn?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!On&&Bn(e,t)?(e=en(),Jt=Qt=Yt=null,Gn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Ur(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=y)}jr(s,t)}))}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ur(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ie(e,n))&&r.unshift(Hr(e,o,i)),null!=(o=Ie(e,t))&&r.push(Hr(e,o,i))),e=e.return}return r}function Zr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Xr(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==u&&(a=u,i?null!=(l=Ie(n,o))&&s.unshift(Hr(n,l,a)):i||null!=(l=Ie(n,o))&&s.push(Hr(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Kr=/\r\n?/g,$r=/\u0000|\uFFFD/g;function Yr(e){return("string"==typeof e?e:""+e).replace(Kr,"\n").replace($r,"")}function Qr(e,t,n){if(t=Yr(t),Yr(e)!==t&&n)throw Error(o(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,oi="function"==typeof Promise?Promise:void 0,si="function"==typeof queueMicrotask?queueMicrotask:void 0!==oi?function(e){return oi.resolve(null).then(e).catch(ai)}:ri;function ai(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Gt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Gt(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,pi="__reactProps$"+di,fi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,_i="__reactHandles$"+di;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[hi])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function vi(e){return!(e=e[hi]||e[fi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function xi(e){return e[pi]||null}var wi=[],ki=-1;function Ci(e){return{current:e}}function Si(e){0>ki||(e.current=wi[ki],wi[ki]=null,ki--)}function Ai(e,t){ki++,wi[ki]=e.current,e.current=t}var Ei={},Mi=Ci(Ei),Ti=Ci(!1),Pi=Ei;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Ei;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ii(e){return null!=e.childContextTypes}function Li(){Si(Ti),Si(Mi)}function Oi(e,t,n){if(Mi.current!==Ei)throw Error(o(168));Ai(Mi,t),Ai(Ti,n)}function zi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,V(e)||"Unknown",i));return D({},n,r)}function Fi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,Pi=Mi.current,Ai(Mi,e),Ai(Ti,Ti.current),!0}function Di(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=zi(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,Si(Ti),Si(Mi),Ai(Mi,e)):Si(Ti),Ai(Ti,n)}var ji=null,Ni=!1,Bi=!1;function qi(e){null===ji?ji=[e]:ji.push(e)}function Gi(){if(!Bi&&null!==ji){Bi=!0;var e=0,t=vt;try{var n=ji;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ji=null,Ni=!1}catch(t){throw null!==ji&&(ji=ji.slice(e+1)),Ze(Je,Gi),t}finally{vt=t,Bi=!1}}return null}var Vi=[],Wi=0,Hi=null,Ui=0,Zi=[],Xi=0,Ki=null,$i=1,Yi="";function Qi(e,t){Vi[Wi++]=Ui,Vi[Wi++]=Hi,Hi=e,Ui=t}function Ji(e,t,n){Zi[Xi++]=$i,Zi[Xi++]=Yi,Zi[Xi++]=Ki,Ki=e;var r=$i;e=Yi;var i=32-st(r)-1;r&=~(1<<i),n+=1;var o=32-st(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,$i=1<<32-st(t)+i|n<<i|r,Yi=o+e}else $i=1<<o|n<<i|r,Yi=e}function eo(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function to(e){for(;e===Hi;)Hi=Vi[--Wi],Vi[Wi]=null,Ui=Vi[--Wi],Vi[Wi]=null;for(;e===Ki;)Ki=Zi[--Xi],Zi[Xi]=null,Yi=Zi[--Xi],Zi[Xi]=null,$i=Zi[--Xi],Zi[Xi]=null}var no=null,ro=null,io=!1,oo=null;function so(e,t){var n=Iu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ao(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ki?{id:$i,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Iu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function uo(e){if(io){var t=ro;if(t){var n=t;if(!ao(e,t)){if(lo(e))throw Error(o(418));t=ui(n.nextSibling);var r=no;t&&ao(e,t)?so(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function co(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!io)return co(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw po(),Error(o(418));for(;t;)so(e,t),t=ui(t.nextSibling)}if(co(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ui(e.stateNode.nextSibling):null;return!0}function po(){for(var e=ro;e;)e=ui(e.nextSibling)}function fo(){ro=no=null,io=!1}function mo(e){null===oo?oo=[e]:oo.push(e)}var go=b.ReactCurrentBatchConfig;function _o(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yo=Ci(null),vo=null,bo=null,xo=null;function wo(){xo=bo=vo=null}function ko(e){var t=yo.current;Si(yo),e._currentValue=t}function Co(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function So(e,t){vo=e,xo=bo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ba=!0),e.firstContext=null)}function Ao(e){var t=e._currentValue;if(xo!==e)if(e={context:e,memoizedValue:t,next:null},null===bo){if(null===vo)throw Error(o(308));bo=e,vo.dependencies={lanes:0,firstContext:e}}else bo=bo.next=e;return t}var Eo=null;function Mo(e){null===Eo?Eo=[e]:Eo.push(e)}function To(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Mo(t)):(n.next=i.next,i.next=n),t.interleaved=n,Po(e,r)}function Po(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ro=!1;function Io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Oo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Tl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Po(e,n)}return null===(i=r.interleaved)?(t.next=t,Mo(r)):(t.next=i.next,i.next=t),r.interleaved=t,Po(e,n)}function Fo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Do(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function jo(e,t,n,r){var i=e.updateQueue;Ro=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,u=l.next;l.next=null,null===s?o=u:s.next=u,s=l;var c=e.alternate;null!==c&&(a=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===a?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l)}if(null!==o){var d=i.baseState;for(s=0,c=u=l=null,a=o;;){var h=a.lane,p=a.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,m=a;switch(h=t,p=n,m.tag){case 1:if("function"==typeof(f=m.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(h="function"==typeof(f=m.payload)?f.call(p,d,h):f))break e;d=D({},d,h);break e;case 2:Ro=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Dl|=s,e.lanes=s,e.memoizedState=d}}function No(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var Bo=(new r.Component).refs;function qo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Go={isMounted:function(e){return!!(e=e._reactInternals)&&Ge(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),o=Oo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=zo(e,o,i))&&(ru(t,e,i,r),Fo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),o=Oo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=zo(e,o,i))&&(ru(t,e,i,r),Fo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tu(),r=nu(e),i=Oo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=zo(e,i,r))&&(ru(t,e,r,n),Fo(t,e,r))}};function Vo(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,o))}function Wo(e,t,n){var r=!1,i=Ei,o=t.contextType;return"object"==typeof o&&null!==o?o=Ao(o):(i=Ii(t)?Pi:Mi.current,o=(r=null!=(r=t.contextTypes))?Ri(e,i):Ei),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Go,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ho(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Go.enqueueReplaceState(t,t.state,null)}function Uo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Bo,Io(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Ao(o):(o=Ii(t)?Pi:Mi.current,i.context=Ri(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(qo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Go.enqueueReplaceState(i,i.state,null),jo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Zo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=i.refs;t===Bo&&(t=i.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Xo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ko(e){return(0,e._init)(e._payload)}function $o(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ou(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=ju(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var o=n.type;return o===k?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===I&&Ko(o)===t.type)?((r=i(t,n.props)).ref=Zo(e,t,n),r.return=e,r):((r=zu(n.type,n.key,n.props,null,e.mode,r)).ref=Zo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Nu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Fu(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=ju(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=zu(t.type,t.key,t.props,null,e.mode,n)).ref=Zo(e,null,t),n.return=e,n;case w:return(t=Nu(t,e.mode,n)).return=e,t;case I:return h(e,(0,t._init)(t._payload),n)}if(te(t)||z(t))return(t=Fu(t,e.mode,n,null)).return=e,t;Xo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?u(e,t,n,r):null;case w:return n.key===i?c(e,t,n,r):null;case I:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||z(n))return null!==i?null:d(e,t,n,r,null);Xo(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case I:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||z(r))return d(t,e=e.get(n)||null,r,i,null);Xo(t,r)}return null}function m(i,o,a,l){for(var u=null,c=null,d=o,m=o=0,g=null;null!==d&&m<a.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var _=p(i,d,a[m],l);if(null===_){null===d&&(d=g);break}e&&d&&null===_.alternate&&t(i,d),o=s(_,o,m),null===c?u=_:c.sibling=_,c=_,d=g}if(m===a.length)return n(i,d),io&&Qi(i,m),u;if(null===d){for(;m<a.length;m++)null!==(d=h(i,a[m],l))&&(o=s(d,o,m),null===c?u=d:c.sibling=d,c=d);return io&&Qi(i,m),u}for(d=r(i,d);m<a.length;m++)null!==(g=f(d,i,m,a[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=s(g,o,m),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(i,e)})),io&&Qi(i,m),u}function g(i,a,l,u){var c=z(l);if("function"!=typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(151));for(var d=c=null,m=a,g=a=0,_=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(_=m,m=null):_=m.sibling;var v=p(i,m,y.value,u);if(null===v){null===m&&(m=_);break}e&&m&&null===v.alternate&&t(i,m),a=s(v,a,g),null===d?c=v:d.sibling=v,d=v,m=_}if(y.done)return n(i,m),io&&Qi(i,g),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,u))&&(a=s(y,a,g),null===d?c=y:d.sibling=y,d=y);return io&&Qi(i,g),c}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=f(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=s(y,a,g),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),io&&Qi(i,g),c}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===k&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case x:e:{for(var u=s.key,c=o;null!==c;){if(c.key===u){if((u=s.type)===k){if(7===c.tag){n(r,c.sibling),(o=i(c,s.props.children)).return=r,r=o;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===I&&Ko(u)===c.type){n(r,c.sibling),(o=i(c,s.props)).ref=Zo(r,c,s),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}s.type===k?((o=Fu(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=zu(s.type,s.key,s.props,null,r.mode,l)).ref=Zo(r,o,s),l.return=r,r=l)}return a(r);case w:e:{for(c=s.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Nu(s,r.mode,l)).return=r,r=o}return a(r);case I:return e(r,o,(c=s._init)(s._payload),l)}if(te(s))return m(r,o,s,l);if(z(s))return g(r,o,s,l);Xo(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=ju(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var Yo=$o(!0),Qo=$o(!1),Jo={},es=Ci(Jo),ts=Ci(Jo),ns=Ci(Jo);function rs(e){if(e===Jo)throw Error(o(174));return e}function is(e,t){switch(Ai(ns,t),Ai(ts,e),Ai(es,Jo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(es),Ai(es,t)}function os(){Si(es),Si(ts),Si(ns)}function ss(e){rs(ns.current);var t=rs(es.current),n=le(t,e.type);t!==n&&(Ai(ts,e),Ai(es,n))}function as(e){ts.current===e&&(Si(es),Si(ts))}var ls=Ci(0);function us(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cs=[];function ds(){for(var e=0;e<cs.length;e++)cs[e]._workInProgressVersionPrimary=null;cs.length=0}var hs=b.ReactCurrentDispatcher,ps=b.ReactCurrentBatchConfig,fs=0,ms=null,gs=null,_s=null,ys=!1,vs=!1,bs=0,xs=0;function ws(){throw Error(o(321))}function ks(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ar(e[n],t[n]))return!1;return!0}function Cs(e,t,n,r,i,s){if(fs=s,ms=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hs.current=null===e||null===e.memoizedState?aa:la,e=n(r,i),vs){s=0;do{if(vs=!1,bs=0,25<=s)throw Error(o(301));s+=1,_s=gs=null,t.updateQueue=null,hs.current=ua,e=n(r,i)}while(vs)}if(hs.current=sa,t=null!==gs&&null!==gs.next,fs=0,_s=gs=ms=null,ys=!1,t)throw Error(o(300));return e}function Ss(){var e=0!==bs;return bs=0,e}function As(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===_s?ms.memoizedState=_s=e:_s=_s.next=e,_s}function Es(){if(null===gs){var e=ms.alternate;e=null!==e?e.memoizedState:null}else e=gs.next;var t=null===_s?ms.memoizedState:_s.next;if(null!==t)_s=t,gs=e;else{if(null===e)throw Error(o(310));e={memoizedState:(gs=e).memoizedState,baseState:gs.baseState,baseQueue:gs.baseQueue,queue:gs.queue,next:null},null===_s?ms.memoizedState=_s=e:_s=_s.next=e}return _s}function Ms(e,t){return"function"==typeof t?t(e):t}function Ts(e){var t=Es(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=gs,i=r.baseQueue,s=n.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(null!==i){s=i.next,r=r.baseState;var l=a=null,u=null,c=s;do{var d=c.lane;if((fs&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=h,a=r):u=u.next=h,ms.lanes|=d,Dl|=d}c=c.next}while(null!==c&&c!==s);null===u?a=r:u.next=l,ar(r,t.memoizedState)||(ba=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{s=i.lane,ms.lanes|=s,Dl|=s,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ps(e){var t=Es(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{s=e(s,a.action),a=a.next}while(a!==i);ar(s,t.memoizedState)||(ba=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Rs(){}function Is(e,t){var n=ms,r=Es(),i=t(),s=!ar(r.memoizedState,i);if(s&&(r.memoizedState=i,ba=!0),r=r.queue,Ws(zs.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==_s&&1&_s.memoizedState.tag){if(n.flags|=2048,Ns(9,Os.bind(null,n,r,i,t),void 0,null),null===Pl)throw Error(o(349));0!=(30&fs)||Ls(n,t,i)}return i}function Ls(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ms.updateQueue)?(t={lastEffect:null,stores:null},ms.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Os(e,t,n,r){t.value=n,t.getSnapshot=r,Fs(t)&&Ds(e)}function zs(e,t,n){return n((function(){Fs(t)&&Ds(e)}))}function Fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ar(e,n)}catch(e){return!0}}function Ds(e){var t=Po(e,1);null!==t&&ru(t,e,1,-1)}function js(e){var t=As();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:e},t.queue=e,e=e.dispatch=na.bind(null,ms,e),[t.memoizedState,e]}function Ns(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ms.updateQueue)?(t={lastEffect:null,stores:null},ms.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Bs(){return Es().memoizedState}function qs(e,t,n,r){var i=As();ms.flags|=e,i.memoizedState=Ns(1|t,n,void 0,void 0===r?null:r)}function Gs(e,t,n,r){var i=Es();r=void 0===r?null:r;var o=void 0;if(null!==gs){var s=gs.memoizedState;if(o=s.destroy,null!==r&&ks(r,s.deps))return void(i.memoizedState=Ns(t,n,o,r))}ms.flags|=e,i.memoizedState=Ns(1|t,n,o,r)}function Vs(e,t){return qs(8390656,8,e,t)}function Ws(e,t){return Gs(2048,8,e,t)}function Hs(e,t){return Gs(4,2,e,t)}function Us(e,t){return Gs(4,4,e,t)}function Zs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Xs(e,t,n){return n=null!=n?n.concat([e]):null,Gs(4,4,Zs.bind(null,t,e),n)}function Ks(){}function $s(e,t){var n=Es();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ks(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=Es();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ks(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qs(e,t,n){return 0==(21&fs)?(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n):(ar(n,t)||(n=mt(),ms.lanes|=n,Dl|=n,e.baseState=!0),t)}function Js(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=ps.transition;ps.transition={};try{e(!1),t()}finally{vt=n,ps.transition=r}}function ea(){return Es().memoizedState}function ta(e,t,n){var r=nu(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ra(e)?ia(t,n):null!==(n=To(e,t,n,r))&&(ru(n,e,r,tu()),oa(n,t,r))}function na(e,t,n){var r=nu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ra(e))ia(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ar(a,s)){var l=t.interleaved;return null===l?(i.next=i,Mo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=To(e,t,i,r))&&(ru(n,e,r,i=tu()),oa(n,t,r))}}function ra(e){var t=e.alternate;return e===ms||null!==t&&t===ms}function ia(e,t){vs=ys=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oa(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var sa={readContext:Ao,useCallback:ws,useContext:ws,useEffect:ws,useImperativeHandle:ws,useInsertionEffect:ws,useLayoutEffect:ws,useMemo:ws,useReducer:ws,useRef:ws,useState:ws,useDebugValue:ws,useDeferredValue:ws,useTransition:ws,useMutableSource:ws,useSyncExternalStore:ws,useId:ws,unstable_isNewReconciler:!1},aa={readContext:Ao,useCallback:function(e,t){return As().memoizedState=[e,void 0===t?null:t],e},useContext:Ao,useEffect:Vs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,qs(4194308,4,Zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qs(4194308,4,e,t)},useInsertionEffect:function(e,t){return qs(4,2,e,t)},useMemo:function(e,t){var n=As();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=As();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ta.bind(null,ms,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},As().memoizedState=e},useState:js,useDebugValue:Ks,useDeferredValue:function(e){return As().memoizedState=e},useTransition:function(){var e=js(!1),t=e[0];return e=Js.bind(null,e[1]),As().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ms,i=As();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Pl)throw Error(o(349));0!=(30&fs)||Ls(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Vs(zs.bind(null,r,s,e),[e]),r.flags|=2048,Ns(9,Os.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=As(),t=Pl.identifierPrefix;if(io){var n=Yi;t=":"+t+"R"+(n=($i&~(1<<32-st($i)-1)).toString(32)+n),0<(n=bs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=xs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},la={readContext:Ao,useCallback:$s,useContext:Ao,useEffect:Ws,useImperativeHandle:Xs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Ys,useReducer:Ts,useRef:Bs,useState:function(){return Ts(Ms)},useDebugValue:Ks,useDeferredValue:function(e){return Qs(Es(),gs.memoizedState,e)},useTransition:function(){return[Ts(Ms)[0],Es().memoizedState]},useMutableSource:Rs,useSyncExternalStore:Is,useId:ea,unstable_isNewReconciler:!1},ua={readContext:Ao,useCallback:$s,useContext:Ao,useEffect:Ws,useImperativeHandle:Xs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Ys,useReducer:Ps,useRef:Bs,useState:function(){return Ps(Ms)},useDebugValue:Ks,useDeferredValue:function(e){var t=Es();return null===gs?t.memoizedState=e:Qs(t,gs.memoizedState,e)},useTransition:function(){return[Ps(Ms)[0],Es().memoizedState]},useMutableSource:Rs,useSyncExternalStore:Is,useId:ea,unstable_isNewReconciler:!1};function ca(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function da(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ha(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var pa="function"==typeof WeakMap?WeakMap:Map;function fa(e,t,n){(n=Oo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Ul=r),ha(0,t)},n}function ma(e,t,n){(n=Oo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ha(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ha(0,t),"function"!=typeof r&&(null===Zl?Zl=new Set([this]):Zl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ga(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pa;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Au.bind(null,e,t,n),t.then(e,e))}function _a(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ya(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Oo(-1,1)).tag=2,zo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var va=b.ReactCurrentOwner,ba=!1;function xa(e,t,n,r){t.child=null===e?Qo(t,null,n,r):Yo(t,e.child,n,r)}function wa(e,t,n,r,i){n=n.render;var o=t.ref;return So(t,i),r=Cs(e,t,n,r,o,i),n=Ss(),null===e||ba?(io&&n&&eo(t),t.flags|=1,xa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function ka(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Lu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=zu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ca(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(s,r)&&e.ref===t.ref)return Ha(e,t,i)}return t.flags|=1,(e=Ou(o,r)).ref=t.ref,e.return=t,t.child=e}function Ca(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(ba=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Ha(e,t,i);0!=(131072&e.flags)&&(ba=!0)}}return Ea(e,t,n,r,i)}function Sa(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ai(Ol,Ll),Ll|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ai(Ol,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ai(Ol,Ll),Ll|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ai(Ol,Ll),Ll|=r;return xa(e,t,i,n),t.child}function Aa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ea(e,t,n,r,i){var o=Ii(n)?Pi:Mi.current;return o=Ri(t,o),So(t,i),n=Cs(e,t,n,r,o,i),r=Ss(),null===e||ba?(io&&r&&eo(t),t.flags|=1,xa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Ma(e,t,n,r,i){if(Ii(n)){var o=!0;Fi(t)}else o=!1;if(So(t,i),null===t.stateNode)Wa(e,t),Wo(t,n,r),Uo(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;u="object"==typeof u&&null!==u?Ao(u):Ri(t,u=Ii(n)?Pi:Mi.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==u)&&Ho(t,s,r,u),Ro=!1;var h=t.memoizedState;s.state=h,jo(t,r,s,i),l=t.memoizedState,a!==r||h!==l||Ti.current||Ro?("function"==typeof c&&(qo(t,n,c,r),l=t.memoizedState),(a=Ro||Vo(t,n,a,r,h,l,u))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Lo(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:_o(t.type,a),s.props=u,d=t.pendingProps,h=s.context,l="object"==typeof(l=n.contextType)&&null!==l?Ao(l):Ri(t,l=Ii(n)?Pi:Mi.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&Ho(t,s,r,l),Ro=!1,h=t.memoizedState,s.state=h,jo(t,r,s,i);var f=t.memoizedState;a!==d||h!==f||Ti.current||Ro?("function"==typeof p&&(qo(t,n,p,r),f=t.memoizedState),(u=Ro||Vo(t,n,u,r,h,f,l)||!1)?(c||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=u):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ta(e,t,n,r,o,i)}function Ta(e,t,n,r,i,o){Aa(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&Di(t,n,!1),Ha(e,t,o);r=t.stateNode,va.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,a,o)):xa(e,t,a,o),t.memoizedState=r.state,i&&Di(t,n,!0),t.child}function Pa(e){var t=e.stateNode;t.pendingContext?Oi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Oi(0,t.context,!1),is(e,t.containerInfo)}function Ra(e,t,n,r,i){return fo(),mo(i),t.flags|=256,xa(e,t,n,r),t.child}var Ia,La,Oa,za,Fa={dehydrated:null,treeContext:null,retryLane:0};function Da(e){return{baseLanes:e,cachePool:null,transitions:null}}function ja(e,t,n){var r,i=t.pendingProps,s=ls.current,a=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Ai(ls,1&s),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,a?(i=t.mode,a=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Du(l,i,0,null),e=Fu(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Da(n),t.memoizedState=Fa,e):Na(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,a){if(n)return 256&t.flags?(t.flags&=-257,Ba(e,t,a,r=da(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Du({mode:"visible",children:r.children},i,0,null),(s=Fu(s,i,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!=(1&t.mode)&&Yo(t,e.child,null,a),t.child.memoizedState=Da(a),t.memoizedState=Fa,s);if(0==(1&t.mode))return Ba(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Ba(e,t,a,r=da(s=Error(o(419)),r,void 0))}if(l=0!=(a&e.childLanes),ba||l){if(null!==(r=Pl)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Po(e,i),ru(r,e,i,-1))}return gu(),Ba(e,t,a,r=da(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Mu.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ro=ui(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Zi[Xi++]=$i,Zi[Xi++]=Yi,Zi[Xi++]=Ki,$i=e.id,Yi=e.overflow,Ki=t),(t=Na(t,r.children)).flags|=4096,t)}(e,t,l,i,r,s,n);if(a){a=i.fallback,l=t.mode,r=(s=e.child).sibling;var u={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=Ou(s,u)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=Ou(r,a):(a=Fu(a,l,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,l=null===(l=e.child.memoizedState)?Da(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Fa,i}return e=(a=e.child).sibling,i=Ou(a,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Na(e,t){return(t=Du({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ba(e,t,n,r){return null!==r&&mo(r),Yo(t,e.child,null,n),(e=Na(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function qa(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Co(e.return,t,n)}function Ga(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Va(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(xa(e,t,r.children,n),0!=(2&(r=ls.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qa(e,n,t);else if(19===e.tag)qa(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ai(ls,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===us(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ga(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===us(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ga(t,!0,n,null,o);break;case"together":Ga(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wa(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ha(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dl|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Ou(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ou(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ua(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Za(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Xa(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Za(t),null;case 1:case 17:return Ii(t.type)&&Li(),Za(t),null;case 3:return r=t.stateNode,os(),Si(Ti),Si(Mi),ds(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==oo&&(au(oo),oo=null))),La(e,t),Za(t),null;case 5:as(t);var i=rs(ns.current);if(n=t.type,null!==e&&null!=t.stateNode)Oa(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Za(t),null}if(e=rs(es.current),ho(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[hi]=t,r[pi]=s,e=0!=(1&t.mode),n){case"dialog":Nr("cancel",r),Nr("close",r);break;case"iframe":case"object":case"embed":Nr("load",r);break;case"video":case"audio":for(i=0;i<zr.length;i++)Nr(zr[i],r);break;case"source":Nr("error",r);break;case"img":case"image":case"link":Nr("error",r),Nr("load",r);break;case"details":Nr("toggle",r);break;case"input":$(r,s),Nr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Nr("invalid",r);break;case"textarea":ie(r,s),Nr("invalid",r)}for(var l in ye(n,s),i=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"==typeof u?r.textContent!==u&&(!0!==s.suppressHydrationWarning&&Qr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&Qr(r.textContent,u,e),i=["children",""+u]):a.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Nr("scroll",r)}switch(n){case"input":U(r),J(r,s,!0);break;case"textarea":U(r),se(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[pi]=r,Ia(e,t,!1,!1),t.stateNode=e;e:{switch(l=ve(n,r),n){case"dialog":Nr("cancel",e),Nr("close",e),i=r;break;case"iframe":case"object":case"embed":Nr("load",e),i=r;break;case"video":case"audio":for(i=0;i<zr.length;i++)Nr(zr[i],e);i=r;break;case"source":Nr("error",e),i=r;break;case"img":case"image":case"link":Nr("error",e),Nr("load",e),i=r;break;case"details":Nr("toggle",e),i=r;break;case"input":$(e,r),i=K(e,r),Nr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=D({},r,{value:void 0}),Nr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Nr("invalid",e)}for(s in ye(n,i),u=i)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?ge(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===s?"string"==typeof c?("textarea"!==n||""!==c)&&he(e,c):"number"==typeof c&&he(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Nr("scroll",e):null!=c&&v(e,s,c,l))}switch(n){case"input":U(e),J(e,r,!1);break;case"textarea":U(e),se(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ne(e,!!r.multiple,s,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Za(t),null;case 6:if(e&&null!=t.stateNode)za(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=rs(ns.current),rs(es.current),ho(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(s=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!=(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Za(t),null;case 13:if(Si(ls),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!=(1&t.mode)&&0==(128&t.flags))po(),fo(),t.flags|=98560,s=!1;else if(s=ho(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[hi]=t}else fo(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Za(t),s=!1}else null!==oo&&(au(oo),oo=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ls.current)?0===zl&&(zl=3):gu())),null!==t.updateQueue&&(t.flags|=4),Za(t),null);case 4:return os(),La(e,t),null===e&&Gr(t.stateNode.containerInfo),Za(t),null;case 10:return ko(t.type._context),Za(t),null;case 19:if(Si(ls),null===(s=t.memoizedState))return Za(t),null;if(r=0!=(128&t.flags),null===(l=s.rendering))if(r)Ua(s,!1);else{if(0!==zl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=us(e))){for(t.flags|=128,Ua(s,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ai(ls,1&ls.current|2),t.child}e=e.sibling}null!==s.tail&&Ye()>Vl&&(t.flags|=128,r=!0,Ua(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=us(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ua(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!io)return Za(t),null}else 2*Ye()-s.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,Ua(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ye(),t.sibling=null,n=ls.current,Ai(ls,r?1&n|2:1&n),t):(Za(t),null);case 22:case 23:return hu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Ll)&&(Za(t),6&t.subtreeFlags&&(t.flags|=8192)):Za(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ka(e,t){switch(to(t),t.tag){case 1:return Ii(t.type)&&Li(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return os(),Si(Ti),Si(Mi),ds(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return as(t),null;case 13:if(Si(ls),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(ls),null;case 4:return os(),null;case 10:return ko(t.type._context),null;case 22:case 23:return hu(),null;default:return null}}Ia=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},La=function(){},Oa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,rs(es.current);var o,s=null;switch(n){case"input":i=K(e,i),r=K(e,r),s=[];break;case"select":i=D({},i,{value:void 0}),r=D({},r,{value:void 0}),s=[];break;case"textarea":i=re(e,i),r=re(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(c in ye(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(a.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(s||(s=[]),s.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(a.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Nr("scroll",e),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},za=function(e,t,n,r){n!==r&&(t.flags|=4)};var $a=!1,Ya=!1,Qa="function"==typeof WeakSet?WeakSet:Set,Ja=null;function el(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Su(e,t,n)}else n.current=null}function tl(e,t,n){try{n()}catch(n){Su(e,t,n)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&tl(t,n,o)}i=i.next}while(i!==r)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function sl(e){var t=e.alternate;null!==t&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hi],delete t[pi],delete t[mi],delete t[gi],delete t[_i]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var dl=null,hl=!1;function pl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Ya||el(n,t);case 6:var r=dl,i=hl;dl=null,pl(e,t,n),hl=i,null!==(dl=r)&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Gt(e)):li(dl,n.stateNode));break;case 4:r=dl,i=hl,dl=n.stateNode.containerInfo,hl=!0,pl(e,t,n),dl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Ya&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!=(2&o)||0!=(4&o))&&tl(n,t,s),i=i.next}while(i!==r)}pl(e,t,n);break;case 1:if(!Ya&&(el(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Su(n,t,e)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ya=(r=Ya)||null!==n.memoizedState,pl(e,t,n),Ya=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qa),t.forEach((function(t){var r=Tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,hl=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===dl)throw Error(o(160));fl(s,a,i),dl=null,hl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){Su(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)_l(t,e),t=t.sibling}function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),yl(e),4&r){try{rl(3,e,e.return),il(3,e)}catch(t){Su(e,e.return,t)}try{rl(5,e,e.return)}catch(t){Su(e,e.return,t)}}break;case 1:gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return);break;case 5:if(gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){Su(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var s=e.memoizedProps,a=null!==n?n.memoizedProps:s,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===s.type&&null!=s.name&&Y(i,s),ve(l,a);var c=ve(l,s);for(a=0;a<u.length;a+=2){var d=u[a],h=u[a+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):v(i,d,h,c)}switch(l){case"input":Q(i,s);break;case"textarea":oe(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var f=s.value;null!=f?ne(i,!!s.multiple,f,!1):p!==!!s.multiple&&(null!=s.defaultValue?ne(i,!!s.multiple,s.defaultValue,!0):ne(i,!!s.multiple,s.multiple?[]:"",!1))}i[pi]=s}catch(t){Su(e,e.return,t)}}break;case 6:if(gl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(t){Su(e,e.return,t)}}break;case 3:if(gl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Gt(t.containerInfo)}catch(t){Su(e,e.return,t)}break;case 4:default:gl(t,e),yl(e);break;case 13:gl(t,e),yl(e),8192&(i=e.child).flags&&(s=null!==i.memoizedState,i.stateNode.isHidden=s,!s||null!==i.alternate&&null!==i.alternate.memoizedState||(Gl=Ye())),4&r&&ml(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ya=(c=Ya)||d,gl(t,e),Ya=c):gl(t,e),yl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!=(1&e.mode))for(Ja=e,d=e.child;null!==d;){for(h=Ja=d;null!==Ja;){switch(f=(p=Ja).child,p.tag){case 0:case 11:case 14:case 15:rl(4,p,p.return);break;case 1:el(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Su(r,n,e)}}break;case 5:el(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Ja=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,c?"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=h.stateNode,a=null!=(u=h.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",a))}catch(t){Su(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(t){Su(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),yl(e),4&r&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cl(e,ll(e),i);break;case 3:case 4:var s=r.stateNode.containerInfo;ul(e,ll(e),s);break;default:throw Error(o(161))}}catch(t){Su(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Ja=e,bl(e,t,n)}function bl(e,t,n){for(var r=0!=(1&e.mode);null!==Ja;){var i=Ja,o=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||$a;if(!s){var a=i.alternate,l=null!==a&&null!==a.memoizedState||Ya;a=$a;var u=Ya;if($a=s,(Ya=l)&&!u)for(Ja=i;null!==Ja;)l=(s=Ja).child,22===s.tag&&null!==s.memoizedState?kl(i):null!==l?(l.return=s,Ja=l):kl(i);for(;null!==o;)Ja=o,bl(o,t,n),o=o.sibling;Ja=i,$a=a,Ya=u}xl(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Ja=o):xl(e)}}function xl(e){for(;null!==Ja;){var t=Ja;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ya||il(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ya)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:_o(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&No(t,s,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}No(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Gt(h)}}}break;default:throw Error(o(163))}Ya||512&t.flags&&ol(t)}catch(e){Su(t,t.return,e)}}if(t===e){Ja=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ja=n;break}Ja=t.return}}function wl(e){for(;null!==Ja;){var t=Ja;if(t===e){Ja=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ja=n;break}Ja=t.return}}function kl(e){for(;null!==Ja;){var t=Ja;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(e){Su(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Su(t,i,e)}}var o=t.return;try{ol(t)}catch(e){Su(t,o,e)}break;case 5:var s=t.return;try{ol(t)}catch(e){Su(t,s,e)}}}catch(e){Su(t,t.return,e)}if(t===e){Ja=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Ja=a;break}Ja=t.return}}var Cl,Sl=Math.ceil,Al=b.ReactCurrentDispatcher,El=b.ReactCurrentOwner,Ml=b.ReactCurrentBatchConfig,Tl=0,Pl=null,Rl=null,Il=0,Ll=0,Ol=Ci(0),zl=0,Fl=null,Dl=0,jl=0,Nl=0,Bl=null,ql=null,Gl=0,Vl=1/0,Wl=null,Hl=!1,Ul=null,Zl=null,Xl=!1,Kl=null,$l=0,Yl=0,Ql=null,Jl=-1,eu=0;function tu(){return 0!=(6&Tl)?Ye():-1!==Jl?Jl:Jl=Ye()}function nu(e){return 0==(1&e.mode)?1:0!=(2&Tl)&&0!==Il?Il&-Il:null!==go.transition?(0===eu&&(eu=mt()),eu):0!==(e=vt)?e:e=void 0===(e=window.event)?16:$t(e.type)}function ru(e,t,n,r){if(50<Yl)throw Yl=0,Ql=null,Error(o(185));_t(e,n,r),0!=(2&Tl)&&e===Pl||(e===Pl&&(0==(2&Tl)&&(jl|=n),4===zl&&lu(e,Il)),iu(e,r),1===n&&0===Tl&&0==(1&t.mode)&&(Vl=Ye()+500,Ni&&Gi()))}function iu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-st(o),a=1<<s,l=i[s];-1===l?0!=(a&n)&&0==(a&r)||(i[s]=pt(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=ht(e,e===Pl?Il:0);if(0===r)null!==n&&Xe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Xe(n),1===t)0===e.tag?function(e){Ni=!0,qi(e)}(uu.bind(null,e)):qi(uu.bind(null,e)),si((function(){0==(6&Tl)&&Gi()})),n=null;else{switch(bt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Pu(n,ou.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ou(e,t){if(Jl=-1,eu=0,0!=(6&Tl))throw Error(o(327));var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=ht(e,e===Pl?Il:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=_u(e,r);else{t=r;var i=Tl;Tl|=2;var s=mu();for(Pl===e&&Il===t||(Wl=null,Vl=Ye()+500,pu(e,t));;)try{vu();break}catch(t){fu(e,t)}wo(),Al.current=s,Tl=i,null!==Rl?t=0:(Pl=null,Il=0,t=zl)}if(0!==t){if(2===t&&0!==(i=ft(e))&&(r=i,t=su(e,i)),1===t)throw n=Fl,pu(e,0),lu(e,r),iu(e,Ye()),n;if(6===t)lu(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ar(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=_u(e,r))&&0!==(s=ft(e))&&(r=s,t=su(e,s)),1===t))throw n=Fl,pu(e,0),lu(e,r),iu(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:wu(e,ql,Wl);break;case 3:if(lu(e,r),(130023424&r)===r&&10<(t=Gl+500-Ye())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wu.bind(null,e,ql,Wl),t);break}wu(e,ql,Wl);break;case 4:if(lu(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-st(r);s=1<<a,(a=t[a])>i&&(i=a),r&=~s}if(r=i,10<(r=(120>(r=Ye()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ri(wu.bind(null,e,ql,Wl),r);break}wu(e,ql,Wl);break;default:throw Error(o(329))}}}return iu(e,Ye()),e.callbackNode===n?ou.bind(null,e):null}function su(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(pu(e,t).flags|=256),2!==(e=_u(e,t))&&(t=ql,ql=n,null!==t&&au(t)),e}function au(e){null===ql?ql=e:ql.push.apply(ql,e)}function lu(e,t){for(t&=~Nl,t&=~jl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function uu(e){if(0!=(6&Tl))throw Error(o(327));ku();var t=ht(e,0);if(0==(1&t))return iu(e,Ye()),null;var n=_u(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=su(e,r))}if(1===n)throw n=Fl,pu(e,0),lu(e,t),iu(e,Ye()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wu(e,ql,Wl),iu(e,Ye()),null}function cu(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Vl=Ye()+500,Ni&&Gi())}}function du(e){null!==Kl&&0===Kl.tag&&0==(6&Tl)&&ku();var t=Tl;Tl|=1;var n=Ml.transition,r=vt;try{if(Ml.transition=null,vt=1,e)return e()}finally{vt=r,Ml.transition=n,0==(6&(Tl=t))&&Gi()}}function hu(){Ll=Ol.current,Si(Ol)}function pu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Rl)for(n=Rl.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Li();break;case 3:os(),Si(Ti),Si(Mi),ds();break;case 5:as(r);break;case 4:os();break;case 13:case 19:Si(ls);break;case 10:ko(r.type._context);break;case 22:case 23:hu()}n=n.return}if(Pl=e,Rl=e=Ou(e.current,null),Il=Ll=t,zl=0,Fl=null,Nl=jl=Dl=0,ql=Bl=null,null!==Eo){for(t=0;t<Eo.length;t++)if(null!==(r=(n=Eo[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}Eo=null}return e}function fu(e,t){for(;;){var n=Rl;try{if(wo(),hs.current=sa,ys){for(var r=ms.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ys=!1}if(fs=0,_s=gs=ms=null,vs=!1,bs=0,El.current=null,null===n||null===n.return){zl=1,Fl=t,Rl=null;break}e:{var s=e,a=n.return,l=n,u=t;if(t=Il,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=_a(a);if(null!==f){f.flags&=-257,ya(f,a,l,0,t),1&f.mode&&ga(s,c,t),u=c;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}if(0==(1&t)){ga(s,c,t),gu();break e}u=Error(o(426))}else if(io&&1&l.mode){var _=_a(a);if(null!==_){0==(65536&_.flags)&&(_.flags|=256),ya(_,a,l,0,t),mo(ca(u,l));break e}}s=u=ca(u,l),4!==zl&&(zl=2),null===Bl?Bl=[s]:Bl.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Do(s,fa(0,u,t));break e;case 1:l=u;var y=s.type,v=s.stateNode;if(0==(128&s.flags)&&("function"==typeof y.getDerivedStateFromError||null!==v&&"function"==typeof v.componentDidCatch&&(null===Zl||!Zl.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t,Do(s,ma(s,l,t));break e}}s=s.return}while(null!==s)}xu(n)}catch(e){t=e,Rl===n&&null!==n&&(Rl=n=n.return);continue}break}}function mu(){var e=Al.current;return Al.current=sa,null===e?sa:e}function gu(){0!==zl&&3!==zl&&2!==zl||(zl=4),null===Pl||0==(268435455&Dl)&&0==(268435455&jl)||lu(Pl,Il)}function _u(e,t){var n=Tl;Tl|=2;var r=mu();for(Pl===e&&Il===t||(Wl=null,pu(e,t));;)try{yu();break}catch(t){fu(e,t)}if(wo(),Tl=n,Al.current=r,null!==Rl)throw Error(o(261));return Pl=null,Il=0,zl}function yu(){for(;null!==Rl;)bu(Rl)}function vu(){for(;null!==Rl&&!Ke();)bu(Rl)}function bu(e){var t=Cl(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?xu(e):Rl=t,El.current=null}function xu(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Xa(n,t,Ll)))return void(Rl=n)}else{if(null!==(n=Ka(n,t)))return n.flags&=32767,void(Rl=n);if(null===e)return zl=6,void(Rl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Rl=t);Rl=t=e}while(null!==t);0===zl&&(zl=5)}function wu(e,t,n){var r=vt,i=Ml.transition;try{Ml.transition=null,vt=1,function(e,t,n,r){do{ku()}while(null!==Kl);if(0!=(6&Tl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-st(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,s),e===Pl&&(Rl=Pl=null,Il=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Xl||(Xl=!0,Pu(tt,(function(){return ku(),null}))),s=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||s){s=Ml.transition,Ml.transition=null;var a=vt;vt=1;var l=Tl;Tl|=4,El.current=null,function(e,t){if(ei=Wt,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(e){n=null;break e}var a=0,l=-1,u=-1,c=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(l=a+i),h!==s||0!==r&&3!==h.nodeType||(u=a+r),3===h.nodeType&&(a+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++c===i&&(l=a),p===s&&++d===r&&(u=a),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Wt=!1,Ja=t;null!==Ja;)if(e=(t=Ja).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Ja=e;else for(;null!==Ja;){t=Ja;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,_=m.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:_o(t.type,g),_);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(o(163))}}catch(e){Su(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Ja=e;break}Ja=t.return}m=nl,nl=!1}(e,n),_l(n,e),fr(ti),Wt=!!ei,ti=ei=null,e.current=n,vl(n,e,i),$e(),Tl=l,vt=a,Ml.transition=s}else e.current=n;if(Xl&&(Xl=!1,Kl=e,$l=i),0===(s=e.pendingLanes)&&(Zl=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),iu(e,Ye()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Hl)throw Hl=!1,e=Ul,Ul=null,e;0!=(1&$l)&&0!==e.tag&&ku(),0!=(1&(s=e.pendingLanes))?e===Ql?Yl++:(Yl=0,Ql=e):Yl=0,Gi()}(e,t,n,r)}finally{Ml.transition=i,vt=r}return null}function ku(){if(null!==Kl){var e=bt($l),t=Ml.transition,n=vt;try{if(Ml.transition=null,vt=16>e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,$l=0,0!=(6&Tl))throw Error(o(331));var i=Tl;for(Tl|=4,Ja=e.current;null!==Ja;){var s=Ja,a=s.child;if(0!=(16&Ja.flags)){var l=s.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Ja=c;null!==Ja;){var d=Ja;switch(d.tag){case 0:case 11:case 15:rl(8,d,s)}var h=d.child;if(null!==h)h.return=d,Ja=h;else for(;null!==Ja;){var p=(d=Ja).sibling,f=d.return;if(sl(d),d===c){Ja=null;break}if(null!==p){p.return=f,Ja=p;break}Ja=f}}}var m=s.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(null!==g)}}Ja=s}}if(0!=(2064&s.subtreeFlags)&&null!==a)a.return=s,Ja=a;else e:for(;null!==Ja;){if(0!=(2048&(s=Ja).flags))switch(s.tag){case 0:case 11:case 15:rl(9,s,s.return)}var y=s.sibling;if(null!==y){y.return=s.return,Ja=y;break e}Ja=s.return}}var v=e.current;for(Ja=v;null!==Ja;){var b=(a=Ja).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,Ja=b;else e:for(a=v;null!==Ja;){if(0!=(2048&(l=Ja).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(e){Su(l,l.return,e)}if(l===a){Ja=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Ja=x;break e}Ja=l.return}}if(Tl=i,Gi(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{vt=n,Ml.transition=t}}return!1}function Cu(e,t,n){e=zo(e,t=fa(0,t=ca(n,t),1),1),t=tu(),null!==e&&(_t(e,1,t),iu(e,t))}function Su(e,t,n){if(3===e.tag)Cu(e,e,n);else for(;null!==t;){if(3===t.tag){Cu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Zl||!Zl.has(r))){t=zo(t,e=ma(t,e=ca(n,e),1),1),e=tu(),null!==t&&(_t(t,1,e),iu(t,e));break}}t=t.return}}function Au(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tu(),e.pingedLanes|=e.suspendedLanes&n,Pl===e&&(Il&n)===n&&(4===zl||3===zl&&(130023424&Il)===Il&&500>Ye()-Gl?pu(e,0):Nl|=n),iu(e,t)}function Eu(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ct,0==(130023424&(ct<<=1))&&(ct=4194304)));var n=tu();null!==(e=Po(e,t))&&(_t(e,t,n),iu(e,n))}function Mu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Eu(e,n)}function Pu(e,t){return Ze(e,t)}function Ru(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Iu(e,t,n,r){return new Ru(e,t,n,r)}function Lu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ou(e,t){var n=e.alternate;return null===n?((n=Iu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zu(e,t,n,r,i,s){var a=2;if(r=e,"function"==typeof e)Lu(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case k:return Fu(n.children,i,s,t);case C:a=8,i|=8;break;case S:return(e=Iu(12,n,t,2|i)).elementType=S,e.lanes=s,e;case T:return(e=Iu(13,n,t,i)).elementType=T,e.lanes=s,e;case P:return(e=Iu(19,n,t,i)).elementType=P,e.lanes=s,e;case L:return Du(n,i,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case A:a=10;break e;case E:a=9;break e;case M:a=11;break e;case R:a=14;break e;case I:a=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Iu(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Fu(e,t,n,r){return(e=Iu(7,e,r,t)).lanes=n,e}function Du(e,t,n,r){return(e=Iu(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function ju(e,t,n){return(e=Iu(6,e,null,t)).lanes=n,e}function Nu(e,t,n){return(t=Iu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qu(e,t,n,r,i,o,s,a,l){return e=new Bu(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Iu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Io(o),e}function Gu(e){if(!e)return Ei;e:{if(Ge(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ii(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ii(n))return zi(e,n,t)}return t}function Vu(e,t,n,r,i,o,s,a,l){return(e=qu(n,r,!0,e,0,o,0,a,l)).context=Gu(null),n=e.current,(o=Oo(r=tu(),i=nu(n))).callback=null!=t?t:null,zo(n,o,i),e.current.lanes=i,_t(e,i,r),iu(e,r),e}function Wu(e,t,n,r){var i=t.current,o=tu(),s=nu(i);return n=Gu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Oo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=zo(i,t,s))&&(ru(e,i,s,o),Fo(e,i,s)),s}function Hu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Uu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Zu(e,t){Uu(e,t),(e=e.alternate)&&Uu(e,t)}Cl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ti.current)ba=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return ba=!1,function(e,t,n){switch(t.tag){case 3:Pa(t),fo();break;case 5:ss(t);break;case 1:Ii(t.type)&&Fi(t);break;case 4:is(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ai(yo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ai(ls,1&ls.current),t.flags|=128,null):0!=(n&t.child.childLanes)?ja(e,t,n):(Ai(ls,1&ls.current),null!==(e=Ha(e,t,n))?e.sibling:null);Ai(ls,1&ls.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Va(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ai(ls,ls.current),r)break;return null;case 22:case 23:return t.lanes=0,Sa(e,t,n)}return Ha(e,t,n)}(e,t,n);ba=0!=(131072&e.flags)}else ba=!1,io&&0!=(1048576&t.flags)&&Ji(t,Ui,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wa(e,t),e=t.pendingProps;var i=Ri(t,Mi.current);So(t,n),i=Cs(null,t,r,e,i,n);var s=Ss();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ii(r)?(s=!0,Fi(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Io(t),i.updater=Go,t.stateNode=i,i._reactInternals=t,Uo(t,r,e,n),t=Ta(null,t,r,!0,s,n)):(t.tag=0,io&&s&&eo(t),xa(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wa(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Lu(e)?1:0;if(null!=e){if((e=e.$$typeof)===M)return 11;if(e===R)return 14}return 2}(r),e=_o(r,e),i){case 0:t=Ea(null,t,r,e,n);break e;case 1:t=Ma(null,t,r,e,n);break e;case 11:t=wa(null,t,r,e,n);break e;case 14:t=ka(null,t,r,_o(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ea(e,t,r,i=t.elementType===r?i:_o(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ma(e,t,r,i=t.elementType===r?i:_o(r,i),n);case 3:e:{if(Pa(t),null===e)throw Error(o(387));r=t.pendingProps,i=(s=t.memoizedState).element,Lo(e,t),jo(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated){if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Ra(e,t,r,n,i=ca(Error(o(423)),t));break e}if(r!==i){t=Ra(e,t,r,n,i=ca(Error(o(424)),t));break e}for(ro=ui(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=Qo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),r===i){t=Ha(e,t,n);break e}xa(e,t,r,n)}t=t.child}return t;case 5:return ss(t),null===e&&uo(t),r=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,a=i.children,ni(r,i)?a=null:null!==s&&ni(r,s)&&(t.flags|=32),Aa(e,t),xa(e,t,a,n),t.child;case 6:return null===e&&uo(t),null;case 13:return ja(e,t,n);case 4:return is(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Yo(t,null,r,n):xa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,wa(e,t,r,i=t.elementType===r?i:_o(r,i),n);case 7:return xa(e,t,t.pendingProps,n),t.child;case 8:case 12:return xa(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Ai(yo,r._currentValue),r._currentValue=a,null!==s)if(ar(s.value,a)){if(s.children===i.children&&!Ti.current){t=Ha(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===s.tag){(u=Oo(-1,n&-n)).tag=2;var c=s.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),Co(s.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Co(a,n,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}xa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,So(t,n),r=r(i=Ao(i)),t.flags|=1,xa(e,t,r,n),t.child;case 14:return i=_o(r=t.type,t.pendingProps),ka(e,t,r,i=_o(r.type,i),n);case 15:return Ca(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_o(r,i),Wa(e,t),t.tag=1,Ii(r)?(e=!0,Fi(t)):e=!1,So(t,n),Wo(t,r,i),Uo(t,r,i,n),Ta(null,t,r,!0,e,n);case 19:return Va(e,t,n);case 22:return Sa(e,t,n)}throw Error(o(156,t.tag))};var Xu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function $u(e){this._internalRoot=e}function Yu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function ec(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof i){var a=i;i=function(){var e=Hu(s);a.call(e)}}Wu(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Hu(s);o.call(e)}}var s=Vu(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=s,e[fi]=s.current,Gr(8===e.nodeType?e.parentNode:e),du(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var a=r;r=function(){var e=Hu(l);a.call(e)}}var l=qu(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=l,e[fi]=l.current,Gr(8===e.nodeType?e.parentNode:e),du((function(){Wu(t,l,n,r)})),l}(n,t,e,i,r);return Hu(s)}$u.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Wu(e,t,null,null)},$u.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;du((function(){Wu(null,e,null,null)})),t[fi]=null}},$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&0!==t&&t<Lt[n].priority;n++);Lt.splice(n,0,e),0===n&&Dt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),iu(t,Ye()),0==(6&Tl)&&(Vl=Ye()+500,Gi()))}break;case 13:du((function(){var t=Po(e,1);if(null!==t){var n=tu();ru(t,e,1,n)}})),Zu(e,1)}},wt=function(e){if(13===e.tag){var t=Po(e,134217728);null!==t&&ru(t,e,134217728,tu()),Zu(e,134217728)}},kt=function(e){if(13===e.tag){var t=nu(e),n=Po(e,t);null!==n&&ru(n,e,t,tu()),Zu(e,t)}},Ct=function(){return vt},St=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},we=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xi(r);if(!i)throw Error(o(90));Z(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Me=cu,Te=du;var tc={usingClientEntryPoint:!1,Events:[vi,bi,xi,Ae,Ee,cu]},nc={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=He(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{it=ic.inject(rc),ot=ic}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yu(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yu(e))throw Error(o(299));var n=!1,r="",i=Xu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=qu(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,Gr(8===e.nodeType?e.parentNode:e),new Ku(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=He(t))?null:e.stateNode},t.flushSync=function(e){return du(e)},t.hydrate=function(e,t,n){if(!Qu(t))throw Error(o(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yu(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,s="",a=Xu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Vu(t,null,e,1,null!=n?n:null,i,0,s,a),e[fi]=t.current,Gr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)},t.render=function(e,t,n){if(!Qu(t))throw Error(o(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qu(e))throw Error(o(40));return!!e._reactRootContainer&&(du((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[fi]=null}))})),!0)},t.unstable_batchedUpdates=cu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qu(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},4470:(e,t,n)=>{"use strict";var r=n(3961);t.s=r.createRoot,r.hydrateRoot},3961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(7799)},3266:function(e,t,n){var r;r=e=>(()=>{var t={"./node_modules/css-mediaquery/index.js":(e,t)=>{"use strict";t.match=function(e,t){return a(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var i=e.expressions.every((function(e){var n=e.feature,r=e.modifier,i=e.value,o=t[n];if(!o)return!1;switch(n){case"orientation":case"scan":return o.toLowerCase()===i.toLowerCase();case"width":case"height":case"device-width":case"device-height":i=c(i),o=c(o);break;case"resolution":i=u(i),o=u(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":i=l(i),o=l(o);break;case"grid":case"color":case"color-index":case"monochrome":i=parseInt(i,10)||1,o=parseInt(o,10)||0}switch(r){case"min":return o>=i;case"max":return o<=i;default:return o===i}}));return i&&!n||!i&&n}))},t.parse=a;var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,i=/^(?:(min|max)-)?(.+)/,o=/(em|rem|px|cm|mm|in|pt|pc)?$/,s=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(n),o=t[1],s=t[2],a=t[3]||"",l={};return l.inverse=!!o&&"not"===o.toLowerCase(),l.type=s?s.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(r),n=t[1].toLowerCase().match(i);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function l(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(s)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function c(e){var t=parseFloat(e);switch(String(e).match(o)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},"./node_modules/hyphenate-style-name/index.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=/[A-Z]/g,i=/^ms-/,o={};function s(e){return"-"+e.toLowerCase()}const a=function(e){if(o.hasOwnProperty(e))return o[e];var t=e.replace(r,s);return o[e]=i.test(t)?"-"+t:t}},"./node_modules/matchmediaquery/index.js":(e,t,n)=>{"use strict";var r=n("./node_modules/css-mediaquery/index.js").match,i="undefined"!=typeof window?window.matchMedia:null;function o(e,t,n){var o=this;if(i&&!n){var s=i.call(window,e);this.matches=s.matches,this.media=s.media,s.addListener(a)}else this.matches=r(e,t),this.media=e;function a(e){o.matches=e.matches,o.media=e.media}this.addListener=function(e){s&&s.addListener(e)},this.removeListener=function(e){s&&s.removeListener(e)},this.dispose=function(){s&&s.removeListener(a)}}e.exports=function(e,t,n){return new o(e,t,n)}},"./node_modules/object-assign/index.js":e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,s,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]))n.call(o,u)&&(a[u]=o[u]);if(t){s=t(o);for(var c=0;c<s.length;c++)r.call(o,s[c])&&(a[s[c]]=o[s[c]])}}return a}},"./node_modules/prop-types/checkPropTypes.js":(e,t,n)=>{"use strict";var r=function(){},i=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),o={},s=n("./node_modules/prop-types/lib/has.js");function a(e,t,n,a,l){for(var u in e)if(s(e,u)){var c;try{if("function"!=typeof e[u]){var d=Error((a||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}c=e[u](t,u,a,n,null,i)}catch(e){c=e}if(!c||c instanceof Error||r((a||"React class")+": type specification of "+n+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in o)){o[c.message]=!0;var h=l?l():"";r("Failed "+n+" type: "+c.message+(null!=h?h:""))}}}r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},a.resetWarningCache=function(){o={}},e.exports=a},"./node_modules/prop-types/factoryWithTypeCheckers.js":(e,t,n)=>{"use strict";var r,i=n("./node_modules/react-is/index.js"),o=n("./node_modules/object-assign/index.js"),s=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js"),a=n("./node_modules/prop-types/lib/has.js"),l=n("./node_modules/prop-types/checkPropTypes.js");function u(){return null}r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},e.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(u),arrayOf:function(e){return p((function(t,n,r,i,o){if("function"!=typeof e)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new h("Invalid "+i+" `"+o+"` of type `"+_(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<a.length;l++){var u=e(a,l,r,i,o+"["+l+"]",s);if(u instanceof Error)return u}return null}))},element:p((function(t,n,r,i,o){var s=t[n];return e(s)?null:new h("Invalid "+i+" `"+o+"` of type `"+_(s)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:p((function(e,t,n,r,o){var s=e[t];return i.isValidElementType(s)?null:new h("Invalid "+r+" `"+o+"` of type `"+_(s)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,n,r,i,o){if(!(t[n]instanceof e)){var s=e.name||c;return new h("Invalid "+i+" `"+o+"` of type `"+((a=t[n]).constructor&&a.constructor.name?a.constructor.name:c)+"` supplied to `"+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:p((function(e,t,n,r,i){return g(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,n,r,i,o){if("function"!=typeof e)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],u=_(l);if("object"!==u)return new h("Invalid "+i+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(a(l,c)){var d=e(l,c,r,i,o+"."+c,s);if(d instanceof Error)return d}return null}))},oneOf:function(e){return Array.isArray(e)?p((function(t,n,r,i,o){for(var s=t[n],a=0;a<e.length;a++)if(l=s,u=e[a],l===u?0!==l||1/l==1/u:l!=l&&u!=u)return null;var l,u,c=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new h("Invalid "+i+" `"+o+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+c+".")})):(r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),u)},oneOfType:function(e){if(!Array.isArray(e))return r("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+v(n)+" at index "+t+"."),u}return p((function(t,n,r,i,o){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,n,r,i,o,s);if(null==c)return null;c.data&&a(c.data,"expectedType")&&l.push(c.data.expectedType)}return new h("Invalid "+i+" `"+o+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,n,r,i,o){var a=t[n],l=_(a);if("object"!==l)return new h("Invalid "+i+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return m(r,i,o,u,y(c));var d=c(a,u,r,i,o+"."+u,s);if(d)return d}return null}))},exact:function(e){return p((function(t,n,r,i,l){var u=t[n],c=_(u);if("object"!==c)return new h("Invalid "+i+" `"+l+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var d=o({},t[n],e);for(var p in d){var f=e[p];if(a(e,p)&&"function"!=typeof f)return m(r,i,l,p,y(f));if(!f)return new h("Invalid "+i+" `"+l+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=f(u,p,r,i,l+"."+p,s);if(g)return g}return null}))}};function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){var n={},i=0;function o(o,a,l,u,d,p,f){if(u=u||c,p=p||l,f!==s){if(t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("undefined"!=typeof console){var g=u+":"+l;!n[g]&&i<3&&(r("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,i++)}}return null==a[l]?o?null===a[l]?new h("The "+d+" `"+p+"` is marked as required in `"+u+"`, but its value is `null`."):new h("The "+d+" `"+p+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(a,l,u,d,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function f(e){return p((function(t,n,r,i,o,s){var a=t[n];return _(a)!==e?new h("Invalid "+i+" `"+o+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function m(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function g(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(g);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!g(i.value))return!1}else for(;!(i=o.next()).done;){var s=i.value;if(s&&!g(s[1]))return!1}return!0;default:return!1}}function _(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=_(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function v(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,d.checkPropTypes=l,d.resetWarningCache=l.resetWarningCache,d.PropTypes=d,d}},"./node_modules/prop-types/index.js":(e,t,n)=>{var r=n("./node_modules/react-is/index.js");e.exports=n("./node_modules/prop-types/factoryWithTypeCheckers.js")(r.isElement,!0)},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/prop-types/lib/has.js":e=>{e.exports=Function.call.bind(Object.prototype.hasOwnProperty)},"./node_modules/react-is/cjs/react-is.development.js":(e,t)=>{"use strict";!function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case u:case c:case i:case s:case o:case h:return p;default:var g=p&&p.$$typeof;switch(g){case l:case d:case m:case f:case a:return g;default:return t}}case r:return t}}}var x=u,w=c,k=l,C=a,S=n,A=d,E=i,M=m,T=f,P=r,R=s,I=o,L=h,O=!1;function z(e){return b(e)===c}t.AsyncMode=x,t.ConcurrentMode=w,t.ContextConsumer=k,t.ContextProvider=C,t.Element=S,t.ForwardRef=A,t.Fragment=E,t.Lazy=M,t.Memo=T,t.Portal=P,t.Profiler=R,t.StrictMode=I,t.Suspense=L,t.isAsyncMode=function(e){return O||(O=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(e)||b(e)===u},t.isConcurrentMode=z,t.isContextConsumer=function(e){return b(e)===l},t.isContextProvider=function(e){return b(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return b(e)===d},t.isFragment=function(e){return b(e)===i},t.isLazy=function(e){return b(e)===m},t.isMemo=function(e){return b(e)===f},t.isPortal=function(e){return b(e)===r},t.isProfiler=function(e){return b(e)===s},t.isStrictMode=function(e){return b(e)===o},t.isSuspense=function(e){return b(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===s||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===_||e.$$typeof===y||e.$$typeof===v||e.$$typeof===g)},t.typeOf=b}()},"./node_modules/react-is/index.js":(e,t,n)=>{"use strict";e.exports=n("./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":(e,t,n)=>{"use strict";function r(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o<i;o++){var s=n[o];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}function i(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}n.r(t),n.d(t,{shallowEqualArrays:()=>i,shallowEqualObjects:()=>r})},"./src/Component.ts":function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n("./src/useMediaQuery.ts"));t.default=function(e){var t=e.children,n=e.device,i=e.onChange,s=r(e,["children","device","onChange"]),a=(0,o.default)(s,n,i);return"function"==typeof t?t(a):a?t:null}},"./src/Context.ts":(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(0,n("react").createContext)(void 0);t.default=r},"./src/index.ts":function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Context=t.toQuery=t.useMediaQuery=t.default=void 0;var i=r(n("./src/useMediaQuery.ts"));t.useMediaQuery=i.default;var o=r(n("./src/Component.ts"));t.default=o.default;var s=r(n("./src/toQuery.ts"));t.toQuery=s.default;var a=r(n("./src/Context.ts"));t.Context=a.default},"./src/mediaQuery.ts":function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n("./node_modules/prop-types/index.js")),a=s.default.oneOfType([s.default.string,s.default.number]),l={all:s.default.bool,grid:s.default.bool,aural:s.default.bool,braille:s.default.bool,handheld:s.default.bool,print:s.default.bool,projection:s.default.bool,screen:s.default.bool,tty:s.default.bool,tv:s.default.bool,embossed:s.default.bool},u={orientation:s.default.oneOf(["portrait","landscape"]),scan:s.default.oneOf(["progressive","interlace"]),aspectRatio:s.default.string,deviceAspectRatio:s.default.string,height:a,deviceHeight:a,width:a,deviceWidth:a,color:s.default.bool,colorIndex:s.default.bool,monochrome:s.default.bool,resolution:a,type:Object.keys(l)},c=i(u,["type"]),d=r({minAspectRatio:s.default.string,maxAspectRatio:s.default.string,minDeviceAspectRatio:s.default.string,maxDeviceAspectRatio:s.default.string,minHeight:a,maxHeight:a,minDeviceHeight:a,maxDeviceHeight:a,minWidth:a,maxWidth:a,minDeviceWidth:a,maxDeviceWidth:a,minColor:s.default.number,maxColor:s.default.number,minColorIndex:s.default.number,maxColorIndex:s.default.number,minMonochrome:s.default.number,maxMonochrome:s.default.number,minResolution:a,maxResolution:a},c),h=r(r({},l),d);t.default={all:h,types:l,matchers:u,features:d}},"./src/toQuery.ts":function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n("./node_modules/hyphenate-style-name/index.js")),o=r(n("./src/mediaQuery.ts"));t.default=function(e){var t=[];return Object.keys(o.default.all).forEach((function(n){var r=e[n];null!=r&&t.push(function(e,t){var n=(0,i.default)(e);return"number"==typeof t&&(t="".concat(t,"px")),!0===t?n:!1===t?"not ".concat(n):"(".concat(n,": ").concat(t,")")}(n,r))})),t.join(" and ")}},"./src/useMediaQuery.ts":function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n("react"),o=r(n("./node_modules/matchmediaquery/index.js")),s=r(n("./node_modules/hyphenate-style-name/index.js")),a=n("./node_modules/shallow-equal/dist/index.esm.js"),l=r(n("./src/toQuery.ts")),u=r(n("./src/Context.ts")),c=function(e){if(e)return Object.keys(e).reduce((function(t,n){return t[(0,s.default)(n)]=e[n],t}),{})},d=function(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){e.current=!0}),[]),e.current};t.default=function(e,t,n){var r=function(e){var t=(0,i.useContext)(u.default),n=function(){return c(e)||c(t)},r=(0,i.useState)(n),o=r[0],s=r[1];return(0,i.useEffect)((function(){var e=n();(0,a.shallowEqualObjects)(o,e)||s(e)}),[e,t]),o}(t),s=function(e){var t=function(){return function(e){return e.query||(0,l.default)(e)}(e)},n=(0,i.useState)(t),r=n[0],o=n[1];return(0,i.useEffect)((function(){var e=t();r!==e&&o(e)}),[e]),r}(e);if(!s)throw new Error("Invalid or missing MediaQuery!");var h=function(e,t){var n=function(){return(0,o.default)(e,t||{},!!t)},r=(0,i.useState)(n),s=r[0],a=r[1],l=d();return(0,i.useEffect)((function(){if(l){var e=n();return a(e),function(){e&&e.dispose()}}}),[e,t]),s}(s,r),p=function(e){var t=(0,i.useState)(e.matches),n=t[0],r=t[1];return(0,i.useEffect)((function(){var t=function(e){r(e.matches)};return e.addListener(t),r(e.matches),function(){e.removeListener(t)}}),[e]),n}(h),f=d();return(0,i.useEffect)((function(){f&&n&&n(p)}),[p]),(0,i.useEffect)((function(){return function(){h&&h.dispose()}}),[]),p}},react:t=>{"use strict";t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r("./src/index.ts")})(),e.exports=r(n(9526))},2455:(e,t,n)=>{"use strict";var r=n(9526),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:c,props:o,_owner:a.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},3218:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=_.prototype;var b=v.prototype=new y;b.constructor=v,m(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,k={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)w.call(t,i)&&!C.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:s,ref:a,props:o,_owner:k.current}}function A(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,i,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return s=s(l=e),e=""===o?"."+M(l,0):o,x(s)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),T(s,t,i,"",(function(e){return e}))):null!=s&&(A(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,i+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(E,"$&/")+"/")+e)),t.push(s)),1;if(l=0,o=""===o?".":o+":",x(e))for(var u=0;u<e.length;u++){var c=o+M(a=e[u],u);l+=T(a,t,i,c,s)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(a=e.next()).done;)l+=T(a=a.value,t,i,c=o+M(a,u++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},L={transition:null},O={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:L,ReactCurrentOwner:k};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=_,t.Fragment=i,t.Profiler=s,t.PureComponent=v,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)w.call(t,u)&&!C.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:s,props:i,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return I.current.useCallback(e,t)},t.useContext=function(e){return I.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return I.current.useDeferredValue(e)},t.useEffect=function(e,t){return I.current.useEffect(e,t)},t.useId=function(){return I.current.useId()},t.useImperativeHandle=function(e,t,n){return I.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return I.current.useMemo(e,t)},t.useReducer=function(e,t,n){return I.current.useReducer(e,t,n)},t.useRef=function(e){return I.current.useRef(e)},t.useState=function(e){return I.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return I.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return I.current.useTransition()},t.version="18.2.0"},9526:(e,t,n)=>{"use strict";e.exports=n(3218)},7557:(e,t,n)=>{"use strict";e.exports=n(2455)},1196:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,l=e[a],u=a+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[a]=n,r=a);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var u=[],c=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,_="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(g=!1,b(e),!m)if(null!==r(u))m=!0,L(w);else{var t=r(c);null!==t&&O(x,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(A),A=-1),f=!0;var o=p;try{for(b(n),h=r(u);null!==h&&(!(h.expirationTime>n)||e&&!T());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===r(u)&&i(u),b(n)}else i(u);h=r(u)}if(null!==h)var l=!0;else{var d=r(c);null!==d&&O(x,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,C=!1,S=null,A=-1,E=5,M=-1;function T(){return!(t.unstable_now()-M<E)}function P(){if(null!==S){var e=t.unstable_now();M=e;var n=!0;try{n=S(!0,e)}finally{n?k():(C=!1,S=null)}}else C=!1}if("function"==typeof v)k=function(){v(P)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,I=R.port2;R.port1.onmessage=P,k=function(){I.postMessage(null)}}else k=function(){_(P,0)};function L(e){S=e,C||(C=!0,k())}function O(e,n){A=_((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,L(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(g?(y(A),A=-1):g=!0,O(x,o-s))):(e.sortIndex=a,n(u,e),m||f||(m=!0,L(w))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},2851:(e,t,n)=>{"use strict";e.exports=n(1196)},5701:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var l=e[a],u=r.base?l[0]+r.base:l[0],c=o[u]||0,d="".concat(u," ").concat(c);o[u]=c+1;var h=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=i(p,r);r.byIndex=a,t.splice(a,0,{identifier:d,updater:f,references:1})}s.push(d)}return s}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var l=r(e,i),u=0;u<o.length;u++){var c=n(o[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=l}}},6080:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},7182:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},6850:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},8236:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9213:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},6089:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="},7735:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="},6192:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"},1090:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="},6050:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="},8267:(e,t,n)=>{"use strict";e.exports=n.p+"eae34fa8f1e0c4c6d797.ttf"},9435:(e,t,n)=>{"use strict";e.exports=n.p+"ceb05254cedfa895b512.ttf"},6372:(e,t,n)=>{"use strict";e.exports=n.p+"fc2b5060f7accec5cf74.ttf"},6375:(e,t,n)=>{"use strict";e.exports=n.p+"fc3d2f2e3a203d0037c1.ttf"},9343:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xOTIwIDE1MzZ2MTI4aC0yMDQ4di0xNTM2aDEyOHYxNDA4aDE5MjB6bS0zODQtMTAyNGwyNTYgODk2aC0xNjY0di01NzZsNDQ4LTU3NiA1NzYgNTc2eiIvPjwvc3ZnPg=="},8604:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNDkwIDEzMjJxMCA0MC0yOCA2OGwtMTM2IDEzNnEtMjggMjgtNjggMjh0LTY4LTI4bC0yOTQtMjk0LTI5NCAyOTRxLTI4IDI4LTY4IDI4dC02OC0yOGwtMTM2LTEzNnEtMjgtMjgtMjgtNjh0MjgtNjhsMjk0LTI5NC0yOTQtMjk0cS0yOC0yOC0yOC02OHQyOC02OGwxMzYtMTM2cTI4LTI4IDY4LTI4dDY4IDI4bDI5NCAyOTQgMjk0LTI5NHEyOC0yOCA2OC0yOHQ2OCAyOGwxMzYgMTM2cTI4IDI4IDI4IDY4dC0yOCA2OGwtMjk0IDI5NCAyOTQgMjk0cTI4IDI4IDI4IDY4eiIvPjwvc3ZnPg=="}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&!e;)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),n.b=document.baseURI||self.location.href,n.nc=void 0,(()=>{"use strict";var e=n(7557),t=n(4470);const r=JSON.parse('{"en_US":{"total_ascend":"%1$s total ascent","total_descend":"%1$s total descent","way_contains_ford":"Route includes fords","way_contains_ferry":"Route includes ferries","way_contains_private":"Route with private roads","way_contains_toll":"Route has tolls","way_crosses_border":"Route crosses a country border","way_contains":"Route includes %1$s","tracks":"unpaved dirt roads","steps":"steps","footways":"footways","steep_sections":"steep sections","private_sections":"private sections","trunk_roads_warn":"Route includes potentially dangerous trunk roads or worse","get_off_bike_for":"Bike must be dismounted and pushed for %1$s","start_label":"Start","intermediate_label":"Intermediate","end_label":"End","set_start":"From here","set_intermediate":"Via point","set_end":"To here","center_map":"Center map","show_coords":"Show coordinates","query_osm":"Query OSM","route":"Route","add_to_route":"Add Location","delete_from_route":"Delete from Route","open_custom_model_box":"Open custom model box","draw_areas_enabled":"Draw and modify areas on map","help_custom_model":"Help","apply_custom_model":"Apply","custom_model_enabled":"Custom Model Active","settings":"Settings","settings_close":"Close","exclude_motorway_example":"Exclude Motorway","limit_speed_example":"Limit Speed","cargo_bike_example":"Cargo Bike","prefer_bike_network":"Prefer Cycle Routes","exclude_area_example":"Exclude Area","combined_example":"Combined Example","examples_custom_model":"Examples","marker":"Marker","gh_offline_info":"GraphHopper API offline?","refresh_button":"Refresh page","server_status":"Status","zoom_in":"Zoom in","zoom_out":"Zoom out","drag_to_reorder":"Drag to reorder","route_timed_out":"Route calculation timed out","route_request_failed":"Route request failed","current_location":"Current Location","searching_location":"Searching location","searching_location_failed":"Searching location failed","via_hint":"Via","from_hint":"From","gpx_export_button":"GPX Export","gpx_button":"GPX","hide_button":"Hide","details_button":"Details","to_hint":"To","route_info":"%1$s will take %2$s","search_button":"Search","more_button":"more","pt_route_info":"arrives at %1$s with %2$s transfers (%3$s)","pt_route_info_walking":"arrives at %1$s with just walking (%2$s)","locations_not_found":"Routing not possible. Location(s) not found in the area.","search_with_nominatim":"Search with Nominatim","powered_by":"Powered by","info":"Info","feedback":"Feedback","imprint":"Imprint","privacy":"Privacy","terms":"Terms","bike":"Bike","racingbike":"Racing Bike","mtb":"MTB","car":"Car","foot":"Foot","hike":"Hike","small_truck":"Small Truck","bus":"Bus","truck":"Truck","staticlink":"static link","motorcycle":"Motorcycle","scooter":"Scooter","back_to_map":"Back","distance_unit":"Distances are in %1$s","waiting_for_gps":"Waiting for the GPS signal...","elevation":"Elevation","slope":"Slope","towerslope":"Towerslope","country":"Country","surface":"Surface","road_environment":"Road environment","road_access":"Road access","road_class":"Road class","max_speed":"Max speed","average_speed":"Average speed","track_type":"Track type","toll":"Toll"},"ar":{"total_ascend":"%1$s اجمالى صعود","total_descend":"%1$s اجمالى نزول","way_contains_ford":"انتبه ، هناك مخاضة على الطريق","way_contains_ferry":"استخدم العبارة","way_contains_private":"طريق خاص","way_contains_toll":"طريق برسم عبور","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"البداية","intermediate_label":"نقطة عبور","end_label":"النهاية","set_start":"ادخل نقطة بدء","set_intermediate":"ادخل نقطة عبور","set_end":"ادخل نقطة وصول","center_map":"اجعل وسط الخريطة هنا","show_coords":"اظهر الاحداثيات","query_osm":"","route":"المسار","add_to_route":"","delete_from_route":"احذف من المسار","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"رمز او علامة","gh_offline_info":" واجهة برمجة التطبيقات (API) بلا اتصال؟","refresh_button":"اعادة تنشيط","server_status":"الحالة","zoom_in":"تكبير","zoom_out":"تصغير","drag_to_reorder":"اسحب لاعادة الترتيب","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"خلال","from_hint":"من","gpx_export_button":"GPX التصدير","gpx_button":"","hide_button":"","details_button":"","to_hint":"إلي","route_info":"%1$s ستاخذ %2$s","search_button":"ابحث","more_button":"المزيد","pt_route_info":"وصول سعت %1$s مع %2$s انتقال (%3$s)","pt_route_info_walking":"الوصول عند %1$s مشياً (%2$s)","locations_not_found":"لا يوجد طريق من هذه المنطقة","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"دراجة","racingbike":"دراجة سباق","mtb":"دراجة جبلية","car":"سيارة","foot":"مشياً","hike":"نزهة","small_truck":"شاحنة صغيرة","bus":"باص","truck":"شاحنة","staticlink":"رابط ثابت","motorcycle":"دراجة نارية","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"ast":{"total_ascend":"%1$s d\'ascensu total","total_descend":"%1$s de descensu total","way_contains_ford":"hai un vau nel camín","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Principiu","intermediate_label":"Intermediu","end_label":"Final","set_start":"Poner como principiu","set_intermediate":"Poner como intermediu","set_end":"Poner como final","center_map":"Centrar el mapa equí","show_coords":"Ver coordenaes","query_osm":"","route":"Ruta","add_to_route":"","delete_from_route":"Quitar de la ruta","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Marcador","gh_offline_info":"¿Cayó la API de GraphHopper?","refresh_button":"Refrescar la páxina","server_status":"Estáu","zoom_in":"Averar","zoom_out":"Alloñar","drag_to_reorder":"Abasnar pa cambiar l\'orde","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Pasando per","from_hint":"Dende","gpx_export_button":"Esportar GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"","route_info":"%1$s tardaràs %2$s","search_button":"Buscar","more_button":"más","pt_route_info":"llegada a les %1$s con %2$s tresbordos (%3$s)","pt_route_info_walking":"llegada a les %1$s sólo caminando (%2$s)","locations_not_found":"Nun se puede trazar una ruta. Dalgún llugar nun s\'alcuentra nel área","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicicleta","racingbike":"Bici de carreres","mtb":"Bici de montaña","car":"Coche","foot":"A pie","hike":"Senderismu","small_truck":"Camioneta","bus":"Autobús","truck":"Camión","staticlink":"enllaz estáticu","motorcycle":"Motocicleta","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"az":{"total_ascend":"%1$s yüksəliş","total_descend":"%1$s eniş","way_contains_ford":"Yolda keçid var","way_contains_ferry":"Bərəyə minin","way_contains_private":"özəl yol","way_contains_toll":"ödənişli yol","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Başlanğıc","intermediate_label":"Ara nöqtə","end_label":"Son","set_start":"Başlanğıcını burada təyin edin","set_intermediate":"Ara nöqtə olaraq təyin edin","set_end":"Bitmə məntəqəsi olaraq təyin edin","center_map":"Xəritənin mərkəzini bura təyin edin","show_coords":"Koordinatları göstər","query_osm":"","route":"Marşrut","add_to_route":"","delete_from_route":"Marşrutdan sil","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"İşarələyici","gh_offline_info":"GraphHopper APİ ilə bağlantı qurulmadı?","refresh_button":"Səhifəni yeniləyin","server_status":"Server statusu","zoom_in":"Yaxınlaşdır","zoom_out":"Uzaqlaşdır","drag_to_reorder":"Yol nöqtəsini köçürün","route_timed_out":"Marşrutun hesablanma vaxtı keçdi","route_request_failed":"Marşrut qurulması baş tutmadı","current_location":"Hazırki yer","searching_location":"Məkan axtarışı","searching_location_failed":"Məkan axtarış baş tutmadı","via_hint":"vasitəsilə","from_hint":"-dan","gpx_export_button":"GPX ixrac","gpx_button":"","hide_button":"","details_button":"","to_hint":"-dək","route_info":"məsafə - %1$s vaxt - %2$s","search_button":"Axtarış","more_button":"daha","pt_route_info":"Təxmini çatma vaxtı %1$s transfer - %2$s (%3$s)","pt_route_info_walking":"Piyada olaraq təxmini çatma vaxtı %1$s ( %2$s)","locations_not_found":"Marşrut qurulmağı mümkün deyil. Yer müəyyən edilməyib.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Velosiped","racingbike":"Yarış velosipedi","mtb":"Dağ velosipedi","car":"Avtomobil","foot":"Piyada","hike":"Gəzinti","small_truck":"yüngül yük maşını","bus":"Avtobus","truck":"Yük maşını","staticlink":"Daimi keçid","motorcycle":"Motosiklet","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"bg":{"total_ascend":"%1$s общо изкачване","total_descend":"%1$s общо слизане","way_contains_ford":"Внимание, на пътя има брод","way_contains_ferry":"вземете ферибота","way_contains_private":"частен път","way_contains_toll":"път с такса","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Начална точка","intermediate_label":"Междинна точка","end_label":"Крайна точка","set_start":"Избиране като начална точка","set_intermediate":"Избиране като междинна точка","set_end":"Избиране като крайна точка","center_map":"Центриране на картата тук","show_coords":"Показване на координатите","query_osm":"","route":"Маршрут","add_to_route":"","delete_from_route":"Премахване от маршрута","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Значка","gh_offline_info":"ППИ на GraphHopper е без мрежа?","refresh_button":"Презареждане на страницата","server_status":"Състояние","zoom_in":"Увеличаване","zoom_out":"Намаляване","drag_to_reorder":"Влачете за преподреждане","route_timed_out":"Времето за изчисляване на маршрут изтече","route_request_failed":"Заявката за маршрут е неуспешна","current_location":"Текущо местоположение","searching_location":"","searching_location_failed":"","via_hint":"През","from_hint":"От","gpx_export_button":"Изнасяне като GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"До","route_info":"%1$s ще отнемат %2$s","search_button":"Търсене","more_button":"повече","pt_route_info":"пристига в %1$s с %2$s прекачвания (%3$s)","pt_route_info_walking":"пристига в %1$s само с ходене (%2$s)","locations_not_found":"Не са изтеглени упътвания. Търсеното местоположение не е открито.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Велосипед","racingbike":"Състезателно колело","mtb":"Планинско колело","car":"Автомобил","foot":"Пеша","hike":"Планински преход","small_truck":"Малък камион","bus":"Автобус","truck":"Камион","staticlink":"Постоянна препратка","motorcycle":"Мотоциклет","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"bn_BN":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"রুটে টোল আছে","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"","intermediate_label":"","end_label":"","set_start":"","set_intermediate":"","set_end":"","center_map":"","show_coords":"","query_osm":"","route":"","add_to_route":"","delete_from_route":"","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"সাহায্য","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"উদাহরণ","marker":"","gh_offline_info":"","refresh_button":"","server_status":"","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"","from_hint":"","gpx_export_button":"","gpx_button":"","hide_button":"","details_button":"","to_hint":"","route_info":"","search_button":"অনুসন্ধান করুন","more_button":"আরও","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"","racingbike":"","mtb":"","car":"","foot":"","hike":"","small_truck":"","bus":"","truck":"","staticlink":"","motorcycle":"","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"ca":{"total_ascend":"%1$s de pujada total","total_descend":"%1$s de baixada total","way_contains_ford":"hi ha un gual en el camí","way_contains_ferry":"Agafa el ferri","way_contains_private":"camí privat","way_contains_toll":"via de peatge","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Punt d\'inici","intermediate_label":"Punt intermig","end_label":"Punt final","set_start":"Defineix com a punt d\'inici","set_intermediate":"Defineix com a punt intermig","set_end":"Defineix com a punt final","center_map":"Centra el mapa","show_coords":"Mostra les coordenades","query_osm":"","route":"Ruta","add_to_route":"","delete_from_route":"Suprimeix el punt de la ruta","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Marcador","gh_offline_info":"L\'API GraphHopper no té connexió ?","refresh_button":"Actualitza la pàgina","server_status":"Estat","zoom_in":"Apropa","zoom_out":"Allunya","drag_to_reorder":"Arrossega per canviar l\'ordre","route_timed_out":"S\'ha esgotat el temps de càlcul de la ruta","route_request_failed":"Ha fallat la resolució de la ruta.","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Passant per","from_hint":"Des de","gpx_export_button":"Exporta a GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Cap a","route_info":"%1$s trigaràs %2$s","search_button":"Cerca","more_button":"més","pt_route_info":"arriba a les %1$s amb %2$s transbordaments (%3$s)","pt_route_info_walking":"arriba caminant a les %1$s (%2$s)","locations_not_found":"No hi ha cap ruta. El destí no es troba dins l\'àrea.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicicleta","racingbike":"Bicicleta de curses","mtb":"Bicicleta de muntanya","car":"Cotxe","foot":"A peu","hike":"Senderisme","small_truck":"Camioneta","bus":"Autobús","truck":"Camió","staticlink":"Enllaç","motorcycle":"Motocicleta","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"cs_CZ":{"total_ascend":"celkové stoupání %1$s","total_descend":"celkové klesání %1$s","way_contains_ford":"Trasa obsahuje brody","way_contains_ferry":"Trasa obsahuje přívozy","way_contains_private":"Trasa obsahuje soukromé cesty","way_contains_toll":"Trasa obsahuje zpoplatněné úseky","way_crosses_border":"Trasa obsahuje překročení hranic","way_contains":"Trasa obsahuje %1$s","tracks":"nezpevněné cesty","steps":"schody","footways":"stezky pro pěší","steep_sections":"příkré úseky","private_sections":"soukromé úseky","trunk_roads_warn":"","get_off_bike_for":"Je třeba sesednout z kola a %1$s jej tlačit","start_label":"Start","intermediate_label":"Zastávka","end_label":"Cíl","set_start":"Nastavit jako start","set_intermediate":"Nastavit jako zastávku","set_end":"Nastavit jako cíl","center_map":"Vycentrovat mapu sem","show_coords":"Zobrazit souřadnice","query_osm":"Dotaz do OSM","route":"Trasa","add_to_route":"Přidat místo","delete_from_route":"Odstranit z trasy","open_custom_model_box":"Otevřít rámeček s vlastním modelem","draw_areas_enabled":"Kreslit a měnit oblasti na mapě","help_custom_model":"Nápověda","apply_custom_model":"Použít","custom_model_enabled":"Vlastní model aktivní","settings":"Nastavení","settings_close":"Zavřít","exclude_motorway_example":"Vynechat dálnice","limit_speed_example":"Rychlostní omezení","cargo_bike_example":"Nákladní kolo","prefer_bike_network":"","exclude_area_example":"Vynechat oblast","combined_example":"Kombinovaný příklad","examples_custom_model":"Příklady","marker":"Značka","gh_offline_info":"API GraphHopper je offline?","refresh_button":"Obnovit stránku","server_status":"Stav","zoom_in":"Přiblížit","zoom_out":"Oddálit","drag_to_reorder":"Přetažením změníte pořadí","route_timed_out":"Časový limit výpočtu trasy překročen","route_request_failed":"Trasa nemohla být vypočítána","current_location":"Aktuální pozice","searching_location":"Hledá se pozice","searching_location_failed":"Nepodařilo se najít pozici","via_hint":"Přes","from_hint":"Z","gpx_export_button":"Export do GPX","gpx_button":"","hide_button":"Skrýt","details_button":"Detaily","to_hint":"Do","route_info":"%1$s bude trvat %2$s","search_button":"Vyhledat","more_button":"více","pt_route_info":"dorazí v %1$s, %2$s přestup(y) (%3$s)","pt_route_info_walking":"dorazí v %1$s pěšky (%2$s)","locations_not_found":"","search_with_nominatim":"Hledat pomocí Nominatim","powered_by":"Běží na","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Kolo","racingbike":"Závodní kolo","mtb":"Horské kolo","car":"Automobil","foot":"Pěšky","hike":"Turistika","small_truck":"Dodávka","bus":"Autobus","truck":"Nákladní automobil","staticlink":"statický odkaz","motorcycle":"Motocykl","scooter":"","back_to_map":"Zpět","distance_unit":"Vzdálenosti jsou uváděny v %1$s","waiting_for_gps":"Čekání na signál GPS…","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"da_DK":{"total_ascend":"%1$s samlet stigning","total_descend":"%1$s samlet fald","way_contains_ford":"der er et vadested undervejs","way_contains_ferry":"Rute med færger","way_contains_private":"Rute med private veje","way_contains_toll":"Rute med betalingsveje","way_crosses_border":"Rute der krydser landegrænser","way_contains":"Rute inkluderer %1$s","tracks":"Grusveje uden asfalt","steps":"Trapper","footways":"Fortove","steep_sections":"Stejle sektioner","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"Føreren skal stige af og cyklen skal skubbes %1$s","start_label":"Start","intermediate_label":"Via","end_label":"Mål","set_start":"Sæt som start","set_intermediate":"Sæt via","set_end":"Sæt som mål","center_map":"Centrer kort her","show_coords":"Vis koordinater","query_osm":"","route":"Rute","add_to_route":"Tilføj placering","delete_from_route":"Fjern fra rute","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"Hjælp","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"Eksludér motorvej","limit_speed_example":"Max hastighed","cargo_bike_example":"Ladcykel","prefer_bike_network":"","exclude_area_example":"Eksludér område","combined_example":"Kombinerede eksempler","examples_custom_model":"Eksempler","marker":"Markør","gh_offline_info":"Er GraphHopper API offline?","refresh_button":"Genindlæs siden","server_status":"Status","zoom_in":"Zoom ind","zoom_out":"Zoom ud","drag_to_reorder":"Træk for at ændre rækkefølgen","route_timed_out":"Ruteberegning fejlede","route_request_failed":"Ukendt fejl","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Via","from_hint":"Fra ","gpx_export_button":"Eksportér GPX-fil","gpx_button":"GPX","hide_button":"Gem","details_button":"Detaljer","to_hint":"Til","route_info":"%1$s med køretid %2$s","search_button":"Søg","more_button":"mere","pt_route_info":"ankommer %1$s med %2$s omstigninger (%3$s)","pt_route_info_walking":"ankommer til fods %1$s (%2$s)","locations_not_found":"Kan ikke beregne ruten. Lokation(erne) kan ikke findes i området.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Cykel","racingbike":"Racercykel","mtb":"Mountain bike","car":"Bil","foot":"Gang","hike":"Vandre","small_truck":"Varevogn","bus":"Bus","truck":"Lastbil","staticlink":"statisk link","motorcycle":"Motorcykel","scooter":"","back_to_map":"Tilbage","distance_unit":"Distance er i %1$s","waiting_for_gps":"Venter på GPS signal","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"de_DE":{"total_ascend":"%1$s Gesamtaufstieg","total_descend":"%1$s Gesamtabstieg","way_contains_ford":"Eine Furt muss überquert werden","way_contains_ferry":"Route erfordert Fährennutzung","way_contains_private":"Route mit Privatwegen","way_contains_toll":"Route mit mautpflichtigen Straßen","way_crosses_border":"Route überquert Landesgrenzen","way_contains":"Auf der Route sind %1$s","tracks":"unbefestigte Feldwege","steps":"Treppen","footways":"Fußwege","steep_sections":"sehr steile Passagen","private_sections":"private Abschnitte","trunk_roads_warn":"Route beinhaltet potentiell gefährliche Fernstraßen","get_off_bike_for":"Das Fahrrad muss für %1$s geschoben werden","start_label":"Start","intermediate_label":"Zwischenziel","end_label":"Ziel","set_start":"Von hier","set_intermediate":"Zwischenziel","set_end":"Bis hier","center_map":"Zentriere Karte","show_coords":"Zeige Koordinaten","query_osm":"OSM anfragen","route":"Route","add_to_route":"Ziel hinzufügen","delete_from_route":"Lösche aus Route","open_custom_model_box":"Öffne custom model Kasten","draw_areas_enabled":"Auf der Karte neue Gebiete einzeichnen und verändern","help_custom_model":"Hilfe","apply_custom_model":"Anwenden","custom_model_enabled":"Custom Model aktiv","settings":"Optionen","settings_close":"Schließen","exclude_motorway_example":"Autobahn vermeiden","limit_speed_example":"Max. Geschwindigkeit","cargo_bike_example":"Lastenfahrrad","prefer_bike_network":"Radnetz bevorzugen","exclude_area_example":"Gebiet umfahren","combined_example":"Kombiniertes Bsp","examples_custom_model":"Beispiele","marker":"Marker","gh_offline_info":"Ist die GraphHopper API offline?","refresh_button":"Lade Seite neu","server_status":"Status","zoom_in":"Vergrössern","zoom_out":"Verkleinern","drag_to_reorder":"Zum Ändern der Reihenfolge ziehen","route_timed_out":"Zeitlimit für Routenberechnung überschritten","route_request_failed":"Route konnte nicht berechnet werden","current_location":"Aktueller Standort","searching_location":"Suche Standort","searching_location_failed":"Standortsuche fehlgeschlagen","via_hint":"Über","from_hint":"Von","gpx_export_button":"GPX Export","gpx_button":"GPX","hide_button":"Weniger","details_button":"Details","to_hint":"Nach","route_info":"%1$s werden %2$s brauchen","search_button":"Suche","more_button":"mehr","pt_route_info":"Ankunft %1$s mit %2$s Umstiegen (%3$s)","pt_route_info_walking":"Ankunft zu Fuß %1$s (%2$s)","locations_not_found":"Routing war nicht möglich. Ort(e) nicht gefunden in diesem Gebiet.","search_with_nominatim":"Suche mit Nominatim","powered_by":"Powered by","info":"Info","feedback":"Feedback","imprint":"Impressum","privacy":"Datenschutz","terms":"AGB","bike":"Fahrrad","racingbike":"Rennrad","mtb":"Mountainbike","car":"Auto","foot":"Zu Fuß","hike":"Wandern","small_truck":"Kleintransporter","bus":"Bus","truck":"LKW","staticlink":"Link","motorcycle":"Motorrad","scooter":"Roller","back_to_map":"Zurück","distance_unit":"Distanzen sind in %1$s","waiting_for_gps":"Warten auf das GPS Signal...","elevation":"Höhe","slope":"Gefälle","towerslope":"Kreuzungsgefälle","country":"Land","surface":"Oberfläche","road_environment":"Straßenumgebung","road_access":"Straßenzugang","road_class":"Straßentyp","max_speed":"Maximale Geschwindigkeit","average_speed":"Durchschnittliche Geschwindigkeit","track_type":"Straßenbefestigung","toll":"Maut"},"el":{"total_ascend":"%1$s συνολική ανάβαση","total_descend":"%1$s συνολική κατάβαση","way_contains_ford":"υπάρχει πέρασμα στο δρόμο","way_contains_ferry":"χρησιμοποιήστε το ferry","way_contains_private":"ιδιωτικός δρόμος","way_contains_toll":"δρόμος με διόδια","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Αφετηρία","intermediate_label":"Ενδιάμεσο σημείο","end_label":"Προορισμός","set_start":"Ορισμός αφετηρίας","set_intermediate":"Ορισμός ενδιάμεσου σημείου","set_end":"Ορισμός προορισμού","center_map":"Κεντράρισμα χάρτη εδώ","show_coords":"Εμφάνιση συντεταγμένων","query_osm":"","route":"Διαδρομή","add_to_route":"","delete_from_route":"Αφαίρεση από διαδρομή","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Σημάδι","gh_offline_info":"GraphHopper API offline?","refresh_button":"Ανανέωση σελίδας","server_status":"Κατάσταση","zoom_in":"Μεγέθυνση","zoom_out":"Σμίκρυνση","drag_to_reorder":"Σύρετε για αναδιάταξη","route_timed_out":"Ο υπολογισμός διαδρομής απέτυχε λόγω εξάντλησης χρόνου","route_request_failed":"Ο υπολογισμός διαδρομής απέτυχε","current_location":"Τωρινή τοποθεσία","searching_location":"Αναζήτηση τοποθεσίας","searching_location_failed":"Η αναζήτηση τοποθεσίας απέτυχε","via_hint":"Μέσω","from_hint":"Αφετηρία","gpx_export_button":"Εξαγωγή GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Προορισμός","route_info":"%1$s σε %2$s","search_button":"Αναζήτηση","more_button":"περισσότερα","pt_route_info":"φτάνει στις %1$s με %2$s μεταβιβάσεις (%3$s)","pt_route_info_walking":"φτάνει στις %1$s απλά περπατώντας (%2$s)","locations_not_found":"Η δρομολόγηση δεν είναι δυνατή. Οι τοποθεσίες δεν βρέθηκαν στην περιοχή.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Ποδήλατο","racingbike":"Αγωνιστικό ποδήλατο","mtb":"Ποδήλατο βουνού","car":"Αυτοκίνητο","foot":"Πεζός","hike":"Πεζοπορία","small_truck":"Μικρό φορτηγό","bus":"Λεωφορείο","truck":"Φορτηγό","staticlink":"στατική διεύθυνση","motorcycle":"Μοτοσυκλέτα","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"eo":{"total_ascend":"%1$s supreniro tute","total_descend":"%1$s malsupreniro tute","way_contains_ford":"travadejo sur la kurso","way_contains_ferry":"enpramiĝu","way_contains_private":"privata vojo","way_contains_toll":"pegenda vojo","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Komenco","intermediate_label":"Intercelo","end_label":"Celo!","set_start":"Agordi kiel komencon","set_intermediate":"Agordi kiel intercelon","set_end":"Agordi kiel celon","center_map":"Centrigi mapon ĉi tien","show_coords":"Montri koordinatojn","query_osm":"","route":"Kurso","add_to_route":"","delete_from_route":"Forigi el la kurso","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Marko","gh_offline_info":"Eble GraphHopper-API malfunkcias?","refresh_button":"Aktualigi paĝon","server_status":"Stato","zoom_in":"Pligrandigi","zoom_out":"Malgrandigi","drag_to_reorder":"Trenu por reordigi","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Tra","from_hint":"El","gpx_export_button":"Elporti GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Al","route_info":"%1$s daŭros %2$s","search_button":"Serĉi","more_button":"pli","pt_route_info":"alveno je %1$s kun %2$s transveturiliĝoj (%3$s)","pt_route_info_walking":"alveno je %1$s nur perpiede (%2$s)","locations_not_found":"Vojdifinado ne eblas. Ne trovis loko(j)n en la ĉirkaŭaĵo.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Biciklo","racingbike":"Sporta biciklo","mtb":"Montara biciklo","car":"Aŭto","foot":"Piede","hike":"Marŝade","small_truck":"Eta kamiono","bus":"Aŭtobuso","truck":"Kamiono","staticlink":"konstanta ligilo","motorcycle":"Motorciklo","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"es":{"total_ascend":"Ascender %1$s en total","total_descend":"Descender %1$s en total","way_contains_ford":"hay un vado en el camino","way_contains_ferry":"toma el ferry","way_contains_private":"carretera privada","way_contains_toll":"carretera con peaje","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Punto de partida","intermediate_label":"Punto intermedio","end_label":"Punto de finalización","set_start":"Fijar como partida","set_intermediate":"Fijar como punto intermedio","set_end":"Fijar como finalización","center_map":"Centrar mapa aquí","show_coords":"Mostrar coordenadas","query_osm":"","route":"Ruta","add_to_route":"","delete_from_route":"Borrar punto de ruta","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Marcador","gh_offline_info":"¿API de GraphHopper sin conexión?","refresh_button":"Actualizar página","server_status":"Estado","zoom_in":"Acercar","zoom_out":"Alejar","drag_to_reorder":"Arrastra para cambiar el orden","route_timed_out":"Se ha agotado el tiempo de cálculo de la ruta","route_request_failed":"Solicitud de ruta fallida","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Pasando por","from_hint":"Desde","gpx_export_button":"Exportar GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Hasta","route_info":"%1$s tardará %2$s ","search_button":"Buscar","more_button":"más","pt_route_info":"llega a las %1$s con %2$s transferencias (%3$s)","pt_route_info_walking":"llega sólo caminando a las %1$s (%2$s)","locations_not_found":"No se ha encontrado la ruta. El destino no se encuentra en el área.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicicleta","racingbike":"Bicicleta de carrera","mtb":"Bicicleta de montaña","car":"Automóvil","foot":"A pie","hike":"Senderismo","small_truck":"Camioneta","bus":"Autobús","truck":"Camión","staticlink":"enlace estático","motorcycle":"Motocicleta","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"fa":{"total_ascend":"مجموع صعود %1$s","total_descend":"مجموع نزول %1$s","way_contains_ford":"در طول مسیر گُدار وجود دارد","way_contains_ferry":"این مسیر دارای کشتی است ","way_contains_private":"مسیردارای گذرگاه های شخصی (مالکیت خصوصی)","way_contains_toll":"این مسیر دارای عوارض است","way_crosses_border":"این مسیر از مرز یک کشور عبور میکند","way_contains":"این مسیر دارای %1$s است ","tracks":"هشدار: این مسیر دارای جاده های خاکی و غیر آسفالت است","steps":"پله","footways":"","steep_sections":"هشدار: این مسیر دارای شیب تند رو به بالا و یا رو به پایین است","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"آغاز","intermediate_label":"نقطهٔ میانی","end_label":"پایان","set_start":"انتخاب نقطهٔ آغاز","set_intermediate":"انتخاب نقطهٔ میانی","set_end":"انتخاب نقطهٔ پایان","center_map":"اینجا مرکز نقشه شود","show_coords":"مختصات اینجا","query_osm":"","route":"مسیر","add_to_route":"مقصد جدید را اضافه کنید","delete_from_route":"از مسیر حذف شود","open_custom_model_box":"","draw_areas_enabled":"محدوده را مشخص و یا ویرایش کنید","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"نشانه","gh_offline_info":"گرافهاپر در دسترس نیست؟","refresh_button":"تازهسازی صفحه","server_status":"وضعیت","zoom_in":"بزرگنمایی","zoom_out":"کوچکنمایی","drag_to_reorder":"برای مرتبسازی جابهجا کنید","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"با گذر از","from_hint":"از","gpx_export_button":"دریافت در قالب GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"به","route_info":"%1$s %2$s طول میکشد","search_button":"جستوجو","more_button":"بیشتر","pt_route_info":"با %2$s جابهجایی در ساعت %1$s میرسید (%3$s)","pt_route_info_walking":"ساعت %1$s میرسید، فقط پیاده (%2$s)","locations_not_found":"مسیریابی ممکن نیست. مکان(ها) در ناحیهٔ موردنظر پیدا نشد.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"دوچرخه","racingbike":"دوچرخه کورسی","mtb":"دوچرخه کوهستان","car":"ماشین","foot":"پیادهروی","hike":"پیادهگردی","small_truck":"وانت","bus":"اتوبوس","truck":"کامیون","staticlink":"پیوند ثابت","motorcycle":"موتورسیکلت","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"fil":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"","intermediate_label":"","end_label":"","set_start":"","set_intermediate":"","set_end":"","center_map":"","show_coords":"","query_osm":"","route":"","add_to_route":"","delete_from_route":"","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"","gh_offline_info":"","refresh_button":"","server_status":"","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"","from_hint":"mula sa ","gpx_export_button":"GPX Export","gpx_button":"","hide_button":"","details_button":"","to_hint":"upang sa","route_info":"%1$s ay magdadala sa %2$s","search_button":"Paghahanap","more_button":"mas","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Routing hindi maaari, hindi nahanap Lokasyon sa lugar.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bike","racingbike":"Racing Bike","mtb":"Mountain Bike","car":"kotse","foot":"lumakad","hike":"","small_truck":"","bus":"","truck":"","staticlink":"static link","motorcycle":"motorsiklo","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"fi":{"total_ascend":"nousu yhteensä %1$s","total_descend":"lasku yhteensä %1$s","way_contains_ford":"Huomio, reitillä on kahlaamo","way_contains_ferry":"käytä lauttaa","way_contains_private":"yksityinen tie","way_contains_toll":"maksullinen tie","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Lähtöpaikka","intermediate_label":"Välikohde","end_label":"Päätepiste","set_start":"Merkitse lähtöpaikaksi","set_intermediate":"Merkitse välikohteeksi","set_end":"Merkitse päätepisteeksi","center_map":"Keskitä kartta tähän","show_coords":"Näytä koordinaatit","query_osm":"","route":"Reitti","add_to_route":"","delete_from_route":"Poista reitistä","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Merkki","gh_offline_info":"Ei yhteyttä GraphHopper-palvelimeen","refresh_button":"Päivitä sivu","server_status":"Tilanne","zoom_in":"Lähennä","zoom_out":"Loitonna","drag_to_reorder":"Järjestele vetämällä","route_timed_out":"Reitin laskenan aikaraja ylittyi","route_request_failed":"Reittipyyntö epäonnistui","current_location":"Nykyinen paikka","searching_location":"Paikkaa haetaan","searching_location_failed":"Paikan haku epäonnistui","via_hint":"Reittipiste","from_hint":"Lähtöpaikka","gpx_export_button":"GPX-tuonti","gpx_button":"","hide_button":"","details_button":"","to_hint":"Määränpää","route_info":"%1$s kestää %2$s","search_button":"Etsi","more_button":"lisää","pt_route_info":"saapuu kello %1$s, %2$s vaihtoa (%3$s)","pt_route_info_walking":"saapuu kello %1$s, vain kävely (%3$s)","locations_not_found":"Reittiohjeiden luonti epäonnistui. Paikkaa ei löydy tältä alueelta.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Pyörä","racingbike":"Kilpapyörä","mtb":"Maastopyörä","car":"Auto","foot":"Kävely","hike":"Patikointi","small_truck":"Pieni kuorma-auto","bus":"Linja-auto","truck":"Kuorma-auto","staticlink":"yhteys","motorcycle":"Moottoripyörällä","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"fr_FR":{"total_ascend":"%1$s de dénivelé positif","total_descend":"%1$s de dénivelé négatif","way_contains_ford":"cet itinéraire comprend un passage à gué","way_contains_ferry":"prenez le bateau","way_contains_private":"chemin privé","way_contains_toll":"route à péage","way_crosses_border":"L\'itinéraire traverse une frontière nationale","way_contains":"L\'itinéraire inclut %1$s","tracks":"chemins de terre non pavés","steps":"pas","footways":"chemin pédestre","steep_sections":"section raide","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Départ","intermediate_label":"Point intermédiaire","end_label":"Arrivée","set_start":"Départ de l\'itinéraire ici","set_intermediate":"Ajouter un point intermédiaire","set_end":"Arrivée de l\'itinéraire ici","center_map":"Centrer la carte ici","show_coords":"Afficher les coordonnées","query_osm":"Interroger OSM","route":"Itinéraire","add_to_route":"Ajouter un Emplacement","delete_from_route":"Supprimer ce point de l\'itinéraire","open_custom_model_box":"Ouvrir la boîte du modèle personnalisé","draw_areas_enabled":"","help_custom_model":"Aide","apply_custom_model":"Appliquer","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"Eviter les Autoroutes","limit_speed_example":"Vitesse Limite","cargo_bike_example":"Vélo cargo","prefer_bike_network":"","exclude_area_example":"Exclure Zone","combined_example":"Exemple Combiné","examples_custom_model":"Examples","marker":"Marqueur","gh_offline_info":"GraphHopper API hors connexion?","refresh_button":"Rafraîchir","server_status":"Statut","zoom_in":"Zoom avant","zoom_out":"Zoom arrière","drag_to_reorder":"Faire glisser pour réorganiser","route_timed_out":"Le calcul de l\'itinéraire a expiré","route_request_failed":"Échec du calcul de l\'itinéraire","current_location":"Localisation actuelle","searching_location":"Chercher localisation","searching_location_failed":"Recherche de localisation échouée","via_hint":"Via","from_hint":"De","gpx_export_button":"Export GPX","gpx_button":"GPX","hide_button":"Cacher","details_button":"Détails","to_hint":"À","route_info":"%1$s durera %2$s ","search_button":"Rechercher","more_button":"plus","pt_route_info":"arrivée à %1$s avec %2$s changements (%3$s)","pt_route_info_walking":"arrivée à pied à %1$s (%2$s)","locations_not_found":"Calcul d\'itinéraire impossible. Position(s) non trouvée(s) dans la zone.","search_with_nominatim":"Rechercher avec Nominatim","powered_by":"Alimenté par","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Vélo","racingbike":"Vélo de course","mtb":"VTT","car":"Voiture","foot":"À pied","hike":"Randonnée pédestre","small_truck":"Camionnette","bus":"Bus","truck":"Camion","staticlink":"Lien","motorcycle":"Moto","scooter":"","back_to_map":"Retour","distance_unit":"Les distances sont en %1$s","waiting_for_gps":"En attente du signal GPS...","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"fr_CH":{"total_ascend":"%1$s de dénivelé positif","total_descend":"%1$s de dénivelé négatif","way_contains_ford":"cet itinéraire comprend un passage à gué","way_contains_ferry":"prenez le bateau","way_contains_private":"chemin privé","way_contains_toll":"route à péage","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Départ","intermediate_label":"Point intermédiaire","end_label":"Arrivée","set_start":"Départ de l\'itinéraire ici","set_intermediate":"Ajouter un point intermédiaire","set_end":"Arrivée de l\'itinéraire ici","center_map":"Centrer la carte ici","show_coords":"Afficher les coordonnées","query_osm":"","route":"Itinéraire","add_to_route":"Ajouter un Emplacement","delete_from_route":"Supprimer ce point de l\'itinéraire","open_custom_model_box":"Ouvrir la boîte du modèle personnalisé","draw_areas_enabled":"","help_custom_model":"Aide","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Marqueur","gh_offline_info":"GraphHopper API hors connexion?","refresh_button":"Rafraîchir","server_status":"Statut","zoom_in":"Zoom avant","zoom_out":"Zoom arrière","drag_to_reorder":"Faire glisser pour réorganiser","route_timed_out":"Le calcul de l\'itinéraire a expiré","route_request_failed":"Échec du calcul de l\'itinéraire","current_location":"Localisation actuelle","searching_location":"Chercher localisation","searching_location_failed":"Recherche de localisation échouée","via_hint":"Via","from_hint":"De","gpx_export_button":"Export GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"À","route_info":"%1$s durera %2$s ","search_button":"Rechercher","more_button":"plus","pt_route_info":"arrivée à %1$s avec %2$s changements (%3$s)","pt_route_info_walking":"arrivée à pied à %1$s (%2$s)","locations_not_found":"Calcul d\'itinéraire impossible. Position(s) non trouvée(s) dans la zone.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Vélo","racingbike":"Vélo de course","mtb":"VTT","car":"Voiture","foot":"À pied","hike":"Randonnée pédestre","small_truck":"Camionnette","bus":"Bus","truck":"Camion","staticlink":"Lien","motorcycle":"Moto","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"gl":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"","intermediate_label":"","end_label":"","set_start":"","set_intermediate":"","set_end":"","center_map":"","show_coords":"","query_osm":"","route":"","add_to_route":"","delete_from_route":"","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"","gh_offline_info":"","refresh_button":"","server_status":"","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Vía","from_hint":"dende","gpx_export_button":"GPX Exportación","gpx_button":"","hide_button":"","details_button":"","to_hint":"ata","route_info":"%1$s tardará %2$s","search_button":"buscar","more_button":"máis","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Non se atopou a ruta. O destino non se atopa na área","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicicleta","racingbike":"Bicleta de carreiras","mtb":"Bicicleta de montaña","car":"automóbil","foot":"A pé","hike":"","small_truck":"","bus":"","truck":"","staticlink":"Enlace","motorcycle":"Motocicleta","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"he":{"total_ascend":"עלייה כוללת של %1$s","total_descend":"ירידה כוללת של %1$s","way_contains_ford":"המסלול כולל מעברי מים (גשרים איריים)","way_contains_ferry":"המסלול כולל מעבורות","way_contains_private":"המסלול כולל דרכים פרטיות","way_contains_toll":"המסלול כולל כבישי אגרה","way_crosses_border":"המסלול כולל חציית גבולות בין מדינות","way_contains":"המסלול כולל %1$s","tracks":"דרכי עפר לא סלולות","steps":"מדרגות","footways":"שבילים להולכי רגל","steep_sections":"קטעים תלולים","private_sections":"קטעים פרטיים","trunk_roads_warn":"המסלול כולל דרכי עפר שיכולות להיות מסוכנות ואף גרוע מכך.","get_off_bike_for":"יש לרדת מהאופניים למשך %1$s","start_label":"התחלה","intermediate_label":"נקודת ביניים","end_label":"סוף","set_start":"הגדרה כהתחלה","set_intermediate":"הגדרה כנקודת ביניים","set_end":"הגדרה כסוף","center_map":"למרכז את המפה לכאן","show_coords":"הצגת קואורדינטות","query_osm":"שאילתת OSM","route":"מסלול","add_to_route":"הוספה למסלול","delete_from_route":"מחיקה מהמסלול","open_custom_model_box":"פתיחת חלונית מודל מותאם אישית","draw_areas_enabled":"שירטוט ועריכה של אזורים על המפה","help_custom_model":"עזרה","apply_custom_model":"החל","custom_model_enabled":"מודל מותאם אישית מופעל","settings":"הגדרות","settings_close":"סגירה","exclude_motorway_example":"ללא כבישים מהירים","limit_speed_example":"הגבלת מהירות","cargo_bike_example":"אופני משא","prefer_bike_network":"העדפת מסלולי אופניים","exclude_area_example":"המנעות מאיזור","combined_example":"דוגמה משולבת","examples_custom_model":"דוגמאות","marker":"נעץ","gh_offline_info":" GraphHopper API לא מקוון?","refresh_button":"רענון הדף","server_status":"מצב","zoom_in":"התקרבות","zoom_out":"התרחקות","drag_to_reorder":"יש לגרור כדי לסדר מחדש","route_timed_out":"חישוב המסלול ארך זמן רב מדי","route_request_failed":"בקשת חישוב המסלול נכשלה","current_location":"מיקום נוכחי","searching_location":"חיפוש מיקום","searching_location_failed":"חיפוש המיקום נכשל","via_hint":"נקודת ביניים","from_hint":"מוצא","gpx_export_button":"ייצוא GPX","gpx_button":"GPX","hide_button":"הסתרה","details_button":"פרטים","to_hint":"יעד","route_info":"%1$s ייקחו %2$s","search_button":"חיפוש","more_button":"עוד","pt_route_info":"מגיע ב־%1$s עם %2$s החלפות (%3$s)","pt_route_info_walking":"מגיע ב־%1$s עם הליכה בלבד (%3$s)","locations_not_found":"אין נתיב ישיר אל היעד. המקום/ות לא נמצא/ים באזור.","search_with_nominatim":"חיפוש בעזרת Nominatim","powered_by":"פועל בעזרת","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"אופניים","racingbike":"מסלולי אופניים","mtb":"אופני הרים","car":"מכונית","foot":"רגל","hike":"טיול רגלי","small_truck":"משאית קטנה","bus":"אוטובוס","truck":"משאית","staticlink":"קישור קבוע","motorcycle":"אופנוע","scooter":"","back_to_map":"חזרה","distance_unit":"מרחקים ב%1$s","waiting_for_gps":"המתנה לאות GPS...","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"hr_HR":{"total_ascend":"%1$s ukupni uspon","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Početak","intermediate_label":"Posrednik","end_label":"Kraj","set_start":"Postavi kao početak","set_intermediate":"Postavi kao posrednik","set_end":"Postavi kao kraj","center_map":"Postavi kao centar karte","show_coords":"Prikaži koordinate","query_osm":"","route":"Ruta","add_to_route":"","delete_from_route":"Izbriši iz rute","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Oznaka","gh_offline_info":"GraphHopper API nedostupan","refresh_button":"Osvježi stranicu","server_status":"Status","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Preko","from_hint":"Od","gpx_export_button":"Izvezi kao GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Do","route_info":"%1$s trajat će %2$s","search_button":"Pretraži","more_button":"više","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Rutiranje nije moguće. Lokacije nisu pronađene na ovome području.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicikl","racingbike":"Trkaći motocikl","mtb":"Brdski bicikl","car":"Automobil","foot":"Pješak","hike":"","small_truck":"Mali kamion","bus":"Autobus","truck":"Kamion","staticlink":"statička poveznica","motorcycle":"Motocikl","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"hsb":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"","intermediate_label":"","end_label":"","set_start":"","set_intermediate":"","set_end":"","center_map":"","show_coords":"","query_osm":"","route":"","add_to_route":"","delete_from_route":"","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"","gh_offline_info":"","refresh_button":"","server_status":"","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"přez","from_hint":"wot","gpx_export_button":"eksport do GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"do","route_info":"za %1$s so trjeba %2$s","search_button":"pytaj","more_button":"wjac","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Čara njeje móžna. Městno so w tutej kónčinje njenamaka.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"koleso","racingbike":"wubědźowanske koleso","mtb":"mountainbike","car":"awto","foot":"pěši","hike":"","small_truck":"","bus":"","truck":"","staticlink":"link","motorcycle":"motorske","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"hu_HU":{"total_ascend":"Összes szintemelkedés: %1$s","total_descend":"Összes szintcsökkenés: %1$s","way_contains_ford":"Az útvonalon gázló található","way_contains_ferry":"Az útvonalon kompátkelés található","way_contains_private":"Az útvonalon magánút is található","way_contains_toll":"Az útvonalon útdíjat kell fizetni","way_crosses_border":"Az útvonal országhatárt keresztez","way_contains":"Az útvonalon előfordul %1$s","tracks":"burkolatlan földút","steps":"lépcső","footways":"gyalogút","steep_sections":"meredek szakasz","private_sections":"magánút","trunk_roads_warn":"Az útvonal potenciálisan veszélyes autóutat vagy forgalmasabbat is tartalmaz","get_off_bike_for":"A kerékpárt tolni kell ennyit: %1$s","start_label":"Indulás","intermediate_label":"Köztes célpont","end_label":"Célpont","set_start":"Beállítás kiindulási pontnak","set_intermediate":"Beállítás köztes célpontnak","set_end":"Beállítás célpontnak","center_map":"Beállítás a térkép középpontjának","show_coords":"Pozíció megjelenítése","query_osm":"OSM-lekérdezés","route":"Útvonal","add_to_route":"Hely hozzáadása","delete_from_route":"Eltávolítás az útvonalról","open_custom_model_box":"Egyedi modelldoboz megnyitása","draw_areas_enabled":"Területek rajzolása és módosítása a térképen","help_custom_model":"Súgó","apply_custom_model":"Alkalmazás","custom_model_enabled":"Egyedi modell bekapcsolva","settings":"Beállítások","settings_close":"Bezárás","exclude_motorway_example":"Autópálya nélkül","limit_speed_example":"Sebességkorlátozás","cargo_bike_example":"Viszikli (teherkerékpár)","prefer_bike_network":"Kerékpárutak előnyben részesítése","exclude_area_example":"Terület elkerülése","combined_example":"Kombinált példa","examples_custom_model":"Példák","marker":"Jelölő","gh_offline_info":"Lehet, hogy a GraphHopper API nem érhető el?","refresh_button":"Oldal frissítése","server_status":"Állapot","zoom_in":"Nagyítás","zoom_out":"Kicsinyítés","drag_to_reorder":"Húzza el az átrendezéshez","route_timed_out":"Időtúllépés az útvonaltervezéskor","route_request_failed":"Útvonaltervezés sikertelen","current_location":"Jelenlegi helyzet","searching_location":"Helyzet keresése","searching_location_failed":"A jelenlegi helyzet megtalálása sikertelen","via_hint":"Ezen keresztül","from_hint":"Innen","gpx_export_button":"GPX export","gpx_button":"GPX","hide_button":"Elrejtés","details_button":"Részletek","to_hint":"Ide","route_info":"%1$s ennyi ideig tart: %2$s","search_button":"Keresés","more_button":"tovább","pt_route_info":"érkezés %1$s órakor, %2$s átszállással (%3$s)","pt_route_info_walking":"érkezés %1$s órakor, csak gyalog (%2$s)","locations_not_found":"Útvonaltervezés nem lehetséges. A megadott hely(ek) nem található(k) meg a területen.","search_with_nominatim":"Keresés a Nominatim segítségével","powered_by":"Motor:","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Kerékpár","racingbike":"Versenykerékpár","mtb":"Hegyi kerékpár","car":"Autó","foot":"Gyalogos","hike":"Túrázás","small_truck":"Kisteherautó","bus":"Busz","truck":"Teherautó","staticlink":"Statikus hivatkozás","motorcycle":"Motorkerékpár","scooter":"","back_to_map":"Vissza","distance_unit":"Távolság mértékegysége: %1$s","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"in_ID":{"total_ascend":"naik dengan jarak %1$s","total_descend":"turun dengan jarak %1$s","way_contains_ford":"terdapat jalan untuk dilewati","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Mulai","intermediate_label":"Antara","end_label":"Akhir","set_start":"Atur sebagai titik mulai","set_intermediate":"Atur sebagai titik antara","set_end":"Atur sebagai titik akhir","center_map":"Tengahkan Peta","show_coords":"Tampilkan koordinat","query_osm":"","route":"Rute","add_to_route":"","delete_from_route":"Hapus dari rute","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Titik","gh_offline_info":"Pelayanan API Graphhopper dalam kondisi offline","refresh_button":"Perbarui Halaman","server_status":"Status","zoom_in":"Perbesaran","zoom_out":"Pengecilan","drag_to_reorder":"Drag untuk mengatur urutan","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"melalui","from_hint":"dari","gpx_export_button":"Ekspor GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"ke","route_info":"%1$s berada dalam waktu %2$s","search_button":"pencarian","more_button":"lebih lanjut","pt_route_info":"sampai pada %1$s dengan %2$s jarak (%3$s)","pt_route_info_walking":"sampai pada %1$s dengan berjalan kaki (%2$s)","locations_not_found":"Penentuan rute tidak dapat dilakukan. Lokasi tidak ditemukan","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Sepeda","racingbike":"Sepeda Balap","mtb":"Sepeda Gunung","car":"Mobil","foot":"Jalan Kaki","hike":"Mendaki","small_truck":"Truk Kecil","bus":"Bus","truck":"Truk","staticlink":"Jalur tetap","motorcycle":"Motor","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"it":{"total_ascend":"%1$s di dislivello positivo","total_descend":"%1$s di dislivello negativo","way_contains_ford":"Il percorso include un guado","way_contains_ferry":"Il percorso include traghetti","way_contains_private":"Il percorso include strade private","way_contains_toll":"Il percorso include pedaggi","way_crosses_border":"Il percorso attraversa un confine di stato","way_contains":"Il percorso include %1$s","tracks":"strade sterrate","steps":"Passi","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Partenza","intermediate_label":"Punto intermedio","end_label":"Arrivo","set_start":"Imposta partenza","set_intermediate":"Imposta punto intermedio","set_end":"Imposta arrivo","center_map":"Centra la mappa qui","show_coords":"Mostra coordinate","query_osm":"","route":"Itinerario","add_to_route":"Aggiungi destinazione","delete_from_route":"Elimina dall\'itinerario","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"Aiuto","apply_custom_model":"Applica","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"Escludi autostrada","limit_speed_example":"Limita velocità","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"Escludi area","combined_example":"Esempio combinato","examples_custom_model":"Esempi","marker":"Marker","gh_offline_info":"Servizio GraphHopper non disponibile?","refresh_button":"Ricarica pagina","server_status":"Stato","zoom_in":"Zoom avanti","zoom_out":"Zoom indietro","drag_to_reorder":"Trascina per riordinare","route_timed_out":"Calcolo del percorso fallito","route_request_failed":"Richiesta della posizione fallita","current_location":"Posizione attuale","searching_location":"Ricerca posizione","searching_location_failed":"Ricerca posizione fallita","via_hint":"Attraverso","from_hint":"Da","gpx_export_button":"Esporta GPX","gpx_button":"","hide_button":"Nascondi","details_button":"Dettagli","to_hint":"A","route_info":"%1$s in %2$s","search_button":"Ricerca","more_button":"altro","pt_route_info":"arrivato alle %1$s con %2$s trasferimenti (%3$s)","pt_route_info_walking":"arrivato alle %1$s solo camminando (%2$s)","locations_not_found":"Percorso non calcolabile. Località non trovata(e) nell\'area.","search_with_nominatim":"Cerca con Nominatim","powered_by":"Offerto da","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicicletta","racingbike":"Bici da corsa","mtb":"Mountainbike","car":"Auto","foot":"A piedi","hike":"Scarpinata","small_truck":"Furgone","bus":"Tram","truck":"Camion","staticlink":"permalink","motorcycle":"Moto","scooter":"","back_to_map":"Indietro","distance_unit":"Le distanze sono in %1$s","waiting_for_gps":"Aspettando il segnale GPS...","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"ja":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"","intermediate_label":"","end_label":"","set_start":"","set_intermediate":"","set_end":"","center_map":"","show_coords":"座標を表示","query_osm":"","route":"経路","add_to_route":"","delete_from_route":"経路から取り除く","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"ピン","gh_offline_info":"サーバに接続できませんでした","refresh_button":"更新","server_status":"ステータス","zoom_in":"拡大","zoom_out":"縮小","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"経由","from_hint":"出発地点","gpx_export_button":"GPX形式でエクスポート","gpx_button":"","hide_button":"","details_button":"","to_hint":"目的地点","route_info":"%1$s 所要時間 %2$s","search_button":"検索","more_button":"詳細","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"経路を検索できませんでした.指定の地点が存在しません.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"自転車","racingbike":"レースバイク","mtb":"マウンテンバイク","car":"車","foot":"徒歩","hike":"","small_truck":"","bus":"","truck":"","staticlink":"パーマリンク","motorcycle":"オートバイ","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"ko":{"total_ascend":"오르막길 총 %1$s","total_descend":"내리막길 총 %1$s","way_contains_ford":"경로에 여울이 있습니다","way_contains_ferry":"페리 승선","way_contains_private":"사유 도로","way_contains_toll":"유료 도로","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"출발지","intermediate_label":"경유지","end_label":"도착지","set_start":"출발지로 설정","set_intermediate":"경유지로 설정","set_end":"도착지로 설정","center_map":"여기를 지도의 중심으로 설정","show_coords":"좌표 보기","query_osm":"","route":"경로","add_to_route":"","delete_from_route":"경로에서 삭제","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"핀","gh_offline_info":"GraphHopper API에 연결할 수 없습니다.","refresh_button":"새로고침","server_status":"상태","zoom_in":"확대","zoom_out":"축소","drag_to_reorder":"드래그하여 재정렬","route_timed_out":"경로 탐색 시간 초과","route_request_failed":"경로 탐색 요청 실패","current_location":"현재 위치","searching_location":"위치 탐색","searching_location_failed":"위티 탐색 실패","via_hint":"경유","from_hint":"출발","gpx_export_button":"GPX 내보내기","gpx_button":"","hide_button":"","details_button":"","to_hint":"도착","route_info":"%1$s %2$s 소요","search_button":"탐색","more_button":"더보기","pt_route_info":"%1$s회 환승, %2$s에 도착 (%3$s)","pt_route_info_walking":"도보 이용, %1$s에 도착 (%2$s)","locations_not_found":"경로를 탐색할 수 없습니다. 이 지역에서 위치를 찾을 수 없습니다.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"자전거","racingbike":"경주용 자전거","mtb":"산악자전거","car":"자동차","foot":"도보","hike":"하이킹","small_truck":"소형 트럭","bus":"버스","truck":"트럭","staticlink":"정적 링크","motorcycle":"모터사이클","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"kz":{"total_ascend":"%1$s көтерілу","total_descend":"%1$s төмен түсу","way_contains_ford":"Жолда өткел бар","way_contains_ferry":" паромға отырыңыз","way_contains_private":"жекеменшік жол","way_contains_toll":"жол ақылы","way_crosses_border":"жол ел шекарасын кесіп жатыр","way_contains":"жолда %1$s бар","tracks":"асфальтталмаған қара жолдар","steps":"қадамдар","footways":"жаяу жүргіншілер жолы","steep_sections":"күрделі аялдамалар","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"бастапқы нүкте","intermediate_label":"аралық нүкте","end_label":"соңғы нүкте","set_start":"бастапқы нүктені таңдау","set_intermediate":"аралық нүктені қосу","set_end":"соңғы нүктені таңдау","center_map":"","show_coords":"координаталарды көрсету","query_osm":"","route":"маршрут","add_to_route":"","delete_from_route":"маршруттан жою","open_custom_model_box":"Арнайы модель қорабын ашыңыз","draw_areas_enabled":"","help_custom_model":"көмек","apply_custom_model":"қолдану","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"Автомогистральді алып тастау","limit_speed_example":"шектеулі жылдамдық","cargo_bike_example":"жүк велосипеді","prefer_bike_network":"","exclude_area_example":"Аймақты алып тастау","combined_example":"","examples_custom_model":"мысалдар","marker":"белгі","gh_offline_info":"","refresh_button":"бетті жаңартыңыз","server_status":"жағдайы","zoom_in":"үлкейту","zoom_out":"кішірейту","drag_to_reorder":"Ретін өзгерту үшін жылжытыңыз","route_timed_out":"Маршрутты есептеу уақыты таусылды","route_request_failed":"маршрут сұранысы орындалмады","current_location":"қазіргі орныңыз","searching_location":"орналасқан жерді іздеу","searching_location_failed":"Қазіргі орныңызды іздеу сәтсіз аяқталды","via_hint":"арқылы","from_hint":"Бастауы","gpx_export_button":"GPX Экспорты","gpx_button":"GPX","hide_button":"жасыру","details_button":"толығырақ","to_hint":"дейін","route_info":"%1$s-ге дейін шамамен %2$s уақыт кетеді","search_button":"іздеу","more_button":"тағы","pt_route_info":"%2$s-ден %1$s-ге пересадкамен бару (%3$s)","pt_route_info_walking":"%1$s-ге дейін тек жаяу жүру (%2$s)","locations_not_found":"Маршрут құру мүмкін болмады. Орын анықталмады.","search_with_nominatim":"Nominatim арқылы іздеу","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"велосипед","racingbike":"","mtb":"Таулы велосипед","car":"көлік","foot":"жаяу жүргінші","hike":"","small_truck":"Шағын жүк көлігі","bus":"автобус","truck":"үлкен жүк көлігі","staticlink":"","motorcycle":"мотоцикл","scooter":"","back_to_map":"Қайту","distance_unit":"","waiting_for_gps":"GPS сигналын күтіңіз...","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"lt_LT":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Pradėti","intermediate_label":"","end_label":"Baigti","set_start":"Pasirinkti pradžią čia","set_intermediate":"","set_end":"Pasirinkti pabaigą čia","center_map":"Centruoti žemėlapį čia","show_coords":"Rodyti koordinates","query_osm":"","route":"Maršrutas","add_to_route":"","delete_from_route":"Ištrinti iš maršruto","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Žymeklis","gh_offline_info":"GraphHopper API nepasiekiamas?","refresh_button":"Atnaujinti puslapį","server_status":"Būsena","zoom_in":"Priartinti","zoom_out":"Atitolinti","drag_to_reorder":"Tempkite, kad pakeistumėte eilės tvarką","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Per","from_hint":"Nuo","gpx_export_button":"GPX eksportas","gpx_button":"","hide_button":"","details_button":"","to_hint":"Iki","route_info":"%1$s užtruksite %2$s","search_button":"Ieškoti","more_button":"dar","pt_route_info":"Atvyksta %1$s su %2$s persėdimais (%3$s)","pt_route_info_walking":"Atvyksta %1$s, su ėjimu pėščiomis (%2$s)","locations_not_found":"Neįmanoma sukurti maršruto. Nurodyti taškai nerasti šioje zonoje.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Dviratis","racingbike":"Plentinis dviratis","mtb":"MTB dviratis","car":"Automobilis","foot":"Pėsčiomis","hike":"","small_truck":"Mažas sunkvežimis","bus":"Autobusas","truck":"Sunkvežimis","staticlink":"statinė nuoroda","motorcycle":"Motociklas","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"nb_NO":{"total_ascend":"%1$s totale høydemeter","total_descend":"%1$s total nedkjøring","way_contains_ford":"ruten inneholder vadesteder","way_contains_ferry":"ruten inneholder ferge","way_contains_private":"ruten inneholder privat vei","way_contains_toll":"ruten er avgiftsbelagt","way_crosses_border":"ruten krysser landegrense","way_contains":"ruten inneholder %1$s","tracks":"grusvei","steps":"trapper","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Start","intermediate_label":"delmål","end_label":"Mål","set_start":"Angi som start","set_intermediate":"Angi delmål","set_end":"Angi som mål","center_map":"Sentrer kart","show_coords":"Via koordinater","query_osm":"","route":"Rute","add_to_route":"Legg til","delete_from_route":"Fjern fra ruten","open_custom_model_box":"Åpne tilpasser modellboks","draw_areas_enabled":"","help_custom_model":"Hjelp","apply_custom_model":"Bekreft","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"Unngå motorvei","limit_speed_example":"Begrens hastighet","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"Unngå område","combined_example":"","examples_custom_model":"Eksempler","marker":"Nål","gh_offline_info":"GraphHopper API offline?","refresh_button":"Oppdater side","server_status":"Status","zoom_in":"Zoom inn","zoom_out":"Zoom ut","drag_to_reorder":"Dra for å endre rekkefølge","route_timed_out":"","route_request_failed":"","current_location":"Nåværende plassering","searching_location":"Søker…","searching_location_failed":"Søk feilet","via_hint":"Via","from_hint":"Fra","gpx_export_button":"Eksporter GPX","gpx_button":"GPX","hide_button":"Skjul","details_button":"Detaljer","to_hint":"Til","route_info":"%1$s vil ta %2$s","search_button":"Søk","more_button":"flere","pt_route_info":"ankommer %1$s med %2$s bytter (%3$s)","pt_route_info_walking":"ankommer %1$s ved å gå (%2$s)","locations_not_found":"Ruteplanlegging mislykket. Destinasjon(ene) ikke funnet i valgt område","search_with_nominatim":"Søk med Nominatim","powered_by":"Powered by","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Sykkel","racingbike":"Landeveisykkel","mtb":"Mountain bike","car":"Bil","foot":"Gange","hike":"Vandring","small_truck":"Lett lastebil","bus":"Buss","truck":"Lastebil","staticlink":"lenke","motorcycle":"Motorsykkel","scooter":"","back_to_map":"Tilbake","distance_unit":"Avstand måles i %1$s","waiting_for_gps":"Venter på GPS-signal","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"ne":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"","intermediate_label":"","end_label":"","set_start":"","set_intermediate":"","set_end":"","center_map":"","show_coords":"","query_osm":"","route":"","add_to_route":"","delete_from_route":"","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"","gh_offline_info":"","refresh_button":"","server_status":"","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"बाट","from_hint":"सुरु ","gpx_export_button":"GPX मा परिबर्तन गर्नुहोस","gpx_button":"","hide_button":"","details_button":"","to_hint":"अन्त्य","route_info":"%1$s को लागि %2$s लाग्नेछ","search_button":"खोज ","more_button":"अझै","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"ठाउँ नभेटीनाले बाटो पत्ता लगाउन सकिएन","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"बाईक ","racingbike":"छिटो गतिका बाईक","mtb":"माउन्टेन बाईक","car":"गाडी","foot":"पैदल","hike":"","small_truck":"","bus":"","truck":"","staticlink":"ईस्ट्यातिक लिंक","motorcycle":"मोटरसाइकल ","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"nl":{"total_ascend":"%1$s totale klim","total_descend":"%1$s totale daling","way_contains_ford":"Er is een doorwaadbare plaats","way_contains_ferry":"route met veerponten","way_contains_private":"route met privé wegen","way_contains_toll":"route met tolwegen","way_crosses_border":"route met grensovergangen","way_contains":"route bevat %1$s","tracks":"route bevat onverharde wegen","steps":"trappen","footways":"voetpaden","steep_sections":"route bevat stijle hellingen","private_sections":"privé gedeelten","trunk_roads_warn":"Route bevat mogelijk gevaarlijke stukken","get_off_bike_for":"stap af en duw voor %1$s","start_label":"Start","intermediate_label":"Tussenstop","end_label":"Einde","set_start":"Stel in als startpunt","set_intermediate":"Stel in als tussenstop","set_end":"Stel in als einde","center_map":"Centreer de kaart hier","show_coords":"Laat coordinaten zien","query_osm":"Query OSM","route":"Route","add_to_route":"voeg locatie toe","delete_from_route":"Van route verwijderen","open_custom_model_box":"Open op maat gemaakte box","draw_areas_enabled":"Teken en verander gebied op de kaart","help_custom_model":"Help","apply_custom_model":"Activeer","custom_model_enabled":"","settings":"Instellingen","settings_close":"Sluit","exclude_motorway_example":"Vermijd snelweg","limit_speed_example":"Max snelheid","cargo_bike_example":"Bestel fiets","prefer_bike_network":"Prefereer fiets routes","exclude_area_example":"Exclusief gebied","combined_example":"Samengesteld voorbeeld","examples_custom_model":"Voorbeeld","marker":"Pin","gh_offline_info":"GrabHopper API offline?","refresh_button":"Ververs pagina","server_status":"Status","zoom_in":"Zoom in","zoom_out":"Zoom uit","drag_to_reorder":"Slepen om opnieuw te organiseren","route_timed_out":"server berekening time out","route_request_failed":"Aanvraag mislukt","current_location":"huidige locatie","searching_location":"zoek locatie","searching_location_failed":"locatie zoeken mislukt","via_hint":"via","from_hint":"van","gpx_export_button":"GPX export","gpx_button":"GPX export te groot","hide_button":"verberg","details_button":"details","to_hint":"naar","route_info":"%1$s duurt %2$s","search_button":"zoek","more_button":"meer","pt_route_info":"aankomst om %1$s met %2$s overstappen (%3$s)","pt_route_info_walking":"aankomst om %1$s te voet (%2$s)","locations_not_found":"Route niet mogelijk. Locatie(s) niet gevonden.","search_with_nominatim":"","powered_by":"Powered by","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"fiets","racingbike":"racefiets","mtb":"mountainbike","car":"auto","foot":"te voet","hike":"wandelen","small_truck":"bestelbus","bus":"bus","truck":"vrachtwagen","staticlink":"statische link","motorcycle":"motorfiets","scooter":"","back_to_map":"Terug","distance_unit":"Afstanden zijn in %1$s","waiting_for_gps":"Wacht op GPS signaal","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"pl_PL":{"total_ascend":"%1$s w górę","total_descend":"%1$s w dół","way_contains_ford":"Trasa przez brody","way_contains_ferry":"Trasa obejmuje promy","way_contains_private":"Trasa przez prywatne drogi","way_contains_toll":"Trasa jest płatna","way_crosses_border":"Trasa przebiega przez granicę państwową","way_contains":"Trasa przez %1$s","tracks":"nieutwardzone drogi gruntowe","steps":"schody","footways":"chodniki","steep_sections":"strome fragmenty","private_sections":"tereny prywatne","trunk_roads_warn":"","get_off_bike_for":"piechotą przez %1$s","start_label":"Początek","intermediate_label":"Punkt pośredni","end_label":"Cel","set_start":"Ustaw jako początek","set_intermediate":"Ustaw jako punkt pośredni","set_end":"Ustaw jako cel","center_map":"Centruj mapę tutaj","show_coords":"Pokaż współrzędne","query_osm":"Wyświetl dane obiektów na OSM","route":"Trasa","add_to_route":"Dodaj punkt pośredni","delete_from_route":"Usuń z trasy","open_custom_model_box":"Otwórz okienko modelu niestandardowego","draw_areas_enabled":"Rysuj i zmieniaj obszar na mapie","help_custom_model":"Pomoc","apply_custom_model":"Zastosuj","custom_model_enabled":"","settings":"Ustawienia","settings_close":"Zamknij","exclude_motorway_example":"Pomijaj autostrady","limit_speed_example":"Ogranicz prędkość","cargo_bike_example":"Rower towarowy","prefer_bike_network":"Preferuj ścieżki rowerowe","exclude_area_example":"Wyklucz obszar","combined_example":"Przykład łączony","examples_custom_model":"Przykłady","marker":"Znacznik","gh_offline_info":"GraphHopper API nie działa?","refresh_button":"Odśwież stronę","server_status":"Stan","zoom_in":"Przybliż","zoom_out":"Oddal","drag_to_reorder":"Przeciągnij, aby przestawić","route_timed_out":"Przekroczono limit czasu","route_request_failed":"Wyznaczenie trasy nie powiodło się","current_location":"Moja geolokalizacja","searching_location":"Wyszukiwanie...","searching_location_failed":"Nie udało się wyszukać lokalizacji","via_hint":"Przez","from_hint":"Z","gpx_export_button":"Eksportuj GPX","gpx_button":"GPX","hide_button":"Ukryj","details_button":"Szczegóły","to_hint":"Do","route_info":"%1$s zajmie %2$s","search_button":"Szukaj","more_button":"więcej","pt_route_info":"przybycie o %1$s z %2$s przesiadkami (%3$s)","pt_route_info_walking":"przybycie o %1$s pieszo (%2$s)","locations_not_found":"Nie można wyznaczyć trasy. Nie znaleziono lokalizacji.","search_with_nominatim":"Szukaj z Nominatimem","powered_by":"Dostarczony przez","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Rower","racingbike":"Rower wyścigowy","mtb":"Rower górski","car":"Samochód","foot":"Pieszo","hike":"Szlakiem turystycznym","small_truck":"Mała ciężarówka","bus":"Autobus","truck":"Ciężarówka","staticlink":"link","motorcycle":"Motocykl","scooter":"","back_to_map":"Wróć","distance_unit":"Odległości w %1$s","waiting_for_gps":"Oczekiwanie na sygnał GPS...","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"pt_BR":{"total_ascend":"subida de %1$s","total_descend":"descida de %1$s","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Início","intermediate_label":"Intermediário","end_label":"Fim","set_start":"Definir como início","set_intermediate":"Definir como intermediário","set_end":"Definir como fim","center_map":"Centralizar o mapa aqui","show_coords":"Mostrar coordenadas","query_osm":"","route":"Rota","add_to_route":"","delete_from_route":"Remover da rota","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Marca","gh_offline_info":"API do GraphHopper offline?","refresh_button":"Recarregar página","server_status":"Status","zoom_in":"Ampliar","zoom_out":"Reduzir zoom","drag_to_reorder":"Arraste para reordenar","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Via","from_hint":"De","gpx_export_button":"Exportar GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Para","route_info":"%1$s levará %2$s","search_button":"Pesquisar","more_button":"mais","pt_route_info":"chega às %1$s com %2$s trocas (%3$s)","pt_route_info_walking":"chega às %1$s caminhando (%2$s)","locations_not_found":"Rota inviável. Localização(ões) não encontrada(s) na área.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicicleta","racingbike":"Bicicleta de corrida","mtb":"Mountainbike","car":"Carro","foot":"A pé","hike":"Caminhada","small_truck":"Caminhão pequeno","bus":"Ônibus","truck":"Caminhão","staticlink":"Link estático","motorcycle":"Motocicleta","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"pt_PT":{"total_ascend":"subida de %1$s","total_descend":"descida de %1$s","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"","intermediate_label":"","end_label":"","set_start":"","set_intermediate":"","set_end":"","center_map":"","show_coords":"Mostrar coordenadas","query_osm":"","route":"","add_to_route":"","delete_from_route":"","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"","gh_offline_info":"","refresh_button":"","server_status":"","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Por","from_hint":"De","gpx_export_button":"Exportar GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Para","route_info":"%1$s irá demorar %2$s","search_button":"Pesquisar","more_button":"mais","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Roteamento impossível. Localização(ões) não encontrada(s) na área.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicicleta","racingbike":"Bicicleta de corrida","mtb":"Bicicleta de montanha","car":"Carro","foot":"A pé","hike":"Caminhada","small_truck":"Camião pequeno","bus":"Autocarro","truck":"Camião","staticlink":"Ligação permanente","motorcycle":"Motocicleta","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"ro":{"total_ascend":"urcare %1$s","total_descend":"coborâre %1$s","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Pornire","intermediate_label":"Intermediar","end_label":"Sfârșit","set_start":"Selectează ca punct de pornire","set_intermediate":"Selectează ca punct intermediar","set_end":"Selectează ca punct de sosire","center_map":"Centrează harta aici","show_coords":"Arată coordonatele","query_osm":"","route":"Intinerariu","add_to_route":"","delete_from_route":"Șterge din intinerariu","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Punct de interes","gh_offline_info":"Serverul GraphHopper API este disponibil?","refresh_button":"Reîmprospătează pagina","server_status":"Disponibilitate","zoom_in":"Mărește","zoom_out":"Micșorează","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Prin","from_hint":"De la","gpx_export_button":"Exportă GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"La","route_info":"%1$s durează %2$s","search_button":"Caută","more_button":"mai mult","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Traseul nu este posibil. Locul(locurile) nu pot fi găsite în zonă.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"bicicletă","racingbike":"bicicletă de curse","mtb":"Mountainbike","car":"mașină","foot":"pe jos","hike":"Drumeție","small_truck":"Camionetă","bus":"Autobuz","truck":"Camion","staticlink":"link","motorcycle":"Motocicletă","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"ru":{"total_ascend":"подъём на %1$s","total_descend":"спуск на %1$s","way_contains_ford":"На пути есть брод","way_contains_ferry":"садитесь на паром","way_contains_private":"частная дорога","way_contains_toll":"платная дорога","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Начало","intermediate_label":"Промежуточная точка","end_label":"Конец","set_start":"Установить начало здесь","set_intermediate":"Установить промежуточной точкой","set_end":"Установить конец здесь","center_map":"Сдвинуть карту сюда ","show_coords":"Показать координаты ","query_osm":"","route":"Маршрут","add_to_route":"","delete_from_route":"Удалить из маршрута","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Значок","gh_offline_info":"GraphHopper API недоступен?","refresh_button":"Обновить страницу","server_status":"Статус сервера","zoom_in":"Приблизить ","zoom_out":"Отдалить","drag_to_reorder":"Переместите путевую точку","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Через","from_hint":"От","gpx_export_button":"Экспорт GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"До","route_info":"%1$s займет %2$s","search_button":"Поиск","more_button":"еще","pt_route_info":"Прибытие в %1$s с %2$s пересадками (%3$s)","pt_route_info_walking":"Прибытие в %1$s пешком (%2$s) ","locations_not_found":"Построить маршрут невозможно. Не определено местоположение.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Велосипед","racingbike":"Гоночный велосипед","mtb":"Горный велосипед","car":"Автомобиль","foot":"Пешком","hike":"Пеший туризм","small_truck":"Лёгкий грузовик","bus":"Автобус","truck":"Грузовой автомобиль","staticlink":"Постоянная ссылка","motorcycle":"Мотоцикл","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"sk":{"total_ascend":"%1$s celkové stúpanie","total_descend":"%1$s celkové klesanie","way_contains_ford":"popri ceste sa nachádza brod","way_contains_ferry":"","way_contains_private":"Trasa obsahuje súkromné cesty.","way_contains_toll":"Trasa obsahuje spoplatnené úseky.","way_crosses_border":"Trasa križuje štátnu hranicu.","way_contains":"Trasa obsahuje %1$s","tracks":"nespevnené cesty","steps":"schody","footways":"chodníky","steep_sections":"úseky s prudkým stúpaním","private_sections":"súkromné úseky","trunk_roads_warn":"","get_off_bike_for":"Je potrebné zosadnúť z bicykla a %1$s ho tlačiť","start_label":"Začiatok","intermediate_label":"Bod trasy","end_label":"Koniec","set_start":"Nastaviť ako začiatok","set_intermediate":"Nastaviť ako bod trasy","set_end":"Nastaviť ako koniec","center_map":"Vycentrovať mapu sem","show_coords":"Zobraziť súradnice","query_osm":"Požiadavka na OSM","route":"Trasa","add_to_route":"Pridať umiestnenie","delete_from_route":"Odstrániť z trasy","open_custom_model_box":"","draw_areas_enabled":"Kresliť a meniť oblasti na mape","help_custom_model":"Pomocník","apply_custom_model":"Použiť","custom_model_enabled":"Je aktívny vlastný model","settings":"Nastavenia","settings_close":"Zavrieť","exclude_motorway_example":"Vynechať diaľnice","limit_speed_example":"Limit rýchlosti","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"Vynechať oblasť","combined_example":"","examples_custom_model":"Príklady","marker":"Značka","gh_offline_info":"GraphHopper API bez pripojenia?","refresh_button":"Obnoviť stránku","server_status":"Stav","zoom_in":"Priblížiť","zoom_out":"Oddialiť","drag_to_reorder":"Ťahaj pre zmenu poradia","route_timed_out":"","route_request_failed":"","current_location":"Aktuálna pozícia","searching_location":"Hľadám pozíciu","searching_location_failed":"Pozícia sa nepodarila nájsť","via_hint":"Cez","from_hint":"Odkiaľ","gpx_export_button":"Export do GPX","gpx_button":"GPX","hide_button":"Skryť","details_button":"Podrobnosti","to_hint":"Kam","route_info":"%1$s zaberie %2$s","search_button":"Vyhľadať","more_button":"viac","pt_route_info":"dorazí o %1$s, %2$s prestup(y) (%3$s)","pt_route_info_walking":"príchod o %1$s iba chôdzou (%2$s)","locations_not_found":"Navigovanie nie je možné. Umiestnenie nebolo nájdené v oblasti.","search_with_nominatim":"Hľadať pomocou Nominatim-u","powered_by":"Beží na","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicykel","racingbike":"Cestný bicykel","mtb":"Horský bicykel","car":"Automobil","foot":"Pešo","hike":"Túra","small_truck":"Dodávka","bus":"Autobus","truck":"Kamión","staticlink":"nemenný odkaz","motorcycle":"Motocykel","scooter":"","back_to_map":"Späť","distance_unit":"Vzdialenosti sú v %1$s","waiting_for_gps":"Čakám na GPS signál...","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"sl_SI":{"total_ascend":"Skupni vzpon: %1$s","total_descend":"Skupni spust: %1$s","way_contains_ford":"Na poti je pregaz","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Začetna točka","intermediate_label":"Vmesna točka","end_label":"Končna točka","set_start":"Nastavi kot začetno točko","set_intermediate":"Nastavi kot vmesno točko","set_end":"Nastavi kot končno točko","center_map":"Premakni na sredino","show_coords":"Prikaži koordinate","query_osm":"","route":"Pot","add_to_route":"","delete_from_route":"Izbriši iz poti","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Oznaka","gh_offline_info":"Je API GraphHopper morda izklopljen?","refresh_button":"Osveži stran","server_status":"Stanje","zoom_in":"Povečaj","zoom_out":"Pomanjšaj","drag_to_reorder":"Povlecite za spremembo vrstnega reda","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Preko","from_hint":"Od ","gpx_export_button":"Izvozi GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Do","route_info":"%1$s bo trajalo %2$s","search_button":"Išči","more_button":"več","pt_route_info":"prispe ob %1$s s/z %2$s-imi prestopi (%3$s)","pt_route_info_walking":"prispe ob %1$s s samo hojo (%3$s)","locations_not_found":"Usmerjanje ni mogoče. Lokacije ni bilo mogoče najti na tem območju.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Kolo","racingbike":"Cestno kolo","mtb":"Gorsko kolo","car":"Avto","foot":"Hoja","hike":"Pohodništvo","small_truck":"Majhen tovornjak","bus":"Avtobus","truck":"Tovornjak","staticlink":"Povezava","motorcycle":"Motorno kolo","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"sr_RS":{"total_ascend":"%1$s ukupni uspon","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Početak","intermediate_label":"Prelazni","end_label":"Kraj","set_start":"Postavi kao početak","set_intermediate":"Postavi kao prelazni","set_end":"Postavi kao kraj","center_map":"Postavi kao centar karte","show_coords":"Prikaži koordinate","query_osm":"","route":"Ruta","add_to_route":"","delete_from_route":"Izbriši iz rute","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Oznaka","gh_offline_info":"GraphHopper API nedostupan","refresh_button":"Osveži stranicu","server_status":"Status","zoom_in":"","zoom_out":"","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Preko","from_hint":"Od","gpx_export_button":"Izvezi kao GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Do","route_info":"%1$s trajaće %2$s","search_button":"Pretraži","more_button":"više","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Rutiranje nije moguće. Lokacije nisu pronađene na ovome području.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bicikl","racingbike":"Trkački motocikl","mtb":"Brdski bicikl","car":"Automobil","foot":"Pešak","hike":"","small_truck":"Mali kamion","bus":"Autobus","truck":"Kamion","staticlink":"statička veza","motorcycle":"Motocikl","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"sv_SE":{"total_ascend":"%1$s stigning","total_descend":"%1$s nedstigning","way_contains_ford":"Observera att det finns ett vadställe längs rutten","way_contains_ferry":"Ta färjan","way_contains_private":"Privat väg","way_contains_toll":"Avgiftsbelagd väg","way_crosses_border":"","way_contains":"Rutten inkluderar %1$s","tracks":"","steps":"steg","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Start","intermediate_label":"delmål","end_label":"mål","set_start":"Ange som start","set_intermediate":"ange delmål","set_end":"Ange som mål","center_map":"Centrera kartan här","show_coords":"Visa koordinater","query_osm":"","route":"Rutt","add_to_route":"Lägg till plats","delete_from_route":"Ta bort från rutt","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"Hjälp","apply_custom_model":"Applicera","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"Exempel","marker":"Markör","gh_offline_info":"GrabHopper API offline?","refresh_button":"Ladda om sida","server_status":"Status","zoom_in":"Zooma in","zoom_out":"Zooma ut","drag_to_reorder":"Dra för att ändra ordning","route_timed_out":"","route_request_failed":"","current_location":"Nuvarande plats","searching_location":"Söker plats","searching_location_failed":"","via_hint":"Via","from_hint":"Från","gpx_export_button":"exportera GPX-fil","gpx_button":"GPX","hide_button":"Göm","details_button":"Detaljer","to_hint":"Till","route_info":"%1$s med körtid %2$s","search_button":"Sök","more_button":"fler","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"Kan inte beräkna rutt. Platsen eller platserna kan inte hittas i området.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Cykel","racingbike":"Tävlingscykel","mtb":"Mountain bike","car":"Bil","foot":"Gång","hike":"Vandra","small_truck":"lätt lastbil","bus":"Buss","truck":"Lastbil","staticlink":"direktlänk","motorcycle":"Motorcykel","scooter":"","back_to_map":"Backa","distance_unit":"Avstånden är i %1$s","waiting_for_gps":"Väntar på GPS signal...","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"tr":{"total_ascend":"%1$s toplam tırmanış","total_descend":"%1$s toplam alçalış","way_contains_ford":"Dikkat, yolda bir sığ yer var","way_contains_ferry":"feribota binin","way_contains_private":"özel yol ","way_contains_toll":"Ücretli yol","way_crosses_border":"Rota ülke sınırından geçmektedir","way_contains":"Rota %1$s içermektedir","tracks":"Asfaltsız toprak yol","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Başlangıç","intermediate_label":"Ara nokta","end_label":"Son","set_start":"Başlangıç olarak ayarla","set_intermediate":"Ara nokta olarak ayarla","set_end":"Bitiş olarak ayarla","center_map":"Haritayı buraya ortala","show_coords":"Koordinatları göster","query_osm":"","route":"Rota","add_to_route":"Konum ekle","delete_from_route":"Rotadan kaldır","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"Yardım","apply_custom_model":"Uygula","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"Hız limiti","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"Örnekler","marker":"İşaretler","gh_offline_info":"GraphHopper arayüzüne ulaşılamıyor","refresh_button":"Sayfayı yinele","server_status":"Durum","zoom_in":"Yakınlaştır","zoom_out":"Uzaklaştır ","drag_to_reorder":"Yeniden sıralamak için sürükle bırak","route_timed_out":"Rota planlaması zaman aşımına uğradı","route_request_failed":"Rota oluşturulamadı","current_location":"Mevcut konum","searching_location":"Konum aranıyor","searching_location_failed":"Konum bulunamadı","via_hint":"Yoluyla","from_hint":"Şuradan","gpx_export_button":"GPX dışa aktar","gpx_button":"GPX","hide_button":"Gizle","details_button":"Ayrıntılar","to_hint":"Yönüne","route_info":"%1$s alacak %2$s","search_button":"Ara","more_button":"daha fazlası","pt_route_info":"%2$s aktarma ile varış saati %1$s (%3$s)","pt_route_info_walking":"yürüyerek varış saati %1$s (%2$s)","locations_not_found":"Rota oluşturulamadı. Bölgedeki yer(ler) bulunamadı.","search_with_nominatim":"Nominatim ile ara","powered_by":"... tarafından desteklenmektedir","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Bisiklet","racingbike":"Yarış Bisikleti","mtb":"Dağ Bisikleti","car":"Otomobil","foot":"Yürüyerek","hike":"Doğa yürüyüşü","small_truck":"Kamyonet","bus":"Otobüs","truck":"Kamyon","staticlink":"kalıcı bağlantı","motorcycle":"motosiklet","scooter":"","back_to_map":"geri","distance_unit":"Mesafe birimi %1$s","waiting_for_gps":"GPS sinyali bekleniyor","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"uk":{"total_ascend":"%1$s загалом підйому","total_descend":"%1$s загалом спуску","way_contains_ford":"На шляху є брід","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Початок","intermediate_label":"Проміжна точка","end_label":"Кінець","set_start":"Встановити початок","set_intermediate":"Додати проміжну точку","set_end":"Встановити кінець","center_map":"Відцентрувати мапу тут","show_coords":"Показати координати","query_osm":"","route":"Маршрут","add_to_route":"","delete_from_route":"Вилучити з маршруту","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Значок","gh_offline_info":"GraphHopper API в офлайн режимі?","refresh_button":"Оновити сторінку","server_status":"Стан","zoom_in":"Наблизити","zoom_out":"Віддалити","drag_to_reorder":"Перемістіть шляхову точку","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"через","from_hint":"Від","gpx_export_button":"Експорт в GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"До","route_info":"%1$s займе %2$s","search_button":"Пошук","more_button":"ще","pt_route_info":"Прибуття до %1$s з %2$s пересадками (%3$s)","pt_route_info_walking":"Прибуття до %1$s пішки (%2$s) ","locations_not_found":"Побудова маршруту неможлива. Місцезнаходження не визначено.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Велосипед","racingbike":"Шосейний велосипед","mtb":"Гірський велосипед","car":"Автомобіль","foot":"Пішки","hike":"Пішохідний туризм","small_truck":"Мала вантажівка","bus":"Автобус","truck":"Велика вантажівка","staticlink":"статичне посилання","motorcycle":"Мотоцикл","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"vi_VN":{"total_ascend":"%1$s ga ko\'tarilish ","total_descend":"%1$s ga tushish ","way_contains_ford":"Yo\'lda ford bor","way_contains_ferry":"paromga o\'tiring ","way_contains_private":"xususiy yo\'l ","way_contains_toll":"pullik yo\'l ","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Boshlanish","intermediate_label":"Oraliq nuqta","end_label":"Tamom","set_start":"Boshlash nuqtasi deb belgilash","set_intermediate":"Oraliq nuqtasi deb belgilash","set_end":"Yakunlash nuqtasi deb belgilash","center_map":"Xaritani shu yerga siljitish ","show_coords":"Kordinatalarni ko\'rsatish ","query_osm":"","route":"Marshrut","add_to_route":"","delete_from_route":"Marshrutdan o\'chirish","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Belgi","gh_offline_info":"GraphHopper API mavjud emasmi?","refresh_button":"Sahifani yangilash","server_status":"Server holati ","zoom_in":"Yaqinlashtirish","zoom_out":"Uzoqlashtirish","drag_to_reorder":"Yoʻnalish nuqtasini koʻchirish","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"orqali","from_hint":"dan","gpx_export_button":"GPX yuklab olish","gpx_button":"","hide_button":"","details_button":"","to_hint":"gacha","route_info":"%1$s %2$s oladi","search_button":"Qidiruv","more_button":"yana","pt_route_info":"","pt_route_info_walking":"%1$s ga piyoda yetib kelish (%2$s)","locations_not_found":"Marshrut qurish imkonsiz. Joylashuvingiz aniqlanmadi","search_with_nominatim":"Nominatim orqali qidirish ","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Velosiped ","racingbike":"Poyga velosipedi","mtb":"Tog\' velosipedi","car":"Avtoulov","foot":"Piyoda","hike":"Piyoda turizmi","small_truck":"Yengil yuk mashinasi","bus":"Avtobus","truck":"Yuk mashinasi","staticlink":"Doimiy havola","motorcycle":"Mototsikl","scooter":"","back_to_map":"Xaritaga qaytish","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"zh_CN":{"total_ascend":"Đi tiếp %1$s nữa","total_descend":"Tổng số hạ %1$s ","way_contains_ford":"Chú ý, có khúc sông cạn trên đường","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"đường thu phí","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"Điểm bắt đầu","intermediate_label":"Điểm trung gian","end_label":"Điểm kết thúc","set_start":"Chọn điểm bắt đầu","set_intermediate":"Chọn điểm trung gian","set_end":"Chọn điểm kết thúc","center_map":"Trung tâm bản đồ","show_coords":"Xem tọa độ","query_osm":"","route":"Lộ trình","add_to_route":"","delete_from_route":"Xóa khỏi tuyến đường","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"Đánh dấu","gh_offline_info":"Mất kết nối với GH API","refresh_button":"Làm mới lại trang","server_status":"Tình trạng Server","zoom_in":"Phóng to","zoom_out":"Thu nhỏ","drag_to_reorder":"Kéo để sắp xếp lại","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Qua","from_hint":"Từ","gpx_export_button":"Xuất GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Đến","route_info":"%1$s mất %2$s","search_button":"Tìm","more_button":"thêm","pt_route_info":"Đến lúc %1$s với %2$s phương tiện(tuyến) (%3$s )","pt_route_info_walking":"Đến lúc %1$s chỉ bằng cách đi bộ (%2$s)","locations_not_found":"Không tìm thấy lộ trình! Các điểm đã chọn không tìm thấy trong vùng này.","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"Xe đạp","racingbike":"Xe đạp đua","mtb":"Xe leo núi","car":"Ô tô","foot":"Đi bộ","hike":"Đi bộ đường dài","small_truck":"Xe tải nhỏ","bus":"Xe buýt","truck":"Xe tải","staticlink":"liên kết tĩnh","motorcycle":"Mô tô","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"zh_HK":{"total_ascend":"总上升 %1$s","total_descend":"总下降 %1$s","way_contains_ford":"路径中包含河滩","way_contains_ferry":"路径中包含轮渡","way_contains_private":"路径中包含私有道路","way_contains_toll":"路径中包含收费路段","way_crosses_border":"路径中跨越了国界","way_contains":"路径中包含%1$s","tracks":"未铺设的土路","steps":"台阶","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"起点","intermediate_label":"途经点","end_label":"终点","set_start":"设置为起点","set_intermediate":"设置为途经点","set_end":"设置为终点","center_map":"地图居中到这里","show_coords":"显示坐标","query_osm":"查询 OSM","route":"路线","add_to_route":"增加位置","delete_from_route":"从线路中移除","open_custom_model_box":"打开自定义模型选项","draw_areas_enabled":"","help_custom_model":"帮助","apply_custom_model":"应用","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"排除高速公路","limit_speed_example":"限速","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"排除区域","combined_example":"综合范例","examples_custom_model":"范例","marker":"标记","gh_offline_info":"无法连接 GraphHopper API","refresh_button":"刷新网页","server_status":"状态","zoom_in":"放大","zoom_out":"缩小","drag_to_reorder":"拖动可重新排序","route_timed_out":"导航计算超时","route_request_failed":"导航请求失败","current_location":"当前位置","searching_location":"正在搜索位置","searching_location_failed":"搜索位置失败","via_hint":"途经点","from_hint":"起点","gpx_export_button":"GPX 格式导出","gpx_button":"GPX","hide_button":"隐藏","details_button":"详情","to_hint":"终点","route_info":"%1$s 的路线,需要 %2$s","search_button":"搜索","more_button":"更多","pt_route_info":"换乘 %2$s 次,在 %1$s 到达 (%3$s)","pt_route_info_walking":"仅需步行,在 %1$s 到达 (%2$s)","locations_not_found":"无法导航,因为地点未找到。","search_with_nominatim":"用 Nominatim 搜索","powered_by":"Powered by","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"自行车","racingbike":"竞技自行车","mtb":"山地自行车","car":"驾车","foot":"步行","hike":"徒步","small_truck":"小货车","bus":"公交车","truck":"卡车","staticlink":"永久链接","motorcycle":"摩托车","scooter":"","back_to_map":"返回","distance_unit":"距离单位:%1$s","waiting_for_gps":"正在搜索 GPS 信号……","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""},"zh_TW":{"total_ascend":"總共上昇 %1$s","total_descend":"總共下降 %1$s","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","footways":"","steep_sections":"","private_sections":"","trunk_roads_warn":"","get_off_bike_for":"","start_label":"起點","intermediate_label":"途經點","end_label":"目的地","set_start":"設置為起點","set_intermediate":"設置為途經點","set_end":"設置為目的地","center_map":"","show_coords":"顯示坐標","query_osm":"","route":"路線","add_to_route":"","delete_from_route":"從路線移除","open_custom_model_box":"","draw_areas_enabled":"","help_custom_model":"","apply_custom_model":"","custom_model_enabled":"","settings":"","settings_close":"","exclude_motorway_example":"","limit_speed_example":"","cargo_bike_example":"","prefer_bike_network":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"標記","gh_offline_info":"無法連接 GraphHopper API","refresh_button":"刷新網頁","server_status":"狀況","zoom_in":"放大","zoom_out":"縮小","drag_to_reorder":"","route_timed_out":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"途經","from_hint":"起點","gpx_export_button":"GPX格式輸出","gpx_button":"","hide_button":"","details_button":"","to_hint":"目的地","route_info":"%1$s 需時 %2$s","search_button":"搜尋","more_button":"更多","pt_route_info":"","pt_route_info_walking":"","locations_not_found":"找不到起點/目的地","search_with_nominatim":"","powered_by":"","info":"","feedback":"","imprint":"","privacy":"","terms":"","bike":"單車","racingbike":"競技單車","mtb":"越野單車","car":"汽車","foot":"步行","hike":"","small_truck":"小型貨車","bus":"巴士","truck":"貨車","staticlink":"鏈接","motorcycle":"電單車","scooter":"","back_to_map":"","distance_unit":"","waiting_for_gps":"","elevation":"","slope":"","towerslope":"","country":"","surface":"","road_environment":"","road_access":"","road_class":"","max_speed":"","average_speed":"","track_type":"","toll":""}}');class i{constructor(e,t,n){if(!t)throw Error("Translation is undefined");if(!n)throw Error("Translation fallback is undefined");this.lang=e,this.data=t,this.fallback=n}get(e,t){let n=this.data[e];if(!n&&(n=this.fallback[e],!n))return e;if(t)for(let e=0;e<t.length;e++)n=n.replace("%"+(e+1)+"$s",t[e]);return n||""}getLang(){return this.lang}}let o;function s(e){return e.indexOf("_")>0?e.substring(0,e.indexOf("_")):e}function a(){if(!o)throw new Error("init translation via setTranslation before using getTranslation");return o}function l(e,t){return a().get(e,t)}var u=n(9526),c=n(5701),d=n.n(c),h=n(8236),p=n.n(h),f=n(6080),m=n.n(f),g=n(6850),_=n.n(g),y=n(7182),v=n.n(y),b=n(9213),x=n.n(b),w=n(4795),k={};k.styleTagTransform=x(),k.setAttributes=_(),k.insert=m().bind(null,"head"),k.domAPI=p(),k.insertStyleElement=v(),d()(w.Z,k);const C=w.Z&&w.Z.locals?w.Z.locals:void 0;function S(){}function A(e){return null==e?S:function(){return this.querySelector(e)}}function E(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function M(){return[]}function T(e){return function(t){return t.matches(e)}}var P=Array.prototype.find;function R(){return this.firstElementChild}var I=Array.prototype.filter;function L(){return Array.from(this.children)}function O(e){return new Array(e.length)}function z(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function F(e,t,n,r,i,o){for(var s,a=0,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new z(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function D(e,t,n,r,i,o,s){var a,l,u,c=new Map,d=t.length,h=o.length,p=new Array(d);for(a=0;a<d;++a)(l=t[a])&&(p[a]=u=s.call(l,l.__data__,a,t)+"",c.has(u)?i[a]=l:c.set(u,l));for(a=0;a<h;++a)u=s.call(e,o[a],a,o)+"",(l=c.get(u))?(r[a]=l,l.__data__=o[a],c.delete(u)):n[a]=new z(e,o[a]);for(a=0;a<d;++a)(l=t[a])&&c.get(p[a])===l&&(i[a]=l)}function j(e){return e.__data__}function N(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function B(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}z.prototype={constructor:z,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var q="http://www.w3.org/1999/xhtml";const G={svg:"http://www.w3.org/2000/svg",xhtml:q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function V(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),G.hasOwnProperty(t)?{space:G[t],local:e}:e}function W(e){return function(){this.removeAttribute(e)}}function H(e){return function(){this.removeAttributeNS(e.space,e.local)}}function U(e,t){return function(){this.setAttribute(e,t)}}function Z(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function X(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function K(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function $(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Y(e){return function(){this.style.removeProperty(e)}}function Q(e,t,n){return function(){this.style.setProperty(e,t,n)}}function J(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ee(e){return function(){delete this[e]}}function te(e,t){return function(){this[e]=t}}function ne(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function re(e){return e.trim().split(/^|\s+/)}function ie(e){return e.classList||new oe(e)}function oe(e){this._node=e,this._names=re(e.getAttribute("class")||"")}function se(e,t){for(var n=ie(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function ae(e,t){for(var n=ie(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function le(e){return function(){se(this,e)}}function ue(e){return function(){ae(this,e)}}function ce(e,t){return function(){(t.apply(this,arguments)?se:ae)(this,e)}}function de(){this.textContent=""}function he(e){return function(){this.textContent=e}}function pe(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function fe(){this.innerHTML=""}function me(e){return function(){this.innerHTML=e}}function ge(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function _e(){this.nextSibling&&this.parentNode.appendChild(this)}function ye(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ve(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===q&&t.documentElement.namespaceURI===q?t.createElement(e):t.createElementNS(n,e)}}function be(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function xe(e){var t=V(e);return(t.local?be:ve)(t)}function we(){return null}function ke(){var e=this.parentNode;e&&e.removeChild(this)}function Ce(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Se(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ae(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function Ee(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Me(e,t,n){var r=$(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Te(e,t){return function(){return Me(this,e,t)}}function Pe(e,t){return function(){return Me(this,e,t.apply(this,arguments))}}oe.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Re=[null];function Ie(e,t){this._groups=e,this._parents=t}function Le(e){return"string"==typeof e?new Ie([[document.querySelector(e)]],[document.documentElement]):new Ie([[e]],Re)}function Oe(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function ze(e){return"string"==typeof e?new Ie([document.querySelectorAll(e)],[document.documentElement]):new Ie([E(e)],Re)}Ie.prototype=function(){return new Ie([[document.documentElement]],Re)}.prototype={constructor:Ie,select:function(e){"function"!=typeof e&&(e=A(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,s,a=t[i],l=a.length,u=r[i]=new Array(l),c=0;c<l;++c)(o=a[c])&&(s=e.call(o,o.__data__,c,a))&&("__data__"in o&&(s.__data__=o.__data__),u[c]=s);return new Ie(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return E(e.apply(this,arguments))}}(e):function(e){return null==e?M:function(){return this.querySelectorAll(e)}}(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s,a=t[o],l=a.length,u=0;u<l;++u)(s=a[u])&&(r.push(e.call(s,s.__data__,u,a)),i.push(s));return new Ie(r,i)},selectChild:function(e){return this.select(null==e?R:function(e){return function(){return P.call(this.children,e)}}("function"==typeof e?e:T(e)))},selectChildren:function(e){return this.selectAll(null==e?L:function(e){return function(){return I.call(this.children,e)}}("function"==typeof e?e:T(e)))},filter:function(e){"function"!=typeof e&&(e=function(e){return function(){return this.matches(e)}}(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,s=t[i],a=s.length,l=r[i]=[],u=0;u<a;++u)(o=s[u])&&e.call(o,o.__data__,u,s)&&l.push(o);return new Ie(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,j);var n,r=t?D:F,i=this._parents,o=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var s=o.length,a=new Array(s),l=new Array(s),u=new Array(s),c=0;c<s;++c){var d=i[c],h=o[c],p=h.length,f=N(e.call(d,d&&d.__data__,c,i)),m=f.length,g=l[c]=new Array(m),_=a[c]=new Array(m);r(d,h,g,_,u[c]=new Array(p),f,t);for(var y,v,b=0,x=0;b<m;++b)if(y=g[b]){for(b>=x&&(x=b+1);!(v=_[x])&&++x<m;);y._next=v||null}}return(a=new Ie(a,i))._enter=l,a._exit=u,a},enter:function(){return new Ie(this._enter||this._groups.map(O),this._parents)},exit:function(){return new Ie(this._exit||this._groups.map(O),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var u,c=n[l],d=r[l],h=c.length,p=a[l]=new Array(h),f=0;f<h;++f)(u=c[f]||d[f])&&(p[f]=u);for(;l<i;++l)a[l]=n[l];return new Ie(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],o=i.length-1,s=i[o];--o>=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=B);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s,a=n[o],l=a.length,u=i[o]=new Array(l),c=0;c<l;++c)(s=a[c])&&(u[c]=s);u.sort(t)}return new Ie(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,o=t[n],s=0,a=o.length;s<a;++s)(i=o[s])&&e.call(i,i.__data__,s,o);return this},attr:function(e,t){var n=V(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?H:W:"function"==typeof t?n.local?K:X:n.local?Z:U)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Y:"function"==typeof t?J:Q)(e,t,null==n?"":n)):function(e,t){return e.style.getPropertyValue(t)||$(e).getComputedStyle(e,null).getPropertyValue(t)}(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?ee:"function"==typeof t?ne:te)(e,t)):this.node()[e]},classed:function(e,t){var n=re(e+"");if(arguments.length<2){for(var r=ie(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?ce:t?le:ue)(n,t))},text:function(e){return arguments.length?this.each(null==e?de:("function"==typeof e?pe:he)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?fe:("function"==typeof e?ge:me)(e)):this.node().innerHTML},raise:function(){return this.each(_e)},lower:function(){return this.each(ye)},append:function(e){var t="function"==typeof e?e:xe(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:xe(e),r=null==t?we:"function"==typeof t?t:A(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ke)},clone:function(e){return this.select(e?Se:Ce)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),s=o.length;if(!(arguments.length<2)){for(a=t?Ee:Ae,r=0;r<s;++r)this.each(a(o[r],t,n));return this}var a=this.node().__on;if(a)for(var l,u=0,c=a.length;u<c;++u)for(r=0,l=a[u];r<s;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Pe:Te)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,s=i.length;o<s;++o)(r=i[o])&&(yield r)}};class Fe extends Map{constructor(e,t=je){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(De(this,e))}has(e){return super.has(De(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function De({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function je(e){return null!==e&&"object"==typeof e?e.valueOf():e}function Ne(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const Be=Symbol("implicit");function qe(){var e=new Fe,t=[],n=[],r=Be;function i(i){let o=e.get(i);if(void 0===o){if(r!==Be)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Fe;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return qe(t,n).unknown(r)},Ne.apply(i,arguments),i}const Ge=Math.sqrt(50),Ve=Math.sqrt(10),We=Math.sqrt(2);function He(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Ge?10:o>=Ve?5:o>=We?2:1;let a,l,u;return i<0?(u=Math.pow(10,-i)/s,a=Math.round(e*u),l=Math.round(t*u),a/u<e&&++a,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*s,a=Math.round(e/u),l=Math.round(t/u),a*u<e&&++a,l*u>t&&--l),l<a&&.5<=n&&n<2?He(e,t,2*n):[a,l,u]}function Ue(e,t,n){return He(e=+e,t=+t,n=+n)[2]}function Ze(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xe(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ke(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=Ze,n=(t,n)=>Ze(e(t),n),r=(t,n)=>e(t)-n):(t=e===Ze||e===Xe?e:$e,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const s=i(e,t,n,o-1);return s>n&&r(e[s-1],t)>-r(e[s],t)?s-1:s},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function $e(){return 0}const Ye=Ke(Ze),Qe=Ye.right,Je=(Ye.left,Ke((function(e){return null===e?NaN:+e})).center,Qe);function et(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function tt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function nt(){}var rt=.7,it=1/rt,ot="\\s*([+-]?\\d+)\\s*",st="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",at="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lt=/^#([0-9a-f]{3,8})$/,ut=new RegExp(`^rgb\\(${ot},${ot},${ot}\\)$`),ct=new RegExp(`^rgb\\(${at},${at},${at}\\)$`),dt=new RegExp(`^rgba\\(${ot},${ot},${ot},${st}\\)$`),ht=new RegExp(`^rgba\\(${at},${at},${at},${st}\\)$`),pt=new RegExp(`^hsl\\(${st},${at},${at}\\)$`),ft=new RegExp(`^hsla\\(${st},${at},${at},${st}\\)$`),mt={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 gt(){return this.rgb().formatHex()}function _t(){return this.rgb().formatRgb()}function yt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=lt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?vt(t):3===n?new wt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?bt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?bt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ut.exec(e))?new wt(t[1],t[2],t[3],1):(t=ct.exec(e))?new wt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=dt.exec(e))?bt(t[1],t[2],t[3],t[4]):(t=ht.exec(e))?bt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=pt.exec(e))?Mt(t[1],t[2]/100,t[3]/100,1):(t=ft.exec(e))?Mt(t[1],t[2]/100,t[3]/100,t[4]):mt.hasOwnProperty(e)?vt(mt[e]):"transparent"===e?new wt(NaN,NaN,NaN,0):null}function vt(e){return new wt(e>>16&255,e>>8&255,255&e,1)}function bt(e,t,n,r){return r<=0&&(e=t=n=NaN),new wt(e,t,n,r)}function xt(e,t,n,r){return 1===arguments.length?((i=e)instanceof nt||(i=yt(i)),i?new wt((i=i.rgb()).r,i.g,i.b,i.opacity):new wt):new wt(e,t,n,null==r?1:r);var i}function wt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function kt(){return`#${Et(this.r)}${Et(this.g)}${Et(this.b)}`}function Ct(){const e=St(this.opacity);return`${1===e?"rgb(":"rgba("}${At(this.r)}, ${At(this.g)}, ${At(this.b)}${1===e?")":`, ${e})`}`}function St(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function At(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Et(e){return((e=At(e))<16?"0":"")+e.toString(16)}function Mt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Pt(e,t,n,r)}function Tt(e){if(e instanceof Pt)return new Pt(e.h,e.s,e.l,e.opacity);if(e instanceof nt||(e=yt(e)),!e)return new Pt;if(e instanceof Pt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(s=t===o?(n-r)/a+6*(n<r):n===o?(r-t)/a+2:(t-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new Pt(s,a,l,e.opacity)}function Pt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Rt(e){return(e=(e||0)%360)<0?e+360:e}function It(e){return Math.max(0,Math.min(1,e||0))}function Lt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Ot(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}et(nt,yt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gt,formatHex:gt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Tt(this).formatHsl()},formatRgb:_t,toString:_t}),et(wt,xt,tt(nt,{brighter(e){return e=null==e?it:Math.pow(it,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?rt:Math.pow(rt,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wt(At(this.r),At(this.g),At(this.b),St(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:kt,formatHex:kt,formatHex8:function(){return`#${Et(this.r)}${Et(this.g)}${Et(this.b)}${Et(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ct,toString:Ct})),et(Pt,(function(e,t,n,r){return 1===arguments.length?Tt(e):new Pt(e,t,n,null==r?1:r)}),tt(nt,{brighter(e){return e=null==e?it:Math.pow(it,e),new Pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?rt:Math.pow(rt,e),new Pt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new wt(Lt(e>=240?e-240:e+120,i,r),Lt(e,i,r),Lt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Pt(Rt(this.h),It(this.s),It(this.l),St(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 e=St(this.opacity);return`${1===e?"hsl(":"hsla("}${Rt(this.h)}, ${100*It(this.s)}%, ${100*It(this.l)}%${1===e?")":`, ${e})`}`}}));const zt=e=>()=>e;function Ft(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):zt(isNaN(e)?t:e)}const Dt=function e(t){var n=function(e){return 1==(e=+e)?Ft:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):zt(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=xt(e)).r,(t=xt(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),s=Ft(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);function jt(e){return function(t){var n,r,i=t.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;n<i;++n)r=xt(t[n]),o[n]=r.r||0,s[n]=r.g||0,a[n]=r.b||0;return o=e(o),s=e(s),a=e(a),r.opacity=1,function(e){return r.r=o(e),r.g=s(e),r.b=a(e),r+""}}}function Nt(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),s=new Array(r);for(n=0;n<i;++n)o[n]=Zt(e[n],t[n]);for(;n<r;++n)s[n]=t[n];return function(e){for(n=0;n<i;++n)s[n]=o[n](e);return s}}function Bt(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function qt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Gt(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Zt(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}jt((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],s=r>0?e[r-1]:2*i-o,a=r<t-1?e[r+2]:2*o-i;return Ot((n-r/t)*t,s,i,o,a)}})),jt((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],s=e[(r+1)%t],a=e[(r+2)%t];return Ot((n-r/t)*t,i,o,s,a)}}));var Vt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wt=new RegExp(Vt.source,"g");function Ht(e,t){var n,r,i,o=Vt.lastIndex=Wt.lastIndex=0,s=-1,a=[],l=[];for(e+="",t+="";(n=Vt.exec(e))&&(r=Wt.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:qt(n,r)})),o=Wt.lastIndex;return o<t.length&&(i=t.slice(o),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)a[(n=l[r]).i]=n.x(e);return a.join("")})}function Ut(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Zt(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?zt(t):("number"===i?qt:"string"===i?(n=yt(t))?(t=n,Dt):Ht:t instanceof yt?Dt:t instanceof Date?Bt:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?Nt:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Gt:qt:Ut))(e,t)}function Xt(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Kt(e){return+e}var $t=[0,1];function Yt(e){return e}function Qt(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function Jt(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=Qt(i,r),o=n(s,o)):(r=Qt(r,i),o=n(o,s)),function(e){return o(r(e))}}function en(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=Qt(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(t){var n=Je(e,t,1,r)-1;return o[n](i[n](t))}}var tn,nn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rn(e){if(!(t=nn.exec(e)))throw new Error("invalid format: "+e);var t;return new on({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function on(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function sn(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function an(e){return(e=sn(Math.abs(e)))?e[1]:NaN}function ln(e,t){var n=sn(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}rn.prototype=on.prototype,on.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const un={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ln(100*e,t),r:ln,s:function(e,t){var n=sn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(tn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+sn(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function cn(e){return e}var dn,hn,pn,fn=Array.prototype.map,mn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gn(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,s]=r?He(t,e,n):He(e,t,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let e=0;e<a;++e)l[e]=(o-e)/-s;else for(let e=0;e<a;++e)l[e]=(o-e)*s;else if(s<0)for(let e=0;e<a;++e)l[e]=(i+e)/-s;else for(let e=0;e<a;++e)l[e]=(i+e)*s;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?Ue(t,e,n):Ue(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=rn(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(an(t)/3)))-an(Math.abs(e)))}(o,s))||(r.precision=i),pn(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,an(t)-an(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-an(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return hn(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),s=0,a=o.length-1,l=o[s],u=o[a],c=10;for(u<l&&(i=l,l=u,u=i,i=s,s=a,a=i);c-- >0;){if((i=Ue(l,u,n))===r)return o[s]=l,o[a]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}r=i}return e},e}function _n(){var e=function(){var e,t,n,r,i,o,s=$t,a=$t,l=Zt,u=Yt;function c(){var e,t,n,l=Math.min(s.length,a.length);return u!==Yt&&(e=s[0],t=s[l-1],e>t&&(n=e,e=t,t=n),u=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?en:Jt,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(s.map(e),a,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(a,s.map(e),qt)))(n)))},d.domain=function(e){return arguments.length?(s=Array.from(e,Kt),c()):s.slice()},d.range=function(e){return arguments.length?(a=Array.from(e),c()):a.slice()},d.rangeRound=function(e){return a=Array.from(e),l=Xt,c()},d.clamp=function(e){return arguments.length?(u=!!e||Yt,c()):u!==Yt},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(Yt,Yt);return e.copy=function(){return t=e,_n().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},Ne.apply(e,arguments),gn(e)}function yn(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}dn=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?cn:(t=fn.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(e.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?cn:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(fn.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=rn(e)).fill,n=e.align,d=e.sign,h=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,_=e.trim,y=e.type;"n"===y?(m=!0,y="g"):un[y]||(void 0===g&&(g=12),_=!0,y="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var v="$"===h?i:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===h?o:/[%p]/.test(y)?l:"",x=un[y],w=/[defgprs%]/.test(y);function k(e){var i,o,l,h=v,k=b;if("c"===y)k=x(e)+k,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),h=(C?"("===d?d:u:"-"===d||"("===d?"":d)+h,k=("s"===y?mn[8+tn/3]:"")+k+(C&&"("===d?")":""),w)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){k=(46===l?s+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}m&&!p&&(e=r(e,1/0));var S=h.length+e.length+k.length,A=S<f?new Array(f-S+1).join(t):"";switch(m&&p&&(e=r(A+e,A.length?f-k.length:1/0),A=""),n){case"<":e=h+e+k+A;break;case"=":e=h+A+e+k;break;case"^":e=A.slice(0,S=A.length>>1)+h+e+k+A.slice(S);break;default:e=A+h+e+k}return a(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=rn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(an(t)/3))),i=Math.pow(10,-r),o=mn[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),hn=dn.format,pn=dn.formatPrefix;var vn={value:()=>{}};function bn(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new xn(r)}function xn(e){this._=e}function wn(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function kn(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=vn,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}xn.prototype=bn.prototype={constructor:xn,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<s;)if(n=(e=i[o]).type)r[n]=kn(r[n],e.name,t);else if(null==t)for(n in r)r[n]=kn(r[n],e.name,null);return this}for(;++o<s;)if((n=(e=i[o]).type)&&(n=wn(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new xn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};const Cn=bn,Sn={passive:!1},An={capture:!0,passive:!1};function En(e){e.stopImmediatePropagation()}function Mn(e){e.preventDefault(),e.stopImmediatePropagation()}const Tn=e=>()=>e;function Pn(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}function Rn(e){return!e.ctrlKey&&!e.button}function In(){return this.parentNode}function Ln(e,t){return null==t?{x:e.x,y:e.y}:t}function On(){return navigator.maxTouchPoints||"ontouchstart"in this}function zn(e){return e}Pn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Fn=1,Dn=2,jn=3,Nn=4,Bn=1e-6;function qn(e){return"translate("+e+",0)"}function Gn(e){return"translate(0,"+e+")"}function Vn(e){return t=>+e(t)}function Wn(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Hn(){return!this.__axis}function Un(e,t){var n=[],r=null,i=null,o=6,s=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=e===Fn||e===Nn?-1:1,c=e===Nn||e===Dn?"x":"y",d=e===Fn||e===jn?qn:Gn;function h(h){var p=null==r?t.ticks?t.ticks.apply(t,n):t.domain():r,f=null==i?t.tickFormat?t.tickFormat.apply(t,n):zn:i,m=Math.max(o,0)+a,g=t.range(),_=+g[0]+l,y=+g[g.length-1]+l,v=(t.bandwidth?Wn:Vn)(t.copy(),l),b=h.selection?h.selection():h,x=b.selectAll(".domain").data([null]),w=b.selectAll(".tick").data(p,t).order(),k=w.exit(),C=w.enter().append("g").attr("class","tick"),S=w.select("line"),A=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(C),S=S.merge(C.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),A=A.merge(C.append("text").attr("fill","currentColor").attr(c,u*m).attr("dy",e===Fn?"0em":e===jn?"0.71em":"0.32em")),h!==b&&(x=x.transition(h),w=w.transition(h),S=S.transition(h),A=A.transition(h),k=k.transition(h).attr("opacity",Bn).attr("transform",(function(e){return isFinite(e=v(e))?d(e+l):this.getAttribute("transform")})),C.attr("opacity",Bn).attr("transform",(function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:v(e))+l)}))),k.remove(),x.attr("d",e===Nn||e===Dn?s?"M"+u*s+","+_+"H"+l+"V"+y+"H"+u*s:"M"+l+","+_+"V"+y:s?"M"+_+","+u*s+"V"+l+"H"+y+"V"+u*s:"M"+_+","+l+"H"+y),w.attr("opacity",1).attr("transform",(function(e){return d(v(e)+l)})),S.attr(c+"2",u*o),A.attr(c,u*m).text(f),b.filter(Hn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Dn?"start":e===Nn?"end":"middle"),b.each((function(){this.__axis=v}))}return h.scale=function(e){return arguments.length?(t=e,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),h):n.slice()},h.tickValues=function(e){return arguments.length?(r=null==e?null:Array.from(e),h):r&&r.slice()},h.tickFormat=function(e){return arguments.length?(i=e,h):i},h.tickSize=function(e){return arguments.length?(o=s=+e,h):o},h.tickSizeInner=function(e){return arguments.length?(o=+e,h):o},h.tickSizeOuter=function(e){return arguments.length?(s=+e,h):s},h.tickPadding=function(e){return arguments.length?(a=+e,h):a},h.offset=function(e){return arguments.length?(l=+e,h):l},h}function Zn(e){return Un(jn,e)}function Xn(e){return Un(Nn,e)}Math.abs,Math.atan2;const Kn=Math.cos,$n=(Math.max,Math.min,Math.sin),Yn=Math.sqrt,Qn=Math.PI,Jn=2*Qn,er=Yn(3),tr={draw(e,t){const n=-Yn(t/(3*er));e.moveTo(0,2*n),e.lineTo(-er*n,-n),e.lineTo(er*n,-n),e.closePath()}};function nr(e){return function(){return e}}const rr=Math.PI,ir=2*rr,or=1e-6,sr=ir-or;function ar(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class lr{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?ar:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ar;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,a=n-e,l=r-t,u=o-e,c=s-t,d=u*u+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>or)if(Math.abs(c*a-l*u)>or&&i){let h=n-o,p=r-s,f=a*a+l*l,m=h*h+p*p,g=Math.sqrt(f),_=Math.sqrt(d),y=i*Math.tan((rr-Math.acos((f+d-m)/(2*g*_)))/2),v=y/_,b=y/g;Math.abs(v-1)>or&&this._append`L${e+v*u},${t+v*c}`,this._append`A${i},${i},0,0,${+(c*h>u*p)},${this._x1=e+b*a},${this._y1=t+b*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),a=n*Math.sin(r),l=e+s,u=t+a,c=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${u}`:(Math.abs(this._x1-l)>or||Math.abs(this._y1-u)>or)&&this._append`L${l},${u}`,n&&(d<0&&(d=d%ir+ir),d>sr?this._append`A${n},${n},0,1,${c},${e-s},${t-a}A${n},${n},0,1,${c},${this._x1=l},${this._y1=u}`:d>or&&this._append`A${n},${n},0,${+(d>=rr)},${c},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function ur(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new lr(t)}lr.prototype,Yn(3);const cr={draw(e,t){const n=Yn(t/Qn);e.moveTo(n,0),e.arc(0,0,n,0,Jn)}};Yn(1/3),$n(Qn/10),$n(7*Qn/10);function dr(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function hr(e){this._context=e}function pr(e){return new hr(e)}function fr(e){return e[0]}function mr(e){return e[1]}function gr(e,t){var n=nr(!0),r=null,i=pr,o=null,s=ur(a);function a(a){var l,u,c,d=(a=dr(a)).length,h=!1;for(null==r&&(o=i(c=s())),l=0;l<=d;++l)!(l<d&&n(u=a[l],l,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(u,l,a),+t(u,l,a));if(c)return o=null,c+""||null}return e="function"==typeof e?e:void 0===e?fr:nr(e),t="function"==typeof t?t:void 0===t?mr:nr(t),a.x=function(t){return arguments.length?(e="function"==typeof t?t:nr(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:nr(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:nr(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}function _r(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function yr(e){this._context=e}function vr(e){return new yr(e)}function br(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}$n(Jn/10),Kn(Jn/10),Yn(3),Yn(3),Yn(12),Array.prototype.slice,hr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},yr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_r(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};const xr=br("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),wr=br("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),kr=br("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Cr=br("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Sr=br("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Ar=br("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Er={width:800,height:280,margins:{top:10,right:30,bottom:55,left:50},imperial:!1,expand:!0,expandControls:!0,translation:{}};class Mr{constructor(e,t={},n={}){this._container=e,t=Object.assign(Er,t),this._margin=t.margins,this._width=t.width,this._height=t.height,this._graphStyle=t.graphStyle||{},this._xTicks=t.xTicks,this._yTicks=t.yTicks,this._translation=t.translation,this._imperial=t.imperial,this._expand=t.expand,this._expandControls=t.expandControls,this._expandCallback=t.expandCallback,this._pointSelected=n.pointSelectedCallback||Function(),this._areaSelected=n.areaSelectedCallback||Function(),this._routeSegmentsSelected=n.routeSegmentsSelectedCallback||Function(),this._chooseSelectionCallback=t.chooseSelectionCallback,this._defaultTranslation={distance:"Distance",elevation:"Elevation",segment_length:"Segment length",type:"Type",legend:"Legend"},this._d3ColorCategorical=[xr,wr,kr,Cr,Sr,Ar],this._containerMouseUpHandler=()=>this._mouseUpHandler(),this._svgWidth=this._width-this._margin.left-this._margin.right,this._svgHeight=this._height-this._margin.top-this._margin.bottom,this._expandControls&&(this._button=this._createDOMElement("div","heightgraph-toggle",this._container),this._createDOMElement("a","heightgraph-toggle-icon",this._button),this._button.addEventListener("click",(()=>this._expandContainer())),this._closeButton=this._createDOMElement("a","heightgraph-close-icon",this._container),this._closeButton.addEventListener("click",(()=>this._expandContainer()))),this._showState=!1,this._stopPropagation(),this._svg=Le(this._container).append("svg").attr("class","heightgraph-container").attr("width",this._width).attr("height",this._height).append("g").attr("transform","translate("+this._margin.left+","+this._margin.top+")"),this._legendMain=document.createElement("div"),this._legendMain.id="heightgraph-legend",this._legend=document.createElement("ul"),this._legendMain.append(this._legend);const r=document.createElement("span");r.id="heightgraph-legend-text",r.innerHTML=this._getTranslation("legend"),this._legendMain.append(r),r.addEventListener("click",(e=>{this._legend.classList.toggle("heightgraph-show")})),this._container.append(this._legendMain),this._selectorMain=document.createElement("div"),this._selectorMain.id="heightgraph-selector",this._container.append(this._selectorMain),this._optionsSelect=document.createElement("ul"),this._selectorMain.append(this._optionsSelect),this._optionsSelectInput=document.createElement("input"),this._selectorMain.append(this._optionsSelectInput);const i=document.createElement("span");i.innerHTML="▾",i.id="arrow-icon-for-input",this._selectorMain.append(i),this._optionsSelectInput.addEventListener("click",(e=>{this._optionsSelectInput.select();for(let e=0;e<this._optionsSelect.children.length;e++)this._optionsSelect.children[e].style.display="";this._optionsSelect.classList.toggle("heightgraph-show")})),this._optionsSelectInput.addEventListener("input",(e=>{const t=this._optionsSelectInput.value.toLowerCase();for(let e=0;e<this._optionsSelect.children.length;e++){const n=this._optionsSelect.children[e],r=n.textContent.toLowerCase();n.style.display=r.indexOf(t)>-1?"":"none"}})),this._optionsSelect.addEventListener("click",(e=>{this._optionsSelectInput.value=e.target.textContent,this._optionsSelect.classList.remove("heightgraph-show");const t=this._currentSelection=e.target.getAttribute("value");0!==this._categories.length&&("function"==typeof this._chooseSelectionCallback&&this._chooseSelectionCallback(t,this._categories[t].info),this._routeSegmentsSelected([]),this._removeChart(),this._createChart(t),this._removeDragRectangle(),this._rectangle&&this._drawDragRectangle(this._rectangle[0],this._rectangle[1]))})),this._expand&&this._expandContainer()}resize(e){e.width&&(this._width=e.width),e.height&&(this._height=e.height),Le(this._container).selectAll("svg").attr("width",this._width).attr("height",this._height),this._svgWidth=this._width-this._margin.left-this._margin.right,this._svgHeight=this._height-this._margin.top-this._margin.bottom,this.redraw()}redraw(){this.setData(this._data,this._mappings,this._currentSelection)}setData(e,t,n){void 0!==n&&(this._currentSelection=n),(void 0===this._currentSelection||this._currentSelection>=e.length)&&(this._currentSelection=0),this._mappings=t,this._routeSegmentsSelected([]),void 0!==this._svg&&this._svg.selectAll("*").remove(),this._removeDragRectangle(),this._rectangle=null,this._data=e,this._prepareData(),this._calculateElevationBounds(),this._appendScales(),this._appendGrid(),0!==Object.keys(e).length&&this._createChart(this._currentSelection),this._createOptions()}_createOptions(){for(;this._optionsSelect.firstChild;)this._optionsSelect.removeChild(this._optionsSelect.lastChild);this._data.forEach(((e,t)=>{const n=e.properties.label?e.properties.label:e.properties.summary;t===this._currentSelection&&(this._optionsSelectInput.value=n);let r=document.createElement("li");this._optionsSelect.append(r),r.setAttribute("value",t),r.innerHTML=n}))}_stopPropagation(){this._container.addEventListener("click mousedown touchstart dblclick",(e=>{e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0}))}_dragHandler(e){if(void 0!==e&&(e.preventDefault(),e.stopPropagation()),this._gotDragged=!0,this._dragStartCoords){const t=this._dragCurrentCoords=Oe(e,this._background.node()),n=Math.min(this._dragStartCoords[0],t[0]),r=Math.max(this._dragStartCoords[0],t[0]);this._drawDragRectangle(n,r)}}_drawDragRectangle(e,t){if(this._rectangle=[e,t],this._dragRectangle||this._dragRectangleG)this._dragRectangle.attr("width",t-e).attr("x",e);else{const n=Le(this._container).select("svg").select("g");this._dragRectangleG=n.append("g"),this._dragRectangle=this._dragRectangleG.append("rect").attr("width",t-e).attr("height",this._svgHeight).attr("x",e).attr("class","mouse-drag").style("fill","grey").style("opacity",.5).style("pointer-events","none")}}_removeDragRectangle(){this._dragRectangleG&&(this._dragRectangleG.remove(),this._dragRectangleG=null,this._dragRectangle=null)}getBounds(){return this._calculateFullExtent(this._areasFlattended)}isImperial(){return this._imperial}setImperial(e){this._imperial=e}_mouseUpHandler(){if(this._arrowClick)return void(this._arrowClick=!1);if(!this._dragStartCoords||!this._gotDragged)return this._dragStartCoords=null,this._gotDragged=!1,void(this._dragRectangleG&&(this._removeDragRectangle(),this._rectangle=null,this._areaSelected(null)));const e=this._findItemForX(this._dragStartCoords[0]),t=this._findItemForX(this._dragCurrentCoords[0]);this._fitSection(e,t),this._dragStartCoords=null,this._gotDragged=!1}_dragStartHandler(e){e.preventDefault(),e.stopPropagation(),this._gotDragged=!1,this._dragStartCoords=Oe(e,this._background.node())}_calculateFullExtent(e){if(!e||e.length<1)return null;let t=e[0].latlng.lat,n=e[0].latlng.lng,r=e[0].latlng.lat,i=e[0].latlng.lng;return e.forEach((e=>{n=Math.min(n,e.latlng.lng),t=Math.min(t,e.latlng.lat),i=Math.max(i,e.latlng.lng),r=Math.max(r,e.latlng.lat)})),{sw:this._createCoordinate(n,t),ne:this._createCoordinate(i,r)}}_fitSection(e,t){const n=Math.min(e,t),r=Math.max(e,t);let i;n!==r?i=this._calculateFullExtent(this._areasFlattended.slice(n,r+1)):this._areasFlattended.length>0&&(i=[this._areasFlattended[n].latlng,this._areasFlattended[r].latlng]),i&&this._areaSelected(i)}_expandContainer(){!0!==this._expandControls&&(this._showState=!1),this._showState?(Le(this._button).style("display","block"),Le(this._container).selectAll("svg").style("display","none"),Le(this._closeButton).style("display","none"),Le(this._legendMain).style("display","none"),Le(this._selectorMain).style("display","none")):(Le(this._button).style("display","none"),Le(this._container).selectAll("svg").style("display","block"),Le(this._closeButton).style("display","block"),Le(this._legendMain).style("display","block"),Le(this._selectorMain).style("display","block")),this._showState=!this._showState,"function"==typeof this._expandCallback&&this._expandCallback(this._showState)}_removeChart(){void 0!==this._svg&&(this._svg.selectAll("path.area").remove(),this._svg.selectAll("path.border-top").remove(),this._svg.selectAll(".legend").remove(),this._svg.selectAll(".lineSelection").remove(),this._svg.selectAll(".horizontalLine").remove(),this._svg.selectAll(".horizontalLineText").remove())}_randomNumber(e){return Math.round(Math.random()*(e-0))}_prepareData(){this._coordinates=[],this._elevations=[],this._cumulatedDistances=[],this._cumulatedDistances.push(0),this._categories=[];const e=this._data;let t;if(void 0===this._mappings){const e=this._randomNumber(this._d3ColorCategorical.length-1);t=qe(this._d3ColorCategorical[e])}for(let n=0;n<e.length;n++){let r=0;this._categories[n]={info:{id:n,text:e[n].properties.label||e[n].properties.summary},distances:[],attributes:[],geometries:[],legend:{}};let i,o=0;const s={},a=void 0!==this._mappings&&"function"==typeof this._mappings[e[n].properties.summary];for(i=0;i<e[n].features.length;i++){let l,u,c,d;const h=[],p=e[n].features[i].geometry.coordinates.length,f=e[n].features[i].properties.attributeType;let m,g;if(void 0===this._mappings)f in s?(m=f,g=s[f]):(m=f,g=t(i),s[f]=g);else if(a){const t=this._mappings[e[n].properties.summary](f);m=t.text,g=t.color}else m=this._mappings[e[n].properties.summary][f].text,g=this._mappings[e[n].properties.summary][f].color;const _={type:f,text:m,color:g};this._categories[n].attributes.push(_),f in this._categories[n].legend||(this._categories[n].legend[f]=_);for(let t=0;t<p;t++){let s;u=this._createCoordinate(e[n].features[i].geometry.coordinates[t][0],e[n].features[i].geometry.coordinates[t][1]),l=e[n].features[i].geometry.coordinates[t][2],t<p-1?(c=this._createCoordinate(e[n].features[i].geometry.coordinates[t+1][0],e[n].features[i].geometry.coordinates[t+1][1]),d=this._calcDistance(u,c)/1e3,r+=d,0===n&&(this._elevations.push(l),this._coordinates.push(u),this._cumulatedDistances.push(r)),o+=1):t===p-1&&i===e[n].features.length-1&&(0===n&&(this._elevations.push(l),this._coordinates.push(c)),o+=1),s=t===p-1&&i<e[n].features.length-1?this._cumulatedDistances[o]:this._cumulatedDistances[o-1],h.push({altitude:l,position:s,x:u.lng,y:u.lat,latlng:u,type:m,areaIdx:i})}this._categories[n].distances.push(r),this._categories[n].geometries.push(h)}n===e.length-1&&(this._totalDistance=r)}}_calculateElevationBounds(){if(0===this._elevations.length)return void(this._elevationBounds={min:0,max:0});const e=yn(this._elevations),t=function(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}(this._elevations),n=e-t;this._elevationBounds={min:n<10?t-10:t-.1*n,max:n<10?e+10:e+.1*n}}_createChart(e){let t=0===this._categories.length?[]:this._categories[e].geometries;this._areasFlattended=[].concat.apply([],t);for(let n=0;n<t.length;n++)this._appendAreas(t[n],e,n);this._createFocus(),this._appendBackground(),this._createBorderTopLine(),this._createLegend(),this._createHorizontalLine()}_createFocus(){const e=this._elevationBounds.min;this._focus&&(this._focus.remove(),this._focusLineGroup.remove()),this._focus=this._svg.append("g").attr("class","focusbox"),this._focusRect=this._focus.append("rect").attr("x",3).attr("y",-this._y(e)).attr("display","none"),this._focusDistance=this._focus.append("text").attr("x",7).attr("y",15-this._y(e)).attr("id","heightgraph.distance").text(this._getTranslation("distance")+":"),this._focusHeight=this._focus.append("text").attr("x",7).attr("y",30-this._y(e)).attr("id","heightgraph.height").text(this._getTranslation("elevation")+":"),this._focusBlockDistance=this._focus.append("text").attr("x",7).attr("y",45-this._y(e)).attr("id","heightgraph.blockdistance").text(this._getTranslation("segment_length")+":"),this._focusType=this._focus.append("text").attr("x",7).attr("y",60-this._y(e)).attr("id","heightgraph.type").text(this._getTranslation("type")+":"),this._areaTspan=this._focusBlockDistance.append("tspan").attr("class","tspan"),this._typeTspan=this._focusType.append("tspan").attr("class","tspan");const t=ze(".focusbox text").size();ze(".focusbox rect").attr("height",15*t+7.5).attr("display","block"),this._focusLineGroup=this._svg.append("g").attr("class","focusLine"),this._focusLine=this._focusLineGroup.append("line").attr("y1",0).attr("y2",this._y(this._elevationBounds.min)),this._distTspan=this._focusDistance.append("tspan").attr("class","tspan"),this._altTspan=this._focusHeight.append("tspan").attr("class","tspan")}_createHorizontalLine(){this._horizontalLine=this._svg.append("line").attr("class","horizontalLine").attr("x1",0).attr("x2",this._width-this._margin.left-this._margin.right).attr("y1",this._y(this._elevationBounds.min)).attr("y2",this._y(this._elevationBounds.min)).style("stroke","black"),this._elevationValueText=this._svg.append("text").attr("class","horizontalLineText").attr("x",this._width-this._margin.left-this._margin.right-20).attr("y",this._y(this._elevationBounds.min)-10).attr("fill","black");const e=[{x:this._width-this._margin.left-this._margin.right+7,y:this._y(this._elevationBounds.min),color:"black",type:tr,angle:-90,size:100}],t=(e,t)=>{const n=this._svgHeight,r=Oe(t,this._container)[1]-10,i=Math.max(0,Math.min(r,n));Le(e).attr("transform",(e=>"translate("+e.x+","+i+") rotate("+e.angle+")")),Le(".horizontalLine").attr("y1",i).attr("y2",i),this._highlightedCoords=r>=n?[]:this._findCoordsForY(r),Le(".horizontalLineText").attr("y",i<10?0:i-10).text(Pr(this._y.invert(i),this._imperial,!0)),this._routeSegmentsSelected(this._highlightedCoords)},n=e=>{Le(e).classed("active",!1),Le(".horizontalLine").classed("active",!1),this._routeSegmentsSelected(this._highlightedCoords)};this._svg.selectAll(".horizontal-symbol").data(e).enter().append("path").attr("class","lineSelection").attr("d",function(e,t){let n=null,r=ur(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:nr(e||cr),t="function"==typeof t?t:nr(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:nr(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:nr(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}().type((e=>e.type)).size((e=>e.size))).attr("transform",(e=>"translate("+e.x+","+e.y+") rotate("+e.angle+")")).attr("id",(e=>e.id)).style("fill",(e=>e.color)).call(function(){var e,t,n,r,i=Rn,o=In,s=Ln,a=On,l={},u=Cn("start","drag","end"),c=0,d=0;function h(e){e.on("mousedown.drag",p).filter(a).on("touchstart.drag",g).on("touchmove.drag",_,Sn).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(s,a){if(!r&&i.call(this,s,a)){var l=v(this,o.call(this,s,a),s,a,"mouse");l&&(Le(s.view).on("mousemove.drag",f,An).on("mouseup.drag",m,An),function(e){var t=e.document.documentElement,n=Le(e).on("dragstart.drag",Mn,An);"onselectstart"in t?n.on("selectstart.drag",Mn,An):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(s.view),En(s),n=!1,e=s.clientX,t=s.clientY,l("start",s))}}function f(r){if(Mn(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>d}l.mouse("drag",r)}function m(e){Le(e.view).on("mousemove.drag mouseup.drag",null),function(e,t){var n=e.document.documentElement,r=Le(e).on("dragstart.drag",null);t&&(r.on("click.drag",Mn,An),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,n),Mn(e),l.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,r,s=e.changedTouches,a=o.call(this,e,t),l=s.length;for(n=0;n<l;++n)(r=v(this,a,e,t,s[n].identifier,s[n]))&&(En(e),r("start",e,s[n]))}}function _(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(Mn(e),n("drag",e,r[t]))}function y(e){var t,n,i=e.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(n=l[i[t].identifier])&&(En(e),n("end",e,i[t]))}function v(e,t,n,r,i,o){var a,d,p,f=u.copy(),m=Oe(o||n,t);if(null!=(p=s.call(e,new Pn("beforestart",{sourceEvent:n,target:h,identifier:i,active:c,x:m[0],y:m[1],dx:0,dy:0,dispatch:f}),r)))return a=p.x-m[0]||0,d=p.y-m[1]||0,function n(o,s,u){var g,_=m;switch(o){case"start":l[i]=n,g=c++;break;case"end":delete l[i],--c;case"drag":m=Oe(u||s,t),g=c}f.call(o,e,new Pn(o,{sourceEvent:s,subject:p,target:h,identifier:i,active:g,x:m[0]+a,y:m[1]+d,dx:m[0]-_[0],dy:m[1]-_[1],dispatch:f}),r)}}return h.filter=function(e){return arguments.length?(i="function"==typeof e?e:Tn(!!e),h):i},h.container=function(e){return arguments.length?(o="function"==typeof e?e:Tn(e),h):o},h.subject=function(e){return arguments.length?(s="function"==typeof e?e:Tn(e),h):s},h.touchable=function(e){return arguments.length?(a="function"==typeof e?e:Tn(!!e),h):a},h.on=function(){var e=u.on.apply(u,arguments);return e===u?h:e},h.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,h):Math.sqrt(d)},h}().on("start",(function(e,t){Le(this).raise().classed("active",!0),Le(".horizontalLine").raise().classed("active",!0)})).on("drag",(function(e,n){t(this,e)})).on("end",(function(e,t){n(this)})))}_appendScales(){this._x=_n().range([0,this._svgWidth]),this._y=_n().range([this._svgHeight,0]),this._x.domain([0,this._totalDistance]),this._y.domain([this._elevationBounds.min,this._elevationBounds.max]),this._xAxis=Zn().scale(this._x),this._xAxis.tickFormat((e=>Tr(1e3*e,this._totalDistance,this._imperial,!1))),this._xAxis.ticks(this._xTicks?Math.pow(2,this._xTicks):Math.round(this._svgWidth/75),"s"),this._yAxis=Xn().scale(this._y).tickFormat((e=>Pr(e,this._imperial,!1))),this._yAxis.ticks(this._yTicks?Math.pow(2,this._yTicks):Math.round(this._svgHeight/30),"s")}_appendBackground(){const e=this._background=Le(this._container).select("svg").select("g").append("rect").attr("width",this._svgWidth).attr("height",this._svgHeight).style("fill","none").style("stroke","none").style("pointer-events","all").on("mousemove.focusbox",((e,t)=>this._mousemoveHandler(e))).on("mouseout.focusbox",((e,t)=>this._mouseoutHandler()));this._isMobile()?(e.on("touchstart.drag",((e,t)=>this._dragHandler(e))).on("touchstart.drag",((e,t)=>this._dragStartHandler(e))).on("touchstart.focusbox",((e,t)=>this._mousemoveHandler(e,t))),this._container.addEventListener("touchend",this._containerMouseUpHandler)):(e.on("mousemove.focusbox",((e,t)=>this._mousemoveHandler(e))).on("mouseout.focusbox",((e,t)=>this._mouseoutHandler())).on("mousedown.drag",((e,t)=>this._dragStartHandler(e))).on("mousemove.drag",((e,t)=>this._dragHandler(e))),this._container.addEventListener("mouseup",this._containerMouseUpHandler))}_appendGrid(){this._svg.append("g").attr("class","grid").attr("transform","translate(0,"+this._svgHeight+")").call(this._make_x_axis().tickSize(-this._svgHeight,0,0).ticks(Math.round(this._svgWidth/75)).tickFormat("")),this._svg.append("g").attr("class","grid").call(this._make_y_axis().tickSize(-this._svgWidth,0,0).ticks(Math.round(this._svgHeight/30)).tickFormat("")),this._svg.append("g").attr("transform","translate(0,"+this._svgHeight+")").attr("class","x axis").call(this._xAxis),this._svg.append("g").attr("transform","translate(-2,0)").attr("class","y axis").call(this._yAxis)}_appendAreas(e,t,n){const r=this._categories[t].attributes[n].color;this._area=function(e,t,n){var r=null,i=nr(!0),o=null,s=pr,a=null,l=ur(u);function u(u){var c,d,h,p,f,m=(u=dr(u)).length,g=!1,_=new Array(m),y=new Array(m);for(null==o&&(a=s(f=l())),c=0;c<=m;++c){if(!(c<m&&i(p=u[c],c,u))===g)if(g=!g)d=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=c-1;h>=d;--h)a.point(_[h],y[h]);a.lineEnd(),a.areaEnd()}g&&(_[c]=+e(p,c,u),y[c]=+t(p,c,u),a.point(r?+r(p,c,u):_[c],n?+n(p,c,u):y[c]))}if(f)return a=null,f+""||null}function c(){return gr().defined(i).curve(s).context(o)}return e="function"==typeof e?e:void 0===e?fr:nr(+e),t="function"==typeof t?t:nr(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?mr:nr(+n),u.x=function(t){return arguments.length?(e="function"==typeof t?t:nr(+t),r=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:nr(+t),u):e},u.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:nr(+e),u):r},u.y=function(e){return arguments.length?(t="function"==typeof e?e:nr(+e),n=null,u):t},u.y0=function(e){return arguments.length?(t="function"==typeof e?e:nr(+e),u):t},u.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:nr(+e),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(e){return arguments.length?(i="function"==typeof e?e:nr(!!e),u):i},u.curve=function(e){return arguments.length?(s=e,null!=o&&(a=s(o)),u):s},u.context=function(e){return arguments.length?(null==e?o=a=null:a=s(o=e),u):o},u}().x((e=>{const t=this._x(e.position);return e.xDiagonalCoordinate=t,t})).y0(this._svgHeight).y1((e=>this._y(e.altitude))).curve(pr),this._areapath=this._svg.append("path").attr("class","area"),this._areapath.datum(e).attr("d",this._area).attr("stroke",r),Object.entries(this._graphStyle).forEach((([e,t])=>{this._areapath.style(e,t)})),this._areapath.style("fill",r).style("pointer-events","none")}_make_x_axis(){return Zn().scale(this._x)}_make_y_axis(){return Xn().scale(this._y)}_createLegend(){for(;this._legend.firstChild;)this._legend.removeChild(this._legend.lastChild);if(this._categories.length>0)for(let e in this._categories[this._currentSelection].legend){const t=this._categories[this._currentSelection].legend[e],n=document.createElement("li");this._legend.append(n);const r=document.createElement("span");r.style.backgroundColor=t.color,r.id="heightgraph-legend-icon",n.append(r);const i=document.createElement("span");i.innerHTML=t.text,n.append(i)}}_createBorderTopLine(){const e=this._areasFlattended,t=gr().x((e=>(0,this._x)(e.position))).y((e=>(0,this._y)(e.altitude))).curve(vr);this._svg.append("svg:path").attr("d",t(e)).attr("class","border-top")}_mouseoutHandler(){for(let e of["_focusLine","_focus","_pointG","_mouseHeightFocus","_mouseHeightFocusLabel"])this[e]&&this[e].style("display","none");this._pointSelected(null)}_mousemoveHandler(e){const t=Oe(e,this._svg.node()),n=this._areasFlattended[this._findItemForX(t[0])];n&&this._internalMousemoveHandler(n)}_internalMousemoveHandler(e,t=!0){let n;const r=e.altitude,i=e.position,o=e.latlng,s=e.areaIdx,a=e.type,l=Lr(".focusbox text").width+10;n=0===s?this._categories[this._currentSelection].distances[s]:this._categories[this._currentSelection].distances[s]-this._categories[this._currentSelection].distances[s-1],t&&this._pointSelected(o,r,a),this._distTspan.text(" "+Tr(1e3*i,this._totalDistance,this._imperial,!0)),this._altTspan.text(" "+Pr(r,this._imperial,!0)),this._areaTspan.text(" "+Tr(1e3*n,this._totalDistance,this._imperial,!0)),this._typeTspan.text(" "+a),this._focusRect.attr("width",l),this._focusLine.style("display","block").attr("x1",this._x(i)).attr("x2",this._x(i));const u=this._x(i)-(l+5),c=this._width-this._margin.left-this._margin.right;this._x(i)+l<c&&this._focus.style("display","initial").attr("transform","translate("+this._x(i)+","+this._y(this._elevationBounds.min)+")"),this._x(i)+l>c&&this._focus.style("display","initial").attr("transform","translate("+u+","+this._y(this._elevationBounds.min)+")")}_findItemForX(e){const t=Ke((e=>e.position)).left,n=this._x.invert(e);return t(this._areasFlattended,n)}_findCoordsForY(e){const t=this._y.invert(e);return((e,t)=>{const n=[];for(let r=0;r<e.length;r++)e[r].altitude>=t&&n.push(r);const r=[];let i=0;for(let e=0;e<n.length-1;e++)n[e+1]!==n[e]+1&&(r.push(n.slice(i,e+1)),i=e+1);r.push(n.slice(i,n.length));for(let t=0;t<r.length;t++)for(let n=0;n<r[t].length;n++)r[t][n]=e[r[t][n]].latlng;return r})(this._areasFlattended,t)}_getTranslation(e){return this._translation[e]?this._translation[e]:this._defaultTranslation[e]?this._defaultTranslation[e]:(console.error("Unexpected error when looking up the translation for "+e),"No translation found")}_createCoordinate(e,t){return{lat:t,lng:e}}_calcDistance(e,t){const n=Math.PI/180,r=Math.sin((t.lat-e.lat)*n/2),i=Math.sin((t.lng-e.lng)*n/2),o=r*r+Math.cos(e.lat*n)*Math.cos(t.lat*n)*i*i;return 12742e3*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}_createDOMElement(e,t,n){const r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}_isMobile(){return/Android|webOS|iPhone|iPad|Mac|Macintosh|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}}function Tr(e,t,n,r){return n?Rr(1e3*t)<.1?Ir(e).toFixed(r?1:0)+" ft":Rr(1e3*t)<10?Rr(e).toFixed(r?3:1)+" mi":Rr(e).toFixed(r?3:0)+" mi":t<1?e.toFixed(r?2:0)+" m":t<10?(e/1e3).toFixed(r?3:1)+" km":(e/1e3).toFixed(r?3:0)+" km"}function Pr(e,t,n){return t?Ir(e).toFixed(n?1:0)+" ft":e.toFixed(n?2:0)+" m"}function Rr(e){return e/1609.34}function Ir(e){return e/.3048}const Lr=e=>{const t=[],n=[];return ze(e).nodes().map((e=>e.getBBox())).forEach((e=>{t.push(e.width),n.push(e.height)})),{width:yn(t),height:yn(n)}};var Or=n(9502),zr={};zr.styleTagTransform=x(),zr.setAttributes=_(),zr.insert=m().bind(null,"head"),zr.domAPI=p(),zr.insertStyleElement=v(),d()(Or.Z,zr),Or.Z&&Or.Z.locals&&Or.Z.locals;const Fr=new class{constructor(){this.receivers=[],this.isDispatching=!1}dispatch(e){this.isDispatching&&console.error("No calls to 'dispatch' allowed while another dispatch is ongoing."),this.isDispatching=!0,this.receivers.forEach((t=>t.receive(e))),this.isDispatching=!1}register(e){this.receivers.push(e)}clear(){this.receivers=[]}};class Dr{constructor(e){this.result=e}}class jr{constructor(e,t){this.point=e,this.zoomResponse=t}}class Nr{constructor(e){this.profile=e}}class Br{constructor(e,t,n){this.atIndex=e,this.coordinate=t,this.isInitialized=n}}class qr{constructor(e){this.queryPoints=e}}class Gr{}class Vr{constructor(e){this.point=e}}class Wr{constructor(e,t){this.point=e,this.newIndex=t}}class Hr{constructor(e){this.point=e}}class Ur{constructor(e){this.enabled=e}}class Zr{constructor(e,t){this.customModelStr=e,this.issueRoutingRequest=t}}class Xr{constructor(e,t,n){this.result=n,this.request=e,this.zoom=t}}class Kr{constructor(e){this.message=e}}class $r extends Kr{constructor(e,t){super(t),this.request=e}}class Yr{}class Qr{constructor(e){this.path=e}}class Jr{}class ei{constructor(e){this.layer=e}}class ti{constructor(e){this.routingGraphEnabled=e}}class ni{constructor(e){this.urbanDensityEnabled=e}}class ri{constructor(e){this.externalMVTLayerEnabled=e}}class ii{}class oi{constructor(e,t){this.coordinate=e,this.zoom=t}}class si{constructor(e){this.bbox=e}}class ai{constructor(e){this.pathDetailsPoint=e}}class li{constructor(e){this.bbox=e}}class ui{constructor(e){this.segments=e}}class ci{constructor(e,t){this.point=e,this.properties=t}}class di{constructor(e,t){this.coordinate=e,this.text=t}}class hi{}class pi{constructor(e){this.enabled=e}}function fi(e){const t=Math.floor(e/36e5),n=Math.round(e%36e5/6e4);if(60==n)return t+1+" h";const r=t>0?t+" h":"";return 0==n&&r.length>0?r:(r?r+" ":"")+n+" min"}const mi=new Intl.NumberFormat(navigator.language,{maximumFractionDigits:1});function gi(e,t,n=!1){return t?e<160.934||n?Math.floor(e/.3048)+" ft":mi.format(e/1609.34)+" mi":e<1e3||n?Math.floor(e)+" m":mi.format(e/1e3)+" km"}function _i(e,t){return t?e<160.934?Math.floor(e/.3048)+"ft":e<160934?mi.format(e/1609.34)+"mi":Math.round(e/1609.34)+"mi":e<1e3?Math.floor(e)+"m":e<1e5?mi.format(e/1e3)+"km":Math.round(e/1e3)+"km"}function yi(e,t){let n=e.street&&t.indexOf(e.street)<0?e.street+(e.housenumber?" "+e.housenumber:"")+", ":"";return n+=function(e){return e.city&&e.postcode?e.postcode+" "+e.city:e.city?e.city:e.postcode?e.postcode:""}(e),e.state&&!n.includes(e.state)&&(n+=(n?", ":"")+e.state),e.country&&(n+=(n?", ":"")+e.country),n}function vi(e){return Math.round(1e6*e.lat)/1e6+","+Math.round(1e6*e.lng)/1e6}function bi(e){const t=e.split(/[,| s]/).filter((e=>e));if(2!==t.length)return null;const n={lat:Number.parseFloat(t[0]),lng:Number.parseFloat(t[1])};return isNaN(n.lng)||isNaN(n.lat)?null:n}const xi=config;var wi=n.n(xi);let ki;function Ci(){if(!ki)throw Error('Api must be initialized before it can be used. Use "setApi" when starting the app');return ki}class Si{constructor(e,t,n){this.routeCounter=0,this.lastRouteNumber=-1,this.apiKey=n,this.routingApi=e,this.geocodingApi=t}async info(){const e=await fetch(this.getRoutingURLWithKey("info").toString(),{headers:{Accept:"application/json"}}).catch((()=>{throw new Error("Could not connect to the Service. Try to reload!")})),t=await e.json();if(e.ok)return Si.convertToApiInfo(t);if(t.message)throw new Error(t.message);throw new Error("There has been an error. Server responded with "+e.statusText+" ("+e.status+")")}async geocode(e,t){if(!this.supportsGeocoding())return{hits:[],took:0};const n=this.getGeocodingURLWithKey("geocode");n.searchParams.append("q",e),n.searchParams.append("provider",t);const r=a().getLang().split("_");n.searchParams.append("locale",r.length>0?r[0]:"en"),n.searchParams.append("osm_tag","!place:county"),n.searchParams.append("osm_tag","!boundary"),n.searchParams.append("osm_tag","!historic");const i=await fetch(n.toString(),{headers:{Accept:"application/json"}});if(i.ok)return await i.json();throw new Error("Geocoding went wrong "+i.status)}supportsGeocoding(){return""!==this.geocodingApi}async route(e){const t=Si.createRequest(e),n=await fetch(this.getRoutingURLWithKey("route").toString(),{method:"POST",mode:"cors",body:JSON.stringify(t),headers:{Accept:"application/json","Content-Type":"application/json"}});if(n.ok){const e=await n.json();return{...e,paths:Si.decodeResult(e,t.elevation)}}if(500===n.status)throw new Error(l("route_timed_out"));if(400===n.status){const e=await n.json();let t=e.message;if(e.hints&&e.hints.length>0){let n="";e.hints.forEach((e=>{e.message.includes(t)||(n+=(n?" and ":"")+n,n+=e.message)})),n&&(t+=(t?" and ":"")+n)}throw new Error(t)}throw new Error(l("route_request_failed"))}routeWithDispatch(e,t){const n=this.routeCounter++;this.route(e).then((r=>{if(n>this.lastRouteNumber)this.lastRouteNumber=n,Fr.dispatch(new Xr(e,t,r));else{const t=JSON.stringify(e)+" "+n+" <= "+this.lastRouteNumber;console.log("Ignore response of earlier started route "+t)}})).catch((t=>{if(n>this.lastRouteNumber)console.warn("error when performing /route request "+n+": ",t),this.lastRouteNumber=n,Fr.dispatch(new $r(e,t.message));else{const r=JSON.stringify(e)+" "+n+" <= "+this.lastRouteNumber;console.log("Ignore error "+t.message+" of earlier started route "+r)}}))}getRoutingURLWithKey(e){const t=new URL(this.routingApi+e);return t.searchParams.append("key",this.apiKey),t}getGeocodingURLWithKey(e){const t=new URL(this.geocodingApi+e);return t.searchParams.append("key",this.apiKey),t}static createRequest(e){var t,n;let r=xi.profiles?xi.profiles[e.profile]:{},i=(null===(t=xi.request)||void 0===t?void 0:t.details)?xi.request.details:[];(null==r?void 0:r.details)&&(i=[...i,...r.details]);const o={points:e.points,profile:e.profile,elevation:!0,instructions:!0,locale:a().getLang(),points_encoded:!0,snap_preventions:(null===(n=xi.request)||void 0===n?void 0:n.snapPreventions)?xi.request.snapPreventions:[],...r,details:i};return e.customModel&&(o.custom_model=e.customModel,o["ch.disable"]=!0),e.points.length<=2&&e.maxAlternativeRoutes>1&&!o.curbsides?{...o,"alternative_route.max_paths":e.maxAlternativeRoutes,algorithm:"alternative_route"}:o}static convertToApiInfo(e){let t=[0,0,0,0],n="";const r=[];for(const t in e.profiles){const n={name:e.profiles[t].name};r.push(n)}for(const r in e)"bbox"===r?t=e[r]:"version"===r&&(n=e[r]);return{profiles:r,elevation:e.elevation,bbox:t,version:n,encoded_values:e.encoded_values}}static decodeResult(e,t){return e.paths.map((e=>({...e,points:Si.decodePoints(e,t),snapped_waypoints:Si.decodeWaypoints(e,t)}))).map((e=>({...e,instructions:Si.setPointsOnInstructions(e)})))}static decodePoints(e,t){return e.points_encoded?{type:"LineString",coordinates:Si.decodePath(e.points,t)}:e.points}static decodeWaypoints(e,t){return e.points_encoded?{type:"LineString",coordinates:Si.decodePath(e.snapped_waypoints,t)}:e.snapped_waypoints}static setPointsOnInstructions(e){return e.instructions?e.instructions.map((t=>({...t,points:e.points.coordinates.slice(t.interval[0],t.interval[1]+1)}))):e.instructions}static decodePath(e,t){const n=e.length;let r=0;const i=[];let o=0,s=0,a=0;for(;r<n;){let n,l=0,u=0;do{n=e.charCodeAt(r++)-63,u|=(31&n)<<l,l+=5}while(n>=32);o+=1&u?~(u>>1):u>>1,l=0,u=0;do{n=e.charCodeAt(r++)-63,u|=(31&n)<<l,l+=5}while(n>=32);if(s+=1&u?~(u>>1):u>>1,t){l=0,u=0;do{n=e.charCodeAt(r++)-63,u|=(31&n)<<l,l+=5}while(n>=32);a+=1&u?~(u>>1):u>>1,i.push([1e-5*s,1e-5*o,a/100])}else i.push([1e-5*s,1e-5*o])}return i}static isBikeLike(e){return e.includes("mtb")||e.includes("bike")}static isMotorVehicle(e){return e.includes("car")||e.includes("truck")||e.includes("scooter")}static isTruck(e){return e.includes("truck")}}class Ai{constructor(e){this._subscriptions=[],this._state=e}get state(){return this._state}receive(e){const t=this.reduce(this._state,e);t!==this._state&&this.setState(t)}register(e){this._subscriptions.push(e)}deregister(e){this._subscriptions=this._subscriptions.filter((t=>t!==e))}setState(e){this._state=e,this.notifyChanged()}notifyChanged(){this._subscriptions.forEach((e=>e()))}}function Ei(e,t){const n=e.lat,r=t.lat,i=e.lng,o=t.lng,s=Math.sin(Mi(r-n)/2),a=Math.sin(Mi(o-i)/2);return 12742e3*Math.asin(Math.sqrt(s*s+a*a*Math.cos(Mi(n))*Math.cos(Mi(r))))}function Mi(e){return.017453292519943295*e}const Ti={default_example:{distance_influence:15,priority:[{if:"road_environment == FERRY",multiply_by:"0.9"}],speed:[],areas:{type:"FeatureCollection",features:[]}},exclude_motorway:{priority:[{if:"road_class == MOTORWAY",multiply_by:"0.0"}]},limit_speed:{speed:[{if:"true",limit_to:"100"},{if:"road_class == TERTIARY",limit_to:"80"}]},cargo_bike:{speed:[{if:"road_class == TRACK",limit_to:"2"}],priority:[{if:"max_width < 1.5 || road_class == STEPS",multiply_by:"0"}]},bike_network:{priority:[{if:"bike_network == MISSING",multiply_by:"0.5"}]},combined:{distance_influence:100,speed:[{if:"road_class == TRACK || road_environment == FERRY || surface == DIRT",limit_to:"10"}],priority:[{if:"road_environment == TUNNEL || toll == ALL",multiply_by:"0.5"},{if:"max_weight < 3 || max_height < 2.5",multiply_by:"0.0"}]}};function Pi(e){return JSON.stringify(e,null,2)}function Ri(e,t=.005){return[e.lng-t,e.lat-t,e.lng+t,e.lat+t]}var Ii,Li;!function(e){e[e.From=0]="From",e[e.To=1]="To",e[e.Via=2]="Via"}(Ii||(Ii={})),function(e){e[e.SENT=0]="SENT",e[e.SUCCESS=1]="SUCCESS",e[e.FAILED=2]="FAILED"}(Li||(Li={}));class Oi extends Ai{constructor(e,t=null){super(Oi.getInitialState(t)),this.api=e}static getInitialState(e){const t=null!=e;e||(e=Pi(Ti.default_example));try{e=Pi(JSON.parse(e))}catch(e){}return{profiles:[],queryPoints:[Oi.getEmptyPoint(0,Ii.From),Oi.getEmptyPoint(1,Ii.To)],nextQueryPointId:2,currentRequest:{subRequests:[]},maxAlternativeRoutes:3,routingProfile:{name:""},customModelEnabled:t,customModelStr:e}}reduce(e,t){if(t instanceof Hr){const n=Oi.replacePoint(e.queryPoints,{...t.point,isInitialized:!1});return{...e,queryPoints:n}}if(t instanceof Gr){const t=e.queryPoints.map((e=>({...e,queryText:"",point:{lat:0,lng:0},isInitialized:!1})));return{...e,queryPoints:t}}if(t instanceof jr){const n={...e,queryPoints:Oi.replacePoint(e.queryPoints,t.point)};return this.routeIfReady(n,t.zoomResponse)}if(t instanceof Wr){const n=Oi.movePoint(e.queryPoints,t.point,t.newIndex).map(((t,n)=>{const r=Oi.getPointType(n,e.queryPoints.length);return{...t,color:Oi.getMarkerColor(r),type:r,id:this.state.nextQueryPointId+n}})),r={...e,nextQueryPointId:e.nextQueryPointId+e.queryPoints.length,queryPoints:n};return this.routeIfReady(r,!1)}if(t instanceof Br){const n=e.queryPoints.slice(),r=t.isInitialized?vi(t.coordinate):"";n.splice(t.atIndex,0,{coordinate:t.coordinate,id:e.nextQueryPointId,queryText:r,color:"",isInitialized:t.isInitialized,type:Ii.Via});const i=n.map(((e,t)=>{const r=Oi.getPointType(t,n.length);return{...e,color:Oi.getMarkerColor(r),type:r}})),o={...e,nextQueryPointId:e.nextQueryPointId+1,queryPoints:i};return this.routeIfReady(o,!0)}if(t instanceof qr){const n=t.queryPoints.map(((n,r)=>{const i=Oi.getPointType(r,t.queryPoints.length),o=n.isInitialized&&!n.queryText?vi(n.coordinate):n.queryText;return{...n,id:e.nextQueryPointId+r,type:i,color:Oi.getMarkerColor(i),queryText:o}}));for(;n.length<2;){const e=Oi.getPointType(n.length,2);n.push({id:n.length,type:e,color:Oi.getMarkerColor(e),queryText:"",isInitialized:!1,coordinate:{lat:0,lng:0}})}const r=e.nextQueryPointId+n.length;return this.routeIfReady({...e,queryPoints:n,nextQueryPointId:r},!0)}if(t instanceof Vr){const n=e.queryPoints.filter((e=>e.id!==t.point.id)).map(((t,n)=>{const r=Oi.getPointType(n,e.queryPoints.length-1);return{...t,color:Oi.getMarkerColor(r),type:r}})),r={...e,queryPoints:n};return this.routeIfReady(r,!0)}if(t instanceof Dr){if(t.result.profiles.length<=0)return e;const n=wi().profiles?Object.keys(wi().profiles).map((e=>({name:e}))):t.result.profiles,r=e.routingProfile.name?e.routingProfile:n[0];return this.routeIfReady({...e,profiles:n,routingProfile:r},!0)}if(t instanceof Nr){const n={...e,routingProfile:t.profile};return this.routeIfReady(n,!0)}if(t instanceof Zr){const n={...e,customModelStr:t.customModelStr};return t.issueRoutingRequest?this.routeIfReady(n,!0):n}if(t instanceof Xr||t instanceof $r)return Oi.handleFinishedRequest(e,t);if(t instanceof Ur){const n={...e,customModelEnabled:t.enabled};return this.routeIfReady(n,!0)}return e}static handleFinishedRequest(e,t){const n=t instanceof Xr?Li.SUCCESS:Li.FAILED,r=Oi.replaceSubRequest(e.currentRequest.subRequests,t.request,n);return{...e,currentRequest:{subRequests:r}}}routeIfReady(e,t){if(Oi.isReadyToRoute(e)){let n;const r=function(e){let t=0;for(let n=1;n<e.length;n++){const r=Ei(e[n-1].coordinate,e[n].coordinate);t=Math.max(r,t)}return t}(e.queryPoints);if(e.customModelEnabled)if(r<2e5)n=[Oi.buildRouteRequest(e)];else{if(!(r<5e5))return Fr.dispatch(new Kr("Using the custom model feature is unfortunately not possible when the request points are further than "+gi(5e5,!1)+" apart.")),e;n=[Oi.buildRouteRequest({...e,maxAlternativeRoutes:1})]}else n=[Oi.buildRouteRequest({...e,maxAlternativeRoutes:1})],2===e.queryPoints.length&&e.maxAlternativeRoutes>1&&(Si.isMotorVehicle(e.routingProfile.name)||r<5e5)&&n.push(Oi.buildRouteRequest(e));return{...e,currentRequest:{subRequests:this.send(n,t)}}}return e}send(e,t){const n=e.map((e=>({args:e,state:Li.SENT})));return n.forEach(((e,n)=>this.api.routeWithDispatch(e.args,0==n&&t))),n}static isReadyToRoute(e){if(e.customModelEnabled)try{JSON.parse(e.customModelStr)}catch{return!1}return!(e.queryPoints.length<=1||!e.queryPoints.every((e=>e.isInitialized))||!e.routingProfile.name)}static movePoint(e,t,n){if(n<0)return e;const r=e.filter(((e,r)=>e.id!=t.id||(r<n&&n--,!1)));return n>=e.length?e:(r.splice(n,0,t),r)}static replacePoint(e,t){return zi(e,(e=>e.id===t.id),(()=>t))}static replaceSubRequest(e,t,n){return zi(e,(e=>e.args===t),(e=>({...e,state:n})))}static getMarkerColor(e){switch(e){case Ii.From:return"#7cb342";case Ii.To:return"#F97777";default:return"#76D0F7"}}static getPointType(e,t){return 0===e?Ii.From:e===t-1?Ii.To:Ii.Via}static buildRouteRequest(e){const t=e.queryPoints.map((e=>[e.coordinate.lng,e.coordinate.lat]));let n=null;if(e.customModelEnabled)try{n=JSON.parse(e.customModelStr)}catch{}return{points:t,profile:e.routingProfile.name,maxAlternativeRoutes:e.maxAlternativeRoutes,customModel:n}}static getEmptyPoint(e,t){return{isInitialized:!1,queryText:"",coordinate:{lat:0,lng:0},id:e,color:Oi.getMarkerColor(t),type:t}}}function zi(e,t,n){const r=[];for(const i of e)t(i)?r.push(n(i)):r.push(i);return r}const Fi=u.createContext(!1);function Di({selectedPath:t}){const n=(0,u.useRef)(null),r=(0,u.useRef)(null),[i,o]=(0,u.useState)(null);(0,u.useEffect)((()=>{const e={width:ji(n.current.clientWidth),height:160,expandControls:!0},t={pointSelectedCallback:Ni,areaSelectedCallback:Bi,routeSegmentsSelectedCallback:qi};o(new Mr(r.current,e,t))}),[r]);const s=()=>{null==i||i.resize({width:ji(n.current.clientWidth)})};(0,u.useEffect)((()=>(window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)))),(0,u.useEffect)((()=>{const e=function(e){const t=e.points.coordinates.map((e=>2==e.length?[...e,0]:e)),n={data:[],mappings:{}},r=Wi(l("elevation"),[Vi(t,"elevation")]);n.data.push(r),n.mappings[l("elevation")]=function(){return{text:l("elevation"),color:Oi.getMarkerColor(Ii.From)}};const i=[];for(let e=0;e<t.length-1;e++){const n=t[e],r=t[e+1],o=Hi(n,r),s=0==o?0:100*(r[2]-n[2])/o,a=3*Math.round(s/3);i.push(Vi([n,r],a))}const o=Wi(l("slope"),i);if(n.data.push(o),n.mappings[l("slope")]=Gi,e.details.edge_id){const r=e.details.edge_id,i=[];for(let e=0;e<r.length;e++){const n=t.slice(r[e][0],r[e][1]+1),o=n[0],s=n[n.length-1],a=Hi(o,s),l=0==a?0:100*(s[2]-o[2])/a,u=3*Math.round(l/3);let c=0;for(let e=0;e<n.length;e++){const t=c/a;let r=o[2]+t*(s[2]-o[2]);e===n.length-1&&(r=s[2]),n[e]=[n[e][0],n[e][1],r],e<n.length-1&&(c+=Hi(n[e],n[e+1]))}i.push(Vi(n,u))}const o=Wi(l("towerslope"),i);n.data.push(o),n.mappings[l("towerslope")]=Gi}return Object.entries(e.details).map((([e,r])=>{const i=r.map((([e,n,r="Undefined"])=>Vi(t.slice(e,n+1),r)));n.data.push(Wi(l(e),i)),n.mappings[l(e)]=function(e){const t=function(e){const t=new Set;let n,r,i=0;for(let o=0;o<e.length;o++){const s=e[o][2];"number"==typeof s&&(n||(n=s),r||(r=s),t.add(s),i++,n=Math.min(s,n),r=Math.max(s,r))}return{numeric:i===e.length,minVal:n,maxVal:r}}(e);if(!0===t.numeric&&t.minVal!==t.maxVal){const e=[0,153,247],n=[241,23,18];return function(r){const i=(r-t.minVal)/(t.maxVal-t.minVal),o=[];for(let t=0;t<3;t++)o.push(e[t]+i*(n[t]-e[t]));return{text:""+r,color:"rgb("+o[0]+", "+o[1]+", "+o[2]+")"}}}{const t=e.map((e=>e[2]));return function(e){const n=["#332288","#88ccee","#44aa99","#117733","#999933","#ddcc77","#cc6677","#882255","#aa4499"],r=t.indexOf(e)%n.length;return{text:e,color:"missing"===e||"unclassified"===e||"Undefined"===e?"#dddddd":n[r]}}}}(r)})),n}(t);null==i||i.setData(e.data,e.mappings)}),[t,i]);const a=(0,u.useContext)(Fi);(0,u.useEffect)((()=>{null==i||i.setImperial(a),null==i||i.redraw()}),[i,a]);const c={display:0!==t.points.coordinates.length?null:"none"};return(0,e.jsx)("div",{className:C.heightgraphContainer,ref:n,children:(0,e.jsx)("div",{className:C.innerDiv,style:c,ref:r})})}function ji(e){return Math.min(e,1e3)}function Ni(e,t,n){Fr.dispatch(new ai(e?{point:e,elevation:t,description:n}:null))}function Bi(e){Fr.dispatch(new li(e?[e.sw.lng,e.sw.lat,e.ne.lng,e.ne.lat]:null))}function qi(e){Fr.dispatch(new ui(e))}function Gi(e){const t=[0,153,247],n=[241,23,18],r=Math.min(25,Math.abs(e))/25,i=[0,1,2].map((e=>t[e]+r*(n[e]-t[e])));return{text:e<0?"↘ "+(-e-3).toFixed(0)+"-"+(-e).toFixed(0)+"%":"↗ "+e.toFixed(0)+"-"+(e+3).toFixed(0)+"%",color:Number.isNaN(e)?"red":"rgb("+i[0]+", "+i[1]+", "+i[2]+")"}}function Vi(e,t){return{type:"Feature",geometry:{type:"LineString",coordinates:e},properties:{attributeType:t}}}function Wi(e,t){return{type:"FeatureCollection",features:t,properties:{summary:e,records:t.length}}}function Hi(e,t){return Ei({lat:e[1],lng:e[0]},{lat:t[1],lng:t[0]})}var Ui=n(5481),Zi={};Zi.styleTagTransform=x(),Zi.setAttributes=_(),Zi.insert=m().bind(null,"head"),Zi.domAPI=p(),Zi.insertStyleElement=v(),d()(Ui.Z,Zi);const Xi=Ui.Z&&Ui.Z.locals?Ui.Z.locals:void 0;let Ki,$i,Yi,Qi,Ji,eo,to,no;const ro=()=>Ki,io=()=>$i,oo=()=>Yi,so=()=>Qi,ao=()=>Ji,lo=()=>eo,uo=()=>to,co=()=>no;var ho=n(1788),po={};po.styleTagTransform=x(),po.setAttributes=_(),po.insert=m().bind(null,"head"),po.domAPI=p(),po.insertStyleElement=v(),d()(ho.Z,po),ho.Z&&ho.Z.locals&&ho.Z.locals;var fo=n(961),mo={};mo.styleTagTransform=x(),mo.setAttributes=_(),mo.insert=m().bind(null,"head"),mo.domAPI=p(),mo.insertStyleElement=v(),d()(fo.Z,mo);const go=fo.Z&&fo.Z.locals?fo.Z.locals:void 0;function _o({map:t}){const n=(0,u.useRef)(null);return(0,u.useEffect)((()=>{t.setTarget(n.current)}),[t]),(0,e.jsx)("div",{ref:n,className:go.mapContainer})}var yo=n(2665),vo={};vo.styleTagTransform=x(),vo.setAttributes=_(),vo.insert=m().bind(null,"head"),vo.domAPI=p(),vo.insertStyleElement=v(),d()(yo.Z,vo);const bo=yo.Z&&yo.Z.locals?yo.Z.locals:void 0;var xo=n(2963),wo={};wo.styleTagTransform=x(),wo.setAttributes=_(),wo.insert=m().bind(null,"head"),wo.domAPI=p(),wo.insertStyleElement=v(),d()(xo.Z,wo);const ko=xo.Z&&xo.Z.locals?xo.Z.locals:void 0;function Co(t){const n=ko.button+" "+t.className;return(0,e.jsx)("button",{...t,className:n,children:t.children})}var So;function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ao.apply(this,arguments)}const Eo=function(e){return u.createElement("svg",Ao({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"layer-group-solid_svg__svg-inline--fa layer-group-solid_svg__fa-layer-group layer-group-solid_svg__fa-w-16","data-icon":"layer-group","data-prefix":"fas",viewBox:"0 0 512 512"},e),So||(So=u.createElement("path",{fill:"currentColor",d:"m12.41 148.02 232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"})))};function Mo(t){const[n,r]=(0,u.useState)(!1);return(0,e.jsx)("div",{className:bo.mapOptionsContainer,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:n?(0,e.jsx)(To,{storeState:t,notifyChanged:()=>r(!1)}):(0,e.jsx)(Co,{className:bo.layerButton,onClick:()=>r(!0),children:(0,e.jsx)(Eo,{})})})}const To=function({storeState:t,notifyChanged:n}){return(0,e.jsxs)("div",{className:bo.options,children:[(0,e.jsx)("div",{onChange:e=>{var t;n(),t=e.target,Fr.dispatch(new ei(t.value))},children:t.styleOptions.map((n=>(0,e.jsxs)("div",{className:bo.option,children:[(0,e.jsx)("input",{type:"radio",id:n.name,name:"layer",value:n.name,defaultChecked:n===t.selectedStyle,disabled:!t.isMapLoaded}),(0,e.jsx)("label",{htmlFor:n.name,children:n.name+("vector"===n.type?" (Vector)":"")})]},n.name)))}),xi.routingGraphLayerAllowed&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:bo.option,children:[(0,e.jsx)("input",{type:"checkbox",id:"routing-graph-checkbox",checked:t.routingGraphEnabled,onChange:e=>{n(),Fr.dispatch(new ti(e.target.checked))}}),(0,e.jsx)("label",{htmlFor:"routing-graph-checkbox",children:"Show Routing Graph"})]}),(0,e.jsxs)("div",{className:bo.option,children:[(0,e.jsx)("input",{type:"checkbox",id:"urban-density-checkbox",checked:t.urbanDensityEnabled,onChange:e=>{n(),Fr.dispatch(new ni(e.target.checked))}}),(0,e.jsx)("label",{htmlFor:"urban-density-checkbox",children:"Show Urban Density"})]})]}),xi.externalMVTLayer&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:bo.option,children:[(0,e.jsx)("input",{type:"checkbox",id:"external-mvt-layer-checkbox",checked:t.externalMVTEnabled,onChange:e=>{n(),Fr.dispatch(new ri(e.target.checked))}}),(0,e.jsx)("label",{htmlFor:"external-mvt-layer-checkbox",children:"Show External MVT"})]})})]})};var Po=n(2185),Ro={};Ro.styleTagTransform=x(),Ro.setAttributes=_(),Ro.insert=m().bind(null,"head"),Ro.domAPI=p(),Ro.insertStyleElement=v(),d()(Po.Z,Ro);const Io=Po.Z&&Po.Z.locals?Po.Z.locals:void 0;var Lo=n(271),Oo={};Oo.styleTagTransform=x(),Oo.setAttributes=_(),Oo.insert=m().bind(null,"head"),Oo.domAPI=p(),Oo.insertStyleElement=v(),d()(Lo.Z,Oo);const zo=Lo.Z&&Lo.Z.locals?Lo.Z.locals:void 0;var Fo;function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Do.apply(this,arguments)}const jo=function(e){return u.createElement("svg",Do({xmlns:"http://www.w3.org/2000/svg",className:"minus-circle-solid_svg__svg-inline--fa minus-circle-solid_svg__fa-minus-circle minus-circle-solid_svg__fa-w-16","data-icon":"minus-circle","data-prefix":"fas",viewBox:"0 0 512 512"},e),Fo||(Fo=u.createElement("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zM124 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H124z"})))};var No;function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bo.apply(this,arguments)}const qo=function(e){return u.createElement("svg",Bo({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,"aria-hidden":"true",className:"plus-circle-solid_svg__svg-inline--fa plus-circle-solid_svg__fa-plus-circle plus-circle-solid_svg__fa-w-16","data-icon":"plus-circle","data-prefix":"fas",viewBox:"0 0 512 512"},e),No||(No=u.createElement("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"})))};var Go;function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vo.apply(this,arguments)}const Wo=function(e){return u.createElement("svg",Vo({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 0 50 50"},e),Go||(Go=u.createElement("path",{d:"M6 40V8l38 16Zm3-4.65L36.2 24 9 12.5v8.4L21.1 24 9 27Zm0 0V12.5 27Z"})))};var Ho=n(4023),Uo={};Uo.styleTagTransform=x(),Uo.setAttributes=_(),Uo.insert=m().bind(null,"head"),Uo.domAPI=p(),Uo.insertStyleElement=v(),d()(Ho.Z,Uo);const Zo=Ho.Z&&Ho.Z.locals?Ho.Z.locals:void 0;var Xo,Ko;function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}const Yo=function(e){return u.createElement("svg",$o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Xo||(Xo=u.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"})),Ko||(Ko=u.createElement("path",{fill:"currentColor",d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V2c0-.55-.45-1-1-1s-1 .45-1 1v1.06A8.994 8.994 0 0 0 3.06 11H2c-.55 0-1 .45-1 1s.45 1 1 1h1.06A8.994 8.994 0 0 0 11 20.94V22c0 .55.45 1 1 1s1-.45 1-1v-1.06A8.994 8.994 0 0 0 20.94 13H22c.55 0 1-.45 1-1s-.45-1-1-1h-1.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})))};class Qo{constructor(e,t,n,r){this.mainText=e,this.secondText=t,this.point=n,this.bbox=r}toText(){return this.mainText+", "+this.secondText}}class Jo{}class es{constructor(e){this.search=e}}function ts({items:t,highlightedItem:n,onSelect:r,setPointerDown:i}){return(0,e.jsx)("ul",{onPointerDown:()=>i(!0),onPointerUp:()=>i(!1),onPointerLeave:()=>i(!1),children:t.map(((t,i)=>(0,e.jsx)("li",{className:Zo.autocompleteItem,children:ns(t,n===t,r)},i)))})}function ns(t,n,r){if(t instanceof Qo)return(0,e.jsx)(os,{item:t,isHighlighted:n,onSelect:r});if(t instanceof Jo)return(0,e.jsx)(is,{item:t,isHighlighted:n,onSelect:r});if(t instanceof es)return(0,e.jsx)(rs,{item:t,isHighlighted:n,onSelect:r});throw Error("Unsupported item type: "+typeof t)}function rs({item:t,isHighlighted:n,onSelect:r}){return(0,e.jsx)(ss,{isHighlighted:n,onSelect:()=>r(t),children:(0,e.jsx)("div",{className:Zo.moreResultsEntry,children:(0,e.jsx)("span",{className:Zo.moreResultsText,children:l("search_with_nominatim")})})})}function is({item:t,isHighlighted:n,onSelect:r}){return(0,e.jsx)(ss,{isHighlighted:n,onSelect:()=>r(t),children:(0,e.jsxs)("div",{className:Zo.currentLocationEntry,children:[(0,e.jsx)("div",{className:Zo.currentLocationIcon,children:(0,e.jsx)(Yo,{})}),(0,e.jsx)("span",{className:Zo.mainText,children:l("current_location")})]})})}function os({item:t,isHighlighted:n,onSelect:r}){return(0,e.jsx)(ss,{isHighlighted:n,onSelect:()=>r(t),children:(0,e.jsxs)("div",{className:Zo.geocodingEntry,title:t.toText(),children:[(0,e.jsx)("span",{className:Zo.mainText,children:t.mainText}),(0,e.jsx)("span",{className:Zo.secondaryText,children:t.secondText})]})})}function ss({isHighlighted:t,children:n,onSelect:r}){const i=t?Zo.selectableItem+" "+Zo.highlightedItem:Zo.selectableItem;return(0,e.jsx)("button",{className:i,onClick:()=>r(),children:n})}var as;function ls(){return ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ls.apply(this,arguments)}const us=function(e){return u.createElement("svg",ls({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 -960 960 960"},e),as||(as=u.createElement("path",{fill:"currentColor",d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})))};var cs;function ds(){return ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ds.apply(this,arguments)}const hs=function(e){return u.createElement("svg",ds({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 -960 960 960"},e),cs||(cs=u.createElement("path",{fill:"currentColor",d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})))};var ps=n(515),fs={};fs.styleTagTransform=x(),fs.setAttributes=_(),fs.insert=m().bind(null,"head"),fs.domAPI=p(),fs.insertStyleElement=v(),d()(ps.Z,fs);const ms=ps.Z&&ps.Z.locals?ps.Z.locals:void 0;var gs=n(3266),_s=n(3961),ys=n(7878),vs={};vs.styleTagTransform=x(),vs.setAttributes=_(),vs.insert=m().bind(null,"head"),vs.domAPI=p(),vs.insertStyleElement=v(),d()(ys.Z,vs);const bs=ys.Z&&ys.Z.locals?ys.Z.locals:void 0;function xs({children:e,inputElement:t,keepClearAtBottom:n}){const r=(0,u.useRef)(document.createElement("div")),i=(0,u.useRef)(document.getElementById(NE)),o=function(e,t){const[n,r]=(0,u.useState)(DOMRect.fromRect());return(0,u.useEffect)((()=>{t&&r(t.getBoundingClientRect())}),[t]),(0,u.useEffect)((()=>{const n=()=>{r(t.getBoundingClientRect())},i=document.getElementById(e);return i&&i.addEventListener("scroll",n,{passive:!0}),()=>{i&&i.removeEventListener("scroll",n)}}),[t]),n}(BE,t);return(0,u.useEffect)((()=>(r.current.className=bs.popup,i.current.appendChild(r.current),()=>{i.current.removeChild(r.current)})),[r]),(0,u.useEffect)((()=>{const e=i.current.getBoundingClientRect();e.bottom-o.bottom>n?function(e,t,n){const r=e.bottom-t.top,i=e.left-t.left;n.style.top=r+"px",n.style.bottom="",n.style.left=i+"px",n.style.width=e.width+"px"}(o,e,r.current):function(e,t,n){const r=t.bottom-e.bottom+e.height,i=e.left-t.left;n.style.bottom=r+"px",n.style.top="",n.style.left=i+"px",n.style.width=e.width+"px"}(o,e,r.current)}),[o]),(0,_s.createPortal)(e,r.current)}function ws(t){const[n,r]=(0,u.useState)(t.point.queryText);(0,u.useEffect)((()=>r(t.point.queryText)),[t.point.queryText]);const[i,o]=(0,u.useState)(!1),[s,a]=(0,u.useState)(!1),c=(0,gs.useMediaQuery)({query:"(max-width: 44rem)"}),[d,h]=(0,u.useState)([]),[p]=(0,u.useState)(new Ss(Ci(),((e,t,n)=>{const r=n.map((e=>{const n="nominatim"===t?function(e){const t=e.name?e.name:e.country,n=e.street?e.street+(e.housenumber?" "+e.housenumber:""):"",r=e.street&&0==t.indexOf(e.street)?n:t.split(",")[0];return{mainText:r,secondText:(!r.includes(n)&&n.length>0?n+", ":"")+(!r.includes(e.postcode)&&e.postcode?e.postcode+" ":"")+(!r.includes(e.city)&&e.city?e.city+", ":"")+(!r.includes(e.state)&&e.state?e.state+", ":"")+e.country}}(e):function(e){const t=e.street&&e.name.indexOf(e.street)>=0?e.street+(e.housenumber?" "+e.housenumber:""):e.name;return{mainText:t,secondText:yi(e,t)}}(e);return new Qo(n.mainText,n.secondText,e.point,e.extent?e.extent:Ri(e.point))}));"nominatim"!==t&&Ci().supportsGeocoding()?(r.push(new es(e)),h(r)):h(r)})));function f(){p.cancel(),h([])}(0,u.useEffect)((()=>h([])),[t.point]),(0,u.useEffect)((()=>{i&&0==n.length&&0===d.length&&h([new Jo])}),[d,i]);const[m,g]=(0,u.useState)(-1);(0,u.useEffect)((()=>g(-1)),[d]);const _=(0,u.useRef)(null),y=(0,u.useRef)(null),v=(0,u.useCallback)((e=>{const r=e.target;if("Escape"===e.key)return r.blur(),o(!1),void f();switch(e.key){case"ArrowUp":g((e=>Cs(d.length,e,-1)));break;case"ArrowDown":g((e=>Cs(d.length,e,1)));break;case"Enter":case"Tab":const e=bi(n);if(e)t.onAddressSelected(n,e,Ri(e));else if(d.length>0){const e=d[m>=0?m:0];e instanceof Qo&&t.onAddressSelected(e.toText(),e.point,e.bbox)}r.blur(),o(!1),f()}}),[d,m]),b=i?ms.container+" "+ms.fullscreen:ms.container,x=t.point.type;return(0,e.jsx)("div",{className:b,children:(0,e.jsxs)("div",{ref:_,className:[ms.inputContainer,t.dropPreviewIndex==t.index?t.dropPreviewIndex<t.moveStartIndex?ms.topBorder:ms.bottomBorder:{}].join(" "),children:[(0,e.jsx)(Co,{className:ms.btnClose,onClick:()=>{o(!1),f()},children:(0,e.jsx)(us,{})}),(0,e.jsx)("input",{style:t.moveStartIndex==t.index?{borderWidth:"2px",margin:"-1px"}:{},className:ms.input,type:"text",ref:y,autoComplete:"off",onChange:e=>{r(e.target.value),bi(e.target.value)||p.request(e.target.value,"default"),t.onChange(e.target.value)},onKeyDown:v,onFocus:()=>{o(!0),t.clearDragDrop()},onBlur:()=>{c||s||(o(!1),f(),a(!1))},value:n,placeholder:l(x==Ii.From?"from_hint":x==Ii.To?"to_hint":"via_hint")}),(0,e.jsx)(Co,{style:0==n.length?{display:"none"}:{},className:ms.btnInputClear,onMouseDown:()=>a(!0),onMouseLeave:()=>a(!1),onMouseUp:()=>a(!1),onClick:()=>{r(""),t.onChange(""),y.current.focus()},children:(0,e.jsx)(hs,{})}),d.length>0&&(0,e.jsx)(ks,{inputRef:_.current,index:t.index,isSmallScreen:c,children:(0,e.jsx)(ts,{items:d,highlightedItem:d[m],setPointerDown:a,onSelect:e=>{var n;o(!1),e instanceof Qo?(f(),t.onAddressSelected(e.toText(),e.point,e.bbox)):e instanceof Jo?(f(),n=t.onAddressSelected,navigator.geolocation?(n(l("searching_location")+" ...",void 0,void 0),navigator.geolocation.getCurrentPosition((e=>{const t={lat:e.coords.latitude,lng:e.coords.longitude};n(l("current_location"),t,Ri(t))}),(e=>{Fr.dispatch(new Kr(l("searching_location_failed")+": "+e.message)),n("",void 0,void 0)}),{timeout:3e5,enableHighAccuracy:!0})):Fr.dispatch(new Kr("Geolocation is not supported in this browser"))):e instanceof es&&(bi(e.search)||p.request(e.search,"nominatim"))}})})]})})}function ks({inputRef:t,children:n,index:r,isSmallScreen:i}){return(0,e.jsx)(e.Fragment,{children:i?(0,e.jsx)("div",{className:ms.smallList,children:n}):(0,e.jsx)(xs,{inputElement:t,keepClearAtBottom:r>5?270:0,children:n})})}function Cs(e,t,n){const r=t+n;return r>=e?0:r<0?e-1:r}class Ss{constructor(e,t){this.requestId=0,this.timeout=new As(200),this.api=e,this.onSuccess=t}request(e,t){this.requestAsync(e,t).then((()=>{}))}cancel(){this.getNextId()}async requestAsync(e,t){const n=this.getNextId();if(this.timeout.cancel(),e&&!(e.length<2)){await this.timeout.wait();try{const r=await this.api.geocode(e,t),i=Ss.filterDuplicates(r.hits);n===this.requestId&&this.onSuccess(e,t,i)}catch(e){throw Error("Could not get geocoding results because: "+e)}}}getNextId(){return this.requestId++,this.requestId}static filterDuplicates(e){const t=new Set;return e.filter((e=>!t.has(e.osm_id)&&(t.add(e.osm_id),!0)))}}class As{constructor(e){this.handle=0,this.delay=e}wait(){return new Promise((e=>{this.handle=window.setTimeout(e,this.delay)}))}cancel(){clearTimeout(this.handle)}}const Es="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z",Ms="M192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z",Ts={cursor:"pointer",stroke:"none"};function Ps({color:t,number:n,size:r=0,cursor:i}){return(0,e.jsxs)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",height:r,style:{...Ts,fill:t,cursor:i||Ts.cursor},children:[(0,e.jsx)("path",{d:Es}),void 0===n?(0,e.jsx)("path",{d:Ms,fill:"white"}):(0,e.jsx)("circle",{cx:"192",cy:"190",r:"150",fill:"white"}),(0,e.jsx)("text",{x:"50%",y:"55%",textAnchor:"middle",style:{fontSize:210},fill:"black",children:void 0!==n?n:""})]})}var Rs=n(4507),Is={};Is.styleTagTransform=x(),Is.setAttributes=_(),Is.insert=m().bind(null,"head"),Is.domAPI=p(),Is.insertStyleElement=v(),d()(Rs.Z,Is);const Ls=Rs.Z&&Rs.Z.locals?Rs.Z.locals:void 0;var Os;function zs(){return zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zs.apply(this,arguments)}const Fs=function(e){return u.createElement("svg",zs({xmlns:"http://www.w3.org/2000/svg",width:48,height:48},e),Os||(Os=u.createElement("path",{fill:"currentColor",d:"M14 36q-5 0-8.5-3.5T2 24q0-5 3.5-8.5T14 12h20q5 0 8.5 3.5T46 24q0 5-3.5 8.5T34 36Zm0-3h20q3.75 0 6.375-2.625T43 24q0-3.75-2.625-6.375T34 15H14q-3.75 0-6.375 2.625T5 24q0 3.75 2.625 6.375T14 33Zm20.05-3.95q2.1 0 3.575-1.475T39.1 24q0-2.1-1.475-3.575T34.05 18.95q-2.1 0-3.575 1.475T29 24q0 2.1 1.475 3.575t3.575 1.475ZM24 24Z"})))};var Ds;function js(){return js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},js.apply(this,arguments)}const Ns=function(e){return u.createElement("svg",js({xmlns:"http://www.w3.org/2000/svg",width:48,height:48},e),Ds||(Ds=u.createElement("path",{fill:"currentColor",d:"M14 36q-5 0-8.5-3.5T2 24q0-5 3.5-8.5T14 12h20q5 0 8.5 3.5T46 24q0 5-3.5 8.5T34 36Zm0-3h20q3.75 0 6.375-2.625T43 24q0-3.75-2.625-6.375T34 15H14q-3.75 0-6.375 2.625T5 24q0 3.75 2.625 6.375T14 33Zm-.05-3.95q2.1 0 3.575-1.475T19 24q0-2.1-1.475-3.575T13.95 18.95q-2.1 0-3.575 1.475T8.9 24q0 2.1 1.475 3.575t3.575 1.475ZM24 24Z"})))};function Bs(){const t=(0,u.useContext)(Fi);return(0,e.jsxs)("div",{className:Ls.parent,children:[(0,e.jsx)("div",{className:Ls.title,children:l("settings")}),(0,e.jsxs)("div",{className:Ls.settingsTable,children:[(0,e.jsx)(Co,{style:{color:t?"":"lightgray"},onClick:()=>Fr.dispatch(new hi),children:t?(0,e.jsx)(Fs,{}):(0,e.jsx)(Ns,{})}),(0,e.jsx)("div",{style:{color:t?"#5b616a":"gray"},children:l("distance_unit",[l(t?"mi":"km")])})]}),(0,e.jsxs)("div",{className:Ls.infoLine,children:[(0,e.jsx)("a",{href:"https://www.graphhopper.com/maps-route-planner/",children:l("info")}),(0,e.jsx)("a",{href:"https://github.com/graphhopper/graphhopper-maps/issues",children:l("feedback")}),(0,e.jsx)("a",{href:"https://www.graphhopper.com/imprint/",children:l("imprint")}),(0,e.jsx)("a",{href:"https://www.graphhopper.com/privacy/",children:l("privacy")}),(0,e.jsx)("a",{href:"https://www.graphhopper.com/terms/",children:l("terms")})]})]})}function qs({points:t}){const[n,r]=(0,u.useState)(!1),[i,o]=(0,u.useState)(!0),[s,a]=(0,u.useState)(-1),[c,d]=(0,u.useState)(-1);return(0,e.jsxs)("div",{className:zo.searchBoxParent,children:[(0,e.jsx)("div",{className:zo.searchBox,children:t.map(((n,r)=>(0,e.jsx)(Gs,{index:r,points:t,deletable:t.length>2,onChange:()=>{Fr.dispatch(new Yr),Fr.dispatch(new Hr(n))},showTargetIcons:i,moveStartIndex:s,onMoveStartSelect:(e,t)=>{a(e),o(t)},dropPreviewIndex:c,onDropPreviewSelect:d},n.id)))}),(0,e.jsxs)("div",{className:zo.lastSearchLine,children:[(0,e.jsxs)(Co,{style:i&&s>=0&&s+1<t.length?{paddingTop:"2rem"}:{},onClick:()=>Fr.dispatch(new Br(t.length,{lat:0,lng:0},!1)),className:zo.addSearchBox,children:[(0,e.jsx)(qo,{}),(0,e.jsx)("div",{children:l("add_to_route")})]}),(0,e.jsx)(Co,{className:zo.settingsButton,onClick:()=>r(!n),children:l(n?"settings_close":"settings")})]}),n&&(0,e.jsx)(Bs,{})]})}const Gs=({index:t,points:n,onChange:r,deletable:i,moveStartIndex:o,showTargetIcons:s,onMoveStartSelect:a,dropPreviewIndex:c,onDropPreviewSelect:d})=>{const h=n[t],p=(0,u.useRef)(null);function f(){d(-1);const e=o<t?t+1:t;Fr.dispatch(new Wr(n[o],e)),a(t,!1),setTimeout((()=>{a(-1,!0)}),1e3)}return(0,u.useEffect)((()=>{var e;0==t&&(null===(e=p.current)||void 0===e||e.focus())}),[]),(0,e.jsxs)(e.Fragment,{children:[(o<0||o==t)&&(0,e.jsx)("div",{ref:p,tabIndex:-1,title:l("drag_to_reorder"),className:zo.markerContainer,draggable:!0,onDragStart:()=>{o!=t&&(a(t,!0),d(-1))},onDragEnd:()=>{a(-1,!0),d(-1)},onClick:()=>{o==t?(a(-1,!0),d(-1)):a(t,!0)},children:(0,e.jsx)(Ps,{number:t>0&&t+1<n.length?t:void 0,cursor:"ns-resize",color:o>=0?"gray":h.color})}),o>=0&&o!=t&&(0,e.jsx)(Co,{title:l("click to move selected input here"),className:[s?"":zo.hide,zo.markerTarget,c>=0&&c==t?zo.dropPreview:""].join(" "),style:o>t?{marginTop:"-2.4rem"}:{marginBottom:"-2.4rem"},onDragOver:e=>{e.preventDefault(),d(t)},onDragLeave:()=>d(-1),onDrop:f,onClick:f,children:(0,e.jsx)(Wo,{})}),(0,e.jsx)("div",{className:zo.searchBoxInput,children:(0,e.jsx)(ws,{moveStartIndex:o,dropPreviewIndex:c,index:t,point:h,onCancel:()=>console.log("cancel"),onAddressSelected:(e,t)=>{const r=n.filter((e=>e.isInitialized)).length;t&&0==r&&Fr.dispatch(new si(Ri(t))),Fr.dispatch(new jr({...h,isInitialized:!!t,queryText:e,coordinate:t||h.coordinate},r>0))},clearDragDrop:()=>{a(-1,!0),d(-1)},onChange:r})}),i&&(0,e.jsx)(Co,{title:l("delete_from_route"),onClick:()=>{Fr.dispatch(new Vr(h)),a(-1,!0)},className:zo.removeSearchBox,children:(0,e.jsx)(jo,{})})]})};var Vs=n(593),Ws={};Ws.styleTagTransform=x(),Ws.setAttributes=_(),Ws.insert=m().bind(null,"head"),Ws.domAPI=p(),Ws.insertStyleElement=v(),d()(Vs.Z,Ws);const Hs=Vs.Z&&Vs.Z.locals?Vs.Z.locals:void 0;var Us;function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zs.apply(this,arguments)}const Xs=function(e){return u.createElement("svg",Zs({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"times-solid_svg__svg-inline--fa times-solid_svg__fa-times times-solid_svg__fa-w-11","data-icon":"times","data-prefix":"fas",viewBox:"0 0 352 512"},e),Us||(Us=u.createElement("path",{fill:"currentColor",d:"m242.72 256 100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})))};function Ks({error:t}){return(0,e.jsxs)("div",{className:Hs.errorMessageContainer,children:[(0,e.jsx)("span",{className:Hs.errorMessage,children:t.lastError}),(0,e.jsx)(Co,{className:Hs.errorMessageCloseBtn,onClick:()=>Fr.dispatch(new Jr),children:(0,e.jsx)(Xs,{})})]})}var $s=n(6629),Ys={};Ys.styleTagTransform=x(),Ys.setAttributes=_(),Ys.insert=m().bind(null,"head"),Ys.domAPI=p(),Ys.insertStyleElement=v(),d()($s.Z,Ys);const Qs=$s.Z&&$s.Z.locals?$s.Z.locals:void 0;function Js(){return Js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Js.apply(this,arguments)}const ea=function(e){return u.createElement("svg",Js({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("circle",{cx:17.346,cy:1044.106,r:3.092,style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.30522,stroke:"currentColor",fill:"none"}}),u.createElement("circle",{cx:6.759,cy:1044.106,r:3.092,style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.30522,stroke:"currentColor",fill:"none"}}),u.createElement("circle",{cx:12.729,cy:1033.707,r:1.128,style:{strokeWidth:.243187,stroke:"none",fillOpacity:1,fill:"currentColor"}}),u.createElement("path",{d:"M10.38 1040.226c2.188 1.92 1.38 3.656.856 5.451.243-.93.809-2.298.76-3.105-.232-.971-2.227-2.74-1.616-2.346z",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.25956,stroke:"currentColor",fill:"none"}}),u.createElement("path",{d:"m9.962 1039.68 1.78-3.357v0",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:2.29606,stroke:"currentColor",fill:"none"}}),u.createElement("path",{d:"m12.15 1036.158 2.803 2.52",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.20108,stroke:"currentColor",fill:"none"}})))};function ta(){return ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ta.apply(this,arguments)}const na=function(e){return u.createElement("svg",ta({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("path",{d:"m5.35 1043.364 13.272.015c0-2.144.003-3.484.002-4.136-.004-.324-.086-.354-.188-.527-.49-.78-2.167-3.815-2.352-4.103-.11-.157-.216-.203-.388-.189H8.364c-.206 0-.317.073-.406.189-.228.361-1.99 3.453-2.508 4.278-.095.151-.103.346-.11.526.003 1.98.005 2.974.01 3.946zm3.048-7.778 7.226.039 1.537 3.236H6.813Zm-1.055 4.442a1.041 1.041 0 1 1 0 2.083 1.041 1.041 0 0 1 0-2.083zm9.265 0a1.041 1.041 0 1 1 0 2.083 1.041 1.041 0 0 1 0-2.083z",style:{fillOpacity:1,stroke:"none",strokeWidth:"1.38819px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,fill:"currentColor"},transform:"translate(0 -1028.362)"}),u.createElement("path",{d:"m6.39 1043.127-.008 2.192",style:{fillOpacity:1,strokeWidth:2.08227,strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,fill:"currentColor",stroke:"currentColor"},transform:"translate(0 -1028.362)"}),u.createElement("path",{d:"m17.587 1043.12-.009 2.199",style:{fillOpacity:1,strokeWidth:2.07309,strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,fill:"currentColor",stroke:"currentColor"},transform:"translate(0 -1028.362)"}),u.createElement("path",{d:"m5.35 1043.364 13.275.015c-.001-2.144-.663-3.037-.553-4.43-2.15-3.365-1.269-3.902-6.134-3.9-3.52-.011-6.582.374-6.588 8.314zm3.232-7.753 6.81-.026 1.77 3.275H6.812Zm-1.239 4.417a1.041 1.041 0 1 1 0 2.083 1.041 1.041 0 0 1 0-2.083zm9.265 0a1.041 1.041 0 1 1 0 2.083 1.041 1.041 0 0 1 0-2.083z",style:{fillOpacity:1,stroke:"none",strokeWidth:"1.38819px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,fill:"currentColor"},transform:"translate(0 -1028.362)"}))};function ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ra.apply(this,arguments)}const ia=function(e){return u.createElement("svg",ra({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("path",{d:"M11.393 1031.664c-.947 0-1.71.763-1.71 1.71 0 .948.832 1.355 1.71 1.71 2.064.578 2.473-3.332 0-3.42zm.245 10.752a.346.346 0 0 0-.03.122c-1.57-2.758 1.099-4.25.03-.122z",style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.3,fill:"none",stroke:"#fff",strokeWidth:1.95499,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeDashoffset:0,strokeOpacity:1,marker:"none",enableBackground:"accumulate"},transform:"translate(0 -1028.362)"}),u.createElement("g",{style:{fill:"currentColor"}},u.createElement("g",{style:{display:"inline",fill:"currentColor"}},u.createElement("path",{d:"M14.875 1008.362c-.97 0-1.75.78-1.75 1.75s.78 1.75 1.75 1.75 1.75-.78 1.75-1.75-.78-1.75-1.75-1.75z",style:{color:"currentColor",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"},transform:"matrix(.9775 0 0 .9775 -3.025 -982.366)"}))),u.createElement("path",{d:"M0 1028.362h24v24H0z",style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.5,fill:"none",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"},transform:"translate(0 -1028.362)"}),u.createElement("path",{d:"M12.475 1035.556c-.358-.067-.972-.264-1.531.211-.567.625-.44.89-.263 2.093 0 0 .033 2.472-.421 4.243a.359.359 0 0 0-.053.115l-1.76 5.453c-.361.598.03 1.068.5 1.15.307.056.635-.075.852-.401l2.383-5.959c.113-5.007.1-3.506.293-6.905z",style:{enableBackground:"accumulate",marker:"none",strokeWidth:1.95499,stroke:"none",fillRule:"nonzero",fillOpacity:1,fill:"currentColor",visibility:"visible",overflow:"visible",display:"inline",color:"currentColor"},transform:"translate(0 -1028.362)"}),u.createElement("path",{d:"M12.838 1035.562c.508.232 1.057.842 1.682 2.646.508.901.588 1.321 1.117 2.207.351.589-.977 1.023-1.243.399l-1.144-2.677s-.24 2.782.516 4.035a.359.359 0 0 1 .052.115l1.205 2.24.851 2.852a.743.743 0 0 1-.623.905c-.306.057-.818-.256-.851-.583l-.673-2.494-1.883-2.677c.151-2.783-1.831-7.856.994-6.969z",style:{enableBackground:"accumulate",marker:"none",strokeWidth:1.95499,stroke:"none",fillRule:"nonzero",fillOpacity:1,fill:"currentColor",visibility:"visible",overflow:"visible",display:"inline",color:"currentColor"},transform:"translate(0 -1028.362)"}))};function oa(){return oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oa.apply(this,arguments)}const sa=function(e){return u.createElement("svg",oa({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("path",{d:"M11.583 1031.78c-.942 0-1.701.758-1.701 1.7 0 .943.828 1.348 1.7 1.701 2.053.575 2.46-3.313 0-3.401zm.243 10.691a.342.342 0 0 0-.03.121c-1.561-2.742 1.093-4.227.03-.121z",style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.3,fill:"none",stroke:"#fff",strokeWidth:1.94388,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeDashoffset:0,strokeOpacity:1,marker:"none",enableBackground:"accumulate"}}),u.createElement("g",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.00006006,stroke:"none",fillOpacity:1,fill:"currentColor"}},u.createElement("g",{style:{display:"inline",stroke:"none",strokeOpacity:1,fill:"currentColor",fillOpacity:1,strokeWidth:1.00006006,strokeMiterlimit:4,strokeDasharray:"none"}},u.createElement("path",{d:"M14.875 1008.362c-.97 0-1.75.78-1.75 1.75s.78 1.75 1.75 1.75 1.75-.78 1.75-1.75-.78-1.75-1.75-1.75z",style:{color:"currentColor",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:1.00006006,marker:"none",enableBackground:"accumulate",strokeOpacity:1,strokeMiterlimit:4,strokeDasharray:"none"},transform:"translate(-2.753 51.71) scale(.97194)"}))),u.createElement("path",{d:"M0 1028.362h24v24H0z",style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.5,fill:"none",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"}}),u.createElement("path",{d:"M12.295 1035.65c-.356-.067-.967-.263-1.523.21-.563.62-.438.884-.26 2.08 0 0 .032 2.459-.42 4.22a.354.354 0 0 0-.052.114l-1.75 5.422c-.36.594.03 1.063.497 1.143.305.056.631-.073.847-.398l2.37-5.925c.112-4.979.098-3.487.29-6.867z",style:{color:"currentColor",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:1.94389,marker:"none",enableBackground:"accumulate"}}),u.createElement("path",{d:"M12.655 1035.655c.506.231 1.052.838 1.673 2.631.506.897.982 1.062 1.508 1.943.35.585-.418 1.083-.827.545l-1.943-2.557s-.24 2.766.512 4.012c.026.042.047.08.053.114l1.198 2.227.846 2.836a.739.739 0 0 1-.62.9c-.304.056-.813-.255-.846-.58l-.67-2.48-1.872-2.661c.151-2.767-1.82-7.812.988-6.93z",style:{color:"currentColor",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:1.94389,marker:"none",enableBackground:"accumulate"}}),u.createElement("rect",{width:2.7,height:2.395,x:274.144,y:1069.759,ry:.293,style:{fill:"currentColor",fillOpacity:1,stroke:"none",strokeWidth:.971942},transform:"skewX(-14.409) scale(1 .96854)"}),u.createElement("rect",{width:2.467,height:4.322,x:110.265,y:1041.998,ry:.529,style:{fill:"currentColor",fillOpacity:1,stroke:"none",strokeWidth:.971942},transform:"skewX(-5.616) scale(1 .9952)"}),u.createElement("path",{d:"m16.008 1040.567.332 7.844",style:{fill:"none",stroke:"currentColor",strokeWidth:.777553,strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1}})))};function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aa.apply(this,arguments)}const la=function(e){return u.createElement("svg",aa({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("path",{d:"M5.406 1043.768c-.356-.12-.571-.333-.716-.71-.146-.378-.17-.662-.085-.992.08-.309.211-.487.429-.58.137-.059.701 0 2.061.197.369.055.97.092 1.546.094h.942l.253-.183c2.115-1.958 5.018-4.124 6.424-5.109.053-.246-.177-1-.379-1.374-.102-.19-.178-.354-.17-.364.034-.04.635.216.878.372.784.507 1.574 1.765 1.642 2.617.03.37.009.392-.642.635-.706.264-1.393.796-2.22 1.721-.68.76-1.145 1.664-1.522 2.955l-.212.726-.29-.034c-.708-.082-3.088-.099-5.284-.038a95.46 95.46 0 0 0-2.462.085.39.39 0 0 1-.193-.023z",style:{strokeWidth:.960606,stroke:"none",fillOpacity:1,fill:"currentColor"}}),u.createElement("circle",{cx:18.2,cy:1042.641,r:3.002,style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.4,stroke:"currentColor",fill:"none"}}),u.createElement("circle",{cx:5.732,cy:1042.592,r:3.002,style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.4,stroke:"currentColor",fill:"none"}}),u.createElement("path",{d:"m16.147 1039.015 1.99 3.568",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.52584,stroke:"currentColor",fill:"none"}}),u.createElement("rect",{width:6.45,height:1.035,x:235.031,y:1002.115,ry:0,style:{strokeWidth:.960606,stroke:"none",fillOpacity:1,fill:"currentColor",opacity:.99},transform:"matrix(.96339 .26812 -.22085 .9753 0 0)"}),u.createElement("path",{d:"M5.193 1038.175c-1.33-.764-1.467-1.281-1.148-1.646.026-.029 2.499-.023 3.242.191 1.111.322 1.323.44 2.679 1.49.311.242.657.384.934.384.15 0 .89-.22 2.192-.655 1.08-.36 1.975-.644 1.988-.63.012.014-.415.397-.95.85-1.57 1.328-3.27 2.946-3.541 2.946-1.117-1.647-3.638-2.417-5.396-2.93z",style:{strokeWidth:.960606,stroke:"none",fillOpacity:1,fill:"currentColor"}})))};function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ua.apply(this,arguments)}const ca=function(e){return u.createElement("svg",ua({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("circle",{cx:17.398,cy:1042.2,r:2.846,style:{fill:"none",strokeWidth:1.20111,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("circle",{cx:6.753,cy:1044.276,r:2.846,style:{fill:"none",strokeWidth:1.20119,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("circle",{cx:14.234,cy:1033.513,r:1.173,style:{strokeWidth:.252678,fillOpacity:1,fill:"currentColor",stroke:"currentColor"}}),u.createElement("path",{d:"M10.602 1040.225c.644.561 1.46 3.262.655 5.06.252-.965.297-1.56.442-2.43-.242-1.01-1.731-3.039-1.097-2.63z",style:{fill:"none",strokeWidth:1.30871,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m9.992 1039.283 2.824-3.072",style:{fill:"none",strokeWidth:2.38567,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m13.47 1036.203 2.89 1.47",style:{fill:"none",strokeWidth:1.24796,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m2.787 1050.013 2.373-1.78 5.22-.296 6.227-1.78 3.915.534 2.017-2.432",style:{fill:"none",strokeWidth:".949028px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,stroke:"currentColor"}})))};function da(){return da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},da.apply(this,arguments)}const ha=function(e){return u.createElement("svg",da({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("circle",{cx:17.366,cy:1043.13,r:3.199,style:{fill:"none",strokeWidth:1.3502,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("circle",{cx:6.414,cy:1043.13,r:3.199,style:{fill:"none",strokeWidth:1.3502,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("circle",{cx:16.52,cy:1035.737,r:1.167,style:{strokeWidth:.251568,stroke:"none",fillOpacity:1,fill:"currentColor"}}),u.createElement("path",{d:"M10.925 1039.245c.642.559.922 3.72.12 5.51.252-.961.414-1.907.559-2.774-.241-1.005-1.31-3.143-.679-2.736z",style:{fill:"none",strokeWidth:1.30296,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m10.693 1038.554 3.734-1.229v0",style:{fill:"none",strokeWidth:2.37518,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m15.263 1037.495 1.103 3.74",style:{fill:"none",strokeWidth:1.24247,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m11.245 1034.652-6.437-.354",style:{fill:"#4d4d4d",strokeWidth:.755886,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m6.604 1037.74-3.42-.201",style:{fill:"#474747",fillOpacity:1,strokeWidth:.755886,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m8.474 1036.063-5.295-.32",style:{fill:"none",strokeWidth:.755886,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}})))};function pa(){return pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pa.apply(this,arguments)}const fa=function(e){return u.createElement("svg",pa({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("path",{d:"M5.548 1039.803c.905 1.804 1.202 2.42 3.18 2.495h.98l5.104.079c3.577-2.625 1.439-3.39 1.277-7.866.985.237 1.25 1.446 1.898 1.94.462.352 1.049 1.298 1.034 2.32-.3 1.348-2.838 4.798-3.328 5.233-.265.382-2.747.463-5.553.419-2.806-.044-5.936-.216-8.121-.588.516-1.95 1.369-3.47 3.529-4.032z",style:{stroke:"none",fillOpacity:1,fill:"currentColor"}}),u.createElement("circle",{cx:19.143,cy:1043.334,r:2.267,style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.957069,stroke:"currentColor",fill:"none"}}),u.createElement("path",{d:"m17.614 1040.655 1.523 2.73",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.16776,stroke:"currentColor",fill:"none"}}),u.createElement("path",{d:"M5.183 1041.033c-1.384-1.072-1.439-3.227-1.106-3.739.026-.04 4.81.452 7.13.09 2.375.382-2.742 3.904.167 5.137-2.709.076-4.184 1-6.191-1.488z",style:{stroke:"none",fillOpacity:1,fill:"currentColor"}}),u.createElement("circle",{cx:5.436,cy:1043.355,r:2.267,style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.957069,stroke:"currentColor",fill:"none"}}),u.createElement("path",{d:"M15.645 1042.746c.66-1.65 1.007-1.608 2.641-3.034 2.079-.304 3.533 1.57 3.416 1.795-.75.58-2.606-2.008-5.292.885z",style:{stroke:"none",fillOpacity:1,fill:"currentColor"}}),u.createElement("path",{d:"M16.68 1035.348s-1.95.398-1.72.89c.197.416.944-.126 1.72-.89z",style:{strokeOpacity:1,strokeLinejoin:"miter",strokeLinecap:"butt",strokeWidth:1,stroke:"none",fillRule:"evenodd",fillOpacity:1,fill:"currentColor"}}),u.createElement("path",{d:"M18.188 1035.784c-.332.054-.551.048-.931.048s-.665-.292-.665-.61c0-.32.241-.767.62-.767.19 0 .49-.054.94.092-.116.357-.12.79.036 1.238z",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.7,stroke:"none",fillOpacity:1,fill:"currentColor"}})))};function ma(){return ma=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ma.apply(this,arguments)}const ga=function(e){return u.createElement("svg",ma({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("path",{d:"M9.93 1035.133a.424.424 0 0 0-.423.424l-.104 8.262c2.162.024 5.242.01 7.704.015.254-.456.408-1.129 1.713-1.13 1.345 0 1.405.642 1.66 1.099h.471a.423.423 0 0 0 .423-.424v-7.823a.423.423 0 0 0-.423-.423z",style:{fillOpacity:1,strokeWidth:1.15286,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor",fill:"currentColor"}}),u.createElement("path",{d:"M3.697 1039.694h6.218v3.192H3.697z",style:{fillOpacity:1,stroke:"none",strokeWidth:1.04201,fill:"currentColor"}}),u.createElement("path",{d:"M2.85 1040.73v3.68h1.706a1.441 1.441 0 0 1-.004-.048 1.441 1.441 0 0 1 1.44-1.44 1.441 1.441 0 0 1 1.442 1.44 1.441 1.441 0 0 1-.005.047h4.889v-3.68z",style:{fillOpacity:1,stroke:"none",strokeWidth:1.0461,fill:"currentColor"}}),u.createElement("path",{d:"M5.624 1036.386c-3.576 7.11-3.044 4.821-3.076 7.505l1.366-.01 1.373-1.312 2.042-.382.922-.184 1.014.138.138-5.715c-.594-.018-3.162-.047-3.779-.046z",style:{fill:"none",strokeWidth:"1.04276px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"m5.402 1035.907 4.112-1.26.09 1.555z",style:{fillOpacity:1,stroke:"none",strokeWidth:1.04201,fill:"currentColor"}}),u.createElement("circle",{cx:18.949,cy:1044.363,r:1.441,style:{fill:"#fff",fillOpacity:.0820312,strokeWidth:.864469,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("circle",{cx:6.078,cy:1044.363,r:1.441,style:{fill:"#fff",fillOpacity:.0820312,strokeWidth:.864469,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"}}),u.createElement("path",{d:"M7.999 1036.68h6.218v3.192H7.999z",style:{fillOpacity:1,stroke:"none",strokeWidth:1.04201,fill:"currentColor"}})))};function _a(){return _a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_a.apply(this,arguments)}const ya=function(e){return u.createElement("svg",_a({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("rect",{width:7.3,height:2.796,x:6.392,y:1041.53,ry:.684,style:{strokeWidth:.99494,stroke:"none",fillOpacity:1,fill:"currentColor"}}),u.createElement("path",{d:"M1.417 1039.837a.022.022 0 0 0-.02.02v4.448c0 .014.008.021.02.021h2.039a1.533 1.533 0 0 1-.004-.038 1.533 1.533 0 0 1 3.066 0 1.533 1.533 0 0 1-.003.038h1.984c.012 0 .021-.012.021-.02v-4.448c0-.013-.01-.021-.021-.021z",style:{fillOpacity:1,stroke:"none",strokeWidth:.99494,fill:"currentColor"}}),u.createElement("path",{d:"M1.244 1043.746H2.93l.506-1.555 1.002-.551 2.075-.2 1.401.114-.01-5.58c-1.188.02-6.147-.012-6.648 0-.028 3.015-.003 5.58-.012 7.772z",style:{strokeOpacity:1,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"1.19518px",stroke:"currentColor",fill:"none"}}),u.createElement("rect",{width:2.329,height:4.491,x:5.468,y:1036.143,ry:.022,style:{fillOpacity:1,stroke:"none",strokeWidth:.99494,fill:"currentColor"}}),u.createElement("path",{d:"M10.047 1034.45c-.637 0-1.148.513-1.148 1.15v7.57c0 .636.511 1.15 1.148 1.15h4.579a1.533 1.533 0 0 1-.004-.028 1.533 1.533 0 0 1 1.533-1.532 1.533 1.533 0 0 1 1.533 1.532 1.533 1.533 0 0 1-.004.028h1.481a1.533 1.533 0 0 1 1.53-1.49 1.533 1.533 0 0 1 1.53 1.488 1.146 1.146 0 0 0 1.1-1.149v-7.569c0-.637-.51-1.15-1.148-1.15z",style:{fillOpacity:1,stroke:"none",strokeWidth:2.00558,strokeOpacity:1,fill:"currentColor"}}),u.createElement("circle",{cx:16.288,cy:1044.289,r:1.533,fill:"none",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.919458,stroke:"currentColor",fillOpacity:0,fill:"#fff"}}),u.createElement("circle",{cx:4.887,cy:1044.289,r:1.533,fill:"none",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.919458,stroke:"currentColor",fillOpacity:0,fill:"#fff"}}),u.createElement("circle",{cx:20.733,cy:1044.289,r:1.533,fill:"none",style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.919458,stroke:"currentColor",fillOpacity:0,fill:"#fff"}})))};var va;function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ba.apply(this,arguments)}const xa=function(e){return u.createElement("svg",ba({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24},e),u.createElement("defs",null,va||(va=u.createElement("pattern",{xlinkHref:"#wheelchair_svg__a",id:"wheelchair_svg__b",patternTransform:"matrix(10 0 0 10 -20.86 7.16)"})),u.createElement("pattern",{id:"wheelchair_svg__a",width:2,height:1,patternTransform:"scale(10)",patternUnits:"userSpaceOnUse"},u.createElement("path",{d:"M0-.5h1v2H0z",style:{fill:"#000",stroke:"none"}}))),u.createElement("g",{transform:"translate(0 -1028.362)"},u.createElement("path",{d:"M0 1028.362h24v24H0z",style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.5,fill:"none",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"}}),u.createElement("path",{d:"M12.26 1036.434c.696.172 1.449.624 2.304 1.96.697.668.807.979 1.531 1.635.482.436-1.338.757-1.703.295l-1.567-1.982s-.408 1.483.628 2.411c.035.031.862.761.869.787l1.307 1.535 1.447 1.518c.118.307-.054 1.204-.697 1.264-.42.042-1.433-.815-1.479-1.057l-2.65-3.252-2.383-.015c.207-2.061-1.478-5.756 2.392-5.099z",style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:1.96937,marker:"none",enableBackground:"accumulate"}}),u.createElement("path",{d:"M11 1041.362a3.281 3.281 0 1 0 0 6.563 3.281 3.281 0 0 0 0-6.563z",style:{fill:"none",fillOpacity:1,stroke:"currentColor",strokeWidth:1.037,strokeMiterlimit:10,strokeDasharray:"none",strokeOpacity:1}}),u.createElement("circle",{cx:11.402,cy:1034.037,r:1.75,style:{strokeWidth:1.33307,fill:"currentColor"}})))};function wa(){return wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wa.apply(this,arguments)}const ka=function(e){return u.createElement("svg",wa({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:96,height:96,viewBox:"0 0 11 11"},e),u.createElement("path",{fill:"currentColor",d:"m4.194 10.685-.265-1.667q-.25-.092-.529-.251-.278-.159-.49-.33l-1.56.713L.12 6.98l1.428-1.044q-.026-.12-.033-.271-.007-.153-.007-.272 0-.119.007-.27.007-.153.033-.272L.12 3.806l1.23-2.17 1.562.715q.211-.172.49-.331.277-.159.528-.238l.265-1.68h2.434l.265 1.667q.251.092.536.244.284.152.482.338l1.561-.715 1.23 2.17-1.428 1.019q.027.132.033.284.007.152.007.284 0 .133-.007.278-.007.146-.033.278l1.429 1.032-1.23 2.17-1.562-.715q-.211.172-.482.337-.272.166-.536.245l-.265 1.667zm1.217-3.572q.714 0 1.217-.503.503-.502.503-1.217 0-.714-.503-1.217-.503-.502-1.217-.502-.714 0-1.217.502-.503.503-.503 1.217 0 .715.503 1.217.503.503 1.217.503zm0-.794q-.384 0-.655-.27-.271-.272-.271-.656 0-.383.271-.654.271-.272.655-.272t.655.272q.271.27.271.654t-.271.655q-.271.271-.655.271zm0-.926zM4.83 9.891h1.164l.185-1.481q.437-.106.827-.331.39-.225.708-.542l1.402.608.53-.952L8.4 6.28q.053-.225.086-.443.033-.219.033-.444 0-.224-.027-.443-.026-.218-.092-.443l1.243-.913-.529-.952-1.402.608q-.304-.344-.688-.575-.384-.232-.847-.298L5.993.895H4.83l-.185 1.482q-.45.093-.84.318-.39.225-.695.555l-1.402-.608-.53.952 1.244.913q-.053.225-.086.443-.033.219-.033.443 0 .225.033.444.033.218.086.443l-1.243.913.529.952 1.402-.608q.318.317.708.542.39.225.827.33z",style:{strokeWidth:.1}}),u.createElement("rect",{width:1.208,height:1.633,x:4.803,y:3.421,ry:.049,style:{fill:"#fff",strokeWidth:.209373}}))};function Ca({routingProfiles:t,selectedProfile:n,showCustomModelBox:r,toggleCustomModelBox:i,customModelBoxEnabled:o}){return(0,e.jsxs)("div",{className:Qs.profilesParent,children:[(0,e.jsx)(Co,{title:l("open_custom_model_box"),className:r?Qs.enabledCMBox:Qs.cmBox,onClick:i,children:(0,e.jsx)(ka,{})}),(0,e.jsx)("ul",{className:Qs.profiles,children:t.map((t=>{const r=t.name===n.name?Qs.selectedProfile+" "+Qs.profileBtn:Qs.profileBtn;return(0,e.jsx)("li",{children:(0,e.jsxs)(Co,{title:l(t.name),onClick:()=>Fr.dispatch(new Nr(t)),className:r,children:[o&&t.name===n.name&&(0,e.jsx)(ka,{className:Qs.asIndicator}),Sa(t)]})},t.name)}))})]})}function Sa(t){switch(t.name){case"car":return(0,e.jsx)(na,{});case"small_truck":return(0,e.jsx)(ga,{});case"truck":return(0,e.jsx)(ya,{});case"scooter":return(0,e.jsx)(fa,{});case"foot":return(0,e.jsx)(ia,{});case"hike":return(0,e.jsx)(sa,{});case"bike":return(0,e.jsx)(ea,{});case"mtb":return(0,e.jsx)(ca,{});case"racingbike":return(0,e.jsx)(ha,{});case"motorcycle":return(0,e.jsx)(la,{});case"wheelchair":return(0,e.jsx)(xa,{});default:return t.name}}var Aa;function Ea(){return Ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ea.apply(this,arguments)}const Ma=function(e){return u.createElement("svg",Ea({xmlns:"http://www.w3.org/2000/svg",width:36,height:36,viewBox:"0 0 48 48"},e),Aa||(Aa=u.createElement("path",{fill:"currentColor",d:"m24 42-9-9 2.2-2.2 6.8 6.8 6.8-6.8L33 33Zm-6.8-24.6L15 15.2l9-9 9 9-2.2 2.2-6.8-6.8Z"})))};var Ta;function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pa.apply(this,arguments)}const Ra=function(e){return u.createElement("svg",Pa({xmlns:"http://www.w3.org/2000/svg",width:36,height:36,viewBox:"0 0 48 48"},e),Ta||(Ta=u.createElement("path",{fill:"currentColor",d:"M17.15 40 15 37.85l9-9 9 9L30.85 40 24 33.15ZM24 19.15l-9-9L17.15 8 24 14.85 30.85 8 33 10.15Z"})))};var Ia=n(1240),La={};La.styleTagTransform=x(),La.setAttributes=_(),La.insert=m().bind(null,"head"),La.domAPI=p(),La.insertStyleElement=v(),d()(Ia.Z,La),Ia.Z&&Ia.Z.locals&&Ia.Z.locals;var Oa=n(5734),za={};za.styleTagTransform=x(),za.setAttributes=_(),za.insert=m().bind(null,"head"),za.domAPI=p(),za.insertStyleElement=v(),d()(Oa.Z,za),Oa.Z&&Oa.Z.locals&&Oa.Z.locals;var Fa=n(9735),Da={};Da.styleTagTransform=x(),Da.setAttributes=_(),Da.insert=m().bind(null,"head"),Da.domAPI=p(),Da.insertStyleElement=v(),d()(Fa.Z,Da),Fa.Z&&Fa.Z.locals&&Fa.Z.locals;var ja=n(8116),Na={};Na.styleTagTransform=x(),Na.setAttributes=_(),Na.insert=m().bind(null,"head"),Na.domAPI=p(),Na.insertStyleElement=v(),d()(ja.Z,Na),ja.Z&&ja.Z.locals&&ja.Z.locals;var Ba=n(2897),qa={};qa.styleTagTransform=x(),qa.setAttributes=_(),qa.insert=m().bind(null,"head"),qa.domAPI=p(),qa.insertStyleElement=v(),d()(Ba.Z,qa);const Ga=Ba.Z&&Ba.Z.locals?Ba.Z.locals:void 0;var Va,Wa,Ha,Ua,Za=n(3710),Xa=n.n(Za);function Ka(e){return 32===e||9===e}function $a(e){return 10===e||13===e}function Ya(e){return e>=48&&e<=57}function Qa(e,t,n=Wa.DEFAULT){const r=function(e,t=!1){const n=e.length;let r=0,i="",o=0,s=16,a=0,l=0,u=0,c=0,d=0;function h(t,n){let i=0,o=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)o=16*o+t-48;else if(t>=65&&t<=70)o=16*o+t-65+10;else{if(!(t>=97&&t<=102))break;o=16*o+t-97+10}r++,i++}return i<t&&(o=-1),o}function p(){if(i="",d=0,o=r,l=a,c=u,r>=n)return o=n,s=17;let t=e.charCodeAt(r);if(Ka(t)){do{r++,i+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Ka(t));return s=15}if($a(t))return r++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,i+="\n"),a++,u=r,s=14;switch(t){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,i=function(){let t="",i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}const o=e.charCodeAt(r);if(34===o){t+=e.substring(i,r),r++;break}if(92!==o){if(o>=0&&o<=31){if($a(o)){t+=e.substring(i,r),d=2;break}d=6}r++}else{if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=h(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r}}return t}(),s=10;case 47:const l=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!$a(e.charCodeAt(r));)r++;return i=e.substring(l,r),s=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let o=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,o=!0;break}r++,$a(t)&&(13===t&&10===e.charCodeAt(r)&&r++,a++,u=r)}return o||(r++,d=1),i=e.substring(l,r),s=13}return i+=String.fromCharCode(t),r++,s=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!Ya(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&Ya(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&Ya(e.charCodeAt(r))))return d=3,e.substring(t,r);for(r++;r<e.length&&Ya(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&Ya(e.charCodeAt(r))){for(r++;r<e.length&&Ya(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}(),s=11;default:for(;r<n&&f(t);)r++,t=e.charCodeAt(r);if(o!==r){switch(i=e.substring(o,r),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(t),r++,s=16}}function f(e){if(Ka(e)||$a(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,i="",o=0,s=16,d=0},getPosition:()=>r,scan:t?function(){let e;do{e=p()}while(e>=12&&e<=15);return e}:p,getToken:()=>s,getTokenValue:()=>i,getTokenOffset:()=>o,getTokenLength:()=>r-o,getTokenStartLine:()=>l,getTokenStartCharacter:()=>o-c,getTokenError:()=>d}}(e,!1),i=[];function o(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function a(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice())):()=>!0}const u=s(t.onObjectBegin),c=l(t.onObjectProperty),d=o(t.onObjectEnd),h=s(t.onArrayBegin),p=o(t.onArrayEnd),f=l(t.onLiteralValue),m=a(t.onSeparator),g=o(t.onComment),_=a(t.onError),y=n&&n.disallowComments,v=n&&n.allowTrailingComma;function b(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:x(14);break;case 5:x(15);break;case 3:x(13);break;case 1:y||x(11);break;case 2:x(12);break;case 6:x(16)}switch(e){case 12:case 13:y?x(10):g();break;case 16:x(1);break;case 15:case 14:break;default:return e}}}function x(e,t=[],n=[]){if(_(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){b();break}if(-1!==n.indexOf(e))break;e=b()}}}function w(e){const t=r.getTokenValue();return e?f(t):(c(t),i.push(t)),b(),!0}return b(),17===r.getToken()?!!n.allowEmptyContent||(x(4,[],[]),!1):function e(){switch(r.getToken()){case 3:return function(){h(),b();let t=!0,n=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(n||x(4,[],[]),m(","),b(),4===r.getToken()&&v)break}else n&&x(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||x(4,[],[4,5]),n=!0}return p(),t||i.pop(),4!==r.getToken()?x(8,[4],[]):b(),!0}();case 1:return function(){u(),b();let t=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||x(4,[],[]),m(","),b(),2===r.getToken()&&v)break}else t&&x(6,[],[]);(10!==r.getToken()?(x(3,[],[2,5]),0):(w(!1),6===r.getToken()?(m(":"),b(),e()||x(4,[],[2,5])):x(5,[],[2,5]),i.pop(),1))||x(4,[],[2,5]),t=!0}return d(),2!==r.getToken()?x(7,[2],[]):b(),!0}();case 10:return w(!0);default:return function(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(x(2),t=0),f(t);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return b(),!0}()}}()?(17!==r.getToken()&&x(9,[],[]),!0):(x(4,[],[]),!1)}function Ja(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":return e?Array.isArray(e)?"array":"object":"null";default:return"null"}}n(3457),n(7885),n(9103),n(3395),n(3520),function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(Va||(Va={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(Wa||(Wa={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(Ha||(Ha={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(Ua||(Ua={}));const el=function(e,t=[],n=Wa.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(e){"property"===r.type&&(r.length=e-r.offset,r=r.parent)}function o(e){return r.children.push(e),e}const s={onObjectBegin:e=>{r=o({type:"object",offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,n)=>{r=o({type:"property",offset:t,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:e,offset:t,length:n,parent:r})},onObjectEnd:(e,t)=>{i(e+t),r.length=e+t-r.offset,r=r.parent,i(e+t)},onArrayBegin:(e,t)=>{r=o({type:"array",offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,i(e+t)},onLiteralValue:(e,t,n)=>{o({type:Ja(e),offset:t,length:n,parent:r,value:e}),i(t+n)},onSeparator:(e,t,n)=>{"property"===r.type&&(":"===e?r.colonOffset=t:","===e&&i(t))},onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}};Qa(e,s,n);const a=r.children[0];return a&&delete a.parent,a},tl=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const i=t.children;if(Array.isArray(i))for(let t=0;t<i.length&&i[t].offset<=n;t++){const o=e(i[t],n,r);if(o)return o}return t}};var nl;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(nl||(nl={}));const rl=["speed","priority","distance_influence","areas"],il=["if","else_if","else"],ol=["multiply_by","limit_to"],sl=il.concat(ol);let al=[],ll=[],ul=[];function cl(e){if(al=[],ll=[],ul=[],0===e.trim().length)return{errors:[El("root","must be an object",[0,e.length])],jsonErrors:[],conditionRanges:al,operatorValueRanges:ll,areas:ul};const t=[],n=el(e,t,{allowEmptyContent:!1,allowTrailingComma:!1,disallowComments:!0}),r=t.map((e=>El("syntax",function(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}(e.error),[e.offset,e.offset+Math.max(1,e.length)]))),i=n?function(e){return Al("root",e,(e=>rl.indexOf(e.value)>=0),((e,t,n)=>[]),`possible keys: ${Ll(rl)}`,dl)}(n):[];return{errors:i,jsonErrors:r,conditionRanges:al,operatorValueRanges:ll,areas:ul}}function dl(e,t,n){if("null"===n.type)return[El(`${t.value}`,"must not be null",Rl(n))];if("speed"===t.value||"priority"===t.value)return function(e,t){const n=wl(e,t,0,-1,hl);if(n.length>0)return n;const r=t.children,i=[];for(let e=0;e<r.length;++e)for(let t=0;t<r[e].children.length;++t){const n=r[e].children[t].children[0].value;il.indexOf(n)>=0&&i.push(n)}let o="";for(let t=0;t<i.length;++t)"else_if"!==i[t]&&"else"!==i[t]||"else_if"===o||"if"===o||n.push(El(`${e}[${t}]`,`'${i[t]}' clause must be preceded by 'if' or 'else_if'`,Rl(r[t]))),o=i[t];return n}(t.value,n);if("distance_influence"===t.value)return function(e){return Tl(e)?[]:[El("distance_influence",`must be a number. given type: ${Il(e)}`,Rl(e))]}(n);if("areas"===t.value)return function(e){const t=["type","features"];return Al("areas",e,(e=>t.indexOf(e.value)>=0),ml,`possible keys: ${Ll(t)}`,gl)}(n);throw`Unexpected root key ${t.value}`}function hl(e,t,n){return Al(e,t,(e=>sl.indexOf(e.value)>=0),pl,`possible keys: ${Ll(sl)}`,fl)}function pl(e,t,n){const r=[];t.length>2&&r.push(El(e,`too many keys. maximum: 2. given: ${t.sort()}`,n));const i=t.some((e=>il.indexOf(e)>=0)),o=t.some((e=>ol.indexOf(e)>=0));return i||r.push(El(e,`every statement must have a clause ${Ll(il)}. given: ${t}`,n)),o||r.push(El(e,`every statement must have an operator ${Ll(ol)}. given: ${t}`,n)),r}function fl(e,t,n){const r=[],i=il.indexOf(t.value)>=0,o=ol.indexOf(t.value)>=0;if(i&&("else"===t.value?Pl(n)&&""===n.value||r.push(El(`${e}[else]`,`must be an empty string. given: '${n.value}'`,Rl(n))):Pl(n)?al.push(Rl(n)):r.push(El(`${e}[${t.value}]`,`must be a string. given type: ${Il(n)}`,Rl(n)))),o&&(Pl(n)?ll.push(Rl(n)):r.push(El(`${e}[${t.value}]`,`must be a string. given type: ${Il(n)}`,Rl(n)))),i===o)throw`Unexpected statement: ${i} ${o} ${t} ${n}`;return r}function ml(e,t,n){const r=["type","features"],i=[];for(let o=0;o<r.length;o++)t.indexOf(r[o])<0&&i.push(El(e,`missing '${r[o]}'. given: ${Ll(t)}`,n));return i}function gl(e,t,n){return"type"===t.value?Pl(n)?"FeatureCollection"!==n.value?[El(`${e}[${t.value}]`,`must be "FeatureCollection". given: "${n.value}"`,Rl(n))]:[]:[El(`${e}[${t.value}]`,`must be "FeatureCollection". given type: ${Il(n)}`,Rl(n))]:"features"===t.value?wl(`${e}[${t.value}]`,n,0,-1,_l):(console.error(`unexpected FeatureCollection field ${t.value}`),[])}function _l(e,t,n){const r=["type","geometry","id","properties"];return Al(e,t,(e=>r.indexOf(e.value)>=0),yl,`possible keys: ${Ll(r)}`,vl)}function yl(e,t,n){const r=["type","id","geometry"],i=[];for(let o=0;o<r.length;o++)t.indexOf(r[o])<0&&i.push(El(e,`missing '${r[o]}'. given: ${Ll(t)}`,n));return i}function vl(e,t,n){if("type"===t.value)return Pl(n)?"Feature"!==n.value?[El(`${e}[${t.value}]`,`must be "Feature". given: "${n.value}"`,Rl(n))]:[]:[El(`${e}[${t.value}]`,`must be "Feature". given type: ${Il(n)}`,Rl(n))];if("properties"===t.value)return Al(`${e}[${t.value}]`,n,(()=>!0),(()=>[]),"",(()=>[]));if("id"!==t.value){if("geometry"===t.value){const r=["type","coordinates"],i=`possible keys: ${Ll(r)}`,o=e=>r.indexOf(e.value)>=0;return Al(`${e}[${t.value}]`,n,o,bl,i,xl)}return console.error(`unexpected area field ${t.value}`),[]}return Pl(n)?/^[0-9A-Za-z][0-9A-Za-z_]*$/g.test(n.value)?ul.indexOf(n.value)>=0?[El(`${e}[${t.value}]`,`area ids must be unique. duplicate: '${n.value}'`,Rl(n))]:void ul.push(n.value):[El(`${e}[${t.value}]`,`area ids may only contain a-z, A-Z, digits and _. given: '${n.value}'`,Rl(n))]:[El(`${e}[${t.value}]`,`must be a string. given type: ${Il(n)}`,Rl(n))]}function bl(e,t,n){const r=["type","coordinates"],i=[];for(let o=0;o<r.length;o++)t.indexOf(r[o])<0&&i.push(El(e,`missing '${r[o]}'. given: ${Ll(t)}`,n));return i}function xl(e,t,n){if("type"===t.value)return"Polygon"!==n.value?[El(`${e}[${t.value}]`,`must be "Polygon". given: '${n.value}'`,Rl(n))]:[];if("coordinates"===t.value)return function(e,t,n){return wl(e,n,1,-1,kl)}(`${e}[${t.value}]`,0,n);throw`unexpected geometry field ${t.value}`}function wl(e,t,n,r,i){if(!function(e){return"array"===e.type}(t))return[El(e,`must be an array. given type: ${Il(t)}`,Rl(t))];const o=t.children;if(o.length<n)return[El(e,`minimum length: ${n}, given: ${o.length}`,Rl(t))];if(r>=0&&o.length>r)return[El(e,`maximum length: ${r}, given: ${o.length}`,Rl(t))];const s=[];for(let t=0;t<o.length;++t){const n=o[t];s.push.apply(s,i(`${e}[${t}]`,n,t))}return s}function kl(e,t,n){const r=wl(e,t,4,-1,Cl);if(r.length>0)return r;const i=t.children[0],o=t.children[t.children.length-1];return a=o,(s=i).children[0].value!==a.children[0].value||s.children[1].value!==a.children[1].value?[El(`${e}`,"the last point must be equal to the first",Rl(o))]:[];var s,a}function Cl(e,t,n){return wl(e,t,2,2,Sl)}function Sl(e,t,n){const r=[];return Tl(t)?(0===n&&(t.value<-180||t.value>180)&&r.push(El(`${e}`,"longitude must be in [-180, +180]",Rl(t))),1===n&&(t.value<-90||t.value>90)&&r.push(El(`${e}`,"latitude must be in [-90, +90]",Rl(t)))):r.push(El(e,"must be a number",Rl(t))),r}function Al(e,t,n,r,i,o){if("object"!==t.type)return[El(e,`must be an object. given type: ${Il(t)}`,Rl(t))];const s=function(e,t,n,r){const i=[],o=new Set,s=r.children;for(let r=0;r<s.length;++r){if(!Ml(s[r]))throw`Expected a key-value pair, but got: ${s[r]}`;const a=s[r].children[0];0===a.value.length||0===a.value.trim().length?i.push(El(e,`keys must be non-empty and must not only consist of whitespace. given: '${a.value}'`,Rl(a))):t(a)?o.has(a.value)?i.push(El(e,`keys must be unique. duplicate: '${a.value}'`,Rl(a))):o.add(a.value):i.push(El(e,`${n}. given: '${a.value}'`,Rl(a)))}return{errors:i,keys:Array.from(o)}}(e,n,i,t);if(s.errors.length>0)return s.errors;const a=[];return a.push.apply(a,r(e,s.keys,Rl(t))),a.length>0||a.push.apply(a,function(e,t,n){const r=[];for(let i=0;i<t.length;++i){if(!Ml(t[i]))throw`Expected a key-value pair, but got: ${t[i]}`;const o=t[i].children[0],s=t[i].children[1];if(s)r.push.apply(r,n(e,o,s));else{const t="root"===e?o.value:`${e}[${o.value}]`;r.push(El(t,"missing value",Rl(o)))}}return r}(e,t.children,o)),a}function El(e,t,n){return{path:e,message:t,range:n}}function Ml(e){return"property"===e.type}function Tl(e){return"number"===e.type}function Pl(e){return"string"===e.type}function Rl(e){return[e.offset,e.offset+e.length]}function Il(e){return e.type}function Ll(e){return`[${e.map((e=>`'${e}'`)).join(", ")}]`}const Ol=["(",")","<",">"],zl=["||","&&","==","!=","<=",">="],Fl=["*","/","+","-"],Dl=[];function jl(e,t,n,r){if(t<0||t>=e.length)throw`pos ${t} out of range: [0, ${e.length}[`;const i=Nl(e,n,r);for(let e=0;e<i.ranges.length;++e){const n=i.ranges[e];if(n[0]<=t&&t<n[1])return{token:i.tokens[e],range:n};if(n[0]>t)return{token:null,range:0===e?[0,n[0]]:[i.ranges[e-1][1],n[0]]}}return{token:null,range:0===i.ranges.length?[0,e.length]:[i.ranges[i.ranges.length-1][1],e.length]}}function Nl(e,t,n){let r=[],i=[];const o=function(a,l){return a>=e.length?(s(a-l,a),{ranges:r,tokens:i}):function(e,t,n){return n.indexOf(e.slice(t,t+2))>=0}(e,a,n)?(s(a-l,a),s(a,a+2),o(a+2,0)):function(e,t,n){return n.indexOf(e[t])>=0}(e,a,t)?(s(a-l,a),s(a,a+1),o(a+1,0)):function(e,t){return""!==e.slice(t,t+1).trim()}(e,a)?(l++,o(a+1,l)):(s(a-l,a),o(a+1,0))},s=function(t,n){n>t&&(i.push(e.slice(t,n)),r.push([t,n]))};return o(0,0)}function Bl(e,t,n,r){return[n===t.length?e.length:t[n][0],r===t.length?e.length:t[r-1][t[r-1].length-1]]}const ql=["==","!="],Gl=["<","<=",">",">=","==","!="],Vl=["||","&&"];let Wl,Hl,Ul,Zl;function Xl(e,t,n){const r=function(e){return Nl(e,Ol,zl)}(e),i=function(e,t,n){for(let[e,n]of Object.entries(t))if("enum"===n.type){if(n.values.length<1)return nu(`no values given for enum category ${e}`)}else if("boolean"!==n.type&&"numeric"!==n.type)return nu(`unknown category type: ${n.type} for category ${e}`);Wl=t,Hl=n,Ul=e,Zl=0;const r=Kl();return null!==r.error?r:Ql()?{error:null,range:[],completions:[]}:nu(`unexpected token '${Ul[Zl]}'`,[Zl,Zl+1],Vl)}(r.tokens,t,n);return i.tokens=r.tokens,null!==i.error&&(i.range=Bl(e,r.ranges,i.range[0],i.range[1])),i}function Kl(){const e=$l();if(null!==e.error)return e;if(Ql())return{error:null,range:[],completions:[]};for(;t=Ul[Zl],Vl.indexOf(t)>=0;){if(Jl(),Ql())return nu(`unexpected token '${Ul[Zl-1]}'`,[Zl-1,Zl],[]);const e=$l();if(null!==e.error)return e}var t;return{error:null,range:[],completions:[]}}function $l(){return eu()&&"enum"===Wl[Ul[Zl]].type?Yl(ql,((e,t,n)=>function(e,t){return Wl[e].values.indexOf(t)>=0}(e,n)),((e,t,n)=>void 0!==Wl[e]?Wl[e].values:[])):eu()&&"numeric"===Wl[Ul[Zl]].type?Yl(Gl,((e,t,n)=>function(e){return!isNaN(Number(e))}(n)),((e,t,n)=>["__hint__type a number"])):tu(Ul[Zl])?(Zl++,{error:null,range:[],completions:[]}):eu()&&"boolean"===Wl[Ul[Zl]].type?Zl+1===Ul.length||ql.indexOf(Ul[Zl+1])<0?(Zl++,{error:null,range:[],completions:[]}):Yl(ql,((e,t,n)=>tu(n)),((e,t,n)=>["true","false"])):function(){const e=Ul[Zl];return"string"==typeof e&&"in_"===e.substr(0,3)}()?function(){const e=Ul[Zl];if(e.length<3)return void console.error(`expected something like 'in_xyz', but got: '${e}'`);const t=e.substring(3);return Hl.indexOf(t)<0?nu(`unknown area: '${t}'`,[Zl,Zl+1],Hl.map((e=>"in_"+e))):Zl+1===Ul.length||ql.indexOf(Ul[Zl+1])<0?(Zl++,{error:null,range:[],completions:[]}):Yl(ql,((e,t,n)=>tu(n)),((e,t,n)=>["true","false"]))}():"("===Ul[Zl]?function(){const e=Zl;if(Ql())return nu("unmatched opening '('",[e,Zl],[]);Jl();const t=Kl();return null!==t.error?t:")"===Ul[Zl]?(Jl(),{error:null,range:[],completions:[]}):nu("unmatched opening '('",[e,Zl],[])}():Ql()?nu("empty comparison",[Zl,Zl],[]):function(){const e=Ul[Zl];return"string"==typeof e&&Hl.indexOf(e)>=0}()?function(){const e=Ul[Zl];if("in_"!==e.substring(0,3))return nu("area names must be prefixed with 'in_'",[Zl,Zl+1],Hl.map((e=>"in_"+e)));console.error(`${e} is a valid area operator and should have been detected earlier`)}():nu(`unexpected token '${Ul[Zl]}'`,[Zl,Zl+1],Object.keys(Wl).concat(Hl.map((e=>"in_"+e))).concat(["true","false"]))}function Yl(e,t,n){if(Zl+1>=Ul.length)return nu("invalid comparison. missing operator.",[Zl,Zl+1],[]);const r=Ul[Zl],i=Ul[Zl+1];if(e.indexOf(i)<0)return nu(`invalid operator '${i}'`,[Zl+1,Zl+2],e);if(Zl+2>=Ul.length)return nu("invalid comparison. missing value.",[Zl,Zl+2],[]);const o=Ul[Zl+2];return t(r,i,o)?(Zl+=3,{error:null,range:[],completions:[]}):nu(`invalid ${r}: '${o}'`,[Zl+2,Zl+3],n(r,i,o))}function Ql(){return Zl===Ul.length}function Jl(){Zl++}function eu(){return void 0!==Wl[Ul[Zl]]}function tu(e){return"true"===e||"false"===e}function nu(e,t,n){return{error:e,range:t,completions:n}}const ru=["+","-","*"];let iu,ou,su;function au(e,t){const n=function(e){return Nl(e,Fl,Dl)}(e),r=function(e,t){iu=t,ou=e,su=0;const n=function(){const e=lu();if(null!==e.error)return e;if(uu())return{error:null,range:[],completions:[]};for(;t=void 0,t=ou[su],ru.indexOf(t)>=0;){if(cu(),uu())return du(`unexpected token '${ou[su-1]}'`,[su-1,su],[]);const e=lu();if(null!==e.error)return e}var t;return{error:null,range:[],completions:[]}}();return null!==n.error?n:uu()?e.reduce(((e,n)=>e+(t.indexOf(n)>=0)),0)>1?du("too many encoded values, max: 1",[0,ou.length],[]):{error:null,range:[],completions:[]}:du(`unexpected token '${ou[su]}'`,[su,su+1],ru)}(n.tokens,t);return r.tokens=n.tokens,null!==r.error&&(r.range=Bl(e,n.ranges,r.range[0],r.range[1])),r}function lu(){return uu()?du("empty expression",[su,su],[]):iu.indexOf(ou[su])>=0||function(e){return!isNaN(Number(e))}(ou[su])?(cu(),{error:null,range:[],completions:[]}):du(`unexpected token '${ou[su]}'`,[su,su+1],["__hint__type a number"].concat(iu))}function uu(){return su===ou.length}function cu(){su++}function du(e,t,n){return{error:e,range:t,completions:n}}function hu(e,t,n,r){const i=function(e){for(let t=e.length-1;t>=0;--t)if(""!==e.slice(t,t+1).trim())return t;return-1}(e);if(t>i){let i=e;for(;i.length<t;)i+=" ";i=i.slice(0,t),i+="…";const o=n(i),s=r(i,t);if(o.range[0]!==s.range[0])return{suggestions:[],range:null};const a=o.completions.filter((e=>pu(e,s.token.substring(0,s.token.length-1))));return{suggestions:a,range:0===a.length?null:[s.range[0],t]}}{let i=r(e,t);const o=e.substring(0,i.range[0])+"…"+e.substring(i.range[1]),s=r(o,i.range[0]),a=n(o);if(a.range[0]!==s.range[0])return{suggestions:[],range:null};const l=a.completions.filter((e=>pu(e,null===i.token?s.token.substring(0,s.token.length-1):i.token.substring(0,t-i.range[0]))));return{suggestions:l,range:0===l.length?null:[s.range[0],null===i.token?t:i.range[1]]}}}function pu(e,t){return e.substring(0,t.length)===t}function fu(e,t){for(;t>=e.length;)e+=" ";const n=function(e,t){if(0===e.trim().length)return{path:[],signature:["root"],tokenRange:[]};const n=el(e,[],{allowEmptyContent:!1,allowTrailingComma:!1,disallowComments:!0});if(!n)return{path:[],signature:[],tokenRange:[]};const r=tl(n,t,!0);if(!r)return{path:[],signature:[],tokenRange:[]};const i=function(e){const t=[e];let n=e;for(;n.parent;)t.push(n.parent),n=n.parent;return t.reverse(),t}(r),o=i.map(((e,t)=>function(e,t){if("object"===e.type)return"object";if("property"===e.type)return null!==t&&e.children[1]===t?`property[${e.children[0].value}]`:"property";if("array"===e.type)return null!==t?`array[${e.children.indexOf(t)}]`:"array";if("string"===e.type||"number"===e.type||"boolean"===e.type){if(e.parent&&"property"===e.parent.type){if(e.parent.children[0]===e)return"key";if(e.parent.children[1]===e)return"value";throw"a literal in a property should be the first or second child"}return"literal"}return`unknown[${e.type}]`}(e,t+1<i.length?i[t+1]:null)));o.unshift("root");const s=[r.offset,r.offset+r.length];return"property"===r.type&&r.colonOffset&&t>r.colonOffset&&(o[o.length-1]=`property[${r.children[0].value}]`,o.push("value"),s[0]=r.colonOffset+1),{path:i,signature:o,tokenRange:s}}(e,t),r=n.signature.join("-");if(/^root-object(-property|-property-key)?$/.test(r)){return{suggestions:['"speed"','"priority"','"distance_influence"','"areas"'].filter((e=>!mu(n.path[0].children,n.path[1],e))),range:"key"===n.signature[n.signature.length-1]?n.tokenRange:[t,t+1]}}if(/^root-object-property\[distance_influence]-value$/.test(r))return{suggestions:["__hint__type a number"],range:n.tokenRange};if(/^root-object-property\[(speed|priority)]-array\[[0-9]+]-object(-property|-property-key)?$/.test(r)){const e=['"if"','"else_if"','"else"'],r=['"limit_to"','"multiply_by"'],i=n.signature.length>4&&gu(n.path[3].children,n.path[4],e),o=n.signature.length>4&&gu(n.path[3].children,n.path[4],r);let s=[];return i||s.push(...e),o||s.push(...r),{suggestions:s,range:"key"===n.signature[n.signature.length-1]?n.tokenRange:[t,t+1]}}if(/^root-object-property\[(speed|priority)]-array\[[0-9]+]-object-property\[(else)]-value$/.test(r))return{suggestions:['""'],range:[t,t+2]};if(/^root-object-property\[(speed|priority)]-array\[[0-9]+]-object-property\[(if|else_if)]-value$/.test(r))return{suggestions:["__hint__type a condition"],range:n.tokenRange};if(/^root-object-property\[(speed|priority)]-array\[[0-9]+]-object-property\[(limit_to|multiply_by)]-value$/.test(r))return{suggestions:["__hint__type an expression"],range:n.tokenRange};if(/^root-object-property\[areas]-value$/.test(r))return{suggestions:[' {\n "type": "FeatureCollection",\n "features": [\n {\n "type": "Feature",\n "id": "area_id",\n "geometry": {\n "type": "Polygon",\n "coordinates": [[[0, 0], [0, 0], [0, 0], [0, 0]]]\n }\n }\n ]\n }'],range:n.tokenRange};if(/^root-object-property\[areas]-object(-property-key)?$/.test(r)){return{suggestions:['"type"','"features"'].filter((e=>!mu(n.path[2].children,n.path[3],e))),range:"key"===n.signature[n.signature.length-1]?n.tokenRange:[t,t+1]}}if(/^root-object-property\[areas]-object-property\[type]-value$/.test(r))return{suggestions:['"FeatureCollection"'],range:n.tokenRange};if(/^root-object-property\[areas]-object-property\[features]-value$/.test(r))return{suggestions:["__hint__type an array of features"],range:n.tokenRange};if(/^root-object-property\[areas]-object-property\[features]-array\[[0-9]+]-object(-property-key)?$/.test(r)){return{suggestions:['"type"','"id"','"geometry"'].filter((e=>!mu(n.path[5].children,n.path[6],e))),range:"key"===n.signature[n.signature.length-1]?n.tokenRange:[t,t+1]}}if(/^root-object-property\[areas]-object-property\[features]-array\[[0-9]+]-object-property\[type]-value$/.test(r))return{suggestions:['"Feature"'],range:n.tokenRange};if(/^root-object-property\[areas]-object-property\[features]-array\[[0-9]+]-object-property\[id]-value$/.test(r))return{suggestions:["__hint__type an area id"],range:n.tokenRange};if(/^root-object-property\[areas]-object-property\[features]-array\[[0-9]+]-object-property\[geometry]-object(-property-key)?$/.test(r)){return{suggestions:['"type"','"coordinates"'].filter((e=>!mu(n.path[7].children,n.path[8],e))),range:"key"===n.signature[n.signature.length-1]?n.tokenRange:[t,t+1]}}return/^root-object-property\[areas]-object-property\[features]-array\[[0-9]+]-object-property\[geometry]-object-property\[type]-value$/.test(r)?{suggestions:['"Polygon"'],range:n.tokenRange}:{suggestions:[],range:[]}}function mu(e,t,n){return e.some((e=>e!==t&&e.children&&`"${e.children[0].value}"`===n))}function gu(e,t,n){return e.some((e=>e!==t&&e.children&&n.indexOf(`"${e.children[0].value}"`)>=0))}class _u{cm;_categories={};_numericCategories=[];_validListener;constructor(e,t){this.categories=e,this.cm=Xa()(t,{lineNumbers:!1,matchBrackets:!0,autoCloseBrackets:!0,mode:{name:"javascript",json:!0},extraKeys:{"Ctrl-Space":this.showAutoCompleteSuggestions,"Alt-Enter":this.showAutoCompleteSuggestions},lint:{getAnnotations:this.getAnnotations},gutters:[]}),this.cm.on("cursorActivity",(e=>{const t=this.cm.state.completionActive;this.cm.closeHint(),t&&this.showAutoCompleteSuggestions()}))}set categories(e){this._categories=e,0===Object.keys(e).length&&console.warn("Empty list of categories provided to Custom Model Editor"),this._numericCategories=[],Object.entries(this._categories).forEach((([e,t])=>{"numeric"===t.type&&this._numericCategories.push(e)}))}set value(e){this.cm.setValue(e)}get value(){return this.cm.getValue()}get jsonObj(){try{return JSON.parse(this.cm.getValue())}catch(e){throw"invalid json: "+this.cm.getValue()+"error: "+e}}getUsedCategories=()=>{const e=this.getCurrentErrors(this.cm.getValue(),this.cm);return 0!==e.errors.length&&console.warn("invalid custom model",e.errors),e.usedCategories};setExtraKey=(e,t)=>{this.cm.getOption("extraKeys")[e]=t};set validListener(e){this._validListener=e}getAnnotations=(e,t,n)=>{const r=this.getCurrentErrors(e,n).errors;return this._validListener&&this._validListener(0===r.length),r};getCurrentErrors=(e,t)=>{const n=cl(e),r=n.errors.map(((e,n)=>({message:e.path+": "+e.message,severity:"error",from:t.posFromIndex(e.range[0]),to:t.posFromIndex(e.range[1])}))),i=n.areas,o=new Set;return n.conditionRanges.forEach(((n,s)=>{const a=e.substring(n[0],n[1]);if(a.length<3||'"'!==a[0]||'"'!==a[a.length-1])return void r.push({message:`must be a non-empty string with double quotes, e.g. "true". given: ${a}`,severity:"error",from:t.posFromIndex(n[0]),to:t.posFromIndex(n[1])});const l=Xl(a.substring(1,a.length-1),this._categories,i);null!==l.error&&r.push({message:l.error,severity:"error",from:t.posFromIndex(n[0]+l.range[0]+1),to:t.posFromIndex(n[0]+l.range[1]+1)}),Object.keys(this._categories).filter((e=>l.tokens.includes(e))).forEach((e=>o.add(e)))})),n.operatorValueRanges.forEach(((n,i)=>{const s=e.substring(n[0],n[1]);if(s.length<3||'"'!==s[0]||'"'!==s[s.length-1])return void r.push({message:`must be a non-empty string with double quotes, e.g. "100". given: ${s}`,severity:"error",from:t.posFromIndex(n[0]),to:t.posFromIndex(n[1])});const a=au(s.substring(1,s.length-1),this._numericCategories);null!==a.error&&r.push({message:a.error,severity:"error",from:t.posFromIndex(n[0]+a.range[0]+1),to:t.posFromIndex(n[0]+a.range[1]+1)}),this._numericCategories.filter((e=>a.tokens.includes(e))).forEach((e=>o.add(e)))})),0===r.length&&n.jsonErrors.forEach((e=>{r.push({message:e.path+": "+e.message,severity:"error",from:t.posFromIndex(e.range[0]),to:t.posFromIndex(e.range[1])})})),{errors:r,usedCategories:Array.from(o)}};showAutoCompleteSuggestions=()=>{const e=cl(this.cm.getValue()),t=this.cm.indexFromPos(this.cm.getCursor()),n=fu(this.cm.getValue(),t);if(n.suggestions.length>0)if(1===n.suggestions.length&&"__hint__type a condition"===n.suggestions[0])this._completeExpression(n,t,((t,n)=>function(e,t,n,r){return hu(e,t,(e=>Xl(e,n,r)),((e,t)=>function(e,t){return jl(e,t,Ol,zl)}(e,t)))}(t,n,this._categories,e.areas)));else if(1===n.suggestions.length&&"__hint__type an expression"===n.suggestions[0])this._completeExpression(n,t,((e,t)=>function(e,t,n){return hu(e,t,(e=>au(e,n)),((e,t)=>function(e,t){return jl(e,t,Fl,Dl)}(e,t)))}(e,t,this._numericCategories)));else{const e=this.cm.indexFromPos({line:this.cm.getCursor().line,ch:0}),t=this.cm.indexFromPos({line:this.cm.getCursor().line+1,ch:0}),r=Math.max(e,n.range[0]);let i=Math.min(t,n.range[1]);i>r&&/\r\n|\r|\n/g.test(this.cm.getValue()[i-1])&&i--;const o=[this.cm.posFromIndex(r),this.cm.posFromIndex(i)];this._suggest(o,n.suggestions)}};_completeExpression=(e,t,n)=>{let r=e.range[0],i=e.range[1];'"'===this.cm.getValue()[r]&&r++,'"'===this.cm.getValue()[i-1]&&i--;const o=n(this.cm.getValue().substring(r,i),t-r);if(o.suggestions.length>0){const e=[this.cm.posFromIndex(o.range[0]+r),this.cm.posFromIndex(o.range[1]+r)];this._suggest(e,o.suggestions.sort())}};_suggest=(e,t)=>{const n={hint:function(){const n={from:e[0],to:e[1],list:t.map((e=>{return t="__hint__",e.substr(0,8)===t?{text:"",displayText:e.substring(8)}:{text:e};var t}))};return Xa().on(n,"pick",(function(e){})),n},completeSingle:!1};this.cm.showHint(n)}}var yu;function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vu.apply(this,arguments)}const bu=function(e){return u.createElement("svg",vu({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 96 960 960"},e),yu||(yu=u.createElement("path",{fill:"currentColor",d:"M158.511 965.582q-24 0-42-18t-18-42v-600q0-24 18-42t42-18h405l-60 60h-345v600h600v-348l60-60v408q0 24-18 42t-42 18zm300-360zm182-352 43 42-285 284v86h85l286-286 42 42-303 304h-170v-170zm171 168-171-168 100-100q17-17 42.311-17t42.69 18l84 85q17 18 17 42.472t-18 41.528z"})))};var xu,wu,ku;function Cu(){return Cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cu.apply(this,arguments)}const Su=function(e){return u.createElement("svg",Cu({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 96 960 960"},e),xu||(xu=u.createElement("path",{fill:"currentColor",d:"m811.146 420-171-168 100-100q17-17 42.31-17 25.312 0 42.69 18l84 85q17 18 17 42.472t-18 41.528z"})),wu||(wu=u.createElement("path",{fill:"currentColor",d:"m562.079 592.242 42.851 42.032 206.203-214.29-41.992-41.992zM370.43 521.742l-32.266 32.266v170h170l33.906-34.024-42.851-42.03-16.055 16.054h-85v-86.016l14.727-14.648-42.461-41.602zM431.88 460.988l42.461 41.601 208.823-208.581-43.008-41.992zM458.146 604ZM758.033 788.08l60.073 60.366.058-352.446-60 60z"})),ku||(ku=u.createElement("path",{fill:"currentColor",d:"M114.61 265.57c-10.055 11.294-16.446 23.793-16.446 38.438v600c0 16 5.969 29.992 17.969 41.992 12 12 26.031 18.008 42.031 18.008h600c16 0 29.992-6.008 41.992-18.008 1.733-1.732 1.135-4.239 2.617-6.055l-44.609-43.71v7.773h-600V308.227L114.61 265.57zM275.835 303.246l227.33.762 60-60-346.658.078z"})),u.createElement("path",{d:"m56.648 207.056 796.235 799.184",style:{fill:"none",stroke:"currentColor",strokeWidth:60}}))};function Au(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];2===r.length&&"true"===r[0]&&"false"===r[1]?t[n]={type:"boolean"}:2===r.length&&">number"===r[0]&&"<number"===r[1]?t[n]={type:"numeric"}:t[n]={type:"enum",values:r.sort()}})),t}function Eu({customModelEnabled:t,encodedValues:n,customModelStr:r,queryOngoing:i,drawAreas:o}){const[s,a]=(0,u.useState)(),[c,d]=(0,u.useState)(!1),h=(0,u.useRef)(null);(0,u.useEffect)((()=>{const e=(t=Au(n),new _u(t,(e=>{var t;return null===(t=h.current)||void 0===t?void 0:t.appendChild(e)})));var t;a(e),e.cm.setSize("100%","100%"),e.cm.on("change",(()=>Fr.dispatch(new Zr(e.value,!1)))),e.validListener=e=>d(e)}),[]),(0,u.useEffect)((()=>{s&&(s.categories=Au(n),t&&s.cm.focus(),s.value!==r&&(s.value=r))}),[s,n,t,r]);const p=(0,u.useCallback)((e=>{if(e.ctrlKey&&"Enter"===e.key){try{JSON.parse(s.value)}catch(e){Fr.dispatch(new Kr("Custom Model "+e.toString()))}Fr.dispatch(new Zr(s.value,!0))}}),[s,c]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:Ga.customModelOptionTable,children:[(0,e.jsx)(Co,{style:{color:t?"":"lightgray"},onClick:()=>{t&&Fr.dispatch(new Jr),Fr.dispatch(new Yr),Fr.dispatch(new Ur(!t))},children:t?(0,e.jsx)(Fs,{}):(0,e.jsx)(Ns,{})}),(0,e.jsx)("div",{style:{color:t?"#5b616a":"gray"},children:l("custom_model_enabled")}),t&&(0,e.jsx)(Co,{className:Ga.drawAreas,title:l("draw_areas_enabled"),style:{color:o?"":"lightgray"},onClick:()=>Fr.dispatch(new pi(!o)),children:o?(0,e.jsx)(bu,{}):(0,e.jsx)(Su,{})})]}),(0,e.jsx)("div",{ref:h,className:Ga.customModelBox,onKeyUp:p}),(0,e.jsxs)("div",{className:Ga.customModelBoxBottomBar,children:[(0,e.jsxs)("select",{className:Ga.examples,onChange:e=>{Fr.dispatch(new Zr(Pi(Ti[e.target.value]),!0))},children:[(0,e.jsx)("option",{value:"default_example",children:l("examples_custom_model")}),(0,e.jsx)("option",{value:"exclude_motorway",children:l("exclude_motorway_example")}),(0,e.jsx)("option",{value:"limit_speed",children:l("limit_speed_example")}),(0,e.jsx)("option",{value:"cargo_bike",children:l("cargo_bike_example")}),(0,e.jsx)("option",{value:"bike_network",children:l("prefer_bike_network")}),(0,e.jsx)("option",{value:"combined",children:l("combined_example")})]}),(0,e.jsx)("a",{target:"_blank",className:Ga.helpLink,href:"https://github.com/graphhopper/graphhopper/blob/master/docs/core/custom-models.md",children:l("help_custom_model")}),(0,e.jsxs)("div",{className:`${Ga.applyButton} ${c?"":Ga.applyButtonInvalid} ${i?Ga.applyButtonProgress:""}`,children:[(0,e.jsx)(Co,{title:l("Apply custom model of text box to routing request"),disabled:!c||i,onClick:()=>{t||Fr.dispatch(new Ur(!0)),Fr.dispatch(new Zr(s.value,!0))},children:l("apply_custom_model")}),i&&(0,e.jsx)("div",{className:Ga.infiniteProgressBar})]})]})]})}function Mu({query:t,route:n,error:r,encodedValues:i,drawAreas:o}){var s;const[a,l]=(0,u.useState)(!1),c=(0,gs.useMediaQuery)({query:"(max-height: 55rem)"}),[d,h]=(0,u.useState)(c&&Tu(n)),p=(0,u.useRef)(null),f=(0,u.useCallback)((e=>{var t;!(e.target instanceof Node&&(null===(t=p.current)||void 0===t?void 0:t.contains(e.target)))&&c&&Tu(n)&&h(!0)}),[c,n]);return(0,u.useEffect)((()=>(window.addEventListener("mousedown",f),window.addEventListener("touchstart",f),()=>{window.removeEventListener("mousedown",f),window.removeEventListener("touchstart",f)}))),(0,e.jsx)("div",{className:Io.sidebar,children:(0,e.jsxs)("div",{className:Io.background,ref:p,children:[d?(0,e.jsx)(Pu,{points:t.queryPoints,onClick:()=>h(!1)}):(0,e.jsxs)("div",{className:Io.btnCloseContainer,children:[(0,e.jsx)("div",{className:Io.btnCloseInputs,onClick:()=>h(!0),children:(0,e.jsx)(Ra,{})}),(0,e.jsx)(Ca,{routingProfiles:t.profiles,selectedProfile:t.routingProfile,showCustomModelBox:a,toggleCustomModelBox:()=>l(!a),customModelBoxEnabled:t.customModelEnabled}),a&&(0,e.jsx)(Eu,{customModelEnabled:t.customModelEnabled,encodedValues:i,customModelStr:t.customModelStr,queryOngoing:(null===(s=t.currentRequest.subRequests[0])||void 0===s?void 0:s.state)===Li.SENT,drawAreas:o}),(0,e.jsx)(qs,{points:t.queryPoints})]}),!r.isDismissed&&(0,e.jsx)(Ks,{error:r})]})})}function Tu(e){return e.routingResult.paths.length>0}function Pu(t){const n=t.points[0],r=t.points[t.points.length-1],i=(0,gs.useMediaQuery)({query:"(max-height: 36rem)"});return(0,e.jsxs)("div",{className:Io.btnOpenContainer,onClick:t.onClick,children:[(0,e.jsxs)("div",{className:Io.mapView,children:[!i&&(0,e.jsx)(Ru,{text:n.queryText,color:n.color,position:n.type}),!i&&(0,e.jsx)(Lu,{points:t.points}),(0,e.jsx)(Ru,{text:r.queryText,color:r.color,position:r.type})]}),(0,e.jsx)("div",{className:Io.btnOpenInputs,children:(0,e.jsx)(Ma,{})})]})}function Ru({text:t,color:n,position:r}){return(0,e.jsxs)("div",{className:Io.mapViewRow,children:[(0,e.jsx)("div",{className:Io.markerContainer,children:(0,e.jsx)(Ps,{color:n})}),(0,e.jsx)("span",{className:Iu(r),children:t})]})}function Iu(e){switch(e){case Ii.To:return Io.queryPointText+" "+Io.queryPointTextTo;case Ii.Via:return Io.queryPointText+" "+Io.queryPointTextVia;default:return Io.queryPointText}}function Lu({points:t}){return 3===t.length?(0,e.jsx)(Ru,{text:t[1].queryText,color:t[1].color,position:Ii.Via}):t.length>3?(0,e.jsx)(Ru,{text:t.length-2+" via points",color:"#76D0F7",position:Ii.Via}):(0,e.jsx)("div",{})}var Ou=n(8192),zu={};zu.styleTagTransform=x(),zu.setAttributes=_(),zu.insert=m().bind(null,"head"),zu.domAPI=p(),zu.insertStyleElement=v(),d()(Ou.Z,zu);const Fu=Ou.Z&&Ou.Z.locals?Ou.Z.locals:void 0;var Du;function ju(){return ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ju.apply(this,arguments)}const Nu=function(e){return u.createElement("svg",ju({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 0 50 50"},e),Du||(Du=u.createElement("path",{d:"M7.5 34q-.65 0-1.075-.425Q6 33.15 6 32.5q0-.65.425-1.075Q6.85 31 7.5 31q.65 0 1.075.425Q9 31.85 9 32.5q0 .65-.425 1.075Q8.15 34 7.5 34Zm0-8.5q-.65 0-1.075-.425Q6 24.65 6 24q0-.65.425-1.075Q6.85 22.5 7.5 22.5q.65 0 1.075.425Q9 23.35 9 24q0 .65-.425 1.075-.425.425-1.075.425Zm0-8.5q-.65 0-1.075-.425Q6 16.15 6 15.5q0-.65.425-1.075Q6.85 14 7.5 14q.65 0 1.075.425Q9 14.85 9 15.5q0 .65-.425 1.075Q8.15 17 7.5 17Zm7 17v-3H42v3Zm0-8.5v-3H42v3Zm0-8.5v-3H42v3Z"})))};var Bu;function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qu.apply(this,arguments)}const Gu=function(e){return u.createElement("svg",qu({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 0 50 50"},e),Bu||(Bu=u.createElement("path",{d:"M11 40q-1.2 0-2.1-.9Q8 38.2 8 37v-7.15h3V37h26v-7.15h3V37q0 1.2-.9 2.1-.9.9-2.1.9Zm13-7.65-9.65-9.65 2.15-2.15 6 6V8h3v18.55l6-6 2.15 2.15Z"})))};var Vu=n(7936),Wu={};Wu.styleTagTransform=x(),Wu.setAttributes=_(),Wu.insert=m().bind(null,"head"),Wu.domAPI=p(),Wu.insertStyleElement=v(),d()(Vu.Z,Wu);const Hu=Vu.Z&&Vu.Z.locals?Vu.Z.locals:void 0,Uu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKxAAACsQBZm2C1AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAUySURBVGiB7ZldiFRlGMf/z+s5Izuru7PSBwRqoRcZiBWR7IY40JxZF9ToYwMhAqUuFKIb9SIKRsgotMQSWvqkCMqmC1mSac67wqFYtsK9yNQ+yFWiwtRpN7dtd77epwtnt1l3znvec8aNLvxfnbPP128f3jnzzHOA6/pvRPORNJlM3mDb9hpmvoOIFgNoA9BCRKPMfBHABSHEmWKxeMLzvErY/NcMOpVKrSaiLQB6Aaw0DJsgos8AfNDV1dWfyWSUSVDT0Ol0+nZm3gvgwSbz/Qhgl5SyP8ixKehUKvU4EfUBaGkmT72Y+Y2Ojo6nstlsyc8nKjSlUqlDRLQjYrxWzPyFbdsbc7nc5UZ2ESWp4zjPzxcwABDRumq1ejiZTFqN7KGh0+n0RgDPNE0WIGbeEIvF9jWyhToeyWQyYdv2KQC3hAgbA3AewASAm2qxCwxjlRCiM5/Pf13/x1CdtizraRgAE9EZADuJaJWUcomUcpWU8h4p5bJyuZwA8CSA7w1KCqXUa5lMZhancac3b968eHJy8hyAJRo3JqIXCoXCnuHh4bIuX2dnZ0tra+shItpmUP6B+kdhw4PeSFNTU73QAwPADtd1+0zyDQ0NTQJ4wnGcFgBbdL5EtB3ADLTx8VBKPRbg8p6U0gi4Tlwul7cB+EnrxJxOp9O3Td8bQXd3dy8hovUal78ty9plxjlbnudNAdgd4CaY+aGZG5PESqn1Ab7v53K5iya5GklKeYSZf9D5ENGG6WvT46HrMoQQHxvm8RMLId7WOjCv27RpUxwwhGbmuzXmcltb22AIQD99EmBfWCwW7wTMoImIVmuM3+mGG1O5rnsWwIjOh5nvAgygk8nkzQASmkQnwgJq9LnOSERrAAPoWCy2PMDlZAgorZj5G51dKbUSMDseS3VGIor81GiQ61udXQixDDCAVkrdGGAvhEPzFxH9qrMz89JMJiNMOt0eUGgsFJlGpVLpfIBLbGhoKCEAIJ1Ot149SdVBtemyCCGuGbTneWMApnQ+1Wp1kTV9MTg4eNxxnKMAPpJSHq/z69AlqVQqM9NcT0/Pwkqlcj8zPyyEOOm67oEI7OcB3Kqxt86Mpo7jvIR/Z4CfmflTIjpKRFuZ+RG/DEqpHiHEcgDdzJyq7TkuMfPKgYGBP8MSO47zJYC1mnr3zoym5XJ5n2VZ22tFl9V+A+5gZm0RIURu+proSg+YeW8U4JomdEbLshbNnGPP8y4JIV6NWKhe52zbfr2JeO3GiZlbZ334SqXSfgCjTRQEET2by+WKUeOZOWgkWDQL2vO8MWY+GLUgEZ3o6ur6MGp8TUGdpjmPOdu2DwD4I0o1pdRu032cn4hI22lmrs6Brm11Xo5QzxsYGMhHiLta2n9aCKH8vlAOArgQohAT0c4wZBrFdEalVGNo13UniGh/iEKHXdcdDoXmLzvAPvd4TGt8fPwQgN8MipSFEM+FwtJL22nf4wFc2Uswc8NdWr2IqC+fz2tXACGl7XTDD2K9KpVKH4BfNC5/VavVvVHINNJ2mojKWujaTuJFPzsz7z927NjvEeH8pO00EVUC5+lEIvEmgLMNTBfi8fgrUck00na6Wq3qOw0A2Wy2RERzuk1Ee/r7+8ebofORttNCiGBoACgUCu9i9s/7kfb29reaIfMTMwc98irGq95UKrWViN6p3T4qpcxGR/OX4zj3MbPvi6d4PP6VMXRvb++C0dHRU0R0WUq5FoB+0J5Hmb5GwOnTp3nFihVjAI6MjIxoN0H/N83La+nr+r/qHxuK3rF5mZJHAAAAAElFTkSuQmCC",Zu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKxAAACsQBZm2C1AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAUySURBVGiB7ZldiFRlGMf/z+s5Izuru7PSBwRqoRcZiBWR7IY40JxZF9ToYwMhAqUuFKIb9SIKRsgotMQSWvqkCMqmC1mSac67wqFYtsK9yNQ+yFWiwtRpN7dtd77epwtnt1l3znvec8aNLvxfnbPP128f3jnzzHOA6/pvRPORNJlM3mDb9hpmvoOIFgNoA9BCRKPMfBHABSHEmWKxeMLzvErY/NcMOpVKrSaiLQB6Aaw0DJsgos8AfNDV1dWfyWSUSVDT0Ol0+nZm3gvgwSbz/Qhgl5SyP8ixKehUKvU4EfUBaGkmT72Y+Y2Ojo6nstlsyc8nKjSlUqlDRLQjYrxWzPyFbdsbc7nc5UZ2ESWp4zjPzxcwABDRumq1ejiZTFqN7KGh0+n0RgDPNE0WIGbeEIvF9jWyhToeyWQyYdv2KQC3hAgbA3AewASAm2qxCwxjlRCiM5/Pf13/x1CdtizraRgAE9EZADuJaJWUcomUcpWU8h4p5bJyuZwA8CSA7w1KCqXUa5lMZhancac3b968eHJy8hyAJRo3JqIXCoXCnuHh4bIuX2dnZ0tra+shItpmUP6B+kdhw4PeSFNTU73QAwPADtd1+0zyDQ0NTQJ4wnGcFgBbdL5EtB3ADLTx8VBKPRbg8p6U0gi4Tlwul7cB+EnrxJxOp9O3Td8bQXd3dy8hovUal78ty9plxjlbnudNAdgd4CaY+aGZG5PESqn1Ab7v53K5iya5GklKeYSZf9D5ENGG6WvT46HrMoQQHxvm8RMLId7WOjCv27RpUxwwhGbmuzXmcltb22AIQD99EmBfWCwW7wTMoImIVmuM3+mGG1O5rnsWwIjOh5nvAgygk8nkzQASmkQnwgJq9LnOSERrAAPoWCy2PMDlZAgorZj5G51dKbUSMDseS3VGIor81GiQ61udXQixDDCAVkrdGGAvhEPzFxH9qrMz89JMJiNMOt0eUGgsFJlGpVLpfIBLbGhoKCEAIJ1Ot149SdVBtemyCCGuGbTneWMApnQ+1Wp1kTV9MTg4eNxxnKMAPpJSHq/z69AlqVQqM9NcT0/Pwkqlcj8zPyyEOOm67oEI7OcB3Kqxt86Mpo7jvIR/Z4CfmflTIjpKRFuZ+RG/DEqpHiHEcgDdzJyq7TkuMfPKgYGBP8MSO47zJYC1mnr3zoym5XJ5n2VZ22tFl9V+A+5gZm0RIURu+proSg+YeW8U4JomdEbLshbNnGPP8y4JIV6NWKhe52zbfr2JeO3GiZlbZ334SqXSfgCjTRQEET2by+WKUeOZOWgkWDQL2vO8MWY+GLUgEZ3o6ur6MGp8TUGdpjmPOdu2DwD4I0o1pdRu032cn4hI22lmrs6Brm11Xo5QzxsYGMhHiLta2n9aCKH8vlAOArgQohAT0c4wZBrFdEalVGNo13UniGh/iEKHXdcdDoXmLzvAPvd4TGt8fPwQgN8MipSFEM+FwtJL22nf4wFc2Uswc8NdWr2IqC+fz2tXACGl7XTDD2K9KpVKH4BfNC5/VavVvVHINNJ2mojKWujaTuJFPzsz7z927NjvEeH8pO00EVUC5+lEIvEmgLMNTBfi8fgrUck00na6Wq3qOw0A2Wy2RERzuk1Ee/r7+8ebofORttNCiGBoACgUCu9i9s/7kfb29reaIfMTMwc98irGq95UKrWViN6p3T4qpcxGR/OX4zj3MbPvi6d4PP6VMXRvb++C0dHRU0R0WUq5FoB+0J5Hmb5GwOnTp3nFihVjAI6MjIxoN0H/N83La+nr+r/qHxuK3rF5mZJHAAAAAElFTkSuQmCC",Xu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAABACAYAAACOcP4eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPMQAADzEBHgryygAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAcZSURBVGiB7ZltjFxVGcd/z53Zpdt2tzubGECb0nQXE6Hxg01NNrvqpHPv3I5lP2CyIK0bBIxNKOGlJoJR6RI0WBIIqKGtBtEYX3CiEetmd+69sx1pt8FQoTUQ4ku1ppIqCGzB9G3v3McPO0Om0zs7d6YzLiT9f5p7zv+c85szz3nOOXewLGunbdt9vI9kAH2q+rJlWZ9ebJioMkQkr6pXAL81TXPPyMjI0sWGqicDmAYUEBH54pkzZw7Ztv2xReZaUAKQTqePqOpHK8p9EfnmihUrHsxms8VFYqspAyAIgnxVeVxVd8zOzh6wbXvg/wk0ODjYVc8TA1izZk1cRDaH1K8MguCWgYGBN44ePfqHlhNWKZlMxru6ug709/evTSQS+RMnTgRhPgNg6dKlzwJzYQYR6VbVPaZpehs3blzdPmSIx+M7gPXAnX19fa5t21eGMpU/WJZ1ABiq0+8p4CbXdX/TMtKSbNv+eBAEM8DbwFFgvYj8S0Q253K5fZXeWPlDf3//VcCn6vTdAdzU39/fv2rVKvfYsWPnWgGcTCaXGIYxAVyhql/wfX97LBa7DNioqp8bGBgwxsbGni0UCgql8AAQkerFuJDGOjo6/mia5nAroDs6OnYC14rIM57n/bRQKPiu694nItcD76jqjpmZGTeVSl0OFeExOjraOTs7+yawrIHxfOCR3t7e+7PZbFOzbppmsjRh/4nH42snJydfr6xPpVIfjsVi2VJKPh4EwY1SabAsaz/QzOw9H4vFxqampv7USKNMJtPj+/4RYLWIXO84zq/DfIODg13d3d3PlcDzRmWliLzSBDDA+mKx+KJlWXdR8evVk+/7jwKrgR/XAgbo7u4eVtW1wJsicst50EEQ7GoSGqALeMyyrKkNGzZ8qJ45nU5fB9wGvNrZ2XlXLV8mk/mAqv6I+XPS7Y7jHD8Penh4+AjwxkWAA6RjsdhLpmmGbVZlkB5V3QOoqt42MTHxVg2rzM3N/QC4UlW/5zjO01CRPQDGx8cDYF9Y6wbVKyI/sSzrF5s2bUpUVxaLxQeADwI/9DwvV6sT0zS3ich1wCtdXV33lMuNEG8jqa+eRs+dO/eiaZrJckE6nV6rqtuAt+Lx+L21Gtq2fa2IPAycBTbv3bv3VE1owzC8FgGfAZ4DjojIzalU6hpAVHUX85vUV6rTW1mDg4NdQRD8nPl1cq/ruocr6+PVDXK53F8ty/oHcFWjlCLyT+CJIAj2JRKJF6pzdzqdvlFVh4Hnh4aGvu+6bmg/y5cv/xawFphwXffb1fUXQAOoal5Ebm0UWlXp7OzcHbaw1q1b16Gq3yj5tpfWzwWybfsTQRDcAbxeYtBqT1hMYxjGdKPAJa08e/bsd8IqEonEVmCgtFUfCPOUwuLJEtc2x3FeC+ULKywWix4h3zCKRGRLOp3+bGXZyMjIUhH5GlAUka/Warts2bIHgKuBX7mum63lC4XO5/P/Bl5uBhpAVXeZprmq/Hz69OlbgcuBn+VyudB+U6nUNSJyNzAbBMHtC/UfCl1SsyEC0GsYxpOAJJPJuIh8CVAR2VkTxDAeBTpU9eulSauphaDD8vXjwJ+jUKuqaVnWnfF4/Abmzxd7Hcd5KcxrmuZnABs4nEgk6h4lakKr6u+YP3qWn/cPDQ1tB7ZQ42oWop0ish1ARB4JM4yOjsZEpJxV7oly+68J7XneSeBQ6fEssHV8fDxwXfcQ8FBE6MuAdcBfHMfZH2Y4efLkzcBHRGTK87xClE4XCo93bzOq+pDnee8eW+fm5h4Efh8RHOBVQrLR+Pi4oar3MR/vNbNKtaJAn1LV71aWFwoFv1gsbgH+G2UQEflk5fmjrIMHD24CrhaRfC6Xe6El0D09PTPArnw+f8FxdXp6+qiqfjnKIKpqiMhTmUymp6r8DoAgCB6LCgx1oLPZ7LklS5bcX6ve87zdwETEsVb7vv94+aF0SU0Bx4eHhycj9gHUgQaoPBKGSEvngwXzaoU+b5rmDQAiMgrEROTpWueQWqoLXU+O47ymqluj+kVkdyaTWSkiGwGCIPhlo2NeNDSA53nPAE9FtCd8338CGFbVd3zfP1S3RZVaAg0Qj8fvBv4e0T4CrBCRg4VCwa/rrlLLoCcnJ98GxoBG3mcfrm+5UC2DBnBddwZ4uIEmTZ0kWwoN0NvbOw6cjGj/WzNjtBy6dC+M9F5PVU80M0bLoUuK1beA7/uh16l6agu0iER6n5dMJhfauGqqLdCqWhdaRIJGd8Ky2hUedftV1ab/6lvM8GhqlmERw4PGNqHz1K7wiALd1HsVaB9000BR1K7wiAId+W+OarVrIdZdZBHjPlSLFh4R959QtQs6Sjp7z830+w86SkxfjBYzezStdoVHW7VoM/1ezB5tVbsWYt2ZvpiwvzTTFbqUPap1aabLirIQuYgv9j8F7ZPhIGK1QgAAAABJRU5ErkJggg==",Ku="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA+CAYAAACbQR1vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAYVQAAGFUBN+4GkAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAATaSURBVGiB7VtdiBtVFP6+u5mxVltqUCtI/QGlIOIfVUQpMpq5d9KuLYgPrYqi0ILVaiviH4hdRUWEWuuDiC9WaCmLhSrKNklroA/VF8G/F6H40ifpwxRaSEky9/jQBpaa3c3cmWTdZD9YSGbOOffeM+ec79w7G4oI5hPGmK3NZvNAvV4/l5fNNWvWeMVicRzAIyTXish5kr9Za4/WarXJ6bKcTwdorV8G8Fa1Wl2Zh70oiopJkmwl+SKA67vJkDwCYGulUjkFzKMDwjB8g+SHJH+qVCoPZLFVLpdXJ0myA8DTAJb2oHKq1WrdUa/XzxSyDOwKrfW7JN8GABE56WonDMMSyZ0AygCYQnWV53mfA9g8cAcYYz4G8GrnO8l/0ugHQbDE9/0nRWQHydszTGWTMeb9gTmAJMMw/AzAC9Ovi4jfi36pVFqplNrmed7zInJNHnMSkQcH4oCJiQlVKpW+BPBcl0ksmU03iqI7rbU7lVKbAfTkrBS4t+8OCIKg4Pv+PpJPdLtP8rJLr01MTKgTJ06st9buJBn0cXrL+uqAi3x8UEQem0VseeeDMeYKa+2zJF8CcCuZpq45gX2jwSAIlnie9w2A9XOIniT5sLV2O8ktAFb0ZUJdQPJQXyJgw4YNS33f/1ZESj2I3yIif5McOCOJiMp90I0bNy5rNBo/kFybQm1e+hERydfr4+PjVzWbzSMk78vTbr9AMr8ICILgas/zagDuysvmAJBPBARBcJ3neccA3JaHvQFCqawWjDGrPM87joW3eCCrA4wxN4vIcQC35jShLIjTKpCkswPK5fJqEfkZwE2uNnJAk+TXAO4GsCetsoi4RUCpVIqSJPkdwLUu+jngNID3Wq3WjZVK5ZlqtforAJeOLn0RjKLoHqXUfuS/MekFf5Lc02w299fr9fPTb4iIdWid09FgGIb3k5zCANtVXHiyUyLySa1WOzqTEMnUEZCqE9RaP0TyewBXph3IBSLSUEp9pZT6dGpq6q8e5FNHAHvtv7XWGsBhAJenGiEbjlUqlW29CpO0DmPMXQSNMY8C+A6DXTxIjodh+E4KeZcUmJ0GjTGPi8ghAP85tBgESO7SWn/Qi6yIpI4AkjNHgNb6KRE5CMBLazhnvGmM2cu5Ezx1BMzogDAMtwDYB2AsrdF+QES2h2F4YN26dctnkUkdAV1TIAzD7SS/AJB5n5AzNrXb7T+iKOp6RqiUyl4Etdavk9yLdC8ZBokbrLWHtdavXHrDWputEzTG7ALQc9XNAhE5SzLGhQ1MDCAWkZhkLCKxUioWkdhaG4+NjcVJksS+78eNRiOu1+vtritxpMECAGitPwLwWpo1ADh7yeTPkVwB4BcROd1ZSGcR1tq41WrFAM7MtIgsIClpD3hFhIWL4RQC+LHzBKY/hc41a21cKBTidrsdF4vFM5OTk0nei8gCVxosVKvV3QB292FOAwVJmzYCZu0DFhpciuCcneBCQi40uMDhRIND4wCXIohhioCRd4DLdhjDlAIuneAiDS7S4BDVALjR4PA4wJEFhicFRp4GMeqdoEsRXKRB17fD/0c40uDwpIC1drSL4MjvBRYjYNQjwKUIDhUL5P52eKFh5FNgsQiOegSM/IHIYgo4psC8/FKjH7DWdv5P0OLC2cD0v5mu2X8Bfk0MprjEg5cAAAAASUVORK5CYII=",$u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAVrAAAFawBqQLmJgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAASTSURBVGiB7VtBaBxVGP6+2Z2tIg0xAVtLCVispVUk0SCWFXV1ZjZZKGk9RFsVtaC2ik2sMSAeovWu4kGveg09pAeHnbdJ0yqGXhRLQTwoepLqydRDWLMzv4dsQrrsNjO7k7fr7n4w7OzM//738e/3/v+9ebMUEbQSbNvOknxcKfW+jv6SOjrZCplMJplKpZ4FME3yQZJpXX03NQDZbPaOIAheNU3zbREZKF8+73neki4OTQlANpu9C8AZEXmD5J2bbolhGO/p5KI1AI7j7AfwDoCXANxWxWQpn8//opOTlgCMjIw8IiLTAI4BMGrZkZzVwWczti0AJGnb9iiAaQBPhGgiInJ+u/jUAuMug8PDw2Z/f/8JEZkC8ECEpt8ppR6LlUwIxKaAsbGxnSsrK6/19fVNisjeOlxciYtLFDQcgEwmszuVSk2IyCkAvfX6IXmtUS71oO4AjI6OHvB9f8o0zRdFZEejRJoVgMg5wLKswySnSY4BYEw8hOTXIkKSCRExACTKR9VzkoaIbFwvt9uwqfBjAPgdwPeGYXyRz+d/WO84VADKGf0IgHcBaE9UMaME4COl1DlgiwCMj4+nlpeXXyhn9IOaCGoByTc9z/u8agByuVxPqVQ6BWACwB7t7PRgheT9NyVBx3H2iMgkydcB9DSJmC7cLiK5JABYlnXIMIwpAM+TTDWZmDaIyOHE0tLSWZJzAIawljE7BiSvG0qpjwE8BOArAMUmc9IN3pQELcvalUgkTpdndbuax0sbFmpVgR2lUuk41qrAoHZa+nBxy4mQbdtPGoYxKSJHcIu1/P8Ul0JPhW3b3kfyjIicJLkzbiYi8jfJEoAAgF8+AgA+yUBENq6R9Mvf1+/7IrLe7lEAYSvZ5chrgVwu17O6unqS5FsA9kVqfAuQfNrzvIuN+nEc5w8Ad4exFZFvI0vadd0bhULh03Q6vZ/kMQCXo/qoQSauXBP6FyVp1L0cnpmZCQDMAZhzHGcQwCSA4wgvv0oM1culAkEEW8aS1JRSPyqlXg6CYIDkhwD+qsPNw3FwQQQFADBizerz8/N/ep73QTKZHADwCoCrEZoftCzrUAw09CugEq7rFpVSXyqlBkUkQ/JCGGKJROJEDN1HCUC8CqiGQqFwyfO8o77v3wfgMxH5p5atiMQRgChDYHsUUA0LCwu/KqUmTNPcS/IsgN+qmN3jOE6jG6OhFSAi26+ASriue8PzvE/S6fS9AJ4B8E2FybkGu4hSBhn7xkg9sG17qDzdfg5ASkSOFgqFC3X6+pnkgZDmV1siAOvIZDK7TdM8DcDq7e3NzM7O/hvVh+M4PyH888trLbW4WVxcvK6Umkkmk08Vi8V69xoiJcGWeEOkEq7rFlH/w5nWKoNNQGuWQY1o7TKoAaEDQLL9FCDRylr7KYBkZysAEZJgx+cAtOMQQLcMdhXQ/CdCzUS3DHbLYLcMdnYSjDIE0E2CbagAdHoZJNnZCii/JxDWtv0UECUAJNtPARGHQPspIGIZbD8FBEHQ2Umw4ydC6PSpMNpha6wRiEhQrgSCNTVs/tw4l7X/5/j/AZzOwmKqcltsAAAAAElFTkSuQmCC",Yu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAABACAYAAADidqwbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAARIQAAESEBdkeL6QAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPaSURBVFiF7ZhPaBx1FMc/77c7odKYaEAQvXiogh6k1OAhFx2d+c1iDgGVvajkqmLpQQ8VD6VUBfGg1Is9qbRF3KPG4EyyWSjNUmhMQYuI6CFI8RLq1hDWZrPzPGQ3hGT/zG52k1D7hWGY33u//fzevDdv5zf4vv/B+Pj4/arKXh9GRB5YW1v7OQgCnz2WAfLAw6oaBkFwdmxs7J49g6dSqTlAAVHV44ODg4vW2tG9gIuqYq29BhzdMr4OnKlUKh8WCoX1fsFN7ZzfNp4GTjuOM+953mN9hcdxPNvE/rQx5loQBG/2Ay6qShAEh1X1JjDQwndORE6EYXi9V3ADEIbhKnClje9zqrro+362p/Catue9kRwR+cb3/Quu697XM7iINMv7DonIK47j/GStfX43cFFVAFzXTafT6Zsicm8H8xU4W6lUThYKhX87hW9GXigU1kVkscP5ApxwHGcxk8kc6xoOICJXO/2Bmh6P4/iK7/vvZbPZVFdw4Ksu4bBRjO+XSqXLmUzmSJIJmzmvKwiCv1T1wV0sAmAVeDuKonOtnLZHDjC3SzDAYeBza+33rus2DWQHvEWr7UYvOI5z3ff9lxLBSdZskqoKrIjIG77vP7vduCPnANba34BHu4CVgU9U9VIqlfpjeXl5aWFhodLMOd1oUERmVbUbuIjI+SiKfk3i3Oi2E8dxt7f+UBzHF0dHR52u4alUqgDE3dBF5NjIyMjpRL6Ncg5grV0AnupmAUCsqs/MzMxcbuXUMPKadvPIGRE5PzEx0fJPqilcVXfAReQHoGU0W/RIuVz+rCv46urqPHB7y9CNlZWVF6vV6qvArYQLmAyC4OWO4cVisQzM169F5FSxWCzn8/kl4K2EcFT1nLX2oY7gNdUfuV+Gh4e/rA9GUXQByCXkjwBfiIh0BDfGzAKIyMlcLlfdahsYGHgduJFwAdZae7wj+NDQ0I/At2EYfrfdNjU19TcwycarVFup6kee5z2RGJ7L5arpdPq1ZvYoivKq+mkSOHDIGHMxm81u7g3a5Zzp6el/Wtkdx3kXSLqROFoqlc7UL5p2uE7ked6TxpirtN7x1BWLiBuG4aWewAF8339HRD5O6L5UqVSO9AwuIuJ5Xl5E3IRTgrY5TypVVWPMJFBKOCXbMzhAGIZ/Akm306M9hQNEUfQ1sKMvNJDpORxAVX/fN7gxptreq3+RJ3kFk77ARSQJfF8jvwPhdwuuje7AnB/4ghOR/uQ8SeSq2p/I/9cFt39Nxhizf03mwBeciNwtuN7qwBcc/Yo8aYdr+Plzt6pFrmx8SKyf64eqaiwi8X/xCNwLBu+YEwAAAABJRU5ErkJggg==",Qu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAABACAYAAACUTB6QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAARtwAAEbcBmmNTKwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAKkSURBVGiB7Zg/aBNhGId/71EJ0lQdCmL9MzgoCg5ChdKpGWwwbZPJKi6CICiKDhZRWv90Lbq4iLi4uXTpdwm2IBQnESy4KChYwVUQHIRo6fdzMG+4prnc1cudy/dAIHf3cu+TJ5clIIkkr7GxsRujo6O9Se7hIQHlcrlfRO7ncrnLSe6TSALAFIA8yanJycntmUuUy+V+klcah7vr9frFzCXQqKAHJG+WSqVcZhItFZS9nuddyEwCLRUUEbk1ODi4LXWJkArKgYGBgfOpSyCkgkLydqFQ6ElNIqKCcjCfz59LTQIRFQJMz87Oxr537MGYFZRDKysrZ7ougfgVAADW2hkRkTizQjJyqFHhy1YkGpz2fX8+aihuiS1VCBCrRmSJBBUAACQr1WrVdJqJU+JfK/xd4Hl3omY6lkhaoblEpGSMeRF2PapEogoKyY41Qkt0q0JA5GS1Wn3Z7lqnEl2p0FzU4dloW6LbFZrLREaMMa82CYbMd7WCEvZsbCqRVoUAw77vvw6eaFcilQqKiNzddC5YIoMKAABr7YlarfZWj1tLpFqhubTll9IskVUFxVp7vFarvQM2lsikguJ53oy+F5KRFUTkB8kPAH4BGImx45uIrJI8AmBHyAxF5Jgx5r2W2FBBRD4DmBORIoB9xphdvu8Pk3wSQwAismqMGfJ9f+f6+vp+a+0pEXkI4FNwjOQMAMjExIRW+E3yMcl5/a5aGR8fPysiz2NIvDHGDLW7VqlUDltrKwCuAdjjed7RHpLXATxbW1u7t7i4+D3OJ03CwsLCRwBzhULhUV9f31WSl3pE5Kkx5mvay1tZXl6uA3hQLBZ7vf8hEGRpaeln0j9JuoKTUJyE4iQUJ6E4CcVJKE5CcRKKk1CchOIkFCehOAnFSSh/ABGodcE7J4gvAAAAAElFTkSuQmCC",Ju="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAABACAYAAADidqwbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAARHwAAER8BCfL2SQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPHSURBVFiF7ZhPiFtFHMc/v7dJDFrYjaGKFxGpuniUUKQLyoP3MkGXPekelF4silSooB5KUUQvBSl40wpSKutB4i0KkpeU58GFwtKKf1hkD3qV4mFxZVmSZn4empTsbjZvkn3ZhaW/U2bezPvMd35/Zl5EVTlom5+fL7Rarfe8gwaXy+Vyq9X6TUSOZw4KurCwcP/W1tYnwFlArLVNOYhtr1QqJ621S8CT3S5tt9sPTVS57/uZbDb7AXAB6Gf9EsfxPxODG2Nms9nsElDa+UxEmgCpB5yIiDHmnKreHAQG6HQ61wBS9bkxZhb4TFX9IcNa+Xy+UKvVNlPbdmPMq6p6BcglDL1eq9U2YXsQjGWVSuVBa+1l4GXHKc3ej33BgyCoeJ53BXjEdY61dn9wY8wDqnrJ87w3R5z6b6fTWRkbHobhsyKyBJwYda6q3ojj+PbI8FKplC0Wix+KyHlgalQwgIis9red4EEQPF0oFJZU9ZlxoD3zPO/zbYsZluciIkEQvC0iF4H8fsCq+nej0dgWmHsqD8Pw0SAIrorIsILhbL2S2m8Dy2u5XD4tIr+mBe7atUR4GIYvAq8BG0BqtTeTyexSPtTnvu/np6amHvc87wTwPPAWcN8Y7LUoip7ataBhM+I43gJWgdUwDH8H3hCRkeGqukt1Irxni4uLU93CcmxUMAwONnA8z9fX1y8Ap8YBAzaXy/04cFFJ53n3/rXM+IfQShRFJwc9GPrC7gHy9T7A0HeE7rSkbf8UeMIRcgP4bkD/rvxOhJfL5QVVfd0RvGmtfWVmZuYl4M++/q12u708EjwIgoeBLx3BAO82m821arXaAt7vdYrIT910dYd3byfHXaiq+n0URZd77Uaj8Q3wM4C1ds8tHwg3xpwFXnABA7c8zzuzYzEKnIe983sg3Bgzq6qXHMGIyJl6vX5rZ38URRHw7dzc3M2h83t5XiqVsoVC4bqIuF4YvoiiaM87nO/7x+I4/m/YC+4qLxaLH48AXsvn8+8MG5AEhq5yY8xzqhrjVm5vW2tPNZvNleShw83zfT+jql85ghGRj9IAA3i5XM4HHnMcvzw9PX0xDTDcUev0maOqGyJyulqtdlKDq+rAE2enici5er3+V1pguKPcxdc/RFF0NU2wM1xV/0gb7AwXETspuCQNUtWJwQ9VuUvAHU3liT631k7kb8pDV+6S50fT54enXEQSA87zvMnAVfWez/e0I6v88CqcS8BNLNpFJBFurT08n09MuQt8ktGeGHD38jxtywAbqtqLeulb0N32pJT/D6Ytcj4BbQBBAAAAAElFTkSuQmCC",ec="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAViAAAFYgBxNdAoAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAARSSURBVGiB7ZvfayNVFMe/38nEHw/apU+y+OCCIC4+qAuC7YO0JHdSfeiL9GH/AdFXf+CLFhZErBVjF+3CYlUQd62+xIVIZlLiLiv6UHD9haLYlVXEXSjCFqlJO3N8yKTW0IS5M+lNdprPS2bmzL33zOGc+517h1BEYAKl1EsicsHzvIqRASNCUwFwHGdMRD4n+Q2AuUaj8WGtVts2MngXjAUAAJRSHwF4PDy9IiKvW5Z1ulKp/G3MiTaMBqBQKNwdBMFPALjr8l8k3wKwUKlUrhlzJsRoAABAKXURwPgepn8AvAfgNdd1fzblj2VqoBYklzuYbgHwBIAfHcf5uFAoPGTEnz5kwGEAv+P/ZdCJ8wDmPM/7VPbJUeMBALqWQSe+Izm/vr7+werq6lYvfTFeAiFfat5/n4i8Ozo6uqaUenp6evq2XjnSlwCQ/DZm0zsBzG9ubl5xHOfliYmJO5L6cqMFoMUhEXk+m83+qpQ6PTU1dU9sX3bPAYVC4cEgCJ4EcAzAXQACAD7JQER8AD6AgKQfnrfsvogEoX3nevtxqx+SIiKPIdpEGAURkZKIzFWr1S90Gu4EQCn1IoAXANg9cqpfXATwqud556IoB0UEjuM8JSJvGnDOJD+QnB8ZGXl/eXm50ekmKqWOiMj3AG416JxJ/gDwhm3bp8rl8vV2oyUijyK9Dw8AhwG8sr29/Vs+n58LX8R2sETk4T45ZprbST4L4LJSaimXyx0FAObz+QoA1V/f+oIAeMZG76ToRqEO4CyAouu6l2z073XYNFdJnvJ9f7FarV5tXTwIGXAJTRU4Uy6X6+3GtGZAQPJcEARFz/M+63ajbgY00FzJZUhaIpIBkAFgkcyE51Zoz4iI1bKHvxk0lccmeUj/ubojIhskl0RkwXXdtShtbBGxyMgxWHdd95H4LjZxHGdSRFaS9rOLNRE5mc1ml/Z62emGTVKnBHqyeyIi9/eiHwDnSRbHxsY+mZ2dDeJ0oFsCsQbZgwcStG0AOINQxpI6ojsJ9mr/7FiMNtdILrbLWFKMZ0AulztqWda9Gk2+BlDsJGNJ0c2AxAHIZDLHIyzTI8tYUnQzIHEJiMjxLrYNku/4vr+wsrLyS9KxoqArg4kyQCk1DuDIHqbLJE/atv22rowlxabG0yN5BpxoO78AoDg+Pl6KK2NJ0ZoDwo3PWOTz+WmSkwAaJM+G9f1V3P56hVYASMYKwMzMzE0knwNwYmtra7FWq/0Zp5/9wMgkWK/Xb7Zte3I/ZCwpRmSwVCptxGlnAguGZXDQsMIla1T6MlPvJ5amDKYvANCTwfSVgE4GxJXBQUZ3DkhfBsDwanDQGMoghhnQlz3BgWEog0MZHMrgcBI82CWAgz4JYiiDWnuC6csAEYmcAUl2hQcVS+fzeCoDAD0VSF8JwMB3gUFGKwBBEKQyA4YvQhr3pzIAB3pHyAZwXUQy4bKY+C8ou48tNP9ckboM+Bfnbd377tn9YQAAAABJRU5ErkJggg==",tc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAYlAAAGJQBP7stjgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAU9SURBVGiB7ZpdaBxVFMf/5+5M0jSKma0f1dJiq5haULEEoaWCQ+feSULYgJWIoiD4IEL1QZD64FftgyloRYtfoC+iWGJFiIiZWU2yDw1+VCn0RawPShErkTZKG9NNdo4P2W3T7W6yc2emdTf7g2F3Zu459+7lnPO/c2eJmbEQx3G2CCH6AHQx8y9EdFQI8ePIyMh3iBHbtleYpvmo7/tvxuk3LFSagEwms3JmZuY9AA9UaXsEwL6TJ08eOHz48GwcnSulThDRXs/zXovDnw7EzKUfPwHgjhpsfgewf3Z29t2xsbGpKJ0rpb4FcBeAZ3zf3xvFly4CAGZmZl5GbT8eANYAGDRN87hS6nXXdddH6P+34ueg67rPRvCjjZBS3gpgp4btFQCeZOZjSqlPHMfZouHjz9IXZt6jlHpJw0ckBIBtxU9dUgDuE0JMuK47IaXcsXv37lr9mWXnzymlBiOMJTSCiDbH5YyZtxDRwUOHDh2TUj7hum77EiatFa7tUkq9GteYlkIASCfgdwMRvcHMx5VSg0qpG6q0W1Hl+lNKqf1ERAmM7QIEgCQ7sQDsAvCrUuqD7u7u8kK7chHbnVLKt5OeBEFEUfK/VkwADwdBcEQp9ZXruj1ERMzcuYTdY1LK90PUlNCQlPJTAPcm1cEi/ASgE7VF4IcdHR2PDA0NFeIehGDmSxEBldiI2tPvoVOnTn1k27YR9yCEECLxQhMHRHR/S0vLga6urnLpjMTljIDQMPOOdDp9cGBgoCUunwLRFkGXg8zU1NRntm1Xk9BQJC2DSdFrmubw1q1b26I6ulQymASyvb39ixpWm4simDl0BDDzWwD2APgrSudRISI7CIIv+/v7r9T1oVUDiOiE7/vPnz59eh2AxwH8rDuAqBDR3dPT09/39fVZOvZCZ6lJRAwAExMT//q+/042m91IRBkAOZ1BRIWIOvP5fE5nErRkkJmDsnP2PO9z3/fvIaIuAB8DmAvrNyK35fP5rx3HWRXGSDcFuNo9z/N+8H3/QSLaQESvAPg7rP8I3JlKpUZ7e3uvqdVASwbLI6ASnucd9zzv6ba2trWYj4hLAjPfPjc3N27b9upa2mulABEtOQElzp49uw5Af9g+IrLJMIzxRfYhzqFVBIMgqJoCC3EcZ1MQBFks/tyfCETUCSDnuu7axdrp1oAlI6C7u3uzECIH4Pqw/mPkZmbO9fT03FitQSQZrIaUclsQBKMArg7rOwHWFwqF3Pbt22+qdDMWGSxh27bhuu6LRDQG4KqwfhNkXSqVyjmOc0v5jdhk0HGcTaZpfsPMLwCIfeMiBtakUqlc8T3IOQxoyGAQBBdFgGEY1xUKhX0A0kRkMbNFRBYRWUEQpInIwvwmqYXLUBQBgJlXE9G4lNLJZrNHAcBgZhG2DAghLpqAkZGRsVrtBwYGWiYnJ9OGYVhCCCsIAqs0aShO4IJzC/Nb96uKR9ToupaIxpRSju/7R4wkZbAaQ0NDeQAnikcobNvuaG1tbQOQLhQKF0wgFkQfzkdbesH30k7SKgCjSillICEZTIriG+kpAH+Etc1kMivPnDljCSHSQgiLmduN4v58KEdLyeD/leHh4WkA05h/xQ8gZhmsR7Qehuo1AiqhtQ6oJIP1ilYKVJLBeiXRp8F6ILGnwXohkafBeqIpg2jK4DKXQWhMQEPJIPT2A5Z3CjRlsJGKYFMGmzLYlMFY3w7XG7oyuLwjoKEWQjp/kmqoFND5m1xTBhspAtCUwaYMhk6BhlIBNFNgeRdBA8A/OB8JVHZUvNZIEfAf4JbpKskQ/HUAAAAASUVORK5CYII=",nc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPHgAADx4B+ux9RAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAVTSURBVHic7ZtdiFVVFMd/czJjMpMCy2myjxcNNBBKDE2DpKSmccrSkNVLFKMPQg9ak0I+2INp9iCR1JD4UAspy5rRTNEJnEqTqQhSMF8KTUcNCjP7spwe9rrjzDjXe886+9wZ0x8cuHPOXWv995p97tn77LWrurq6yBMRuRN4ELgFqLXjBuCaPl/9BTgCHLbjB2CLqn6Zp76q2AkQkSHANOBhO0ZndHkI+NCOdlX9J6O/XkRLgIjUAi8As4Frozg9l5+BDcCLqno4hsPMCRCRq4DngIXAlTFElcHvwCvASlX9LYsjdwJE5DLgKWAZcH0WERk4BiwF1qrqvx4HrgSIyDjgHWCcJ2gO7AMeV9V9aQ2TtAYiUgfsZvA0HoKW3aYtFakSICILgVZgeNpAFWA40Coii9IYlXULiMhQ4HXgSZ+2irMOmK+qf5f6YskE2HN9MzAjjraKsQ14qNS4oZxbYDUXXuMhaF5d6kvn7QEi0gi8EVHUQDBPVZuLXSyaABGZCrQBl+ckrFKcBqar6qf9Xew3ASIyGvgKGBlRyClgK7AdOEiY+BwBqoAb7bgZmA7cR9xR5U/AHap6qO+FIUUMXiNe41uAtcB2Vf2zyHeOA1/b51dFpBq4n/DUaYigYSShTTP7XjinB1jXb48QdBfwrKruyuJERCYDLwOTI2i6W1U/73mivx6wImOQP4BGVX07ox8ALIFTROQJoBmozuDuJWBqzxO9eoCIPAJszBCgE2hQ1Y4MPooiIhMJt1RNBjf1qrq58Ed3Amx2txe4zen4O8KvbZR5ejHsvUMbMNbp4ltggqqegd4DoTn4G38CmJl34wEsxkyL6eF2wksboHcCHnM6PAPMVdUDTvvUWKy5FtvDnMKHBEBErsA/3F2hqh87bd1YTO8P9gxrc3cPmA4Mczg6Dix3iojBctOQlmGENncnwDvYWKaqJ522mbHYy5zmDQCJiFQB9Q4HBwnP5YGmmaAlLfUiUpUAE/E9Vzeq6mmHXVRMg2fsUgNMSIBbnbE3Oe3ywKtlTILvv3+COPOFWLTjGxfUeBOwJ/YSVRZMyx6HqTsBuY/4HHg0uRPQ6bDJG4+mmgQYVaFgeePRNCr1ytD/jQQ46rDLMh/PC4+mownOe8dhkzeu3zJvAmodNnnj0eROwCRbMhsUmJZJDlN3AkYQ6oAGC9MImtLSmQDfO4N6ZpB54dVyIAE68PWCWSIy4MtmpmGWw7QT+CZR1S58s6mbgEaHXWwaCVrSsklVuwoDoRZn8KUiMmDVIhZ7qdO8Bc6+EmsjLF6m5TpgsVNADBabhrScIrQ5JEBV/yJUVHhoEpEHnLZuLGaT03ybtbnXusB7TmcJsF5ExjjtU2Ox1uOocjPeLXxI+pzc73Q4glChlfsI0WK04nvuQ1ga21D4ozsBVmm5JIO2sUCHLWDmgvnuwL8uCLCksC4IfbqQqn5AKIL0UgPstKXsqJjPnWSbiH3Wc2UY+q8PaCLbC89q4C0RmQ8sUtUvMvhCRO4CVgFTsvgxnu97oliNUCvxhrrvA28Cn5RTuGjxhwL3Ak8Dj0bSsUlVS5fImIA8iqR+BbYQuvGPdhReZNZytlDqHsIOk6sjxi5aJHXRl8kVfY6awYK8VFWQBcUaDyUGElZhuSa6pMqx5nxVolDeSOoZYEccPRVlB0H7eSmZAFt2qiOUoF8orAPqylm+S7VlxjZMrMQ/Bs+bM0CTqq4q1yD1niHblrKewbdr5CShWOujNEbeTVPjCRMKb1ldbPYDs1V1b1pDV1e2QOOBeYStawPFMdMw3tN4uLRx8tLW2Uubpy/27fP/AamW7NQNtbA8AAAAAElFTkSuQmCC",rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAABACAYAAACOcP4eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAPMQAADzEBHgryygAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbzSURBVGiB7ZlvjFxVGYef99y5dXGprGJSKhjq7kajEkkaY1h3G8a9c2dc0YbUjh/EaFGsYqQVsWJQyUQtqSRVIaDSmkUsKLqRD9aw3Xvv1IW0Wmg26Nb/cUtME4zVdraubRaYva8fZraZbu/M3LnTSZfE36e557znnGfe857/witImUzmMmPM7eZig8SV67qOiBwB3pC62DDNlE6nu2zbLgDbAAMU5eIiNVY2m71GVR8Frq0maRiGq62LCVVPhULB2La9BRgDrqzJmg6CYGfTmB4YGLikY3QRGh4evvrgwYP7ge8Ar1qSXYRKjEQqn89b2Wy20N3dfSCfz6/oIOdZua6btyzrt8D1dUyKAJEDMZfLrZ6dnf0JcL2IMDs7+xXg7s6gwsjIyFXlcvn7wA0NzMqpVOoAwHkDMZfLvUdVf6yqVwCHgX5gZRiG7y4Wi4cvNLDrulngCaC7iekB3/fXwbnhIa7rbg3D0FPVK1R1V09Pz5CI3AakjDE/upDxPTAwcInruvcB+2IAIyLFxd8pAMdxLjfG7AFGVHXOGLPZ9/3HqzaPua57I7Cxu7t7O/D5doFzudy7wjDcA7w5bplaaOM4zoAx5jlgRESmVfWdnuc9XlsglUp9BjguIltd1603SJoqnU6nXNe9MwzDA60AA2eMMc+ehTbGfB14o4hMz83NXVcsFv+6tMT4+Pi/VPVWKuH08Pr161e2CpzJZHpt254EdgB2K2VF5Lnx8fEXz0KLyM1ASVWvWbly5VC9gkEQPKGqjwFvmp+f39ki8EdF5HfAYCvlFqWqf679Np7nHVPVWwCjqnscx1lVr3C5XP4scExVP+m67vuaNeY4zirXdX8hIo8AlyYBruqBc6Ch4kUR2Q2sMsbsJmIqBJicnJwVkU8BCuxqFCaZTGaDMeb3wAfagAU4OTg4OF2bcHbv0dfXtx/YAAz29/cfn5mZiZyTZ2Zm/tbf398LrCuXyyuOHj3q1eaPjIy8Zs2aNfeLyL3Aq9sEBvjl6Ojoz2oTzs7TnuedVtUPAfOqutNxnHc0qGgbUAK21to5jjNQLpenRGTzBYBdVHFpwjl7jyAIjojIXUCXMebRdDrdFVWL53nHga9SWXTuB8RxnLcZYzYDfwQOAfMXgtgYcx50VOxKNpt9UlXfC+z0ff8LUZXl83mrVCo9KyJrVXVjEAQ/X5K/olQqrRWRYeBW4KoEzH/3fX/NeX8kwlAXFhY2ASeBrblcbm1UbWNjYwvAHdXP7el0OrUk/6UgCA6p6oPAQgJgVPU8L9eDplgs/lNEvgikwjAcXQq0qCAIJoEnReQttm3fEtmAMd8Frk4CTUQ8Q4P9tOd5o8AkcG31FBEpVf0SEAJ3Lx0DmUzmg6r64US4oJZl/Soqo9HJRS3L+jTwIvC14eHhSG8FQXAE+Cmw2rbtTYvpw8PDV4rIroTAAH+YmJj4R1RGw+PWvn37/gLcA3RblvW9enZhGO6gsuBsq4aSWJa1G3hdcubo0IAm0AA9PT07qExjI9ls9sbI2ovFaSr74t5UKrUhk8lsBUZiwh0FHlyaWLsVbRl6bGzsJWALgKp+I5/PR57gVfVb1cZuF5F7YgKXVfWmwcHBLcDB2vQwDJ9ODA3g+36RSne9/dSpUx+JsgmCoAg8r6rXAbFOOCKyPQiCQ4VCIbQs6xNUFyQRORwEwam2oKsVfRlAVe8kelFS4JhI7PufqRMnTmxf/KiOn3urn/sbFYwN7XneM8BTwFsdx8ktzXddd5D4++UzlmXdNDU19fI5MMbcB5wOwzBoVLilC0hV/Xa18ttq09Pp9KXAD6nZNTbRHVXPnqOJiYmTwA9s2/5No8ItQQ8NDe0FXgCy6XT69Yvptm0/QOWqIY483/cfqpfZ1dV1V+3RKkotQRcKhZDK/VrKtu2NANVp8GMxq/i3MWYTlfiP1N69e880q6TlC8je3t7/isjHgbCvr+9pYJz4m/1N1bHRllq+VC+VSs8Ap4F1qvoQcHnMog/7vj/WantRahm6OuJ/DbxWRN4fs9jzqVTqc622VU+Jni+q1wFxFQI3j4+P/ydJW1FK+ubypxZsv+n7/lMJ24lUIugwDI/GND3V09NTSNJGIyWCVtUXYprOVzdcF1SJoBcWFo7HNO3I61ki6Lm5udMxTTvyepYIempq6mVVrbuqLUpa2PK1osQvtiISNrNR1WUHHecuY3lBq2pTT4tIR97e26m0KXQYhsvL08ToemNM08GaRO2ERxybpr2RRO0MxDhdv7w8TbyZYXl5Oqb+7+lFddrTyws6zhIdZ3+SRImhOzUHx2q7k5WLyPLydId6PpbaWVzimC0vT8dRp3qj0+HxyvN0p9QOdJwzYhvV11enoTsSHv8DYKFg2UAoHpgAAAAASUVORK5CYII=",ic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKxAAACsQBZm2C1AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAVFSURBVGiB7ZlbiBtVGMf/3zeT0G0X3XStiNTbRhQsqBBEsIJTcmmxBakYiuJb8aEvilBpxQpRVtAqra1asF5AFC8EL2zFpJkNDGrdp0opdqG0xqIrbW3dTbuX0sxmPh+6kWw2c87kwupDf2+Z73J+O3tO5swJcJXFgdopisViof7+/rtFZADA9US0QkQiAC4R0QXP86aY+VilUjnqOM757iq3IJ1Op42JiYlHiOhJAGsBLA1YegJAlog+KxQKv7Qj2Ugg6WQyuRHATgC3dzCWAPjSMIwd+Xz+eAd91NKWZZmhUGgQwLZOBmngMoBttm3vabeB4RewLKsvFAoVADzebnMfTADrotHo8lKplG+nQVPpWCwW6u3t/QaA1YGcjvuj0SiXSiWn1UJudjESibwJINmpVQBejMfj61otWjCnE4nEg0T0fbOYD1UAfwI4B2AZgBsA9LXgMGaa5qpcLncxaIFZ/yGdThvlcnkvggmPEtEuAJ8XCoXpuuuUSqXu9DxvAxFtATCg6bOyWq0+DWAwqPQ8uVQq9ZiIZLVFRO9NTk4+MzIyckmVl06nw+VyOQNge+NYDfztuu6tjuNMBZGetxAHBgbeAnCbpuZj27Y3j42Nubrmo6Oj1VKpVIxGo+cBPKxIXcrMJ0ul0hG9ct1CjMfjdwBYo8k/YZrmU7jyoAiMbdvvAPhEKcL8RNB+/0oT0aPQz+WtuVzuctDm9XietxWA73QSkTWJROLaIL3qpddqckdt2x4KpriQYrF4lohUd9sgooeC9GIAsCyrF8ADqkQiej+4YnNE5AtNSnDpUCgUAxBWJjJ/HUzNH9M0fwSgWsD3BulTmx7KZBE5ns/nTwVT82duPah2ePcE6RNImoh+COilhYiOKsL9lmVdp+tRk1buk0VENVBLiMgxVTwcDt+i61GTvlmVZBhGV944AEBEzqninufppS3LMgHcqGk01pqaknGlELN+eoTD4eVo2Dg1Yprm2RbFVFITmhTtA4Y9z+vV5Ey3sm3UQURlTUpT6Uwmw6lUahkAmCLSS6R8ep9uRy6VSj0rIqsAfNXX1zeczWYrADA7OzvL3PTdAwAgIvOk4/H4fcy86dChQ+s9z7MATJu4snFX8Vc70p7nfUhEJwFsLpfLF5PJZJGI8gD+EPHfbxHRikQisZ6Z14vIBgA3zYV2FovFswDARKSTntbEmzI8PHxBRF6Z+3gNgI0i8q6IfKeqE5FNRPStiGypCYvIpOu6r9dymJl1c1q7b/YjEonsI6Jf262vY0/9SRVDMz2IqG3pbDZbEZFMu/VzXDAMY3f9BRYR/1UBQETalgaA1atXfyoiP3fQYtfBgwfnfbeziFRVFURU6WBAZDIZT0ReaLO87Lru3saLzMxKac/zWnq1akaxWMwT0XCrdUS003GcBd/rLCKeplC5zw6KiDwHQDlWA+eXLFnydrOAVlpEQq3I+WHb9pEgxxN14742NDQ02SzGRLQodxoAmPl5ANo1QkRnenp69vn2IaJZTYOuSRcKhd8A7NflicirBw4cmPGLMwCldLemRw3TNF8GoNqAnZ6amlL+YSwiyn9XN+80AORyuXNEtNsvTkSDuuM21j3xRKSr0gBQqVTeIKIzTUK/G4bxga6eq9WqUpqIujo9AMBxnCkRWXBKKiKDQU6wmJkX/U4DwPj4+H5c+eWrxqlIJPJRkFqzp6fn+MzMjO+pPzP7ruJOOHz4sJtIJHYQUe3U6aXai4KOtn787CKUTCZ/AtDvuu5djuMov8lqKF9oFwEBsJ2IVgYV/j/xX//Hr9KUfwAe1OfnoChuNgAAAABJRU5ErkJggg==",oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAArEAAAKxAFmbYLUAAAAB3RJTUUH4AsWFQQSVQpdpwAABhBJREFUaN7VmWtoFFcUx//nTjbRRA0x0cbGRzVLTGnqu0pQaczO7pjKagVFihpLW6Ev6EuQ9kvzQfrBDy2VfiiFKlZqBVvUvlhnR7uKQSnEttIS0iYbEfHVNiYkmjU7c08/dFY2m93NTjJRcmDY4c6dc3979tzzuEsAqgB0YfzI1Dwb+J+HCEEA2MkL4mGbLRAIzGxoaJg5rqA9Hk+fZVnPjSvorq6uGDM3jivoadOm5QGo0TRtSa7v5I1mwYaGhinxeHy1EKKSmScQ0U1m/iMej/8aiUTMXHTE4/EJACClbARwMdedW+Y0eqiqWkxEewC8CGBimik9AI4T0X5d189m0+Xz+RYIIX4D8HdXV1dFS0tLfJjlyxy7h9/vX0RElwC8ngEYAIoB7GDmM36//4Kmaasz6VMUpSLhKaWlpWtd92m/37+Smc8CmO3gtRVSyjOqqh5RVXXIe8y8IOm+0VXoQCBQA+AHIpo8kgRCRFuIqFVV1Z0pzxYl3QfXrVtX4opPr1+/fnJ/f//PAKpdChrHhBAv1dbWdjc3N18HMD3p2SvhcPjT0fo0xWKxQy4CA8BGKWVLc3Pz1hRgEFHjqC0dCATeYuYPxyhMDwDIT7M5q0OhUNuILK2q6jxm3jOGuSU/3aBpmttGuhGJiD4DUDjMwj8S0WYp5XwAi4loGxEdBnBnxGUf0fampibh2D38fv92AF9k0R0D8EI4HP4q3UNN06ZKKd8EsCtLPM8ozLzGMIxIOvdQbEveTfHjIgDHAUzJrJM3G4bxdaZFOzo6+qPR6E9er/cwET3mdCMTEUej0RNpHhWKDES7AVRkUfiJYRgncllc1/VOXdefZeYdAPocWHpTMBgszMmnNU2bAeCdLPr+7O3t3e305y4pKTlCROccWHryvXv3NuYEzczvZtt8RPT++fPn+x12J7O6u7tPM/Nah37dOCx0fX19BTPvzKKkrbi4+KiD0rVAVdVdzPw7gJUjCCS++vr6iqz1tKIobwOYkEXJx0ePHrVysGy1lHKLZVkvE1H5KOK4oijKVgB700JrmjbVsqydRJQxxBUUFBxJHWxqahLnzp1bLoRYw8xPEtFyZq4kIjAzXJDGVOj7Ia+qqkoCKAJQmyHpHAuFQodSByORCEej0atVVVWXLMu6RUTdRGQCeHS0nZEt071e7/cdHR3XEyFvSHIJBAIrpJQHiWh+ygbcpuv6l7muVFdXl5efn7+QmVfZ/rzGXmsksi8cDr+RSC5pM2IwGCyMxWJ7AbxqZ00ppZx+6tSpf0djMlVV5wFYBWAlEa0C8LitfzhJbsXKslZ5qqqqRLSfiG7rur7Q7WrJ5/M9oijKcmZeaX+ZZQAKMkzfEA6Hvx0WOtHECiHW6Lp+fKyPE4LBYGF/f/8SIlpqu1Q9gFLbPb/RdX1TTtAPU+zI9ETiVzBN87VIJDIJo9gcD0vGG+//0HkpaRfxeBypicE0TUQikTGn8fv9ywA8Yx9R3GHmFgAnDMPoSW0CEvEZUsrkOiO17sDp06fHBFbTtBlSygMAtHRnlMy8yzCMA8lNwCDgZFhmvn8BwKxZs3DlyhVXgevq6sqFEBcALM0wZSIRbaisrIxFo9FmAIWirKxsCDAzQ0o56LIsC0II1NTUuArt8Xg+BzAnh6kf+Hy+pwBAVFdXZwS2LGvINWnSJNeAVVVdbPtwTqdhRPQeAOR5PJ5B7pBq4WT3sI9kXYMmogaH87WioiIlLxEpUq9s4C7KbIfzJ86ZM6csj5mRqKGTgdNZPV1UGaU4Phu5e/fuHWGaZqbWahB44n5gYMBN6F8czm+/fPlyn7h165aTRhM9PT2uETPzdwBuO/DpgwAg2traEgP3P9NdABCPx3Ht2jXXoA3D6LHPWHL5gm0APkq0W+js7MTcuXPTZsNk4Pb2dliW5epOjEajF71eLwF4OktD8JeiKOt0Xb8JoFBJjHZ2dqK8vByKogyCNU0Tvb29aG1tdR046QgtUllZGSGimXZESfSoV5l5n8fjeT4UCg3qEdNKeXk5bty48cBLOLvVqxBC9J08efIGhv5vPj5LU3rQC7qgY+p/raHc/dLH+CUAAAAASUVORK5CYII=",sc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKxAAACsQBZm2C1AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAZUSURBVGiB1ZlbbBRlFMf//5luC61QKQuKqCV0rRBviIpBIJTuXFzJFk28xIiYeEm8JSqSGI2JfTA+SKLR+ECINyQgSTXglWZ2qouhQkzqLRqCuiMPJl7Q2sqli7s7x4ddcdnO7M6UkuL/YTP7fd8557czZ77LWQJoBzCI/49a6lAE/n0CIQhAwhgopwgksAzDODeRSJwbxmbCoSORyOFCoXBrGJsJhx4cHMyKyJowNhMOPWPGjDoAF5umuTCoTd3JBEwkElNzudwyRVHaRGQSyV9F5NtcLvdlOp3OB/GRy+UmAYDrumsAfB7EhgCiCDl7aJrWTPJpAHcBmOwxZBjADpKvWpb1STVf8Xj8UkVRvgJwcHBwcPbAwECuRvho6PTQdX0Bya8BPOgDDADNAO4QkV26ru81TXOZnz9VVWeXLmdMnz792iAMoaB1XV8iIp8AOD+E2dWu6+7SNG2bpmmj7ETk0rLrQC9kYGjDMC4G8AHJKUFtykSSt5Dcp2naPRV9C8qukytXrpxW0xkC5HRXV9eUkZGRzwDMC43rre2Koty9ePHiof7+/p8BzCzruy+VSm2oYhsop5nNZjdj/IAB4AbXdQf6+/tvw4nAIFkzRWreacMwHhGR504a01t/A6ivbFRVdV5vb+9+H5vqd1rTtLki8vR40PloFDAA5PP51dWMqkGT5EYAjTUCf0jyJtd1LwRwOcnVJLcCOFLDrlrg27u7u33ZfNND1/XbAbxRxXcWwJ2pVOpNr07TNFtc130YwDr4z+e+EpEVtm2nPbqiKop38mh5q2EYTQB2AJjq71Nusm37Lb+gmUxmxHGcj2Ox2FaScxDyRSYpjuO849HV6PkIROQxALO9+koOX7Jt28vhKFmW9aNlWdeLyB0ADgciLjLcmEwmPVNzFLRpmrMAPFrF33eHDh16LGjwfzVt2rRtJHcHHU9yyrFjx27w6hsFLSKPo8rLR/KpPXv2jAQNDgCGYZw3NDT0kYgE2luUsXjO2SdAd3Z2zhaRymW23Mn+5ubmnqBBE4lEg6Zp60TkGwBLAtP+p3hnZ+eoND1hP62q6loAk6o4eaGnp6dQK5JhGPNc172lUCjcS/Ls8KzlSOptAJ4tbzwObZpmS6FQuIekn4NsQ0PDtsrG7u5uZffu3YsURVkhIpeQXCQibSQhEuqQ7ac1ldDHp7z29nYXQBOAxfBedLb39vZurmxMp9PiOM5P7e3tXxcKhd9IDpHMAzgHJ3kyKmlmLBZ7P5PJ/Fz63jhqcTEM42rXdTeRvLDckuRqy7K2BI3U0dFRV19ff5mILEUxn1eUYo1FL6ZSqYdK11HPFTGZTDZms9lnAdyP4qrpuq47s6+v748xBgVQ3MsAWApgCcmlAOaX/NdS+VHMG7osiEbyVZJ/WpZ12ckAeykej5+lquoiEVmC4o+5EkCDz/BVqVTq3ZrQJfBmRVFWWJa1Y7yhK5VMJhtHRkYWkrwCxZTqBDAdAEi+bVnWjYGgJ1KlmekilJ5CPp9/IJ1OnwGM/eWYKIUvIZwOOmEeTSQSDfl8/maSmojMAjBM8lMAWyzL+u1Uw+i6fiWA61AsURwRkQEA79i2PVw+7nhOG4ZxjYhsBdDq4e8wyUcty9p4KmBN05zluu5rAEyP7kERWWfb9mul78VDgGEYC0SkD/75XQ8gOXfu3GHHcfaOJ3BHR8fZiqLsBXCFz5DJJFe1tbVlHcfpB9CoRKPRehHZguobJQAAyfWGYYxnKQGRSOQVeD/dSj0Tj8evAgBl/vz5XQDmBIxRB2Dt2PBGS9O0y1HM4SBSSD4BAEokElkeJpCIaGHh/EQyEXK82dTUpCokzwoZy/fsOAaFKWQCwOTW1taoIiKHQhoO1x4SWKFrI0ePHj2i5PP5QNX3Mo3n7PFFyPE/HDhw4LBy8ODBt1FR96ihl0MG8pWIvAfgz6DjSW4CAGXfvn2/kHwyoN320vZwXGTb9nCpxlJTIrIfwPNA6biVyWQ+isViBLAc/pvyd0muzmQytf4TCSXHcT4PEPt7VVVXWpb1KyqPW/F4/CpFUdYBMACcCSArInsAbLBtuwch/w4OI13Xl5N8UkQ68N+e6CcReT0SiazfuXPnX6W26PGPSvmVpE61kslko67rF5QqXV533h/6NFa0DkDLRFOEVMs/dfMzpJFEFmAAAAAASUVORK5CYII=",ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAArEAAAKxAFmbYLUAAAAB3RJTUUH4QQHDzoKt7uMpAAABf5JREFUaN7VWV1sU2UYft7vrBtswrIfcDhkQpsxI/I/yDKI23raw1wKkkCIAYZRSfxL/CMheuMuiBdcaCReGBMhSEQSNIB/6U4PWsgWiMlQicZM3dkuSJCpY4SxFtt+rxecztq1Xc/aMfdeNef7vvd9znven+f9SgBqAQxh5kh5gQX4z2kEQQDYzgEx3W7zer0LW1tbF84o0A6HYyQWiz0+o0APDQ2Fmbl9RoGeN29eAYBlmqatzvZMQS4GW1tb50YikY1CCCczzyKia8z8UyQS+T4YDEaz0RGJRGYBgJSyHcClbDO30m71UFW1lIgOAHgKwOwUW24AOE1Eh3VdP59Jl9vtXi6E+AHAH0NDQ9U9PT2RCcxX2g4Pj8ezkoguA3ghDWAAKAWwh5nPeTyei5qmbUynT1GU6nikVFRUbMp7THs8nkZmPg9gkY1j66WU51RVPaGq6rhzzLw84Xd7XkF7vd5lAL4kojmTaSBEtIOIflZVdW/S2sqE3762trayvMT05s2b54RCoW8B1OWpaJwSQjzd0NAw3N3dfRXA/IS1ZwOBwHu5xjSFw+FjeQQMAFullD3d3d07kwCDiNpz9rTX632Zmd+aojL9N4DCFMlZ5/f7eyflaVVVlzDzgSnsLYWpHkaj0V2TTUQiovcBFE9g+Csi2i6lXApgFRHtIqLjAG5NmvYR7e7o6BC2w8Pj8ewG8GEG3WEATwYCgY9TLWqaVi6lfAnAvgz1PK0wc7NhGMFU4aFYnhxNiuMSAKcBzE2vk7cbhvFJOqN9fX0h0zS/cblcx4noAbuJTERsmuaZFEvFIg2i/QCqMyh81zCMM9kY13W9X9f1x5h5D4ARG57e5vP5irOKaU3TFgB4NYO+X27evLnf7ucuKys7QURdNjw95/bt21uzAs3Mr2VKPiJ648KFCyGb08n9w8PDXzPzJptx3T4h6JaWlmpm3ptBSW9paelJG9S1SFXVfcz8I4DGSRQSd0tLS3VGPq0oyisAZmVQ8s7JkydjWXi2Tkq5IxaLPUNEVTnUcUVRlJ0ADqYErWlaeSwW20tEaUtcUVHRieSHHR0doqura50QopmZHyaidczsJCIwM/Ig7cmgx0pebW2tBFACoCFN0znl9/uPJT8MBoNsmuaV2tray7FYbJCIhokoCuC+XCcjS+a7XK4v+vr6rsZL3rjm4vV610spjxLR0qQE3KXr+kfZWmpqaiooLCxcwcwbrHhutmxNRg4FAoEX480lZUf0+XzF4XD4IIDnrK4ppZTzz549+1cuLlNVdQmADQAaiWgDgAct/RNJ4ihWmZHlqaqqEtFhIrqu6/qKfLMlt9t9r6Io65i50XqZtQCK0mzfEggEPpsQdHyIFUI067p+eqqvE3w+X3EoFFpNRGuskGoBUGGF56e6rm/LCvR0ilWZHop/hWg0+nwwGLwHOSTHdEnltCuYjBQktV1EIhFYDWYtgEet64JbzNwD4IxhGDemCozH40mmDQAAwzDGDQHx+gwpJRRFWSClPAJAS3VfyMz7DMM4kuDpnPNB0zRIKTMRp/8AVxIBR6PRKiHERQBr0pyfTURbnE5n2DTN7lQDhF1pamqCEGIimgqn0wnTNO+wvMrKyrG3dDgcHwCoycLWm263uz4fIeFwOOzU9Tug6+rGpqBVVgxndTNFRK/nClhVVbsD7x3j8TclolabCrSSkhIlF9AZGGXa/SUlJRAJFHKRTZuza2pq7nrJq6mpgUjgvLbvKUZHR2/dbdCjo6MQ0ejYhf13Ns//NjAwMHK3QQ8MDEAMDg7Ga+HnAK7biK+juQKwO9mMJWJvb29cwQ3rviMbY70A3s4VtGEYWQNP3KcAQH9/PxYvXgwp5SVFUQjAIxnI+a+KorTpun4tH83FNE24XK5sJlzouv4v6DjwqqoqAAgqihIkooVWRYm3qyvMfMjhcDzh9/vH5rVcQVtXaHA6nSlLIDPD4XDA7/eP5x7JUlVVhfr6+uJwOFwthBjp7Oz8HeP/w847F/f5fAiHwxBCoLOz8//JbSdLTXMxXG7T03n5Mv8AYvZC/w+MjzcAAAAASUVORK5CYII=";function lc(t){return(0,e.jsx)("ul",{className:Hu.instructionsList,children:t.instructions.map(((t,n)=>(0,e.jsx)(uc,{instruction:t,index:n},n)))})}const uc=function({instruction:t,index:n}){const r=(0,u.useContext)(Fi);return(0,e.jsxs)("li",{className:Hu.instruction,onClick:()=>Fr.dispatch(new di({lng:t.points[0][0],lat:t.points[0][1]},t.text)),children:[cc(t.sign,n),(0,e.jsx)("span",{className:Hu.mainText,children:t.text}),(0,e.jsx)("span",{className:Hu.distance,children:gi(t.distance,r)})]})};function cc(t,n){if(0===n||4===t||5===t){let r;return r=0===n?Oi.getMarkerColor(Ii.From):4===t?Oi.getMarkerColor(Ii.To):Oi.getMarkerColor(Ii.Via),(0,e.jsx)("div",{className:Hu.sign,children:(0,e.jsx)(Ps,{color:r})})}return(0,e.jsx)("img",{className:Hu.sign,src:dc(t),alt:"turn instruction"})}function dc(e){switch(e){case-98:return Uu;case-8:return Zu;case-7:return Xu;case-3:return Ku;case-2:return $u;case-1:return Yu;case 0:return Qu;case 1:return Ju;case 2:return ec;case 3:return tc;case 6:return nc;case 7:return rc;case 8:return ic;case 101:return oc;case 102:return sc;case 103:return ac;default:return"unknown"}}var hc;function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pc.apply(this,arguments)}const fc=function(e){return u.createElement("svg",pc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),hc||(hc=u.createElement("path",{fill:"currentColor",d:"M80 805v-60q38 0 61.5-23t68.5-23q45 0 70 27t64 27q39 0 65-27t71-27q45 0 70.5 27t64.5 27q39 0 64.5-27t70.5-27q45 0 68.5 23t61.5 23v60q-47 0-69.5-23T750 759q-38 0-64 27t-71 27q-45 0-71-27t-64-27q-38 0-64.5 27T344 813q-45 0-70.5-27T210 759q-38 0-60.5 23T80 805Zm0-160v-60q38 0 61.5-23t68.5-23q45 0 70 27t64 27q39 0 65-27t71-27q45 0 70.5 27t64.5 27q39 0 64.5-27t70.5-27q45 0 68.5 23t61.5 23v60q-47 0-69.5-23T750 599q-38 0-64 27t-71 27q-45 0-71-27t-64-27q-38 0-64.5 27T344 653q-45 0-70.5-27T210 599q-38 0-60.5 23T80 645Zm0-160v-60q38 0 61.5-23t68.5-23q45 0 70 27t64 27q39 0 65-27t71-27q45 0 70.5 27t64.5 27q39 0 64.5-27t70.5-27q45 0 68.5 23t61.5 23v60q-47 0-69.5-23T750 439q-38 0-64 27t-71 27q-45 0-71-27t-64-27q-38 0-64.5 27T344 493q-45 0-70.5-27T210 439q-38 0-60.5 23T80 485Z"})))};var mc;function gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gc.apply(this,arguments)}const _c=function(e){return u.createElement("svg",gc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),mc||(mc=u.createElement("path",{fill:"currentColor",d:"M480 648ZM156 856 82 599q-4-12 1.5-23.5T101 560l59-20V316q0-25 17.5-42t42.5-18h150V136h220v120h150q24.75 0 42.375 17.625T800 316v225l60 19q11 4 16.5 15t1.5 23l-74 258q-48-5-89.5-29T641 770q-32 36-72.685 61-40.684 25-88.315 25t-88.315-25Q351 806 319 770q-32 33-73.5 57T156 856Zm-76 160v-60h80q42 0 83-13t77-37q36 24 77 36t83 12q42 0 83-12t77-36q36 24 77 37t83 13h80v60h-80q-41 0-81-10.5T640 975q-39 20-80 30.5t-80 10.5q-39 0-80-10.5T320 975q-39 20-78.802 30.5-39.802 10.5-81.594 10.5H80Zm140-495 260-84 260 85V316H220v205Zm259.5 275q51.5 0 91.5-41t69-76q25 30 55.5 58.5T762 787l51-179-333-108-334 108 52 177q35-19 66.5-47.5T320 679q30 36 69 76.5t90.5 40.5Z"})))};var yc;function vc(){return vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vc.apply(this,arguments)}const bc=function(e){return u.createElement("svg",vc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),yc||(yc=u.createElement("path",{fill:"currentColor",d:"M450 772h60V515h-60v257Zm30-323q14.45 0 24.225-9.775Q514 429.45 514 415q0-14.45-9.775-24.225Q494.45 381 480 381q-14.45 0-24.225 9.775Q446 400.55 446 415q0 14.45 9.775 24.225Q465.55 449 480 449Zm0 526q-140-35-230-162.5T160 533V295l320-120 320 120v238q0 152-90 279.5T480 975Zm0-62q115-38 187.5-143.5T740 533V337l-260-98-260 98v196q0 131 72.5 236.5T480 913Zm0-337Z"})))};var xc;function wc(){return wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wc.apply(this,arguments)}const kc=function(e){return u.createElement("svg",wc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),xc||(xc=u.createElement("path",{fill:"currentColor",d:"M120 966v-60h150V726h180V546h180V366h180V216h60v210H690v180H510v180H330v180H120Z"})))};function Cc(){return Cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cc.apply(this,arguments)}const Sc=function(e){return u.createElement("svg",Cc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),u.createElement("path",{fill:"currentColor",d:"M45.142 628.976V145.815l256.814.537 13.5 61.106 176.37.907-1.03 277.722-189.16-.908-13.452-60.395H99.846l1.03 204.73zm293.761-201.253H441.93l-1.03-162.808H278.19l-13.501-61.106H99.846l1.03 163.519h224.527z",style:{strokeWidth:.710532}}),u.createElement("path",{fill:"currentColor",d:"M606.257 1024.678V680.055h189.175l9.63 43.585 130.321.675v200.901l-139.444-.676-9.595-43.078H652.008v143.216Zm215.529-143.93h73.486V767.432H779.215l-9.63-43.585H652.008V837.67h160.149z",style:{strokeWidth:.506799}}),u.createElement("path",{d:"m718.589 177.478-59.666 312.817-139.16 127.263-154.83 56.304-110.74 232.069-199.849 59.814",style:{fill:"none",stroke:"currentColor",strokeWidth:60,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}))};function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ac.apply(this,arguments)}const Ec=function(e){return u.createElement("svg",Ac({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),u.createElement("path",{fill:"currentColor",d:"M724.175 970.88q-72.065 0-133.163-42.299-61.098-42.299-83.03-114.363h-84.598v-37.599h77.078q-2.507-17.546-2.193-31.332.313-13.786 2.193-31.332h-77.078v-37.6h84.598q21.932-72.063 83.03-114.362 61.098-42.299 133.163-42.299 43.238 0 81.15 14.726 37.913 14.727 69.245 42.926l-26.946 26.319q-25.692-22.56-57.651-34.466-31.96-11.906-65.798-11.906-58.905 0-107.47 32.899t-68.618 86.164h176.088v37.599H538.687q-3.133 16.92-3.133 31.332 0 14.413 3.133 31.332h185.488v37.599H548.087q20.053 53.265 68.618 86.164t107.47 32.899q33.212 0 65.171-11.28 31.959-11.28 58.905-35.092l26.319 26.32q-27.573 26.318-67.051 41.984-39.48 15.667-83.344 15.667z",style:{strokeWidth:.626646}}),u.createElement("path",{d:"m474.326 176.788 48.327 355.214M192.135 177.419l-86.064 796.71",style:{fill:"none",stroke:"currentColor",strokeWidth:48,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}),u.createElement("path",{d:"m336.384 194.835.131 163.04M336.384 458.057l.131 163.04",style:{fill:"none",stroke:"currentColor",strokeWidth:44,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}),u.createElement("path",{d:"m336.383 733.697.121 149.452",style:{fill:"none",stroke:"currentColor",strokeWidth:43.9994,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}))};function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mc.apply(this,arguments)}const Tc=function(e){return u.createElement("svg",Mc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),u.createElement("circle",{cx:654.31,cy:728.639,r:232.522,style:{fill:"none",stroke:"currentColor",strokeWidth:48,strokeDasharray:"none",strokeOpacity:1}}),u.createElement("path",{d:"m476.247 174.472 48.327 355.214M194.056 175.103l-86.064 796.71",style:{fill:"none",stroke:"currentColor",strokeWidth:48,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}),u.createElement("path",{d:"m338.305 192.52.132 163.04M338.305 455.74l.132 163.04",style:{fill:"none",stroke:"currentColor",strokeWidth:44,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}),u.createElement("path",{d:"m657.177 542.357.017 40.212M658.598 870.665l.07 42.484",style:{fill:"none",stroke:"currentColor",strokeWidth:48,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}),u.createElement("path",{d:"m338.305 731.382.12 149.45",style:{fill:"none",stroke:"currentColor",strokeWidth:43.9994,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}),u.createElement("path",{d:"M728.411 623.884c-14.47-16.73-36.415-35.035-65.873-35.676-45.732-.994-70.376 21.669-70.767 56.445-.866 77.092 148.25 75.893 148.222 165.686-.012 39.4-53.63 52.43-83.814 51.957-36.238-.568-65.603-20.787-90.654-59.177",style:{fill:"none",stroke:"currentColor",strokeWidth:43.9287,strokeLinecap:"butt",strokeLinejoin:"miter",strokeDasharray:"none",strokeOpacity:1}}))};var Pc;function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rc.apply(this,arguments)}const Ic=function(e){return u.createElement("svg",Rc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),Pc||(Pc=u.createElement("path",{fill:"currentColor",d:"m278 1016 116-586-101 43v133h-61V433l192-81q14-6 29.5-7.5T484 346q17 3 29.5 11t20.5 20l42 66q31 48 77.5 75.5T753 546v60q-70-2-123.5-30.5T533 488l-38 152 92 83v293h-60V776l-108-98-79 338h-62Zm262-714q-30 0-51.5-21.5T467 229q0-30 21.5-51.5T540 156q30 0 51.5 21.5T613 229q0 30-21.5 51.5T540 302Z"})))};var Lc;function Oc(){return Oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oc.apply(this,arguments)}const zc=function(e){return u.createElement("svg",Oc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),Lc||(Lc=u.createElement("path",{fill:"currentColor",d:"m82 936 258-360h202l298-348v708H82Zm62-257-48-35 163-228h201l185-215 45 39-202 236H289L144 679Zm55 197h581V390L569 636H370L199 876Zm581 0Z"})))};var Fc;function Dc(){return Dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dc.apply(this,arguments)}const jc=function(e){return u.createElement("svg",Dc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),Fc||(Fc=u.createElement("path",{fill:"currentColor",d:"M481 936 233 696l-113 81v-74l119-85 245 238 172-137h184v60H676L481 936Zm0-386L306 375 120 510v-74l192-140 175 175 353-255v74L481 550Z"})))};var Nc;function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}const qc=function(e){return u.createElement("svg",Bc({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 96 960 960"},e),Nc||(Nc=u.createElement("path",{fill:"currentColor",d:"M480 775q14 0 24.5-10.5T515 740q0-14-10.5-24.5T480 705q-14 0-24.5 10.5T445 740q0 14 10.5 24.5T480 775Zm-30-144h60V368h-60v263ZM330 936 120 726V426l210-210h300l210 210v300L630 936H330Zm25-60h250l175-175V451L605 276H355L180 451v250l175 175Zm125-300Z"})))};function Gc(t){const n=(0,gs.useMediaQuery)({query:"(max-height: 45rem) and (orientation: landscape), (max-height: 70rem) and (orientation: portrait)"});return(0,e.jsx)("ul",{children:n?Qc(t):Jc(t)})}function Vc({info:t,path:n,isSelected:r,profile:i}){const[o,s]=(0,u.useState)(!1),[a,c]=(0,u.useState)(""),[d,h]=(0,u.useState)(""),p=r?Fu.resultSummary+" "+Fu.selectedResultSummary:Fu.resultSummary;(0,u.useEffect)((()=>s(r&&o)),[r]);const f=Zc(n.points,n.details.road_environment,{ford:!0}),m=Zc(n.points,n.details.toll,{all:!0,hgv:Si.isTruck(i)}),g=Zc(n.points,n.details.road_environment,{ferry:!0}),_=Si.isMotorVehicle(i)?Zc(n.points,n.details.road_access,{private:!0,customers:!0,delivery:!0}):new Hc,y=Si.isMotorVehicle(i)?Zc(n.points,n.details.track_type,{grade2:!0,grade3:!0,grade4:!0,grade5:!0}):new Hc,v=Si.isMotorVehicle(i)?new Hc:Zc(n.points,n.details.road_class,{motorway:!0,trunk:!0}),b=Si.isBikeLike(i)?Zc(n.points,n.details.road_class,{steps:!0}):new Hc,x=Si.isMotorVehicle(i)?new Hc:function(e,t){if(0==e.coordinates.length)return new Hc;if(3!=e.coordinates[0].length)return new Hc;const n=new Hc;let r=0,i=e.coordinates[0],o=e.coordinates[0];return e.coordinates.forEach((e=>{r+=Xc(e,o),o=e,r>100&&(100*Math.abs(i[2]-e[2])/r>15&&(n.distance+=r,n.segments.push([Uc(i),Uc(e)])),i=e,r=0)})),n}(n.points),w=Si.isBikeLike(i)?Zc(n.points,n.details.get_off_bike,{true:!0}):new Hc,k=function(e,t){if(!t||0==t.length)return new Hc;const n=new Hc;n.values=[t[0][2]];let r=t[0][2];const i=e.coordinates;for(const e in t)t[e][2]!=r&&(n.values.push(t[e][2]),n.segments.push([Uc(i[t[e][0]-1]),Uc(i[t[e][0]])]),r=t[e][2]);return n}(n.points,n.details.country),C=f.distance>0||m.distance>0||g.distance>0||_.distance>0||v.distance>0||y.distance>0||b.distance>0||k.values.length>1||w.distance>0||x.distance>0,S=(0,u.useContext)(Fi);return(0,e.jsxs)("div",{className:Fu.resultRow,children:[(0,e.jsx)("div",{className:Fu.resultSelectableArea,onClick:()=>Fr.dispatch(new Qr(n)),children:(0,e.jsxs)("div",{className:p,children:[(0,e.jsxs)("div",{className:Fu.resultValues,children:[(0,e.jsx)("span",{className:Fu.resultMainText,children:fi(n.time)}),(0,e.jsx)("span",{className:Fu.resultSecondaryText,children:_i(n.distance,S)}),r&&!Si.isMotorVehicle(i)&&(0,e.jsxs)("div",{className:Fu.elevationHint,children:[(0,e.jsxs)("span",{title:l("total_ascend",[Math.round(n.ascend)+"m"]),children:["↗",_i(n.ascend,S)," "]}),(0,e.jsxs)("span",{title:l("total_descend",[Math.round(n.descend)+"m"]),children:["↘",_i(n.descend,S)]})]}),n.description&&(0,e.jsxs)("span",{className:Fu.resultTertiaryText,children:[l("Via")," ",n.description]})]}),r&&(0,e.jsxs)(Co,{className:Fu.exportButton,onClick:()=>function(e,t){let n='<?xml version="1.0" encoding="UTF-8" standalone="no" ?><gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="GraphHopper" version="1.1" xmlns:gh="https://graphhopper.com/public/schema/gpx/1.1">\n';n+=`<metadata><copyright author="OpenStreetMap contributors"/><link href="http://graphhopper.com"><text>GraphHopper GPX</text></link><time>${(new Date).toISOString()}</time></metadata>\n`;n+="<trk>\n<name>GraphHopper Track</name><desc></desc>\n<trkseg>",n+=e.points.coordinates.reduce(((e,t)=>{let n="<trkpt ";return n+=`lat="${t[1].toFixed(6)}" lon="${t[0].toFixed(6)}">`,t.length>2&&(n+=`<ele>${t[2].toFixed(1)}</ele>`),n+="</trkpt>\n",e+n}),""),n+="</trkseg></trk>\n</gpx>";const r=document.createElement("a"),i=new Blob([n],{type:"application/gpx+xml"});r.href=URL.createObjectURL(i);const o=new Date;r.download=`GraphHopper-Track-${o.getUTCFullYear()}-${Kc(o.getUTCMonth()+1)}-${Kc(o.getUTCDate())}-${function(e,t){return t?e<1609.34?Math.floor(e/.3048)+"ft":Math.round(e/1609.34)+"mi":e<1e3?Math.floor(e)+"m":Math.round(e/1e3)+"km"}(e.distance,t)}.gpx`,r.click()}(n,S),children:[(0,e.jsx)(Gu,{}),(0,e.jsx)("div",{children:l("gpx_button")})]}),r&&(0,e.jsxs)(Co,{className:o?Fu.detailsButtonExpanded:Fu.detailsButton,onClick:()=>s(!o),children:[(0,e.jsx)(Nu,{}),(0,e.jsx)("div",{children:l(o?"hide_button":"details_button")})]})]})}),r&&!o&&C&&(0,e.jsxs)("div",{className:Fu.routeHints,children:[(0,e.jsxs)("div",{className:Fu.icons,children:[(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_contains_ford"),setType:e=>c(e),type:"ford",child:(0,e.jsx)(fc,{}),value:f.distance>0&&_i(f.distance,S),selected:a,segments:f.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_crosses_border"),setType:e=>c(e),type:"country",child:(0,e.jsx)(Sc,{}),value:k.values.length>1&&k.values.join(" - "),selected:a,segments:k.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_contains_ferry"),setType:e=>c(e),type:"ferry",child:(0,e.jsx)(_c,{}),value:g.distance>0&&_i(g.distance,S),selected:a,segments:g.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_contains",[l("private_sections")]),setType:e=>c(e),type:"private",child:(0,e.jsx)(bc,{}),value:_.distance>0&&_i(_.distance,S),selected:a,segments:_.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_contains_toll"),setType:e=>c(e),type:"toll",child:S?(0,e.jsx)(Tc,{}):(0,e.jsx)(Ec,{}),value:m.distance>0&&_i(m.distance,S),selected:a,segments:m.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_contains",[l("steps")]),setType:e=>c(e),type:"steps",child:(0,e.jsx)(kc,{}),value:b.distance>0&&_i(b.distance,S),selected:a,segments:b.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_contains",[l("tracks")]),setType:e=>c(e),type:"tracks",child:(0,e.jsx)(jc,{}),value:y.distance>0&&_i(y.distance,S),selected:a,segments:y.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("trunk_roads_warn"),setType:e=>c(e),type:"trunk",child:(0,e.jsx)(qc,{}),value:v.distance>0&&_i(v.distance,S),selected:a,segments:v.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("get_off_bike_for",[_i(w.distance,S)]),setType:e=>c(e),type:"get_off_bike",child:(0,e.jsx)(Ic,{}),value:w.distance>0&&_i(w.distance,S),selected:a,segments:w.segments}),(0,e.jsx)(Wc,{setDescription:e=>h(e),description:l("way_contains",[l("steep_sections")]),setType:e=>c(e),type:"steep_sections",child:(0,e.jsx)(zc,{}),value:x.distance>0&&_i(x.distance,S),selected:a,segments:x.segments})]}),d&&(0,e.jsx)("div",{children:d})]}),o&&(0,e.jsx)(lc,{instructions:n.instructions}),o&&(0,e.jsxs)("div",{className:Fu.routingResultRoadData,children:[l("road_data_from"),": ",t.road_data_timestamp]})]})}function Wc(t){let[n,r]=(0,u.useState)(0);return!1===t.value?null:(0,e.jsxs)(Co,{className:t.selected==t.type?Fu.selectedRouteHintButton:Fu.routeHintButton,onClick:()=>{t.setType(t.type),t.setDescription(t.description+("get_off_bike"==t.type?"":": "+t.value)),Fr.dispatch(new ui(t.segments)),t.segments.length>n&&Fr.dispatch(new si(function(e){const t=Ri(e[0],.002);return e.length,e.forEach((e=>{t[0]=Math.min(t[0],e.lng),t[1]=Math.min(t[1],e.lat),t[2]=Math.max(t[2],e.lng),t[3]=Math.max(t[3],e.lat)})),t[2]-t[0]<.005&&(t[0]-=.0025,t[2]+=.0025),t[3]-t[1]<.005&&(t[1]-=.0025,t[3]+=.0025),t}(t.segments[n]))),r((n+1)%t.segments.length)},title:t.description,children:[t.child,(0,e.jsx)("span",{children:"country"==t.type?t.value.split(" ")[0]:t.value})]})}class Hc{constructor(){this.segments=[],this.distance=0,this.values=[]}}function Uc(e){return{lng:e[0],lat:e[1]}}function Zc(e,t,n){if(!t)return new Hc;let r=new Hc;const i=e.coordinates;for(const e in t)if(n[t[e][2]]){const n=t[e][0],o=t[e][1],s=[];for(let e=n;e<o;e++)r.distance+=Xc(i[e],i[e+1]),s.push(Uc(i[e]));s.push(Uc(i[o])),r.segments.push(s)}return r}function Xc(e,t){return Ei({lat:e[1],lng:e[0]},{lat:t[1],lng:t[0]})}function Kc(e){return e<10?"0"+e:""+e}function $c(){return(0,e.jsx)("div",{className:Fu.resultRow,children:(0,e.jsxs)("div",{className:Fu.placeholderContainer,children:[(0,e.jsx)("div",{className:Fu.placeholderMain}),(0,e.jsx)("div",{className:Fu.placeholderMain+" "+Fu.placeholderSecondary})]})})}function Yc(e){return e.some((e=>e.state===Li.SENT))}function Qc(t){return t.paths.length>0?(0,e.jsx)(Vc,{path:t.selectedPath,isSelected:!0,profile:t.profile,info:t.info}):Yc(t.currentRequest.subRequests)?(0,e.jsx)($c,{},1):""}function Jc({info:t,paths:n,currentRequest:r,selectedPath:i,profile:o}){const s=function(e,t){return t.length>0&&Yc(t)?Math.max(e.length,...t.filter((e=>e.state===Li.SENT)).map((e=>e.args.maxAlternativeRoutes))):e.length}(n,r.subRequests),a=[];for(let r=0;r<s;r++)r<n.length?a.push((0,e.jsx)(Vc,{path:n[r],isSelected:n[r]===i,profile:o,info:t},r)):a.push((0,e.jsx)($c,{},r));return a}var ed=n(6510),td={};td.styleTagTransform=x(),td.setAttributes=_(),td.insert=m().bind(null,"head"),td.domAPI=p(),td.insertStyleElement=v(),d()(ed.Z,td);const nd=ed.Z&&ed.Z.locals?ed.Z.locals:void 0;var rd,id,od,sd,ad,ld,ud,cd;function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dd.apply(this,arguments)}const hd=function(e){return u.createElement("svg",dd({xmlns:"http://www.w3.org/2000/svg",width:260,height:30,viewBox:"0 0 260 50"},e),rd||(rd=u.createElement("g",{fill:"#ccc"},u.createElement("path",{d:"M118.239 24.82v13.557h-6.462V28.04c0-1.948-.042-3.286-.125-4.015-.072-.729-.204-1.266-.395-1.61a2.705 2.705 0 0 0-1.023-1.074 2.752 2.752 0 0 0-1.472-.397c-1.34 0-2.393.576-3.159 1.73-.766 1.139-1.149 2.723-1.149 4.75v10.953H98.03c-5.456-18.695 6.405-40.603 6.425-19.003.97-1.299 1.999-2.253 3.087-2.862 1.09-.623 2.292-.935 3.608-.935 2.322 0 4.08.789 5.277 2.366 1.209 1.577 1.813 3.87 1.813 6.878M145.469 20.34c-3.726 6.104-.904 16.197 4.033 18.054H138.3v-12.83c0-2.02-.047-3.409-.14-4.164-.08-.756-.226-1.313-.44-1.67a2.903 2.903 0 0 0-1.138-1.113c-.48-.275-1.025-.413-1.638-.413-1.491 0-2.663.598-3.516 1.794-.852 1.182-1.278 2.824-1.278 4.927v13.47h-7.152c-6.071-19.39 7.071-43.55 7.152-21.82 1.079-1.346 2.224-2.335 3.436-2.968 1.212-.646 2.55-.969 4.015-.969 2.583 0 4.541.818 5.873 2.454.797.858 1.88 2.74 2.017 4.47"}),u.createElement("path",{d:"M156.659 20.48c-1.372 0-2.422.557-3.148 1.67-.715 1.101-1.072 2.694-1.072 4.78 0 2.084.357 3.683 1.072 4.797.726 1.1 1.776 1.651 3.148 1.651 1.35 0 2.381-.55 3.096-1.65.715-1.115 1.073-2.714 1.073-4.799 0-2.085-.358-3.678-1.073-4.778-.715-1.114-1.747-1.67-3.096-1.671m0-4.973c3.333 0 5.933 1.01 7.801 3.03 1.88 2.02 2.82 4.818 2.82 8.392s-.94 6.371-2.82 8.392c-1.868 2.02-4.468 3.03-7.801 3.03-3.344 0-5.962-1.01-7.853-3.03-1.88-2.02-2.82-4.818-2.82-8.392s.94-6.371 2.82-8.392c1.891-2.02 4.509-3.03 7.853-3.03"}),u.createElement("path",{d:"M175.189 34.62v11.385c-14.984 2.813-5.88-24.53 2.784-29.547 1.019-.607 2.19-.91 3.514-.91 2.343 0 4.267 1.065 5.773 3.195 1.505 2.117 2.257 4.847 2.257 8.19 0 3.343-.752 6.08-2.257 8.21-1.506 2.116-3.43 3.175-5.773 3.175-1.324 0-2.495-.297-3.514-.89-1.018-.608-1.947-1.543-2.784-2.808m4.04-14.038c-1.301 0-2.303.548-3.004 1.645-.69 1.085-1.036 2.653-1.036 4.705 0 2.053.345 3.628 1.036 4.725.701 1.084 1.703 1.626 3.005 1.626 1.301 0 2.291-.542 2.97-1.626.69-1.084 1.036-2.66 1.036-4.725 0-2.065-.345-3.64-1.035-4.724-.68-1.084-1.67-1.626-2.971-1.626M247.119 21.34c-1.797 0-3.228.538-4.204 1.7-.964 1.15-1.446 2.804-1.446 4.96v10.117c-16.799 2.842-4.274-17.8 3.086-21.486 1.782-.81 3.284-1.047 4.961-.96 2.758-.027 2.22 3.442 1.476 5.72M218.249 18.13c1.806-1.43 5.043-2.78 8.148-2.59 3.656.226 5.387 2.173 6.333 4.28 1.025 2.938.94 6.068-.747 8.114-3.247 3.473-6.536 3.639-11.171 2.538 0 0 1.979 2.508 4.938 5.691-4.888 4.869-10.733.475-11.814-4.518-.86-3.975-.024-10.079 4.314-13.515zm5.161 2.285c-1.541.03-2.232.519-2.936 1.228-.657.813-.71 1.812-.748 2.874-.05 1.405.41 2.368.903 2.87.794.705 1.846.85 2.922.849 1.036-.002 1.882-.264 2.53-.913.311-.362.987-1.089.965-2.863-.002-1.467-.333-2.303-.909-2.945-.917-.842-1.64-1.063-2.556-1.089M50.509 21.37c-2.047 0-3.228.54-4.204 1.71-.964 1.156-1.446 2.819-1.446 4.987v10.17c-16.799 2.857-4.274-17.896 3.086-21.602 1.782-.815 3.284-1.053 4.961-.966 2.758-.026 2.22 3.461 1.476 5.752"}),u.createElement("path",{d:"M27.479 11.39c-3.53-3.949-9.117-4.201-12.908-1.616-2.728 1.907-4.671 4.846-5.83 8.818-1.158 3.972-1.108 7.527.149 10.666 3.315 6.812 9.042 7.113 15.514 5.886 0 0-2.094 4.523-3.623 7.642 7.77 7.645 12.59 1.003 13.302-7.188.714-8.192-1.733-19.477-6.604-24.207zm-2.905 3.813c1.725.526 2.862 1.582 3.412 3.17.54 1.567.453 3.57-.258 6.008-.71 2.438-1.714 4.17-3.009 5.194-1.305 1.005-2.82 1.244-4.545.719-1.725-.526-2.85-1.57-3.374-3.133-.539-1.567-.45-3.578.265-6.031.715-2.454 1.718-4.186 3.009-5.195 1.275-1.014 2.775-1.258 4.5-.732M197.409 34.69v11.385c-14.984 2.813-5.88-24.53 2.784-29.547 1.019-.607 2.19-.91 3.514-.91 2.343 0 4.267 1.065 5.773 3.195 1.505 2.117 2.258 4.847 2.258 8.19 0 3.343-.753 6.08-2.258 8.21-1.506 2.116-3.43 3.175-5.773 3.175-1.324 0-2.495-.297-3.514-.89-1.018-.608-1.946-1.543-2.784-2.808m4.04-14.038c-1.301 0-2.303.548-3.004 1.645-.69 1.085-1.036 2.653-1.036 4.705 0 2.053.345 3.628 1.036 4.725.701 1.084 1.703 1.626 3.005 1.626 1.301 0 2.291-.542 2.97-1.626.69-1.084 1.036-2.66 1.036-4.725 0-2.065-.345-3.64-1.035-4.724-.68-1.084-1.67-1.626-2.971-1.626M80.239 34.74v11.385c-14.984 2.813-5.88-24.53 2.784-29.547 1.019-.607 2.19-.91 3.514-.91 2.343 0 4.267 1.065 5.773 3.195 1.505 2.117 2.258 4.847 2.258 8.19 0 3.343-.753 6.08-2.258 8.21-1.506 2.116-3.43 3.175-5.773 3.175-1.324 0-2.495-.297-3.514-.89-1.018-.608-1.946-1.543-2.784-2.808m4.04-14.038c-1.301 0-2.303.548-3.004 1.645-.69 1.085-1.036 2.653-1.036 4.705 0 2.053.345 3.628 1.036 4.725.701 1.084 1.703 1.626 3.004 1.626 1.302 0 2.292-.542 2.972-1.626.69-1.084 1.035-2.66 1.035-4.725 0-2.065-.345-3.64-1.035-4.724-.68-1.084-1.67-1.626-2.972-1.626"}))),id||(id=u.createElement("path",{d:"M116.859 23.54v13.557h-6.462V26.76c0-1.948-.042-3.286-.125-4.015-.072-.729-.204-1.266-.395-1.61a2.705 2.705 0 0 0-1.023-1.074 2.752 2.752 0 0 0-1.472-.397c-1.34 0-2.393.576-3.159 1.73-.766 1.139-1.149 2.723-1.149 4.75v10.953H96.65c-5.456-18.695 6.405-40.603 6.425-19.003.97-1.299 1.999-2.253 3.087-2.862 1.09-.623 2.292-.935 3.608-.935 2.322 0 4.08.789 5.277 2.366 1.209 1.577 1.813 3.87 1.813 6.878M144.089 19.05c-3.726 6.104-.904 16.197 4.033 18.054H136.92v-12.83c0-2.02-.046-3.409-.14-4.164-.08-.756-.226-1.313-.44-1.67a2.903 2.903 0 0 0-1.138-1.113c-.48-.275-1.025-.413-1.638-.413-1.491 0-2.663.598-3.516 1.794-.852 1.182-1.278 2.824-1.278 4.927v13.47h-7.152c-6.071-19.39 7.071-43.55 7.152-21.82 1.079-1.346 2.224-2.335 3.436-2.968 1.212-.646 2.55-.969 4.015-.969 2.583 0 4.541.818 5.873 2.454.797.858 1.88 2.74 2.017 4.47"})),od||(od=u.createElement("path",{d:"M155.279 19.2c-1.372 0-2.422.557-3.148 1.67-.715 1.101-1.073 2.694-1.073 4.78 0 2.084.358 3.683 1.073 4.797.726 1.1 1.776 1.651 3.148 1.651 1.35 0 2.381-.55 3.096-1.65.715-1.115 1.073-2.714 1.073-4.799 0-2.085-.358-3.678-1.073-4.778-.715-1.114-1.747-1.67-3.096-1.671m0-4.973c3.333 0 5.933 1.01 7.801 3.03 1.88 2.02 2.82 4.818 2.82 8.392s-.94 6.371-2.82 8.392c-1.868 2.02-4.468 3.03-7.801 3.03-3.344 0-5.962-1.01-7.853-3.03-1.88-2.02-2.82-4.818-2.82-8.392s.94-6.371 2.82-8.392c1.891-2.02 4.509-3.03 7.853-3.03"})),sd||(sd=u.createElement("path",{d:"M173.809 33.33v11.385c-14.984 2.813-5.88-24.53 2.784-29.547 1.019-.607 2.19-.91 3.514-.91 2.343 0 4.267 1.065 5.773 3.195 1.505 2.117 2.257 4.847 2.257 8.19 0 3.343-.752 6.08-2.257 8.21-1.506 2.116-3.43 3.175-5.773 3.175-1.324 0-2.495-.297-3.514-.89-1.018-.608-1.946-1.543-2.784-2.808m4.04-14.038c-1.301 0-2.303.548-3.004 1.645-.69 1.085-1.036 2.653-1.036 4.705 0 2.053.345 3.628 1.036 4.725.701 1.084 1.703 1.626 3.005 1.626 1.301 0 2.291-.542 2.97-1.626.69-1.084 1.036-2.66 1.036-4.725 0-2.065-.345-3.64-1.035-4.724-.68-1.084-1.67-1.626-2.971-1.626M245.739 20.05c-1.797 0-3.228.538-4.204 1.7-.964 1.15-1.446 2.804-1.446 4.96v10.117c-16.799 2.842-4.274-17.8 3.086-21.486 1.782-.81 3.284-1.047 4.961-.96 2.758-.027 2.22 3.442 1.476 5.72M216.869 16.85c1.806-1.43 5.043-2.78 8.148-2.59 3.656.226 5.387 2.173 6.333 4.28 1.025 2.938.94 6.068-.747 8.114-3.247 3.473-6.536 3.639-11.171 2.538 0 0 1.979 2.508 4.938 5.691-4.888 4.869-10.733.475-11.814-4.518-.86-3.975-.024-10.079 4.314-13.515zm5.161 2.285c-1.541.03-2.232.519-2.936 1.228-.657.813-.71 1.812-.748 2.874-.05 1.405.41 2.368.903 2.87.794.705 1.846.85 2.922.849 1.036-.002 1.882-.264 2.53-.913.311-.362.987-1.089.965-2.863-.002-1.467-.333-2.303-.909-2.945-.917-.842-1.64-1.063-2.556-1.089M49.129 20.08c-2.047 0-3.228.54-4.204 1.71-.964 1.156-1.446 2.819-1.446 4.987v10.17c-16.799 2.857-4.274-17.896 3.086-21.602 1.782-.815 3.284-1.053 4.961-.966 2.758-.026 2.22 3.461 1.476 5.752"})),ad||(ad=u.createElement("path",{d:"M26.099 10.1c-3.53-3.949-9.117-4.201-12.908-1.616-2.728 1.907-4.671 4.846-5.83 8.818-1.158 3.972-1.108 7.527.149 10.666 3.315 6.812 9.042 7.113 15.514 5.886 0 0-2.094 4.523-3.623 7.642 7.77 7.645 12.59 1.003 13.302-7.188.714-8.192-1.733-19.477-6.604-24.207zm-2.905 3.813c1.725.526 2.862 1.582 3.412 3.17.54 1.567.453 3.57-.258 6.008-.71 2.438-1.714 4.17-3.009 5.194-1.305 1.005-2.82 1.244-4.545.719-1.725-.526-2.85-1.57-3.373-3.133-.54-1.567-.452-3.578.264-6.031.715-2.454 1.718-4.186 3.009-5.195 1.275-1.014 2.776-1.258 4.5-.732M196.029 33.4v11.385c-14.984 2.813-5.88-24.53 2.784-29.547 1.019-.607 2.19-.91 3.514-.91 2.343 0 4.267 1.065 5.773 3.195 1.505 2.117 2.258 4.847 2.258 8.19 0 3.343-.753 6.08-2.258 8.21-1.506 2.116-3.43 3.175-5.773 3.175-1.324 0-2.495-.297-3.514-.89-1.018-.608-1.946-1.543-2.784-2.808m4.04-14.038c-1.301 0-2.303.548-3.004 1.645-.69 1.085-1.036 2.653-1.036 4.705 0 2.053.345 3.628 1.036 4.725.701 1.084 1.703 1.626 3.005 1.626 1.301 0 2.291-.542 2.97-1.626.69-1.084 1.036-2.66 1.036-4.725 0-2.065-.345-3.64-1.035-4.724-.68-1.084-1.67-1.626-2.971-1.626M78.849 33.45v11.385c-14.984 2.813-5.88-24.53 2.784-29.547 1.019-.607 2.19-.91 3.514-.91 2.343 0 4.267 1.065 5.773 3.195 1.505 2.117 2.257 4.847 2.257 8.19 0 3.343-.752 6.08-2.257 8.21-1.506 2.116-3.43 3.175-5.773 3.175-1.324 0-2.495-.297-3.514-.89-1.018-.608-1.947-1.543-2.784-2.808m4.04-14.038c-1.301 0-2.303.548-3.004 1.645-.69 1.085-1.036 2.653-1.036 4.705 0 2.053.345 3.628 1.036 4.725.701 1.084 1.703 1.626 3.004 1.626 1.302 0 2.292-.542 2.971-1.626.69-1.084 1.036-2.66 1.036-4.725 0-2.065-.345-3.64-1.036-4.724-.679-1.084-1.669-1.626-2.97-1.626"})),ld||(ld=u.createElement("g",{fill:"#ccc"},u.createElement("path",{d:"M68.49 35.284c-1.644 1.535-4.681 3.097-7.702 3.137-3.556.047-5.373-1.737-6.442-3.735-1.205-2.807-1.349-5.884.138-8.014 2.893-3.645 6.065-4.049 10.634-3.308 0 0-2.098-2.315-5.194-5.222 4.381-5.134 9.077-1.296 10.485 3.523 1.121 3.837 2.034 9.93-1.918 13.62zm-4.85-1.802c.835.015 1.593-.453 2.223-1.2.578-.846.824-1.86.798-2.905-.022-.852-.193-1.637-.676-2.562-.6-.916-1.41-1.263-2.328-1.276-1.005-.014-1.647.303-2.227.988-.884 1.073-1.205 3.575-.135 5.607.45.759 1.048 1.394 2.218 1.352"}),u.createElement("path",{d:"m71.37 27.544.028 3.465c-.773 1.761-1.44 3.843-1.63 7.355h-3.121l-.044-2.607.882-7.866"}))),ud||(ud=u.createElement("path",{d:"M67.359 34.01c-1.645 1.535-4.682 3.097-7.702 3.137-3.557.047-5.374-1.737-6.443-3.735-1.205-2.807-1.349-5.884.138-8.014 2.893-3.645 6.065-4.049 10.634-3.308 0 0-2.098-2.315-5.194-5.222 4.381-5.134 9.078-1.296 10.485 3.523 1.121 3.837 2.034 9.93-1.918 13.62zm-4.85-1.802c.834.015 1.592-.453 2.222-1.2.579-.846.825-1.86.798-2.905-.021-.852-.192-1.637-.675-2.562-.601-.916-1.412-1.263-2.329-1.276-1.005-.014-1.771.49-2.351 1.175-.884 1.073-1.205 3.513-.136 5.545.45.759 1.173 1.27 2.343 1.227"})),cd||(cd=u.createElement("path",{d:"m70.239 26.27.028 3.465c-.774 1.761-1.44 3.843-1.63 7.355h-3.122l-.044-2.607.882-7.866"})))};function pd(){return(0,e.jsxs)("div",{className:nd.poweredByContainer,children:[(0,e.jsx)("span",{children:l("powered_by")}),(0,e.jsx)("a",{className:nd.logoContainer,href:"https://www.graphhopper.com",target:"_blank",children:(0,e.jsx)(hd,{})})]})}const fd=class{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},md="propertychange",gd=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function _d(e,t){return e>t?1:e<t?-1:0}function yd(e,t,n){if(e[0]<=t)return 0;const r=e.length;if(t<=e[r-1])return r-1;if("function"==typeof n){for(let i=1;i<r;++i){const r=e[i];if(r===t)return i;if(r<t)return n(t,e[i-1],r)>0?i-1:i}return r-1}if(n>0){for(let n=1;n<r;++n)if(e[n]<t)return n-1;return r-1}if(n<0){for(let n=1;n<r;++n)if(e[n]<=t)return n;return r-1}for(let n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1}function vd(e,t,n){for(;t<n;){const r=e[t];e[t]=e[n],e[n]=r,++t,--n}}function bd(e,t){const n=Array.isArray(t)?t:[t],r=n.length;for(let t=0;t<r;t++)e[e.length]=n[t]}function xd(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function wd(){return!0}function kd(){return!1}function Cd(){}function Sd(e){for(const t in e)delete e[t]}function Ad(e){let t;for(t in e)return!1;return!t}const Ed=class extends gd{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;const n=this.listeners_||(this.listeners_={}),r=n[e]||(n[e]=[]);r.includes(t)||r.push(t)}dispatchEvent(e){const t="string"==typeof e,n=t?e:e.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const i=t?new fd(e):e;i.target||(i.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),s=this.pendingRemovals_||(this.pendingRemovals_={});let a;n in o||(o[n]=0,s[n]=0),++o[n];for(let e=0,t=r.length;e<t;++e)if(a="handleEvent"in r[e]?r[e].handleEvent(i):r[e].call(this,i),!1===a||i.propagationStopped){a=!1;break}if(0==--o[n]){let e=s[n];for(delete s[n];e--;)this.removeEventListener(n,Cd);delete o[n]}return a}disposeInternal(){this.listeners_&&Sd(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return!!this.listeners_&&(e?e in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(e,t){const n=this.listeners_&&this.listeners_[e];if(n){const r=n.indexOf(t);-1!==r&&(this.pendingRemovals_&&e in this.pendingRemovals_?(n[r]=Cd,++this.pendingRemovals_[e]):(n.splice(r,1),0===n.length&&delete this.listeners_[e]))}}},Md="change",Td="contextmenu",Pd="click",Rd="keydown",Id="keypress",Ld="touchmove",Od="wheel";function zd(e,t,n,r,i){if(r&&r!==e&&(n=n.bind(r)),i){const r=n;n=function(){e.removeEventListener(t,n),r.apply(this,arguments)}}const o={target:e,type:t,listener:n};return e.addEventListener(t,n),o}function Fd(e,t,n,r){return zd(e,t,n,r,!0)}function Dd(e){e&&e.target&&(e.target.removeEventListener(e.type,e.listener),Sd(e))}class jd extends Ed{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(Md)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){const n=e.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=zd(this,e[i],t);return r}return zd(this,e,t)}onceInternal(e,t){let n;if(Array.isArray(e)){const r=e.length;n=new Array(r);for(let i=0;i<r;++i)n[i]=Fd(this,e[i],t)}else n=Fd(this,e,t);return t.ol_key=n,n}unInternal(e,t){const n=t.ol_key;if(n)!function(e){if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)Dd(e[t]);else Dd(e)}(n);else if(Array.isArray(e))for(let n=0,r=e.length;n<r;++n)this.removeEventListener(e[n],t);else this.removeEventListener(e,t)}}jd.prototype.on,jd.prototype.once,jd.prototype.un;const Nd=jd;function Bd(){throw new Error("Unimplemented abstract method.")}let qd=0;function Gd(e){return e.ol_uid||(e.ol_uid=String(++qd))}class Vd extends fd{constructor(e,t,n){super(e),this.key=t,this.oldValue=n}}const Wd=class extends Nd{constructor(e){super(),this.on,this.once,this.un,Gd(this),this.values_=null,void 0!==e&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(e,t){let n;n=`change:${e}`,this.hasListener(n)&&this.dispatchEvent(new Vd(n,e,t)),n=md,this.hasListener(n)&&this.dispatchEvent(new Vd(n,e,t))}addChangeListener(e,t){this.addEventListener(`change:${e}`,t)}removeChangeListener(e,t){this.removeEventListener(`change:${e}`,t)}set(e,t,n){const r=this.values_||(this.values_={});if(n)r[e]=t;else{const n=r[e];r[e]=t,n!==t&&this.notify(e,n)}}setProperties(e,t){for(const n in e)this.set(n,e[n],t)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,t){if(this.values_&&e in this.values_){const n=this.values_[e];delete this.values_[e],Ad(this.values_)&&(this.values_=null),t||this.notify(e,n)}}},Hd={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class Ud extends Error{constructor(e){const t=Hd[e];super(t),this.code=e,this.name="AssertionError",this.message=t}}const Zd=Ud;function Xd(e,t){if(!e)throw new Zd(t)}class Kd extends Wd{constructor(e){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_),e)if("function"==typeof e.getSimplifiedGeometry){const t=e;this.setGeometry(t)}else{const t=e;this.setProperties(t)}}clone(){const e=new Kd(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const t=this.getGeometry();t&&e.setGeometry(t.clone());const n=this.getStyle();return n&&e.setStyle(n),e}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_&&(Dd(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=zd(e,Md,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?function(e){if("function"==typeof e)return e;let t;return Array.isArray(e)?t=e:(Xd("function"==typeof e.getZIndex,41),t=[e]),function(){return t}}(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const $d=Kd,Yd="opacity",Qd="visible",Jd="extent",eh="zIndex",th="maxResolution",nh="minResolution",rh="maxZoom",ih="minZoom",oh="source";function sh(e,t,n){return Math.min(Math.max(e,t),n)}function ah(e,t,n,r,i,o){const s=i-n,a=o-r;if(0!==s||0!==a){const l=((e-n)*s+(t-r)*a)/(s*s+a*a);l>1?(n=i,r=o):l>0&&(n+=s*l,r+=a*l)}return lh(e,t,n,r)}function lh(e,t,n,r){const i=n-e,o=r-t;return i*i+o*o}function uh(e){return e*Math.PI/180}function ch(e,t){const n=e%t;return n*t<0?n+t:n}function dh(e,t,n){return e+n*(t-e)}function hh(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}function ph(e,t){return Math.floor(hh(e,t))}function fh(e,t){return Math.ceil(hh(e,t))}const mh=class extends Wd{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const t=Object.assign({},e);"object"==typeof e.properties&&(delete t.properties,Object.assign(t,e.properties)),t[Yd]=void 0!==e.opacity?e.opacity:1,Xd("number"==typeof t[Yd],64),t[Qd]=void 0===e.visible||e.visible,t[eh]=e.zIndex,t[th]=void 0!==e.maxResolution?e.maxResolution:1/0,t[nh]=void 0!==e.minResolution?e.minResolution:0,t[ih]=void 0!==e.minZoom?e.minZoom:-1/0,t[rh]=void 0!==e.maxZoom?e.maxZoom:1/0,this.className_=void 0!==t.className?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const t=this.state_||{layer:this,managed:void 0===e||e},n=this.getZIndex();return t.opacity=sh(Math.round(100*this.getOpacity())/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=void 0!==n||t.managed?n:1/0,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return Bd()}getLayerStatesArray(e){return Bd()}getExtent(){return this.get(Jd)}getMaxResolution(){return this.get(th)}getMinResolution(){return this.get(nh)}getMinZoom(){return this.get(ih)}getMaxZoom(){return this.get(rh)}getOpacity(){return this.get(Yd)}getSourceState(){return Bd()}getVisible(){return this.get(Qd)}getZIndex(){return this.get(eh)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Jd,e)}setMaxResolution(e){this.set(th,e)}setMinResolution(e){this.set(nh,e)}setMaxZoom(e){this.set(rh,e)}setMinZoom(e){this.set(ih,e)}setOpacity(e){Xd("number"==typeof e,64),this.set(Yd,e)}setVisible(e){this.set(Qd,e)}setZIndex(e){this.set(eh,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},gh="precompose",_h="rendercomplete",yh={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},vh=42,bh=256,xh={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},wh=class{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=void 0!==e.extent?e.extent:null,this.worldExtent_=void 0!==e.worldExtent?e.worldExtent:null,this.axisOrientation_=void 0!==e.axisOrientation?e.axisOrientation:"enu",this.global_=void 0!==e.global&&e.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||xh[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!(!e||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!(!this.global_||!e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}},kh=6378137,Ch=Math.PI*kh,Sh=[-Ch,-Ch,Ch,Ch],Ah=[-180,-85,180,85],Eh=kh*Math.log(Math.tan(Math.PI/2));class Mh extends wh{constructor(e){super({code:e,units:"m",extent:Sh,global:!0,worldExtent:Ah,getPointResolution:function(e,t){return e/Math.cosh(t[1]/kh)}})}}const Th=[new Mh("EPSG:3857"),new Mh("EPSG:102100"),new Mh("EPSG:102113"),new Mh("EPSG:900913"),new Mh("http://www.opengis.net/def/crs/EPSG/0/3857"),new Mh("http://www.opengis.net/gml/srs/epsg.xml#3857")];const Ph=[-180,-90,180,90],Rh=6378137*Math.PI/180;class Ih extends wh{constructor(e,t){super({code:e,units:"degrees",extent:Ph,axisOrientation:t,global:!0,metersPerUnit:Rh,worldExtent:Ph})}}const Lh=[new Ih("CRS:84"),new Ih("EPSG:4326","neu"),new Ih("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ih("urn:ogc:def:crs:OGC:2:84"),new Ih("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ih("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ih("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Oh={},zh={};function Fh(e,t,n){const r=e.getCode(),i=t.getCode();r in zh||(zh[r]={}),zh[r][i]=n}const Dh={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function jh(e){const t=[1/0,1/0,-1/0,-1/0];for(let n=0,r=e.length;n<r;++n)Qh(t,e[n]);return t}function Nh(e,t,n){return n?(n[0]=e[0]-t,n[1]=e[1]-t,n[2]=e[2]+t,n[3]=e[3]+t,n):[e[0]-t,e[1]-t,e[2]+t,e[3]+t]}function Bh(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()}function qh(e,t,n){let r,i;return r=t<e[0]?e[0]-t:e[2]<t?t-e[2]:0,i=n<e[1]?e[1]-n:e[3]<n?n-e[3]:0,r*r+i*i}function Gh(e,t){return Wh(e,t[0],t[1])}function Vh(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]}function Wh(e,t,n){return e[0]<=t&&t<=e[2]&&e[1]<=n&&n<=e[3]}function Hh(e,t){const n=e[0],r=e[1],i=e[2],o=e[3],s=t[0],a=t[1];let l=Dh.UNKNOWN;return s<n?l|=Dh.LEFT:s>i&&(l|=Dh.RIGHT),a<r?l|=Dh.BELOW:a>o&&(l|=Dh.ABOVE),l===Dh.UNKNOWN&&(l=Dh.INTERSECTING),l}function Uh(e,t,n,r,i){return i?(i[0]=e,i[1]=t,i[2]=n,i[3]=r,i):[e,t,n,r]}function Zh(e){return Uh(1/0,1/0,-1/0,-1/0,e)}function Xh(e,t){const n=e[0],r=e[1];return Uh(n,r,n,r,t)}function Kh(e,t,n,r,i){return Jh(Zh(i),e,t,n,r)}function $h(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]}function Yh(e,t){return t[0]<e[0]&&(e[0]=t[0]),t[2]>e[2]&&(e[2]=t[2]),t[1]<e[1]&&(e[1]=t[1]),t[3]>e[3]&&(e[3]=t[3]),e}function Qh(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])}function Jh(e,t,n,r,i){for(;n<r;n+=i)ep(e,t[n],t[n+1]);return e}function ep(e,t,n){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],n),e[2]=Math.max(e[2],t),e[3]=Math.max(e[3],n)}function tp(e,t){let n;return n=t(rp(e)),n||(n=t(ip(e)),n||(n=t(hp(e)),n||(n=t(dp(e)),n||!1)))}function np(e){let t=0;return mp(e)||(t=pp(e)*up(e)),t}function rp(e){return[e[0],e[1]]}function ip(e){return[e[2],e[1]]}function op(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]}function sp(e,t){let n;return"bottom-left"===t?n=rp(e):"bottom-right"===t?n=ip(e):"top-left"===t?n=dp(e):"top-right"===t?n=hp(e):Xd(!1,13),n}function ap(e,t,n,r,i){const[o,s,a,l,u,c,d,h]=lp(e,t,n,r);return Uh(Math.min(o,a,u,d),Math.min(s,l,c,h),Math.max(o,a,u,d),Math.max(s,l,c,h),i)}function lp(e,t,n,r){const i=t*r[0]/2,o=t*r[1]/2,s=Math.cos(n),a=Math.sin(n),l=i*s,u=i*a,c=o*s,d=o*a,h=e[0],p=e[1];return[h-l+d,p-u-c,h-l-d,p-u+c,h+l-d,p+u+c,h+l+d,p+u-c,h-l+d,p-u-c]}function up(e){return e[3]-e[1]}function cp(e,t,n){const r=n||[1/0,1/0,-1/0,-1/0];return fp(e,t)?(e[0]>t[0]?r[0]=e[0]:r[0]=t[0],e[1]>t[1]?r[1]=e[1]:r[1]=t[1],e[2]<t[2]?r[2]=e[2]:r[2]=t[2],e[3]<t[3]?r[3]=e[3]:r[3]=t[3]):Zh(r),r}function dp(e){return[e[0],e[3]]}function hp(e){return[e[2],e[3]]}function pp(e){return e[2]-e[0]}function fp(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}function mp(e){return e[2]<e[0]||e[3]<e[1]}function gp(e,t,n,r){if(mp(e))return Zh(n);let i=[];if(r>1){const t=e[2]-e[0],n=e[3]-e[1];for(let o=0;o<r;++o)i.push(e[0]+t*o/r,e[1],e[2],e[1]+n*o/r,e[2]-t*o/r,e[3],e[0],e[3]-n*o/r)}else i=[e[0],e[1],e[2],e[1],e[2],e[3],e[0],e[3]];t(i,i,2);const o=[],s=[];for(let e=0,t=i.length;e<t;e+=2)o.push(i[e]),s.push(i[e+1]);return function(e,t,n){return Uh(Math.min.apply(null,e),Math.min.apply(null,t),Math.max.apply(null,e),Math.max.apply(null,t),n)}(o,s,n)}function _p(e,t){const n=t.getExtent(),r=op(e);if(t.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){const t=pp(n),i=Math.floor((r[0]-n[0])/t)*t;e[0]-=i,e[2]-=i}return e}function yp(e,t){const n=t.getRadius(),r=t.getCenter(),i=r[0],o=r[1];let s=e[0]-i;const a=e[1]-o;0===s&&0===a&&(s=1);const l=Math.sqrt(s*s+a*a);return[i+n*s/l,o+n*a/l]}function vp(e,t){const n=e[0],r=e[1],i=t[0],o=t[1],s=i[0],a=i[1],l=o[0],u=o[1],c=l-s,d=u-a,h=0===c&&0===d?0:(c*(n-s)+d*(r-a))/(c*c+d*d||0);let p,f;return h<=0?(p=s,f=a):h>=1?(p=l,f=u):(p=s+h*c,f=a+h*d),[p,f]}function bp(e,t){let n=!0;for(let r=e.length-1;r>=0;--r)if(e[r]!=t[r]){n=!1;break}return n}function xp(e,t){const n=Math.cos(t),r=Math.sin(t),i=e[0]*n-e[1]*r,o=e[1]*n+e[0]*r;return e[0]=i,e[1]=o,e}function wp(e,t){const n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function kp(e,t){return Math.sqrt(wp(e,t))}function Cp(e,t){if(t.canWrapX()){const n=pp(t.getExtent()),r=function(e,t,n){const r=t.getExtent();let i=0;return t.canWrapX()&&(e[0]<r[0]||e[0]>r[2])&&(n=n||pp(r),i=Math.floor((e[0]-r[0])/n)),i}(e,t,n);r&&(e[0]-=r*n)}return e}const Sp=6371008.8;function Ap(e,t,n){n=n||Sp;const r=uh(e[1]),i=uh(t[1]),o=(i-r)/2,s=uh(t[0]-e[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(r)*Math.cos(i);return 2*n*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const Ep={info:1,warn:2,error:3,none:4};let Mp=Ep.info;function Tp(...e){Mp>Ep.warn||console.warn(...e)}let Pp=!0;function Rp(e){Pp=!(void 0===e||e)}function Ip(e,t){if(void 0!==t)for(let n=0,r=e.length;n<r;++n)t[n]=e[n];else t=e.slice();return t}function Lp(e,t){if(void 0!==t&&e!==t){for(let n=0,r=e.length;n<r;++n)t[n]=e[n];e=t}return e}function Op(e){!function(e,t){Oh[e]=t}(e.getCode(),e),Fh(e,e,Ip)}function zp(e){return"string"==typeof e?Oh[t=e]||Oh[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:e||null;var t}function Fp(e,t,n,r){let i;const o=(e=zp(e)).getPointResolutionFunc();if(o){if(i=o(t,n),r&&r!==e.getUnits()){const t=e.getMetersPerUnit();t&&(i=i*t/xh[r])}}else{const o=e.getUnits();if("degrees"==o&&!r||"degrees"==r)i=t;else{const s=Gp(e,zp("EPSG:4326"));if(s===Lp&&"degrees"!==o)i=t*e.getMetersPerUnit();else{let e=[n[0]-t/2,n[1],n[0]+t/2,n[1],n[0],n[1]-t/2,n[0],n[1]+t/2];e=s(e,e,2),i=(Ap(e.slice(0,2),e.slice(2,4))+Ap(e.slice(4,6),e.slice(6,8)))/2}const a=r?xh[r]:e.getMetersPerUnit();void 0!==a&&(i/=a)}}return i}function Dp(e){!function(e){e.forEach(Op)}(e),e.forEach((function(t){e.forEach((function(e){t!==e&&Fh(t,e,Ip)}))}))}function jp(e,t){return e?"string"==typeof e?zp(e):e:zp(t)}function Np(e,t){return Rp(),Wp(e,"EPSG:4326",void 0!==t?t:"EPSG:3857")}function Bp(e,t){const n=Wp(e,void 0!==t?t:"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=ch(r+180,360)-180),n}function qp(e,t){if(e===t)return!0;const n=e.getUnits()===t.getUnits();return(e.getCode()===t.getCode()||Gp(e,t)===Ip)&&n}function Gp(e,t){let n=function(e,t){let n;return e in zh&&t in zh[e]&&(n=zh[e][t]),n}(e.getCode(),t.getCode());return n||(n=Lp),n}function Vp(e,t){return Gp(zp(e),zp(t))}function Wp(e,t,n){return Vp(t,n)(e,void 0,e.length)}function Hp(e,t,n,r){return gp(e,Vp(t,n),void 0,r)}let Up=null;function Zp(){return Up}function Xp(e,t){return Up?Wp(e,t,Up):e}function Kp(e,t){return Up?Wp(e,Up,t):(Pp&&!bp(e,[0,0])&&e[0]>=-180&&e[0]<=180&&e[1]>=-90&&e[1]<=90&&(Pp=!1,Tp("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),e)}function $p(e,t){return Up?Hp(e,t,Up):e}function Yp(e,t){return Up?Hp(e,Up,t):e}function Qp(e,t){if(!Up)return e;const n=zp(t).getUnits(),r=Up.getUnits();return n&&r?e*xh[n]/xh[r]:e}var Jp,ef,tf;function nf(e,t,n){return function(r,i,o,s,a){if(!r)return;if(!i&&!t)return r;const l=t?0:o[0]*i,u=t?0:o[1]*i,c=a?a[0]:0,d=a?a[1]:0;let h=e[0]+l/2+c,p=e[2]-l/2+c,f=e[1]+u/2+d,m=e[3]-u/2+d;h>p&&(h=(p+h)/2,p=h),f>m&&(f=(m+f)/2,m=f);let g=sh(r[0],h,p),_=sh(r[1],f,m);if(s&&n&&i){const e=30*i;g+=-e*Math.log(1+Math.max(0,h-r[0])/e)+e*Math.log(1+Math.max(0,r[0]-p)/e),_+=-e*Math.log(1+Math.max(0,f-r[1])/e)+e*Math.log(1+Math.max(0,r[1]-m)/e)}return[g,_]}}function rf(e){return e}function of(e,t,n,r){const i=pp(t)/n[0],o=up(t)/n[1];return r?Math.min(e,Math.max(i,o)):Math.min(e,Math.min(i,o))}function sf(e,t,n){let r=Math.min(e,t);return r*=Math.log(1+50*Math.max(0,e/t-1))/50+1,n&&(r=Math.max(r,n),r/=Math.log(1+50*Math.max(0,n/e-1))/50+1),sh(r,n/2,2*t)}function af(e,t,n,r,i){return n=void 0===n||n,function(o,s,a,l){if(void 0!==o){const s=r?of(e,r,a,i):e;return n&&l?sf(o,s,t):sh(o,t,s)}}}function lf(e){if(void 0!==e)return 0}function uf(e){if(void 0!==e)return e}function cf(e){return Math.pow(e,3)}function df(e){return 1-cf(1-e)}function hf(e){return 3*e*e-2*e*e*e}function pf(e){return e}Dp(Th),Dp(Lh),Jp=Th,ef=function(e,t,n){const r=e.length;n=n>1?n:2,void 0===t&&(t=n>2?e.slice():new Array(r));for(let i=0;i<r;i+=n){t[i]=Ch*e[i]/180;let n=kh*Math.log(Math.tan(Math.PI*(+e[i+1]+90)/360));n>Eh?n=Eh:n<-Eh&&(n=-Eh),t[i+1]=n}return t},tf=function(e,t,n){const r=e.length;n=n>1?n:2,void 0===t&&(t=n>2?e.slice():new Array(r));for(let i=0;i<r;i+=n)t[i]=180*e[i]/Ch,t[i+1]=360*Math.atan(Math.exp(e[i+1]/kh))/Math.PI-90;return t},Lh.forEach((function(e){Jp.forEach((function(t){Fh(e,t,ef),Fh(t,e,tf)}))}));const ff="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",mf=ff.includes("firefox"),gf=(ff.includes("safari")&&!ff.includes("chrom")&&(ff.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ff)),ff.includes("webkit")&&!ff.includes("edge")),_f=ff.includes("macintosh"),yf="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,vf="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,bf="undefined"!=typeof Image&&Image.prototype.decode,xf=function(){let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch(e){}return e}(),wf=new Array(6);function kf(e){return Sf(e,1,0,0,1,0,0)}function Cf(e,t){const n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=t[0],u=t[1],c=t[2],d=t[3],h=t[4],p=t[5];return e[0]=n*l+i*u,e[1]=r*l+o*u,e[2]=n*c+i*d,e[3]=r*c+o*d,e[4]=n*h+i*p+s,e[5]=r*h+o*p+a,e}function Sf(e,t,n,r,i,o,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s,e}function Af(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function Ef(e,t,n){return Cf(e,Sf(wf,t,0,0,n,0,0))}function Mf(e,t,n,r,i,o,s,a){const l=Math.sin(o),u=Math.cos(o);return e[0]=r*u,e[1]=i*l,e[2]=-r*l,e[3]=i*u,e[4]=s*r*u-a*r*l+t,e[5]=s*i*l+a*i*u+n,e}function Tf(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;Xd(0!==n,32);const i=t[0],o=t[1],s=t[2],a=t[3],l=t[4],u=t[5];return e[0]=a/n,e[1]=-o/n,e[2]=-s/n,e[3]=i/n,e[4]=(s*u-a*l)/n,e[5]=-(i*u-o*l)/n,e}let Pf;function Rf(e){const t="matrix("+e.join(", ")+")";if(vf)return t;const n=Pf||(Pf=document.createElement("div"));return n.style.transform=t,n.style.transform}function If(e,t,n,r,i,o){o=o||[];let s=0;for(let a=t;a<n;a+=r){const t=e[a],n=e[a+1];o[s++]=i[0]*t+i[2]*n+i[4],o[s++]=i[1]*t+i[3]*n+i[5]}return o&&o.length!=s&&(o.length=s),o}function Lf(e,t,n,r,i,o,s){s=s||[];const a=Math.cos(i),l=Math.sin(i),u=o[0],c=o[1];let d=0;for(let i=t;i<n;i+=r){const t=e[i]-u,n=e[i+1]-c;s[d++]=u+t*a-n*l,s[d++]=c+t*l+n*a;for(let t=i+2;t<i+r;++t)s[d++]=e[t]}return s&&s.length!=d&&(s.length=d),s}const Of=[1,0,0,1,0,0],zf=class extends Wd{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=function(e){let t,n,r,i=!1;return function(){const o=Array.prototype.slice.call(arguments);return i&&this===r&&xd(o,n)||(i=!0,r=this,n=o,t=e.apply(this,arguments)),t}}((function(e,t,n){if(!n)return this.getSimplifiedGeometry(t);const r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(t)}))}simplifyTransformed(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}clone(){return Bd()}closestPointXY(e,t,n,r){return Bd()}containsXY(e,t){const n=this.getClosestPoint([e,t]);return n[0]===e&&n[1]===t}getClosestPoint(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return Bd()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Zh(e),this.extentRevision_=this.getRevision()}return function(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e}(this.extent_,e)}rotate(e,t){Bd()}scale(e,t,n){Bd()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return Bd()}getType(){return Bd()}applyTransform(e){Bd()}intersectsExtent(e){return Bd()}translate(e,t){Bd()}transform(e,t){const n=zp(e),r="tile-pixels"==n.getUnits()?function(e,r,i){const o=n.getExtent(),s=n.getWorldExtent(),a=up(s)/up(o);return Mf(Of,s[0],s[3],a,-a,0,0,0),If(e,0,e.length,i,Of,r),Vp(n,t)(e,r,i)}:Vp(n,t);return this.applyTransform(r),this}};function Ff(e){let t;return"XY"==e?t=2:"XYZ"==e||"XYM"==e?t=3:"XYZM"==e&&(t=4),t}const Df=class extends zf{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(e){return Kh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return Bd()}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(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length<this.flatCoordinates.length?t:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,t){this.stride=Ff(e),this.layout=e,this.flatCoordinates=t}setCoordinates(e,t){Bd()}setLayout(e,t,n){let r;if(e)r=Ff(e);else{for(let e=0;e<n;++e){if(0===t.length)return this.layout="XY",void(this.stride=2);t=t[0]}r=t.length,e=function(e){let t;return 2==e?t="XY":3==e?t="XYZ":4==e&&(t="XYZM"),t}(r)}this.layout=e,this.stride=r}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(e,t){const n=this.getFlatCoordinates();if(n){const r=this.getStride();Lf(n,0,n.length,r,e,t,n),this.changed()}}scale(e,t,n){void 0===t&&(t=e),n||(n=op(this.getExtent()));const r=this.getFlatCoordinates();if(r){const i=this.getStride();!function(e,t,n,r,i,o,s,a){a=a||[];const l=s[0],u=s[1];let c=0;for(let t=0;t<n;t+=r){const n=e[t]-l,s=e[t+1]-u;a[c++]=l+i*n,a[c++]=u+o*s;for(let n=t+2;n<t+r;++n)a[c++]=e[n]}a&&a.length!=c&&(a.length=c)}(r,0,r.length,i,e,t,n,r),this.changed()}}translate(e,t){const n=this.getFlatCoordinates();if(n){const r=this.getStride();!function(e,t,n,r,i,o,s){s=s||[];let a=0;for(let t=0;t<n;t+=r){s[a++]=e[t]+i,s[a++]=e[t+1]+o;for(let n=t+2;n<t+r;++n)s[a++]=e[n]}s&&s.length!=a&&(s.length=a)}(n,0,n.length,r,e,t,n),this.changed()}}};function jf(e,t,n,r,i,o,s){const a=e[t],l=e[t+1],u=e[n]-a,c=e[n+1]-l;let d;if(0===u&&0===c)d=t;else{const h=((i-a)*u+(o-l)*c)/(u*u+c*c);if(h>1)d=n;else{if(h>0){for(let i=0;i<r;++i)s[i]=dh(e[t+i],e[n+i],h);return void(s.length=r)}d=t}}for(let t=0;t<r;++t)s[t]=e[d+t];s.length=r}function Nf(e,t,n,r,i){let o=e[t],s=e[t+1];for(t+=r;t<n;t+=r){const n=e[t],r=e[t+1],a=lh(o,s,n,r);a>i&&(i=a),o=n,s=r}return i}function Bf(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o){const s=n[o];i=Nf(e,t,s,r,i),t=s}return i}function qf(e,t,n,r,i,o,s,a,l,u,c){if(t==n)return u;let d,h;if(0===i){if(h=lh(s,a,e[t],e[t+1]),h<u){for(d=0;d<r;++d)l[d]=e[t+d];return l.length=r,h}return u}c=c||[NaN,NaN];let p=t+r;for(;p<n;)if(jf(e,p-r,p,r,s,a,c),h=lh(s,a,c[0],c[1]),h<u){for(u=h,d=0;d<r;++d)l[d]=c[d];l.length=r,p+=r}else p+=r*Math.max((Math.sqrt(h)-Math.sqrt(u))/i|0,1);if(o&&(jf(e,n-r,t,r,s,a,c),h=lh(s,a,c[0],c[1]),h<u)){for(u=h,d=0;d<r;++d)l[d]=c[d];l.length=r}return u}function Gf(e,t,n,r,i,o,s,a,l,u,c){c=c||[NaN,NaN];for(let d=0,h=n.length;d<h;++d){const h=n[d];u=qf(e,t,h,r,i,o,s,a,l,u,c),t=h}return u}function Vf(e,t,n,r){for(let r=0,i=n.length;r<i;++r)e[t++]=n[r];return t}function Wf(e,t,n,r){for(let i=0,o=n.length;i<o;++i){const o=n[i];for(let n=0;n<r;++n)e[t++]=o[n]}return t}function Hf(e,t,n,r,i){i=i||[];let o=0;for(let s=0,a=n.length;s<a;++s){const a=Wf(e,t,n[s],r);i[o++]=a,t=a}return i.length=o,i}function Uf(e,t,n,r,i,o,s){const a=(n-t)/r;if(a<3){for(;t<n;t+=r)o[s++]=e[t],o[s++]=e[t+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const u=[t,n-r];let c=0;for(;u.length>0;){const n=u.pop(),o=u.pop();let s=0;const a=e[o],d=e[o+1],h=e[n],p=e[n+1];for(let t=o+r;t<n;t+=r){const n=ah(e[t],e[t+1],a,d,h,p);n>s&&(c=t,s=n)}s>i&&(l[(c-t)/r]=1,o+r<c&&u.push(o,c),c+r<n&&u.push(c,n))}for(let n=0;n<a;++n)l[n]&&(o[s++]=e[t+n*r],o[s++]=e[t+n*r+1]);return s}function Zf(e,t){return t*Math.round(e/t)}function Xf(e,t,n,r,i,o,s){if(t==n)return s;let a,l,u=Zf(e[t],i),c=Zf(e[t+1],i);t+=r,o[s++]=u,o[s++]=c;do{if(a=Zf(e[t],i),l=Zf(e[t+1],i),(t+=r)==n)return o[s++]=a,o[s++]=l,s}while(a==u&&l==c);for(;t<n;){const n=Zf(e[t],i),d=Zf(e[t+1],i);if(t+=r,n==a&&d==l)continue;const h=a-u,p=l-c,f=n-u,m=d-c;h*m==p*f&&(h<0&&f<h||h==f||h>0&&f>h)&&(p<0&&m<p||p==m||p>0&&m>p)?(a=n,l=d):(o[s++]=a,o[s++]=l,u=a,c=l,a=n,l=d)}return o[s++]=a,o[s++]=l,s}function Kf(e,t,n,r,i,o,s,a){for(let l=0,u=n.length;l<u;++l){const u=n[l];s=Xf(e,t,u,r,i,o,s),a.push(s),t=u}return s}function $f(e,t,n,r,i){i=void 0!==i?i:[];let o=0;for(let s=t;s<n;s+=r)i[o++]=e.slice(s,s+r);return i.length=o,i}function Yf(e,t,n,r,i){i=void 0!==i?i:[];let o=0;for(let s=0,a=n.length;s<a;++s){const a=n[s];i[o++]=$f(e,t,a,r,i[o]),t=a}return i.length=o,i}function Qf(e,t,n,r,i){i=void 0!==i?i:[];let o=0;for(let s=0,a=n.length;s<a;++s){const a=n[s];i[o++]=1===a.length&&a[0]===t?[]:Yf(e,t,a,r,i[o]),t=a[a.length-1]}return i.length=o,i}function Jf(e,t,n,r){let i=0,o=e[n-r],s=e[n-r+1];for(;t<n;t+=r){const n=e[t],r=e[t+1];i+=s*n-o*r,o=n,s=r}return i/2}function em(e,t,n,r){let i=0;for(let o=0,s=n.length;o<s;++o){const s=n[o];i+=Jf(e,t,s,r),t=s}return i}class tm extends Df{constructor(e,t){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===t||Array.isArray(e[0])?this.setCoordinates(e,t):this.setFlatCoordinates(t,e)}clone(){return new tm(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,t,n,r){return r<qh(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Nf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),qf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,n,r))}getArea(){return Jf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return $f(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const t=[];return t.length=Uf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new tm(t,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Wf(this.flatCoordinates,0,e,this.stride),this.changed()}}const nm=tm;class rm extends Df{constructor(e,t){super(),this.setCoordinates(e,t)}clone(){const e=new rm(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){const i=this.flatCoordinates,o=lh(e,t,i[0],i[1]);if(o<r){const e=this.stride;for(let t=0;t<e;++t)n[t]=i[t];return n.length=e,o}return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(e){return Xh(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return Wh(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Vf(this.flatCoordinates,0,e,this.stride),this.changed()}}const im=rm;function om(e,t,n,r,i){return!tp(i,(function(i){return!sm(e,t,n,r,i[0],i[1])}))}function sm(e,t,n,r,i,o){let s=0,a=e[n-r],l=e[n-r+1];for(;t<n;t+=r){const n=e[t],r=e[t+1];l<=o?r>o&&(n-a)*(o-l)-(i-a)*(r-l)>0&&s++:r<=o&&(n-a)*(o-l)-(i-a)*(r-l)<0&&s--,a=n,l=r}return 0!==s}function am(e,t,n,r,i,o){if(0===n.length)return!1;if(!sm(e,t,n[0],r,i,o))return!1;for(let t=1,s=n.length;t<s;++t)if(sm(e,n[t-1],n[t],r,i,o))return!1;return!0}function lm(e,t,n,r,i,o,s){let a,l,u,c,d,h,p;const f=i[o+1],m=[];for(let i=0,o=n.length;i<o;++i){const o=n[i];for(c=e[o-r],h=e[o-r+1],a=t;a<o;a+=r)d=e[a],p=e[a+1],(f<=h&&p<=f||h<=f&&f<=p)&&(u=(f-h)/(p-h)*(d-c)+c,m.push(u)),c=d,h=p}let g=NaN,_=-1/0;for(m.sort(_d),c=m[0],a=1,l=m.length;a<l;++a){d=m[a];const i=Math.abs(d-c);i>_&&(u=(c+d)/2,am(e,t,n,r,u,f)&&(g=u,_=i)),c=d}return isNaN(g)&&(g=i[o]),s?(s.push(g,f,_),s):[g,f,_]}function um(e,t,n,r,i){let o=[];for(let s=0,a=n.length;s<a;++s){const a=n[s];o=lm(e,t,a,r,i,2*s,o),t=a[a.length-1]}return o}function cm(e,t,n,r,i){let o;for(t+=r;t<n;t+=r)if(o=i(e.slice(t-r,t),e.slice(t,t+r)),o)return o;return!1}function dm(e,t,n,r,i){const o=Jh([1/0,1/0,-1/0,-1/0],e,t,n,r);return!!fp(i,o)&&(!!Vh(i,o)||o[0]>=i[0]&&o[2]<=i[2]||o[1]>=i[1]&&o[3]<=i[3]||cm(e,t,n,r,(function(e,t){return function(e,t,n){let r=!1;const i=Hh(e,t),o=Hh(e,n);if(i===Dh.INTERSECTING||o===Dh.INTERSECTING)r=!0;else{const s=e[0],a=e[1],l=e[2],u=e[3],c=t[0],d=t[1],h=n[0],p=n[1],f=(p-d)/(h-c);let m,g;o&Dh.ABOVE&&!(i&Dh.ABOVE)&&(m=h-(p-u)/f,r=m>=s&&m<=l),r||!(o&Dh.RIGHT)||i&Dh.RIGHT||(g=p-(h-l)*f,r=g>=a&&g<=u),r||!(o&Dh.BELOW)||i&Dh.BELOW||(m=h-(p-a)/f,r=m>=s&&m<=l),r||!(o&Dh.LEFT)||i&Dh.LEFT||(g=p-(h-s)*f,r=g>=a&&g<=u)}return r}(i,e,t)})))}function hm(e,t,n,r,i){return!!(dm(e,t,n,r,i)||sm(e,t,n,r,i[0],i[1])||sm(e,t,n,r,i[0],i[3])||sm(e,t,n,r,i[2],i[1])||sm(e,t,n,r,i[2],i[3]))}function pm(e,t,n,r,i){if(!hm(e,t,n[0],r,i))return!1;if(1===n.length)return!0;for(let t=1,o=n.length;t<o;++t)if(om(e,n[t-1],n[t],r,i)&&!dm(e,n[t-1],n[t],r,i))return!1;return!0}function fm(e,t,n,r){for(;t<n-r;){for(let i=0;i<r;++i){const o=e[t+i];e[t+i]=e[n-r+i],e[n-r+i]=o}t+=r,n-=r}}function mm(e,t,n,r){let i=0,o=e[n-r],s=e[n-r+1];for(;t<n;t+=r){const n=e[t],r=e[t+1];i+=(n-o)*(r+s),o=n,s=r}return 0===i?void 0:i>0}function gm(e,t,n,r,i){i=void 0!==i&&i;for(let o=0,s=n.length;o<s;++o){const s=n[o],a=mm(e,t,s,r);if(0===o){if(i&&a||!i&&!a)return!1}else if(i&&!a||!i&&a)return!1;t=s}return!0}function _m(e,t,n,r,i){i=void 0!==i&&i;for(let o=0,s=n.length;o<s;++o){const s=n[o],a=mm(e,t,s,r);(0===o?i&&a||!i&&!a:i&&!a||!i&&a)&&fm(e,t,s,r),t=s}return t}function ym(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o)t=_m(e,t,n[o],r,i);return t}class vm extends Df{constructor(e,t,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==t&&n?(this.setFlatCoordinates(t,e),this.ends_=n):this.setCoordinates(e,t)}appendLinearRing(e){this.flatCoordinates?bd(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new vm(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<qh(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Bf(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Gf(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,n,r))}containsXY(e,t){return am(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}getArea(){return em(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),_m(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,Yf(t,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=op(this.getExtent());this.flatInteriorPoint_=lm(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new im(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new nm(this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,t=this.flatCoordinates,n=this.ends_,r=[];let i=0;for(let o=0,s=n.length;o<s;++o){const s=n[o],a=new nm(t.slice(i,s),e);r.push(a),i=s}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;gm(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=_m(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],n=[];return t.length=Kf(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,n),new vm(t,"XY",n)}getType(){return"Polygon"}intersectsExtent(e){return pm(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=Hf(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()}}const bm=vm;function xm(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=[t,n,t,i,r,i,r,n,t,n];return new vm(o,"XY",[o.length])}function wm(e,t,n){t=t||32;const r=e.getStride(),i=e.getLayout(),o=e.getCenter(),s=r*(t+1),a=new Array(s);for(let e=0;e<s;e+=r){a[e]=0,a[e+1]=0;for(let t=2;t<r;t++)a[e+t]=o[t]}const l=[a.length],u=new vm(a,i,l);return function(e,t,n,r){const i=e.getFlatCoordinates(),o=e.getStride(),s=i.length/o-1,a=r||0;for(let e=0;e<=s;++e){const r=e*o,l=a+2*ch(e,s)*Math.PI/s;i[r]=t[0]+n*Math.cos(l),i[r+1]=t[1]+n*Math.sin(l)}e.changed()}(u,o,e.getRadius(),n),u}function km(e,t){setTimeout((function(){e(t)}),0)}function Cm(e){return!(e.sourceCenter&&e.targetCenter&&!bp(e.sourceCenter,e.targetCenter))&&e.sourceResolution===e.targetResolution&&e.sourceRotation===e.targetRotation}function Sm(e,t,n,r,i){const o=Math.cos(-i);let s=Math.sin(-i),a=e[0]*o-e[1]*s,l=e[1]*o+e[0]*s;return a+=(t[0]/2-n[0])*r,l+=(n[1]-t[1]/2)*r,s=-s,[a*o-l*s,l*o+a*s]}const Am=class extends Wd{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=jp(e.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,e.projection&&Rp(),e.center&&(e.center=Kp(e.center,this.projection_)),e.extent&&(e.extent=Yp(e.extent,this.projection_)),this.applyOptions_(e)}applyOptions_(e){const t=Object.assign({},e);for(const e in yh)delete t[e];this.setProperties(t,!0);const n=function(e){let t,n,r;let i=void 0!==e.minZoom?e.minZoom:0,o=void 0!==e.maxZoom?e.maxZoom:28;const s=void 0!==e.zoomFactor?e.zoomFactor:2,a=void 0!==e.multiWorld&&e.multiWorld,l=void 0===e.smoothResolutionConstraint||e.smoothResolutionConstraint,u=void 0!==e.showFullExtent&&e.showFullExtent,c=jp(e.projection,"EPSG:3857"),d=c.getExtent();let h=e.constrainOnlyCenter,p=e.extent;if(a||p||!c.isGlobal()||(h=!1,p=d),void 0!==e.resolutions){const s=e.resolutions;n=s[i],r=void 0!==s[o]?s[o]:s[s.length-1],t=e.constrainResolution?function(e,t,n,r){return t=void 0===t||t,function(i,o,s,a){if(void 0!==i){const l=e[0],u=e[e.length-1],c=n?of(l,n,s,r):l;if(a)return t?sf(i,c,u):sh(i,u,c);const d=Math.min(c,i),h=Math.floor(yd(e,d,o));return e[h]>c&&h<e.length-1?e[h+1]:e[h]}}}(s,l,!h&&p,u):af(n,r,l,!h&&p,u)}else{const a=(d?Math.max(pp(d),up(d)):360*xh.degrees/c.getMetersPerUnit())/bh/Math.pow(2,0),f=a/Math.pow(2,28);n=e.maxResolution,void 0!==n?i=0:n=a/Math.pow(s,i),r=e.minResolution,void 0===r&&(r=void 0!==e.maxZoom?void 0!==e.maxResolution?n/Math.pow(s,o):a/Math.pow(s,o):f),o=i+Math.floor(Math.log(n/r)/Math.log(s)),r=n/Math.pow(s,o-i),t=e.constrainResolution?function(e,t,n,r,i,o){return r=void 0===r||r,n=void 0!==n?n:0,function(s,a,l,u){if(void 0!==s){const c=i?of(t,i,l,o):t;if(u)return r?sf(s,c,n):sh(s,n,c);const d=1e-9,h=Math.ceil(Math.log(t/c)/Math.log(e)-d),p=-a*(.5-d)+.5,f=Math.min(c,s),m=Math.floor(Math.log(t/f)/Math.log(e)+p),g=Math.max(h,m);return sh(t/Math.pow(e,g),n,c)}}}(s,n,r,l,!h&&p,u):af(n,r,l,!h&&p,u)}return{constraint:t,maxResolution:n,minResolution:r,minZoom:i,zoomFactor:s}}(e);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=n.minZoom;const r=function(e){if(void 0!==e.extent){const t=void 0===e.smoothExtentConstraint||e.smoothExtentConstraint;return nf(e.extent,e.constrainOnlyCenter,t)}const t=jp(e.projection,"EPSG:3857");if(!0!==e.multiWorld&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,nf(e,!1,!1)}return rf}(e),i=n.constraint,o=function(e){if(void 0===e.enableRotation||e.enableRotation){const n=e.constrainRotation;return void 0===n||!0===n?(t=t||uh(5),function(e,n){return n?e:void 0!==e?Math.abs(e)<=t?0:e:void 0}):!1===n?uf:"number"==typeof n?function(e){const t=2*Math.PI/e;return function(e,n){return n?e:void 0!==e?e=Math.floor(e/t+.5)*t:void 0}}(n):uf}var t;return lf}(e);this.constraints_={center:r,resolution:i,rotation:o},this.setRotation(void 0!==e.rotation?e.rotation:0),this.setCenterInternal(void 0!==e.center?e.center:null),void 0!==e.resolution?this.setResolution(e.resolution):void 0!==e.zoom&&this.setZoom(e.zoom)}get padding(){return this.padding_}set padding(e){let t=this.padding_;this.padding_=e;const n=this.getCenterInternal();if(n){const r=e||[0,0,0,0];t=t||[0,0,0,0];const i=this.getResolution(),o=i/2*(r[3]-t[3]+t[1]-r[1]),s=i/2*(r[0]-t[0]+t[2]-r[2]);this.setCenterInternal([n[0]+o,n[1]-s])}}getUpdatedOptions_(e){const t=this.getProperties();return void 0!==t.resolution?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object.assign({},t,e)}animate(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const t=new Array(arguments.length);for(let e=0;e<t.length;++e){let n=arguments[e];n.center&&(n=Object.assign({},n),n.center=Kp(n.center,this.getProjection())),n.anchor&&(n=Object.assign({},n),n.anchor=Kp(n.anchor,this.getProjection())),t[e]=n}this.animateInternal.apply(this,t)}animateInternal(e){let t,n=arguments.length;n>1&&"function"==typeof arguments[n-1]&&(t=arguments[n-1],--n);let r=0;for(;r<n&&!this.isDef();++r){const e=arguments[r];e.center&&this.setCenterInternal(e.center),void 0!==e.zoom?this.setZoom(e.zoom):e.resolution&&this.setResolution(e.resolution),void 0!==e.rotation&&this.setRotation(e.rotation)}if(r===n)return void(t&&km(t,!0));let i=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_;const l=[];for(;r<n;++r){const e=arguments[r],n={start:i,complete:!1,anchor:e.anchor,duration:void 0!==e.duration?e.duration:1e3,easing:e.easing||hf,callback:t};if(e.center&&(n.sourceCenter=o,n.targetCenter=e.center.slice(),o=n.targetCenter),void 0!==e.zoom?(n.sourceResolution=s,n.targetResolution=this.getResolutionForZoom(e.zoom),s=n.targetResolution):e.resolution&&(n.sourceResolution=s,n.targetResolution=e.resolution,s=n.targetResolution),void 0!==e.rotation){n.sourceRotation=a;const t=ch(e.rotation-a+Math.PI,2*Math.PI)-Math.PI;n.targetRotation=a+t,a=n.targetRotation}Cm(n)?n.complete=!0:i+=n.duration,l.push(n)}this.animations_.push(l),this.setHint(0,1),this.updateAnimations_()}getAnimating(){return this.hints_[0]>0}getInteracting(){return this.hints_[1]>0}cancelAnimations(){let e;this.setHint(0,-this.hints_[0]);for(let t=0,n=this.animations_.length;t<n;++t){const n=this.animations_[t];if(n[0].callback&&km(n[0].callback,!1),!e)for(let t=0,r=n.length;t<r;++t){const r=n[t];if(!r.complete){e=r.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,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 e=Date.now();let t=!1;for(let n=this.animations_.length-1;n>=0;--n){const r=this.animations_[n];let i=!0;for(let n=0,o=r.length;n<o;++n){const o=r[n];if(o.complete)continue;const s=e-o.start;let a=o.duration>0?s/o.duration:1;a>=1?(o.complete=!0,a=1):i=!1;const l=o.easing(a);if(o.sourceCenter){const e=o.sourceCenter[0],t=o.sourceCenter[1],n=o.targetCenter[0],r=o.targetCenter[1];this.nextCenter_=o.targetCenter;const i=e+l*(n-e),s=t+l*(r-t);this.targetCenter_=[i,s]}if(o.sourceResolution&&o.targetResolution){const e=1===l?o.targetResolution:o.sourceResolution+l*(o.targetResolution-o.sourceResolution);if(o.anchor){const t=this.getViewportSize_(this.getRotation()),n=this.constraints_.resolution(e,0,t,!0);this.targetCenter_=this.calculateCenterZoom(n,o.anchor)}this.nextResolution_=o.targetResolution,this.targetResolution_=e,this.applyTargetState_(!0)}if(void 0!==o.sourceRotation&&void 0!==o.targetRotation){const e=1===l?ch(o.targetRotation+Math.PI,2*Math.PI)-Math.PI:o.sourceRotation+l*(o.targetRotation-o.sourceRotation);if(o.anchor){const t=this.constraints_.rotation(e,!0);this.targetCenter_=this.calculateCenterRotate(t,o.anchor)}this.nextRotation_=o.targetRotation,this.targetRotation_=e}if(this.applyTargetState_(!0),t=!0,!o.complete)break}if(i){this.animations_[n]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const e=r[0].callback;e&&km(e,!0)}}this.animations_=this.animations_.filter(Boolean),t&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let n;const r=this.getCenterInternal();var i,o;return void 0!==r&&(n=[r[0]-t[0],r[1]-t[1]],xp(n,e-this.getRotation()),o=t,(i=n)[0]+=+o[0],i[1]+=+o[1]),n}calculateCenterZoom(e,t){let n;const r=this.getCenterInternal(),i=this.getResolution();return void 0!==r&&void 0!==i&&(n=[t[0]-e*(t[0]-r[0])/i,t[1]-e*(t[1]-r[1])/i]),n}getViewportSize_(e){const t=this.viewportSize_;if(e){const n=t[0],r=t[1];return[Math.abs(n*Math.cos(e))+Math.abs(r*Math.sin(e)),Math.abs(n*Math.sin(e))+Math.abs(r*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e?Xp(e,this.getProjection()):e}getCenterInternal(){return this.get(yh.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return void 0!==e?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){return $p(this.calculateExtentInternal(e),this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();Xd(t,1);const n=this.getResolution();Xd(void 0!==n,2);const r=this.getRotation();return Xd(void 0!==r,3),ap(t,n,r,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(yh.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(Yp(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const n=pp(e)/t[0],r=up(e)/t[1];return Math.max(n,r)}getResolutionForValueFunction(e){e=e||2;const t=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(t/n)/Math.log(e);return function(n){return t/Math.pow(e,n*r)}}getRotation(){return this.get(yh.ROTATION)}getValueForResolutionFunction(e){const t=Math.log(e||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/t;return function(e){return Math.log(n/e)/t/i}}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e);const n=this.padding_;return n&&(t=[t[0]-n[1]-n[3],t[1]-n[0]-n[2]]),t}getState(){const e=this.getProjection(),t=this.getResolution(),n=this.getRotation();let r=this.getCenterInternal();const i=this.padding_;if(i){const e=this.getViewportSizeMinusPadding_();r=Sm(r,this.getViewportSize_(),[e[0]/2+i[3],e[1]/2+i[0]],t,n)}return{center:r.slice(0),projection:void 0!==e?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const t=this.getResolution();return void 0!==t&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t,n,r=this.minZoom_||0;if(this.resolutions_){const i=yd(this.resolutions_,e,1);r=i,t=this.resolutions_[i],n=i==this.resolutions_.length-1?2:t/this.resolutions_[i+1]}else t=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(t/e)/Math.log(n)}getResolutionForZoom(e){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const t=sh(Math.floor(e),0,this.resolutions_.length-2),n=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(n,sh(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,t){let n;if(Xd(Array.isArray(e)||"function"==typeof e.getSimplifiedGeometry,24),Array.isArray(e))Xd(!mp(e),25),n=xm(Yp(e,this.getProjection()));else if("Circle"===e.getType()){const t=Yp(e.getExtent(),this.getProjection());n=xm(t),n.rotate(this.getRotation(),op(t))}else{const t=Zp();n=t?e.clone().transform(t,this.getProjection()):e}this.fitInternal(n,t)}rotatedExtentForGeometry(e){const t=this.getRotation(),n=Math.cos(t),r=Math.sin(-t),i=e.getFlatCoordinates(),o=e.getStride();let s=1/0,a=1/0,l=-1/0,u=-1/0;for(let e=0,t=i.length;e<t;e+=o){const t=i[e]*n-i[e+1]*r,o=i[e]*r+i[e+1]*n;s=Math.min(s,t),a=Math.min(a,o),l=Math.max(l,t),u=Math.max(u,o)}return[s,a,l,u]}fitInternal(e,t){let n=(t=t||{}).size;n||(n=this.getViewportSizeMinusPadding_());const r=void 0!==t.padding?t.padding:[0,0,0,0],i=void 0!==t.nearest&&t.nearest;let o;o=void 0!==t.minResolution?t.minResolution:void 0!==t.maxZoom?this.getResolutionForZoom(t.maxZoom):0;const s=this.rotatedExtentForGeometry(e);let a=this.getResolutionForExtentInternal(s,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);a=isNaN(a)?o:Math.max(a,o),a=this.getConstrainedResolution(a,i?0:1);const l=this.getRotation(),u=Math.sin(l),c=Math.cos(l),d=op(s);d[0]+=(r[1]-r[3])/2*a,d[1]+=(r[0]-r[2])/2*a;const h=d[0]*c-d[1]*u,p=d[1]*c+d[0]*u,f=this.getConstrainedCenter([h,p],a),m=t.callback?t.callback:Cd;void 0!==t.duration?this.animateInternal({resolution:a,center:f,duration:t.duration,easing:t.easing},m):(this.targetResolution_=a,this.targetCenter_=f,this.applyTargetState_(!1,!0),km(m,!0))}centerOn(e,t,n){this.centerOnInternal(Kp(e,this.getProjection()),t,n)}centerOnInternal(e,t,n){this.setCenterInternal(Sm(e,t,n,this.getResolution(),this.getRotation()))}calculateCenterShift(e,t,n,r){let i;const o=this.padding_;if(o&&e){const s=this.getViewportSizeMinusPadding_(-n),a=Sm(e,r,[s[0]/2+o[3],s[1]/2+o[0]],t,n);i=[e[0]-a[0],e[1]-a[1]]}return i}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(e){const t=Xp(this.targetCenter_,this.getProjection());this.setCenter([t[0]+e[0],t[1]+e[1]])}adjustCenterInternal(e){const t=this.targetCenter_;this.setCenterInternal([t[0]+e[0],t[1]+e[1]])}adjustResolution(e,t){t=t&&Kp(t,this.getProjection()),this.adjustResolutionInternal(e,t)}adjustResolutionInternal(e,t){const n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(this.targetResolution_*e,0,r,n);t&&(this.targetCenter_=this.calculateCenterZoom(i,t)),this.targetResolution_*=e,this.applyTargetState_()}adjustZoom(e,t){this.adjustResolution(Math.pow(this.zoomFactor_,-e),t)}adjustRotation(e,t){t&&(t=Kp(t,this.getProjection())),this.adjustRotationInternal(e,t)}adjustRotationInternal(e,t){const n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+e,n);t&&(this.targetCenter_=this.calculateCenterRotate(r,t)),this.targetRotation_+=e,this.applyTargetState_()}setCenter(e){this.setCenterInternal(e?Kp(e,this.getProjection()):e)}setCenterInternal(e){this.targetCenter_=e,this.applyTargetState_()}setHint(e,t){return this.hints_[e]+=t,this.changed(),this.hints_[e]}setResolution(e){this.targetResolution_=e,this.applyTargetState_()}setRotation(e){this.targetRotation_=e,this.applyTargetState_()}setZoom(e){this.setResolution(this.getResolutionForZoom(e))}applyTargetState_(e,t){const n=this.getAnimating()||this.getInteracting()||t,r=this.constraints_.rotation(this.targetRotation_,n),i=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,0,i,n),s=this.constraints_.center(this.targetCenter_,o,i,n,this.calculateCenterShift(this.targetCenter_,o,r,i));this.get(yh.ROTATION)!==r&&this.set(yh.ROTATION,r),this.get(yh.RESOLUTION)!==o&&(this.set(yh.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(yh.CENTER)&&bp(this.get(yh.CENTER),s)||this.set(yh.CENTER,s),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(e,t,n){e=void 0!==e?e:200;const r=t||0,i=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(i),s=this.constraints_.resolution(this.targetResolution_,r,o),a=this.constraints_.center(this.targetCenter_,s,o,!1,this.calculateCenterShift(this.targetCenter_,s,i,o));if(0===e&&!this.cancelAnchor_)return this.targetResolution_=s,this.targetRotation_=i,this.targetCenter_=a,void this.applyTargetState_();n=n||(0===e?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===s&&this.getRotation()===i&&this.getCenterInternal()&&bp(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:i,center:a,resolution:s,duration:e,easing:df,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(1,1)}endInteraction(e,t,n){n=n&&Kp(n,this.getProjection()),this.endInteractionInternal(e,t,n)}endInteractionInternal(e,t,n){this.getInteracting()&&(this.setHint(1,-1),this.resolveConstraints(e,t,n))}getConstrainedCenter(e,t){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,t||this.getResolution(),n)}getConstrainedZoom(e,t){const n=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(n,t))}getConstrainedResolution(e,t){t=t||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,t,n)}};function Em(e,t){if(!e.visible)return!1;const n=t.resolution;if(n<e.minResolution||n>=e.maxResolution)return!1;const r=t.zoom;return r>e.minZoom&&r<=e.maxZoom}const Mm=class extends mh{constructor(e){const t=Object.assign({},e);delete t.source,super(t),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(oh,this.handleSourcePropertyChange_);const n=e.source?e.source:null;this.setSource(n)}getLayersArray(e){return(e=e||[]).push(this),e}getLayerStatesArray(e){return(e=e||[]).push(this.getLayerState()),e}getSource(){return this.get(oh)||null}getRenderSource(){return this.getSource()}getSourceState(){const e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Dd(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const e=this.getSource();e&&(this.sourceChangeKey_=zd(e,Md,this.handleSourceChange_,this),"ready"===e.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return this.renderer_&&this.rendered?this.renderer_.getData(e):null}isVisible(e){let t;const n=this.getMapInternal();let r;!e&&n&&(e=n.getView()),t=e instanceof Am?{viewState:e.getState(),extent:e.calculateExtent()}:e,!t.layerStatesArray&&n&&(t.layerStatesArray=n.getLayerGroup().getLayerStatesArray()),r=t.layerStatesArray?t.layerStatesArray.find((e=>e.layer===this)):this.getLayerState();const i=this.getExtent();return Em(r,t.viewState)&&(!i||fp(i,t.extent))}getAttributions(e){if(!this.isVisible(e))return[];let t;const n=this.getSource();if(n&&(t=n.getAttributions()),!t)return[];let r=t(e instanceof Am?e.getViewStateAndExtent():e);return Array.isArray(r)||(r=[r]),r}render(e,t){const n=this.getRenderer();return n.prepareFrame(e)?(this.rendered=!0,n.renderFrame(e,t)):null}unrender(){this.rendered=!1}setMapInternal(e){e||this.unrender(),this.set("map",e)}getMapInternal(){return this.get("map")}setMap(e){this.mapPrecomposeKey_&&(Dd(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Dd(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=zd(e,gh,(function(e){const t=e.frameState.layerStatesArray,n=this.getLayerState(!1);Xd(!t.some((function(e){return e.layer===n.layer})),67),t.push(n)}),this),this.mapRenderKey_=zd(this,Md,e.render,e),this.changed())}setSource(e){this.set(oh,e)}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()}},Tm="preload",Pm="useInterimTilesOnError",Rm=class extends Mm{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.setPreload(void 0!==e.preload?e.preload:0),this.setUseInterimTilesOnError(void 0===e.useInterimTilesOnError||e.useInterimTilesOnError)}getPreload(){return this.get(Tm)}setPreload(e){this.set(Tm,e)}getUseInterimTilesOnError(){return this.get(Pm)}setUseInterimTilesOnError(e){this.set(Pm,e)}getData(e){return super.getData(e)}},Im=class extends Nd{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.declutterExecutorGroup=null}getFeatures(e){return Bd()}getData(e){return null}prepareFrame(e){return Bd()}renderFrame(e,t){return Bd()}loadedTileCallback(e,t,n){e[t]||(e[t]={}),e[t][n.tileCoord.toString()]=n}createLoadedTileFinder(e,t,n){return(r,i)=>{const o=this.loadedTileCallback.bind(this,n,r);return e.forEachLoadedTile(t,r,i,o)}}forEachFeatureAtCoordinate(e,t,n,r,i){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){2===e.target.getState()&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return 2!=t&&3!=t&&e.addEventListener(Md,this.boundHandleImageChange_),0==t&&(e.load(),t=e.getState()),2==t}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&"ready"===e.getSourceState()&&e.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}},Lm=class extends fd{constructor(e,t,n,r){super(e),this.inversePixelTransform=t,this.frameState=n,this.context=r}},Om=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,zm=/^([a-z]*)$|^hsla?\(.*\)$/i;function Fm(e){return"string"==typeof e?e:Bm(e)}const Dm=function(){const e={};let t=0;return function(n){let r;if(e.hasOwnProperty(n))r=e[n];else{if(t>=1024){let n=0;for(const r in e)0==(3&n++)&&(delete e[r],--t)}r=function(e){let t,n,r,i,o;if(zm.exec(e)&&(e=function(e){const t=document.createElement("div");if(t.style.color=e,""!==t.style.color){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}return""}(e)),Om.exec(e)){const s=e.length-1;let a;a=s<=4?1:2;const l=4===s||8===s;t=parseInt(e.substr(1+0*a,a),16),n=parseInt(e.substr(1+1*a,a),16),r=parseInt(e.substr(1+2*a,a),16),i=l?parseInt(e.substr(1+3*a,a),16):255,1==a&&(t=(t<<4)+t,n=(n<<4)+n,r=(r<<4)+r,l&&(i=(i<<4)+i)),o=[t,n,r,i/255]}else e.startsWith("rgba(")?(o=e.slice(5,-1).split(",").map(Number),Nm(o)):e.startsWith("rgb(")?(o=e.slice(4,-1).split(",").map(Number),o.push(1),Nm(o)):Xd(!1,14);return o}(n),e[n]=r,++t}return r}}();function jm(e){return Array.isArray(e)?e:Dm(e)}function Nm(e){return e[0]=sh(e[0]+.5|0,0,255),e[1]=sh(e[1]+.5|0,0,255),e[2]=sh(e[2]+.5|0,0,255),e[3]=sh(e[3],0,1),e}function Bm(e){let t=e[0];t!=(0|t)&&(t=t+.5|0);let n=e[1];n!=(0|n)&&(n=n+.5|0);let r=e[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+t+","+n+","+r+","+(void 0===e[3]?1:Math.round(100*e[3])/100)+")"}function qm(e,t,n,r){let i;return i=n&&n.length?n.shift():vf?new OffscreenCanvas(e||300,t||300):document.createElement("canvas"),e&&(i.width=e),t&&(i.height=t),i.getContext("2d",r)}function Gm(e){const t=e.canvas;t.width=1,t.height=1,e.clearRect(0,0,1,1)}function Vm(e){let t=e.offsetWidth;const n=getComputedStyle(e);return t+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10),t}function Wm(e){let t=e.offsetHeight;const n=getComputedStyle(e);return t+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10),t}function Hm(e,t){const n=t.parentNode;n&&n.replaceChild(e,t)}function Um(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}function Zm(e){for(;e.lastChild;)e.removeChild(e.lastChild)}const Xm=[];let Km=null;const $m=class extends Im{constructor(e){super(e),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.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(e,t,n){let r;Km||(Km=qm(1,1,void 0,{willReadFrequently:!0})),Km.clearRect(0,0,1,1);try{Km.drawImage(e,t,n,1,1,0,0,1,1),r=Km.getImageData(0,0,1,1).data}catch(e){return Km=null,null}return r}getBackground(e){let t=this.getLayer().getBackground();return"function"==typeof t&&(t=t(e.viewState.resolution)),t||void 0}useContainer(e,t,n){const r=this.getLayer().getClassName();let i,o;if(e&&e.className===r&&(!n||e&&e.style.backgroundColor&&xd(jm(e.style.backgroundColor),jm(n)))){const t=e.firstElementChild;t instanceof HTMLCanvasElement&&(o=t.getContext("2d"))}if(o&&o.canvas.style.transform===t?(this.container=e,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){i=document.createElement("div"),i.className=r;let e=i.style;e.position="absolute",e.width="100%",e.height="100%",o=qm();const t=o.canvas;i.appendChild(t),e=t.style,e.position="absolute",e.left="0",e.transformOrigin="top left",this.container=i,this.context=o}this.containerReused||!n||this.container.style.backgroundColor||(this.container.style.backgroundColor=n)}clipUnrotated(e,t,n){const r=dp(n),i=hp(n),o=ip(n),s=rp(n);Af(t.coordinateToPixelTransform,r),Af(t.coordinateToPixelTransform,i),Af(t.coordinateToPixelTransform,o),Af(t.coordinateToPixelTransform,s);const a=this.inversePixelTransform;Af(a,r),Af(a,i),Af(a,o),Af(a,s),e.save(),e.beginPath(),e.moveTo(Math.round(r[0]),Math.round(r[1])),e.lineTo(Math.round(i[0]),Math.round(i[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.clip()}dispatchRenderEvent_(e,t,n){const r=this.getLayer();if(r.hasListener(e)){const i=new Lm(e,this.inversePixelTransform,n,t);r.dispatchEvent(i)}}preRender(e,t){this.frameState=t,this.dispatchRenderEvent_("prerender",e,t)}postRender(e,t){this.dispatchRenderEvent_("postrender",e,t)}getRenderTransform(e,t,n,r,i,o,s){const a=i/2,l=o/2,u=r/t,c=-u,d=-e[0]+s,h=-e[1];return Mf(this.tempTransform,a,l,u,c,-n,d,h)}disposeInternal(){delete this.frameState,super.disposeInternal()}},Ym=class extends Ed{constructor(e,t,n){super(),n=n||{},this.tileCoord=e,this.state=t,this.interimTile=null,this.key="",this.transition_=void 0===n.transition?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(Md)}release(){3===this.state&&this.setState(4)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let e=this.interimTile;do{if(2==e.getState())return this.transition_=0,e;e=e.interimTile}while(e);return this}refreshInterimChain(){if(!this.interimTile)return;let e=this.interimTile,t=this;do{if(2==e.getState()){e.interimTile=null;break}1==e.getState()?t=e:0==e.getState()?t.interimTile=e.interimTile:t=e,e=t.interimTile}while(e)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(3!==this.state&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){Bd()}getAlpha(e,t){if(!this.transition_)return 1;let n=this.transitionStarts_[e];if(n){if(-1===n)return 1}else n=t,this.transitionStarts_[e]=n;const r=t-n+1e3/60;return r>=this.transition_?1:cf(r/this.transition_)}inTransition(e){return!!this.transition_&&-1!==this.transitionStarts_[e]}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}};function Qm(e,t,n){const r=e;let i=!0,o=!1,s=!1;const a=[Fd(r,"load",(function(){s=!0,o||t()}))];return r.src&&bf?(o=!0,r.decode().then((function(){i&&t()})).catch((function(e){i&&(s?t():n())}))):a.push(Fd(r,"error",n)),function(){i=!1,a.forEach(Dd)}}const Jm=class extends Ym{constructor(e,t,n,r,i,o){super(e,t,o),this.crossOrigin_=r,this.src_=n,this.key=n,this.image_=new Image,null!==r&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=i}getImage(){return this.image_}setImage(e){this.image_=e,this.state=2,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=3,this.unlistenImage_(),this.image_=function(){const e=qm(1,1);return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),e.canvas}(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=2:this.state=4,this.unlistenImage_(),this.changed()}load(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Qm(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}},eg=class{constructor(e,t,n,r,i,o){this.sourceProj_=e,this.targetProj_=t;let s={};const a=Vp(this.targetProj_,this.sourceProj_);this.transformInv_=function(e){const t=e[0]+"/"+e[1];return s[t]||(s[t]=a(e)),s[t]},this.maxSourceExtent_=r,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&pp(r)>=pp(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?pp(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?pp(this.targetProj_.getExtent()):null;const l=dp(n),u=hp(n),c=ip(n),d=rp(n),h=this.transformInv_(l),p=this.transformInv_(u),f=this.transformInv_(c),m=this.transformInv_(d),g=10+(o?Math.max(0,Math.ceil(Math.log2(np(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,c,d,h,p,f,m,g),this.wrapsXInSource_){let e=1/0;this.triangles_.forEach((function(t,n,r){e=Math.min(e,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach((t=>{if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-e>this.sourceWorldWidth_/2){const n=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];n[0][0]-e>this.sourceWorldWidth_/2&&(n[0][0]-=this.sourceWorldWidth_),n[1][0]-e>this.sourceWorldWidth_/2&&(n[1][0]-=this.sourceWorldWidth_),n[2][0]-e>this.sourceWorldWidth_/2&&(n[2][0]-=this.sourceWorldWidth_);const r=Math.min(n[0][0],n[1][0],n[2][0]);Math.max(n[0][0],n[1][0],n[2][0])-r<this.sourceWorldWidth_/2&&(t.source=n)}}))}s={}}addTriangle_(e,t,n,r,i,o){this.triangles_.push({source:[r,i,o],target:[e,t,n]})}addQuad_(e,t,n,r,i,o,s,a,l){const u=jh([i,o,s,a]),c=this.sourceWorldWidth_?pp(u)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,h=this.sourceProj_.canWrapX()&&c>.5&&c<1;let p=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(p=pp(jh([e,t,n,r]))/this.targetWorldWidth_>.25||p),!h&&this.sourceProj_.isGlobal()&&c&&(p=c>.25||p)),!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!fp(u,this.maxSourceExtent_))return;let f=0;if(!(p||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)p=!0;else if(f=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=f&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!p){const t=[(e[0]+n[0])/2,(e[1]+n[1])/2],r=this.transformInv_(t);let o;o=h?(ch(i[0],d)+ch(s[0],d))/2-ch(r[0],d):(i[0]+s[0])/2-r[0];const a=(i[1]+s[1])/2-r[1];p=o*o+a*a>this.errorThresholdSquared_}if(p){if(Math.abs(e[0]-n[0])<=Math.abs(e[1]-n[1])){const u=[(t[0]+n[0])/2,(t[1]+n[1])/2],c=this.transformInv_(u),d=[(r[0]+e[0])/2,(r[1]+e[1])/2],h=this.transformInv_(d);this.addQuad_(e,t,u,d,i,o,c,h,l-1),this.addQuad_(d,u,n,r,h,c,s,a,l-1)}else{const u=[(e[0]+t[0])/2,(e[1]+t[1])/2],c=this.transformInv_(u),d=[(n[0]+r[0])/2,(n[1]+r[1])/2],h=this.transformInv_(d);this.addQuad_(e,u,d,r,i,c,h,a,l-1),this.addQuad_(u,t,n,d,c,o,s,h,l-1)}return}}if(h){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(e,n,r,i,s,a),0==(14&f)&&this.addTriangle_(e,n,t,i,s,o),f&&(0==(13&f)&&this.addTriangle_(t,r,e,o,a,i),0==(7&f)&&this.addTriangle_(t,r,n,o,a,s))}calculateSourceExtent(){const e=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(t,n,r){const i=t.source;Qh(e,i[0]),Qh(e,i[1]),Qh(e,i[2])})),e}getTriangles(){return this.triangles_}};let tg;const ng=[];function rg(e,t,n,r,i){e.beginPath(),e.moveTo(0,0),e.lineTo(t,n),e.lineTo(r,i),e.closePath(),e.save(),e.clip(),e.fillRect(0,0,Math.max(t,r)+1,Math.max(n,i)),e.restore()}function ig(e,t){return Math.abs(e[4*t]-210)>2||Math.abs(e[4*t+3]-191.25)>2}function og(e,t,n,r){const i=Wp(n,t,e);let o=Fp(t,r,n);const s=t.getMetersPerUnit();void 0!==s&&(o*=s);const a=e.getMetersPerUnit();void 0!==a&&(o/=a);const l=e.getExtent();if(!l||Gh(l,i)){const t=Fp(e,o,i)/o;isFinite(t)&&t>0&&(o/=t)}return o}function sg(e,t,n,r,i,o,s,a,l,u,c,d){const h=qm(Math.round(n*e),Math.round(n*t),ng);if(d||(h.imageSmoothingEnabled=!1),0===l.length)return h.canvas;function p(e){return Math.round(e*n)/n}h.scale(n,n),h.globalCompositeOperation="lighter";const f=[1/0,1/0,-1/0,-1/0];l.forEach((function(e,t,n){Yh(f,e.extent)}));const m=pp(f),g=up(f),_=qm(Math.round(n*m/r),Math.round(n*g/r),ng);d||(_.imageSmoothingEnabled=!1);const y=n/r;l.forEach((function(e,t,n){const r=e.extent[0]-f[0],i=-(e.extent[3]-f[3]),o=pp(e.extent),s=up(e.extent);e.image.width>0&&e.image.height>0&&_.drawImage(e.image,u,u,e.image.width-2*u,e.image.height-2*u,r*y,i*y,o*y,s*y)}));const v=dp(s);return a.getTriangles().forEach((function(e,t,i){const s=e.source,a=e.target;let l=s[0][0],u=s[0][1],c=s[1][0],m=s[1][1],g=s[2][0],y=s[2][1];const b=p((a[0][0]-v[0])/o),x=p(-(a[0][1]-v[1])/o),w=p((a[1][0]-v[0])/o),k=p(-(a[1][1]-v[1])/o),C=p((a[2][0]-v[0])/o),S=p(-(a[2][1]-v[1])/o),A=l,E=u;l=0,u=0,c-=A,m-=E,g-=A,y-=E;const M=function(e){const t=e.length;for(let n=0;n<t;n++){let r=n,i=Math.abs(e[n][n]);for(let o=n+1;o<t;o++){const t=Math.abs(e[o][n]);t>i&&(i=t,r=o)}if(0===i)return null;const o=e[r];e[r]=e[n],e[n]=o;for(let r=n+1;r<t;r++){const i=-e[r][n]/e[n][n];for(let o=n;o<t+1;o++)n==o?e[r][o]=0:e[r][o]+=i*e[n][o]}}const n=new Array(t);for(let r=t-1;r>=0;r--){n[r]=e[r][t]/e[r][r];for(let i=r-1;i>=0;i--)e[i][t]-=e[i][r]*n[r]}return n}([[c,m,0,0,w-b],[g,y,0,0,C-b],[0,0,c,m,k-x],[0,0,g,y,S-x]]);if(M){if(h.save(),h.beginPath(),function(){if(void 0===tg){const e=qm(6,6,ng);e.globalCompositeOperation="lighter",e.fillStyle="rgba(210, 0, 0, 0.75)",rg(e,4,5,4,0),rg(e,4,5,0,5);const t=e.getImageData(0,0,3,3).data;tg=ig(t,0)||ig(t,4)||ig(t,8),Gm(e),ng.push(e.canvas)}return tg}()||!d){h.moveTo(w,k);const e=4,t=b-w,n=x-k;for(let r=0;r<e;r++)h.lineTo(w+p((r+1)*t/e),k+p(r*n/(e-1))),r!=e-1&&h.lineTo(w+p((r+1)*t/e),k+p((r+1)*n/(e-1)));h.lineTo(C,S)}else h.moveTo(w,k),h.lineTo(b,x),h.lineTo(C,S);h.clip(),h.transform(M[0],M[2],M[1],M[3],b,x),h.translate(f[0]-A,f[3]-E),h.scale(r/n,-r/n),h.drawImage(_.canvas,0,0),h.restore()}})),Gm(_),ng.push(_.canvas),c&&(h.save(),h.globalCompositeOperation="source-over",h.strokeStyle="black",h.lineWidth=1,a.getTriangles().forEach((function(e,t,n){const r=e.target,i=(r[0][0]-v[0])/o,s=-(r[0][1]-v[1])/o,a=(r[1][0]-v[0])/o,l=-(r[1][1]-v[1])/o,u=(r[2][0]-v[0])/o,c=-(r[2][1]-v[1])/o;h.beginPath(),h.moveTo(a,l),h.lineTo(i,s),h.lineTo(u,c),h.closePath(),h.stroke()})),h.restore()),h.canvas}const ag=class extends Ym{constructor(e,t,n,r,i,o,s,a,l,u,c,d){super(i,0,{interpolate:!!d}),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=s,this.gutter_=a,this.canvas_=null,this.sourceTileGrid_=t,this.targetTileGrid_=r,this.wrappedTileCoord_=o||i,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const h=r.getTileCoordExtent(this.wrappedTileCoord_),p=this.targetTileGrid_.getExtent();let f=this.sourceTileGrid_.getExtent();const m=p?cp(h,p):h;if(0===np(m))return void(this.state=4);const g=e.getExtent();g&&(f=f?cp(f,g):g);const _=r.getResolution(this.wrappedTileCoord_[0]),y=function(e,t,n,r){const i=op(n);let o=og(e,t,i,r);return(!isFinite(o)||o<=0)&&tp(n,(function(n){return o=og(e,t,n,r),isFinite(o)&&o>0})),o}(e,n,m,_);if(!isFinite(y)||y<=0)return void(this.state=4);const v=void 0!==u?u:.5;if(this.triangulation_=new eg(e,n,m,f,y*v,_),0===this.triangulation_.getTriangles().length)return void(this.state=4);this.sourceZ_=t.getZForResolution(y);let b=this.triangulation_.calculateSourceExtent();if(f&&(e.canWrapX()?(b[1]=sh(b[1],f[1],f[3]),b[3]=sh(b[3],f[1],f[3])):b=cp(b,f)),np(b)){const e=t.getTileRangeForExtentAndZ(b,this.sourceZ_);for(let t=e.minX;t<=e.maxX;t++)for(let n=e.minY;n<=e.maxY;n++){const e=l(this.sourceZ_,t,n,s);e&&this.sourceTiles_.push(e)}0===this.sourceTiles_.length&&(this.state=4)}else this.state=4}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach((t=>{t&&2==t.getState()&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})})),this.sourceTiles_.length=0,0===e.length)this.state=3;else{const t=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(t),r="number"==typeof n?n:n[0],i="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(t),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=sg(r,i,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()}load(){if(0==this.state){this.state=1,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((t=>{const n=t.getState();if(0==n||1==n){e++;const n=zd(t,Md,(function(r){const i=t.getState();2!=i&&3!=i&&4!=i||(Dd(n),e--,0===e&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(n)}})),0===e?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(e,t,n){0==e.getState()&&e.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Dd),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Gm(this.canvas_.getContext("2d")),ng.push(this.canvas_),this.canvas_=null),super.release()}};class lg{constructor(e,t,n,r){this.minX=e,this.maxX=t,this.minY=n,this.maxY=r}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function ug(e,t,n,r,i){return void 0!==i?(i.minX=e,i.maxX=t,i.minY=n,i.maxY=r,i):new lg(e,t,n,r)}const cg=lg;function dg(e){return e[0]>0&&e[1]>0}function hg(e,t){return Array.isArray(e)?e:(void 0===t?t=[e,e]:(t[0]=e,t[1]=e),t)}const pg=class extends $m{constructor(e){super(e),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new cg(0,0,0,0)}isDrawableTile(e){const t=this.getLayer(),n=e.getState(),r=t.getUseInterimTilesOnError();return 2==n||4==n||3==n&&!r}getTile(e,t,n,r){const i=r.pixelRatio,o=r.viewState.projection,s=this.getLayer();let a=s.getSource().getTile(e,t,n,i,o);return 3==a.getState()&&s.getUseInterimTilesOnError()&&s.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(a)||(a=a.getInterimTile()),a}getData(e){const t=this.frameState;if(!t)return null;const n=this.getLayer(),r=Af(t.pixelToCoordinateTransform,e.slice()),i=n.getExtent();if(i&&!Gh(i,r))return null;const o=t.pixelRatio,s=t.viewState.projection,a=t.viewState,l=n.getRenderSource(),u=l.getTileGridForProjection(a.projection),c=l.getTilePixelRatio(t.pixelRatio);for(let e=u.getZForResolution(a.resolution);e>=u.getMinZoom();--e){const t=u.getTileCoordForCoordAndZ(r,e),n=l.getTile(e,t[1],t[2],o,s);if(!(n instanceof Jm||n instanceof ag)||n instanceof ag&&4===n.getState())return null;if(2!==n.getState())continue;const i=u.getOrigin(e),d=hg(u.getTileSize(e)),h=u.getResolution(e),p=Math.floor(c*((r[0]-i[0])/h-t[1]*d[0])),f=Math.floor(c*((i[1]-r[1])/h-t[2]*d[1])),m=Math.round(c*l.getGutterForProjection(a.projection));return this.getImageData(n.getImage(),p+m,f+m)}return null}loadedTileCallback(e,t,n){return!!this.isDrawableTile(n)&&super.loadedTileCallback(e,t,n)}prepareFrame(e){return!!this.getLayer().getSource()}renderFrame(e,t){const n=e.layerStatesArray[e.layerIndex],r=e.viewState,i=r.projection,o=r.resolution,s=r.center,a=r.rotation,l=e.pixelRatio,u=this.getLayer(),c=u.getSource(),d=c.getRevision(),h=c.getTileGridForProjection(i),p=h.getZForResolution(o,c.zDirection),f=h.getResolution(p);let m=e.extent;const g=e.viewState.resolution,_=c.getTilePixelRatio(l),y=Math.round(pp(m)/g*l),v=Math.round(up(m)/g*l),b=n.extent&&Yp(n.extent,i);b&&(m=cp(m,Yp(n.extent,i)));const x=f*y/2/_,w=f*v/2/_,k=[s[0]-x,s[1]-w,s[0]+x,s[1]+w],C=h.getTileRangeForExtentAndZ(m,p),S={};S[p]={};const A=this.createLoadedTileFinder(c,i,S),E=this.tmpExtent,M=this.tmpTileRange_;this.newTiles_=!1;const T=a?lp(r.center,g,a,e.size):void 0;for(let t=C.minX;t<=C.maxX;++t)for(let r=C.minY;r<=C.maxY;++r){if(a&&!h.tileCoordIntersectsViewport([p,t,r],T))continue;const i=this.getTile(p,t,r,e);if(this.isDrawableTile(i)){const t=Gd(this);if(2==i.getState()){S[p][i.tileCoord.toString()]=i;let e=i.inTransition(t);e&&1!==n.opacity&&(i.endTransition(t),e=!1),this.newTiles_||!e&&this.renderedTiles.includes(i)||(this.newTiles_=!0)}if(1===i.getAlpha(t,e.time))continue}const o=h.getTileCoordChildTileRange(i.tileCoord,M,E);let s=!1;o&&(s=A(p+1,o)),s||h.forEachTileCoordParentTileRange(i.tileCoord,A,M,E)}const P=f/o*l/_;Mf(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/l,1/l,a,-y/2,-v/2);const R=Rf(this.pixelTransform);this.useContainer(t,R,this.getBackground(e));const I=this.context,L=I.canvas;Tf(this.inversePixelTransform,this.pixelTransform),Mf(this.tempTransform,y/2,v/2,P,P,0,-y/2,-v/2),L.width!=y||L.height!=v?(L.width=y,L.height=v):this.containerReused||I.clearRect(0,0,y,v),b&&this.clipUnrotated(I,e,b),c.getInterpolate()||(I.imageSmoothingEnabled=!1),this.preRender(I,e),this.renderedTiles.length=0;let O,z,F,D=Object.keys(S).map(Number);D.sort(_d),1!==n.opacity||this.containerReused&&!c.getOpaque(e.viewState.projection)?(O=[],z=[]):D=D.reverse();for(let t=D.length-1;t>=0;--t){const n=D[t],r=c.getTilePixelSize(n,l,i),o=h.getResolution(n)/f,s=r[0]*o*P,a=r[1]*o*P,u=h.getTileCoordForCoordAndZ(dp(k),n),d=h.getTileCoordExtent(u),m=Af(this.tempTransform,[_*(d[0]-k[0])/f,_*(k[3]-d[3])/f]),g=_*c.getGutterForProjection(i),y=S[n];for(const t in y){const r=y[t],i=r.tileCoord,o=u[1]-i[1],l=Math.round(m[0]-(o-1)*s),d=u[2]-i[2],h=Math.round(m[1]-(d-1)*a),f=Math.round(m[0]-o*s),_=Math.round(m[1]-d*a),v=l-f,b=h-_,x=p===n,w=x&&1!==r.getAlpha(Gd(this),e.time);let k=!1;if(!w)if(O){F=[f,_,f+v,_,f+v,_+b,f,_+b];for(let e=0,t=O.length;e<t;++e)if(p!==n&&n<z[e]){const t=O[e];fp([f,_,f+v,_+b],[t[0],t[3],t[4],t[7]])&&(k||(I.save(),k=!0),I.beginPath(),I.moveTo(F[0],F[1]),I.lineTo(F[2],F[3]),I.lineTo(F[4],F[5]),I.lineTo(F[6],F[7]),I.moveTo(t[6],t[7]),I.lineTo(t[4],t[5]),I.lineTo(t[2],t[3]),I.lineTo(t[0],t[1]),I.clip())}O.push(F),z.push(n)}else I.clearRect(f,_,v,b);this.drawTileImage(r,e,f,_,v,b,g,x),O&&!w?(k&&I.restore(),this.renderedTiles.unshift(r)):this.renderedTiles.push(r),this.updateUsedTiles(e.usedTiles,c,r)}}return this.renderedRevision=d,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!$h(this.renderedExtent_,k),this.renderedExtent_=k,this.renderedPixelRatio=l,this.renderedProjection=i,this.manageTilePyramid(e,c,h,l,i,m,p,u.getPreload()),this.scheduleExpireCache(e,c),this.postRender(I,e),n.extent&&I.restore(),I.imageSmoothingEnabled=!0,R!==L.style.transform&&(L.style.transform=R),this.container}drawTileImage(e,t,n,r,i,o,s,a){const l=this.getTileImage(e);if(!l)return;const u=Gd(this),c=t.layerStatesArray[t.layerIndex],d=c.opacity*(a?e.getAlpha(u,t.time):1),h=d!==this.context.globalAlpha;h&&(this.context.save(),this.context.globalAlpha=d),this.context.drawImage(l,s,s,l.width-2*s,l.height-2*s,n,r,i,o),h&&this.context.restore(),d!==c.opacity?t.animate=!0:a&&e.endTransition(u)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}scheduleExpireCache(e,t){if(t.canExpireCache()){const n=function(e,t,n){const r=Gd(e);r in n.usedTiles&&e.expireCache(n.viewState.projection,n.usedTiles[r])}.bind(null,t);e.postRenderFunctions.push(n)}}updateUsedTiles(e,t,n){const r=Gd(t);r in e||(e[r]={}),e[r][n.getKey()]=!0}manageTilePyramid(e,t,n,r,i,o,s,a,l){const u=Gd(t);u in e.wantedTiles||(e.wantedTiles[u]={});const c=e.wantedTiles[u],d=e.tileQueue,h=n.getMinZoom(),p=e.viewState.rotation,f=p?lp(e.viewState.center,e.viewState.resolution,p,e.size):void 0;let m,g,_,y,v,b,x=0;for(b=h;b<=s;++b)for(g=n.getTileRangeForExtentAndZ(o,b,g),_=n.getResolution(b),y=g.minX;y<=g.maxX;++y)for(v=g.minY;v<=g.maxY;++v)p&&!n.tileCoordIntersectsViewport([b,y,v],f)||(s-b<=a?(++x,m=t.getTile(b,y,v,r,i),0==m.getState()&&(c[m.getKey()]=!0,d.isKeyQueued(m.getKey())||d.enqueue([m,u,n.getTileCoordCenter(m.tileCoord),_])),void 0!==l&&l(m)):t.useTile(b,y,v,i));t.updateCacheSize(x,i)}},fg=class extends Rm{constructor(e){super(e)}createRenderer(){return new pg(this)}},mg=class{constructor(e){this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const n=this.entries_[e];return Xd(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(e){const t=this.entries_[e];return Xd(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t,n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e}getValues(){const e=new Array(this.count_);let t,n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){if(this.containsKey(e))return this.entries_[e].value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){Xd(!(e in this.entries_),16);const n={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[e]=n,++this.count_}setSize(e){this.highWaterMark=e}};function gg(e,t,n,r){return void 0!==r?(r[0]=e,r[1]=t,r[2]=n,r):[e,t,n]}function _g(e,t,n){return e+"/"+t+"/"+n}function yg(e){return _g(e[0],e[1],e[2])}function vg(e){return e.split("/").map(Number)}const bg=class extends mg{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(e){for(;this.canExpireCache()&&!(this.peekLast().getKey()in e);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const e=vg(this.peekFirstKey())[0];this.forEach((t=>{t.tileCoord[0]!==e&&(this.remove(yg(t.tileCoord)),t.release())}))}};function xg(e){return e?Array.isArray(e)?function(t){return e}:"function"==typeof e?e:function(t){return[e]}:null}const wg=class extends Wd{constructor(e){super(),this.projection=zp(e.projection),this.attributions_=xg(e.attributions),this.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,this.loading=!1,this.state_=void 0!==e.state?e.state:"ready",this.wrapX_=void 0!==e.wrapX&&e.wrapX,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const t=this;this.viewPromise_=new Promise((function(e,n){t.viewResolver=e,t.viewRejector=n}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=xg(e),this.changed()}setState(e){this.state_=e,this.changed()}},kg=[0,0,0],Cg=class{constructor(e){let t;if(this.minZoom=void 0!==e.minZoom?e.minZoom:0,this.resolutions_=e.resolutions,Xd(function(e,t,n){const r=function(e,t){return t-e}||_d;return e.every((function(t,n){if(0===n)return!0;const i=r(e[n-1],t);return!(i>0||0===i)}))}(this.resolutions_),17),!e.origins)for(let e=0,n=this.resolutions_.length-1;e<n;++e)if(t){if(this.resolutions_[e]/this.resolutions_[e+1]!==t){t=void 0;break}}else t=this.resolutions_[e]/this.resolutions_[e+1];this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==e.origin?e.origin:null,this.origins_=null,void 0!==e.origins&&(this.origins_=e.origins,Xd(this.origins_.length==this.resolutions_.length,20));const n=e.extent;void 0===n||this.origin_||this.origins_||(this.origin_=dp(n)),Xd(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==e.tileSizes&&(this.tileSizes_=e.tileSizes,Xd(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==e.tileSize?e.tileSize:this.tileSizes_?null:bh,Xd(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==n?n:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==e.sizes?this.fullTileRanges_=e.sizes.map((function(e,t){const r=new cg(Math.min(0,e[0]),Math.max(e[0]-1,-1),Math.min(0,e[1]),Math.max(e[1]-1,-1));if(n){const e=this.getTileRangeForExtentAndZ(n,t);r.minX=Math.max(e.minX,r.minX),r.maxX=Math.min(e.maxX,r.maxX),r.minY=Math.max(e.minY,r.minY),r.maxY=Math.min(e.maxY,r.maxY)}return r}),this):n&&this.calculateTileRanges_(n)}forEachTileCoord(e,t,n){const r=this.getTileRangeForExtentAndZ(e,t);for(let e=r.minX,i=r.maxX;e<=i;++e)for(let i=r.minY,o=r.maxY;i<=o;++i)n([t,e,i])}forEachTileCoordParentTileRange(e,t,n,r){let i,o,s,a=null,l=e[0]-1;for(2===this.zoomFactor_?(o=e[1],s=e[2]):a=this.getTileCoordExtent(e,r);l>=this.minZoom;){if(2===this.zoomFactor_?(o=Math.floor(o/2),s=Math.floor(s/2),i=ug(o,o,s,s,n)):i=this.getTileRangeForExtentAndZ(a,l,n),t(l,i))return!0;--l}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,n){if(e[0]<this.maxZoom){if(2===this.zoomFactor_){const n=2*e[1],r=2*e[2];return ug(n,n+1,r,r+1,t)}const r=this.getTileCoordExtent(e,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,e[0]+1,t)}return null}getTileRangeForTileCoordAndZ(e,t,n){if(t>this.maxZoom||t<this.minZoom)return null;const r=e[0],i=e[1],o=e[2];if(t===r)return ug(i,o,i,o,n);if(this.zoomFactor_){const e=Math.pow(this.zoomFactor_,t-r),s=Math.floor(i*e),a=Math.floor(o*e);return t<r?ug(s,s,a,a,n):ug(s,Math.floor(e*(i+1))-1,a,Math.floor(e*(o+1))-1,n)}const s=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(s,t,n)}getTileRangeForExtentAndZ(e,t,n){this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,kg);const r=kg[1],i=kg[2];return this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,kg),ug(r,kg[1],i,kg[2],n)}getTileCoordCenter(e){const t=this.getOrigin(e[0]),n=this.getResolution(e[0]),r=hg(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*r[0]*n,t[1]-(e[2]+.5)*r[1]*n]}getTileCoordExtent(e,t){const n=this.getOrigin(e[0]),r=this.getResolution(e[0]),i=hg(this.getTileSize(e[0]),this.tmpSize_),o=n[0]+e[1]*i[0]*r,s=n[1]-(e[2]+1)*i[1]*r;return Uh(o,s,o+i[0]*r,s+i[1]*r,t)}getTileCoordForCoordAndResolution(e,t,n){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,n)}getTileCoordForXYAndResolution_(e,t,n,r,i){const o=this.getZForResolution(n),s=n/this.getResolution(o),a=this.getOrigin(o),l=hg(this.getTileSize(o),this.tmpSize_);let u=s*(e-a[0])/n/l[0],c=s*(a[1]-t)/n/l[1];return r?(u=fh(u,5)-1,c=fh(c,5)-1):(u=ph(u,5),c=ph(c,5)),gg(o,u,c,i)}getTileCoordForXYAndZ_(e,t,n,r,i){const o=this.getOrigin(n),s=this.getResolution(n),a=hg(this.getTileSize(n),this.tmpSize_);let l=(e-o[0])/s/a[0],u=(o[1]-t)/s/a[1];return r?(l=fh(l,5)-1,u=fh(u,5)-1):(l=ph(l,5),u=ph(u,5)),gg(n,l,u,i)}getTileCoordForCoordAndZ(e,t,n){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,n)}getTileCoordResolution(e){return this.resolutions_[e[0]]}getTileSize(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}getFullTileRange(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}getZForResolution(e,t){return sh(yd(this.resolutions_,e,t||0),this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,t){return hm(t,0,t.length,2,this.getTileCoordExtent(e))}calculateTileRanges_(e){const t=this.resolutions_.length,n=new Array(t);for(let r=this.minZoom;r<t;++r)n[r]=this.getTileRangeForExtentAndZ(e,r);this.fullTileRanges_=n}};function Sg(e){let t=e.getDefaultTileGrid();return t||(t=function(e,t,n,r){return function(e,t,n,r){r=void 0!==r?r:"top-left";const i=Eg(e,undefined,n);return new Cg({extent:e,origin:sp(e,r),resolutions:i,tileSize:n})}(Mg(e),0,void 0,void 0)}(e),e.setDefaultTileGrid(t)),t}function Ag(e){const t=e||{},n=t.extent||zp("EPSG:3857").getExtent(),r={extent:n,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:Eg(n,t.maxZoom,t.tileSize,t.maxResolution)};return new Cg(r)}function Eg(e,t,n,r){t=void 0!==t?t:vh,n=hg(void 0!==n?n:bh);const i=up(e),o=pp(e);r=r>0?r:Math.max(o/n[0],i/n[1]);const s=t+1,a=new Array(s);for(let e=0;e<s;++e)a[e]=r/Math.pow(2,e);return a}function Mg(e){let t=(e=zp(e)).getExtent();if(!t){const n=180*xh.degrees/e.getMetersPerUnit();t=Uh(-n,-n,n,n)}return t}class Tg extends fd{constructor(e,t){super(e),this.tile=t}}const Pg=class extends wg{constructor(e){super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==e.opaque&&e.opaque,this.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,this.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;this.tileGrid&&hg(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new bg(e.cacheSize||0),this.tmpSize=[0,0],this.key_=e.key||"",this.tileOptions={transition:e.transition,interpolate:e.interpolate},this.zDirection=e.zDirection?e.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(e,t){const n=this.getTileCacheForProjection(e);n&&n.expireCache(t)}forEachLoadedTile(e,t,n,r){const i=this.getTileCacheForProjection(e);if(!i)return!1;let o,s,a,l=!0;for(let e=n.minX;e<=n.maxX;++e)for(let u=n.minY;u<=n.maxY;++u)s=_g(t,e,u),a=!1,i.containsKey(s)&&(o=i.get(s),a=2===o.getState(),a&&(a=!1!==r(o))),a||(l=!1);return l}getGutterForProjection(e){return 0}getKey(){return this.key_}setKey(e){this.key_!==e&&(this.key_=e,this.changed())}getOpaque(e){return this.opaque_}getResolutions(e){const t=e?this.getTileGridForProjection(e):this.tileGrid;return t?t.getResolutions():null}getTile(e,t,n,r,i){return Bd()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:Sg(e)}getTileCacheForProjection(e){const t=this.getProjection();return Xd(null===t||qp(t,e),68),this.tileCache}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,t,n){const r=this.getTileGridForProjection(n),i=this.getTilePixelRatio(t),o=hg(r.getTileSize(e),this.tmpSize);return 1==i?o:(s=o,a=i,void 0===(l=this.tmpSize)&&(l=[0,0]),l[0]=s[0]*a+.5|0,l[1]=s[1]*a+.5|0,l);var s,a,l}getTileCoordForTileUrlFunction(e,t){t=void 0!==t?t:this.getProjection();const n=this.getTileGridForProjection(t);return this.getWrapX()&&t.isGlobal()&&(e=function(e,t,n){const r=t[0],i=e.getTileCoordCenter(t),o=Mg(n);if(!Gh(o,i)){const t=pp(o),n=Math.ceil((o[0]-i[0])/t);return i[0]+=t*n,e.getTileCoordForCoordAndZ(i,r)}return t}(n,e,t)),function(e,t){const n=e[0],r=e[1],i=e[2];if(t.getMinZoom()>n||n>t.getMaxZoom())return!1;const o=t.getFullTileRange(n);return!o||o.containsXY(r,i)}(e,n)?e:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(e,t){const n=this.getTileCacheForProjection(t);e>n.highWaterMark&&(n.highWaterMark=e)}useTile(e,t,n,r){}};function Rg(e,t){const n=/\{z\}/g,r=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){if(s)return e.replace(n,s[0].toString()).replace(r,s[1].toString()).replace(i,s[2].toString()).replace(o,(function(){const e=s[0],n=t.getFullTileRange(e);return Xd(n,55),(n.getHeight()-s[2]-1).toString()}))}}function Ig(e,t){const n=e.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=Rg(e[i],t);return function(e){return 1===e.length?e[0]:function(t,n,r){if(!t)return;const i=function(e){return(e[1]<<e[0])+e[2]}(t),o=ch(i,e.length);return e[o](t,n,r)}}(r)}function Lg(e){const t=[];let n=/\{([a-z])-([a-z])\}/.exec(e);if(n){const r=n[1].charCodeAt(0),i=n[2].charCodeAt(0);let o;for(o=r;o<=i;++o)t.push(e.replace(n[0],String.fromCharCode(o)));return t}if(n=/\{(\d+)-(\d+)\}/.exec(e),n){const r=parseInt(n[2],10);for(let i=parseInt(n[1],10);i<=r;i++)t.push(e.replace(n[0],i.toString()));return t}return t.push(e),t}class Og extends Pg{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===Og.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.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(e){const t=e.target,n=Gd(t),r=t.getState();let i;1==r?(this.tileLoadingKeys_[n]=!0,i="tileloadstart"):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],i=3==r?"tileloaderror":2==r?"tileloadend":void 0),null!=i&&this.dispatchEvent(new Tg(i,t))}setTileLoadFunction(e){this.tileCache.clear(),this.tileLoadFunction=e,this.changed()}setTileUrlFunction(e,t){this.tileUrlFunction=e,this.tileCache.pruneExceptNewestZ(),void 0!==t?this.setKey(t):this.changed()}setUrl(e){const t=Lg(e);this.urls=t,this.setUrls(t)}setUrls(e){this.urls=e;const t=e.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Ig(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,n){}useTile(e,t,n){const r=_g(e,t,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const zg=Og;function Fg(e,t){e.getImage().src=t}const Dg=class extends zg{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Fg,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:void 0===e.interpolate||e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,this.tileClass=void 0!==e.tileClass?e.tileClass:Jm,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1}expireCache(e,t){const n=this.getTileCacheForProjection(e);this.tileCache.expireCache(this.tileCache==n?t:{});for(const e in this.tileCacheForProjection){const r=this.tileCacheForProjection[e];r.expireCache(r==n?t:{})}}getGutterForProjection(e){return this.getProjection()&&e&&!qp(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getOpaque(e){return!(this.getProjection()&&e&&!qp(this.getProjection(),e))&&super.getOpaque(e)}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||qp(t,e)))return this.tileGrid;const n=Gd(e);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Sg(e)),this.tileGridForProjection[n]}getTileCacheForProjection(e){const t=this.getProjection();if(!t||qp(t,e))return this.tileCache;const n=Gd(e);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new bg(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}createTile_(e,t,n,r,i,o){const s=[e,t,n],a=this.getTileCoordForTileUrlFunction(s,i),l=a?this.tileUrlFunction(a,r,i):void 0,u=new this.tileClass(s,void 0!==l?0:4,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(Md,this.handleTileChange.bind(this)),u}getTile(e,t,n,r,i){const o=this.getProjection();if(!o||!i||qp(o,i))return this.getTileInternal(e,t,n,r,o||i);const s=this.getTileCacheForProjection(i),a=[e,t,n];let l;const u=yg(a);s.containsKey(u)&&(l=s.get(u));const c=this.getKey();if(l&&l.key==c)return l;const d=this.getTileGridForProjection(o),h=this.getTileGridForProjection(i),p=this.getTileCoordForTileUrlFunction(a,i),f=new ag(o,d,i,h,a,p,this.getTilePixelRatio(r),this.getGutter(),((e,t,n,r)=>this.getTileInternal(e,t,n,r,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return f.key=c,l?(f.interimTile=l,f.refreshInterimChain(),s.replace(u,f)):s.set(u,f),f}getTileInternal(e,t,n,r,i){let o=null;const s=_g(e,t,n),a=this.getKey();if(this.tileCache.containsKey(s)){if(o=this.tileCache.get(s),o.key!=a){const l=o;o=this.createTile_(e,t,n,r,i,a),0==l.getState()?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(e,t,n,r,i,a),this.tileCache.set(s,o);return o}setRenderReprojectionEdges(e){if(this.renderReprojectionEdges_!=e){this.renderReprojectionEdges_=e;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(e,t){const n=zp(e);if(n){const e=Gd(n);e in this.tileGridForProjection||(this.tileGridForProjection[e]=t)}}clear(){super.clear();for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}},jg=class extends Dg{constructor(e){const t=void 0!==(e=e||{}).projection?e.projection:"EPSG:3857",n=void 0!==e.tileGrid?e.tileGrid:Ag({extent:Mg(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,opaque:e.opaque,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=void 0!==e.gutter?e.gutter:0}getGutter(){return this.gutter_}};class Ng{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=hg(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Ng({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,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 Bd()}getImage(e){return Bd()}getHitDetectionImage(){return Bd()}getPixelRatio(e){return 1}getImageState(){return Bd()}getImageSize(){return Bd()}getOrigin(){return Bd()}getSize(){return Bd()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=hg(e)}listenImageChange(e){Bd()}load(){Bd()}unlistenImageChange(e){Bd()}}const Bg=Ng;function qg(e){return Array.isArray(e)?Bm(e):e}const Gg="ol-hidden",Vg="ol-unselectable",Wg="ol-control",Hg="ol-collapsed",Ug=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"),Zg=["style","variant","weight","size","lineHeight","family"],Xg=function(e){const t=e.match(Ug);if(!t)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let e=0,r=Zg.length;e<r;++e){const r=t[e+1];void 0!==r&&(n[Zg[e]]=r)}return n.families=n.family.split(/,\s?/),n},Kg="10px sans-serif",$g="#000",Yg="round",Qg=[],Jg="round",e_="#000",t_="center",n_="middle",r_=[0,0,0,0],i_=new Wd;let o_,s_=null;const a_={},l_=function(){const e="32px ",t=["monospace","serif"],n=t.length,r="wmytzilWMYTZIL@#/&?$%10";let i,o;function s(i,s,a){let l=!0;for(let u=0;u<n;++u){const n=t[u];if(o=d_(i+" "+s+" "+e+n,r),a!=n){const t=d_(i+" "+s+" "+e+a+","+n,r);l=l&&t!=o}}return!!l}function a(){let e=!0;const t=i_.getKeys();for(let n=0,r=t.length;n<r;++n){const r=t[n];i_.get(r)<100&&(s.apply(this,r.split("\n"))?(Sd(a_),s_=null,o_=void 0,i_.set(r,100)):(i_.set(r,i_.get(r)+1,!0),e=!1))}e&&(clearInterval(i),i=void 0)}return function(e){const t=Xg(e);if(!t)return;const n=t.families;for(let e=0,r=n.length;e<r;++e){const r=n[e],o=t.style+"\n"+t.weight+"\n"+r;void 0===i_.get(o)&&(i_.set(o,100,!0),s(t.style,t.weight,r)||(i_.set(o,0,!0),void 0===i&&(i=setInterval(a,32))))}}}(),u_=function(){let e;return function(t){let n=a_[t];if(null==n){if(vf){const e=Xg(t),r=c_(t,"Žg");n=(isNaN(Number(e.lineHeight))?1.2:Number(e.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else e||(e=document.createElement("div"),e.innerHTML="M",e.style.minHeight="0",e.style.maxHeight="none",e.style.height="auto",e.style.padding="0",e.style.border="none",e.style.position="absolute",e.style.display="block",e.style.left="-99999px"),e.style.font=t,document.body.appendChild(e),n=e.offsetHeight,document.body.removeChild(e);a_[t]=n}return n}}();function c_(e,t){return s_||(s_=qm(1,1)),e!=o_&&(s_.font=e,o_=s_.font),s_.measureText(t)}function d_(e,t){return c_(e,t).width}function h_(e,t,n){if(t in n)return n[t];const r=t.split("\n").reduce(((t,n)=>Math.max(t,d_(e,n))),0);return n[t]=r,r}class p_ extends Bg{constructor(e){super({opacity:1,rotateWithView:void 0!==e.rotateWithView&&e.rotateWithView,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0],declutterMode:e.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const e=this.getScale(),t=new p_({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(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_;if(!e)return null;const t=this.getDisplacement(),n=this.getScaleArray();return[e[0]/2-t[0]/n[0],e[1]/2+t[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(e){let t=this.canvas_[e];if(!t){const n=this.renderOptions_,r=qm(n.size*e,n.size*e);this.draw_(n,r,e),t=r.canvas,this.canvas_[e]=t}return t}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return 2}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(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,n){if(0===t||this.points_===1/0||"bevel"!==e&&"miter"!==e)return t;let r=this.radius_,i=void 0===this.radius2_?r:this.radius2_;if(r<i){const e=r;r=i,i=e}const o=void 0===this.radius2_?this.points_:2*this.points_,s=2*Math.PI/o,a=i*Math.sin(s),l=r-Math.sqrt(i*i-a*a),u=Math.sqrt(a*a+l*l),c=u/a;if("miter"===e&&c<=n)return c*t;const d=t/2/c,h=t/2*(l/u),p=Math.sqrt((r+d)*(r+d)+h*h)-r;if(void 0===this.radius2_||"bevel"===e)return 2*p;const f=r*Math.sin(s),m=i-Math.sqrt(r*r-f*f),g=Math.sqrt(f*f+m*m)/f;if(g<=n){const e=g*t/2-i-r;return 2*Math.max(p,e)}return 2*p}createRenderOptions(){let e,t=Jg,n=0,r=null,i=0,o=0;this.stroke_&&(e=this.stroke_.getColor(),null===e&&(e=e_),e=qg(e),o=this.stroke_.getWidth(),void 0===o&&(o=1),r=this.stroke_.getLineDash(),i=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),void 0===t&&(t=Jg),n=this.stroke_.getMiterLimit(),void 0===n&&(n=10));const s=this.calculateLineJoinSize_(t,o,n),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:e,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:r,lineDashOffset:i,lineJoin:t,miterLimit:n}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.canvas_={},this.size_=[e,e]}draw_(e,t,n){if(t.scale(n,n),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){let e=this.fill_.getColor();null===e&&(e=$g),t.fillStyle=qg(e),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}createHitDetectionCanvas_(e){if(this.fill_){let t=this.fill_.getColor(),n=0;if("string"==typeof t&&(t=jm(t)),null===t?n=1:Array.isArray(t)&&(n=4===t.length?t[3]:1),0===n){const t=qm(e.size,e.size);this.hitDetectionCanvas_=t.canvas,this.drawHitDetectionCanvas_(e,t)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(e){let t=this.points_;const n=this.radius_;if(t===1/0)e.arc(0,0,n,0,2*Math.PI);else{const r=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(t*=2);const i=this.angle_-Math.PI/2,o=2*Math.PI/t;for(let s=0;s<t;s++){const t=i+s*o,a=s%2==0?n:r;e.lineTo(a*Math.cos(t),a*Math.sin(t))}e.closePath()}}drawHitDetectionCanvas_(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=$g,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}}const f_=p_;class m_ extends f_{constructor(e){super({points:1/0,fill:(e=e||{radius:5}).fill,radius:e.radius,stroke:e.stroke,scale:void 0!==e.scale?e.scale:1,rotation:void 0!==e.rotation?e.rotation:0,rotateWithView:void 0!==e.rotateWithView&&e.rotateWithView,displacement:void 0!==e.displacement?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){const e=this.getScale(),t=new m_({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}setRadius(e){this.radius_=e,this.render()}}const g_=m_;class __{constructor(e){e=e||{},this.color_=void 0!==e.color?e.color:null}clone(){const e=this.getColor();return new __({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){this.color_=e}}const y_=__;function v_(e,t,n){return t+":"+e+":"+(n?Fm(n):"null")}const b_=new class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const t in this.cache_){const n=this.cache_[t];0!=(3&e++)||n.hasListener()||(delete this.cache_[t],--this.cacheSize_)}}}get(e,t,n){const r=v_(e,t,n);return r in this.cache_?this.cache_[r]:null}set(e,t,n,r){const i=v_(e,t,n);this.cache_[i]=r,++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}};let x_=null;class w_ extends Ed{constructor(e,t,n,r,i,o){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=i,this.size_=n,this.src_=t,this.tainted_}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&2===this.imageState_){x_||(x_=qm(1,1,void 0,{willReadFrequently:!0})),x_.drawImage(this.image_,0,0);try{x_.getImageData(0,0,1,1),this.tainted_=!1}catch(e){x_=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(Md)}handleImageError_(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=2,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],t=this.size_[1],n=qm(e,t);n.fillRect(0,0,e,t),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(0===this.imageState_){this.image_||this.initializeImage_(),this.imageState_=1;try{this.image_.src=this.src_}catch(e){this.handleImageError_()}this.unlisten_=Qm(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||2!==this.imageState_)return;const t=this.image_,n=document.createElement("canvas");n.width=Math.ceil(t.width*e),n.height=Math.ceil(t.height*e);const r=n.getContext("2d");r.scale(e,e),r.drawImage(t,0,0),r.globalCompositeOperation="multiply",r.fillStyle=Fm(this.color_),r.fillRect(0,0,n.width/e,n.height/e),r.globalCompositeOperation="destination-in",r.drawImage(t,0,0),this.canvas_[e]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function k_(e,t,n,r){return void 0!==n&&void 0!==r?[n/e,r/t]:void 0!==n?n/e:void 0!==r?r/t:1}class C_ extends Bg{constructor(e){const t=void 0!==(e=e||{}).opacity?e.opacity:1,n=void 0!==e.rotation?e.rotation:0,r=void 0!==e.scale?e.scale:1,i=void 0!==e.rotateWithView&&e.rotateWithView;super({opacity:t,rotation:n,scale:r,displacement:void 0!==e.displacement?e.displacement:[0,0],rotateWithView:i,declutterMode:e.declutterMode}),this.anchor_=void 0!==e.anchor?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==e.anchorOrigin?e.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==e.anchorXUnits?e.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==e.anchorYUnits?e.anchorYUnits:"fraction",this.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null;const o=void 0!==e.img?e.img:null;this.imgSize_=e.imgSize;let s=e.src;Xd(!(void 0!==s&&o),4),Xd(!o||o&&this.imgSize_,5),void 0!==s&&0!==s.length||!o||(s=o.src||Gd(o)),Xd(void 0!==s&&s.length>0,6),Xd(!((void 0!==e.width||void 0!==e.height)&&void 0!==e.scale),69);const a=void 0!==e.src?0:2;if(this.color_=void 0!==e.color?jm(e.color):null,this.iconImage_=function(e,t,n,r,i,o){let s=b_.get(t,r,o);return s||(s=new w_(e,t,n,r,i,o),b_.set(t,r,o,s)),s}(o,s,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,a,this.color_),this.offset_=void 0!==e.offset?e.offset:[0,0],this.offsetOrigin_=void 0!==e.offsetOrigin?e.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==e.size?e.size:null,void 0!==e.width||void 0!==e.height){let t,n;if(e.size)[t,n]=e.size;else{const r=this.getImage(1);if(!(r instanceof HTMLCanvasElement||r.src&&r.complete)){this.initialOptions_=e;const t=()=>{if(this.unlistenImageChange(t),!this.initialOptions_)return;const n=this.iconImage_.getSize();this.setScale(k_(n[0],n[1],e.width,e.height))};return void this.listenImageChange(t)}t=r.width,n=r.height}void 0!==t&&this.setScale(k_(t,n,e.width,e.height))}}clone(){let e,t,n;return this.initialOptions_?(t=this.initialOptions_.width,n=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new C_({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_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:n,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const t=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!t)return null;e=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(e[0]*=t[0]),"fraction"==this.anchorYUnits_&&(e[1]*=t[1])}if("top-left"!=this.anchorOrigin_){if(!t)return null;e===this.anchor_&&(e=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(e[0]=-e[0]+t[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(e[1]=-e[1]+t[1])}this.normalizedAnchor_=e}const t=this.getDisplacement(),n=this.getScaleArray();return[e[0]-t[0]/n[0],e[1]+t[1]/n[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if("top-left"!=this.offsetOrigin_){const t=this.getSize(),n=this.iconImage_.getSize();if(!t||!n)return null;e=e.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(e[0]=n[0]-t[0]-e[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(e[1]=n[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();return this.size_?this.size_[0]*e[0]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[0]*e[0]:void 0}getHeight(){const e=this.getScaleArray();return this.size_?this.size_[1]*e[1]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[1]*e[1]:void 0}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(Md,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(Md,e)}}const S_=C_;function A_(e,t,n,r,i,o,s){let a,l;const u=(n-t)/r;if(1===u)a=t;else if(2===u)a=t,l=i;else if(0!==u){let o=e[t],s=e[t+1],u=0;const c=[0];for(let i=t+r;i<n;i+=r){const t=e[i],n=e[i+1];u+=Math.sqrt((t-o)*(t-o)+(n-s)*(n-s)),c.push(u),o=t,s=n}const d=i*u,h=function(e,t,n){let r,i;n=n||_d;let o=0,s=e.length,a=!1;for(;o<s;)r=o+(s-o>>1),i=+n(e[r],t),i<0?o=r+1:(s=r,a=!i);return a?o:~o}(c,d);h<0?(l=(d-c[-h-2])/(c[-h-1]-c[-h-2]),a=t+(-h-2)*r):a=t+h*r}s=s>1?s:2,o=o||new Array(s);for(let t=0;t<s;++t)o[t]=void 0===a?NaN:void 0===l?e[a+t]:dh(e[a+t],e[a+r+t],l);return o}function E_(e,t,n,r,i,o){if(n==t)return null;let s;if(i<e[t+r-1])return o?(s=e.slice(t,t+r),s[r-1]=i,s):null;if(e[n-1]<i)return o?(s=e.slice(n-r,n),s[r-1]=i,s):null;if(i==e[t+r-1])return e.slice(t,t+r);let a=t/r,l=n/r;for(;a<l;){const t=a+l>>1;i<e[(t+1)*r-1]?l=t:a=t+1}const u=e[a*r-1];if(i==u)return e.slice((a-1)*r,(a-1)*r+r);const c=(i-u)/(e[(a+1)*r-1]-u);s=[];for(let t=0;t<r-1;++t)s.push(dh(e[(a-1)*r+t],e[a*r+t],c));return s.push(i),s}function M_(e,t,n,r){const i=[];let o=[1/0,1/0,-1/0,-1/0];for(let s=0,a=n.length;s<a;++s){const a=n[s];o=Kh(e,t,a[0],r),i.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=a[a.length-1]}return i}const T_=[1,0,0,1,0,0];class P_{constructor(e,t,n,r,i){this.styleFunction,this.extent_,this.id_=i,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}get(e){return this.properties_[e]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?Xh(this.flatCoordinates_):Kh(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const e=op(this.getExtent());this.flatInteriorPoints_=lm(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const e=M_(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=um(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=A_(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const e=this.flatCoordinates_;let t=0;const n=this.ends_;for(let r=0,i=n.length;r<i;++r){const i=n[r],o=A_(e,t,i,2,.5);bd(this.flatMidpoints_,o),t=i}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(e){return this}simplifyTransformed(e,t){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(e){const t=(e=zp(e)).getExtent(),n=e.getWorldExtent();if(t&&n){const e=up(n)/up(t);Mf(T_,n[0],n[3],e,-e,0,0,0),If(this.flatCoordinates_,0,this.flatCoordinates_.length,2,T_,this.flatCoordinates_)}}getEnds(){return this.ends_}}P_.prototype.getEndss=P_.prototype.getEnds,P_.prototype.getFlatCoordinates=P_.prototype.getOrientedFlatCoordinates;const R_=P_;class I_{constructor(e){e=e||{},this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const e=this.getColor();return new I_({color:Array.isArray(e)?e.slice():e||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(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}const L_=I_;class O_{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=j_,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new O_({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){"function"==typeof e?this.geometryFunction_=e:"string"==typeof e?this.geometryFunction_=function(t){return t.get(e)}:e?void 0!==e&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=j_,this.geometry_=e}setZIndex(e){this.zIndex_=e}}let z_=null;function F_(e,t){if(!z_){const e=new y_({color:"rgba(255,255,255,0.4)"}),t=new L_({color:"#3399CC",width:1.25});z_=[new O_({image:new g_({fill:e,stroke:t,radius:5}),fill:e,stroke:t})]}return z_}function D_(){const e={},t=[255,255,255,1],n=[0,153,255,1];return e.Polygon=[new O_({fill:new y_({color:[255,255,255,.5]})})],e.MultiPolygon=e.Polygon,e.LineString=[new O_({stroke:new L_({color:t,width:5})}),new O_({stroke:new L_({color:n,width:3})})],e.MultiLineString=e.LineString,e.Circle=e.Polygon.concat(e.LineString),e.Point=[new O_({image:new g_({radius:6,fill:new y_({color:n}),stroke:new L_({color:t,width:1.5})}),zIndex:1/0})],e.MultiPoint=e.Point,e.GeometryCollection=e.Polygon.concat(e.LineString,e.Point),e}function j_(e){return e.getGeometry()}const N_=O_;class B_{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=hg(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new y_({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}clone(){const e=this.getScale();return new B_({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,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})}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_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=hg(void 0!==e?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}const q_=B_;class G_ extends zf{constructor(e){super(),this.geometries_=e||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Dd),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let e=0,t=this.geometries_.length;e<t;++e)this.changeEventsKeys_.push(zd(this.geometries_[e],Md,this.changed,this))}clone(){const e=new G_(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e}closestPointXY(e,t,n,r){if(r<qh(this.getExtent(),e,t))return r;const i=this.geometries_;for(let o=0,s=i.length;o<s;++o)r=i[o].closestPointXY(e,t,n,r);return r}containsXY(e,t){const n=this.geometries_;for(let r=0,i=n.length;r<i;++r)if(n[r].containsXY(e,t))return!0;return!1}computeExtent(e){Zh(e);const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)Yh(e,t[n].getExtent());return e}getGeometries(){return V_(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)t[n].getType()===this.getType()?e=e.concat(t[n].getGeometriesArrayRecursive()):e.push(t[n]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=[],n=this.geometries_;let r=!1;for(let i=0,o=n.length;i<o;++i){const o=n[i],s=o.getSimplifiedGeometry(e);t.push(s),s!==o&&(r=!0)}if(r){const e=new G_(null);return e.setGeometriesArray(t),e}return this.simplifiedGeometryMaxMinSquaredTolerance=e,this}getType(){return"GeometryCollection"}intersectsExtent(e){const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)if(t[n].intersectsExtent(e))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(e,t){const n=this.geometries_;for(let r=0,i=n.length;r<i;++r)n[r].rotate(e,t);this.changed()}scale(e,t,n){n||(n=op(this.getExtent()));const r=this.geometries_;for(let i=0,o=r.length;i<o;++i)r[i].scale(e,t,n);this.changed()}setGeometries(e){this.setGeometriesArray(V_(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)t[n].applyTransform(e);this.changed()}translate(e,t){const n=this.geometries_;for(let r=0,i=n.length;r<i;++r)n[r].translate(e,t);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function V_(e){const t=[];for(let n=0,r=e.length;n<r;++n)t.push(e[n].clone());return t}const W_=G_,H_=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let n=t.dataProjection?zp(t.dataProjection):this.readProjection(e);t.extent&&n&&"tile-pixels"===n.getUnits()&&(n=zp(n),n.setWorldExtent(t.extent)),t={dataProjection:n,featureProjection:t.featureProjection}}return this.adaptOptions(t)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)}getType(){return Bd()}readFeature(e,t){return Bd()}readFeatures(e,t){return Bd()}readGeometry(e,t){return Bd()}readProjection(e){return Bd()}writeFeature(e,t){return Bd()}writeFeatures(e,t){return Bd()}writeGeometry(e,t){return Bd()}};function U_(e,t,n){const r=n?zp(n.featureProjection):null,i=n?zp(n.dataProjection):null;let o;if(o=r&&i&&!qp(r,i)?(t?e.clone():e).transform(t?r:i,t?i:r):e,t&&n&&void 0!==n.decimals){const t=Math.pow(10,n.decimals),r=function(e){for(let n=0,r=e.length;n<r;++n)e[n]=Math.round(e[n]*t)/t;return e};o===e&&(o=e.clone()),o.applyTransform(r)}return o}function Z_(e){if("string"==typeof e){return JSON.parse(e)||null}return null!==e?e:null}const X_=class extends H_{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(Z_(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(Z_(e),this.getReadOptions(e,t))}readFeatureFromObject(e,t){return Bd()}readFeaturesFromObject(e,t){return Bd()}readGeometry(e,t){return this.readGeometryFromObject(Z_(e),this.getReadOptions(e,t))}readGeometryFromObject(e,t){return Bd()}readProjection(e){return this.readProjectionFromObject(Z_(e))}readProjectionFromObject(e){return Bd()}writeFeature(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}writeFeatureObject(e,t){return Bd()}writeFeatures(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}writeFeaturesObject(e,t){return Bd()}writeGeometry(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}writeGeometryObject(e,t){return Bd()}};function K_(e,t,n,r){let i=e[t],o=e[t+1],s=0;for(let a=t+r;a<n;a+=r){const t=e[a],n=e[a+1];s+=Math.sqrt((t-i)*(t-i)+(n-o)*(n-o)),i=t,o=n}return s}class $_ extends Df{constructor(e,t){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===t||Array.isArray(e[0])?this.setCoordinates(e,t):this.setFlatCoordinates(t,e)}appendCoordinate(e){this.flatCoordinates?bd(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()}clone(){const e=new $_(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<qh(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Nf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),qf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,n,r))}forEachSegment(e){return cm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,t){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(t=void 0!==t&&t,E_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return $f(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return A_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return K_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const t=[];return t.length=Uf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new $_(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return dm(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Wf(this.flatCoordinates,0,e,this.stride),this.changed()}}const Y_=$_;class Q_ extends Df{constructor(e,t,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,t);else if(void 0!==t&&n)this.setFlatCoordinates(t,e),this.ends_=n;else{let t=this.getLayout();const n=e,r=[],i=[];for(let e=0,o=n.length;e<o;++e){const o=n[e];0===e&&(t=o.getLayout()),bd(r,o.getFlatCoordinates()),i.push(r.length)}this.setFlatCoordinates(t,r),this.ends_=i}}appendLineString(e){this.flatCoordinates?bd(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new Q_(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<qh(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Bf(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Gf(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,n,r))}getCoordinateAtM(e,t,n){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(t=void 0!==t&&t,n=void 0!==n&&n,function(e,t,n,r,i,o,s){if(s)return E_(e,t,n[n.length-1],r,i,o);let a;if(i<e[r-1])return o?(a=e.slice(0,r),a[r-1]=i,a):null;if(e[e.length-1]<i)return o?(a=e.slice(e.length-r),a[r-1]=i,a):null;for(let o=0,s=n.length;o<s;++o){const s=n[o];if(t!=s){if(i<e[t+r-1])return null;if(i<=e[s-1])return E_(e,t,s,r,i,!1);t=s}}return null}(this.flatCoordinates,0,this.ends_,this.stride,e,t,n))}getCoordinates(){return Yf(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new Y_(this.flatCoordinates.slice(0===e?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,t=this.ends_,n=this.layout,r=[];let i=0;for(let o=0,s=t.length;o<s;++o){const s=t[o],a=new Y_(e.slice(i,s),n);r.push(a),i=s}return r}getFlatMidpoints(){const e=[],t=this.flatCoordinates;let n=0;const r=this.ends_,i=this.stride;for(let o=0,s=r.length;o<s;++o){const s=r[o];bd(e,A_(t,n,s,i,.5)),n=s}return e}getSimplifiedGeometryInternal(e){const t=[],n=[];return t.length=function(e,t,n,r,i,o,s,a){for(let l=0,u=n.length;l<u;++l){const u=n[l];s=Uf(e,t,u,r,i,o,s),a.push(s),t=u}return s}(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,n),new Q_(t,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(e){return function(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o){if(dm(e,t,n[o],r,i))return!0;t=n[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=Hf(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()}}const J_=Q_;class ey extends Df{constructor(e,t){super(),t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){this.flatCoordinates?bd(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()}clone(){const e=new ey(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){if(r<qh(this.getExtent(),e,t))return r;const i=this.flatCoordinates,o=this.stride;for(let s=0,a=i.length;s<a;s+=o){const a=lh(e,t,i[s],i[s+1]);if(a<r){r=a;for(let e=0;e<o;++e)n[e]=i[s+e];n.length=o}}return r}getCoordinates(){return $f(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return e<0||t<=e?null:new im(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,t=this.layout,n=this.stride,r=[];for(let i=0,o=e.length;i<o;i+=n){const o=new im(e.slice(i,i+n),t);r.push(o)}return r}getType(){return"MultiPoint"}intersectsExtent(e){const t=this.flatCoordinates,n=this.stride;for(let r=0,i=t.length;r<i;r+=n)if(Wh(e,t[r],t[r+1]))return!0;return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Wf(this.flatCoordinates,0,e,this.stride),this.changed()}}const ty=ey;class ny extends Df{constructor(e,t,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){let r=this.getLayout();const i=e,o=[],s=[];for(let e=0,t=i.length;e<t;++e){const t=i[e];0===e&&(r=t.getLayout());const n=o.length,a=t.getEnds();for(let e=0,t=a.length;e<t;++e)a[e]+=n;bd(o,t.getFlatCoordinates()),s.push(a)}t=r,e=o,n=s}void 0!==t&&n?(this.setFlatCoordinates(t,e),this.endss_=n):this.setCoordinates(e,t)}appendPolygon(e){let t;if(this.flatCoordinates){const n=this.flatCoordinates.length;bd(this.flatCoordinates,e.getFlatCoordinates()),t=e.getEnds().slice();for(let e=0,r=t.length;e<r;++e)t[e]+=n}else this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();this.endss_.push(t),this.changed()}clone(){const e=this.endss_.length,t=new Array(e);for(let n=0;n<e;++n)t[n]=this.endss_[n].slice();const n=new ny(this.flatCoordinates.slice(),this.layout,t);return n.applyProperties(this),n}closestPointXY(e,t,n,r){return r<qh(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o){const s=n[o];i=Bf(e,t,s,r,i),t=s[s.length-1]}return i}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(e,t,n,r,i,o,s,a,l,u,c){c=c||[NaN,NaN];for(let o=0,d=n.length;o<d;++o){const d=n[o];u=Gf(e,t,d,r,i,true,s,a,l,u,c),t=d[d.length-1]}return u}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,0,e,t,n,r))}containsXY(e,t){return function(e,t,n,r,i,o){if(0===n.length)return!1;for(let s=0,a=n.length;s<a;++s){const a=n[s];if(am(e,t,a,r,i,o))return!0;t=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}getArea(){return function(e,t,n,r){let i=0;for(let o=0,s=n.length;o<s;++o){const s=n[o];i+=em(e,t,s,r),t=s[s.length-1]}return i}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),ym(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,Qf(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=M_(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=um(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new ty(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;!function(e,t,n,r,i){for(let i=0,o=n.length;i<o;++i){const o=n[i];if(!gm(e,t,o,r,undefined))return!1;o.length&&(t=o[o.length-1])}return!0}(e,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=ym(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=e,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],n=[];return t.length=function(e,t,n,r,i,o,s,a){for(let l=0,u=n.length;l<u;++l){const u=n[l],c=[];s=Kf(e,t,u,r,i,o,s,c),a.push(c),t=u[u.length-1]}return s}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,n),new ny(t,"XY",n)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let t;if(0===e)t=0;else{const n=this.endss_[e-1];t=n[n.length-1]}const n=this.endss_[e].slice(),r=n[n.length-1];if(0!==t)for(let e=0,r=n.length;e<r;++e)n[e]-=t;return new bm(this.flatCoordinates.slice(t,r),this.layout,n)}getPolygons(){const e=this.layout,t=this.flatCoordinates,n=this.endss_,r=[];let i=0;for(let o=0,s=n.length;o<s;++o){const s=n[o].slice(),a=s[s.length-1];if(0!==i)for(let e=0,t=s.length;e<t;++e)s[e]-=i;const l=new bm(t.slice(i,a),e,s);r.push(l),i=a}return r}getType(){return"MultiPolygon"}intersectsExtent(e){return function(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o){const s=n[o];if(pm(e,t,s,r,i))return!0;t=s[s.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=function(e,t,n,r,i){i=i||[];let o=0;for(let s=0,a=n.length;s<a;++s){const a=Hf(e,t,n[s],r,i[o]);0===a.length&&(a[0]=t),i[o++]=a,t=a[a.length-1]}return i.length=o,i}(this.flatCoordinates,0,e,this.stride,this.endss_);if(0===n.length)this.flatCoordinates.length=0;else{const e=n[n.length-1];this.flatCoordinates.length=0===e.length?0:e[e.length-1]}this.changed()}}const ry=ny;function iy(e,t){if(!e)return null;let n;switch(e.type){case"Point":n=function(e){return new im(e.coordinates)}(e);break;case"LineString":n=function(e){return new Y_(e.coordinates)}(e);break;case"Polygon":n=function(e){return new bm(e.coordinates)}(e);break;case"MultiPoint":n=function(e){return new ty(e.coordinates)}(e);break;case"MultiLineString":n=function(e){return new J_(e.coordinates)}(e);break;case"MultiPolygon":n=function(e){return new ry(e.coordinates)}(e);break;case"GeometryCollection":n=function(e,t){const n=e.geometries.map((function(e){return iy(e,undefined)}));return new W_(n)}(e);break;default:throw new Error("Unsupported GeoJSON type: "+e.type)}return U_(n,!1,t)}function oy(e,t){const n=(e=U_(e,!0,t)).getType();let r;switch(n){case"Point":r=function(e,t){return{type:"Point",coordinates:e.getCoordinates()}}(e);break;case"LineString":r=function(e,t){return{type:"LineString",coordinates:e.getCoordinates()}}(e);break;case"Polygon":r=function(e,t){let n;return t&&(n=t.rightHanded),{type:"Polygon",coordinates:e.getCoordinates(n)}}(e,t);break;case"MultiPoint":r=function(e,t){return{type:"MultiPoint",coordinates:e.getCoordinates()}}(e);break;case"MultiLineString":r=function(e,t){return{type:"MultiLineString",coordinates:e.getCoordinates()}}(e);break;case"MultiPolygon":r=function(e,t){let n;return t&&(n=t.rightHanded),{type:"MultiPolygon",coordinates:e.getCoordinates(n)}}(e,t);break;case"GeometryCollection":r=function(e,t){delete(t=Object.assign({},t)).featureProjection;return{type:"GeometryCollection",geometries:e.getGeometriesArray().map((function(e){return oy(e,t)}))}}(e,t);break;case"Circle":r={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return r}const sy=class extends X_{constructor(e){e=e||{},super(),this.dataProjection=zp(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=zp(e.featureProjection)),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,t){let n=null;n="Feature"===e.type?e:{type:"Feature",geometry:e,properties:null};const r=iy(n.geometry,t),i=new $d;return this.geometryName_?i.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&i.setGeometryName(n.geometry_name),i.setGeometry(r),"id"in n&&i.setId(n.id),n.properties&&i.setProperties(n.properties,!0),i}readFeaturesFromObject(e,t){let n=null;if("FeatureCollection"===e.type){n=[];const r=e.features;for(let e=0,i=r.length;e<i;++e)n.push(this.readFeatureFromObject(r[e],t))}else n=[this.readFeatureFromObject(e,t)];return n}readGeometryFromObject(e,t){return iy(e,t)}readProjectionFromObject(e){const t=e.crs;let n;return t?"name"==t.type?n=zp(t.properties.name):"EPSG"===t.type?n=zp("EPSG:"+t.properties.code):Xd(!1,36):n=this.dataProjection,n}writeFeatureObject(e,t){t=this.adaptOptions(t);const n={type:"Feature",geometry:null,properties:null},r=e.getId();if(void 0!==r&&(n.id=r),!e.hasProperties())return n;const i=e.getProperties(),o=e.getGeometry();return o&&(n.geometry=oy(o,t),delete i[e.getGeometryName()]),Ad(i)||(n.properties=i),n}writeFeaturesObject(e,t){t=this.adaptOptions(t);const n=[];for(let r=0,i=e.length;r<i;++r)n.push(this.writeFeatureObject(e[r],t));return{type:"FeatureCollection",features:n}}writeGeometryObject(e,t){return oy(e,this.adaptOptions(t))}},ay=class extends Mm{constructor(e){super(e=e||{})}},ly=class extends $m{constructor(e){super(e),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(e){const t=e.layerStatesArray[e.layerIndex],n=e.pixelRatio,r=e.viewState,i=r.resolution,o=this.getLayer().getSource(),s=e.viewHints;let a=e.extent;if(void 0!==t.extent&&(a=cp(a,Yp(t.extent,r.projection))),!s[0]&&!s[1]&&!mp(a))if(o){const e=r.projection,t=o.getImage(a,i,n,e);t&&(this.loadImage(t)?this.image_=t:4===t.getState()&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(e){const t=this.frameState;if(!t)return null;const n=this.getLayer(),r=Af(t.pixelToCoordinateTransform,e.slice()),i=n.getExtent();if(i&&!Gh(i,r))return null;const o=this.image_.getExtent(),s=this.getImage(),a=pp(o),l=Math.floor(s.width*((r[0]-o[0])/a));if(l<0||l>=s.width)return null;const u=up(o),c=Math.floor(s.height*((o[3]-r[1])/u));return c<0||c>=s.height?null:this.getImageData(s,l,c)}renderFrame(e,t){const n=this.image_,r=n.getExtent(),i=n.getResolution(),o=n.getPixelRatio(),s=e.layerStatesArray[e.layerIndex],a=e.pixelRatio,l=e.viewState,u=l.center,c=a*i/(l.resolution*o),d=e.extent,h=l.resolution,p=l.rotation,f=Math.round(pp(d)/h*a),m=Math.round(up(d)/h*a);Mf(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/a,1/a,p,-f/2,-m/2),Tf(this.inversePixelTransform,this.pixelTransform);const g=Rf(this.pixelTransform);this.useContainer(t,g,this.getBackground(e));const _=this.context,y=_.canvas;y.width!=f||y.height!=m?(y.width=f,y.height=m):this.containerReused||_.clearRect(0,0,f,m);let v=!1,b=!0;if(s.extent){const t=Yp(s.extent,l.projection);b=fp(t,e.extent),v=b&&!Vh(t,e.extent),v&&this.clipUnrotated(_,e,t)}const x=this.getImage(),w=Mf(this.tempTransform,f/2,m/2,c,c,0,o*(r[0]-u[0])/i,o*(u[1]-r[3])/i);this.renderedResolution=i*a/o;const k=x.width*w[0],C=x.height*w[3];if(this.getLayer().getSource().getInterpolate()||(_.imageSmoothingEnabled=!1),this.preRender(_,e),b&&k>=.5&&C>=.5){const e=w[4],t=w[5],n=s.opacity;let r;1!==n&&(r=_.globalAlpha,_.globalAlpha=n),_.drawImage(x,0,0,+x.width,+x.height,e,t,k,C),1!==n&&(_.globalAlpha=r)}return this.postRender(_,e),v&&_.restore(),_.imageSmoothingEnabled=!0,g!==y.style.transform&&(y.style.transform=g),this.container}},uy=class extends ay{constructor(e){super(e)}createRenderer(){return new ly(this)}getData(e){return super.getData(e)}};var cy=n(4459);function dy(e,t,n){if(3===e){const e={keys:[],values:[],features:[]},r=n.readVarint()+n.pos;n.readFields(hy,e,r),e.length=e.features.length,e.length&&(t[e.name]=e)}}function hy(e,t,n){if(15===e)t.version=n.readVarint();else if(1===e)t.name=n.readString();else if(5===e)t.extent=n.readVarint();else if(2===e)t.features.push(n.pos);else if(3===e)t.keys.push(n.readString());else if(4===e){let r=null;const i=n.readVarint()+n.pos;for(;n.pos<i;)r=1==(e=n.readVarint()>>3)?n.readString():2===e?n.readFloat():3===e?n.readDouble():4===e?n.readVarint64():5===e?n.readVarint():6===e?n.readSVarint():7===e?n.readBoolean():null;t.values.push(r)}}function py(e,t,n){if(1==e)t.id=n.readVarint();else if(2==e){const e=n.readVarint()+n.pos;for(;n.pos<e;){const e=t.layer.keys[n.readVarint()],r=t.layer.values[n.readVarint()];t.properties[e]=r}}else 3==e?t.type=n.readVarint():4==e&&(t.geometry=n.pos)}function fy(e,t,n){e.pos=t.features[n];const r=e.readVarint()+e.pos,i={layer:t,type:0,properties:{}};return e.readFields(py,i,r),i}const my=class extends H_{constructor(e){super(),e=e||{},this.dataProjection=new wh({code:"",units:"tile-pixels"}),this.featureClass_=e.featureClass?e.featureClass:R_,this.geometryName_=e.geometryName,this.layerName_=e.layerName?e.layerName:"layer",this.layers_=e.layers?e.layers:null,this.idProperty_=e.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(e,t,n,r){e.pos=t.geometry;const i=e.readVarint()+e.pos;let o=1,s=0,a=0,l=0,u=0,c=0;for(;e.pos<i;){if(!s){const t=e.readVarint();o=7&t,s=t>>3}s--,1===o||2===o?(a+=e.readSVarint(),l+=e.readSVarint(),1===o&&u>c&&(r.push(u),c=u),n.push(a,l),u+=2):7===o?u>c&&(n.push(n[c],n[c+1]),u+=2):Xd(!1,59)}u>c&&(r.push(u),c=u)}createFeature_(e,t,n){const r=t.type;if(0===r)return null;let i;const o=t.properties;let s;this.idProperty_?(s=o[this.idProperty_],delete o[this.idProperty_]):s=t.id,o[this.layerName_]=t.layer.name;const a=[],l=[];this.readRawGeometry_(e,t,a,l);const u=function(e,t){let n;return 1===e?n=1===t?"Point":"MultiPoint":2===e?n=1===t?"LineString":"MultiLineString":3===e&&(n="Polygon"),n}(r,l.length);if(this.featureClass_===R_)i=new this.featureClass_(u,a,l,o,s),i.transform(n.dataProjection);else{let e;if("Polygon"==u){const t=function(e,t){const n=[];let r=0,i=0;for(let o=0,s=t.length;o<s;++o){const s=t[o];if(mm(e,r,s,2)){if(0===n.length)continue;n[n.length-1].push(t[i])}else n.push(t.slice(i,o+1));i=o+1,r=s}return n}(a,l);e=t.length>1?new ry(a,"XY",t):new bm(a,"XY",l)}else e="Point"===u?new im(a,"XY"):"LineString"===u?new Y_(a,"XY"):"MultiPoint"===u?new ty(a,"XY"):"MultiLineString"===u?new J_(a,"XY",l):null;i=new(0,this.featureClass_),this.geometryName_&&i.setGeometryName(this.geometryName_);const t=U_(e,!1,n);i.setGeometry(t),void 0!==s&&i.setId(s),i.setProperties(o,!0)}return i}getType(){return"arraybuffer"}readFeatures(e,t){const n=this.layers_,r=zp((t=this.adaptOptions(t)).dataProjection);r.setWorldExtent(t.extent),t.dataProjection=r;const i=new cy(e),o=i.readFields(dy,{}),s=[];for(const e in o){if(n&&!n.includes(e))continue;const a=o[e],l=a?[0,0,a.extent,a.extent]:null;r.setExtent(l);for(let e=0,n=a.length;e<n;++e){const n=fy(i,a,e),r=this.createFeature_(i,n,t);null!==r&&s.push(r)}}return s}readProjection(e){return this.dataProjection}setLayers(e){this.layers_=e}},gy="add",_y="remove",yy="length";class vy extends fd{constructor(e,t,n){super(e),this.element=t,this.index=n}}const by=class extends Wd{constructor(e,t){if(super(),this.on,this.once,this.un,t=t||{},this.unique_=!!t.unique,this.array_=e||[],this.unique_)for(let e=0,t=this.array_.length;e<t;++e)this.assertUnique_(this.array_[e],e);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let t=0,n=e.length;t<n;++t)this.push(e[t]);return this}forEach(e){const t=this.array_;for(let n=0,r=t.length;n<r;++n)e(t[n],n,t)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(yy)}insertAt(e,t){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new vy(gy,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){const t=this.array_;for(let n=0,r=t.length;n<r;++n)if(t[n]===e)return this.removeAt(n)}removeAt(e){if(e<0||e>=this.getLength())return;const t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new vy(_y,t,e)),t}setAt(e,t){if(e>=this.getLength())return void this.insertAt(e,t);if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);const n=this.array_[e];this.array_[e]=t,this.dispatchEvent(new vy(_y,n,e)),this.dispatchEvent(new vy(gy,t,e))}updateLength_(){this.set(yy,this.array_.length)}assertUnique_(e,t){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===e&&n!==t)throw new Zd(58)}};function xy(e,t){b_.expire()}const wy=class extends gd{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){Bd()}calculateMatrices2D(e){const t=e.viewState,n=e.coordinateToPixelTransform,r=e.pixelToCoordinateTransform;Mf(n,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),Tf(r,n)}forEachFeatureAtCoordinate(e,t,n,r,i,o,s,a){let l;const u=t.viewState;function c(e,t,n,r){return i.call(o,t,e?n:null,r)}const d=u.projection,h=Cp(e.slice(),d),p=[[0,0]];if(d.canWrapX()&&r){const e=pp(d.getExtent());p.push([-e,0],[e,0])}const f=t.layerStatesArray,m=f.length,g=[],_=[];for(let r=0;r<p.length;r++)for(let i=m-1;i>=0;--i){const o=f[i],d=o.layer;if(d.hasRenderer()&&Em(o,u)&&s.call(a,d)){const i=d.getRenderer(),s=d.getSource();if(i&&s){const a=s.getWrapX()?h:e,u=c.bind(null,o.managed);_[0]=a[0]+p[r][0],_[1]=a[1]+p[r][1],l=i.forEachFeatureAtCoordinate(_,t,n,u,g)}if(l)return l}}if(0===g.length)return;const y=1/g.length;return g.forEach(((e,t)=>e.distanceSq+=t*y)),g.sort(((e,t)=>e.distanceSq-t.distanceSq)),g.some((e=>l=e.callback(e.feature,e.layer,e.geometry))),l}hasFeatureAtCoordinate(e,t,n,r,i,o){return void 0!==this.forEachFeatureAtCoordinate(e,t,n,r,wd,this,i,o)}getMap(){return this.map_}renderFrame(e){Bd()}scheduleExpireIconCache(e){b_.canExpireCache()&&e.postRenderFunctions.push(xy)}},ky=class extends wy{constructor(e){super(e),this.fontChangeListenerKey_=zd(i_,md,e.redrawText.bind(e)),this.element_=document.createElement("div");const t=this.element_.style;t.position="absolute",t.width="100%",t.height="100%",t.zIndex="0",this.element_.className=Vg+" ol-layers";const n=e.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,t){const n=this.getMap();if(n.hasListener(e)){const r=new Lm(e,void 0,t);n.dispatchEvent(r)}}disposeInternal(){Dd(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(e){if(!e)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(e),this.dispatchRenderEvent(gh,e);const t=e.layerStatesArray.sort((function(e,t){return e.zIndex-t.zIndex})),n=e.viewState;this.children_.length=0;const r=[];let i=null;for(let o=0,s=t.length;o<s;++o){const s=t[o];e.layerIndex=o;const a=s.layer,l=a.getSourceState();if(!Em(s,n)||"ready"!=l&&"undefined"!=l){a.unrender();continue}const u=a.render(e,i);u&&(u!==i&&(this.children_.push(u),i=u),"getDeclutter"in a&&r.push(a))}for(let t=r.length-1;t>=0;--t)r[t].renderDeclutter(e);!function(e,t){const n=e.childNodes;for(let r=0;;++r){const i=n[r],o=t[r];if(!i&&!o)break;i!==o&&(i?o?e.insertBefore(o,i):(e.removeChild(i),--r):e.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}};class Cy extends fd{constructor(e,t){super(e),this.layer=t}}const Sy="layers";class Ay extends mh{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let n=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Sy,this.handleLayersChanged_),n?Array.isArray(n)?n=new by(n.slice(),{unique:!0}):Xd("function"==typeof n.getArray,43):n=new by(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Dd),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(zd(e,gy,this.handleLayersAdd_,this),zd(e,_y,this.handleLayersRemove_,this));for(const e in this.listenerKeys_)this.listenerKeys_[e].forEach(Dd);Sd(this.listenerKeys_);const t=e.getArray();for(let e=0,n=t.length;e<n;e++){const n=t[e];this.registerLayerListeners_(n),this.dispatchEvent(new Cy("addlayer",n))}this.changed()}registerLayerListeners_(e){const t=[zd(e,md,this.handleLayerChange_,this),zd(e,Md,this.handleLayerChange_,this)];e instanceof Ay&&t.push(zd(e,"addlayer",this.handleLayerGroupAdd_,this),zd(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[Gd(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new Cy("addlayer",e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new Cy("removelayer",e.layer))}handleLayersAdd_(e){const t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new Cy("addlayer",t)),this.changed()}handleLayersRemove_(e){const t=e.element,n=Gd(t);this.listenerKeys_[n].forEach(Dd),delete this.listenerKeys_[n],this.dispatchEvent(new Cy("removelayer",t)),this.changed()}getLayers(){return this.get(Sy)}setLayers(e){const t=this.getLayers();if(t){const e=t.getArray();for(let t=0,n=e.length;t<n;++t)this.dispatchEvent(new Cy("removelayer",e[t]))}this.set(Sy,e)}getLayersArray(e){return e=void 0!==e?e:[],this.getLayers().forEach((function(t){t.getLayersArray(e)})),e}getLayerStatesArray(e){const t=void 0!==e?e:[],n=t.length;this.getLayers().forEach((function(e){e.getLayerStatesArray(t)}));const r=this.getLayerState();let i=r.zIndex;e||void 0!==r.zIndex||(i=0);for(let e=n,o=t.length;e<o;e++){const n=t[e];n.opacity*=r.opacity,n.visible=n.visible&&r.visible,n.maxResolution=Math.min(n.maxResolution,r.maxResolution),n.minResolution=Math.max(n.minResolution,r.minResolution),n.minZoom=Math.max(n.minZoom,r.minZoom),n.maxZoom=Math.min(n.maxZoom,r.maxZoom),void 0!==r.extent&&(void 0!==n.extent?n.extent=cp(n.extent,r.extent):n.extent=r.extent),void 0===n.zIndex&&(n.zIndex=i)}return t}getSourceState(){return"ready"}}const Ey=Ay,My=class extends fd{constructor(e,t,n){super(e),this.map=t,this.frameState=void 0!==n?n:null}},Ty=class extends My{constructor(e,t,n,r,i,o){super(e,t,i),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==r&&r,this.activePointers=o}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(e){this.pixel_=e}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(e){this.coordinate_=e}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},Py={SINGLECLICK:"singleclick",CLICK:Pd,DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Ry="pointerdown",Iy=class extends Ed{constructor(e,t){super(e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===t?1:t,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=zd(n,Ry,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=zd(n,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(Ld,this.boundHandleTouchMove_,!!xf&&{passive:!1})}emulateClick_(e){let t=new Ty(Py.CLICK,this.map_,e);this.dispatchEvent(t),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new Ty(Py.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const t=new Ty(Py.SINGLECLICK,this.map_,e);this.dispatchEvent(t)}),250)}updateActivePointers_(e){const t=e,n=t.pointerId;if(t.type==Py.POINTERUP||t.type==Py.POINTERCANCEL){delete this.trackedTouches_[n];for(const e in this.trackedTouches_)if(this.trackedTouches_[e].target!==t.target){delete this.trackedTouches_[e];break}}else t.type!=Py.POINTERDOWN&&t.type!=Py.POINTERMOVE||(this.trackedTouches_[n]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new Ty(Py.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(Dd),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return 0===e.button}handlePointerDown_(e){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(e);const t=new Ty(Py.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),0===this.dragListenerKeys_.length){const e=this.map_.getOwnerDocument();this.dragListenerKeys_.push(zd(e,Py.POINTERMOVE,this.handlePointerMove_,this),zd(e,Py.POINTERUP,this.handlePointerUp_,this),zd(this.element_,Py.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==e&&this.dragListenerKeys_.push(zd(this.element_.getRootNode(),Py.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new Ty(Py.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const t=!(!this.down_||!this.isMoving_(e));this.dispatchEvent(new Ty(Py.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){const t=this.originalPointerMoveEvent_;t&&!t.defaultPrevented||"boolean"==typeof e.cancelable&&!0!==e.cancelable||e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Dd(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Ld,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Dd(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Dd),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Ly="postrender",Oy="loadstart",zy="loadend",Fy="layergroup",Dy="size",jy="target",Ny="view",By=1/0,qy=class{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Sd(this.queuedElements_)}dequeue(){const e=this.elements_,t=this.priorities_,n=e[0];1==e.length?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));const r=this.keyFunction_(n);return delete this.queuedElements_[r],n}enqueue(e){Xd(!(this.keyFunction_(e)in this.queuedElements_),31);const t=this.priorityFunction_(e);return t!=By&&(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(e){return 2*e+1}getRightChildIndex_(e){return 2*e+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return 0===this.elements_.length}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const t=this.elements_,n=this.priorities_,r=t.length,i=t[e],o=n[e],s=e;for(;e<r>>1;){const i=this.getLeftChildIndex_(e),o=this.getRightChildIndex_(e),s=o<r&&n[o]<n[i]?o:i;t[e]=t[s],n[e]=n[s],e=s}t[e]=i,n[e]=o,this.siftDown_(s,e)}siftDown_(e,t){const n=this.elements_,r=this.priorities_,i=n[t],o=r[t];for(;t>e;){const e=this.getParentIndex_(t);if(!(r[e]>o))break;n[t]=n[e],r[t]=r[e],t=e}n[t]=i,r[t]=o}reprioritize(){const e=this.priorityFunction_,t=this.elements_,n=this.priorities_;let r=0;const i=t.length;let o,s,a;for(s=0;s<i;++s)o=t[s],a=e(o),a==By?delete this.queuedElements_[this.keyFunction_(o)]:(n[r]=a,t[r++]=o);t.length=r,n.length=r,this.heapify_()}},Gy=class extends qy{constructor(e,t){super((function(t){return e.apply(null,t)}),(function(e){return e[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=t,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(e){const t=super.enqueue(e);return t&&e[0].addEventListener(Md,this.boundHandleTileChange_),t}getTilesLoading(){return this.tilesLoading_}handleTileChange(e){const t=e.target,n=t.getState();if(2===n||3===n||4===n){3!==n&&t.removeEventListener(Md,this.boundHandleTileChange_);const e=t.getKey();e in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[e],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(e,t){let n,r,i,o=0;for(;this.tilesLoading_<e&&o<t&&this.getCount()>0;)r=this.dequeue()[0],i=r.getKey(),n=r.getState(),0!==n||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++o,r.load())}},Vy=class extends Wd{constructor(e){super();const t=e.element;!t||e.target||t.style.pointerEvents||(t.style.pointerEvents="auto"),this.element=t||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){Um(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&Um(this.element);for(let e=0,t=this.listenerKeys.length;e<t;++e)Dd(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=e,e&&((this.target_?this.target_:e.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Cd&&this.listenerKeys.push(zd(e,Ly,this.render,this)),e.render())}render(e){}setTarget(e){this.target_="string"==typeof e?document.getElementById(e):e}},Wy=class extends Vy{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===e.collapsed||e.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==e.collapsible,this.collapsible_=void 0===e.collapsible||e.collapsible,this.collapsible_||(this.collapsed_=!1);const t=void 0!==e.className?e.className:"ol-attribution",n=void 0!==e.tipLabel?e.tipLabel:"Attributions",r=void 0!==e.expandClassName?e.expandClassName:t+"-expand",i=void 0!==e.collapseLabel?e.collapseLabel:"›",o=void 0!==e.collapseClassName?e.collapseClassName:t+"-collapse";"string"==typeof i?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=i,this.collapseLabel_.className=o):this.collapseLabel_=i;const s=void 0!==e.label?e.label:"i";"string"==typeof s?(this.label_=document.createElement("span"),this.label_.textContent=s,this.label_.className=r):this.label_=s;const a=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=n,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(Pd,this.handleClick_.bind(this),!1);const l=t+" "+Vg+" "+Wg+(this.collapsed_&&this.collapsible_?" "+Hg:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=l,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(e){const t=Array.from(new Set(this.getMap().getAllLayers().flatMap((t=>t.getAttributions(e))))),n=!this.getMap().getAllLayers().some((e=>e.getSource()&&!1===e.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(n),t}updateElement_(e){if(!e)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const t=this.collectSourceAttributions_(e),n=t.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!xd(t,this.renderedAttributions_)){Zm(this.ulElement_);for(let e=0,n=t.length;e<n;++e){const n=document.createElement("li");n.innerHTML=t[e],this.ulElement_.appendChild(n)}this.renderedAttributions_=t}}handleClick_(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Hg),this.collapsed_?Hm(this.collapseLabel_,this.label_):Hm(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(e){this.userCollapsed_=e,this.collapsible_&&this.collapsed_!==e&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(e){this.updateElement_(e.frameState)}},Hy=class extends Vy{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});const t=void 0!==e.className?e.className:"ol-rotate",n=void 0!==e.label?e.label:"⇧",r=void 0!==e.compassClassName?e.compassClassName:"ol-compass";this.label_=null,"string"==typeof n?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(r));const i=e.tipLabel?e.tipLabel:"Reset rotation",o=document.createElement("button");o.className=t+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.label_),o.addEventListener(Pd,this.handleClick_.bind(this),!1);const s=t+" "+Vg+" "+Wg,a=this.element;a.className=s,a.appendChild(o),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=void 0!==e.duration?e.duration:250,this.autoHide_=void 0===e.autoHide||e.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(Gg)}handleClick_(e){e.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const t=e.getRotation();void 0!==t&&(this.duration_>0&&t%(2*Math.PI)!=0?e.animate({rotation:0,duration:this.duration_,easing:df}):e.setRotation(0))}render(e){const t=e.frameState;if(!t)return;const n=t.viewState.rotation;if(n!=this.rotation_){const e="rotate("+n+"rad)";if(this.autoHide_){const e=this.element.classList.contains(Gg);e||0!==n?e&&0!==n&&this.element.classList.remove(Gg):this.element.classList.add(Gg)}this.label_.style.transform=e}this.rotation_=n}},Uy=class extends Vy{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const t=void 0!==e.className?e.className:"ol-zoom",n=void 0!==e.delta?e.delta:1,r=void 0!==e.zoomInClassName?e.zoomInClassName:t+"-in",i=void 0!==e.zoomOutClassName?e.zoomOutClassName:t+"-out",o=void 0!==e.zoomInLabel?e.zoomInLabel:"+",s=void 0!==e.zoomOutLabel?e.zoomOutLabel:"–",a=void 0!==e.zoomInTipLabel?e.zoomInTipLabel:"Zoom in",l=void 0!==e.zoomOutTipLabel?e.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=a,u.appendChild("string"==typeof o?document.createTextNode(o):o),u.addEventListener(Pd,this.handleClick_.bind(this,n),!1);const c=document.createElement("button");c.className=i,c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof s?document.createTextNode(s):s),c.addEventListener(Pd,this.handleClick_.bind(this,-n),!1);const d=t+" "+Vg+" "+Wg,h=this.element;h.className=d,h.appendChild(u),h.appendChild(c),this.duration_=void 0!==e.duration?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const t=this.getMap().getView();if(!t)return;const n=t.getZoom();if(void 0!==n){const r=t.getConstrainedZoom(n+e);this.duration_>0?(t.getAnimating()&&t.cancelAnimations(),t.animate({zoom:r,duration:this.duration_,easing:df})):t.setZoom(r)}}};function Zy(e){e=e||{};const t=new by;return(void 0===e.zoom||e.zoom)&&t.push(new Uy(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&t.push(new Hy(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&t.push(new Wy(e.attributionOptions)),t}const Xy="active";function Ky(e,t,n,r){const i=e.getZoom();if(void 0===i)return;const o=e.getConstrainedZoom(i+t),s=e.getResolutionForZoom(o);e.getAnimating()&&e.cancelAnimations(),e.animate({resolution:s,anchor:n,duration:void 0!==r?r:250,easing:df})}const $y=class extends Wd{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Xy)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(Xy,e)}setMap(e){this.map_=e}},Yy=class extends $y{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=void 0!==e.duration?e.duration:250}handleEvent(e){let t=!1;if(e.type==Py.DBLCLICK){const n=e.originalEvent,r=e.map,i=e.coordinate,o=n.shiftKey?-this.delta_:this.delta_;Ky(r.getView(),o,i,this.duration_),n.preventDefault(),t=!0}return!t}};function Qy(e){const t=e.length;let n=0,r=0;for(let i=0;i<t;i++)n+=e[i].clientX,r+=e[i].clientY;return{clientX:n/t,clientY:r/t}}const Jy=class extends $y{constructor(e){super(e=e||{}),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==Py.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==Py.POINTERUP){const t=this.handleUpEvent(e);this.handlingDownUpSequence=t&&this.targetPointers.length>0}}else if(e.type==Py.POINTERDOWN){const n=this.handleDownEvent(e);this.handlingDownUpSequence=n,t=this.stopDown(n)}else e.type==Py.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}};function ev(e){const t=arguments;return function(e){let n=!0;for(let r=0,i=t.length;r<i&&(n=n&&t[r](e),n);++r);return n}}const tv=function(e){const t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},nv=function(e){return!e.map.getTargetElement().hasAttribute("tabindex")||function(e){const t=e.map.getTargetElement(),n=e.map.getOwnerDocument().activeElement;return t.contains(n)}(e)},rv=wd,iv=function(e){return e.type==Py.CLICK},ov=function(e){const t=e.originalEvent;return 0==t.button&&!(gf&&_f&&t.ctrlKey)},sv=kd,av=function(e){return e.type==Py.SINGLECLICK},lv=function(e){const t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},uv=function(e){const t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},cv=function(e){const t=e.originalEvent,n=t.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n&&!t.target.isContentEditable},dv=function(e){const t=e.originalEvent;return Xd(void 0!==t,56),"mouse"==t.pointerType},hv=function(e){const t=e.originalEvent;return Xd(void 0!==t,56),t.isPrimary&&0===t.button},pv=class extends Jy{constructor(e){super({stopDown:kd}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const t=e.condition?e.condition:ev(lv,hv);this.condition_=e.onFocusOnly?ev(nv,t):t,this.noKinetic_=!1}handleDragEvent(e){const t=e.map;this.panning_||(this.panning_=!0,t.getView().beginInteraction());const n=this.targetPointers,r=t.getEventPixel(Qy(n));if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){const t=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],n=e.map.getView();i=t,o=n.getResolution(),i[0]*=o,i[1]*=o,xp(t,n.getRotation()),n.adjustCenterInternal(t)}}else this.kinetic_&&this.kinetic_.begin();var i,o;this.lastCentroid=r,this.lastPointersCount_=n.length,e.originalEvent.preventDefault()}handleUpEvent(e){const t=e.map,n=t.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const e=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),i=n.getCenterInternal(),o=t.getPixelFromCoordinateInternal(i),s=t.getCoordinateFromPixelInternal([o[0]-e*Math.cos(r),o[1]-e*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(s),duration:500,easing:df})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(e){if(this.targetPointers.length>0&&this.condition_(e)){const t=e.map.getView();return this.lastCentroid=null,t.getAnimating()&&t.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}},fv=class extends Jy{constructor(e){e=e||{},super({stopDown:kd}),this.condition_=e.condition?e.condition:tv,this.lastAngle_=void 0,this.duration_=void 0!==e.duration?e.duration:250}handleDragEvent(e){if(!dv(e))return;const t=e.map,n=t.getView();if(n.getConstraints().rotation===lf)return;const r=t.getSize(),i=e.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.lastAngle_){const e=o-this.lastAngle_;n.adjustRotationInternal(-e)}this.lastAngle_=o}handleUpEvent(e){return!dv(e)||(e.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(e){return!!dv(e)&&(!(!ov(e)||!this.condition_(e))&&(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}},mv=class extends gd{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,t=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(e[0],t[0])+n,r.top=Math.min(e[1],t[1])+n,r.width=Math.abs(t[0]-e[0])+n,r.height=Math.abs(t[1]-e[1])+n}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const e=this.startPixel_,t=this.endPixel_,n=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new bm([n])}getGeometry(){return this.geometry_}};class gv extends fd{constructor(e,t,n){super(e),this.coordinate=t,this.mapBrowserEvent=n}}const _v=class extends Jy{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.box_=new mv(e.className||"ol-dragbox"),this.minArea_=void 0!==e.minArea?e.minArea:64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition?e.condition:ov,this.boxEndCondition_=e.boxEndCondition?e.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,n){const r=n[0]-t[0],i=n[1]-t[1];return r*r+i*i>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new gv("boxdrag",e.coordinate,e))}handleUpEvent(e){this.box_.setMap(null);const t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new gv(t?"boxend":"boxcancel",e.coordinate,e)),!1}handleDownEvent(e){return!!this.condition_(e)&&(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new gv("boxstart",e.coordinate,e)),!0)}onBoxEnd(e){}},yv=class extends _v{constructor(e){super({condition:(e=e||{}).condition?e.condition:uv,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=void 0!==e.duration?e.duration:200,this.out_=void 0!==e.out&&e.out}onBoxEnd(e){const t=this.getMap().getView();let n=this.getGeometry();if(this.out_){const e=t.rotatedExtentForGeometry(n),r=t.getResolutionForExtentInternal(e),i=t.getResolution()/r;n=n.clone(),n.scale(i*i)}t.fitInternal(n,{duration:this.duration_,easing:df})}},vv="ArrowLeft",bv="ArrowRight",xv="ArrowDown",wv=class extends $y{constructor(e){super(),e=e||{},this.defaultCondition_=function(e){return lv(e)&&cv(e)},this.condition_=void 0!==e.condition?e.condition:this.defaultCondition_,this.duration_=void 0!==e.duration?e.duration:100,this.pixelDelta_=void 0!==e.pixelDelta?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==Rd){const n=e.originalEvent,r=n.key;if(this.condition_(e)&&(r==xv||r==vv||r==bv||"ArrowUp"==r)){const i=e.map.getView(),o=i.getResolution()*this.pixelDelta_;let s=0,a=0;r==xv?a=-o:r==vv?s=-o:r==bv?s=o:a=o;const l=[s,a];xp(l,i.getRotation()),function(e,t,n){const r=e.getCenterInternal();if(r){const i=[r[0]+t[0],r[1]+t[1]];e.animateInternal({duration:void 0!==n?n:250,easing:pf,center:e.getConstrainedCenter(i)})}}(i,l,this.duration_),n.preventDefault(),t=!0}}return!t}},kv=class extends $y{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:cv,this.delta_=e.delta?e.delta:1,this.duration_=void 0!==e.duration?e.duration:100}handleEvent(e){let t=!1;if(e.type==Rd||e.type==Id){const n=e.originalEvent,r=n.key;if(this.condition_(e)&&("+"===r||"-"===r)){const i=e.map,o="+"===r?this.delta_:-this.delta_;Ky(i.getView(),o,void 0,this.duration_),n.preventDefault(),t=!0}}return!t}},Cv=class extends $y{constructor(e){super(e=e||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==e.maxDelta?e.maxDelta:1,this.duration_=void 0!==e.duration?e.duration:250,this.timeout_=void 0!==e.timeout?e.timeout:80,this.useAnchor_=void 0===e.useAnchor||e.useAnchor,this.constrainResolution_=void 0!==e.constrainResolution&&e.constrainResolution;const t=e.condition?e.condition:rv;this.condition_=e.onFocusOnly?ev(nv,t):t,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 e=this.getMap();e&&e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(e){if(!this.condition_(e))return!0;if(e.type!==Od)return!0;const t=e.map,n=e.originalEvent;let r;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate),e.type==Od&&(r=n.deltaY,mf&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=yf),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),0===r)return!1;this.lastDelta_=r;const i=Date.now();void 0===this.startTime_&&(this.startTime_=i),(!this.mode_||i-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const o=t.getView();if("trackpad"===this.mode_&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=i,!1;this.totalDelta_+=r;const s=Math.max(this.timeout_-(i-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,t),s),!1}handleWheelZoom_(e){const t=e.getView();t.getAnimating()&&t.cancelAnimations();let n=-sh(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Ky(t,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}},Sv=class extends Jy{constructor(e){const t=e=e||{};t.stopDown||(t.stopDown=kd),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==e.threshold?e.threshold:.3,this.duration_=void 0!==e.duration?e.duration:250}handleDragEvent(e){let t=0;const n=this.targetPointers[0],r=this.targetPointers[1],i=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(void 0!==this.lastAngle_){const e=i-this.lastAngle_;this.rotationDelta_+=e,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=e}this.lastAngle_=i;const o=e.map,s=o.getView();s.getConstraints().rotation!==lf&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Qy(this.targetPointers))),this.rotating_&&(o.render(),s.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return!(this.targetPointers.length<2)||(e.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}},Av=class extends Jy{constructor(e){const t=e=e||{};t.stopDown||(t.stopDown=kd),super(t),this.anchor_=null,this.duration_=void 0!==e.duration?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1;const n=this.targetPointers[0],r=this.targetPointers[1],i=n.clientX-r.clientX,o=n.clientY-r.clientY,s=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(t=this.lastDistance_/s),this.lastDistance_=s;const a=e.map,l=a.getView();1!=t&&(this.lastScaleDelta_=t),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(Qy(this.targetPointers))),a.render(),l.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const t=e.map.getView(),n=this.lastScaleDelta_>1?1:-1;return t.endInteraction(this.duration_,n),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}};function Ev(e){e instanceof Mm?e.setMapInternal(null):e instanceof Ey&&e.getLayers().forEach(Ev)}function Mv(e,t){if(e instanceof Mm)e.setMapInternal(t);else if(e instanceof Ey){const n=e.getLayers().getArray();for(let e=0,r=n.length;e<r;++e)Mv(n[e],t)}}const Tv=class extends Wd{constructor(e){super(),e=e||{},this.on,this.once,this.un;const t=function(e){let t=null;void 0!==e.keyboardEventTarget&&(t="string"==typeof e.keyboardEventTarget?document.getElementById(e.keyboardEventTarget):e.keyboardEventTarget);const n={},r=e.layers&&"function"==typeof e.layers.getLayers?e.layers:new Ey({layers:e.layers});let i,o,s;return n[Fy]=r,n[jy]=e.target,n[Ny]=e.view instanceof Am?e.view:new Am,void 0!==e.controls&&(Array.isArray(e.controls)?i=new by(e.controls.slice()):(Xd("function"==typeof e.controls.getArray,47),i=e.controls)),void 0!==e.interactions&&(Array.isArray(e.interactions)?o=new by(e.interactions.slice()):(Xd("function"==typeof e.interactions.getArray,48),o=e.interactions)),void 0!==e.overlays?Array.isArray(e.overlays)?s=new by(e.overlays.slice()):(Xd("function"==typeof e.overlays.getArray,49),s=e.overlays):s=new by,{controls:i,interactions:o,keyboardEventTarget:t,overlays:s,values:n}}(e);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,this.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:yf,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_=e.moveTolerance,this.keyboardEventTarget_=t.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=t.controls||Zy(),this.interactions=t.interactions||function(e){e=e||{};const t=new by,n=new class{constructor(e,t,n){this.decay_=e,this.minVelocity_=t,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;let n=t-3;for(;n>0&&this.points_[n+2]>e;)n-=3;const r=this.points_[t+2]-this.points_[n+2];if(r<1e3/60)return!1;const i=this.points_[t]-this.points_[n],o=this.points_[t+1]-this.points_[n+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&t.push(new fv),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&t.push(new Yy({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&t.push(new pv({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&t.push(new Sv),(void 0===e.pinchZoom||e.pinchZoom)&&t.push(new Av({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(t.push(new wv),t.push(new kv({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&t.push(new Cv({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&t.push(new yv({duration:e.zoomDuration})),t}({onFocusOnly:!0}),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Gy(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Fy,this.handleLayerGroupChanged_),this.addChangeListener(Ny,this.handleViewChanged_),this.addChangeListener(Dy,this.handleSizeChanged_),this.addChangeListener(jy,this.handleTargetChanged_),this.setProperties(t.values);const n=this;!e.view||e.view instanceof Am||e.view.then((function(e){n.setView(new Am(e))})),this.controls.addEventListener(gy,(e=>{e.element.setMap(this)})),this.controls.addEventListener(_y,(e=>{e.element.setMap(null)})),this.interactions.addEventListener(gy,(e=>{e.element.setMap(this)})),this.interactions.addEventListener(_y,(e=>{e.element.setMap(null)})),this.overlays_.addEventListener(gy,(e=>{this.addOverlayInternal_(e.element)})),this.overlays_.addEventListener(_y,(e=>{const t=e.element.getId();void 0!==t&&delete this.overlayIdIndex_[t.toString()],e.element.setMap(null)})),this.controls.forEach((e=>{e.setMap(this)})),this.interactions.forEach((e=>{e.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){Mv(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const t=e.getId();void 0!==t&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,n){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(e),i=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,o=void 0!==n.layerFilter?n.layerFilter:wd,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,i,s,t,null,o,null)}getFeaturesAtPixel(e,t){const n=[];return this.forEachFeatureAtPixel(e,(function(e){n.push(e)}),t),n}getAllLayers(){const e=[];return function t(n){n.forEach((function(n){n instanceof Ey?t(n.getLayers()):e.push(n)}))}(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(e),r=void 0!==(t=void 0!==t?t:{}).layerFilter?t.layerFilter:wd,i=void 0!==t.hitTolerance?t.hitTolerance:0,o=!1!==t.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,i,o,r,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const t=this.viewport_.getBoundingClientRect(),n=this.getSize(),r=t.width/n[0],i=t.height/n[1],o="changedTouches"in e?e.changedTouches[0]:e;return[(o.clientX-t.left)/r,(o.clientY-t.top)/i]}getTarget(){return this.get(jy)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return Xp(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?Af(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const t=this.overlayIdIndex_[e.toString()];return void 0!==t?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Fy)}setLayers(e){const t=this.getLayerGroup();if(e instanceof by)return void t.setLayers(e);const n=t.getLayers();n.clear(),n.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,n=e.length;t<n;++t){const n=e[t];if(!n.visible)continue;const r=n.layer.getRenderer();if(r&&!r.ready)return!0;const i=n.layer.getSource();if(i&&i.loading)return!0}return!1}getPixelFromCoordinate(e){const t=Kp(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}getPixelFromCoordinateInternal(e){const t=this.frameState_;return t?Af(t.coordinateToPixelTransform,e.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Dy)}getView(){return this.get(Ny)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const e=this.getTargetElement();return e?e.ownerDocument:document}getTilePriority(e,t,n,r){return function(e,t,n,r,i){if(!e||!(n in e.wantedTiles))return By;if(!e.wantedTiles[n][t.getKey()])return By;const o=e.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}(this.frameState_,e,t,n,r)}handleBrowserEvent(e,t){t=t||e.type;const n=new Ty(t,this,e);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(e){if(!this.frameState_)return;const t=e.originalEvent,n=t.type;if(n===Ry||n===Od||n===Rd){const e=this.getOwnerDocument(),n=this.viewport_.getRootNode?this.viewport_.getRootNode():e,r=t.target;if(this.overlayContainerStopEvent_.contains(r)||!(n===e?e.documentElement:n).contains(r))return}if(e.frameState=this.frameState_,!1!==this.dispatchEvent(e)){const t=this.getInteractions().getArray().slice();for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.getMap()===this&&r.getActive()&&this.getTargetElement()&&(!r.handleEvent(e)||e.propagationStopped))break}}}handlePostRender(){const e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let n=this.maxTilesLoading_,r=n;if(e){const t=e.viewHints;if(t[0]||t[1]){const t=Date.now()-e.time>8;n=t?0:8,r=t?0:2}}t.getTilesLoading()<n&&(t.reprioritize(),t.loadMoreTiles(n,r))}e&&this.renderer_&&!e.animate&&(!0===this.renderComplete_?(this.hasListener(_h)&&this.renderer_.dispatchRenderEvent(_h,e),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new My(zy,this,e)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new My(Oy,this,e))));const n=this.postRenderFunctions_;for(let t=0,r=n.length;t<r;++t)n[t](this,e);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let e=0,t=this.targetChangeHandlerKeys_.length;e<t;++e)Dd(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(Td,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Od,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Um(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const e=this.targetElement_.getRootNode();e instanceof ShadowRoot&&this.resizeObserver_.unobserve(e.host),this.setSize(void 0)}const e=this.getTarget(),t="string"==typeof e?document.getElementById(e):e;if(this.targetElement_=t,t){t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new ky(this)),this.mapBrowserEventHandler_=new Iy(this,this.moveTolerance_);for(const e in Py)this.mapBrowserEventHandler_.addEventListener(Py[e],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(Td,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Od,this.boundHandleBrowserEvent_,!!xf&&{passive:!1});const e=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[zd(e,Rd,this.handleBrowserEvent,this),zd(e,Id,this.handleBrowserEvent,this)];const n=t.getRootNode();n instanceof ShadowRoot&&this.resizeObserver_.observe(n.host),this.resizeObserver_.observe(t)}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_&&(Dd(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Dd(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const e=this.getView();e&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=zd(e,md,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=zd(e,Md,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Dd),this.layerGroupPropertyListenerKeys_=null);const e=this.getLayerGroup();e&&(this.handleLayerAdd_(new Cy("addlayer",e)),this.layerGroupPropertyListenerKeys_=[zd(e,md,this.render,this),zd(e,Md,this.render,this),zd(e,"addlayer",this.handleLayerAdd_,this),zd(e,"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 e=this.getLayerGroup().getLayerStatesArray();for(let t=0,n=e.length;t<n;++t){const n=e[t].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(e){return this.getControls().remove(e)}removeInteraction(e){return this.getInteractions().remove(e)}removeLayer(e){return this.getLayerGroup().getLayers().remove(e)}handleLayerRemove_(e){Ev(e.layer)}removeOverlay(e){return this.getOverlays().remove(e)}renderFrame_(e){const t=this.getSize(),n=this.getView(),r=this.frameState_;let i=null;if(void 0!==t&&dg(t)&&n&&n.isDef()){const r=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),o=n.getState();if(i={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:ap(o.center,o.resolution,o.rotation,t),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:t,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:o,viewHints:r,wantedTiles:{},mapId:Gd(this),renderTargets:{}},o.nextCenter&&o.nextResolution){const e=isNaN(o.nextRotation)?o.rotation:o.nextRotation;i.nextExtent=ap(o.nextCenter,o.nextResolution,e,t)}}this.frameState_=i,this.renderer_.renderFrame(i),i&&(i.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,i.postRenderFunctions),r&&(!this.previousExtent_||!mp(this.previousExtent_)&&!$h(i.extent,this.previousExtent_))&&(this.dispatchEvent(new My("movestart",this,r)),this.previousExtent_=Zh(this.previousExtent_)),this.previousExtent_&&!i.viewHints[0]&&!i.viewHints[1]&&!$h(i.extent,this.previousExtent_)&&(this.dispatchEvent(new My("moveend",this,i)),Bh(i.extent,this.previousExtent_))),this.dispatchEvent(new My(Ly,this,i)),this.renderComplete_=this.hasListener(Oy)||this.hasListener(zy)||this.hasListener(_h)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(e){const t=this.getLayerGroup();t&&this.handleLayerRemove_(new Cy("removelayer",t)),this.set(Fy,e)}setSize(e){this.set(Dy,e)}setTarget(e){this.set(jy,e)}setView(e){if(!e||e instanceof Am)return void this.set(Ny,e);this.set(Ny,new Am);const t=this;e.then((function(e){t.setView(new Am(e))}))}updateSize(){const e=this.getTargetElement();let t;if(e){const n=getComputedStyle(e),r=e.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),i=e.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(r)||isNaN(i)||(t=[r,i],!dg(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&Tp("No map visible because the map container's width or height are 0."))}const n=this.getSize();!t||n&&xd(t,n)||(this.setSize(t),this.updateViewportSize_())}updateViewportSize_(){const e=this.getView();if(e){let t;const n=getComputedStyle(this.viewport_);n.width&&n.height&&(t=[parseInt(n.width,10),parseInt(n.height,10)]),e.setViewportSize(t)}}},Pv=class extends Ed{constructor(e,t,n,r){super(),this.extent=e,this.pixelRatio_=n,this.resolution=t,this.state=r}changed(){this.dispatchEvent(Md)}getExtent(){return this.extent}getImage(){return Bd()}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){Bd()}},Rv=class extends Pv{constructor(e,t,n,r,i){super(e,t,n,void 0!==i?0:2),this.loader_=void 0!==i?i:null,this.canvas_=r,this.error_=null}getError(){return this.error_}handleLoad_(e){e?(this.error_=e,this.state=3):this.state=2,this.changed()}load(){0==this.state&&(this.state=1,this.changed(),this.loader_(this.handleLoad_.bind(this)))}getImage(){return this.canvas_}},Iv=class extends Pv{constructor(e,t,n,r,i,o,s){let a=e.getExtent();a&&e.canWrapX()&&(a=a.slice(),a[0]=-1/0,a[2]=1/0);let l=t.getExtent();l&&t.canWrapX()&&(l=l.slice(),l[0]=-1/0,l[2]=1/0);const u=l?cp(n,l):n,c=og(e,t,op(u),r),d=new eg(e,t,u,a,.5*c,r),h=d.calculateSourceExtent(),p=mp(h)?null:o(h,c,i),f=p?0:4,m=p?p.getPixelRatio():1;super(n,r,m,f),this.targetProj_=t,this.maxSourceExtent_=a,this.triangulation_=d,this.targetResolution_=r,this.targetExtent_=n,this.sourceImage_=p,this.sourcePixelRatio_=m,this.interpolate_=s,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){1==this.state&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const e=this.sourceImage_.getState();if(2==e){const e=pp(this.targetExtent_)/this.targetResolution_,t=up(this.targetExtent_)/this.targetResolution_;this.canvas_=sg(e,t,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=e,this.changed()}load(){if(0==this.state){this.state=1,this.changed();const e=this.sourceImage_.getState();2==e||3==e?this.reproject_():(this.sourceListenerKey_=zd(this.sourceImage_,Md,(function(e){const t=this.sourceImage_.getState();2!=t&&3!=t||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){Dd(this.sourceListenerKey_),this.sourceListenerKey_=null}};class Lv extends fd{constructor(e,t){super(e),this.image=t}}const Ov=class extends wg{constructor(e){super({attributions:e.attributions,projection:e.projection,state:e.state,interpolate:void 0===e.interpolate||e.interpolate}),this.on,this.once,this.un,this.resolutions_=void 0!==e.resolutions?e.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0}getResolutions(){return this.resolutions_}setResolutions(e){this.resolutions_=e}findNearestResolution(e){const t=this.getResolutions();return t&&(e=t[yd(t,e,0)]),e}getImage(e,t,n,r){const i=this.getProjection();if(!i||!r||qp(i,r))return i&&(r=i),this.getImageInternal(e,t,n,r);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&qp(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==t&&$h(this.reprojectedImage_.getExtent(),e))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Iv(i,r,e,t,n,((e,t,n)=>this.getImageInternal(e,t,n,i)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(e,t,n,r){return Bd()}handleImageChange(e){const t=e.target;let n;switch(t.getState()){case 1:this.loading=!0,n="imageloadstart";break;case 2:this.loading=!1,n="imageloadend";break;case 3:this.loading=!1,n="imageloaderror";break;default:return}this.hasListener(n)&&this.dispatchEvent(new Lv(n,t))}};let zv,Fv=!0;try{new ImageData(10,10)}catch(e){Fv=!1}function Dv(e){let t=!0;try{new ImageData(10,10)}catch(e){t=!1}function n(e,n,r){return t?new ImageData(e,n,r):{data:e,width:n,height:r}}return function(t){const r=t.buffers,i=t.meta,o=t.imageOps,s=t.width,a=t.height,l=r.length,u=r[0].byteLength;if(o){const t=new Array(l);for(let e=0;e<l;++e)t[e]=n(new Uint8ClampedArray(r[e]),s,a);return e(t,i).data.buffer}const c=new Uint8ClampedArray(u),d=new Array(l),h=new Array(l);for(let e=0;e<l;++e)d[e]=new Uint8ClampedArray(r[e]),h[e]=[0,0,0,0];for(let t=0;t<u;t+=4){for(let e=0;e<l;++e){const n=d[e];h[e][0]=n[t],h[e][1]=n[t+1],h[e][2]=n[t+2],h[e][3]=n[t+3]}const n=e(h,i);c[t]=n[0],c[t+1]=n[1],c[t+2]=n[2],c[t+3]=n[3]}return c.buffer}}function jv(e,t){const n=Object.keys(e.lib||{}).map((function(t){return"const "+t+" = "+e.lib[t].toString()+";"})).concat(["const __minion__ = ("+Dv.toString()+")(",e.operation.toString(),");",'self.addEventListener("message", function(event) {'," const buffer = __minion__(event.data);"," self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(n.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(n,{type:"text/javascript"})));return r.addEventListener("message",t),r}class Nv extends gd{constructor(e){let t;super(),this._imageOps=!!e.imageOps,t=0===e.threads?0:this._imageOps?1:e.threads||1;const n=new Array(t);if(t)for(let r=0;r<t;++r)n[r]=jv(e,this._onWorkerMessage.bind(this,r));else n[0]=function(e,t){const n=Dv(e.operation);let r=!1;return{postMessage:function(e){setTimeout((function(){r||t({data:{buffer:n(e),meta:e.meta}})}),0)},terminate:function(){r=!0}}}(e,this._onWorkerMessage.bind(this,0));this._workers=n,this._queue=[],this._maxQueueLength=e.queue||1/0,this._running=0,this._dataLookup={},this._job=null}process(e,t,n){this._enqueue({inputs:e,meta:t,callback:n}),this._dispatch()}_enqueue(e){for(this._queue.push(e);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)}_dispatch(){if(this._running||0===this._queue.length)return;const e=this._queue.shift();this._job=e;const t=e.inputs[0].width,n=e.inputs[0].height,r=e.inputs.map((function(e){return e.data.buffer})),i=this._workers.length;if(this._running=i,1===i)return void this._workers[0].postMessage({buffers:r,meta:e.meta,imageOps:this._imageOps,width:t,height:n},r);const o=e.inputs[0].data.length,s=4*Math.ceil(o/4/i);for(let o=0;o<i;++o){const i=o*s,a=[];for(let e=0,t=r.length;e<t;++e)a.push(r[e].slice(i,i+s));this._workers[o].postMessage({buffers:a,meta:e.meta,imageOps:this._imageOps,width:t,height:n},a)}}_onWorkerMessage(e,t){this.disposed||(this._dataLookup[e]=t.data,--this._running,0===this._running&&this._resolveJob())}_resolveJob(){const e=this._job,t=this._workers.length;let n,r;if(1===t)n=new Uint8ClampedArray(this._dataLookup[0].buffer),r=this._dataLookup[0].meta;else{const i=e.inputs[0].data.length;n=new Uint8ClampedArray(i),r=new Array(t);const o=4*Math.ceil(i/4/t);for(let e=0;e<t;++e){const t=this._dataLookup[e].buffer,i=e*o;n.set(new Uint8ClampedArray(t),i),r[e]=this._dataLookup[e].meta}}this._job=null,this._dataLookup={},e.callback(null,function(e,t,n){if(Fv)return new ImageData(e,t,n);zv||(zv=document.createElement("canvas").getContext("2d"));const r=zv.createImageData(t,n);return r.data.set(e),r}(n,e.inputs[0].width,e.inputs[0].height),r),this._dispatch()}disposeInternal(){for(let e=0;e<this._workers.length;++e)this._workers[e].terminate();this._workers.length=0}}class Bv extends fd{constructor(e,t,n){super(e),this.extent=t.extent,this.resolution=t.viewState.resolution/t.pixelRatio,this.data=n}}class qv extends Ov{constructor(e){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=void 0!==e.operationType?e.operationType:"pixel",this.threads_=void 0!==e.threads?e.threads:1,this.layers_=function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=Wv(e[r]);return n}(e.sources);const t=this.changed.bind(this);for(let e=0,n=this.layers_.length;e<n;++e)this.layers_[e].addEventListener(Md,t);var n;this.useResolutions_=null!==e.resolutions,this.tileQueue_=new Gy((function(){return 1}),this.changed.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:(n=this.layers_,n.map((function(e){return e.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:Gd(this),renderTargets:{}},this.setAttributions((function(t){const n=[];for(let r=0,i=e.sources.length;r<i;++r){const i=e.sources[r],o=i instanceof wg?i:i.getSource();if(!o)continue;const s=o.getAttributions();if("function"==typeof s){const e=s(t);n.push.apply(n,e)}}return 0!==n.length?n:null})),void 0!==e.operation&&this.setOperation(e.operation,e.lib)}setOperation(e,t){this.processor_&&this.processor_.dispose(),this.processor_=new Nv({operation:e,imageOps:"image"===this.operationType_,queue:1,lib:t,threads:this.threads_}),this.changed()}updateFrameState_(e,t,n){const r=Object.assign({},this.frameState_);r.viewState=Object.assign({},r.viewState);const i=op(e);r.size[0]=Math.ceil(pp(e)/t),r.size[1]=Math.ceil(up(e)/t),r.extent=[i[0]-r.size[0]*t/2,i[1]-r.size[1]*t/2,i[0]+r.size[0]*t/2,i[1]+r.size[1]*t/2],r.time=Date.now();const o=r.viewState;return o.center=i,o.projection=n,o.resolution=t,r}allSourcesReady_(){let e,t=!0;for(let n=0,r=this.layers_.length;n<r;++n)if(e=this.layers_[n].getSource(),!e||"ready"!==e.getState()){t=!1;break}return t}getImage(e,t,n,r){if(!this.allSourcesReady_())return null;t=this.findNearestResolution(t);const i=this.updateFrameState_(e,t,r);if(this.requestedFrameState_=i,this.renderedImageCanvas_){const e=this.renderedImageCanvas_.getResolution(),n=this.renderedImageCanvas_.getExtent();t===e&&$h(i.extent,n)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),i.tileQueue.loadMoreTiles(16,16),i.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const e=this.requestedFrameState_,t=this.layers_.length,n=new Array(t);for(let r=0;r<t;++r){e.layerIndex=r,e.renderTargets={};const t=Vv(this.layers_[r],e);if(!t)return;n[r]=t}const r={};this.dispatchEvent(new Bv("beforeoperations",e,r)),this.processor_.process(n,r,this.onWorkerComplete_.bind(this,e))}onWorkerComplete_(e,t,n,r){if(t||!n)return;const i=e.extent,o=e.viewState.resolution;if(o!==this.requestedFrameState_.viewState.resolution||!$h(i,this.requestedFrameState_.extent))return;let s;this.renderedImageCanvas_?s=this.renderedImageCanvas_.getImage().getContext("2d"):(s=qm(Math.round(pp(i)/o),Math.round(up(i)/o)),this.renderedImageCanvas_=new Rv(i,o,1,s.canvas)),s.putImageData(n,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new Bv("afteroperations",e,r)),e.animate&&requestAnimationFrame(this.changed.bind(this))}getResolutions(e){if(!this.useResolutions_)return null;let t=super.getResolutions();if(!t)for(let n=0,r=this.layers_.length;n<r&&(t=this.layers_[n].getSource().getResolutions(e),!t);++n);return t}disposeInternal(){this.processor_&&this.processor_.dispose(),super.disposeInternal()}}qv.prototype.dispose;let Gv=null;function Vv(e,t){const n=e.getRenderer();if(!n)throw new Error("Unsupported layer type: "+e);if(!n.prepareFrame(t))return null;const r=t.size[0],i=t.size[1];if(0===r||0===i)return null;const o=n.renderFrame(t,null);let s;if(o instanceof HTMLCanvasElement)s=o;else{if(o&&(s=o.firstElementChild),!(s instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+s);if(s.width===r&&s.height===i)return s.getContext("2d").getImageData(0,0,r,i)}if(Gv){const e=Gv.canvas;e.width!==r||e.height!==i?Gv=qm(r,i,void 0,{willReadFrequently:!0}):Gv.clearRect(0,0,r,i)}else Gv=qm(r,i,void 0,{willReadFrequently:!0});return Gv.drawImage(s,0,0,r,i),Gv.getImageData(0,0,r,i)}function Wv(e){let t;return e instanceof wg?e instanceof Pg?t=new fg({source:e}):e instanceof Ov&&(t=new uy({source:e})):t=e,t}const Hv=qv,Uv=class extends Dg{constructor(e){if(super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:zp("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:"loading",tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:e.zDirection}),this.tileJSON_=null,this.tileSize_=e.tileSize,e.url)if(e.jsonp)!function(e,t,n,r){const i=document.createElement("script"),o="olc_"+Gd(t);function s(){delete window[o],i.parentNode.removeChild(i)}i.async=!0,i.src=e+(e.includes("?")?"&":"?")+"callback="+o;const a=setTimeout((function(){s(),n&&n()}),1e4);window[o]=function(e){clearTimeout(a),s(),t(e)},document.head.appendChild(i)}(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",e.url),t.send()}else e.tileJSON?this.handleTileJSONResponse(e.tileJSON):Xd(!1,51)}onXHRLoad_(e){const t=e.target;if(!t.status||t.status>=200&&t.status<300){let e;try{e=JSON.parse(t.responseText)}catch(e){return void this.handleTileJSONError()}this.handleTileJSONResponse(e)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const t=zp("EPSG:4326"),n=this.getProjection();let r;if(void 0!==e.bounds){const i=Gp(t,n);r=gp(e.bounds,i)}const i=Mg(n),o=e.minzoom||0,s=Ag({extent:i,maxZoom:e.maxzoom||22,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=s,this.tileUrlFunction=Ig(e.tiles,s),e.attribution&&!this.getAttributions()){const t=void 0!==r?r:i;this.setAttributions((function(n){return fp(t,n.extent)?[e.attribution]:null}))}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}};var Zv=n(6656);function Xv(e){return new N_({fill:Kv(e,""),stroke:$v(e,""),text:Yv(e),image:Qv(e)})}function Kv(e,t){const n=e[t+"fill-color"];if(n)return new y_({color:n})}function $v(e,t){const n=e[t+"stroke-width"],r=e[t+"stroke-color"];if(n||r)return new L_({width:n,color:r,lineCap:e[t+"stroke-line-cap"],lineJoin:e[t+"stroke-line-join"],lineDash:e[t+"stroke-line-dash"],lineDashOffset:e[t+"stroke-line-dash-offset"],miterLimit:e[t+"stroke-miter-limit"]})}function Yv(e){const t=e["text-value"];if(t)return new q_({text:t,font:e["text-font"],maxAngle:e["text-max-angle"],offsetX:e["text-offset-x"],offsetY:e["text-offset-y"],overflow:e["text-overflow"],placement:e["text-placement"],repeat:e["text-repeat"],scale:e["text-scale"],rotateWithView:e["text-rotate-with-view"],rotation:e["text-rotation"],textAlign:e["text-align"],justify:e["text-justify"],textBaseline:e["text-baseline"],padding:e["text-padding"],fill:Kv(e,"text-"),backgroundFill:Kv(e,"text-background-"),stroke:$v(e,"text-"),backgroundStroke:$v(e,"text-background-")})}function Qv(e){const t=e["icon-src"],n=e["icon-img"];if(t||n)return new S_({src:t,img:n,imgSize:e["icon-img-size"],anchor:e["icon-anchor"],anchorOrigin:e["icon-anchor-origin"],anchorXUnits:e["icon-anchor-x-units"],anchorYUnits:e["icon-anchor-y-units"],color:e["icon-color"],crossOrigin:e["icon-cross-origin"],offset:e["icon-offset"],displacement:e["icon-displacement"],opacity:e["icon-opacity"],scale:e["icon-scale"],width:e["icon-width"],height:e["icon-height"],rotation:e["icon-rotation"],rotateWithView:e["icon-rotate-with-view"],size:e["icon-size"],declutterMode:e["icon-declutter-mode"]});const r=e["shape-points"];if(r){const t="shape-";return new f_({points:r,fill:Kv(e,t),stroke:$v(e,t),radius:e["shape-radius"],radius1:e["shape-radius1"],radius2:e["shape-radius2"],angle:e["shape-angle"],displacement:e["shape-displacement"],rotation:e["shape-rotation"],rotateWithView:e["shape-rotate-with-view"],scale:e["shape-scale"],declutterMode:e["shape-declutter-mode"]})}const i=e["circle-radius"];if(i){const t="circle-";return new g_({radius:i,fill:Kv(e,t),stroke:$v(e,t),displacement:e["circle-displacement"],scale:e["circle-scale"],rotation:e["circle-rotation"],rotateWithView:e["circle-rotate-with-view"],declutterMode:e["circle-declutter-mode"]})}}const Jv="renderOrder",eb=class extends Mm{constructor(e){e=e||{};const t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=void 0!==e.declutter&&e.declutter,this.renderBuffer_=void 0!==e.renderBuffer?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=void 0!==e.updateWhileAnimating&&e.updateWhileAnimating,this.updateWhileInteracting_=void 0!==e.updateWhileInteracting&&e.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Jv)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e){e.declutterTree||(e.declutterTree=new Zv(9)),this.getRenderer().renderDeclutter(e)}setRenderOrder(e){this.set(Jv,e)}setStyle(e){let t;if(void 0===e)t=F_;else if(null===e)t=null;else if("function"==typeof e)t=e;else if(e instanceof N_)t=e;else if(Array.isArray(e)){const n=e.length,r=new Array(n);for(let t=0;t<n;++t){const n=e[t];r[t]=n instanceof N_?n:Xv(n)}t=r}else t=Xv(e);this.style_=t,this.styleFunction_=null===e?void 0:function(e){let t;if("function"==typeof e)t=e;else{let n;Array.isArray(e)?n=e:(Xd("function"==typeof e.getZIndex,41),n=[e]),t=function(){return n}}return t}(this.style_),this.changed()}},tb={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},nb=[tb.FILL],rb=[tb.STROKE],ib=[tb.BEGIN_PATH],ob=[tb.CLOSE_PATH],sb=tb,ab=class{drawCustom(e,t,n,r){}drawGeometry(e){}setStyle(e){}drawCircle(e,t){}drawFeature(e,t){}drawGeometryCollection(e,t){}drawLineString(e,t){}drawMultiLineString(e,t){}drawMultiPoint(e,t){}drawMultiPolygon(e,t){}drawPoint(e,t){}drawPolygon(e,t){}drawText(e,t){}setFillStrokeStyle(e,t){}setImageStyle(e,t){}setTextStyle(e,t){}},lb=class extends ab{constructor(e,t,n,r){super(),this.tolerance=e,this.maxExtent=t,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(e){const t=this.pixelRatio;return 1==t?e:e.map((function(e){return e*t}))}appendFlatPointCoordinates(e,t){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,i=this.coordinates;let o=i.length;for(let s=0,a=e.length;s<a;s+=t)r[0]=e[s],r[1]=e[s+1],Gh(n,r)&&(i[o++]=r[0],i[o++]=r[1]);return o}appendFlatLineCoordinates(e,t,n,r,i,o){const s=this.coordinates;let a=s.length;const l=this.getBufferedMaxExtent();o&&(t+=r);let u=e[t],c=e[t+1];const d=this.tmpCoordinate_;let h,p,f,m=!0;for(h=t+r;h<n;h+=r)d[0]=e[h],d[1]=e[h+1],f=Hh(l,d),f!==p?(m&&(s[a++]=u,s[a++]=c,m=!1),s[a++]=d[0],s[a++]=d[1]):f===Dh.INTERSECTING?(s[a++]=d[0],s[a++]=d[1],m=!1):m=!0,u=d[0],c=d[1],p=f;return(i&&m||h===t+r)&&(s[a++]=u,s[a++]=c),a}drawCustomCoordinates_(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o){const s=n[o],a=this.appendFlatLineCoordinates(e,t,s,r,!1,!1);i.push(a),t=s}return t}drawCustom(e,t,n,r){this.beginGeometry(e,t);const i=e.getType(),o=e.getStride(),s=this.coordinates.length;let a,l,u,c,d;switch(i){case"MultiPolygon":a=e.getOrientedFlatCoordinates(),c=[];const t=e.getEndss();d=0;for(let e=0,n=t.length;e<n;++e){const n=[];d=this.drawCustomCoordinates_(a,d,t[e],o,n),c.push(n)}this.instructions.push([sb.CUSTOM,s,c,e,n,Qf]),this.hitDetectionInstructions.push([sb.CUSTOM,s,c,e,r||n,Qf]);break;case"Polygon":case"MultiLineString":u=[],a="Polygon"==i?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),d=this.drawCustomCoordinates_(a,0,e.getEnds(),o,u),this.instructions.push([sb.CUSTOM,s,u,e,n,Yf]),this.hitDetectionInstructions.push([sb.CUSTOM,s,u,e,r||n,Yf]);break;case"LineString":case"Circle":a=e.getFlatCoordinates(),l=this.appendFlatLineCoordinates(a,0,a.length,o,!1,!1),this.instructions.push([sb.CUSTOM,s,l,e,n,$f]),this.hitDetectionInstructions.push([sb.CUSTOM,s,l,e,r||n,$f]);break;case"MultiPoint":a=e.getFlatCoordinates(),l=this.appendFlatPointCoordinates(a,o),l>s&&(this.instructions.push([sb.CUSTOM,s,l,e,n,$f]),this.hitDetectionInstructions.push([sb.CUSTOM,s,l,e,r||n,$f]));break;case"Point":a=e.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),l=this.coordinates.length,this.instructions.push([sb.CUSTOM,s,l,e,n]),this.hitDetectionInstructions.push([sb.CUSTOM,s,l,e,r||n])}this.endGeometry(t)}beginGeometry(e,t){this.beginGeometryInstruction1_=[sb.BEGIN_GEOMETRY,t,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[sb.BEGIN_GEOMETRY,t,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;let t;e.reverse();const n=e.length;let r,i,o=-1;for(t=0;t<n;++t)r=e[t],i=r[0],i==sb.END_GEOMETRY?o=t:i==sb.BEGIN_GEOMETRY&&(r[2]=t,vd(this.hitDetectionInstructions,o,t),o=-1)}setFillStrokeStyle(e,t){const n=this.state;if(e){const t=e.getColor();n.fillStyle=qg(t||$g)}else n.fillStyle=void 0;if(t){const e=t.getColor();n.strokeStyle=qg(e||e_);const r=t.getLineCap();n.lineCap=void 0!==r?r:Yg;const i=t.getLineDash();n.lineDash=i?i.slice():Qg;const o=t.getLineDashOffset();n.lineDashOffset=o||0;const s=t.getLineJoin();n.lineJoin=void 0!==s?s:Jg;const a=t.getWidth();n.lineWidth=void 0!==a?a:1;const l=t.getMiterLimit();n.miterLimit=void 0!==l?l:10,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(e){const t=e.fillStyle,n=[sb.SET_FILL_STYLE,t];return"string"!=typeof t&&n.push(!0),n}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[sb.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,t){const n=e.fillStyle;"string"==typeof n&&e.currentFillStyle==n||(void 0!==n&&this.instructions.push(t.call(this,e)),e.currentFillStyle=n)}updateStrokeStyle(e,t){const n=e.strokeStyle,r=e.lineCap,i=e.lineDash,o=e.lineDashOffset,s=e.lineJoin,a=e.lineWidth,l=e.miterLimit;(e.currentStrokeStyle!=n||e.currentLineCap!=r||i!=e.currentLineDash&&!xd(e.currentLineDash,i)||e.currentLineDashOffset!=o||e.currentLineJoin!=s||e.currentLineWidth!=a||e.currentMiterLimit!=l)&&(void 0!==n&&t.call(this,e),e.currentStrokeStyle=n,e.currentLineCap=r,e.currentLineDash=i,e.currentLineDashOffset=o,e.currentLineJoin=s,e.currentLineWidth=a,e.currentMiterLimit=l)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const t=[sb.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Bh(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;Nh(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},ub=class extends lb{constructor(e,t,n,r){super(e,t,n,r)}drawFlatCoordinatess_(e,t,n,r){const i=this.state,o=void 0!==i.fillStyle,s=void 0!==i.strokeStyle,a=n.length;this.instructions.push(ib),this.hitDetectionInstructions.push(ib);for(let i=0;i<a;++i){const o=n[i],a=this.coordinates.length,l=this.appendFlatLineCoordinates(e,t,o,r,!0,!s),u=[sb.MOVE_TO_LINE_TO,a,l];this.instructions.push(u),this.hitDetectionInstructions.push(u),s&&(this.instructions.push(ob),this.hitDetectionInstructions.push(ob)),t=o}return o&&(this.instructions.push(nb),this.hitDetectionInstructions.push(nb)),s&&(this.instructions.push(rb),this.hitDetectionInstructions.push(rb)),t}drawCircle(e,t){const n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0===r&&void 0===i)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([sb.SET_FILL_STYLE,$g]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([sb.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const o=e.getFlatCoordinates(),s=e.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);const l=[sb.CIRCLE,a];this.instructions.push(ib,l),this.hitDetectionInstructions.push(ib,l),void 0!==n.fillStyle&&(this.instructions.push(nb),this.hitDetectionInstructions.push(nb)),void 0!==n.strokeStyle&&(this.instructions.push(rb),this.hitDetectionInstructions.push(rb)),this.endGeometry(t)}drawPolygon(e,t){const n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0===r&&void 0===i)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([sb.SET_FILL_STYLE,$g]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([sb.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const o=e.getEnds(),s=e.getOrientedFlatCoordinates(),a=e.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(t)}drawMultiPolygon(e,t){const n=this.state,r=n.fillStyle,i=n.strokeStyle;if(void 0===r&&void 0===i)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([sb.SET_FILL_STYLE,$g]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([sb.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const o=e.getEndss(),s=e.getOrientedFlatCoordinates(),a=e.getStride();let l=0;for(let e=0,t=o.length;e<t;++e)l=this.drawFlatCoordinatess_(s,l,o[e],a);this.endGeometry(t)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const e=this.tolerance;if(0!==e){const t=this.coordinates;for(let n=0,r=t.length;n<r;++n)t[n]=Zf(t[n],e)}return super.finish()}setFillStrokeStyles_(){const e=this.state;void 0!==e.fillStyle&&this.updateFillStyle(e,this.createFill),void 0!==e.strokeStyle&&this.updateStrokeStyle(e,this.applyStroke)}};function cb(e,t,n,r,i){const o=[];let s=n,a=0,l=t.slice(n,2);for(;a<e&&s+i<r;){const[n,r]=l.slice(-2),u=t[s+i],c=t[s+i+1],d=Math.sqrt((u-n)*(u-n)+(c-r)*(c-r));if(a+=d,a>=e){const t=(e-a+d)/d,h=dh(n,u,t),p=dh(r,c,t);l.push(h,p),o.push(l),l=[h,p],a==e&&(s+=i),a=0}else if(a<e)l.push(t[s+i],t[s+i+1]),s+=i;else{const e=d-a,t=dh(n,u,e/d),h=dh(r,c,e/d);l.push(t,h),o.push(l),l=[t,h],a=0,s+=i}}return a>0&&o.push(l),o}function db(e,t,n,r,i){let o,s,a,l,u,c,d,h,p,f,m=n,g=n,_=0,y=0,v=n;for(s=n;s<r;s+=i){const n=t[s],r=t[s+1];void 0!==u&&(p=n-u,f=r-c,l=Math.sqrt(p*p+f*f),void 0!==d&&(y+=a,o=Math.acos((d*p+h*f)/(a*l)),o>e&&(y>_&&(_=y,m=v,g=s),y=0,v=s-i)),a=l,d=p,h=f),u=n,c=r}return y+=l,y>_?[v,s]:[m,g]}const hb={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},pb={Circle:ub,Default:lb,Image:class extends lb{constructor(e,t,n,r){super(e,t,n,r),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(e,t){if(!this.image_)return;this.beginGeometry(e,t);const n=e.getFlatCoordinates(),r=e.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([sb.DRAW_IMAGE,i,o,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([sb.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}drawMultiPoint(e,t){if(!this.image_)return;this.beginGeometry(e,t);const n=e.getFlatCoordinates(),r=e.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([sb.DRAW_IMAGE,i,o,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([sb.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}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(e,t){const n=e.getAnchor(),r=e.getSize(),i=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=e.getOpacity(),this.originX_=i[0],this.originY_=i[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=r[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}},LineString:class extends lb{constructor(e,t,n,r){super(e,t,n,r)}drawFlatCoordinates_(e,t,n,r){const i=this.coordinates.length,o=this.appendFlatLineCoordinates(e,t,n,r,!1,!1),s=[sb.MOVE_TO_LINE_TO,i,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n}drawLineString(e,t){const n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0===r||void 0===i)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([sb.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Qg,0],ib);const o=e.getFlatCoordinates(),s=e.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(rb),this.endGeometry(t)}drawMultiLineString(e,t){const n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0===r||void 0===i)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([sb.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],ib);const o=e.getEnds(),s=e.getFlatCoordinates(),a=e.getStride();let l=0;for(let e=0,t=o.length;e<t;++e)l=this.drawFlatCoordinates_(s,l,o[e],a);this.hitDetectionInstructions.push(rb),this.endGeometry(t)}finish(){const e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(rb),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(rb),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(ib)}},Polygon:ub,Text:class extends lb{constructor(e,t,n,r){super(e,t,n,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,t){const n=this.textFillState_,r=this.textStrokeState_,i=this.textState_;if(""===this.text_||!i||!n&&!r)return;const o=this.coordinates;let s=o.length;const a=e.getType();let l=null,u=e.getStride();if("line"!==i.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){let n=i.overflow?null:[];switch(a){case"Point":case"MultiPoint":l=e.getFlatCoordinates();break;case"LineString":l=e.getFlatMidpoint();break;case"Circle":l=e.getCenter();break;case"MultiLineString":l=e.getFlatMidpoints(),u=2;break;case"Polygon":l=e.getFlatInteriorPoint(),i.overflow||n.push(l[2]/this.resolution),u=3;break;case"MultiPolygon":const t=e.getFlatInteriorPoints();l=[];for(let e=0,r=t.length;e<r;e+=3)i.overflow||n.push(t[e+2]/this.resolution),l.push(t[e],t[e+1]);if(0===l.length)return;u=2}const r=this.appendFlatPointCoordinates(l,u);if(r===s)return;if(n&&(r-s)/2!=l.length/u){let e=s/2;n=n.filter(((t,n)=>{const r=o[2*(e+n)]===l[n*u]&&o[2*(e+n)+1]===l[n*u+1];return r||--e,r}))}this.saveTextStates_(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,t);let c=i.padding;if(c!=r_&&(i.scale[0]<0||i.scale[1]<0)){let e=i.padding[0],t=i.padding[1],n=i.padding[2],r=i.padding[3];i.scale[0]<0&&(t=-t,r=-r),i.scale[1]<0&&(e=-e,n=-n),c=[e,t,n,r]}const d=this.pixelRatio;this.instructions.push([sb.DRAW_IMAGE,s,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==r_?r_:c.map((function(e){return e*d})),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const h=1/d;this.hitDetectionInstructions.push([sb.DRAW_IMAGE,s,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[h,h],NaN,void 0,this.declutterImageWithText_,c,!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),this.endGeometry(t)}else{if(!fp(this.getBufferedMaxExtent(),e.getExtent()))return;let n;if(l=e.getFlatCoordinates(),"LineString"==a)n=[l.length];else if("MultiLineString"==a)n=e.getEnds();else if("Polygon"==a)n=e.getEnds().slice(0,1);else if("MultiPolygon"==a){const t=e.getEndss();n=[];for(let e=0,r=t.length;e<r;++e)n.push(t[e][0])}this.beginGeometry(e,t);const r=i.repeat,c=r?void 0:i.textAlign;let d=0;for(let e=0,t=n.length;e<t;++e){let t;t=r?cb(r*this.resolution,l,d,n[e],u):[l.slice(d,n[e])];for(let r=0,a=t.length;r<a;++r){const a=t[r];let l=0,h=a.length;if(null==c){const e=db(i.maxAngle,a,0,a.length,2);l=e[0],h=e[1]}for(let e=l;e<h;e+=u)o.push(a[e],a[e+1]);const p=o.length;d=n[e],this.drawChars_(s,p),s=p}}this.endGeometry(t)}}saveTextStates_(){const e=this.textStrokeState_,t=this.textState_,n=this.textFillState_,r=this.strokeKey_;e&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const i=this.textKey_;i in this.textStates||(this.textStates[i]={font:t.font,textAlign:t.textAlign||t_,justify:t.justify,textBaseline:t.textBaseline||n_,scale:t.scale});const o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))}drawChars_(e,t){const n=this.textStrokeState_,r=this.textState_,i=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,l=hb[r.textBaseline],u=this.textOffsetY_*a,c=this.text_,d=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([sb.DRAW_CHARS,e,t,l,r.overflow,s,r.maxAngle,a,u,i,d*a,c,o,1]),this.hitDetectionInstructions.push([sb.DRAW_CHARS,e,t,l,r.overflow,s,r.maxAngle,1,u,i,d,c,o,1/a])}setTextStyle(e,t){let n,r,i;if(e){const t=e.getFill();t?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=qg(t.getColor()||$g)):(r=null,this.textFillState_=r);const o=e.getStroke();if(o){i=this.textStrokeState_,i||(i={},this.textStrokeState_=i);const e=o.getLineDash(),t=o.getLineDashOffset(),n=o.getWidth(),r=o.getMiterLimit();i.lineCap=o.getLineCap()||Yg,i.lineDash=e?e.slice():Qg,i.lineDashOffset=void 0===t?0:t,i.lineJoin=o.getLineJoin()||Jg,i.lineWidth=void 0===n?1:n,i.miterLimit=void 0===r?10:r,i.strokeStyle=qg(o.getColor()||e_)}else i=null,this.textStrokeState_=i;n=this.textState_;const s=e.getFont()||Kg;l_(s);const a=e.getScaleArray();n.overflow=e.getOverflow(),n.font=s,n.maxAngle=e.getMaxAngle(),n.placement=e.getPlacement(),n.textAlign=e.getTextAlign(),n.repeat=e.getRepeat(),n.justify=e.getJustify(),n.textBaseline=e.getTextBaseline()||n_,n.backgroundFill=e.getBackgroundFill(),n.backgroundStroke=e.getBackgroundStroke(),n.padding=e.getPadding()||r_,n.scale=void 0===a?[1,1]:a;const l=e.getOffsetX(),u=e.getOffsetY(),c=e.getRotateWithView(),d=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=void 0===l?0:l,this.textOffsetY_=void 0===u?0:u,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0===d?0:d,this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:Gd(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+Gd(r.fillStyle):""}else this.text_="";this.declutterImageWithText_=t}}},fb=class{constructor(e,t,n,r){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const e={};for(const t in this.buildersByZIndex_){e[t]=e[t]||{};const n=this.buildersByZIndex_[t];for(const r in n){const i=n[r].finish();e[t][r]=i}}return e}getBuilder(e,t){const n=void 0!==e?e.toString():"0";let r=this.buildersByZIndex_[n];void 0===r&&(r={},this.buildersByZIndex_[n]=r);let i=r[t];return void 0===i&&(i=new(0,pb[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=i),i}};function mb(e,t,n,r,i,o,s,a,l,u,c,d){let h=e[t],p=e[t+1],f=0,m=0,g=0,_=0;function y(){f=h,m=p,h=e[t+=r],p=e[t+1],_+=g,g=Math.sqrt((h-f)*(h-f)+(p-m)*(p-m))}do{y()}while(t<n-r&&_+g<o);let v=0===g?0:(o-_)/g;const b=dh(f,h,v),x=dh(m,p,v),w=t-r,k=_,C=o+a*l(u,i,c);for(;t<n-r&&_+g<C;)y();v=0===g?0:(C-_)/g;const S=dh(f,h,v),A=dh(m,p,v);let E;if(d){const e=[b,x,S,A];Lf(e,0,4,2,d,e,e),E=e[0]>e[2]}else E=b>S;const M=Math.PI,T=[],P=w+r===t;let R;if(g=0,_=k,h=e[t=w],p=e[t+1],P){y(),R=Math.atan2(p-m,h-f),E&&(R+=R>0?-M:M);const e=(S+b)/2,t=(A+x)/2;return T[0]=[e,t,(C-o)/2,R,i],T}for(let e=0,d=(i=i.replace(/\n/g," ")).length;e<d;){y();let b=Math.atan2(p-m,h-f);if(E&&(b+=b>0?-M:M),void 0!==R){let e=b-R;if(e+=e>M?-2*M:e<-M?2*M:0,Math.abs(e)>s)return null}R=b;const x=e;let w=0;for(;e<d;++e){const s=a*l(u,i[E?d-e-1:e],c);if(t+r<n&&_+g<o+w+s/2)break;w+=s}if(e===x)continue;const k=E?i.substring(d-x,d-e):i.substring(x,e);v=0===g?0:(o+w/2-_)/g;const C=dh(f,h,v),S=dh(m,p,v);T.push([C,S,w/2,b,k]),o+=w}return T}const gb=[1/0,1/0,-1/0,-1/0],_b=[],yb=[],vb=[],bb=[];function xb(e){return e[3].declutterBox}const wb=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 kb(e,t){return"start"!==t&&"end"!==t||wb.test(e)||(t="start"===t?"left":"right"),hb[t]}function Cb(e,t,n){return n>0&&e.push("\n",""),e.push(t,""),e}const Sb=class{constructor(e,t,n,r){this.overlaps=n,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}createLabel(e,t,n,r){const i=e+t+n+r;if(this.labels_[i])return this.labels_[i];const o=r?this.strokeStates[r]:null,s=n?this.fillStates[n]:null,a=this.textStates[t],l=this.pixelRatio,u=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(e),d=a.justify?hb[a.justify]:kb(Array.isArray(e)?e[0]:e,a.textAlign||t_),h=r&&o.lineWidth?o.lineWidth:0,p=c?e:e.split("\n").reduce(Cb,[]),{width:f,height:m,widths:g,heights:_,lineWidths:y}=function(e,t){const n=[],r=[],i=[];let o=0,s=0,a=0,l=0;for(let u=0,c=t.length;u<=c;u+=2){const d=t[u];if("\n"===d||u===c){o=Math.max(o,s),i.push(s),s=0,a+=l;continue}const h=t[u+1]||e.font,p=d_(h,d);n.push(p),s+=p;const f=u_(h);r.push(f),l=Math.max(l,f)}return{width:o,height:a,widths:n,heights:r,lineWidths:i}}(a,p),v=f+h,b=[],x=(v+2)*u[0],w=(m+h)*u[1],k={width:x<0?Math.floor(x):Math.ceil(x),height:w<0?Math.floor(w):Math.ceil(w),contextInstructions:b};1==u[0]&&1==u[1]||b.push("scale",u),r&&(b.push("strokeStyle",o.strokeStyle),b.push("lineWidth",h),b.push("lineCap",o.lineCap),b.push("lineJoin",o.lineJoin),b.push("miterLimit",o.miterLimit),b.push("setLineDash",[o.lineDash]),b.push("lineDashOffset",o.lineDashOffset)),n&&b.push("fillStyle",s.fillStyle),b.push("textBaseline","middle"),b.push("textAlign","center");const C=.5-d;let S=d*v+C*h;const A=[],E=[];let M,T=0,P=0,R=0,I=0;for(let e=0,t=p.length;e<t;e+=2){const t=p[e];if("\n"===t){P+=T,T=0,S=d*v+C*h,++I;continue}const i=p[e+1]||a.font;i!==M&&(r&&A.push("font",i),n&&E.push("font",i),M=i),T=Math.max(T,_[R]);const o=[t,S+C*g[R]+d*(g[R]-y[I]),.5*(h+T)+P];S+=g[R],r&&A.push("strokeText",o),n&&E.push("fillText",o),++R}return Array.prototype.push.apply(b,A),Array.prototype.push.apply(b,E),this.labels_[i]=k,k}replayTextBackground_(e,t,n,r,i,o,s){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,t),o&&(this.alignFill_=o[2],this.fill_(e)),s&&(this.setStrokeStyle_(e,s),e.stroke())}calculateImageOrLabelDimensions_(e,t,n,r,i,o,s,a,l,u,c,d,h,p,f,m){let g=n-(s*=d[0]),_=r-(a*=d[1]);const y=i+l>e?e-l:i,v=o+u>t?t-u:o,b=p[3]+y*d[0]+p[1],x=p[0]+v*d[1]+p[2],w=g-p[3],k=_-p[0];let C;return(f||0!==c)&&(_b[0]=w,bb[0]=w,_b[1]=k,yb[1]=k,yb[0]=w+b,vb[0]=yb[0],vb[1]=k+x,bb[1]=vb[1]),0!==c?(C=Mf([1,0,0,1,0,0],n,r,1,1,c,-n,-r),Af(C,_b),Af(C,yb),Af(C,vb),Af(C,bb),Uh(Math.min(_b[0],yb[0],vb[0],bb[0]),Math.min(_b[1],yb[1],vb[1],bb[1]),Math.max(_b[0],yb[0],vb[0],bb[0]),Math.max(_b[1],yb[1],vb[1],bb[1]),gb)):Uh(Math.min(w,w+b),Math.min(k,k+x),Math.max(w,w+b),Math.max(k,k+x),gb),h&&(g=Math.round(g),_=Math.round(_)),{drawImageX:g,drawImageY:_,drawImageW:y,drawImageH:v,originX:l,originY:u,declutterBox:{minX:gb[0],minY:gb[1],maxX:gb[2],maxY:gb[3],value:m},canvasTransform:C,scale:d}}replayImageOrLabel_(e,t,n,r,i,o,s){const a=!(!o&&!s),l=r.declutterBox,u=e.canvas,c=s?s[2]*r.scale[0]/2:0;return l.minX-c<=u.width/t&&l.maxX+c>=0&&l.minY-c<=u.height/t&&l.maxY+c>=0&&(a&&this.replayTextBackground_(e,_b,yb,vb,bb,o,s),function(e,t,n,r,i,o,s,a,l,u,c){e.save(),1!==n&&(e.globalAlpha*=n),t&&e.setTransform.apply(e,t),r.contextInstructions?(e.translate(l,u),e.scale(c[0],c[1]),function(e,t){const n=e.contextInstructions;for(let e=0,r=n.length;e<r;e+=2)Array.isArray(n[e+1])?t[n[e]].apply(t,n[e+1]):t[n[e]]=n[e+1]}(r,e)):c[0]<0||c[1]<0?(e.translate(l,u),e.scale(c[0],c[1]),e.drawImage(r,i,o,s,a,0,0,s,a)):e.drawImage(r,i,o,s,a,l,u,s*c[0],a*c[1]),e.restore()}(e,r.canvasTransform,i,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(e){if(this.alignFill_){const t=Af(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;e.save(),e.translate(t[0]%n,t[1]%n),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}drawLabelWithPointPlacement_(e,t,n,r){const i=this.textStates[t],o=this.createLabel(e,t,r,n),s=this.strokeStates[n],a=this.pixelRatio,l=kb(Array.isArray(e)?e[0]:e,i.textAlign||t_),u=hb[i.textBaseline||n_],c=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*i.scale[0])+2*(.5-l)*c,anchorY:u*o.height/a+2*(.5-u)*c}}execute_(e,t,n,r,i,o,s,a){let l;var u,c;this.pixelCoordinates_&&xd(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=If(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),c=n,(u=this.renderedTransform_)[0]=c[0],u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5]);let d=0;const h=r.length;let p,f,m,g,_,y,v,b,x,w,k,C,S=0,A=0,E=0,M=null,T=null;const P=this.coordinateCache_,R=this.viewRotation_,I=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,L={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:R},O=this.instructions!=r||this.overlaps?0:200;let z,F,D,j;for(;d<h;){const n=r[d];switch(n[0]){case sb.BEGIN_GEOMETRY:z=n[1],j=n[3],z.getGeometry()?void 0===s||fp(s,j.getExtent())?++d:d=n[2]+1:d=n[2];break;case sb.BEGIN_PATH:A>O&&(this.fill_(e),A=0),E>O&&(e.stroke(),E=0),A||E||(e.beginPath(),g=NaN,_=NaN),++d;break;case sb.CIRCLE:S=n[1];const r=l[S],u=l[S+1],c=l[S+2]-r,h=l[S+3]-u,N=Math.sqrt(c*c+h*h);e.moveTo(r+N,u),e.arc(r,u,N,0,2*Math.PI,!0),++d;break;case sb.CLOSE_PATH:e.closePath(),++d;break;case sb.CUSTOM:S=n[1],p=n[2];const B=n[3],q=n[4],G=6==n.length?n[5]:void 0;L.geometry=B,L.feature=z,d in P||(P[d]=[]);const V=P[d];G?G(l,S,p,2,V):(V[0]=l[S],V[1]=l[S+1],V.length=2),q(V,L),++d;break;case sb.DRAW_IMAGE:S=n[1],p=n[2],b=n[3],f=n[4],m=n[5];let W=n[6];const H=n[7],U=n[8],Z=n[9],X=n[10];let K=n[11];const $=n[12];let Y=n[13];const Q=n[14],J=n[15];if(!b&&n.length>=20){x=n[19],w=n[20],k=n[21],C=n[22];const e=this.drawLabelWithPointPlacement_(x,w,k,C);b=e.label,n[3]=b;const t=n[23];f=(e.anchorX-t)*this.pixelRatio,n[4]=f;const r=n[24];m=(e.anchorY-r)*this.pixelRatio,n[5]=m,W=b.height,n[6]=W,Y=b.width,n[13]=Y}let ee,te,ne,re;n.length>25&&(ee=n[25]),n.length>17?(te=n[16],ne=n[17],re=n[18]):(te=r_,ne=!1,re=!1),X&&I?K+=R:X||I||(K-=R);let ie=0;for(;S<p;S+=2){if(ee&&ee[ie++]<Y/this.pixelRatio)continue;const n=this.calculateImageOrLabelDimensions_(b.width,b.height,l[S],l[S+1],Y,W,f,m,U,Z,K,$,i,te,ne||re,z),r=[e,t,b,n,H,ne?M:null,re?T:null];if(a){if("none"===Q)continue;if("obstacle"===Q){a.insert(n.declutterBox);continue}{let e,t;if(J){const n=p-S;if(!J[n]){J[n]=r;continue}if(e=J[n],delete J[n],t=xb(e),a.collides(t))continue}if(a.collides(n.declutterBox))continue;e&&(a.insert(t),this.replayImageOrLabel_.apply(this,e)),a.insert(n.declutterBox)}}this.replayImageOrLabel_.apply(this,r)}++d;break;case sb.DRAW_CHARS:const oe=n[1],se=n[2],ae=n[3],le=n[4];C=n[5];const ue=n[6],ce=n[7],de=n[8];k=n[9];const he=n[10];x=n[11],w=n[12];const pe=[n[13],n[13]],fe=this.textStates[w],me=fe.font,ge=[fe.scale[0]*ce,fe.scale[1]*ce];let _e;me in this.widths_?_e=this.widths_[me]:(_e={},this.widths_[me]=_e);const ye=K_(l,oe,se,2),ve=Math.abs(ge[0])*h_(me,x,_e);if(le||ve<=ye){const n=this.textStates[w].textAlign,r=mb(l,oe,se,2,x,(ye-ve)*hb[n],ue,Math.abs(ge[0]),h_,me,_e,I?0:this.viewRotation_);e:if(r){const n=[];let i,o,s,l,u;if(k)for(i=0,o=r.length;i<o;++i){u=r[i],s=u[4],l=this.createLabel(s,w,"",k),f=u[2]+(ge[0]<0?-he:he),m=ae*l.height+2*(.5-ae)*he*ge[1]/ge[0]-de;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,u[0],u[1],l.width,l.height,f,m,0,0,u[3],pe,!1,r_,!1,z);if(a&&a.collides(o.declutterBox))break e;n.push([e,t,l,o,1,null,null])}if(C)for(i=0,o=r.length;i<o;++i){u=r[i],s=u[4],l=this.createLabel(s,w,C,""),f=u[2],m=ae*l.height-de;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,u[0],u[1],l.width,l.height,f,m,0,0,u[3],pe,!1,r_,!1,z);if(a&&a.collides(o.declutterBox))break e;n.push([e,t,l,o,1,null,null])}a&&a.load(n.map(xb));for(let e=0,t=n.length;e<t;++e)this.replayImageOrLabel_.apply(this,n[e])}}++d;break;case sb.END_GEOMETRY:if(void 0!==o){z=n[1];const e=o(z,j);if(e)return e}++d;break;case sb.FILL:O?A++:this.fill_(e),++d;break;case sb.MOVE_TO_LINE_TO:for(S=n[1],p=n[2],F=l[S],D=l[S+1],y=F+.5|0,v=D+.5|0,y===g&&v===_||(e.moveTo(F,D),g=y,_=v),S+=2;S<p;S+=2)F=l[S],D=l[S+1],y=F+.5|0,v=D+.5|0,S!=p-2&&y===g&&v===_||(e.lineTo(F,D),g=y,_=v);++d;break;case sb.SET_FILL_STYLE:M=n,this.alignFill_=n[2],A&&(this.fill_(e),A=0,E&&(e.stroke(),E=0)),e.fillStyle=n[1],++d;break;case sb.SET_STROKE_STYLE:T=n,E&&(e.stroke(),E=0),this.setStrokeStyle_(e,n),++d;break;case sb.STROKE:O?E++:e.stroke(),++d;break;default:++d}}A&&this.fill_(e),E&&e.stroke()}execute(e,t,n,r,i,o){this.viewRotation_=r,this.execute_(e,t,n,this.instructions,i,void 0,void 0,o)}executeHitDetection(e,t,n,r,i){return this.viewRotation_=n,this.execute_(e,1,t,this.hitDetectionInstructions,!0,r,i)}},Ab=["Polygon","Circle","LineString","Image","Text","Default"],Eb={},Mb=class{constructor(e,t,n,r,i,o){this.maxExtent_=e,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=t,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(i)}clip(e,t){const n=this.getClipCoords(t);e.beginPath(),e.moveTo(n[0],n[1]),e.lineTo(n[2],n[3]),e.lineTo(n[4],n[5]),e.lineTo(n[6],n[7]),e.clip()}createExecutors_(e){for(const t in e){let n=this.executorsByZIndex_[t];void 0===n&&(n={},this.executorsByZIndex_[t]=n);const r=e[t];for(const e in r){const t=r[e];n[e]=new Sb(this.resolution_,this.pixelRatio_,this.overlaps_,t)}}}hasExecutors(e){for(const t in this.executorsByZIndex_){const n=this.executorsByZIndex_[t];for(let t=0,r=e.length;t<r;++t)if(e[t]in n)return!0}return!1}forEachFeatureAtCoordinate(e,t,n,r,i,o){const s=2*(r=Math.round(r))+1,a=Mf(this.hitDetectionTransform_,r+.5,r+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=qm(s,s,void 0,{willReadFrequently:!0}));const u=this.hitDetectionContext_;let c;u.canvas.width!==s||u.canvas.height!==s?(u.canvas.width=s,u.canvas.height=s):l||u.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(c=[1/0,1/0,-1/0,-1/0],Qh(c,e),Nh(c,t*(this.renderBuffer_+r),c));const d=function(e){if(void 0!==Eb[e])return Eb[e];const t=2*e+1,n=e*e,r=new Array(n+1);for(let i=0;i<=e;++i)for(let o=0;o<=e;++o){const s=i*i+o*o;if(s>n)break;let a=r[s];a||(a=[],r[s]=a),a.push(4*((e+i)*t+(e+o))+3),i>0&&a.push(4*((e-i)*t+(e+o))+3),o>0&&(a.push(4*((e+i)*t+(e-o))+3),i>0&&a.push(4*((e-i)*t+(e-o))+3))}const i=[];for(let e=0,t=r.length;e<t;++e)r[e]&&i.push(...r[e]);return Eb[e]=i,i}(r);let h;function p(e,t){const n=u.getImageData(0,0,s,s).data;for(let a=0,l=d.length;a<l;a++)if(n[d[a]]>0){if(!o||"Image"!==h&&"Text"!==h||o.includes(e)){const n=(d[a]-3)/4,o=r-n%s,l=r-(n/s|0),u=i(e,t,o*o+l*l);if(u)return u}u.clearRect(0,0,s,s);break}}const f=Object.keys(this.executorsByZIndex_).map(Number);let m,g,_,y,v;for(f.sort(_d),m=f.length-1;m>=0;--m){const e=f[m].toString();for(_=this.executorsByZIndex_[e],g=Ab.length-1;g>=0;--g)if(h=Ab[g],y=_[h],void 0!==y&&(v=y.executeHitDetection(u,a,n,p,c),v))return v}}getClipCoords(e){const t=this.maxExtent_;if(!t)return null;const n=t[0],r=t[1],i=t[2],o=t[3],s=[n,r,n,o,i,o,i,r];return If(s,0,8,2,e,s),s}isEmpty(){return Ad(this.executorsByZIndex_)}execute(e,t,n,r,i,o,s){const a=Object.keys(this.executorsByZIndex_).map(Number);let l,u,c,d,h,p;for(a.sort(_d),this.maxExtent_&&(e.save(),this.clip(e,n)),o=o||Ab,s&&a.reverse(),l=0,u=a.length;l<u;++l){const u=a[l].toString();for(h=this.executorsByZIndex_[u],c=0,d=o.length;c<d;++c)p=h[o[c]],void 0!==p&&p.execute(e,t,n,r,i,s)}this.maxExtent_&&e.restore()}},Tb=class extends ab{constructor(e,t,n,r,i,o,s){super(),this.context_=e,this.pixelRatio_=t,this.extent_=n,this.transform_=r,this.transformRotation_=r?hh(Math.atan2(r[1],r[0]),10):0,this.viewRotation_=i,this.squaredTolerance_=o,this.userTransform_=s,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_(e,t,n,r){if(!this.image_)return;const i=If(e,t,n,r,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);let l=this.imageRotation_;0===this.transformRotation_&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(let e=0,t=i.length;e<t;e+=2){const t=i[e]-this.imageAnchorX_,n=i[e+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const e=t+this.imageAnchorX_,r=n+this.imageAnchorY_;Mf(s,e,r,1,1,l,-e,-r),o.setTransform.apply(o,s),o.translate(e,r),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,t,n,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}drawText_(e,t,n,r){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const i=If(e,t,n,r,this.transform_,this.pixelCoordinates_),o=this.context_;let s=this.textRotation_;for(0===this.transformRotation_&&(s-=this.viewRotation_),this.textRotateWithView_&&(s+=this.viewRotation_);t<n;t+=r){const e=i[t]+this.textOffsetX_,n=i[t+1]+this.textOffsetY_;0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]?(o.translate(e-this.textOffsetX_,n-this.textOffsetY_),o.rotate(s),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&o.strokeText(this.text_,e,n),this.textFillState_&&o.fillText(this.text_,e,n))}}moveToLineTo_(e,t,n,r,i){const o=this.context_,s=If(e,t,n,r,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);let a=s.length;i&&(a-=2);for(let e=2;e<a;e+=2)o.lineTo(s[e],s[e+1]);return i&&o.closePath(),n}drawRings_(e,t,n,r){for(let i=0,o=n.length;i<o;++i)t=this.moveToLineTo_(e,t,n[i],r,!0);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),fp(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=function(e,t,n){const r=e.getFlatCoordinates();if(!r)return null;const i=e.getStride();return If(r,0,r.length,i,t,n)}(e,this.transform_,this.pixelCoordinates_),n=t[2]-t[0],r=t[3]-t[1],i=Math.sqrt(n*n+r*r),o=this.context_;o.beginPath(),o.arc(t[0],t[1],i,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){switch(e.getType()){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e)}}drawFeature(e,t){const n=t.getGeometryFunction()(e);n&&(this.setStyle(t),this.drawGeometry(n))}drawGeometryCollection(e){const t=e.getGeometriesArray();for(let e=0,n=t.length;e<n;++e)this.drawGeometry(t[e])}drawPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),n=e.getStride();this.image_&&this.drawImages_(t,0,t.length,n),""!==this.text_&&this.drawText_(t,0,t.length,n)}drawMultiPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),n=e.getStride();this.image_&&this.drawImages_(t,0,t.length,n),""!==this.text_&&this.drawText_(t,0,t.length,n)}drawLineString(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),fp(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const t=this.context_,n=e.getFlatCoordinates();t.beginPath(),this.moveToLineTo_(n,0,n.length,e.getStride(),!1),t.stroke()}if(""!==this.text_){const t=e.getFlatMidpoint();this.drawText_(t,0,2,2)}}}drawMultiLineString(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getExtent();if(fp(this.extent_,t)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const t=this.context_,n=e.getFlatCoordinates();let r=0;const i=e.getEnds(),o=e.getStride();t.beginPath();for(let e=0,t=i.length;e<t;++e)r=this.moveToLineTo_(n,r,i[e],o,!1);t.stroke()}if(""!==this.text_){const t=e.getFlatMidpoints();this.drawText_(t,0,t.length,2)}}}drawPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),fp(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_;t.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(""!==this.text_){const t=e.getFlatInteriorPoint();this.drawText_(t,0,2,2)}}}drawMultiPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),fp(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_,n=e.getOrientedFlatCoordinates();let r=0;const i=e.getEndss(),o=e.getStride();t.beginPath();for(let e=0,t=i.length;e<t;++e){const t=i[e];r=this.drawRings_(n,r,t,o)}this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(""!==this.text_){const t=e.getFlatInteriorPoints();this.drawText_(t,0,t.length,2)}}}setContextFillState_(e){const t=this.context_,n=this.contextFillState_;n?n.fillStyle!=e.fillStyle&&(n.fillStyle=e.fillStyle,t.fillStyle=e.fillStyle):(t.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}setContextStrokeState_(e){const t=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=e.lineCap&&(n.lineCap=e.lineCap,t.lineCap=e.lineCap),xd(n.lineDash,e.lineDash)||t.setLineDash(n.lineDash=e.lineDash),n.lineDashOffset!=e.lineDashOffset&&(n.lineDashOffset=e.lineDashOffset,t.lineDashOffset=e.lineDashOffset),n.lineJoin!=e.lineJoin&&(n.lineJoin=e.lineJoin,t.lineJoin=e.lineJoin),n.lineWidth!=e.lineWidth&&(n.lineWidth=e.lineWidth,t.lineWidth=e.lineWidth),n.miterLimit!=e.miterLimit&&(n.miterLimit=e.miterLimit,t.miterLimit=e.miterLimit),n.strokeStyle!=e.strokeStyle&&(n.strokeStyle=e.strokeStyle,t.strokeStyle=e.strokeStyle)):(t.lineCap=e.lineCap,t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}setContextTextState_(e){const t=this.context_,n=this.contextTextState_,r=e.textAlign?e.textAlign:t_;n?(n.font!=e.font&&(n.font=e.font,t.font=e.font),n.textAlign!=r&&(n.textAlign=r,t.textAlign=r),n.textBaseline!=e.textBaseline&&(n.textBaseline=e.textBaseline,t.textBaseline=e.textBaseline)):(t.font=e.font,t.textAlign=r,t.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:r,textBaseline:e.textBaseline})}setFillStrokeStyle(e,t){if(e){const t=e.getColor();this.fillState_={fillStyle:qg(t||$g)}}else this.fillState_=null;if(t){const e=t.getColor(),n=t.getLineCap(),r=t.getLineDash(),i=t.getLineDashOffset(),o=t.getLineJoin(),s=t.getWidth(),a=t.getMiterLimit(),l=r||Qg;this.strokeState_={lineCap:void 0!==n?n:Yg,lineDash:1===this.pixelRatio_?l:l.map((e=>e*this.pixelRatio_)),lineDashOffset:(i||0)*this.pixelRatio_,lineJoin:void 0!==o?o:Jg,lineWidth:(void 0!==s?s:1)*this.pixelRatio_,miterLimit:void 0!==a?a:10,strokeStyle:qg(e||e_)}}else this.strokeState_=null}setImageStyle(e){let t;if(!e||!(t=e.getSize()))return void(this.image_=null);const n=e.getPixelRatio(this.pixelRatio_),r=e.getAnchor(),i=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*n,this.imageAnchorY_=r[1]*n,this.imageHeight_=t[1]*n,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=i[0],this.imageOriginY_=i[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/n,o[1]*this.pixelRatio_/n],this.imageWidth_=t[0]*n}setTextStyle(e){if(e){const t=e.getFill();if(t){const e=t.getColor();this.textFillState_={fillStyle:qg(e||$g)}}else this.textFillState_=null;const n=e.getStroke();if(n){const e=n.getColor(),t=n.getLineCap(),r=n.getLineDash(),i=n.getLineDashOffset(),o=n.getLineJoin(),s=n.getWidth(),a=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==t?t:Yg,lineDash:r||Qg,lineDashOffset:i||0,lineJoin:void 0!==o?o:Jg,lineWidth:void 0!==s?s:1,miterLimit:void 0!==a?a:10,strokeStyle:qg(e||e_)}}else this.textStrokeState_=null;const r=e.getFont(),i=e.getOffsetX(),o=e.getOffsetY(),s=e.getRotateWithView(),a=e.getRotation(),l=e.getScaleArray(),u=e.getText(),c=e.getTextAlign(),d=e.getTextBaseline();this.textState_={font:void 0!==r?r:Kg,textAlign:void 0!==c?c:t_,textBaseline:void 0!==d?d:n_},this.text_=void 0!==u?Array.isArray(u)?u.reduce(((e,t,n)=>e+(n%2?" ":t)),""):u:"",this.textOffsetX_=void 0!==i?this.pixelRatio_*i:0,this.textOffsetY_=void 0!==o?this.pixelRatio_*o:0,this.textRotateWithView_=void 0!==s&&s,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}},Pb=.5;function Rb(e,t,n,r,i,o,s){const a=qm(e[0]*Pb,e[1]*Pb);a.imageSmoothingEnabled=!1;const l=a.canvas,u=new Tb(a,Pb,i,null,s),c=n.length,d=Math.floor(16777215/c),h={};for(let e=1;e<=c;++e){const t=n[e-1],s=t.getStyleFunction()||r;if(!r)continue;let a=s(t,o);if(!a)continue;Array.isArray(a)||(a=[a]);const l=(e*d).toString(16).padStart(7,"#00000");for(let e=0,n=a.length;e<n;++e){const n=a[e],r=n.getGeometryFunction()(t);if(!r||!fp(i,r.getExtent()))continue;const o=n.clone(),s=o.getFill();s&&s.setColor(l);const u=o.getStroke();u&&(u.setColor(l),u.setLineDash(null)),o.setText(void 0);const c=n.getImage();if(c&&0!==c.getOpacity()){const e=c.getImageSize();if(!e)continue;const t=qm(e[0],e[1],void 0,{alpha:!1}),n=t.canvas;t.fillStyle=l,t.fillRect(0,0,n.width,n.height),o.setImage(new S_({img:n,imgSize:e,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 d=o.getZIndex()||0;let p=h[d];p||(p={},h[d]=p,p.Polygon=[],p.Circle=[],p.LineString=[],p.Point=[]);const f=r.getType();if("GeometryCollection"===f){const e=r.getGeometriesArrayRecursive();for(let t=0,n=e.length;t<n;++t){const n=e[t];p[n.getType().replace("Multi","")].push(n,o)}}else p[f.replace("Multi","")].push(r,o)}}const p=Object.keys(h).map(Number).sort(_d);for(let e=0,n=p.length;e<n;++e){const n=h[p[e]];for(const e in n){const r=n[e];for(let e=0,n=r.length;e<n;e+=2){u.setStyle(r[e+1]);for(let n=0,i=t.length;n<i;++n)u.setTransform(t[n]),u.drawGeometry(r[e])}}}return a.getImageData(0,0,l.width,l.height)}function Ib(e,t,n){const r=[];if(n){const i=Math.floor(Math.round(e[0])*Pb),o=Math.floor(Math.round(e[1])*Pb),s=4*(sh(i,0,n.width-1)+sh(o,0,n.height-1)*n.width),a=n.data[s],l=n.data[s+1],u=n.data[s+2]+256*(l+256*a),c=Math.floor(16777215/t.length);u&&u%c==0&&r.push(t[u/c-1])}return r}const Lb=.5,Ob={Point:function(e,t,n,r,i){const o=n.getImage(),s=n.getText();let a;if(o){if(2!=o.getImageState())return;let l=e;if(i){const u=o.getDeclutterMode();if("none"!==u)if(l=i,"obstacle"===u){const i=e.getBuilder(n.getZIndex(),"Image");i.setImageStyle(o,a),i.drawPoint(t,r)}else s&&s.getText()&&(a={})}const u=l.getBuilder(n.getZIndex(),"Image");u.setImageStyle(o,a),u.drawPoint(t,r)}if(s&&s.getText()){let o=e;i&&(o=i);const l=o.getBuilder(n.getZIndex(),"Text");l.setTextStyle(s,a),l.drawText(t,r)}},LineString:function(e,t,n,r,i){const o=n.getStroke();if(o){const i=e.getBuilder(n.getZIndex(),"LineString");i.setFillStrokeStyle(null,o),i.drawLineString(t,r)}const s=n.getText();if(s&&s.getText()){const o=(i||e).getBuilder(n.getZIndex(),"Text");o.setTextStyle(s),o.drawText(t,r)}},Polygon:function(e,t,n,r,i){const o=n.getFill(),s=n.getStroke();if(o||s){const i=e.getBuilder(n.getZIndex(),"Polygon");i.setFillStrokeStyle(o,s),i.drawPolygon(t,r)}const a=n.getText();if(a&&a.getText()){const o=(i||e).getBuilder(n.getZIndex(),"Text");o.setTextStyle(a),o.drawText(t,r)}},MultiPoint:function(e,t,n,r,i){const o=n.getImage(),s=n.getText();let a;if(o){if(2!=o.getImageState())return;let l=e;if(i){const u=o.getDeclutterMode();if("none"!==u)if(l=i,"obstacle"===u){const i=e.getBuilder(n.getZIndex(),"Image");i.setImageStyle(o,a),i.drawMultiPoint(t,r)}else s&&s.getText()&&(a={})}const u=l.getBuilder(n.getZIndex(),"Image");u.setImageStyle(o,a),u.drawMultiPoint(t,r)}if(s&&s.getText()){let o=e;i&&(o=i);const l=o.getBuilder(n.getZIndex(),"Text");l.setTextStyle(s,a),l.drawText(t,r)}},MultiLineString:function(e,t,n,r,i){const o=n.getStroke();if(o){const i=e.getBuilder(n.getZIndex(),"LineString");i.setFillStrokeStyle(null,o),i.drawMultiLineString(t,r)}const s=n.getText();if(s&&s.getText()){const o=(i||e).getBuilder(n.getZIndex(),"Text");o.setTextStyle(s),o.drawText(t,r)}},MultiPolygon:function(e,t,n,r,i){const o=n.getFill(),s=n.getStroke();if(s||o){const i=e.getBuilder(n.getZIndex(),"Polygon");i.setFillStrokeStyle(o,s),i.drawMultiPolygon(t,r)}const a=n.getText();if(a&&a.getText()){const o=(i||e).getBuilder(n.getZIndex(),"Text");o.setTextStyle(a),o.drawText(t,r)}},GeometryCollection:function(e,t,n,r,i){const o=t.getGeometriesArray();let s,a;for(s=0,a=o.length;s<a;++s)(0,Ob[o[s].getType()])(e,o[s],n,r,i)},Circle:function(e,t,n,r,i){const o=n.getFill(),s=n.getStroke();if(o||s){const i=e.getBuilder(n.getZIndex(),"Circle");i.setFillStrokeStyle(o,s),i.drawCircle(t,r)}const a=n.getText();if(a&&a.getText()){const o=(i||e).getBuilder(n.getZIndex(),"Text");o.setTextStyle(a),o.drawText(t,r)}}};function zb(e,t){return parseInt(Gd(e),10)-parseInt(Gd(t),10)}function Fb(e,t){const n=Db(e,t);return n*n}function Db(e,t){return Lb*e/t}function jb(e,t,n,r,i,o,s){let a=!1;const l=n.getImage();if(l){const e=l.getImageState();2==e||3==e?l.unlistenImageChange(i):(0==e&&l.load(),l.listenImageChange(i),a=!0)}return function(e,t,n,r,i,o){const s=n.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(r,i);n.getRenderer()?Nb(e,a,n,t):(0,Ob[a.getType()])(e,a,n,t,o)}(e,t,n,r,o,s),a}function Nb(e,t,n,r){if("GeometryCollection"!=t.getType())e.getBuilder(n.getZIndex(),"Default").drawCustom(t,r,n.getRenderer(),n.getHitDetectionRenderer());else{const i=t.getGeometries();for(let t=0,o=i.length;t<o;++t)Nb(e,i[t],n,r)}}const Bb=class extends $m{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,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.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(e,t,n){const r=t.extent,i=t.viewState,o=i.center,s=i.resolution,a=i.projection,l=i.rotation,u=a.getExtent(),c=this.getLayer().getSource(),d=t.pixelRatio,h=t.viewHints,p=!(h[0]||h[1]),f=this.compositionContext_,m=Math.round(t.size[0]*d),g=Math.round(t.size[1]*d),_=c.getWrapX()&&a.canWrapX(),y=_?pp(u):null,v=_?Math.ceil((r[2]-u[2])/y)+1:1;let b=_?Math.floor((r[0]-u[0])/y):0;do{const t=this.getRenderTransform(o,s,l,d,m,g,b*y);e.execute(f,1,t,l,p,void 0,n)}while(++b<v)}setupCompositionContext_(){if(1!==this.opacity_){const e=qm(this.context.canvas.width,this.context.canvas.height,Xm);this.compositionContext_=e}else this.compositionContext_=this.context}releaseCompositionContext_(){if(1!==this.opacity_){const e=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=e,Gm(this.compositionContext_),Xm.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(e){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,e,e.declutterTree),this.releaseCompositionContext_())}renderFrame(e,t){const n=e.pixelRatio,r=e.layerStatesArray[e.layerIndex];!function(e,t,n){Sf(e,t,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),Tf(this.inversePixelTransform,this.pixelTransform);const i=Rf(this.pixelTransform);this.useContainer(t,i,this.getBackground(e));const o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;const u=Math.round(e.size[0]*n),c=Math.round(e.size[1]*n);s.width!=u||s.height!=c?(s.width=u,s.height=c,s.style.transform!==i&&(s.style.transform=i)):this.containerReused||o.clearRect(0,0,u,c),this.preRender(o,e);const d=e.viewState,h=d.projection;this.opacity_=r.opacity,this.setupCompositionContext_();let p=!1,f=!0;if(r.extent&&this.clipping){const t=Yp(r.extent,h);f=fp(t,e.extent),p=f&&!Vh(t,e.extent),p&&this.clipUnrotated(this.compositionContext_,e,t)}return f&&this.renderWorlds(a,e),p&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,e),this.renderedRotation_!==d.rotation&&(this.renderedRotation_=d.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(e){return new Promise((t=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const e=[this.context.canvas.width,this.context.canvas.height];Af(this.pixelTransform,e);const t=this.renderedCenter_,n=this.renderedResolution_,r=this.renderedRotation_,i=this.renderedProjection_,o=this.wrappedRenderedExtent_,s=this.getLayer(),a=[],l=e[0]*Pb,u=e[1]*Pb;a.push(this.getRenderTransform(t,n,r,Pb,l,u,0).slice());const c=s.getSource(),d=i.getExtent();if(c.getWrapX()&&i.canWrapX()&&!Vh(d,o)){let e=o[0];const i=pp(d);let s,c=0;for(;e<d[0];)--c,s=i*c,a.push(this.getRenderTransform(t,n,r,Pb,l,u,s).slice()),e+=i;for(c=0,e=o[2];e>d[2];)++c,s=i*c,a.push(this.getRenderTransform(t,n,r,Pb,l,u,s).slice()),e-=i}this.hitDetectionImageData_=Rb(e,a,this.renderedFeatures_,s.getStyleFunction(),o,n,r)}t(Ib(e,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(e,t,n,r,i){if(!this.replayGroup_)return;const o=t.viewState.resolution,s=t.viewState.rotation,a=this.getLayer(),l={},u=function(e,t,n){const o=Gd(e),s=l[o];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return l[o]=!0,i.splice(i.lastIndexOf(s),1),r(e,a,t);s.geometry=t,s.distanceSq=n}}else{if(0===n)return l[o]=!0,r(e,a,t);i.push(l[o]={feature:e,layer:a,geometry:t,distanceSq:n,callback:r})}};let c;const d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some((r=>c=r.forEachFeatureAtCoordinate(e,o,s,n,u,r===this.declutterExecutorGroup&&t.declutterTree?t.declutterTree.all().map((e=>e.value)):null))),c}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const t=this.getLayer(),n=t.getSource();if(!n)return!1;const r=e.viewHints[0],i=e.viewHints[1],o=t.getUpdateWhileAnimating(),s=t.getUpdateWhileInteracting();if(this.ready&&!o&&r||!s&&i)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=e.extent,l=e.viewState,u=l.projection,c=l.resolution,d=e.pixelRatio,h=t.getRevision(),p=t.getRenderBuffer();let f=t.getRenderOrder();void 0===f&&(f=zb);const m=l.center.slice(),g=Nh(a,p*c),_=g.slice(),y=[g.slice()],v=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Vh(v,e.extent)){const e=pp(v),t=Math.max(pp(g)/2,e);g[0]=v[0]-t,g[2]=v[2]+t,Cp(m,u);const n=_p(y[0],u);n[0]<v[0]&&n[2]<v[2]?y.push([n[0]+e,n[1],n[2]+e,n[3]]):n[0]>v[0]&&n[2]>v[2]&&y.push([n[0]-e,n[1],n[2]-e,n[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==h&&this.renderedRenderOrder_==f&&Vh(this.wrappedRenderedExtent_,g))return xd(this.renderedExtent_,_)||(this.hitDetectionImageData_=null,this.renderedExtent_=_),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new fb(Db(c,d),g,c,d);let x;this.getLayer().getDeclutter()&&(x=new fb(Db(c,d),g,c,d));const w=Zp();let k;if(w){for(let e=0,t=y.length;e<t;++e){const t=$p(y[e],u);n.loadFeatures(t,Qp(c,u),w)}k=Gp(w,u)}else for(let e=0,t=y.length;e<t;++e)n.loadFeatures(y[e],c,u);const C=Fb(c,d);let S=!0;const A=e=>{let n;const r=e.getStyleFunction()||t.getStyleFunction();if(r&&(n=r(e,c)),n){const t=this.renderFeature(e,C,n,b,k,x);S=S&&!t}},E=$p(g,u),M=n.getFeaturesInExtent(E);f&&M.sort(f);for(let e=0,t=M.length;e<t;++e)A(M[e]);this.renderedFeatures_=M,this.ready=S;const T=b.finish(),P=new Mb(g,c,d,n.getOverlaps(),T,t.getRenderBuffer());return x&&(this.declutterExecutorGroup=new Mb(g,c,d,n.getOverlaps(),x.finish(),t.getRenderBuffer())),this.renderedResolution_=c,this.renderedRevision_=h,this.renderedRenderOrder_=f,this.renderedExtent_=_,this.wrappedRenderedExtent_=g,this.renderedCenter_=m,this.renderedProjection_=u,this.replayGroup_=P,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(e,t,n,r,i,o){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=jb(r,e,n[a],t,this.boundHandleStyleImageChange_,i,o)||s;else s=jb(r,e,n,t,this.boundHandleStyleImageChange_,i,o);return s}},qb=class extends eb{constructor(e){super(e)}createRenderer(){return new Bb(this)}},Gb=class{constructor(e){this.rbush_=new Zv(e),this.items_={}}insert(e,t){const n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(n),this.items_[Gd(t)]=n}load(e,t){const n=new Array(t.length);for(let r=0,i=t.length;r<i;r++){const i=e[r],o=t[r],s={minX:i[0],minY:i[1],maxX:i[2],maxY:i[3],value:o};n[r]=s,this.items_[Gd(o)]=s}this.rbush_.load(n)}remove(e){const t=Gd(e),n=this.items_[t];return delete this.items_[t],null!==this.rbush_.remove(n)}update(e,t){const n=this.items_[Gd(t)];$h([n.minX,n.minY,n.maxX,n.maxY],e)||(this.remove(t),this.insert(e,t))}getAll(){return this.rbush_.all().map((function(e){return e.value}))}getInExtent(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(t).map((function(e){return e.value}))}forEach(e){return this.forEach_(this.getAll(),e)}forEachInExtent(e,t){return this.forEach_(this.getInExtent(e),t)}forEach_(e,t){let n;for(let r=0,i=e.length;r<i;r++)if(n=t(e[r]),n)return n;return n}isEmpty(){return Ad(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const t=this.rbush_.toJSON();return Uh(t.minX,t.minY,t.maxX,t.maxY,e)}concat(e){this.rbush_.load(e.rbush_.all());for(const t in e.items_)this.items_[t]=e.items_[t]}},Vb="addfeature",Wb="removefeature";function Hb(e,t){return[[-1/0,-1/0,1/0,1/0]]}function Ub(e,t){return[e]}let Zb=!1;function Xb(e,t,n,r,i,o,s){const a=new XMLHttpRequest;a.open("GET","function"==typeof e?e(n,r,i):e,!0),"arraybuffer"==t.getType()&&(a.responseType="arraybuffer"),a.withCredentials=Zb,a.onload=function(e){if(!a.status||a.status>=200&&a.status<300){const e=t.getType();let r;"json"==e||"text"==e?r=a.responseText:"xml"==e?(r=a.responseXML,r||(r=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==e&&(r=a.response),r?o(t.readFeatures(r,{extent:n,featureProjection:i}),t.readProjection(r)):s()}else s()},a.onerror=s,a.send()}function Kb(e,t){return function(n,r,i,o,s){const a=this;Xb(e,t,n,r,i,(function(e,t){a.addFeatures(e),void 0!==o&&o(e)}),s||Cd)}}class $b extends fd{constructor(e,t,n){super(e),this.feature=t,this.features=n}}const Yb=class extends wg{constructor(e){super({attributions:(e=e||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===e.wrapX||e.wrapX}),this.on,this.once,this.un,this.loader_=Cd,this.format_=e.format,this.overlaps_=void 0===e.overlaps||e.overlaps,this.url_=e.url,void 0!==e.loader?this.loader_=e.loader:void 0!==this.url_&&(Xd(this.format_,7),this.loader_=Kb(this.url_,this.format_)),this.strategy_=void 0!==e.strategy?e.strategy:Hb;const t=void 0===e.useSpatialIndex||e.useSpatialIndex;let n,r;this.featuresRtree_=t?new Gb:null,this.loadedExtentsRtree_=new Gb,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(e.features)?r=e.features:e.features&&(n=e.features,r=n.getArray()),t||void 0!==n||(n=new by(r)),void 0!==r&&this.addFeaturesInternal(r),void 0!==n&&this.bindFeaturesCollection_(n)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=Gd(e);if(!this.addToIndex_(t,e))return void(this.featuresCollection_&&this.featuresCollection_.remove(e));this.setupChangeEvents_(t,e);const n=e.getGeometry();if(n){const t=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(t,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new $b(Vb,e))}setupChangeEvents_(e,t){this.featureChangeKeys_[e]=[zd(t,Md,this.handleFeatureChange_,this),zd(t,md,this.handleFeatureChange_,this)]}addToIndex_(e,t){let n=!0;const r=t.getId();return void 0!==r&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=t),n&&(Xd(!(e in this.uidIndex_),30),this.uidIndex_[e]=t),n}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const t=[],n=[],r=[];for(let t=0,r=e.length;t<r;t++){const r=e[t],i=Gd(r);this.addToIndex_(i,r)&&n.push(r)}for(let e=0,i=n.length;e<i;e++){const i=n[e],o=Gd(i);this.setupChangeEvents_(o,i);const s=i.getGeometry();if(s){const e=s.getExtent();t.push(e),r.push(i)}else this.nullGeometryFeatures_[o]=i}if(this.featuresRtree_&&this.featuresRtree_.load(t,r),this.hasListener(Vb))for(let e=0,t=n.length;e<t;e++)this.dispatchEvent(new $b(Vb,n[e]))}bindFeaturesCollection_(e){let t=!1;this.addEventListener(Vb,(function(n){t||(t=!0,e.push(n.feature),t=!1)})),this.addEventListener(Wb,(function(n){t||(t=!0,e.remove(n.feature),t=!1)})),e.addEventListener(gy,(e=>{t||(t=!0,this.addFeature(e.element),t=!1)})),e.addEventListener(_y,(e=>{t||(t=!0,this.removeFeature(e.element),t=!1)})),this.featuresCollection_=e}clear(e){if(e){for(const e in this.featureChangeKeys_)this.featureChangeKeys_[e].forEach(Dd);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const e=e=>{this.removeFeatureInternal(e)};this.featuresRtree_.forEach(e);for(const e in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[e])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const t=new $b("clear");this.dispatchEvent(t),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,t){const n=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(n,(function(n){if(n.getGeometry().intersectsCoordinate(e))return t(n)}))}forEachFeatureInExtent(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureIntersectingExtent(e,t){return this.forEachFeatureInExtent(e,(function(n){if(n.getGeometry().intersectsExtent(e)){const e=t(n);if(e)return e}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),Ad(this.nullGeometryFeatures_)||bd(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const t=[];return this.forEachFeatureAtCoordinateDirect(e,(function(e){t.push(e)})),t}getFeaturesInExtent(e,t){if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const n=function(e,t){if(t.canWrapX()){const n=t.getExtent();if(!isFinite(e[0])||!isFinite(e[2]))return[[n[0],e[1],n[2],e[3]]];_p(e,t);const r=pp(n);if(pp(e)>r)return[[n[0],e[1],n[2],e[3]]];if(e[0]<n[0])return[[e[0]+r,e[1],n[2],e[3]],[n[0],e[1],e[2],e[3]]];if(e[2]>n[2])return[[e[0],e[1],n[2],e[3]],[n[0],e[1],e[2]-r,e[3]]]}return[e]}(e,t);return[].concat(...n.map((e=>this.featuresRtree_.getInExtent(e))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,t){const n=e[0],r=e[1];let i=null;const o=[NaN,NaN];let s=1/0;const a=[-1/0,-1/0,1/0,1/0];return t=t||wd,this.featuresRtree_.forEachInExtent(a,(function(e){if(t(e)){const t=e.getGeometry(),l=s;if(s=t.closestPointXY(n,r,o,s),s<l){i=e;const t=Math.sqrt(s);a[0]=n-t,a[1]=r-t,a[2]=n+t,a[3]=r+t}}})),i}getExtent(e){return this.featuresRtree_.getExtent(e)}getFeatureById(e){const t=this.idIndex_[e.toString()];return void 0!==t?t:null}getFeatureByUid(e){const t=this.uidIndex_[e];return void 0!==t?t:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const t=e.target,n=Gd(t),r=t.getGeometry();if(r){const e=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(e,t)):this.featuresRtree_&&this.featuresRtree_.update(e,t)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[n]=t);const i=t.getId();if(void 0!==i){const e=i.toString();this.idIndex_[e]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[e]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[n]=t;this.changed(),this.dispatchEvent(new $b("changefeature",t))}hasFeature(e){const t=e.getId();return void 0!==t?t in this.idIndex_:Gd(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Ad(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(e,t,n){const r=this.loadedExtentsRtree_,i=this.strategy_(e,t,n);for(let e=0,o=i.length;e<o;++e){const o=i[e],s=r.forEachInExtent(o,(function(e){return Vh(e.extent,o)}));s||(++this.loadingExtentsCount_,this.dispatchEvent(new $b("featuresloadstart")),this.loader_.call(this,o,t,n,(e=>{--this.loadingExtentsCount_,this.dispatchEvent(new $b("featuresloadend",void 0,e))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new $b("featuresloaderror"))})),r.insert(o,{extent:o.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const t=this.loadedExtentsRtree_;let n;t.forEachInExtent(e,(function(t){if($h(t.extent,e))return n=t,!0})),n&&t.remove(n)}removeFeature(e){if(!e)return;const t=Gd(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=Gd(e),n=this.featureChangeKeys_[t];if(!n)return;n.forEach(Dd),delete this.featureChangeKeys_[t];const r=e.getId();return void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[t],this.dispatchEvent(new $b(Wb,e)),e}removeFromIdIndex_(e){let t=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===e){delete this.idIndex_[n],t=!0;break}return t}setLoader(e){this.loader_=e}setUrl(e){Xd(this.format_,7),this.url_=e,this.setLoader(Kb(e,this.format_))}},Qb={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Jb={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]},ex=class extends pg{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=[1,0,0,1,0,0]}prepareTile(e,t,n){let r;const i=e.getState();return 2!==i&&3!==i||(this.updateExecutorGroup_(e,t,n),this.tileImageNeedsRender_(e)&&(r=!0)),r}getTile(e,t,n,r){const i=r.pixelRatio,o=r.viewState,s=o.resolution,a=o.projection,l=this.getLayer(),u=l.getSource().getTile(e,t,n,i,a),c=r.viewHints,d=!(c[0]||c[1]);return!d&&u.wantedResolution||(u.wantedResolution=s),this.prepareTile(u,i,a)&&(d||Date.now()-r.time<8)&&"vector"!==l.getRenderMode()&&this.renderTileImage_(u,r),super.getTile(e,t,n,r)}isDrawableTile(e){const t=this.getLayer();return super.isDrawableTile(e)&&("vector"===t.getRenderMode()?Gd(t)in e.executorGroups:e.hasContext(t))}getTileImage(e){return e.getImage(this.getLayer())}prepareFrame(e){const t=this.getLayer().getRevision();return this.renderedLayerRevision_!==t&&(this.renderedLayerRevision_=t,this.renderedTiles.length=0),super.prepareFrame(e)}updateExecutorGroup_(e,t,n){const r=this.getLayer(),i=r.getRevision(),o=r.getRenderOrder()||null,s=e.wantedResolution,a=e.getReplayState(r);if(!a.dirty&&a.renderedResolution===s&&a.renderedRevision==i&&a.renderedRenderOrder==o)return;const l=r.getSource(),u=r.getDeclutter(),c=l.getTileGrid(),d=l.getTileGridForProjection(n).getTileCoordExtent(e.wrappedTileCoord),h=l.getSourceTiles(t,n,e),p=Gd(r);delete e.hitDetectionImageData[p],e.executorGroups[p]=[],u&&(e.declutterExecutorGroups[p]=[]),a.dirty=!1;for(let n=0,i=h.length;n<i;++n){const i=h[n];if(2!=i.getState())continue;const f=i.tileCoord,m=c.getTileCoordExtent(f),g=cp(d,m),_=Nh(g,r.getRenderBuffer()*s,this.tmpExtent),y=$h(m,g)?null:_,v=new fb(0,_,s,t),b=u?new fb(0,g,s,t):void 0,x=Fb(s,t),w=function(e){let t;const n=e.getStyleFunction()||r.getStyleFunction();if(n&&(t=n(e,s)),t){const n=this.renderFeature(e,x,t,v,b);a.dirty=a.dirty||n}},k=i.getFeatures();o&&o!==a.renderedRenderOrder&&k.sort(o);for(let e=0,t=k.length;e<t;++e){const t=k[e];y&&!fp(y,t.getGeometry().getExtent())||w.call(this,t)}const C=v.finish(),S="vector"!==r.getRenderMode()&&u&&1===h.length?null:g,A=new Mb(S,s,t,l.getOverlaps(),C,r.getRenderBuffer());if(e.executorGroups[p].push(A),b){const n=new Mb(null,s,t,l.getOverlaps(),b.finish(),r.getRenderBuffer());e.declutterExecutorGroups[p].push(n)}}a.renderedRevision=i,a.renderedRenderOrder=o,a.renderedResolution=s}forEachFeatureAtCoordinate(e,t,n,r,i){const o=t.viewState.resolution,s=t.viewState.rotation;n=null==n?0:n;const a=this.getLayer(),l=a.getSource().getTileGridForProjection(t.viewState.projection),u=jh([e]);Nh(u,o*n,u);const c={},d=function(e,t,n){let o=e.getId();void 0===o&&(o=Gd(e));const s=c[o];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return c[o]=!0,i.splice(i.lastIndexOf(s),1),r(e,a,t);s.geometry=t,s.distanceSq=n}}else{if(0===n)return c[o]=!0,r(e,a,t);i.push(c[o]={feature:e,layer:a,geometry:t,distanceSq:n,callback:r})}},h=this.renderedTiles;let p;for(let r=0,i=h.length;!p&&r<i;++r){const i=h[r];if(!fp(l.getTileCoordExtent(i.wrappedTileCoord),u))continue;const c=Gd(a),f=[i.executorGroups[c]],m=i.declutterExecutorGroups[c];m&&f.push(m),f.some((r=>{const i=r===m?t.declutterTree.all().map((e=>e.value)):null;for(let t=0,a=r.length;t<a;++t){const a=r[t];if(p=a.forEachFeatureAtCoordinate(e,o,s,n,d,i),p)return!0}}))}return p}getFeatures(e){return new Promise(((t,n)=>{const r=this.getLayer(),i=Gd(r),o=r.getSource(),s=this.renderedProjection,a=s.getExtent(),l=this.renderedResolution,u=o.getTileGridForProjection(s),c=Af(this.renderedPixelToCoordinateTransform_,e.slice()),d=u.getTileCoordForCoordAndResolution(c,l);let h;for(let e=0,t=this.renderedTiles.length;e<t;++e)if(d.toString()===this.renderedTiles[e].tileCoord.toString()){if(h=this.renderedTiles[e],2===h.getState()){const e=u.getTileCoordExtent(h.tileCoord);o.getWrapX()&&s.canWrapX()&&!Vh(a,e)&&Cp(c,s);break}h=void 0}if(!h||h.loadingSourceTiles>0)return void t([]);const p=dp(u.getTileCoordExtent(h.wrappedTileCoord)),f=[(c[0]-p[0])/l,(p[1]-c[1])/l],m=h.getSourceTiles().reduce((function(e,t){return e.concat(t.getFeatures())}),[]);let g=h.hitDetectionImageData[i];if(!g){const e=hg(u.getTileSize(u.getZForResolution(l,o.zDirection))),t=this.renderedRotation_;g=Rb(e,[this.getRenderTransform(u.getTileCoordCenter(h.wrappedTileCoord),l,0,Pb,e[0]*Pb,e[1]*Pb,0)],m,r.getStyleFunction(),u.getTileCoordExtent(h.wrappedTileCoord),h.getReplayState(r).renderedResolution,t),h.hitDetectionImageData[i]=g}t(Ib(f,m,g))}))}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&void 0!==this.renderedLayerRevision_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}renderDeclutter(e){const t=this.context,n=t.globalAlpha;t.globalAlpha=this.getLayer().getOpacity();const r=e.viewHints,i=!(r[0]||r[1]),o=this.renderedTiles;for(let t=0,n=o.length;t<n;++t){const n=o[t],r=n.declutterExecutorGroups[Gd(this.getLayer())];if(r)for(let t=r.length-1;t>=0;--t)r[t].execute(this.context,1,this.getTileRenderTransform(n,e),e.viewState.rotation,i,void 0,e.declutterTree)}t.globalAlpha=n}getTileRenderTransform(e,t){const n=t.pixelRatio,r=t.viewState,i=r.center,o=r.resolution,s=r.rotation,a=t.size,l=Math.round(a[0]*n),u=Math.round(a[1]*n),c=this.getLayer().getSource().getTileGridForProjection(t.viewState.projection),d=e.tileCoord,h=c.getTileCoordExtent(e.wrappedTileCoord),p=c.getTileCoordExtent(d,this.tmpExtent)[0]-h[0];return Cf(Ef(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(i,o,s,n,l,u,p))}postRender(e,t){const n=t.viewHints,r=!(n[0]||n[1]);this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;const i=this.getLayer(),o=i.getRenderMode(),s=e.globalAlpha;e.globalAlpha=i.getOpacity();const a=Jb[o],l=t.viewState,u=l.rotation,c=i.getSource(),d=c.getTileGridForProjection(l.projection).getZForResolution(l.resolution,c.zDirection),h=this.renderedTiles,p=[],f=[];let m=!0;for(let n=h.length-1;n>=0;--n){const o=h[n];m=m&&!o.getReplayState(i).dirty;const s=o.executorGroups[Gd(i)].filter((e=>e.hasExecutors(a)));if(0===s.length)continue;const l=this.getTileRenderTransform(o,t),c=o.tileCoord[0];let g=!1;const _=s[0].getClipCoords(l);if(_){for(let t=0,n=p.length;t<n;++t)if(d!==c&&c<f[t]){const n=p[t];fp([_[0],_[3],_[4],_[7]],[n[0],n[3],n[4],n[7]])&&(g||(e.save(),g=!0),e.beginPath(),e.moveTo(_[0],_[1]),e.lineTo(_[2],_[3]),e.lineTo(_[4],_[5]),e.lineTo(_[6],_[7]),e.moveTo(n[6],n[7]),e.lineTo(n[4],n[5]),e.lineTo(n[2],n[3]),e.lineTo(n[0],n[1]),e.clip())}p.push(_),f.push(c)}for(let t=0,n=s.length;t<n;++t)s[t].execute(e,1,l,u,r,a);g&&e.restore()}e.globalAlpha=s,this.ready=m,super.postRender(e,t)}renderFeature(e,t,n,r,i){if(!n)return!1;let o=!1;if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)o=jb(r,e,n[s],t,this.boundHandleStyleImageChange_,void 0,i)||o;else o=jb(r,e,n,t,this.boundHandleStyleImageChange_,void 0,i);return o}tileImageNeedsRender_(e){const t=this.getLayer();if("vector"===t.getRenderMode())return!1;const n=e.getReplayState(t),r=t.getRevision(),i=e.wantedResolution;return n.renderedTileResolution!==i||n.renderedTileRevision!==r}renderTileImage_(e,t){const n=this.getLayer(),r=e.getReplayState(n),i=n.getRevision(),o=e.executorGroups[Gd(n)];r.renderedTileRevision=i;const s=e.wrappedTileCoord,a=s[0],l=n.getSource();let u=t.pixelRatio;const c=t.viewState.projection,d=l.getTileGridForProjection(c),h=d.getResolution(e.tileCoord[0]),p=t.pixelRatio/e.wantedResolution*h,f=d.getResolution(a),m=e.getContext(n);u=Math.round(Math.max(u,p/u));const g=l.getTilePixelSize(a,u,c);m.canvas.width=g[0],m.canvas.height=g[1];const _=u/p;if(1!==_){const e=kf(this.tmpTransform_);Ef(e,_,_),m.setTransform.apply(m,e)}const y=d.getTileCoordExtent(s,this.tmpExtent),v=p/f,b=kf(this.tmpTransform_);Ef(b,v,-v),function(e,t,n){Cf(e,Sf(wf,1,0,0,1,t,n))}(b,-y[0],-y[3]);for(let e=0,t=o.length;e<t;++e)o[e].execute(m,_,b,0,!0,Qb[n.getRenderMode()]);r.renderedTileResolution=e.wantedResolution}},tx=class extends eb{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un;const n=e.renderMode||"hybrid";Xd("hybrid"==n||"vector"==n,28),this.renderMode_=n,this.setPreload(e.preload?e.preload:0),this.setUseInterimTilesOnError(void 0===e.useInterimTilesOnError||e.useInterimTilesOnError),this.getBackground,this.setBackground}createRenderer(){return new ex(this)}getFeatures(e){return super.getFeatures(e)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(Tm)}getUseInterimTilesOnError(){return this.get(Pm)}setPreload(e){this.set(Tm,e)}setUseInterimTilesOnError(e){this.set(Pm,e)}},nx=class extends Ym{constructor(e,t,n,r,i,o){super(e,t,o),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=i,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){0==this.state&&(this.setState(1),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(e,t){this.setFeatures(e)}onError(){this.setState(3)}setFeatures(e){this.features_=e,this.setState(2)}setLoader(e){this.loader_=e}},rx=[],ix=class extends Ym{constructor(e,t,n,r){super(e,t,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=r.bind(void 0,this),this.wrappedTileCoord=n}getContext(e){const t=Gd(e);return t in this.context_||(this.context_[t]=qm(1,1,rx)),this.context_[t]}hasContext(e){return Gd(e)in this.context_}getImage(e){return this.hasContext(e)?this.getContext(e).canvas:null}getReplayState(e){const t=Gd(e);return t in this.replayState_||(this.replayState_[t]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[t]}load(){this.getSourceTiles()}release(){for(const e in this.context_){const t=this.context_[e];Gm(t),rx.push(t.canvas),delete this.context_[e]}super.release()}},ox=class extends zg{constructor(e){const t=e.projection||"EPSG:3857",n=e.extent||Mg(t),r=e.tileGrid||Ag({extent:n,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,opaque:!1,projection:t,state:e.state,tileGrid:r,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:sx,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection}),this.format_=e.format?e.format:null,this.sourceTileCache=new bg(this.tileCache.highWaterMark),this.overlaps_=null==e.overlaps||e.overlaps,this.tileClass=e.tileClass?e.tileClass:nx,this.tileGrids_={}}getFeaturesInExtent(e){const t=[],n=this.tileCache;if(0===n.getCount())return t;const r=vg(n.peekFirstKey())[0],i=this.tileGrid;return n.forEach((function(n){if(n.tileCoord[0]!==r||2!==n.getState())return;const o=n.getSourceTiles();for(let n=0,r=o.length;n<r;++n){const r=o[n],s=r.tileCoord;if(fp(e,i.getTileCoordExtent(s))){const n=r.getFeatures();if(n)for(let r=0,i=n.length;r<i;++r){const i=n[r],o=i.getGeometry();fp(e,o.getExtent())&&t.push(i)}}}})),t}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(e,t){const n=this.getTileCacheForProjection(e),r=Object.keys(t).reduce(((e,t)=>{const r=function(e){const[t,n,r]=e.substring(e.lastIndexOf("/")+1,e.length).split(",").map(Number);return _g(t,n,r)}(t),i=n.peek(r);if(i){const t=i.sourceTiles;for(let n=0,r=t.length;n<r;++n)e[t[n].getKey()]=!0}return e}),{});super.expireCache(e,t),this.sourceTileCache.expireCache(r)}getSourceTiles(e,t,n){if(0===n.getState()){n.setState(1);const r=n.wrappedTileCoord,i=this.getTileGridForProjection(t),o=i.getTileCoordExtent(r),s=r[0],a=i.getResolution(s);Nh(o,-a,o);const l=this.tileGrid,u=l.getExtent();u&&cp(o,u,o);const c=l.getZForResolution(a,this.zDirection);l.forEachTileCoord(o,c,(r=>{const i=this.tileUrlFunction(r,e,t),o=this.sourceTileCache.containsKey(i)?this.sourceTileCache.get(i):new this.tileClass(r,i?0:4,i,this.format_,this.tileLoadFunction);n.sourceTiles.push(o);const s=o.getState();if(s<2){const e=t=>{this.handleTileChange(t);const r=o.getState();if(2===r||3===r){const t=o.getKey();t in n.errorTileKeys?2===o.getState()&&delete n.errorTileKeys[t]:n.loadingSourceTiles--,3===r?n.errorTileKeys[t]=!0:o.removeEventListener(Md,e),0===n.loadingSourceTiles&&n.setState(Ad(n.errorTileKeys)?2:3)}};o.addEventListener(Md,e),n.loadingSourceTiles++}0===s&&(o.extent=l.getTileCoordExtent(r),o.projection=t,o.resolution=l.getResolution(r[0]),this.sourceTileCache.set(i,o),o.load())})),n.loadingSourceTiles||n.setState(n.sourceTiles.some((e=>3===e.getState()))?3:2)}return n.sourceTiles}getTile(e,t,n,r,i){const o=_g(e,t,n),s=this.getKey();let a;if(this.tileCache.containsKey(o)&&(a=this.tileCache.get(o),a.key===s))return a;const l=[e,t,n];let u=this.getTileCoordForTileUrlFunction(l,i);const c=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(i);if(u&&c){const t=d.getTileCoordExtent(u);Nh(t,-d.getResolution(e),t),fp(c,t)||(u=null)}let h=!0;if(null!==u){const t=this.tileGrid,n=d.getResolution(e),o=t.getZForResolution(n,1),s=d.getTileCoordExtent(u);Nh(s,-n,s),t.forEachTileCoord(s,o,(e=>{h=h&&!this.tileUrlFunction(e,r,i)}))}const p=new ix(l,h?4:0,u,this.getSourceTiles.bind(this,r,i));return p.key=s,a?(p.interimTile=a,p.refreshInterimChain(),this.tileCache.replace(o,p)):this.tileCache.set(o,p),p}getTileGridForProjection(e){const t=e.getCode();let n=this.tileGrids_[t];if(!n){const e=this.tileGrid,r=e.getResolutions().slice(),i=r.map((function(t,n){return e.getOrigin(n)})),o=r.map((function(t,n){return e.getTileSize(n)})),s=vh+1;for(let e=r.length;e<s;++e)r.push(r[e-1]/2),i.push(i[e-1]),o.push(o[e-1]);n=new Cg({extent:e.getExtent(),origins:i,resolutions:r,tileSizes:o}),this.tileGrids_[t]=n}return n}getTilePixelRatio(e){return e}getTilePixelSize(e,t,n){const r=hg(this.getTileGridForProjection(n).getTileSize(e),this.tmpSize);return[Math.round(r[0]*t),Math.round(r[1]*t)]}updateCacheSize(e,t){super.updateCacheSize(2*e,t),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(t).highWaterMark}};function sx(e,t){e.setLoader((function(n,r,i){Xb(t,e.getFormat(),n,r,i,e.onLoad.bind(e),e.onError.bind(e))}))}var ax,lx={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ux(e){return(e=Math.round(e))<0?0:e>255?255:e}function cx(e){return e<0?0:e>1?1:e}function dx(e){return"%"===e[e.length-1]?ux(parseFloat(e)/100*255):ux(parseInt(e))}function hx(e){return"%"===e[e.length-1]?cx(parseFloat(e)/100):cx(parseFloat(e))}function px(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}try{ax={}.parseCSSColor=function(e){var t,n=e.replace(/ /g,"").toLowerCase();if(n in lx)return lx[n].slice();if("#"===n[0])return 4===n.length?(t=parseInt(n.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===n.length&&(t=parseInt(n.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var r=n.indexOf("("),i=n.indexOf(")");if(-1!==r&&i+1===n.length){var o=n.substr(0,r),s=n.substr(r+1,i-(r+1)).split(","),a=1;switch(o){case"rgba":if(4!==s.length)return null;a=hx(s.pop());case"rgb":return 3!==s.length?null:[dx(s[0]),dx(s[1]),dx(s[2]),a];case"hsla":if(4!==s.length)return null;a=hx(s.pop());case"hsl":if(3!==s.length)return null;var l=(parseFloat(s[0])%360+360)%360/360,u=hx(s[1]),c=hx(s[2]),d=c<=.5?c*(u+1):c+u-c*u,h=2*c-d;return[ux(255*px(h,d,l+1/3)),ux(255*px(h,d,l)),ux(255*px(h,d,l-1/3)),a];default:return null}}return null}}catch(e){}var fx=function(e,t,n,r){void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r};fx.parse=function(e){if(e){if(e instanceof fx)return e;if("string"==typeof e){var t=ax(e);if(t)return new fx(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},fx.prototype.toString=function(){var e=this.toArray(),t=e[0],n=e[1],r=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(n)+","+Math.round(r)+","+i+")"},fx.prototype.toArray=function(){var e=this,t=e.r,n=e.g,r=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*n/i,255*r/i,i]},fx.prototype.toArray01=function(){var e=this,t=e.r,n=e.g,r=e.b,i=e.a;return 0===i?[0,0,0,0]:[t/i,n/i,r/i,i]},fx.prototype.toArray01PremultipliedAlpha=function(){var e=this;return[e.r,e.g,e.b,e.a]},fx.black=new fx(0,0,0,1),fx.white=new fx(1,1,1,1),fx.transparent=new fx(0,0,0,0),fx.red=new fx(1,0,0,1),fx.blue=new fx(0,0,1,1);var mx=fx;function gx(e){return"object"==typeof e?["literal",e]:e}function _x(e){switch(e.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function yx(e,t){var n,r,i=gx((n=e.default,r=t.default,void 0!==n?n:void 0!==r?r:void 0));return void 0===i&&"resolvedImage"===t.type?"":i}function vx(e,t,n){var r=wx(e,t),i=["get",e.property];if("categorical"===r&&"boolean"==typeof n[0][0]){for(var o=["case"],s=0,a=n;s<a.length;s+=1){var l=a[s];o.push(["==",i,l[0]],l[1])}return o.push(yx(e,t)),o}if("categorical"===r){for(var u=["match",i],c=0,d=n;c<d.length;c+=1){var h=d[c];xx(u,h[0],h[1],!1)}return u.push(yx(e,t)),u}if("interval"===r){for(var p=["step",["number",i]],f=0,m=n;f<m.length;f+=1){var g=m[f];xx(p,g[0],g[1],!0)}return bx(p),void 0===e.default?p:["case",["==",["typeof",i],"number"],p,gx(e.default)]}if("exponential"===r){for(var _=void 0!==e.base?e.base:1,y=[_x(e),1===_?["linear"]:["exponential",_],["number",i]],v=0,b=n;v<b.length;v+=1){var x=b[v];xx(y,x[0],x[1],!1)}return void 0===e.default?y:["case",["==",["typeof",i],"number"],y,gx(e.default)]}throw new Error("Unknown property function type "+r)}function bx(e){"step"===e[0]&&3===e.length&&(e.push(0),e.push(e[3]))}function xx(e,t,n,r){e.length>3&&t===e[e.length-2]||(r&&2===e.length||e.push(t),e.push(n))}function wx(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function kx(e){for(var t=["concat"],n=/{([^{}]+)}/g,r=0,i=n.exec(e);null!==i;i=n.exec(e)){var o=e.slice(r,n.lastIndex-i[0].length);r=n.lastIndex,o.length>0&&t.push(o),t.push(["get",i[1]])}if(1===t.length)return e;if(r<e.length)t.push(e.slice(r));else if(2===t.length)return["to-string",t[1]];return t}var Cx=function(e){function t(t,n){e.call(this,n),this.message=n,this.key=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),Sx=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var n=0,r=t;n<r.length;n+=1){var i=r[n],o=i[0],s=i[1];this.bindings[o]=s}};Sx.prototype.concat=function(e){return new Sx(this,e)},Sx.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},Sx.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var Ax=Sx,Ex={kind:"null"},Mx={kind:"number"},Tx={kind:"string"},Px={kind:"boolean"},Rx={kind:"color"},Ix={kind:"object"},Lx={kind:"value"},Ox={kind:"collator"},zx={kind:"formatted"},Fx={kind:"resolvedImage"};function Dx(e,t){return{kind:"array",itemType:e,N:t}}function jx(e){if("array"===e.kind){var t=jx(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Nx=[Ex,Mx,Tx,Px,Rx,zx,Ix,Dx(Lx),Fx];function Bx(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Bx(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var n=0,r=Nx;n<r.length;n+=1)if(!Bx(r[n],t))return null}return"Expected "+jx(e)+" but found "+jx(t)+" instead."}function qx(e,t){return t.some((function(t){return t.kind===e.kind}))}function Gx(e,t){return t.some((function(t){return"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e}))}var Vx=function(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Vx.prototype.compare=function(e,t){return this.collator.compare(e,t)},Vx.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Wx=Vx,Hx=function(e,t,n,r,i){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=n,this.fontStack=r,this.textColor=i},Ux=function(e){this.sections=e};Ux.fromString=function(e){return new Ux([new Hx(e,null,null,null,null)])},Ux.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},Ux.factory=function(e){return e instanceof Ux?e:Ux.fromString(e)},Ux.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},Ux.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t<n.length;t+=1){var r=n[t];if(r.image)e.push(["image",r.image.name]);else{e.push(r.text);var i={};r.fontStack&&(i["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(i["font-scale"]=r.scale),r.textColor&&(i["text-color"]=["rgba"].concat(r.textColor.toArray())),e.push(i)}}return e};var Zx=Ux,Xx=function(e){this.name=e.name,this.available=e.available};Xx.prototype.toString=function(){return this.name},Xx.fromString=function(e){return e?new Xx({name:e,available:!1}):null},Xx.prototype.serialize=function(){return["image",this.name]};var Kx=Xx;function $x(e,t,n,r){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[e,t,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[e,t,n,r]:[e,t,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Yx(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof mx)return!0;if(e instanceof Wx)return!0;if(e instanceof Zx)return!0;if(e instanceof Kx)return!0;if(Array.isArray(e)){for(var t=0,n=e;t<n.length;t+=1)if(!Yx(n[t]))return!1;return!0}if("object"==typeof e){for(var r in e)if(!Yx(e[r]))return!1;return!0}return!1}function Qx(e){if(null===e)return Ex;if("string"==typeof e)return Tx;if("boolean"==typeof e)return Px;if("number"==typeof e)return Mx;if(e instanceof mx)return Rx;if(e instanceof Wx)return Ox;if(e instanceof Zx)return zx;if(e instanceof Kx)return Fx;if(Array.isArray(e)){for(var t,n=e.length,r=0,i=e;r<i.length;r+=1){var o=Qx(i[r]);if(t){if(t===o)continue;t=Lx;break}t=o}return Dx(t||Lx,n)}return Ix}function Jx(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof mx||e instanceof Zx||e instanceof Kx?e.toString():JSON.stringify(e)}var ew=function(e,t){this.type=e,this.value=t};ew.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!Yx(e[1]))return t.error("invalid value");var n=e[1],r=Qx(n),i=t.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new ew(r,n)},ew.prototype.evaluate=function(){return this.value},ew.prototype.eachChild=function(){},ew.prototype.outputDefined=function(){return!0},ew.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof mx?["rgba"].concat(this.value.toArray()):this.value instanceof Zx?this.value.serialize():this.value};var tw=ew,nw=function(e){this.name="ExpressionEvaluationError",this.message=e};nw.prototype.toJSON=function(){return this.message};var rw=nw,iw={string:Tx,number:Mx,boolean:Px,object:Ix},ow=function(e,t){this.type=e,this.args=t};ow.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n,r=1,i=e[0];if("array"===i){var o,s;if(e.length>2){var a=e[1];if("string"!=typeof a||!(a in iw)||"object"===a)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=iw[a],r++}else o=Lx;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);s=e[2],r++}n=Dx(o,s)}else n=iw[i];for(var l=[];r<e.length;r++){var u=t.parse(e[r],r,Lx);if(!u)return null;l.push(u)}return new ow(n,l)},ow.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var n=this.args[t].evaluate(e);if(!Bx(this.type,Qx(n)))return n;if(t===this.args.length-1)throw new rw("Expected value to be of type "+jx(this.type)+", but found "+jx(Qx(n))+" instead.")}return null},ow.prototype.eachChild=function(e){this.args.forEach(e)},ow.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},ow.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var n=e.itemType;if("string"===n.kind||"number"===n.kind||"boolean"===n.kind){t.push(n.kind);var r=e.N;("number"==typeof r||this.args.length>1)&&t.push(r)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var sw=ow,aw=function(e){this.type=zx,this.sections=e};aw.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[1];if(!Array.isArray(n)&&"object"==typeof n)return t.error("First argument must be an image or text section.");for(var r=[],i=!1,o=1;o<=e.length-1;++o){var s=e[o];if(i&&"object"==typeof s&&!Array.isArray(s)){i=!1;var a=null;if(s["font-scale"]&&!(a=t.parse(s["font-scale"],1,Mx)))return null;var l=null;if(s["text-font"]&&!(l=t.parse(s["text-font"],1,Dx(Tx))))return null;var u=null;if(s["text-color"]&&!(u=t.parse(s["text-color"],1,Rx)))return null;var c=r[r.length-1];c.scale=a,c.font=l,c.textColor=u}else{var d=t.parse(e[o],1,Lx);if(!d)return null;var h=d.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:d,scale:null,font:null,textColor:null})}}return new aw(r)},aw.prototype.evaluate=function(e){return new Zx(this.sections.map((function(t){var n=t.content.evaluate(e);return Qx(n)===Fx?new Hx("",n,null,null,null):new Hx(Jx(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},aw.prototype.eachChild=function(e){for(var t=0,n=this.sections;t<n.length;t+=1){var r=n[t];e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}},aw.prototype.outputDefined=function(){return!1},aw.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t<n.length;t+=1){var r=n[t];e.push(r.content.serialize());var i={};r.scale&&(i["font-scale"]=r.scale.serialize()),r.font&&(i["text-font"]=r.font.serialize()),r.textColor&&(i["text-color"]=r.textColor.serialize()),e.push(i)}return e};var lw=aw,uw=function(e){this.type=Fx,this.input=e};uw.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,Tx);return n?new uw(n):t.error("No image name provided.")},uw.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=Kx.fromString(t);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(t)>-1),n},uw.prototype.eachChild=function(e){e(this.input)},uw.prototype.outputDefined=function(){return!1},uw.prototype.serialize=function(){return["image",this.input.serialize()]};var cw=uw,dw={"to-boolean":Px,"to-color":Rx,"to-number":Mx,"to-string":Tx},hw=function(e,t){this.type=e,this.args=t};hw.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[0];if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");for(var r=dw[n],i=[],o=1;o<e.length;o++){var s=t.parse(e[o],o,Lx);if(!s)return null;i.push(s)}return new hw(r,i)},hw.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,n,r=0,i=this.args;r<i.length;r+=1){if(n=null,(t=i[r].evaluate(e))instanceof mx)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(n=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":$x(t[0],t[1],t[2],t[3])))return new mx(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new rw(n||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var s=null,a=0,l=this.args;a<l.length;a+=1){if(null===(s=l[a].evaluate(e)))return 0;var u=Number(s);if(!isNaN(u))return u}throw new rw("Could not convert "+JSON.stringify(s)+" to number.")}return"formatted"===this.type.kind?Zx.fromString(Jx(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?Kx.fromString(Jx(this.args[0].evaluate(e))):Jx(this.args[0].evaluate(e))},hw.prototype.eachChild=function(e){this.args.forEach(e)},hw.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},hw.prototype.serialize=function(){if("formatted"===this.type.kind)return new lw([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new cw(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var pw=hw,fw=["Unknown","Point","LineString","Polygon"],mw=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};mw.prototype.id=function(){return this.feature&&void 0!==this.feature.id?this.feature.id:null},mw.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?fw[this.feature.type]:this.feature.type:null},mw.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},mw.prototype.canonicalID=function(){return this.canonical},mw.prototype.properties=function(){return this.feature&&this.feature.properties||{}},mw.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var e=this.featureDistanceData.center,t=this.featureDistanceData.scale,n=this.featureTileCoord,r=n.x,i=n.y,o=r*t-e[0],s=i*t-e[1];return this.featureDistanceData.bearing[0]*o+this.featureDistanceData.bearing[1]*s}return 0},mw.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=mx.parse(e)),t};var gw=mw,_w=function(e,t,n,r){this.name=e,this.type=t,this._evaluate=n,this.args=r};_w.prototype.evaluate=function(e){return this._evaluate(e,this.args)},_w.prototype.eachChild=function(e){this.args.forEach(e)},_w.prototype.outputDefined=function(){return!1},_w.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},_w.parse=function(e,t){var n,r=e[0],i=_w.definitions[r];if(!i)return t.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(i)?i[0]:i.type,s=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,a=s.filter((function(t){var n=t[0];return!Array.isArray(n)||n.length===e.length-1})),l=null,u=0,c=a;u<c.length;u+=1){var d=c[u],h=d[0],p=d[1];l=new Uw(t.registry,t.path,null,t.scope);for(var f=[],m=!1,g=1;g<e.length;g++){var _=e[g],y=Array.isArray(h)?h[g-1]:h.type,v=l.parse(_,1+f.length,y);if(!v){m=!0;break}f.push(v)}if(!m)if(Array.isArray(h)&&h.length!==f.length)l.error("Expected "+h.length+" arguments, but found "+f.length+" instead.");else{for(var b=0;b<f.length;b++){var x=Array.isArray(h)?h[b]:h.type,w=f[b];l.concat(b+1).checkSubtype(x,w.type)}if(0===l.errors.length)return new _w(r,o,p,f)}}if(1===a.length)(n=t.errors).push.apply(n,l.errors);else{for(var k=(a.length?a:s).map((function(e){var t;return t=e[0],Array.isArray(t)?"("+t.map(jx).join(", ")+")":"("+jx(t.type)+"...)"})).join(" | "),C=[],S=1;S<e.length;S++){var A=t.parse(e[S],1+C.length);if(!A)return null;C.push(jx(A.type))}t.error("Expected arguments of type "+k+", but found ("+C.join(", ")+") instead.")}return null},_w.register=function(e,t){for(var n in _w.definitions=t,t)e[n]=_w};var yw=_w,vw=function(e,t,n){this.type=Ox,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=t};vw.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var n=e[1];if("object"!=typeof n||Array.isArray(n))return t.error("Collator options argument must be an object.");var r=t.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,Px);if(!r)return null;var i=t.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,Px);if(!i)return null;var o=null;return n.locale&&!(o=t.parse(n.locale,1,Tx))?null:new vw(r,i,o)},vw.prototype.evaluate=function(e){return new Wx(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},vw.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},vw.prototype.outputDefined=function(){return!1},vw.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var bw=vw,xw=8192;function ww(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function kw(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Cw(e,t){var n,r=(180+e[0])/360,i=(n=e[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360),o=Math.pow(2,t.z);return[Math.round(r*o*xw),Math.round(i*o*xw)]}function Sw(e,t,n){var r=e[0]-t[0],i=e[1]-t[1],o=e[0]-n[0],s=e[1]-n[1];return r*s-o*i==0&&r*o<=0&&i*s<=0}function Aw(e,t,n){return t[1]>e[1]!=n[1]>e[1]&&e[0]<(n[0]-t[0])*(e[1]-t[1])/(n[1]-t[1])+t[0]}function Ew(e,t){for(var n=!1,r=0,i=t.length;r<i;r++)for(var o=t[r],s=0,a=o.length;s<a-1;s++){if(Sw(e,o[s],o[s+1]))return!1;Aw(e,o[s],o[s+1])&&(n=!n)}return n}function Mw(e,t){for(var n=0;n<t.length;n++)if(Ew(e,t[n]))return!0;return!1}function Tw(e,t,n,r){var i=e[0]-n[0],o=e[1]-n[1],s=t[0]-n[0],a=t[1]-n[1],l=r[0]-n[0],u=r[1]-n[1],c=i*u-l*o,d=s*u-l*a;return c>0&&d<0||c<0&&d>0}function Pw(e,t,n){for(var r=0,i=n;r<i.length;r+=1)for(var o=i[r],s=0;s<o.length-1;++s)if(a=e,l=t,u=o[s],c=o[s+1],d=void 0,h=void 0,p=void 0,p=[l[0]-a[0],l[1]-a[1]],0!=(d=[c[0]-u[0],c[1]-u[1]])[0]*(h=p)[1]-d[1]*h[0]&&Tw(a,l,u,c)&&Tw(u,c,a,l))return!0;var a,l,u,c,d,h,p;return!1}function Rw(e,t){for(var n=0;n<e.length;++n)if(!Ew(e[n],t))return!1;for(var r=0;r<e.length-1;++r)if(Pw(e[r],e[r+1],t))return!1;return!0}function Iw(e,t){for(var n=0;n<t.length;n++)if(Rw(e,t[n]))return!0;return!1}function Lw(e,t,n){for(var r=[],i=0;i<e.length;i++){for(var o=[],s=0;s<e[i].length;s++){var a=Cw(e[i][s],n);ww(t,a),o.push(a)}r.push(o)}return r}function Ow(e,t,n){for(var r=[],i=0;i<e.length;i++){var o=Lw(e[i],t,n);r.push(o)}return r}function zw(e,t,n,r){if(e[0]<n[0]||e[0]>n[2]){var i=.5*r,o=e[0]-n[0]>i?-r:n[0]-e[0]>i?r:0;0===o&&(o=e[0]-n[2]>i?-r:n[2]-e[0]>i?r:0),e[0]+=o}ww(t,e)}function Fw(e,t,n,r){var i=Math.pow(2,r.z)*xw,o=[r.x*xw,r.y*xw],s=[];if(!e)return s;for(var a=0,l=e;a<l.length;a+=1)for(var u=0,c=l[a];u<c.length;u+=1){var d=c[u],h=[d.x+o[0],d.y+o[1]];zw(h,t,n,i),s.push(h)}return s}function Dw(e,t,n,r){var i=Math.pow(2,r.z)*xw,o=[r.x*xw,r.y*xw],s=[];if(!e)return s;for(var a=0,l=e;a<l.length;a+=1){for(var u=[],c=0,d=l[a];c<d.length;c+=1){var h=d[c],p=[h.x+o[0],h.y+o[1]];ww(t,p),u.push(p)}s.push(u)}if(t[2]-t[0]<=i/2){!function(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}(t);for(var f=0,m=s;f<m.length;f+=1)for(var g=0,_=m[f];g<_.length;g+=1)zw(_[g],t,n,i)}return s}var jw=function(e,t){this.type=Px,this.geojson=e,this.geometries=t};jw.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(Yx(e[1])){var n=e[1];if("FeatureCollection"===n.type)for(var r=0;r<n.features.length;++r){var i=n.features[r].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new jw(n,n.features[r].geometry)}else if("Feature"===n.type){var o=n.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new jw(n,n.geometry)}else if("Polygon"===n.type||"MultiPolygon"===n.type)return new jw(n,n)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},jw.prototype.evaluate=function(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if(!i)return!1;if("Polygon"===t.type){var o=Lw(t.coordinates,r,i),s=Fw(e.geometry(),n,r,i);if(!kw(n,r))return!1;for(var a=0,l=s;a<l.length;a+=1)if(!Ew(l[a],o))return!1}if("MultiPolygon"===t.type){var u=Ow(t.coordinates,r,i),c=Fw(e.geometry(),n,r,i);if(!kw(n,r))return!1;for(var d=0,h=c;d<h.length;d+=1)if(!Mw(h[d],u))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if(!i)return!1;if("Polygon"===t.type){var o=Lw(t.coordinates,r,i),s=Dw(e.geometry(),n,r,i);if(!kw(n,r))return!1;for(var a=0,l=s;a<l.length;a+=1)if(!Rw(l[a],o))return!1}if("MultiPolygon"===t.type){var u=Ow(t.coordinates,r,i),c=Dw(e.geometry(),n,r,i);if(!kw(n,r))return!1;for(var d=0,h=c;d<h.length;d+=1)if(!Iw(h[d],u))return!1}return!0}(e,this.geometries)}return!1},jw.prototype.eachChild=function(){},jw.prototype.outputDefined=function(){return!0},jw.prototype.serialize=function(){return["within",this.geojson]};var Nw=jw;function Bw(e){if(e instanceof yw){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof Nw)return!1;var t=!0;return e.eachChild((function(e){t&&!Bw(e)&&(t=!1)})),t}function qw(e){if(e instanceof yw&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!qw(e)&&(t=!1)})),t}function Gw(e,t){if(e instanceof yw&&t.indexOf(e.name)>=0)return!1;var n=!0;return e.eachChild((function(e){n&&!Gw(e,t)&&(n=!1)})),n}var Vw=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};Vw.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var n=e[1];return t.scope.has(n)?new Vw(n,t.scope.get(n)):t.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},Vw.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},Vw.prototype.eachChild=function(){},Vw.prototype.outputDefined=function(){return!1},Vw.prototype.serialize=function(){return["var",this.name]};var Ww=Vw,Hw=function(e,t,n,r,i){void 0===t&&(t=[]),void 0===r&&(r=new Ax),void 0===i&&(i=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=r,this.errors=i,this.expectedType=n};Hw.prototype.parse=function(e,t,n,r,i){return void 0===i&&(i={}),t?this.concat(t,n,r)._parse(e,i):this._parse(e,i)},Hw.prototype._parse=function(e,t){function n(e,t,n){return"assert"===n?new sw(t,[e]):"coerce"===n?new pw(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=e[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var o=i.parse(e,this);if(!o)return null;if(this.expectedType){var s=this.expectedType,a=o.type;if("string"!==s.kind&&"number"!==s.kind&&"boolean"!==s.kind&&"object"!==s.kind&&"array"!==s.kind||"value"!==a.kind)if("color"!==s.kind&&"formatted"!==s.kind&&"resolvedImage"!==s.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(s,a))return null}else o=n(o,s,t.typeAnnotation||"coerce");else o=n(o,s,t.typeAnnotation||"assert")}if(!(o instanceof tw)&&"resolvedImage"!==o.type.kind&&Zw(o)){var l=new gw;try{o=new tw(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Hw.prototype.concat=function(e,t,n){var r="number"==typeof e?this.path.concat(e):this.path,i=n?this.scope.concat(n):this.scope;return new Hw(this.registry,r,t||null,i,this.errors)},Hw.prototype.error=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new Cx(r,e))},Hw.prototype.checkSubtype=function(e,t){var n=Bx(e,t);return n&&this.error(n),n};var Uw=Hw;function Zw(e){if(e instanceof Ww)return Zw(e.boundExpression);if(e instanceof yw&&"error"===e.name)return!1;if(e instanceof bw)return!1;if(e instanceof Nw)return!1;var t=e instanceof pw||e instanceof sw,n=!0;return e.eachChild((function(e){n=t?n&&Zw(e):n&&e instanceof tw})),!!n&&Bw(e)&&Gw(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Xw(e,t){for(var n,r,i=e.length-1,o=0,s=i,a=0;o<=s;)if(n=e[a=Math.floor((o+s)/2)],r=e[a+1],n<=t){if(a===i||t<r)return a;o=a+1}else{if(!(n>t))throw new rw("Input is not a number.");s=a-1}return 0}var Kw=function(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var r=0,i=n;r<i.length;r+=1){var o=i[r],s=o[0],a=o[1];this.labels.push(s),this.outputs.push(a)}};Kw.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var n=t.parse(e[1],1,Mx);if(!n)return null;var r=[],i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var o=1;o<e.length;o+=2){var s=1===o?-1/0:e[o],a=e[o+1],l=o,u=o+1;if("number"!=typeof s)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(r.length&&r[r.length-1][0]>=s)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(a,u,i);if(!c)return null;i=i||c.type,r.push([s,c])}return new Kw(i,n,r)},Kw.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;return r>=t[i-1]?n[i-1].evaluate(e):n[Xw(t,r)].evaluate(e)},Kw.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1)e(n[t])},Kw.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},Kw.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var $w=Kw,Yw=Qw;function Qw(e,t,n,r){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=n,this.p2y=r}function Jw(e,t,n){return e*(1-n)+t*n}Qw.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},Qw.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},Qw.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},Qw.prototype.solveCurveX=function(e,t){var n,r,i,o,s;for(void 0===t&&(t=1e-6),i=e,s=0;s<8;s++){if(o=this.sampleCurveX(i)-e,Math.abs(o)<t)return i;var a=this.sampleCurveDerivativeX(i);if(Math.abs(a)<1e-6)break;i-=o/a}if((i=e)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-e)<t)return i;e>o?n=i:r=i,i=.5*(r-n)+n}return i},Qw.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var ek=Object.freeze({__proto__:null,number:Jw,color:function(e,t,n){return new mx(Jw(e.r,t.r,n),Jw(e.g,t.g,n),Jw(e.b,t.b,n),Jw(e.a,t.a,n))},array:function(e,t,n){return e.map((function(e,r){return Jw(e,t[r],n)}))}}),tk=.95047,nk=1.08883,rk=4/29,ik=6/29,ok=3*ik*ik,sk=ik*ik*ik,ak=Math.PI/180,lk=180/Math.PI;function uk(e){return e>sk?Math.pow(e,1/3):e/ok+rk}function ck(e){return e>ik?e*e*e:ok*(e-rk)}function dk(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function hk(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pk(e){var t=hk(e.r),n=hk(e.g),r=hk(e.b),i=uk((.4124564*t+.3575761*n+.1804375*r)/tk),o=uk((.2126729*t+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-uk((.0193339*t+.119192*n+.9503041*r)/nk)),alpha:e.a}}function fk(e){var t=(e.l+16)/116,n=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=1*ck(t),n=tk*ck(n),r=nk*ck(r),new mx(dk(3.2404542*n-1.5371385*t-.4985314*r),dk(-.969266*n+1.8760108*t+.041556*r),dk(.0556434*n-.2040259*t+1.0572252*r),e.alpha)}function mk(e,t,n){var r=t-e;return e+n*(r>180||r<-180?r-360*Math.round(r/360):r)}var gk={forward:pk,reverse:fk,interpolate:function(e,t,n){return{l:Jw(e.l,t.l,n),a:Jw(e.a,t.a,n),b:Jw(e.b,t.b,n),alpha:Jw(e.alpha,t.alpha,n)}}},_k=function(e){var t=pk(e),n=t.l,r=t.a,i=t.b,o=Math.atan2(i,r)*lk;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:e.a}},yk=function(e){var t=e.h*ak,n=e.c;return fk({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})},vk=function(e,t,n){return{h:mk(e.h,t.h,n),c:Jw(e.c,t.c,n),l:Jw(e.l,t.l,n),alpha:Jw(e.alpha,t.alpha,n)}},bk=function(e,t,n,r,i){this.type=e,this.operator=t,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,s=i;o<s.length;o+=1){var a=s[o],l=a[0],u=a[1];this.labels.push(l),this.outputs.push(u)}};function xk(e,t,n,r){var i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}bk.interpolationFactor=function(e,t,n,r){var i=0;if("exponential"===e.name)i=xk(t,e.base,n,r);else if("linear"===e.name)i=xk(t,1,n,r);else if("cubic-bezier"===e.name){var o=e.controlPoints;i=new Yw(o[0],o[1],o[2],o[3]).solve(xk(t,1,n,r))}return i},bk.parse=function(e,t){var n=e[0],r=e[1],i=e[2],o=e.slice(3);if(!Array.isArray(r)||0===r.length)return t.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){var s=r[1];if("number"!=typeof s)return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:s}}else{if("cubic-bezier"!==r[0])return t.error("Unknown interpolation type "+String(r[0]),1,0);var a=r.slice(1);if(4!==a.length||a.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:a}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,Mx)))return null;var l=[],u=null;"interpolate-hcl"===n||"interpolate-lab"===n?u=Rx:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var d=o[c],h=o[c+1],p=c+3,f=c+4;if("number"!=typeof d)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',p);if(l.length&&l[l.length-1][0]>=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var m=t.parse(h,f,u);if(!m)return null;u=u||m.type,l.push([d,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new bk(u,n,r,i,l):t.error("Type "+jx(u)+" is not interpolatable.")},bk.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;if(r>=t[i-1])return n[i-1].evaluate(e);var o=Xw(t,r),s=t[o],a=t[o+1],l=bk.interpolationFactor(this.interpolation,r,s,a),u=n[o].evaluate(e),c=n[o+1].evaluate(e);return"interpolate"===this.operator?ek[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?yk(vk(_k(u),_k(c),l)):gk.reverse(gk.interpolate(gk.forward(u),gk.forward(c),l))},bk.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1)e(n[t])},bk.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},bk.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],n=0;n<this.labels.length;n++)t.push(this.labels[n],this.outputs[n].serialize());return t};var wk=bk,kk=function(e,t){this.type=e,this.args=t};kk.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var n=null,r=t.expectedType;r&&"value"!==r.kind&&(n=r);for(var i=[],o=0,s=e.slice(1);o<s.length;o+=1){var a=s[o],l=t.parse(a,1+i.length,n,void 0,{typeAnnotation:"omit"});if(!l)return null;n=n||l.type,i.push(l)}var u=r&&i.some((function(e){return Bx(r,e.type)}));return new kk(u?Lx:n,i)},kk.prototype.evaluate=function(e){for(var t,n=null,r=0,i=0,o=this.args;i<o.length;i+=1){if(r++,(n=o[i].evaluate(e))&&n instanceof Kx&&!n.available&&(t||(t=n),n=null,r===this.args.length))return t;if(null!==n)break}return n},kk.prototype.eachChild=function(e){this.args.forEach(e)},kk.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},kk.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ck=kk,Sk=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};Sk.prototype.evaluate=function(e){return this.result.evaluate(e)},Sk.prototype.eachChild=function(e){for(var t=0,n=this.bindings;t<n.length;t+=1)e(n[t][1]);e(this.result)},Sk.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var n=[],r=1;r<e.length-1;r+=2){var i=e[r];if("string"!=typeof i)return t.error("Expected string, but found "+typeof i+" instead.",r);if(/[^a-zA-Z0-9_]/.test(i))return t.error("Variable names must contain only alphanumeric characters or '_'.",r);var o=t.parse(e[r+1],r+1);if(!o)return null;n.push([i,o])}var s=t.parse(e[e.length-1],e.length-1,t.expectedType,n);return s?new Sk(n,s):null},Sk.prototype.outputDefined=function(){return this.result.outputDefined()},Sk.prototype.serialize=function(){for(var e=["let"],t=0,n=this.bindings;t<n.length;t+=1){var r=n[t],i=r[0],o=r[1];e.push(i,o.serialize())}return e.push(this.result.serialize()),e};var Ak=Sk,Ek=function(e,t,n){this.type=e,this.index=t,this.input=n};Ek.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Mx),r=t.parse(e[2],2,Dx(t.expectedType||Lx));if(!n||!r)return null;var i=r.type;return new Ek(i.itemType,n,r)},Ek.prototype.evaluate=function(e){var t=this.index.evaluate(e),n=this.input.evaluate(e);if(t<0)throw new rw("Array index out of bounds: "+t+" < 0.");if(t>=n.length)throw new rw("Array index out of bounds: "+t+" > "+(n.length-1)+".");if(t!==Math.floor(t))throw new rw("Array index must be an integer, but found "+t+" instead.");return n[t]},Ek.prototype.eachChild=function(e){e(this.index),e(this.input)},Ek.prototype.outputDefined=function(){return!1},Ek.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Mk=Ek,Tk=function(e,t){this.type=Px,this.needle=e,this.haystack=t};Tk.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Lx),r=t.parse(e[2],2,Lx);return n&&r?qx(n.type,[Px,Tx,Mx,Ex,Lx])?new Tk(n,r):t.error("Expected first argument to be of type boolean, string, number or null, but found "+jx(n.type)+" instead"):null},Tk.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(null==n)return!1;if(!Gx(t,["boolean","string","number","null"]))throw new rw("Expected first argument to be of type boolean, string, number or null, but found "+jx(Qx(t))+" instead.");if(!Gx(n,["string","array"]))throw new rw("Expected second argument to be of type array or string, but found "+jx(Qx(n))+" instead.");return n.indexOf(t)>=0},Tk.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},Tk.prototype.outputDefined=function(){return!0},Tk.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Pk=Tk,Rk=function(e,t,n){this.type=Mx,this.needle=e,this.haystack=t,this.fromIndex=n};Rk.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Lx),r=t.parse(e[2],2,Lx);if(!n||!r)return null;if(!qx(n.type,[Px,Tx,Mx,Ex,Lx]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+jx(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,Mx);return i?new Rk(n,r,i):null}return new Rk(n,r)},Rk.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Gx(t,["boolean","string","number","null"]))throw new rw("Expected first argument to be of type boolean, string, number or null, but found "+jx(Qx(t))+" instead.");if(!Gx(n,["string","array"]))throw new rw("Expected second argument to be of type array or string, but found "+jx(Qx(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)},Rk.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},Rk.prototype.outputDefined=function(){return!1},Rk.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ik=Rk,Lk=function(e,t,n,r,i,o){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};Lk.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var n,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var i={},o=[],s=2;s<e.length-1;s+=2){var a=e[s],l=e[s+1];Array.isArray(a)||(a=[a]);var u=t.concat(s);if(0===a.length)return u.error("Expected at least one branch label.");for(var c=0,d=a;c<d.length;c+=1){var h=d[c];if("number"!=typeof h&&"string"!=typeof h)return u.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,Qx(h)))return null}else n=Qx(h);if(void 0!==i[String(h)])return u.error("Branch labels must be unique.");i[String(h)]=o.length}var p=t.parse(l,s,r);if(!p)return null;r=r||p.type,o.push(p)}var f=t.parse(e[1],1,Lx);if(!f)return null;var m=t.parse(e[e.length-1],e.length-1,r);return m?"value"!==f.type.kind&&t.concat(1).checkSubtype(n,f.type)?null:new Lk(n,r,f,i,o,m):null},Lk.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Qx(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Lk.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Lk.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},Lk.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var s=o[i];void 0===(d=r[this.cases[s]])?(r[this.cases[s]]=n.length,n.push([this.cases[s],[s]])):n[d][1].push(s)}for(var a=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,u=n;l<u.length;l+=1){var c=u[l],d=c[0],h=c[1];1===h.length?t.push(a(h[0])):t.push(h.map(a)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Ok=Lk,zk=function(e,t,n){this.type=e,this.branches=t,this.otherwise=n};zk.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r=[],i=1;i<e.length-1;i+=2){var o=t.parse(e[i],i,Px);if(!o)return null;var s=t.parse(e[i+1],i+1,n);if(!s)return null;r.push([o,s]),n=n||s.type}var a=t.parse(e[e.length-1],e.length-1,n);return a?new zk(n,r,a):null},zk.prototype.evaluate=function(e){for(var t=0,n=this.branches;t<n.length;t+=1){var r=n[t],i=r[0],o=r[1];if(i.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},zk.prototype.eachChild=function(e){for(var t=0,n=this.branches;t<n.length;t+=1){var r=n[t],i=r[0],o=r[1];e(i),e(o)}e(this.otherwise)},zk.prototype.outputDefined=function(){return this.branches.every((function(e){return e[0],e[1].outputDefined()}))&&this.otherwise.outputDefined()},zk.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Fk=zk,Dk=function(e,t,n,r){this.type=e,this.input=t,this.beginIndex=n,this.endIndex=r};Dk.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Lx),r=t.parse(e[2],2,Mx);if(!n||!r)return null;if(!qx(n.type,[Dx(Lx),Tx,Lx]))return t.error("Expected first argument to be of type array or string, but found "+jx(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,Mx);return i?new Dk(n.type,n,r,i):null}return new Dk(n.type,n,r)},Dk.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Gx(t,["string","array"]))throw new rw("Expected first argument to be of type array or string, but found "+jx(Qx(t))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)},Dk.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},Dk.prototype.outputDefined=function(){return!1},Dk.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var jk=Dk;function Nk(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Bk(e,t,n,r){return 0===r.compare(t,n)}function qk(e,t,n){var r="=="!==e&&"!="!==e;return function(){function i(e,t,n){this.type=Px,this.lhs=e,this.rhs=t,this.collator=n,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return i.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var n=e[0],o=t.parse(e[1],1,Lx);if(!o)return null;if(!Nk(n,o.type))return t.concat(1).error('"'+n+"\" comparisons are not supported for type '"+jx(o.type)+"'.");var s=t.parse(e[2],2,Lx);if(!s)return null;if(!Nk(n,s.type))return t.concat(2).error('"'+n+"\" comparisons are not supported for type '"+jx(s.type)+"'.");if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return t.error("Cannot compare types '"+jx(o.type)+"' and '"+jx(s.type)+"'.");r&&("value"===o.type.kind&&"value"!==s.type.kind?o=new sw(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new sw(o.type,[s])));var a=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(a=t.parse(e[3],3,Ox)))return null}return new i(o,s,a)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),s=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){var a=Qx(o),l=Qx(s);if(a.kind!==l.kind||"string"!==a.kind&&"number"!==a.kind)throw new rw('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+a.kind+", "+l.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var u=Qx(o),c=Qx(s);if("string"!==u.kind||"string"!==c.kind)return t(i,o,s)}return this.collator?n(i,o,s,this.collator.evaluate(i)):t(i,o,s)},i.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},i}()}var Gk=qk("==",(function(e,t,n){return t===n}),Bk),Vk=qk("!=",(function(e,t,n){return t!==n}),(function(e,t,n,r){return!Bk(0,t,n,r)})),Wk=qk("<",(function(e,t,n){return t<n}),(function(e,t,n,r){return r.compare(t,n)<0})),Hk=qk(">",(function(e,t,n){return t>n}),(function(e,t,n,r){return r.compare(t,n)>0})),Uk=qk("<=",(function(e,t,n){return t<=n}),(function(e,t,n,r){return r.compare(t,n)<=0})),Zk=qk(">=",(function(e,t,n){return t>=n}),(function(e,t,n,r){return r.compare(t,n)>=0})),Xk=function(e,t,n,r,i,o){this.type=Tx,this.number=e,this.locale=t,this.currency=n,this.unit=r,this.minFractionDigits=i,this.maxFractionDigits=o};Xk.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,Mx);if(!n)return null;var r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");var i=null;if(r.locale&&!(i=t.parse(r.locale,1,Tx)))return null;var o=null;if(r.currency&&!(o=t.parse(r.currency,1,Tx)))return null;var s=null;if(r.unit&&!(s=t.parse(r.unit,1,Tx)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=t.parse(r["min-fraction-digits"],1,Mx)))return null;var l=null;return r["max-fraction-digits"]&&!(l=t.parse(r["max-fraction-digits"],1,Mx))?null:new Xk(n,i,o,s,a,l)},Xk.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Xk.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Xk.prototype.outputDefined=function(){return!1},Xk.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Kk=Xk,$k=function(e){this.type=Mx,this.input=e};$k.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error("Expected argument of type string or array, but found "+jx(n.type)+" instead."):new $k(n):null},$k.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new rw("Expected value to be of type string or array, but found "+jx(Qx(t))+" instead.")},$k.prototype.eachChild=function(e){e(this.input)},$k.prototype.outputDefined=function(){return!1},$k.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Yk={"==":Gk,"!=":Vk,">":Hk,"<":Wk,">=":Zk,"<=":Uk,array:sw,at:Mk,boolean:sw,case:Fk,coalesce:Ck,collator:bw,format:lw,image:cw,in:Pk,"index-of":Ik,interpolate:wk,"interpolate-hcl":wk,"interpolate-lab":wk,length:$k,let:Ak,literal:tw,match:Ok,number:sw,"number-format":Kk,object:sw,slice:jk,step:$w,string:sw,"to-boolean":pw,"to-color":pw,"to-number":pw,"to-string":pw,var:Ww,within:Nw};function Qk(e,t){var n=t[0],r=t[1],i=t[2],o=t[3];n=n.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);var s=o?o.evaluate(e):1,a=$x(n,r,i,s);if(a)throw new rw(a);return new mx(n/255*s,r/255*s,i/255*s,s)}function Jk(e,t){return e in t}function eC(e,t){var n=t[e];return void 0===n?null:n}function tC(e){return{type:e}}yw.register(Yk,{error:[{kind:"error"},[Tx],function(e,t){var n=t[0];throw new rw(n.evaluate(e))}],typeof:[Tx,[Lx],function(e,t){return jx(Qx(t[0].evaluate(e)))}],"to-rgba":[Dx(Mx,4),[Rx],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Rx,[Mx,Mx,Mx],Qk],rgba:[Rx,[Mx,Mx,Mx,Mx],Qk],has:{type:Px,overloads:[[[Tx],function(e,t){return Jk(t[0].evaluate(e),e.properties())}],[[Tx,Ix],function(e,t){var n=t[0],r=t[1];return Jk(n.evaluate(e),r.evaluate(e))}]]},get:{type:Lx,overloads:[[[Tx],function(e,t){return eC(t[0].evaluate(e),e.properties())}],[[Tx,Ix],function(e,t){var n=t[0],r=t[1];return eC(n.evaluate(e),r.evaluate(e))}]]},"feature-state":[Lx,[Tx],function(e,t){return eC(t[0].evaluate(e),e.featureState||{})}],properties:[Ix,[],function(e){return e.properties()}],"geometry-type":[Tx,[],function(e){return e.geometryType()}],id:[Lx,[],function(e){return e.id()}],zoom:[Mx,[],function(e){return e.globals.zoom}],pitch:[Mx,[],function(e){return e.globals.pitch||0}],"distance-from-center":[Mx,[],function(e){return e.distanceFromCenter()}],"heatmap-density":[Mx,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[Mx,[],function(e){return e.globals.lineProgress||0}],"sky-radial-progress":[Mx,[],function(e){return e.globals.skyRadialProgress||0}],accumulated:[Lx,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[Mx,tC(Mx),function(e,t){for(var n=0,r=0,i=t;r<i.length;r+=1)n+=i[r].evaluate(e);return n}],"*":[Mx,tC(Mx),function(e,t){for(var n=1,r=0,i=t;r<i.length;r+=1)n*=i[r].evaluate(e);return n}],"-":{type:Mx,overloads:[[[Mx,Mx],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)-r.evaluate(e)}],[[Mx],function(e,t){return-t[0].evaluate(e)}]]},"/":[Mx,[Mx,Mx],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)/r.evaluate(e)}],"%":[Mx,[Mx,Mx],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)%r.evaluate(e)}],ln2:[Mx,[],function(){return Math.LN2}],pi:[Mx,[],function(){return Math.PI}],e:[Mx,[],function(){return Math.E}],"^":[Mx,[Mx,Mx],function(e,t){var n=t[0],r=t[1];return Math.pow(n.evaluate(e),r.evaluate(e))}],sqrt:[Mx,[Mx],function(e,t){var n=t[0];return Math.sqrt(n.evaluate(e))}],log10:[Mx,[Mx],function(e,t){var n=t[0];return Math.log(n.evaluate(e))/Math.LN10}],ln:[Mx,[Mx],function(e,t){var n=t[0];return Math.log(n.evaluate(e))}],log2:[Mx,[Mx],function(e,t){var n=t[0];return Math.log(n.evaluate(e))/Math.LN2}],sin:[Mx,[Mx],function(e,t){var n=t[0];return Math.sin(n.evaluate(e))}],cos:[Mx,[Mx],function(e,t){var n=t[0];return Math.cos(n.evaluate(e))}],tan:[Mx,[Mx],function(e,t){var n=t[0];return Math.tan(n.evaluate(e))}],asin:[Mx,[Mx],function(e,t){var n=t[0];return Math.asin(n.evaluate(e))}],acos:[Mx,[Mx],function(e,t){var n=t[0];return Math.acos(n.evaluate(e))}],atan:[Mx,[Mx],function(e,t){var n=t[0];return Math.atan(n.evaluate(e))}],min:[Mx,tC(Mx),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[Mx,tC(Mx),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[Mx,[Mx],function(e,t){var n=t[0];return Math.abs(n.evaluate(e))}],round:[Mx,[Mx],function(e,t){var n=t[0].evaluate(e);return n<0?-Math.round(-n):Math.round(n)}],floor:[Mx,[Mx],function(e,t){var n=t[0];return Math.floor(n.evaluate(e))}],ceil:[Mx,[Mx],function(e,t){var n=t[0];return Math.ceil(n.evaluate(e))}],"filter-==":[Px,[Tx,Lx],function(e,t){var n=t[0],r=t[1];return e.properties()[n.value]===r.value}],"filter-id-==":[Px,[Lx],function(e,t){var n=t[0];return e.id()===n.value}],"filter-type-==":[Px,[Tx],function(e,t){var n=t[0];return e.geometryType()===n.value}],"filter-<":[Px,[Tx,Lx],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i<o}],"filter-id-<":[Px,[Lx],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r<i}],"filter->":[Px,[Tx,Lx],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[Px,[Lx],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[Px,[Tx,Lx],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[Px,[Lx],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[Px,[Tx,Lx],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[Px,[Lx],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[Px,[Lx],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Px,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[Px,[Dx(Tx)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Px,[Dx(Lx)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Px,[Tx,Dx(Lx)],function(e,t){var n=t[0];return t[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[Px,[Tx,Dx(Lx)],function(e,t){var n=t[0],r=t[1];return function(e,t,n,r){for(;n<=r;){var i=n+r>>1;if(t[i]===e)return!0;t[i]>e?r=i-1:n=i+1}return!1}(e.properties()[n.value],r.value,0,r.value.length-1)}],all:{type:Px,overloads:[[[Px,Px],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)&&r.evaluate(e)}],[tC(Px),function(e,t){for(var n=0,r=t;n<r.length;n+=1)if(!r[n].evaluate(e))return!1;return!0}]]},any:{type:Px,overloads:[[[Px,Px],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)||r.evaluate(e)}],[tC(Px),function(e,t){for(var n=0,r=t;n<r.length;n+=1)if(r[n].evaluate(e))return!0;return!1}]]},"!":[Px,[Px],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[Px,[Tx],function(e,t){var n=t[0],r=e.globals&&e.globals.isSupportedScript;return!r||r(n.evaluate(e))}],upcase:[Tx,[Tx],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[Tx,[Tx],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[Tx,tC(Lx),function(e,t){return t.map((function(t){return Jx(t.evaluate(e))})).join("")}],"resolved-locale":[Tx,[Ox],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var nC=Yk;function rC(e){return{result:"success",value:e}}function iC(e){return{result:"error",value:e}}function oC(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var sC=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new gw,this._defaultValue=t?function(e){return"color"===e.type&&(oC(e.default)||Array.isArray(e.default))?new mx(0,0,0,0):"color"===e.type?mx.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function aC(e,t){var n=new Uw(nC,[],t?function(e){var t={color:Rx,string:Tx,number:Mx,enum:Tx,boolean:Px,formatted:zx,resolvedImage:Fx};return"array"===e.type?Dx(t[e.value]||Lx,e.length):t[e.type]}(t):void 0),r=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?rC(new sC(r,t)):iC(n.errors)}sC.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o,s,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=r||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=a||null,this.expression.evaluate(this._evaluator)},sC.prototype.evaluate=function(e,t,n,r,i,o,s,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=a||null;try{var l=this.expression.evaluate(this._evaluator);if(null==l||"number"==typeof l&&l!=l)return this._defaultValue;if(this._enumValues&&!(l in this._enumValues))throw new rw("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(l)+" instead.");return l}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}};var lC=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!qw(t.expression)};lC.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)},lC.prototype.evaluate=function(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)};var uC=function(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!qw(t.expression),this.interpolationType=r};function cC(e,t){if("error"===(e=aC(e,t)).result)return e;var n=e.value.expression,r=Bw(n);if(!r&&!function(e){return"data-driven"===e["property-type"]}(t))return iC([new Cx("","data expressions not supported")]);var i=Gw(n,["zoom","pitch","distance-from-center"]);if(!i&&!function(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}(t))return iC([new Cx("","zoom expressions not supported")]);var o=dC(n);if(!o&&!i)return iC([new Cx("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof Cx)return iC([o]);if(o instanceof wk&&!function(e){return!!e.expression&&e.expression.interpolated}(t))return iC([new Cx("",'"interpolate" expressions cannot be used with this property')]);if(!o)return rC(new lC(r?"constant":"source",e.value));var s=o instanceof wk?o.interpolation:void 0;return rC(new uC(r?"camera":"composite",e.value,o.labels,s))}function dC(e){var t=null;if(e instanceof Ak)t=dC(e.result);else if(e instanceof Ck)for(var n=0,r=e.args;n<r.length;n+=1){var i=r[n];if(t=dC(i))break}else(e instanceof $w||e instanceof wk)&&e.input instanceof yw&&"zoom"===e.input.name&&(t=e);return t instanceof Cx||e.eachChild((function(e){var n=dC(e);n instanceof Cx?t=n:!t&&n?t=new Cx("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new Cx("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function hC(e){if(Array.isArray(e))return e.map(hC);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){var t={};for(var n in e)t[n]=hC(e[n]);return t}return function(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}(e)}uC.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)},uC.prototype.evaluate=function(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)},uC.prototype.interpolationFactor=function(e,t,n){return this.interpolationType?wk.interpolationFactor(this.interpolationType,e,t,n):0};var pC={$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"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},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:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.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:{},sky:{}},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_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!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"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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"],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:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"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:{},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",{"symbol-placement":["point"]}],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","feature"]},"property-type":"data-driven"},"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-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"],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"],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_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,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},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},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}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!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:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},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:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},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:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-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"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function fC(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,n=e.slice(1);t<n.length;t+=1){var r=n[t];if(!fC(r)&&"boolean"!=typeof r)return!1}return!0;default:return!0}}function mC(e,t){if(void 0===t&&(t="fill"),null==e)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};fC(e)||(e=wC(e));var n=e,r=!0;try{r=function(e){if(!yC(e))return e;var t=hC(e);return _C(t),gC(t)}(n)}catch(e){console.warn("Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n"+JSON.stringify(n,null,2)+"\n ")}var i,o=pC["filter_"+t],s=aC(r,o);if("error"===s.result)throw new Error(s.value.map((function(e){return e.key+": "+e.message})).join(", "));i=function(e,t,n){return s.value.evaluate(e,t,{},n)};var a=null,l=null;if(r!==n){var u=aC(n,o);if("error"===u.result)throw new Error(u.value.map((function(e){return e.key+": "+e.message})).join(", "));a=function(e,t,n,r,i){return u.value.evaluate(e,t,{},n,void 0,void 0,r,i)},l=!Bw(u.value.expression)}return{filter:i,dynamicFilter:a||void 0,needGeometry:xC(r),needFeature:!!l}}function gC(e){if(!Array.isArray(e))return e;var t=function(e){if(vC.has(e[0]))for(var t=1;t<e.length;t++)if(yC(e[t]))return!0;return e}(e);return!0===t?t:t.map((function(e){return gC(e)}))}function _C(e){var t=!1,n=[];if("case"===e[0]){for(var r=1;r<e.length-1;r+=2)t=t||yC(e[r]),n.push(e[r+1]);n.push(e[e.length-1])}else if("match"===e[0]){t=t||yC(e[1]);for(var i=2;i<e.length-1;i+=2)n.push(e[i+1]);n.push(e[e.length-1])}else if("step"===e[0]){t=t||yC(e[1]);for(var o=1;o<e.length-1;o+=2)n.push(e[o+1])}t&&(e.length=0,e.push.apply(e,["any"].concat(n)));for(var s=1;s<e.length;s++)_C(e[s])}function yC(e){if(!Array.isArray(e))return!1;if("pitch"===(t=e[0])||"distance-from-center"===t)return!0;for(var t,n=1;n<e.length;n++)if(yC(e[n]))return!0;return!1}var vC=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function bC(e,t){return e<t?-1:e>t?1:0}function xC(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t<e.length;t++)if(xC(e[t]))return!0;return!1}function wC(e){if(!e)return!0;var t,n=e[0];return e.length<=1?"any"!==n:"=="===n?kC(e[1],e[2],"=="):"!="===n?AC(kC(e[1],e[2],"==")):"<"===n||">"===n||"<="===n||">="===n?kC(e[1],e[2],n):"any"===n?(t=e.slice(1),["any"].concat(t.map(wC))):"all"===n?["all"].concat(e.slice(1).map(wC)):"none"===n?["all"].concat(e.slice(1).map(wC).map(AC)):"in"===n?CC(e[1],e.slice(2)):"!in"===n?AC(CC(e[1],e.slice(2))):"has"===n?SC(e[1]):"!has"===n?AC(SC(e[1])):"within"!==n||e}function kC(e,t,n){switch(e){case"$type":return["filter-type-"+n,t];case"$id":return["filter-id-"+n,t];default:return["filter-"+n,e,t]}}function CC(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(bC)]]:["filter-in-small",e,["literal",t]]}}function SC(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function AC(e){return["!",e]}var EC=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function MC(e,t){var n={};for(var r in e)"ref"!==r&&(n[r]=e[r]);return EC.forEach((function(e){e in t&&(n[e]=t[e])})),n}function TC(e){e=e.slice();for(var t=Object.create(null),n=0;n<e.length;n++)t[e[n].id]=e[n];for(var r=0;r<e.length;r++)"ref"in e[r]&&(e[r]=MC(e[r],t[e[r].ref]));return e}var PC={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},RC=" ",IC=/(italic|oblique)$/i,LC={},OC=function(e,t,n){var r=LC[e];if(!r){Array.isArray(e)||(e=[e]);for(var i=400,o="normal",s=[],a=0,l=e.length;a<l;++a){var u=e[a].split(" "),c=u[u.length-1].toLowerCase();for(var d in"normal"==c||"italic"==c||"oblique"==c?(o=c,u.pop(),c=u[u.length-1].toLowerCase()):IC.test(c)&&(c=c.replace(IC,""),o=u[u.length-1].replace(c,"")),PC){var h=u.length>1?u[u.length-2].toLowerCase():"";if(c==d||c==d.replace("-","")||h+"-"+c==d){i=PC[d],u.pop(),h&&d.startsWith(h)&&u.pop();break}}"number"==typeof c&&(i=c);var p=u.join(RC).replace("Klokantech Noto Sans","Noto Sans");-1!==p.indexOf(RC)&&(p='"'+p+'"'),s.push(p)}r=LC[e]=[o,i,s]}return r[0]+RC+r[1]+RC+t+"px"+(n?"/"+n:"")+RC+r[2]};function zC(e,t){var n,r,i,o,s,a,l,u,c,d,h,p,f,m,g,_,y,v,b,x,w=e[0],k=w.width,C=w.height,S=w.data,A=new Uint8ClampedArray(S.length),E=2*t.resolution,M=k-1,T=C-1,P=[0,0,0,0],R=2*Math.PI,I=Math.PI/2,L=Math.PI*t.sunEl/180,O=Math.PI*t.sunAz/180,z=Math.cos(L),F=Math.sin(L),D=t.highlightColor,j=t.shadowColor,N=t.accentColor,B=t.encoding;function q(e,t){return void 0===t&&(t="mapbox"),"mapbox"===t?.1*(256*e[0]*256+256*e[1]+e[2])-1e4:"terrarium"===t?256*e[0]+e[1]+e[2]/256-32768:void 0}for(r=0;r<=T;++r)for(o=0===r?0:r-1,s=r===T?T:r+1,n=0;n<=M;++n)i=n===M?M:n+1,a=4*(r*k+(0===n?0:n-1)),P[0]=S[a],P[1]=S[a+1],P[2]=S[a+2],P[3]=S[a+3],l=t.vert*q(P,B),a=4*(r*k+i),P[0]=S[a],P[1]=S[a+1],P[2]=S[a+2],P[3]=S[a+3],u=(t.vert*q(P,B)-l)/E,a=4*(o*k+n),P[0]=S[a],P[1]=S[a+1],P[2]=S[a+2],P[3]=S[a+3],l=t.vert*q(P,B),a=4*(s*k+n),P[0]=S[a],P[1]=S[a+1],P[2]=S[a+2],P[3]=S[a+3],c=(t.vert*q(P,B)-l)/E,h=(h=Math.atan2(c,-u))<0?I-h:h>I?R-h+I:I-h,d=Math.atan(Math.sqrt(u*u+c*c)),x=F*Math.cos(d)+z*Math.sin(d)*Math.cos(O-h),p=Math.cos(d),f=255*x,y=Math.min(Math.max(2*t.sunEl,0),1),v=1.875-1.75*t.opacity,b=.5!==t.opacity?I*((Math.pow(v,d)-1)/(Math.pow(v,I)-1)):d,g={r:(1-p)*N.r*y*255,g:(1-p)*N.g*y*255,b:(1-p)*N.b*y*255,a:(1-p)*N.a*y*255},m=Math.abs(((h+O)/Math.PI+.5)%2-1),_={r:(D.r*(1-m)+j.r*m)*f,g:(D.g*(1-m)+j.g*m)*f,b:(D.b*(1-m)+j.b*m)*f,a:(D.a*(1-m)+j.a*m)*f},A[a=4*(r*k+n)]=g.r*(1-m)+_.r,A[a+1]=g.g*(1-m)+_.g,A[a+2]=g.b*(1-m)+_.b,A[a+3]=S[a+3]*t.opacity*y*Math.sin(b);return new ImageData(A,k,C)}var FC="https://api.mapbox.com";function DC(e){return 0!==e.indexOf("mapbox://")?"":e.slice(9)}function jC(e,t){var n=DC(e);if(!n)return decodeURI(new URL(e,location.href).href);if(0!==n.indexOf("styles/"))throw new Error("unexpected style url: "+e);var r=n.slice(7);return FC+"/styles/v1/"+r+"?&access_token="+t}function NC(e,t,n,r){var i=new URL(e,r),o=DC(e);return o?"mapbox.satellite"===o?"https://api.mapbox.com/v4/"+o+"/{z}/{x}/{y}"+(window.devicePixelRatio>=1.5?"@2x":"")+".webp?access_token="+t:"https://{a-d}.tiles.mapbox.com/v4/"+o+"/{z}/{x}/{y}.vector.pbf?access_token="+t:t?(i.searchParams.set(n,t),decodeURI(i.href)):decodeURI(i.href)}function BC(e,t){return void 0===t&&(t=512),e.getExtent()?Ag({extent:e.getExtent(),tileSize:t,maxZoom:22}).getResolutions():sS}function qC(e,t){return t.accessToken||(t=Object.assign({},t),new URL(e).searchParams.forEach((function(e,n){t.accessToken=e,t.accessTokenParam=n}))),t}function GC(e,t,n,r,i){var o,s,a,l;void 0===n&&(n=""),void 0===r&&(r={}),void 0===i&&(i=void 0);var u=!0;return"string"==typeof n||Array.isArray(n)?l=n:(l=(a=n).source||a.layers,r=a),"string"==typeof r?(o=r,a={}):(o=r.styleUrl,a=r),!1===a.updateSource&&(u=!1),i||(i=a.resolutions),o||"string"!=typeof t||t.trim().startsWith("{")||(o=t),o&&(o=o.startsWith("data:")?location.href:jC(o,a.accessToken),a=qC(o,a)),new Promise((function(n,r){dS(t,a).then((function(t){if(8!=t.version)return r(new Error("glStyle version 8 required."));if(!(e instanceof qb||e instanceof tx))return r(new Error("Can only apply to VectorLayer or VectorTileLayer"));var c,d,h,p=e instanceof tx?"vector":"geojson";if(l?s=Array.isArray(l)?t.layers.find((function(e){return e.id===l[0]})).source:l:(s=Object.keys(t.sources).find((function(e){return t.sources[e].type===p})),l=s),!s)return r(new Error("No "+p+" source found in the glStyle."));function f(){if(!u)return Promise.resolve();if(e instanceof tx)return ZC(t.sources[s],o,a).then((function(t){var n=e.getSource();if(n?t!==n&&(n.setTileUrlFunction(t.getTileUrlFunction()),"function"==typeof n.setUrls&&"function"==typeof t.getUrls&&n.setUrls(t.getUrls()),n.format_||(n.format_=t.format_),n.getAttributions()||n.setAttributions(t.getAttributions()),n.getTileLoadFunction()===sx&&n.setTileLoadFunction(t.getTileLoadFunction()),qp(n.getProjection(),t.getProjection())&&(n.tileGrid=t.getTileGrid())):e.setSource(t),!isFinite(e.getMaxResolution())&&!isFinite(e.getMinZoom())){var r=e.getSource().getTileGrid();e.setMaxResolution(r.getResolution(r.getMinZoom()))}}));var n=t.sources[s],r=e.getSource();r&&r.get("mapbox-source")===n||(r=$C(n,o,a));var i=e.getSource();return i?r!==i&&(i.getAttributions()||i.setAttributions(r.getAttributions()),i.format_||(i.format_=r.getFormat()),i.url_=r.getUrl()):e.setSource(r),Promise.resolve()}function m(){if(h||t.sprite&&!c)h?(e.setStyle(h),f().then(n).catch(r)):r(new Error("Something went wrong trying to apply style."));else{if(a.projection&&!i){var o=zp(a.projection).getUnits();"m"!==o&&(i=sS.map((function(e){return e/xh[o]})))}h=function(e,t,n,r,i,o,s,a){if(void 0===r&&(r=sS),void 0===i&&(i=void 0),void 0===o&&(o=void 0),void 0===s&&(s=void 0),void 0===a&&(a=void 0),"string"==typeof t&&(t=JSON.parse(t)),8!=t.version)throw new Error("glStyle version 8 required.");var l,u;if(WS[function(e,t){return rS(e)+"."+Gd(t)}(t,e)]=Array.from(arguments),o)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){l=c,u=[c.width,c.height],e.changed(),c.onload=null},c.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var d=self;d.postMessage({action:"loadImage",src:o}),d.addEventListener("message",(function(e){"imageLoaded"===e.data.action&&e.data.src===o&&(l=e.data.image,u=[l.width,l.height])}))}for(var h,p=TC(t.layers),f={},m=[],g={},_={},y=iS(t),v=function(e){var t=tS[e.id];return t||(t={},tS[rS(e)]=t),t}(t),b=0,x=p.length;b<x;++b){var w=p[b],k=w.id;if("string"==typeof n&&w.source==n||-1!==n.indexOf(k)){var C=w["source-layer"];if(h){if(w.source!==h)throw new Error('Layer "'+k+'" does not use source "'+h)}else{h=w.source;var S=t.sources[h];if(!S)throw new Error('Source "'+h+'" is not defined');var A=S.type;if("vector"!==A&&"geojson"!==A)throw new Error('Source "'+h+'" is not of type "vector" or "geojson", but "'+A+'"')}var E=f[C];E||(E=[],f[C]=E),E.push({layer:w,index:b}),m.push(k)}}var M=new L_,T=new y_,P=[],R=function(n,o,c){var d=n.getProperties(),h=f[d.layer];if(h){var p=r.indexOf(o);-1==p&&(p=lS(o,r));for(var m,b=RS[n.getGeometry().getType()],x={id:n.getId(),properties:d,type:b},w=e.get("mapbox-featurestate")[n.getId()],k=-1,C=0,S=h.length;C<S;++C){var A=h[C],E=A.layer,R=E.id;if(void 0===c||c===R){var I=E.layout||OS,L=E.paint||OS;if(!("none"===I.visibility||"minzoom"in E&&p<E.minzoom||"maxzoom"in E&&p>=E.maxzoom)){var O=E.filter;if(!O||jS(R,O,x,p,v)){m=E;var z=void 0,F=void 0,D=void 0,j=void 0,N=void 0,B=void 0,q=A.index;if(3==b&&("fill"==E.type||"fill-extrusion"==E.type))if(F=FS(E,"paint",E.type+"-opacity",p,x,y,w),E.type+"-pattern"in L){var G=FS(E,"paint",E.type+"-pattern",p,x,y,w);if(G){var V="string"==typeof G?GS(G,d):G.toString();if(l&&i&&i[V]){++k,(B=P[k])&&B.getFill()&&!B.getStroke()&&!B.getText()||(B=new N_({fill:new y_}),P[k]=B),D=B.getFill(),B.setZIndex(q);var W=V+"."+F,H=_[W];if(!H){var U=i[V],Z=aS(U.width,U.height),X=Z.getContext("2d");X.globalAlpha=F,X.drawImage(l,U.x,U.y,U.width,U.height,0,0,U.width,U.height),H=X.createPattern(Z,"repeat"),_[W]=H}D.setColor(H)}}}else z=BS(FS(E,"paint",E.type+"-color",p,x,y,w),F),E.type+"-outline-color"in L&&(N=BS(FS(E,"paint",E.type+"-outline-color",p,x,y,w),F)),N||(N=z),(z||N)&&(++k,(!(B=P[k])||z&&!B.getFill()||!z&&B.getFill()||N&&!B.getStroke()||!N&&B.getStroke()||B.getText())&&(B=new N_({fill:z?new y_:void 0,stroke:N?new L_:void 0}),P[k]=B),z&&(D=B.getFill()).setColor(z),N&&((j=B.getStroke()).setColor(N),j.setWidth(.5)),B.setZIndex(q));if(1!=b&&"line"==E.type){z=!("line-pattern"in L)&&"line-color"in L?BS(FS(E,"paint","line-color",p,x,y,w),FS(E,"paint","line-opacity",p,x,y,w)):void 0;var K=FS(E,"paint","line-width",p,x,y,w);z&&K>0&&(++k,(B=P[k])&&B.getStroke()&&!B.getFill()&&!B.getText()||(B=new N_({stroke:new L_}),P[k]=B),(j=B.getStroke()).setLineCap(FS(E,"layout","line-cap",p,x,y,w)),j.setLineJoin(FS(E,"layout","line-join",p,x,y,w)),j.setMiterLimit(FS(E,"layout","line-miter-limit",p,x,y,w)),j.setColor(z),j.setWidth(K),j.setLineDash(L["line-dasharray"]?FS(E,"paint","line-dasharray",p,x,y,w).map((function(e){return e*K})):null),B.setZIndex(q))}var $=!1,Y=null,Q=0,J=void 0,ee=void 0,te=void 0;if((1==b||2==b)&&"icon-image"in I){var ne=FS(E,"layout","icon-image",p,x,y,w);if(ne){J="string"==typeof ne?GS(ne,d):ne.toString();var re=void 0,ie=a?a(e,J):void 0;if(l&&i&&i[J]||ie){var oe=FS(E,"layout","icon-rotation-alignment",p,x,y,w);if(2==b){var se=n.getGeometry();if(se.getFlatMidpoint||se.getFlatMidpoints){var ae=se.getExtent();if(Math.sqrt(Math.max(Math.pow((ae[2]-ae[0])/o,2),Math.pow((ae[3]-ae[1])/o,2)))>150){var le="MultiLineString"===se.getType()?se.getFlatMidpoints():se.getFlatMidpoint();if(PS||(PS=new R_("Point",TS=[NaN,NaN],[],{},null)),re=PS,TS[0]=le[0],TS[1]=le[1],"line"===FS(E,"layout","symbol-placement",p,x,y,w)&&"map"===oe)for(var ue=se.getStride(),ce=se.getFlatCoordinates(),de=0,he=ce.length-ue;de<he;de+=ue){var pe=ce[de],fe=ce[de+1],me=ce[de+ue],ge=ce[de+ue+1],_e=Math.min(pe,me),ye=Math.min(fe,ge),ve=Math.max(pe,me),be=Math.max(fe,ge);if(le[0]>=_e&&le[0]<=ve&&le[1]>=ye&&le[1]<=be){Q=Math.atan2(fe-ge,me-pe);break}}}}}if(2!==b||re){var xe=FS(E,"layout","icon-size",p,x,y,w),we=void 0!==L["icon-color"]?FS(E,"paint","icon-color",p,x,y,w):null;if(!we||0!==we.a){var ke=FS(E,"paint","icon-halo-color",p,x,y,w),Ce=FS(E,"paint","icon-halo-width",p,x,y,w),Se=J+"."+xe+"."+Ce+"."+ke;if(null!==we&&(Se+="."+we),!(ee=g[Se])){var Ae=DS(E,p,x,y),Ee=void 0;"icon-offset"in I&&((Ee=FS(E,"layout","icon-offset",p,x,y,w).slice(0))[1]*=-1);var Me=we?[255*we.r,255*we.g,255*we.b,we.a]:void 0;if(ie){var Te={color:Me,rotateWithView:"map"===oe,displacement:Ee,declutterMode:Ae};"string"==typeof ie?Te.src=ie:(Te.img=ie,Te.imgSize=[ie.width,ie.height]),ee=new S_(Te)}else{var Pe=i[J],Re=void 0,Ie=void 0,Le=void 0,Oe=void 0;Ce?Ie=[(Re=mS(l,Pe,Ce,ke)).width,Re.height]:(Re=l,Ie=u,Le=[Pe.width,Pe.height],Oe=[Pe.x,Pe.y]),ee=new S_({color:Me,img:Re,imgSize:Ie,size:Le,offset:Oe,rotateWithView:"map"===oe,scale:xe/Pe.pixelRatio,displacement:Ee,declutterMode:Ae})}g[Se]=ee}}ee&&(++k,(B=P[k])&&B.getImage()&&!B.getFill()&&!B.getStroke()||(B=new N_,P[k]=B),B.setGeometry(re),ee.setRotation(Q+oS(FS(E,"layout","icon-rotate",p,x,y,w))),ee.setOpacity(FS(E,"paint","icon-opacity",p,x,y,w)),ee.setAnchor(IS[FS(E,"layout","icon-anchor",p,x,y,w)]),B.setImage(ee),Y=B.getText(),B.setText(void 0),B.setZIndex(q),$=!0,te=!1)}else te=!0}}}if(1==b&&"circle"===E.type){++k,(B=P[k])&&B.getImage()&&!B.getFill()&&!B.getStroke()||(B=new N_,P[k]=B);var ze="circle-radius"in L?FS(E,"paint","circle-radius",p,x,y,w):5,Fe=BS(FS(E,"paint","circle-stroke-color",p,x,y,w),FS(E,"paint","circle-stroke-opacity",p,x,y,w)),De=BS(FS(E,"paint","circle-color",p,x,y,w),FS(E,"paint","circle-opacity",p,x,y,w)),je=FS(E,"paint","circle-stroke-width",p,x,y,w),Ne=ze+"."+Fe+"."+De+"."+je;(ee=g[Ne])||(ee=new g_({radius:ze,stroke:Fe&&je>0?new L_({width:je,color:Fe}):void 0,fill:De?new y_({color:De}):void 0,declutterMode:"none"}),g[Ne]=ee),B.setImage(ee),Y=B.getText(),B.setText(void 0),B.setGeometry(void 0),B.setZIndex(q),$=!0}var Be=void 0,qe=void 0,Ge=void 0,Ve=void 0,We=void 0,He=void 0;if("text-field"in I){Ve=Math.round(FS(E,"layout","text-size",p,x,y,w));var Ue=FS(E,"layout","text-font",p,x,y,w);Ge=FS(E,"layout","text-line-height",p,x,y,w),(qe=OC(s?s(Ue,t.metadata?t.metadata["ol:webfonts"]:void 0):Ue,Ve,Ge)).includes("sans-serif")||(qe+=",sans-serif"),We=FS(E,"layout","text-letter-spacing",p,x,y,w),He=FS(E,"layout","text-max-width",p,x,y,w);var Ze=FS(E,"layout","text-field",p,x,y,w);Be="object"==typeof Ze&&Ze.sections?1===Ze.sections.length?Ze.toString():Ze.sections.reduce((function(e,t,n){var r=t.fontStack?t.fontStack.split(","):Ue,i=OC(s?s(r):r,Ve*(t.scale||1),Ge),o=t.text;if("\n"===o)return e.push("\n",""),e;if(2!=b){for(var a=0,l=(o=wS(o,i,He,We).split("\n")).length;a<l;++a)a>0&&e.push("\n",""),e.push(o[a],i);return e}e.push(yS(o,We),i)}),[]):GS(Ze,d).trim(),F=FS(E,"paint","text-opacity",p,x,y,w)}if(Be&&F&&!te){$||(++k,(B=P[k])&&B.getText()&&!B.getFill()&&!B.getStroke()||(B=new N_,P[k]=B),B.setImage(void 0),B.setGeometry(void 0)),B.getText()||B.setText(Y||new q_({padding:[2,2,2,2]})),Y=B.getText();var Xe=I["text-transform"];"uppercase"==Xe?Be=Array.isArray(Be)?Be.map((function(e,t){return t%2?e:e.toUpperCase()})):Be.toUpperCase():"lowercase"==Xe&&(Be=Array.isArray(Be)?Be.map((function(e,t){return t%2?e:e.toLowerCase()})):Be.toLowerCase());var Ke=Array.isArray(Be)?Be:2==b?yS(Be,We):wS(Be,qe,He,We);Y.setText(Ke),Y.setFont(qe),Y.setRotation(oS(FS(E,"layout","text-rotate",p,x,y,w)));var $e=FS(E,"layout","text-anchor",p,x,y,w),Ye=$||1==b?"point":FS(E,"layout","symbol-placement",p,x,y,w),Qe=void 0;if("line-center"===Ye?(Y.setPlacement("line"),Qe="center"):Y.setPlacement(Ye),"line"===Ye&&"function"==typeof Y.setRepeat){var Je=FS(E,"layout","symbol-spacing",p,x,y,w);Y.setRepeat(2*Je)}Y.setOverflow("point"===Ye);var et=FS(E,"paint","text-halo-width",p,x,y,w),tt=FS(E,"layout","text-offset",p,x,y,w),nt=FS(E,"paint","text-translate",p,x,y,w),rt=0,it=0;if("point"==Ye){Qe="center",-1!==$e.indexOf("left")?(Qe="left",it=et):-1!==$e.indexOf("right")&&(Qe="right",it=-et);var ot=FS(E,"layout","text-rotation-alignment",p,x,y,w);Y.setRotateWithView("map"==ot)}else Y.setMaxAngle(oS(FS(E,"layout","text-max-angle",p,x,y,w))*Be.length/Ke.length),Y.setRotateWithView(!1);Y.setTextAlign(Qe);var st="middle";0==$e.indexOf("bottom")?(st="bottom",rt=-et-.5*(Ge-1)*Ve):0==$e.indexOf("top")&&(st="top",rt=et+.5*(Ge-1)*Ve),Y.setTextBaseline(st);var at=FS(E,"layout","text-justify",p,x,y,w);Y.setJustify("auto"===at?void 0:at),Y.setOffsetX(tt[0]*Ve+it+nt[0]),Y.setOffsetY(tt[1]*Ve+rt+nt[1]),T.setColor(BS(FS(E,"paint","text-color",p,x,y,w),F)),Y.setFill(T);var lt=BS(FS(E,"paint","text-halo-color",p,x,y,w),F);if(lt){M.setColor(lt),et*=2;var ut=.5*Ve;M.setWidth(et<=ut?et:ut),Y.setStroke(M)}else Y.setStroke(void 0);var ct=FS(E,"layout","text-padding",p,x,y,w),dt=Y.getPadding();ct!==dt[0]&&(dt[0]=ct,dt[1]=ct,dt[2]=ct,dt[3]=ct),B.setZIndex(q)}}}}}return k>-1?(P.length=k+1,VS&&("set"in n?n.set("mapbox-layer",m):n.getProperties()["mapbox-layer"]=m),P):void 0}};return e.setStyle(R),e.set("mapbox-source",h),e.set("mapbox-layers",m),e.set("mapbox-featurestate",e.get("mapbox-featurestate")||{}),R}(e,t,l,i,c,d,MS,a.getImage),e.getStyle()?f().then(n).catch(r):r(new Error("Nothing to show for source ["+s+"]"))}}if(t.sprite){var g=new URL(function(e,t,n){var r=DC(e);if(!r)return decodeURI(new URL(e,n).href);if(0!==r.indexOf("sprites/"))throw new Error("unexpected sprites url: "+e);var i=r.slice(8);return FC+"/styles/v1/"+i+"/sprite?access_token="+t}(t.sprite,a.accessToken,o||location.href)),_=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",y=g.origin+g.pathname+_+".json"+g.search;new Promise((function(e,t){cS("Sprite",y,a).then(e).catch((function(n){cS("Sprite",y=g.origin+g.pathname+".json"+g.search,a).then(e).catch(t)}))})).then((function(e){if(void 0===e&&r(new Error("No sprites found.")),c=e,d=g.origin+g.pathname+_+".png"+g.search,a.transformRequest){var t=a.transformRequest(d,"SpriteImage");t instanceof Request&&(d=encodeURI(t.url))}m()})).catch((function(e){r(new Error("Sprites cannot be loaded: "+y+": "+e.message))}))}else m()})).catch(r)}))}var VC={};function WC(e,t){var n;return e.some((function(e){if(e.id==t)return n=e.source,!0})),n}function HC(e,t,n){var r=new Uv({tileJSON:t,tileSize:e.tileSize||t.tileSize||512}),i=r.getTileJSON(),o=r.getTileGrid(),s=zp(n.projection||"EPSG:3857"),a=function(e,t){var n=e.bounds;if(n){var r=Np([n[0],n[1]],t),i=Np([n[2],n[3]],t);return[r[0],r[1],i[0],i[1]]}return zp(t).getExtent()}(i,s),l=s.getExtent(),u=i.minzoom||0,c=i.maxzoom||22,d={attributions:r.getAttributions(),projection:s,tileGrid:new Cg({origin:l?dp(l):o.getOrigin(0),extent:a||o.getExtent(),minZoom:u,resolutions:BC(s,t.tileSize).slice(0,c+1),tileSize:o.getTileSize(0)})};return Array.isArray(i.tiles)?d.urls=i.tiles:d.url=i.tiles,d}function UC(e,t,n){var r=document.createElement("div");return r.className="ol-mapbox-style-background",r.style.position="absolute",r.style.width="100%",r.style.height="100%",new Mm({source:new wg({}),render:function(i){var o=function(e,t,n,r){var i={id:e.id,type:e.type},o=e.layout||{},s=e.paint||{};i.paint=s;var a,l,u=lS(t,n.resolutions||sS);return void 0!==s["background-color"]&&(a=FS(i,"paint","background-color",u,VC,r)),void 0!==s["background-opacity"]&&(l=FS(i,"paint","background-opacity",u,VC,r)),"none"==o.visibility?void 0:BS(a,l)}(e,i.viewState.resolution,t,n);return r.style.backgroundColor=o,r}})}function ZC(e,t,n){return new Promise((function(r,i){fS(e,t,n).then((function(t){var i=HC(e,t,n);i.format=new my,r(new ox(i))})).catch(i)}))}function XC(e){return"{bbox-"+(e?e.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")+"}"}function KC(e,t,n){var r=new fg;return fS(e,t,n).then((function(t){var i=new Uv({interpolate:void 0===n.interpolate||n.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:t});i.tileGrid=HC(e,t,n).tileGrid,n.projection&&(i.projection=zp(n.projection));var o=i.getTileUrlFunction();i.setTileUrlFunction((function(e,t,n){var r=XC(n),s=o(e,t,n);if(-1!=s.indexOf(r)){var a=i.getTileGrid().getTileCoordExtent(e);s=s.replace(r,a.toString())}return s})),i.set("mapbox-source",e),r.setSource(i)})).catch((function(e){r.setSource(void 0)})),r}function $C(e,t,n){var r=n.projection?new sy({dataProjection:n.projection}):new sy,i=e.data,o={};if("string"==typeof i){var s=NC(i,n.accessToken,n.accessTokenParam||"access_token",t||location.href);if(n.transformRequest){var a=n.transformRequest(s,"GeoJSON");a instanceof Request&&(s=decodeURI(a.url))}if(/\{bbox-[0-9a-z-]+\}/.test(s)){var l=new Yb({attributions:e.attribution,format:r,url:function(e,t,n){var r=XC(n);return s.replace(r,""+e.join(","))},strategy:Ub});return l.set("mapbox-source",e),l}return new Yb({attributions:e.attribution,format:r,url:s})}o.features=r.readFeatures(i,{featureProjection:Zp()||"EPSG:3857"});var u=new Yb(Object.assign({attributions:e.attribution,format:r},o));return u.set("mapbox-source",e),u}function YC(e,t,n,r){var i,o=iS(e),s=e.layers,a=n.type,l=n.source||WC(s,n.ref),u=e.sources[l];if("background"==a)i=UC(n,r,o);else if("vector"==u.type)i=function(e,t,n){var r=new tx({declutter:!0,visible:!1});return ZC(e,t,n).then((function(t){t.set("mapbox-source",e),r.setSource(t)})).catch((function(e){r.setSource(void 0)})),r}(u,t,r);else if("raster"==u.type)(i=KC(u,t,r)).setVisible(!n.layout||"none"!==n.layout.visibility),i.on("prerender",function(e,t,n){var r=null;return function(i){e.paint&&"raster-opacity"in e.paint&&i.frameState.viewState.zoom!==r&&(r=i.frameState.viewState.zoom,delete n[e.id],function(e,t,n,r){var i=FS(e,"paint","raster-opacity",n,VC,r);t.setOpacity(i)}(e,t,r,n))}}(n,i,o));else if("geojson"==u.type)i=function(e,t,n){return new qb({declutter:!0,source:$C(e,t,n),visible:!1})}(u,t,r);else if("raster-dem"==u.type&&"hillshade"==n.type){var c=function(e,t,n){var r=KC(e,t,n);return new uy({source:new Hv({operationType:"image",operation:zC,sources:[r]})})}(u,t,r);i=c,c.getSource().on("beforeoperations",(function(e){var t=e.data;t.resolution=e.resolution;var i=lS(e.resolution,r.resolutions||sS);t.encoding=u.encoding,t.vert=5*FS(n,"paint","hillshade-exaggeration",i,VC,o),t.sunAz=FS(n,"paint","hillshade-illumination-direction",i,VC,o),t.sunEl=35,t.opacity=.3,t.highlightColor=FS(n,"paint","hillshade-highlight-color",i,VC,o),t.shadowColor=FS(n,"paint","hillshade-shadow-color",i,VC,o),t.accentColor=FS(n,"paint","hillshade-accent-color",i,VC,o)})),i.setVisible(!n.layout||"none"!==n.layout.visibility)}var d=l;return i&&i.set("mapbox-source",d),i}function QC(e,t,n,r){var i=[],o=null;if(t instanceof Tv){if(!(o=t.getView()).isDef()&&!o.getRotation()&&!o.getResolutions()){var s=r.projection?zp(r.projection):o.getProjection();o=new Am(Object.assign(o.getProperties(),{maxResolution:sS[0]/xh[s.getUnits()],projection:r.projection||o.getProjection()})),t.setView(o)}"center"in e&&!o.getCenter()&&o.setCenter(Np(e.center,o.getProjection())),"zoom"in e&&void 0===o.getZoom()&&o.setResolution(sS[0]/xh[o.getProjection().getUnits()]/Math.pow(2,e.zoom)),o.getCenter()&&void 0!==o.getZoom()||o.fit(o.getProjection().getExtent(),{nearest:!0,size:t.getSize()})}t.set("mapbox-style",e),t.set("mapbox-metadata",{styleUrl:n,options:r});for(var a,l,u,c=e.layers,d=[],h=0,p=c.length;h<p;++h){var f=c[h],m=f.type;if("heatmap"==m)throw new Error(m+" layers are not supported");(u=f.source||WC(c,f.ref))&&u==l||(d.length&&(i.push(JC(a,d,e,n,t,r)),d=[]),(a=YC(e,n,f,r))instanceof qb||a instanceof tx||(d=[]),l=a.get("mapbox-source")),d.push(f.id)}return i.push(JC(a,d,e,n,t,r)),Promise.all(i)}function JC(e,t,n,r,i,o){void 0===o&&(o={});for(var s=24,a=0,l=n.layers,u=0,c=l.length;u<c;++u){var d=l[u];-1!==t.indexOf(d.id)&&(s=Math.min("minzoom"in d?d.minzoom:0,s),a=Math.max("maxzoom"in d?d.maxzoom:24,a))}return new Promise((function(l,u){var c=function(){var c=e.getSource();if(c&&"error"!==c.getState()){if("getTileGrid"in c){var d=c.getTileGrid();if(d){var h=d.getMinZoom();(s>0||h>0)&&e.setMaxResolution(Math.min(sS[s],d.getResolution(h))+1e-9),a<24&&e.setMinResolution(sS[a]+1e-9)}}else s>0&&e.setMaxResolution(sS[s]+1e-9);c instanceof Yb||c instanceof ox?GC(e,n,t,Object.assign({styleUrl:r},o)).then((function(){!function(e,t){function n(){var n=t.get("mapbox-style");if(n){var r=TC(n.layers),i=e.get("mapbox-layers"),o=r.filter((function(e){return i.includes(e.id)})).some((function(e){return!e.layout||!e.layout.visibility||"visible"===e.layout.visibility}));e.get("visible")!==o&&e.setVisible(o)}}e.on("change",n),n()}(e,i),l()})).catch(u):l()}else u(new Error("Error accessing data for source "+e.get("mapbox-source")))};e.set("mapbox-layers",t);var d=i.getLayers();-1===d.getArray().indexOf(e)&&d.push(e),e.getSource()?c():e.once("change:source",c)}))}var eS={},tS={},nS=0;function rS(e){return e.id||(e.id=nS++),e.id}function iS(e){var t=eS[e.id];return t||(t={},eS[rS(e)]=t),t}function oS(e){return e*Math.PI/180}var sS=function(){for(var e=[],t=78271.51696402048;e.length<=24;t/=2)e.push(t);return e}();function aS(e,t){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(e,t);var n=document.createElement("canvas");return n.width=e,n.height=t,n}function lS(e,t){for(var n=0,r=t.length;n<r;++n)if(t[n]<e&&n+1<r){var i=t[n]/t[n+1];return n+Math.log(t[n]/e)/Math.log(i)}return r-1}var uS={};function cS(e,t,n,r){if(void 0===n&&(n={}),t in uS)return r&&(r.request=uS[t][0]),uS[t][1];var i=n.transformRequest&&n.transformRequest(t,e)||new Request(t);i.headers.get("Accept")||i.headers.set("Accept","application/json"),r&&(r.request=i);var o=fetch(i).then((function(e){return delete uS[t],e.ok?e.json():Promise.reject(new Error("Error fetching source "+t))})).catch((function(e){return delete uS[t],Promise.reject(new Error("Error fetching source "+t))}));return uS[t]=[i,o],o}function dS(e,t){if("string"!=typeof e)return Promise.resolve(e);if(!e.trim().startsWith("{"))return cS("Style",e=jC(e,t.accessToken),t);try{var n=JSON.parse(e);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function hS(e,t){if(t.transformRequest){var n=t.transformRequest(e,"Tiles");if(n instanceof Request)return decodeURI(n.url)}return e}var pS={};function fS(e,t,n){void 0===n&&(n={});var r=[t,JSON.stringify(e)].toString(),i=pS[r];if(!i||n.transformRequest){var o=e.url;if(o&&!e.tiles){var s=NC(o,n.accessToken,n.accessTokenParam||"access_token",t||location.href);if(o.startsWith("mapbox://"))i=Promise.resolve(Object.assign({},e,{url:void 0,tiles:Lg(s)}));else{var a={};i=cS("Source",s,n,a).then((function(e){return e.tiles=e.tiles.map((function(t){return"tms"===e.scheme&&(t=t.replace("{y}","{-y}")),hS(NC(t,n.accessToken,n.accessTokenParam||"access_token",a.request.url),n)})),Promise.resolve(e)}))}}else e=Object.assign({},e,{tiles:e.tiles.map((function(r){return"tms"===e.scheme&&(r=r.replace("{y}","{-y}")),hS(NC(r,n.accessToken,n.accessTokenParam||"access_token",t||location.href),n)}))}),i=Promise.resolve(Object.assign({},e));pS[r]=i}return i}function mS(e,t,n,r){var i=document.createElement("canvas"),o=[2*n*t.pixelRatio+t.width,2*n*t.pixelRatio+t.height];i.width=o[0],i.height=o[1];var s=i.getContext("2d");s.drawImage(e,t.x,t.y,t.width,t.height,n*t.pixelRatio,n*t.pixelRatio,t.width,t.height);var a=s.getImageData(0,0,o[0],o[1]);s.globalCompositeOperation="destination-over",s.fillStyle="rgba("+255*r.r+","+255*r.g+","+255*r.b+","+r.a+")";for(var l=a.data,u=0,c=a.width;u<c;++u)for(var d=0,h=a.height;d<h;++d)l[4*(d*c+u)+3]>0&&s.arc(u,d,n*t.pixelRatio,0,2*Math.PI);return s.fill(),i}var gS,_S=Array(256).join(" ");function yS(e,t){if(t>=.05){for(var n="",r=e.split("\n"),i=_S.slice(0,Math.round(t/.1)),o=0,s=r.length;o<s;++o)o>0&&(n+="\n"),n+=r[o].split("").join(i);return n}return e}function vS(){return gS||(gS=aS(1,1).getContext("2d")),gS}function bS(e,t){return vS().measureText(e).width+(e.length-1)*t}var xS={};function wS(e,t,n,r){if(-1!==e.indexOf("\n")){for(var i=e.split("\n"),o=[],s=0,a=i.length;s<a;++s)o.push(wS(i[s],t,n,r));return o.join("\n")}var l=n+","+t+","+e+","+r,u=xS[l];if(!u){var c=e.split(" ");if(c.length>1){var d=vS();d.font=t;for(var h=d.measureText("M").width*n,p="",f=[],m=0,g=c.length;m<g;++m){var _=c[m],y=p+(p?" ":"")+_;bS(y,r)<=h?p=y:(p&&f.push(p),p=_)}p&&f.push(p);for(var v=0,b=f.length;v<b&&b>1;++v){var x=f[v];if(bS(x,r)<.35*h){var w=v>0?bS(f[v-1],r):1/0,k=v<b-1?bS(f[v+1],r):1/0;f.splice(v,1),b-=1,w<k?(f[v-1]+=" "+x,v-=1):f[v]=x+" "+f[v]}}for(var C=0,S=f.length-1;C<S;++C){var A=f[C],E=f[C+1];if(bS(A,r)>.7*h&&bS(E,r)<.6*h){var M=A.split(" "),T=M.pop();bS(T,r)<.2*h&&(f[C]=M.join(" "),f[C+1]=T+" "+E),S-=1}}u=f.join("\n")}else u=e;u=yS(u,r),xS[l]=u}return u}var kS,CS=/font-family: ?([^;]*);/,SS=/("|')/g;function AS(e){if(!kS){kS={};for(var t=document.styleSheets,n=0,r=t.length;n<r;++n){var i=t[n];try{var o=i.rules||i.cssRules;if(o)for(var s=0,a=o.length;s<a;++s){var l=o[s];if(5==l.type){var u=l.cssText.match(CS);kS[u[1].replace(SS,"")]=!0}}}catch(e){}}}return e in kS}var ES={};function MS(e,t){void 0===t&&(t="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css");var n=e.toString();if(n in ES)return ES[n];for(var r=[],i=0,o=e.length;i<o;++i){e[i]=e[i].replace("Arial Unicode MS","Arial");var s=e[i],a=OC(s,1);l_(a);var l=a.split(" ");r.push([l.slice(3).join(" ").replace(/"/g,""),l[1],l[0]])}for(var u=0,c=r.length;u<c;++u){var d=r[u],h=d[0];if(!AS(h)&&100!==i_.get(d[2]+"\n"+d[1]+" \n"+h)){var p=t.replace("{font-family}",h.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",h.replace(/ /g,"+")).replace("{fontweight}",d[1]).replace("{-fontstyle}",d[2].replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",d[2]);if(!document.querySelector('link[href="'+p+'"]')){var f=document.createElement("link");f.href=p,f.rel="stylesheet",document.head.appendChild(f)}}}return ES[n]=e,e}var TS,PS,RS={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},IS={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},LS=function(e,t){var n=cC(e,t);if("error"===n.result)throw new Error(n.value.map((function(e){return e.key+": "+e.message})).join(", "));return n.value},OS={},zS={zoom:0};function FS(e,t,n,r,i,o,s){var a=e.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[a]||(o[a]={});var l,u=o[a];if(!u[n]){var c=(e[t]||OS)[n],d=pC[t+"_"+e.type][n];void 0===c&&(c=d.default);var h=(l=c,Array.isArray(l)&&l.length>0&&"string"==typeof l[0]&&l[0]in nC);if(!h&&oC(c)&&(c=function(e,t){var n=e.stops;if(!n)return function(e,t){var n=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",n]:n;if("enum"===t.type)return["match",n,Object.keys(t.values),n,e.default];var r=["color"===t.type?"to-color":t.type,n,gx(e.default)];return"array"===t.type&&r.splice(1,0,t.value,t.length||null),r}(e,t);var r=n&&"object"==typeof n[0][0],i=r||void 0!==e.property,o=r||!i;return n=n.map((function(e){return!i&&t.tokens&&"string"==typeof e[1]?[e[0],kx(e[1])]:[e[0],gx(e[1])]})),r?function(e,t,n){for(var r={},i={},o=[],s=0;s<n.length;s++){var a=n[s],l=a[0].zoom;void 0===r[l]&&(r[l]={zoom:l,type:e.type,property:e.property,default:e.default},i[l]=[],o.push(l)),i[l].push([a[0].value,a[1]])}if("exponential"===wx({},t)){for(var u=[_x(e),["linear"],["zoom"]],c=0,d=o;c<d.length;c+=1){var h=d[c];xx(u,h,vx(r[h],t,i[h]),!1)}return u}for(var p=["step",["zoom"]],f=0,m=o;f<m.length;f+=1){var g=m[f];xx(p,g,vx(r[g],t,i[g]),!0)}return bx(p),p}(e,t,n):o?function(e,t,n,r){void 0===r&&(r=["zoom"]);var i,o=wx(e,t),s=!1;if("interval"===o)i=["step",r],s=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'+o+'"');var a=void 0!==e.base?e.base:1;i=[_x(e),1===a?["linear"]:["exponential",a],r]}for(var l=0,u=n;l<u.length;l+=1){var c=u[l];xx(i,c[0],c[1],s)}return bx(i),i}(e,t,n):vx(e,t,n)}(c,d),h=!0),h){var p=LS(c,d);u[n]=p.evaluate.bind(p)}else"color"==d.type&&(c=mx.parse(c)),u[n]=function(){return c}}return zS.zoom=r,u[n](zS,i,s)}function DS(e,t,n,r){return FS(e,"layout","icon-allow-overlap",t,n,r)?FS(e,"layout","icon-ignore-placement",t,n,r)?"none":"obstacle":"declutter"}function jS(e,t,n,r,i){return i||console.warn("No filterCache provided to evaluateFilter()"),e in i||(i[e]=mC(t).filter),zS.zoom=r,i[e](zS,n)}var NS=!1;function BS(e,t){if(e){if(!NS&&(0===e.a||0===t))return;var n=e.a;return t=void 0===t?1:t,0===n?"transparent":"rgba("+Math.round(255*e.r/n)+","+Math.round(255*e.g/n)+","+Math.round(255*e.b/n)+","+n*t+")"}return e}var qS=/\{[^{}}]*\}/g;function GS(e,t){return e.replace(qS,(function(e){return t[e.slice(1,-1)]||""}))}var VS=!1,WS={};function HS(e){e.getLayers().getArray().filter((e=>e.get("mapbox-source")||e.get("background-raster-layer"))).forEach((t=>e.removeLayer(t)))}const US=[0,0,0,0],ZS=[],XS="modifyend";class KS extends fd{constructor(e,t,n){super(e),this.features=t,this.mapBrowserEvent=n}}function $S(e,t){return e.index-t.index}function YS(e,t,n){const r=t.geometry;if("Circle"===r.getType()){let i=r;if(1===t.index){const t=Zp();t&&(i=i.clone().transform(t,n));const r=wp(i.getCenter(),Kp(e,n)),o=Math.sqrt(r)-i.getRadius();return o*o}}const i=Kp(e,n);return ZS[0]=Kp(t.segment[0],n),ZS[1]=Kp(t.segment[1],n),function(e,t){return wp(e,vp(e,t))}(i,ZS)}function QS(e,t,n){const r=t.geometry;if("Circle"===r.getType()&&1===t.index){let t=r;const i=Zp();return i&&(t=t.clone().transform(i,n)),Xp(t.getClosestPoint(Kp(e,n)),n)}const i=Kp(e,n);return ZS[0]=Kp(t.segment[0],n),ZS[1]=Kp(t.segment[1],n),Xp(vp(i,ZS),n)}function JS(){const e=D_();return function(t,n){return e.Point}}const eA=class extends Jy{constructor(e){let t;if(super(e),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=e.condition?e.condition:hv,this.defaultDeleteCondition_=function(e){return function(e){const t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey}(e)&&av(e)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:rv,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new Gb,this.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new qb({source:new Yb({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:JS(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null,e.features?t=e.features:e.source&&(this.source_=e.source,t=new by(this.source_.getFeatures()),this.source_.addEventListener(Vb,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Wb,this.handleSourceRemove_.bind(this))),!t)throw new Error("The modify interaction requires features, a source or a layer");e.hitDetection&&(this.hitDetection_=e.hitDetection),this.features_=t,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(gy,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(_y,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=void 0===e.snapToPointer?!this.hitDetection_:e.snapToPointer}addFeature_(e){const t=e.getGeometry();if(t){const n=this.SEGMENT_WRITERS_[t.getType()];n&&n(e,t)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),e.addEventListener(Md,this.boundHandleFeatureChange_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new by;const n=this.featuresBeingModified_.getArray();for(let e=0,r=t.length;e<r;++e){const r=t[e];for(let e=0,t=r.length;e<t;++e){const t=r[e].feature;t&&!n.includes(t)&&this.featuresBeingModified_.push(t)}}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new KS("modifystart",this.featuresBeingModified_,e))}}removeFeature_(e){this.removeFeatureSegmentData_(e),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.removeEventListener(Md,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(e){const t=this.rBush_,n=[];t.forEach((function(t){e===t.feature&&n.push(t)}));for(let e=n.length-1;e>=0;--e){const r=n[e];for(let e=this.dragSegments_.length-1;e>=0;--e)this.dragSegments_[e][0]===r&&this.dragSegments_.splice(e,1);t.remove(r)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){e.feature&&this.features_.push(e.feature)}handleSourceRemove_(e){e.feature&&this.features_.remove(e.feature)}handleFeatureAdd_(e){this.addFeature_(e.element)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.addFeature_(t)}}handleFeatureRemove_(e){this.removeFeature_(e.element)}writePointGeometry_(e,t){const n=t.getCoordinates(),r={feature:e,geometry:t,segment:[n,n]};this.rBush_.insert(t.getExtent(),r)}writeMultiPointGeometry_(e,t){const n=t.getCoordinates();for(let r=0,i=n.length;r<i;++r){const i=n[r],o={feature:e,geometry:t,depth:[r],index:r,segment:[i,i]};this.rBush_.insert(t.getExtent(),o)}}writeLineStringGeometry_(e,t){const n=t.getCoordinates();for(let r=0,i=n.length-1;r<i;++r){const i=n.slice(r,r+2),o={feature:e,geometry:t,index:r,segment:i};this.rBush_.insert(jh(i),o)}}writeMultiLineStringGeometry_(e,t){const n=t.getCoordinates();for(let r=0,i=n.length;r<i;++r){const i=n[r];for(let n=0,o=i.length-1;n<o;++n){const o=i.slice(n,n+2),s={feature:e,geometry:t,depth:[r],index:n,segment:o};this.rBush_.insert(jh(o),s)}}}writePolygonGeometry_(e,t){const n=t.getCoordinates();for(let r=0,i=n.length;r<i;++r){const i=n[r];for(let n=0,o=i.length-1;n<o;++n){const o=i.slice(n,n+2),s={feature:e,geometry:t,depth:[r],index:n,segment:o};this.rBush_.insert(jh(o),s)}}}writeMultiPolygonGeometry_(e,t){const n=t.getCoordinates();for(let r=0,i=n.length;r<i;++r){const i=n[r];for(let n=0,o=i.length;n<o;++n){const o=i[n];for(let i=0,s=o.length-1;i<s;++i){const s=o.slice(i,i+2),a={feature:e,geometry:t,depth:[n,r],index:i,segment:s};this.rBush_.insert(jh(s),a)}}}}writeCircleGeometry_(e,t){const n=t.getCenter(),r={feature:e,geometry:t,index:0,segment:[n,n]},i={feature:e,geometry:t,index:1,segment:[n,n]},o=[r,i];r.featureSegments=o,i.featureSegments=o,this.rBush_.insert(Xh(n),r);let s=t;const a=Zp();if(a&&this.getMap()){const e=this.getMap().getView().getProjection();s=s.clone().transform(a,e),s=wm(s).transform(e,a)}this.rBush_.insert(s.getExtent(),i)}writeGeometryCollectionGeometry_(e,t){const n=t.getGeometriesArray();for(let t=0;t<n.length;++t){const r=n[t];(0,this.SEGMENT_WRITERS_[r.getType()])(e,r)}}createOrUpdateVertexFeature_(e,t,n){let r=this.vertexFeature_;return r?r.getGeometry().setCoordinates(e):(r=new $d(new im(e)),this.vertexFeature_=r,this.overlay_.getSource().addFeature(r)),r.set("features",t),r.set("geometries",n),r}handleEvent(e){if(!e.originalEvent)return!0;let t;return this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=Py.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(t=!(e.type!=Py.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==Py.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(e)&&!t}handleDragEvent(e){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(e,this.dragSegments_);const t=[e.coordinate[0]+this.delta_[0],e.coordinate[1]+this.delta_[1]],n=[],r=[];for(let i=0,o=this.dragSegments_.length;i<o;++i){const o=this.dragSegments_[i],s=o[0],a=s.feature;n.includes(a)||n.push(a);const l=s.geometry;r.includes(l)||r.push(l);const u=s.depth;let c;const d=s.segment,h=o[1];for(;t.length<l.getStride();)t.push(d[h][t.length]);switch(l.getType()){case"Point":c=t,d[0]=t,d[1]=t;break;case"MultiPoint":c=l.getCoordinates(),c[s.index]=t,d[0]=t,d[1]=t;break;case"LineString":c=l.getCoordinates(),c[s.index+h]=t,d[h]=t;break;case"MultiLineString":case"Polygon":c=l.getCoordinates(),c[u[0]][s.index+h]=t,d[h]=t;break;case"MultiPolygon":c=l.getCoordinates(),c[u[1]][u[0]][s.index+h]=t,d[h]=t;break;case"Circle":if(d[0]=t,d[1]=t,0===s.index)this.changingFeature_=!0,l.setCenter(t),this.changingFeature_=!1;else{this.changingFeature_=!0;const n=e.map.getView().getProjection();let r=kp(Kp(l.getCenter(),n),Kp(t,n));const i=Zp();if(i){const e=l.clone().transform(i,n);e.setRadius(r),r=e.transform(n,i).getRadius()}l.setRadius(r),this.changingFeature_=!1}}c&&this.setGeometryCoordinates_(l,c)}this.createOrUpdateVertexFeature_(t,n,r)}handleDownEvent(e){if(!this.condition_(e))return!1;const t=e.coordinate;this.handlePointerAtPixel_(e.pixel,e.map,t),this.dragSegments_.length=0,this.featuresBeingModified_=null;const n=this.vertexFeature_;if(n){const r=e.map.getView().getProjection(),i=[],o=n.getGeometry().getCoordinates(),s=jh([o]),a=this.rBush_.getInExtent(s),l={};a.sort($S);for(let n=0,s=a.length;n<s;++n){const s=a[n],u=s.segment;let c=Gd(s.geometry);const d=s.depth;if(d&&(c+="-"+d.join("-")),l[c]||(l[c]=new Array(2)),"Circle"!==s.geometry.getType()||1!==s.index)if(!bp(u[0],o)||l[c][0])if(!bp(u[1],o)||l[c][1])Gd(u)in this.vertexSegments_&&!l[c][0]&&!l[c][1]&&this.insertVertexCondition_(e)&&i.push(s);else{if(l[c][0]&&0===l[c][0].index){let e=s.geometry.getCoordinates();switch(s.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":e=e[d[1]];case"Polygon":if(s.index!==e[d[0]].length-2)continue}}this.dragSegments_.push([s,1]),l[c][1]=s}else this.dragSegments_.push([s,0]),l[c][0]=s;else bp(QS(t,s,r),o)&&!l[c][0]&&(this.dragSegments_.push([s,0]),l[c][0]=s)}i.length&&this.willModifyFeatures_(e,[i]);for(let e=i.length-1;e>=0;--e)this.insertVertex_(i[e],o)}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const n=this.dragSegments_[t][0],r=n.geometry;if("Circle"===r.getType()){const t=r.getCenter(),i=n.featureSegments[0],o=n.featureSegments[1];i.segment[0]=t,i.segment[1]=t,o.segment[0]=t,o.segment[1]=t,this.rBush_.update(Xh(t),i);let s=r;const a=Zp();if(a){const t=e.map.getView().getProjection();s=s.clone().transform(a,t),s=wm(s).transform(t,a)}this.rBush_.update(s.getExtent(),o)}else this.rBush_.update(jh(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new KS(XS,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}handlePointerMove_(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)}handlePointerAtPixel_(e,t,n){const r=n||t.getCoordinateFromPixel(e),i=t.getView().getProjection(),o=function(e,t){return YS(r,e,i)-YS(r,t,i)};let s,a;if(this.hitDetection_){const n="object"==typeof this.hitDetection_?e=>e===this.hitDetection_:void 0;t.forEachFeatureAtPixel(e,((e,t,n)=>{n&&(n=new im(Xp(n.getCoordinates(),i)));const r=n||e.getGeometry();if("Point"===r.getType()&&e instanceof $d&&this.features_.getArray().includes(e)){a=r;const t=e.getGeometry().getFlatCoordinates().slice(0,2);s=[{feature:e,geometry:a,segment:[t,t]}]}return!0}),{layerFilter:n})}if(!s){const e=$p(Nh(Yp(Xh(r,US),i),t.getView().getResolution()*this.pixelTolerance_,US),i);s=this.rBush_.getInExtent(e)}if(s&&s.length>0){const n=s.sort(o)[0],l=n.segment;let u=QS(r,n,i);const c=t.getPixelFromCoordinate(u);let d=kp(e,c);if(a||d<=this.pixelTolerance_){const e={};if(e[Gd(l)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-r[0],this.delta_[1]=u[1]-r[1]),"Circle"===n.geometry.getType()&&1===n.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[n.feature],[n.geometry]);else{const r=t.getPixelFromCoordinate(l[0]),i=t.getPixelFromCoordinate(l[1]),o=wp(c,r),a=wp(c,i);d=Math.sqrt(Math.min(o,a)),this.snappedToVertex_=d<=this.pixelTolerance_,this.snappedToVertex_&&(u=o>a?l[1]:l[0]),this.createOrUpdateVertexFeature_(u,[n.feature],[n.geometry]);const h={};h[Gd(n.geometry)]=!0;for(let t=1,n=s.length;t<n;++t){const n=s[t].segment;if(!(bp(l[0],n[0])&&bp(l[1],n[1])||bp(l[0],n[1])&&bp(l[1],n[0])))break;{const r=Gd(s[t].geometry);r in h||(h[r]=!0,e[Gd(n)]=!0)}}}return void(this.vertexSegments_=e)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(e,t){const n=e.segment,r=e.feature,i=e.geometry,o=e.depth,s=e.index;let a;for(;t.length<i.getStride();)t.push(0);switch(i.getType()){case"MultiLineString":case"Polygon":a=i.getCoordinates(),a[o[0]].splice(s+1,0,t);break;case"MultiPolygon":a=i.getCoordinates(),a[o[1]][o[0]].splice(s+1,0,t);break;case"LineString":a=i.getCoordinates(),a.splice(s+1,0,t);break;default:return}this.setGeometryCoordinates_(i,a);const l=this.rBush_;l.remove(e),this.updateSegmentIndices_(i,s,o,1);const u={segment:[n[0],t],feature:r,geometry:i,depth:o,index:s};l.insert(jh(u.segment),u),this.dragSegments_.push([u,1]);const c={segment:[t,n[1]],feature:r,geometry:i,depth:o,index:s+1};l.insert(jh(c.segment),c),this.dragSegments_.push([c,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Py.POINTERDRAG){const e=this.lastPointerEvent_;this.willModifyFeatures_(e,this.dragSegments_);const t=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new KS(XS,this.featuresBeingModified_,e)),this.featuresBeingModified_=null,t}return!1}removeVertex_(){const e=this.dragSegments_,t={};let n,r,i,o,s,a,l,u,c,d,h,p=!1;for(s=e.length-1;s>=0;--s)i=e[s],d=i[0],h=Gd(d.feature),d.depth&&(h+="-"+d.depth.join("-")),h in t||(t[h]={}),0===i[1]?(t[h].right=d,t[h].index=d.index):1==i[1]&&(t[h].left=d,t[h].index=d.index+1);for(h in t){switch(c=t[h].right,l=t[h].left,a=t[h].index,u=a-1,d=void 0!==l?l:c,u<0&&(u=0),o=d.geometry,r=o.getCoordinates(),n=r,p=!1,o.getType()){case"MultiLineString":r[d.depth[0]].length>2&&(r[d.depth[0]].splice(a,1),p=!0);break;case"LineString":r.length>2&&(r.splice(a,1),p=!0);break;case"MultiPolygon":n=n[d.depth[1]];case"Polygon":n=n[d.depth[0]],n.length>4&&(a==n.length-1&&(a=0),n.splice(a,1),p=!0,0===a&&(n.pop(),n.push(n[0]),u=n.length-1))}if(p){this.setGeometryCoordinates_(o,r);const t=[];if(void 0!==l&&(this.rBush_.remove(l),t.push(l.segment[0])),void 0!==c&&(this.rBush_.remove(c),t.push(c.segment[1])),void 0!==l&&void 0!==c){const e={depth:d.depth,feature:d.feature,geometry:d.geometry,index:u,segment:t};this.rBush_.insert(jh(e.segment),e)}this.updateSegmentIndices_(o,a,d.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return p}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,n,r){this.rBush_.forEachInExtent(e.getExtent(),(function(i){i.geometry===e&&(void 0===n||void 0===i.depth||xd(i.depth,n))&&i.index>t&&(i.index+=r)}))}},tA="M 172.968 632.025 C 26.97 291.031 0 269.413 0 192 C 0 85.961 85.961 0 192 0 S 384 85.961 384 192 C 384 269.413 357.03 291.031 213 632 C 193.781 667.361 192.57 667.361 172.968 632.025 Z",nA="M192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z";function rA({color:e,number:t,size:n=0}){return`<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 658" width="${n}" height="${n}" style="stroke: none; fill: ${function(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)throw new Error("invalid hex color: "+e);return`rgb(${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)})`}(e)};">\n <path d="${tA}"/>${void 0===t?'<path d="'+nA+'" fill="white" />':'<circle cx="192" cy="190" r="120" fill="white" />'}<text x="50%" y="40%" text-anchor="middle" style="font-size: 180px" fill="black">${void 0!==t?t:""}</text></svg>`}function iA(e){e.getLayers().getArray().filter((e=>e.get("gh:query_points"))).forEach((t=>e.removeLayer(t)))}function oA(e){e.getInteractions().getArray().filter((e=>e.get("gh:drag_query_point"))).forEach((t=>e.removeInteraction(t)))}class sA extends fd{constructor(e,t,n,r){super(e),this.selected=t,this.deselected=n,this.mapBrowserEvent=r}}const aA={};class lA extends $y{constructor(e){let t;if(super(),this.on,this.once,this.un,e=e||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=e.condition?e.condition:av,this.addCondition_=e.addCondition?e.addCondition:sv,this.removeCondition_=e.removeCondition?e.removeCondition:sv,this.toggleCondition_=e.toggleCondition?e.toggleCondition:uv,this.multi_=!!e.multi&&e.multi,this.filter_=e.filter?e.filter:wd,this.hitTolerance_=e.hitTolerance?e.hitTolerance:0,this.style_=void 0!==e.style?e.style:function(){const e=D_();return bd(e.Polygon,e.LineString),bd(e.GeometryCollection,e.LineString),function(t){return t.getGeometry()?e[t.getGeometry().getType()]:null}}(),this.features_=e.features||new by,e.layers)if("function"==typeof e.layers)t=e.layers;else{const n=e.layers;t=function(e){return n.includes(e)}}else t=wd;this.layerFilter_=t,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(e,t){this.featureLayerAssociation_[Gd(e)]=t}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(e){return this.featureLayerAssociation_[Gd(e)]}setHitTolerance(e){this.hitTolerance_=e}setMap(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(e),e?(this.features_.addEventListener(gy,this.boundAddFeature_),this.features_.addEventListener(_y,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(gy,this.boundAddFeature_),this.features_.removeEventListener(_y,this.boundRemoveFeature_))}addFeature_(e){const t=e.element;if(this.style_&&this.applySelectedStyle_(t),!this.getLayer(t)){const e=this.getMap().getAllLayers().find((function(e){if(e instanceof qb&&e.getSource()&&e.getSource().hasFeature(t))return e}));e&&this.addFeatureLayerAssociation_(t,e)}}removeFeature_(e){this.style_&&this.restorePreviousStyle_(e.element)}getStyle(){return this.style_}applySelectedStyle_(e){const t=Gd(e);t in aA||(aA[t]=e.getStyle()),e.setStyle(this.style_)}restorePreviousStyle_(e){const t=this.getMap().getInteractions().getArray();for(let n=t.length-1;n>=0;--n){const r=t[n];if(r!==this&&r instanceof lA&&r.getStyle()&&-1!==r.getFeatures().getArray().lastIndexOf(e))return void e.setStyle(r.getStyle())}const n=Gd(e);e.setStyle(aA[n]),delete aA[n]}removeFeatureLayerAssociation_(e){delete this.featureLayerAssociation_[Gd(e)]}handleEvent(e){if(!this.condition_(e))return!0;const t=this.addCondition_(e),n=this.removeCondition_(e),r=this.toggleCondition_(e),i=!t&&!n&&!r,o=e.map,s=this.getFeatures(),a=[],l=[];if(i){Sd(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,((e,t)=>{if(e instanceof $d&&this.filter_(e,t))return this.addFeatureLayerAssociation_(e,t),l.push(e),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let e=s.getLength()-1;e>=0;--e){const t=s.item(e),n=l.indexOf(t);n>-1?l.splice(n,1):(s.remove(t),a.push(t))}0!==l.length&&s.extend(l)}else{o.forEachFeatureAtPixel(e.pixel,((e,i)=>{if(e instanceof $d&&this.filter_(e,i))return!t&&!r||s.getArray().includes(e)?(n||r)&&s.getArray().includes(e)&&(a.push(e),this.removeFeatureLayerAssociation_(e)):(this.addFeatureLayerAssociation_(e,i),l.push(e)),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let e=a.length-1;e>=0;--e)s.remove(a[e]);s.extend(l)}return(l.length>0||a.length>0)&&this.dispatchEvent(new sA("select",l,a,e)),!0}}const uA=lA,cA="pathsLayer",dA="selectedPathLayer",hA="accessNetworkLayer";function pA(e){e.getLayers().getArray().filter((e=>e.get(cA)||e.get(dA)||e.get(hA))).forEach((t=>e.removeLayer(t)))}function fA(e,t){const n=[],r=[(e[0]+t[0])/2,(e[1]+t[1])/2],i=kp(e,t)/2,o=Math.atan2(e[1]-r[1],e[0]-r[0]),s=Math.atan2(t[1]-r[1],t[0]-r[0]),a=[r[0]+.5*i*Math.sin(o+.5*(s-o)),r[1]+.5*i*Math.cos(o+.5*(s-o))];n.push(e);for(let r=0;r<=1;r+=.1){const i=[(1-r)*(1-r)*e[0]+2*r*(1-r)*a[0]+r*r*t[0],(1-r)*(1-r)*e[1]+2*r*(1-r)*a[1]+r*r*t[1]];n.push(i)}return n.push(t),new Y_(n)}function mA(e){return{type:"FeatureCollection",features:e.map(((e,t)=>({type:"Feature",properties:{index:t},geometry:{...e.points,coordinates:e.points.coordinates.map((e=>Np(e)))}})))}}function gA(e){return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:{...e.points,coordinates:e.points.coordinates.map((e=>Np(e)))}}]}}const _A="element",yA="map",vA="offset",bA="position",xA="positioning",wA=class extends Wd{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=void 0===e.insertFirst||e.insertFirst,this.stopEvent=void 0===e.stopEvent||e.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===e.autoPan?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(_A,this.handleElementChanged),this.addChangeListener(yA,this.handleMapChanged),this.addChangeListener(vA,this.handleOffsetChanged),this.addChangeListener(bA,this.handlePositionChanged),this.addChangeListener(xA,this.handlePositioningChanged),void 0!==e.element&&this.setElement(e.element),this.setOffset(void 0!==e.offset?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),void 0!==e.position&&this.setPosition(e.position)}getElement(){return this.get(_A)}getId(){return this.id}getMap(){return this.get(yA)||null}getOffset(){return this.get(vA)}getPosition(){return this.get(bA)}getPositioning(){return this.get(xA)}handleElementChanged(){Zm(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(Um(this.element),Dd(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=zd(e,Ly,this.render,this),this.updatePixelPosition();const t=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?t.insertBefore(this.element,t.childNodes[0]||null):t.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(_A,e)}setMap(e){this.set(yA,e)}setOffset(e){this.set(vA,e)}setPosition(e){this.set(bA,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(bA))return;const n=this.getRect(t.getTargetElement(),t.getSize()),r=this.getElement(),i=this.getRect(r,[Vm(r),Wm(r)]),o=void 0===(e=e||{}).margin?20:e.margin;if(!Vh(n,i)){const r=i[0]-n[0],s=n[2]-i[2],a=i[1]-n[1],l=n[3]-i[3],u=[0,0];if(r<0?u[0]=r-o:s<0&&(u[0]=Math.abs(s)+o),a<0?u[1]=a-o:l<0&&(u[1]=Math.abs(l)+o),0!==u[0]||0!==u[1]){const n=t.getView().getCenterInternal(),r=t.getPixelFromCoordinateInternal(n);if(!r)return;const i=[r[0]+u[0],r[1]+u[1]],o=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(i),duration:o.duration,easing:o.easing})}}}getRect(e,t){const n=e.getBoundingClientRect(),r=n.left+window.pageXOffset,i=n.top+window.pageYOffset;return[r,i,r+t[0],i+t[1]]}setPositioning(e){this.set(xA,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t)return void this.setVisible(!1);const n=e.getPixelFromCoordinate(t),r=e.getSize();this.updateRenderedPosition(n,r)}updateRenderedPosition(e,t){const n=this.element.style,r=this.getOffset(),i=this.getPositioning();this.setVisible(!0);let o="0%",s="0%";"bottom-right"==i||"center-right"==i||"top-right"==i?o="-100%":"bottom-center"!=i&&"center-center"!=i&&"top-center"!=i||(o="-50%"),"bottom-left"==i||"bottom-center"==i||"bottom-right"==i?s="-100%":"center-left"!=i&&"center-center"!=i&&"center-right"!=i||(s="-50%");const a=`translate(${o}, ${s}) translate(${Math.round(e[0]+r[0])+"px"}, ${Math.round(e[1]+r[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,n.transform=a)}getOptions(){return this.options}};var kA=n(7244),CA={};CA.styleTagTransform=x(),CA.setAttributes=_(),CA.insert=m().bind(null,"head"),CA.domAPI=p(),CA.insertStyleElement=v(),d()(kA.Z,CA);const SA=kA.Z&&kA.Z.locals?kA.Z.locals:void 0;function AA({coordinate:t,queryPoints:n,route:r,onSelect:i}){const o=function(e,t){i(),Fr.dispatch(new jr({...e,coordinate:t,queryText:vi(t),isInitialized:!0},!0))};return(0,e.jsxs)("div",{className:SA.wrapper,onMouseUp:e=>{const t=new MouseEvent("click",{bubbles:!0});t.stopPropagation=()=>{},e.target.dispatchEvent(t)},children:[(0,e.jsxs)("button",{className:SA.entry,onClick:()=>o(n[0],t),children:[(0,e.jsx)("div",{children:(0,e.jsx)(Ps,{size:16,color:Oi.getMarkerColor(Ii.From)})}),(0,e.jsx)("span",{children:l("set_start")})]}),(0,e.jsxs)("button",{className:SA.entry,disabled:function(e){const t=e.filter((e=>e.type===Ii.Via));return 0!==t.length&&t.every((e=>!e.isInitialized))}(n),onClick:()=>function(e,n){const r=e.filter((e=>e.type===Ii.Via)),s=r.find((e=>!e.isInitialized));if(i(),s)o(s,t);else{const e=function(e,t){if(e.length<1||e.some((e=>e.coordinates.length<2||e.wayPoints.length<2||e.wayPoints.length>e.coordinates.length)))throw new Error("Invalid input when trying to find the next way point");let n=Number.MAX_VALUE,r=0,i=0;return e.forEach(((e,o)=>{let s=0;e.coordinates.forEach((a=>{Ei(a,e.wayPoints[s])<1&&(s=Math.min(e.wayPoints.length-1,s+1));const l=Ei(a,t);l<n&&(n=l,r=o,i=s==e.wayPoints.length?s-1:s)}))})),{closestRoute:r,nextWayPoint:i,distance:n}}(n.routingResult.paths.map((e=>({coordinates:e.points.coordinates.map((e=>({lat:e[1],lng:e[0]}))),wayPoints:e.snapped_waypoints.coordinates.map((e=>({lat:e[1],lng:e[0]})))}))),t).nextWayPoint;Fr.dispatch(new Br(e,t,!0))}}(n,r),children:[(0,e.jsx)("div",{children:(0,e.jsx)(Ps,{size:16,color:Oi.getMarkerColor(Ii.Via)})}),(0,e.jsx)("span",{children:l("set_intermediate")})]}),(0,e.jsxs)("button",{style:{paddingBottom:"10px"},className:SA.entry,onClick:()=>o(n[n.length-1],t),children:[(0,e.jsx)("div",{children:(0,e.jsx)(Ps,{size:16,color:Oi.getMarkerColor(Ii.To)})}),(0,e.jsx)("span",{children:l("set_end")})]}),(0,e.jsx)("button",{style:{borderTop:"1px solid lightgray",paddingTop:"10px"},className:SA.entry,onClick:()=>{i(),Fr.dispatch(new oi(t,8))},children:l("center_map")}),(0,e.jsx)("button",{className:SA.entry,onClick:()=>{i(),window.open(`https://www.openstreetmap.org/query?lat=${t.lat}&lon=${t.lng}`,"_blank","noopener,noreferrer")},children:l("query_osm")})]})}var EA=n(9105),MA={};MA.styleTagTransform=x(),MA.setAttributes=_(),MA.insert=m().bind(null,"head"),MA.domAPI=p(),MA.insertStyleElement=v(),d()(EA.Z,MA);const TA=EA.Z&&EA.Z.locals?EA.Z.locals:void 0,PA=new wA({autoPan:!0});function RA({map:t,route:n,queryPoints:r}){const[i,o]=(0,u.useState)(null),s=(0,u.useRef)(null),a=e=>{e.preventDefault();const n=Bp(t.getEventCoordinate(e));o({lng:n[0],lat:n[1]})},l=()=>{o(null)};return(0,u.useEffect)((()=>{PA.setElement(s.current),t.addOverlay(PA);const e=new IA((e=>a(e)));function n(){t.getTargetElement().addEventListener("contextmenu",a),t.getTargetElement().addEventListener("touchstart",(t=>e.onTouchStart(t))),t.getTargetElement().addEventListener("touchmove",(()=>e.onTouchEnd())),t.getTargetElement().addEventListener("touchend",(()=>e.onTouchEnd())),t.getTargetElement().addEventListener("click",l)}return t.on("change:target",n),()=>{t.getTargetElement().removeEventListener("contextmenu",a),t.getTargetElement().removeEventListener("click",l),t.removeOverlay(PA),t.un("change:target",n)}}),[t]),(0,u.useEffect)((()=>{PA.setPosition(i?Np([i.lng,i.lat]):void 0)}),[i]),(0,e.jsx)("div",{className:TA.contextMenu,ref:s,children:i&&(0,e.jsx)(AA,{coordinate:i,queryPoints:r,route:n,onSelect:l})})}class IA{constructor(e){this.currentTimeout=0,this.callback=e}onTouchStart(e){this.currentEvent=e,this.currentTimeout=window.setTimeout((()=>{console.log("long touch"),this.currentEvent&&this.callback(this.currentEvent)}),500)}onTouchEnd(){console.log("touch end"),window.clearTimeout(this.currentTimeout),this.currentEvent=void 0}}const LA="highlightedPathSegmentLayer";function OA(e){e.getLayers().getArray().filter((e=>e.get(LA))).forEach((t=>e.removeLayer(t)))}function zA(e){return{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiLineString",coordinates:e.map((e=>e.map((e=>Np([e.lng,e.lat])))))},properties:{}}]}}let FA;function DA(){if(!FA)throw Error('Map must be initialized before it can be used. Use "createMap" when starting the app');return FA}const jA="urbanDensityLayer";function NA(e){e.getLayers().getArray().filter((e=>e.get(jA))).forEach((t=>e.removeLayer(t)))}const BA="borderLayer";function qA(e){e.getLayers().getArray().filter((e=>e.get(BA))).forEach((t=>e.removeLayer(t)))}var GA=n(378),VA={};VA.styleTagTransform=x(),VA.setAttributes=_(),VA.insert=m().bind(null,"head"),VA.domAPI=p(),VA.insertStyleElement=v(),d()(GA.Z,VA);const WA=GA.Z&&GA.Z.locals?GA.Z.locals:void 0;function HA({map:t,coordinate:n,children:r}){const[i,o]=(0,u.useState)(),s=(0,u.useRef)(null);return(0,u.useEffect)((()=>{const e=new wA({element:s.current,autoPan:!1});o(e),t.addOverlay(e)}),[t]),(0,u.useEffect)((()=>{null==i||i.setPosition(n?Np([n.lng,n.lat]):void 0)}),[n]),(0,e.jsx)("div",{ref:s,children:r})}function UA({map:t,pathDetails:n}){const r=(0,u.useContext)(Fi);return(0,e.jsx)(HA,{map:t,coordinate:n.pathDetailsPoint?n.pathDetailsPoint.point:null,children:(0,e.jsx)("div",{className:WA.popup,children:n.pathDetailsPoint&&(0,e.jsxs)("p",{children:[gi(Math.round(n.pathDetailsPoint.elevation),r,!0),(0,e.jsx)("br",{}),n.pathDetailsPoint.description]})})})}var ZA=n(9690),XA={};XA.styleTagTransform=x(),XA.setAttributes=_(),XA.insert=m().bind(null,"head"),XA.domAPI=p(),XA.insertStyleElement=v(),d()(ZA.Z,XA);const KA=ZA.Z&&ZA.Z.locals?ZA.Z.locals:void 0;function $A({map:t,properties:n,coordinate:r}){return(0,e.jsx)(HA,{map:t,coordinate:r,children:(0,e.jsx)("div",{className:KA.popup,children:(0,e.jsx)("ul",{children:Object.entries(n).map((([t,n],r)=>(0,e.jsx)("li",{children:`${t}=${n}`},r)))})})})}function YA({map:t,instructionText:n,coordinate:r}){return(0,u.useEffect)((()=>{const e=()=>Fr.dispatch(new di(null,""));return t.once("change:target",(()=>{var n;null===(n=t.getTargetElement())||void 0===n||n.addEventListener("click",e)})),()=>{var n;null===(n=t.getTargetElement())||void 0===n||n.removeEventListener("click",e)}}),[]),(0,e.jsx)(HA,{map:t,coordinate:r,children:(0,e.jsx)("div",{className:WA.popup,children:(0,e.jsx)("p",{children:n})})})}function QA({map:t,pathDetails:n,mapFeatures:r}){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(UA,{map:t,pathDetails:n}),(0,e.jsx)($A,{map:t,properties:r.roadAttributes,coordinate:r.roadAttributesCoordinate}),(0,e.jsx)(YA,{map:t,instructionText:r.instructionText,coordinate:r.instructionCoordinate})]})}var JA;function eE(){return eE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eE.apply(this,arguments)}const tE=function(e){return u.createElement("svg",eE({xmlns:"http://www.w3.org/2000/svg",width:50,height:40,viewBox:"0 0 48 44"},e),JA||(JA=u.createElement("path",{d:"M6 36v-3h36v3Zm0-10.5v-3h36v3ZM6 15v-3h36v3Z"})))};class nE extends Df{constructor(e,t,n){super(),void 0!==n&&void 0===t?this.setFlatCoordinates(n,e):(t=t||0,this.setCenterAndRadius(e,t,n))}clone(){const e=new nE(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){const i=this.flatCoordinates,o=e-i[0],s=t-i[1],a=o*o+s*s;if(a<r){if(0===a)for(let e=0;e<this.stride;++e)n[e]=i[e];else{const e=this.getRadius()/Math.sqrt(a);n[0]=i[0]+e*o,n[1]=i[1]+e*s;for(let e=2;e<this.stride;++e)n[e]=i[e]}return n.length=this.stride,a}return r}containsXY(e,t){const n=this.flatCoordinates,r=e-n[0],i=t-n[1];return r*r+i*i<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(e){const t=this.flatCoordinates,n=t[this.stride]-t[0];return Uh(t[0]-n,t[1]-n,t[0]+n,t[1]+n,e)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const e=this.flatCoordinates[this.stride]-this.flatCoordinates[0],t=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return e*e+t*t}getType(){return"Circle"}intersectsExtent(e){if(fp(e,this.getExtent())){const t=this.getCenter();return e[0]<=t[0]&&e[2]>=t[0]||e[1]<=t[1]&&e[3]>=t[1]||tp(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,n=this.flatCoordinates[t]-this.flatCoordinates[0],r=e.slice();r[t]=r[0]+n;for(let n=1;n<t;++n)r[t+n]=e[n];this.setFlatCoordinates(this.layout,r),this.changed()}setCenterAndRadius(e,t,n){this.setLayout(n,e,0),this.flatCoordinates||(this.flatCoordinates=[]);const r=this.flatCoordinates;let i=Vf(r,0,e,this.stride);r[i++]=r[0]+t;for(let e=1,t=this.stride;e<t;++e)r[i++]=r[e];r.length=i,this.changed()}getCoordinates(){return null}setCoordinates(e,t){}setRadius(e){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+e,this.changed()}rotate(e,t){const n=this.getCenter(),r=this.getStride();this.setCenter(Lf(n,0,n.length,r,e,t,n)),this.changed()}}nE.prototype.transform;const rE=nE,iE="drawstart";class oE extends fd{constructor(e,t){super(e),this.feature=t}}function sE(e,t){return lh(e[0],e[1],t[0],t[1])}function aE(e,t){const n=e.length;return t<0?e[t+n]:t>=n?e[t-n]:e[t]}function lE(e,t,n){let r,i;t<n?(r=t,i=n):(r=n,i=t);const o=Math.ceil(r),s=Math.floor(i);if(o>s)return sE(fE(e,r),fE(e,i));let a=0;r<o&&(a+=sE(fE(e,r),aE(e,o))),s<i&&(a+=sE(aE(e,s),fE(e,i)));for(let t=o;t<s-1;++t)a+=sE(aE(e,t),aE(e,t+1));return a}function uE(e,t,n){if(t instanceof Y_)dE(e,t.getCoordinates(),!1,n);else if(t instanceof J_){const r=t.getCoordinates();for(let t=0,i=r.length;t<i;++t)dE(e,r[t],!1,n)}else if(t instanceof bm){const r=t.getCoordinates();for(let t=0,i=r.length;t<i;++t)dE(e,r[t],!0,n)}else if(t instanceof ry){const r=t.getCoordinates();for(let t=0,i=r.length;t<i;++t){const i=r[t];for(let t=0,r=i.length;t<r;++t)dE(e,i[t],!0,n)}}else if(t instanceof W_){const r=t.getGeometries();for(let t=0;t<r.length;++t)uE(e,r[t],n)}}const cE={index:-1,endIndex:NaN};function dE(e,t,n,r){const i=e[0],o=e[1];for(let e=0,s=t.length-1;e<s;++e){const s=pE(i,o,t[e],t[e+1]);if(0===s.squaredDistance){const i=e+s.along;return void r.push({coordinates:t,ring:n,startIndex:i,endIndex:i})}}}const hE={along:0,squaredDistance:0};function pE(e,t,n,r){const i=n[0],o=n[1],s=r[0]-i,a=r[1]-o;let l=0,u=i,c=o;return 0===s&&0===a||(l=sh(((e-i)*s+(t-o)*a)/(s*s+a*a),0,1),u+=s*l,c+=a*l),hE.along=l,hE.squaredDistance=hh(lh(e,t,u,c),10),hE}function fE(e,t){const n=e.length;let r=Math.floor(t);const i=t-r;r>=n?r-=n:r<0&&(r+=n);let o=r+1;o>=n&&(o-=n);const s=e[r],a=s[0],l=s[1],u=e[o];return[a+(u[0]-a)*i,l+(u[1]-l)*i]}function mE(){const e=D_();return function(t,n){return e[t.getGeometry().getType()]}}const gE=class extends Jy{constructor(e){const t=e;t.stopDown||(t.stopDown=kd),super(t),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=function(e){switch(e){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+e)}}(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:wd,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let n=e.geometryFunction;if(!n){const e=this.mode_;if("Circle"===e)n=function(e,t,n){const r=t||new rE([NaN,NaN]),i=Kp(e[0],n),o=wp(i,Kp(e[e.length-1],n));r.setCenterAndRadius(i,Math.sqrt(o),this.geometryLayout_);const s=Zp();return s&&r.transform(n,s),r};else{let t;"Point"===e?t=im:"LineString"===e?t=Y_:"Polygon"===e&&(t=bm),n=function(n,r,i){return r?"Polygon"===e?n[0].length?r.setCoordinates([n[0].concat([n[0][0]])],this.geometryLayout_):r.setCoordinates([],this.geometryLayout_):r.setCoordinates(n,this.geometryLayout_):r=new t(n,this.geometryLayout_),r}}}this.geometryFunction_=n,this.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new qb({source:new Yb({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:mE(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:lv,this.freehandCondition_,e.freehand?this.freehandCondition_=rv:this.freehandCondition_=e.freehandCondition?e.freehandCondition:uv,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(Xy,this.updateState_)}setTrace(e){let t;t=e?!0===e?rv:e:sv,this.traceCondition_=t}setMap(e){super.setMap(e),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(e){e.originalEvent.type===Td&&e.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(e);let t=e.type===Py.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&e.type===Py.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,t=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===Py.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),n=!1):this.freehand_&&e.type===Py.POINTERDOWN?n=!1:t&&this.getPointerCount()<2?(n=e.type===Py.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===Py.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e)):e.type===Py.DBLCLICK&&(n=!1),super.handleEvent(e)&&n}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new Ty(Py.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))}),this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active)return void this.deactivateTrace_();const t=this.getMap(),n=jh([t.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),t.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_])]),r=this.traceSource_.getFeaturesInExtent(n);if(0===r.length)return;const i=function(e,t){const n=[];for(let r=0;r<t.length;++r)uE(e,t[r].getGeometry(),n);return n}(e.coordinate,r);i.length&&(this.traceState_={active:!0,startPx:e.pixel.slice(),targets:i,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const n=e.startIndex<=e.endIndex;n===e.startIndex<=t?n&&t>e.endIndex||!n&&t<e.endIndex?this.addTracedCoordinates_(e,e.endIndex,t):(n&&t<e.endIndex||!n&&t>e.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let n=0;if(e<t){const r=Math.ceil(e);let i=Math.floor(t);i===t&&(i-=1),n=i-r+1}else{const r=Math.floor(e);let i=Math.ceil(t);i===t&&(i+=1),n=r-i+1}n>0&&this.removeLastPoints_(n)}addTracedCoordinates_(e,t,n){if(t===n)return;const r=[];if(t<n){const i=Math.ceil(t);let o=Math.floor(n);o===n&&(o-=1);for(let t=i;t<=o;++t)r.push(aE(e.coordinates,t))}else{const i=Math.floor(t);let o=Math.ceil(n);o===n&&(o+=1);for(let t=i;t>=o;--t)r.push(aE(e.coordinates,t))}r.length&&this.appendCoordinates(r)}updateTrace_(e){const t=this.traceState_;if(!t.active)return;if(-1===t.targetIndex&&kp(t.startPx,e.pixel)<this.snapTolerance_)return;const n=function(e,t,n,r){const i=e[0],o=e[1];let s=1/0,a=-1,l=NaN;for(let e=0;e<t.targets.length;++e){const n=t.targets[e],r=n.coordinates;let u,c=1/0;for(let e=0;e<r.length-1;++e){const t=pE(i,o,r[e],r[e+1]);t.squaredDistance<c&&(c=t.squaredDistance,u=e+t.along)}c<s&&(s=c,n.ring&&t.targetIndex===e&&(n.endIndex>n.startIndex?u<n.startIndex&&(u+=r.length):n.endIndex<n.startIndex&&u>n.startIndex&&(u-=r.length)),l=u,a=e)}const u=t.targets[a];let c=u.ring;if(t.targetIndex===a&&c){const e=fE(u.coordinates,l);kp(n.getPixelFromCoordinate(e),t.startPx)>r&&(c=!1)}if(c){const e=u.coordinates,t=e.length,n=u.startIndex,r=l;if(n<r){const i=lE(e,n,r);lE(e,n,r-t)<i&&(l-=t)}else{const i=lE(e,n,r);lE(e,n,r+t)<i&&(l+=t)}}return cE.index=a,cE.endIndex=l,cE}(e.coordinate,t,this.getMap(),this.snapTolerance_);if(t.targetIndex!==n.index){if(-1!==t.targetIndex){const e=t.targets[t.targetIndex];this.removeTracedCoordinates_(e.startIndex,e.endIndex)}const e=t.targets[n.index];this.addTracedCoordinates_(e,e.startIndex,n.endIndex)}else{const e=t.targets[t.targetIndex];this.addOrRemoveTracedCoordinates_(e,n.endIndex)}t.targetIndex=n.index;const r=t.targets[t.targetIndex];r.endIndex=n.endIndex;const i=fE(r.coordinates,r.endIndex),o=this.getMap().getPixelFromCoordinate(i);e.coordinate=i,e.pixel=[Math.round(o[0]),Math.round(o[1])]}handleUpEvent(e){let t=!0;if(0===this.getPointerCount()){this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(e);const n=this.traceState_.active;if(this.toggleTraceState_(e),this.shouldHandle_){const r=!this.finishCoordinate_;r&&this.startDrawing_(e.coordinate),!r&&this.freehand_?this.finishDrawing():this.freehand_||r&&"Point"!==this.mode_||(this.atFinish_(e.pixel,n)?this.finishCondition_(e)&&this.finishDrawing():this.addToDrawing_(e.coordinate)),t=!1}else this.freehand_&&this.abortDrawing()}return!t&&this.stopClick_&&e.preventDefault(),t}handlePointerMove_(e){if(this.pointerType_=e.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const t=this.downPx_,n=e.pixel,r=t[0]-n[0],i=t[1]-n[1],o=r*r+i*i;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(e),this.modifyDrawing_(e.coordinate)):this.createOrUpdateSketchPoint_(e.coordinate.slice())}atFinish_(e,t){let n=!1;if(this.sketchFeature_){let r=!1,i=[this.finishCoordinate_];const o=this.mode_;if("Point"===o)n=!0;else if("Circle"===o)n=2===this.sketchCoords_.length;else if("LineString"===o)r=!t&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===o){const e=this.sketchCoords_;r=e[0].length>this.minPoints_,i=[e[0][0],e[0][e[0].length-2]],i=t?[e[0][0]]:[e[0][0],e[0][e[0].length-2]]}if(r){const t=this.getMap();for(let r=0,o=i.length;r<o;r++){const o=i[r],s=t.getPixelFromCoordinate(o),a=e[0]-s[0],l=e[1]-s[1],u=this.freehand_?1:this.snapTolerance_;if(n=Math.sqrt(a*a+l*l)<=u,n){this.finishCoordinate_=o;break}}}}return n}createOrUpdateSketchPoint_(e){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new $d(new im(e)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(e){this.sketchLine_||(this.sketchLine_=new $d);const t=e.getLinearRing(0);let n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(t.getLayout(),t.getFlatCoordinates()),n.changed()):(n=new Y_(t.getFlatCoordinates(),t.getLayout()),this.sketchLine_.setGeometry(n))}startDrawing_(e){const t=this.getMap().getView().getProjection(),n=Ff(this.geometryLayout_);for(;e.length<n;)e.push(0);this.finishCoordinate_=e,"Point"===this.mode_?this.sketchCoords_=e.slice():"Polygon"===this.mode_?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new $d(new Y_(this.sketchLineCoords_)));const r=this.geometryFunction_(this.sketchCoords_,void 0,t);this.sketchFeature_=new $d,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new oE(iE,this.sketchFeature_))}modifyDrawing_(e){const t=this.getMap(),n=this.sketchFeature_.getGeometry(),r=t.getView().getProjection(),i=Ff(this.geometryLayout_);let o,s;for(;e.length<i;)e.push(0);"Point"===this.mode_?s=this.sketchCoords_:"Polygon"===this.mode_?(o=this.sketchCoords_[0],s=o[o.length-1],this.atFinish_(t.getPixelFromCoordinate(e))&&(e=this.finishCoordinate_.slice())):(o=this.sketchCoords_,s=o[o.length-1]),s[0]=e[0],s[1]=e[1],this.geometryFunction_(this.sketchCoords_,n,r),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(e),"Polygon"===n.getType()&&"Polygon"!==this.mode_?this.createOrUpdateCustomSketchLine_(n):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(e){const t=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection();let r,i;const o=this.mode_;"LineString"===o||"Circle"===o?(this.finishCoordinate_=e.slice(),i=this.sketchCoords_,i.length>=this.maxPoints_&&(this.freehand_?i.pop():r=!0),i.push(e.slice()),this.geometryFunction_(i,t,n)):"Polygon"===o&&(i=this.sketchCoords_[0],i.length>=this.maxPoints_&&(this.freehand_?i.pop():r=!0),i.push(e.slice()),r&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,t,n)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),r&&this.finishDrawing()}removeLastPoints_(e){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),r=this.mode_;for(let i=0;i<e;++i){let e;if("LineString"===r||"Circle"===r){if(e=this.sketchCoords_,e.splice(-2,1),e.length>=2){this.finishCoordinate_=e[e.length-2].slice();const t=this.finishCoordinate_.slice();e[e.length-1]=t,this.createOrUpdateSketchPoint_(t)}this.geometryFunction_(e,t,n),"Polygon"===t.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if("Polygon"===r){e=this.sketchCoords_[0],e.splice(-2,1);const r=this.sketchLine_.getGeometry();if(e.length>=2){const t=e[e.length-2].slice();e[e.length-1]=t,this.createOrUpdateSketchPoint_(t)}r.setCoordinates(e),this.geometryFunction_(this.sketchCoords_,t,n)}if(1===e.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return;let t=this.sketchCoords_;const n=e.getGeometry(),r=this.getMap().getView().getProjection();"LineString"===this.mode_?(t.pop(),this.geometryFunction_(t,n,r)):"Polygon"===this.mode_&&(t[0].pop(),this.geometryFunction_(t,n,r),t=n.getCoordinates()),"MultiPoint"===this.type_?e.setGeometry(new ty([t])):"MultiLineString"===this.type_?e.setGeometry(new J_([t])):"MultiPolygon"===this.type_&&e.setGeometry(new ry([t])),this.dispatchEvent(new oE("drawend",e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new oE("drawabort",e))}appendCoordinates(e){const t=this.mode_,n=!this.sketchFeature_;let r;if(n&&this.startDrawing_(e[0]),"LineString"===t||"Circle"===t)r=this.sketchCoords_;else{if("Polygon"!==t)return;r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}n&&r.shift(),r.pop();for(let t=0;t<e.length;t++)this.addToDrawing_(e[t]);const i=e[e.length-1];this.addToDrawing_(i),this.modifyDrawing_(i)}extend(e){const t=e.getGeometry();this.sketchFeature_=e,this.sketchCoords_=t.getCoordinates();const n=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=n.slice(),this.sketchCoords_.push(n.slice()),this.sketchPoint_=new $d(new im(n)),this.updateSketchFeatures_(),this.dispatchEvent(new oE(iE,this.sketchFeature_))}updateSketchFeatures_(){const e=[];this.sketchFeature_&&e.push(this.sketchFeature_),this.sketchLine_&&e.push(this.sketchLine_),this.sketchPoint_&&e.push(this.sketchPoint_);const t=this.overlay_.getSource();t.clear(!0),t.addFeatures(e)}updateState_(){const e=this.getMap(),t=this.getActive();e&&t||this.abortDrawing(),this.overlay_.setMap(t?e:null)}};function _E(e){return e.feature?e.feature:e.element?e.element:null}const yE=[],vE=class extends Jy{constructor(e){const t=e=e||{};t.handleDownEvent||(t.handleDownEvent=wd),t.stopDown||(t.stopDown=kd),super(t),this.source_=e.source?e.source:null,this.vertex_=void 0===e.vertex||e.vertex,this.edge_=void 0===e.edge||e.edge,this.features_=e.features?e.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,this.rBush_=new Gb,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(e,t){t=void 0===t||t;const n=Gd(e),r=e.getGeometry();if(r){const t=this.GEOMETRY_SEGMENTERS_[r.getType()];if(t){this.indexedFeaturesExtents_[n]=r.getExtent([1/0,1/0,-1/0,-1/0]);const i=[];if(t(i,r),1===i.length)this.rBush_.insert(jh(i[0]),{feature:e,segment:i[0]});else if(i.length>1){const t=i.map((e=>jh(e))),n=i.map((t=>({feature:e,segment:t})));this.rBush_.load(t,n)}}}t&&(this.featureChangeListenerKeys_[n]=zd(e,Md,this.handleFeatureChange_,this))}getFeatures_(){let e;return this.features_?e=this.features_:this.source_&&(e=this.source_.getFeatures()),e}handleEvent(e){const t=this.snapTo(e.pixel,e.coordinate,e.map);return t&&(e.coordinate=t.vertex.slice(0,2),e.pixel=t.vertexPixel),super.handleEvent(e)}handleFeatureAdd_(e){const t=_E(e);t&&this.addFeature(t)}handleFeatureRemove_(e){const t=_E(e);t&&this.removeFeature(t)}handleFeatureChange_(e){const t=e.target;if(this.handlingDownUpSequence){const e=Gd(t);e in this.pendingFeatures_||(this.pendingFeatures_[e]=t)}else this.updateFeature_(t)}handleUpEvent(e){const t=Object.values(this.pendingFeatures_);return t.length&&(t.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(e,t){const n=void 0===t||t,r=Gd(e),i=this.indexedFeaturesExtents_[r];if(i){const t=this.rBush_,n=[];t.forEachInExtent(i,(function(t){e===t.feature&&n.push(t)}));for(let e=n.length-1;e>=0;--e)t.remove(n[e])}n&&(Dd(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])}setMap(e){const t=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();t&&(n.forEach(Dd),n.length=0,this.rBush_.clear(),Object.values(this.featureChangeListenerKeys_).forEach(Dd),this.featureChangeListenerKeys_={}),super.setMap(e),e&&(this.features_?n.push(zd(this.features_,gy,this.handleFeatureAdd_,this),zd(this.features_,_y,this.handleFeatureRemove_,this)):this.source_&&n.push(zd(this.source_,Vb,this.handleFeatureAdd_,this),zd(this.source_,Wb,this.handleFeatureRemove_,this)),r.forEach((e=>this.addFeature(e))))}snapTo(e,t,n){const r=n.getView().getProjection(),i=Kp(t,r),o=$p(Nh(jh([i]),n.getView().getResolution()*this.pixelTolerance_),r),s=this.rBush_.getInExtent(o),a=s.length;if(0===a)return null;let l,u=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,d=()=>{if(l){const t=n.getPixelFromCoordinate(l);if(wp(e,t)<=c)return{vertex:l,vertexPixel:[Math.round(t[0]),Math.round(t[1])]}}return null};if(this.vertex_){for(let e=0;e<a;++e){const t=s[e];"Circle"!==t.feature.getGeometry().getType()&&t.segment.forEach((e=>{const t=Kp(e,r),n=wp(i,t);n<u&&(l=e,u=n)}))}const e=d();if(e)return e}if(this.edge_){for(let e=0;e<a;++e){let t=null;const n=s[e];if("Circle"===n.feature.getGeometry().getType()){let e=n.feature.getGeometry();const o=Zp();o&&(e=e.clone().transform(o,r)),t=yp(i,e)}else{const[e,o]=n.segment;o&&(yE[0]=Kp(e,r),yE[1]=Kp(o,r),t=vp(i,yE))}if(t){const e=wp(i,t);e<u&&(l=Xp(t,r),u=e)}}const e=d();if(e)return e}return null}updateFeature_(e){this.removeFeature(e,!1),this.addFeature(e,!1)}segmentCircleGeometry_(e,t){const n=this.getMap().getView().getProjection();let r=t;const i=Zp();i&&(r=r.clone().transform(i,n));const o=wm(r);i&&o.transform(n,i);const s=o.getCoordinates()[0];for(let t=0,n=s.length-1;t<n;++t)e.push(s.slice(t,t+2))}segmentGeometryCollectionGeometry_(e,t){const n=t.getGeometriesArray();for(let t=0;t<n.length;++t){const r=this.GEOMETRY_SEGMENTERS_[n[t].getType()];r&&r(e,n[t])}}segmentLineStringGeometry_(e,t){const n=t.getCoordinates();for(let t=0,r=n.length-1;t<r;++t)e.push(n.slice(t,t+2))}segmentMultiLineStringGeometry_(e,t){const n=t.getCoordinates();for(let t=0,r=n.length;t<r;++t){const r=n[t];for(let t=0,n=r.length-1;t<n;++t)e.push(r.slice(t,t+2))}}segmentMultiPointGeometry_(e,t){t.getCoordinates().forEach((t=>{e.push([t])}))}segmentMultiPolygonGeometry_(e,t){const n=t.getCoordinates();for(let t=0,r=n.length;t<r;++t){const r=n[t];for(let t=0,n=r.length;t<n;++t){const n=r[t];for(let t=0,r=n.length-1;t<r;++t)e.push(n.slice(t,t+2))}}}segmentPointGeometry_(e,t){e.push([t.getCoordinates()])}segmentPolygonGeometry_(e,t){const n=t.getCoordinates();for(let t=0,r=n.length;t<r;++t){const r=n[t];for(let t=0,n=r.length-1;t<n;++t)e.push(r.slice(t,t+2))}}},bE="areasLayer";function xE(e){try{return JSON.parse(e)}catch{return null}}function wE(e){var t;const n=null===(t=e.getGeometry())||void 0===t?void 0:t.clone().transform("EPSG:3857","EPSG:4326"),r=(new sy).writeFeature(new $d(n)),i=JSON.parse(r);return i.properties={},i.geometry.coordinates[0]=i.geometry.coordinates[0].map((e=>[Math.round(1e6*e[0])/1e6,Math.round(1e6*e[1])/1e6])),i}function kE(e){e.getLayers().getArray().filter((e=>e.get(bE))).forEach((t=>e.removeLayer(t)))}var CE=n(173),SE={};SE.styleTagTransform=x(),SE.setAttributes=_(),SE.insert=m().bind(null,"head"),SE.domAPI=p(),SE.insertStyleElement=v(),d()(CE.Z,SE);const AE=CE.Z&&CE.Z.locals?CE.Z.locals:void 0;var EE;function ME(){return ME=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ME.apply(this,arguments)}const TE=function(e){return u.createElement("svg",ME({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 -960 960 960"},e),u.createElement("text",{x:"50%",y:-300,fill:"red",style:{fontSize:500},textAnchor:"middle"},"\n ?\n "),EE||(EE=u.createElement("path",{fill:"currentColor",d:"M450-40v-75q-137-14-228-105T117-448H42v-60h75q14-137 105-228t228-105v-75h60v75q137 14 228 105t105 228h75v60h-75q-14 137-105 228T510-115v75h-60Zm30-134q125 0 214.5-89.5T784-478q0-125-89.5-214.5T480-782q-125 0-214.5 89.5T176-478q0 125 89.5 214.5T480-174Z"})))};var PE,RE;function IE(){return IE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IE.apply(this,arguments)}const LE=function(e){return u.createElement("svg",IE({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 -960 960 960"},e),PE||(PE=u.createElement("path",{fill:"currentColor",d:"M450-40v-75q-137-14-228-105T117-448H42v-60h75q14-137 105-228t228-105v-75h60v75q137 14 228 105t105 228h75v60h-75q-14 137-105 228T510-115v75h-60Zm30-134q125 0 214.5-89.5T784-478q0-125-89.5-214.5T480-782q-125 0-214.5 89.5T176-478q0 125 89.5 214.5T480-174Z"})),RE||(RE=u.createElement("circle",{cx:479.609,cy:-481.741,r:100,fill:"currentColor"},u.createElement("animate",{attributeName:"r",dur:"2s",repeatCount:"indefinite",values:"0;200;0"}))))};var OE,zE;function FE(){return FE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FE.apply(this,arguments)}const DE=function(e){return u.createElement("svg",FE({xmlns:"http://www.w3.org/2000/svg",width:48,height:48,viewBox:"0 -960 960 960"},e),OE||(OE=u.createElement("path",{fill:"currentColor",d:"M450-40v-75q-137-14-228-105T117-448H42v-60h75q14-137 105-228t228-105v-75h60v75q137 14 228 105t105 228h75v60h-75q-14 137-105 228T510-115v75h-60Zm30-134q125 0 214.5-89.5T784-478q0-125-89.5-214.5T480-782q-125 0-214.5 89.5T176-478q0 125 89.5 214.5T480-174Z"})),zE||(zE=u.createElement("circle",{cx:479.609,cy:-481.741,r:200,fill:"currentColor"})))};function jE(t){const[n,r]=(0,u.useState)("synched_map_or_initial");return(0,e.jsxs)("div",{className:AE.locationOnOff,onClick:()=>{r("search"),function(e){if(!navigator.geolocation)return Fr.dispatch(new Kr("Geolocation is not supported in this browser")),void e(void 0);navigator.geolocation.getCurrentPosition((t=>{e({lat:t.coords.latitude,lng:t.coords.longitude})}),(t=>{Fr.dispatch(new Kr(l("searching_location_failed")+": "+t.message)),e(void 0)}),{timeout:3e5,enableHighAccuracy:!0})}((e=>{e?(t.queryPoints[0]&&!t.queryPoints[0].isInitialized&&Fr.dispatch(new jr({...t.queryPoints[0],coordinate:e,queryText:l("current_location"),isInitialized:!0,type:Ii.From},!1)),Fr.dispatch(new si(Ri(e))),r("synched_map_or_initial")):r("error")}))},children:["error"==n&&(0,e.jsx)(TE,{}),"search"==n&&(0,e.jsx)(LE,{}),"synched_map_or_initial"==n&&(0,e.jsx)(DE,{})]})}const NE="popup-container",BE="sidebar-content";function qE({query:t,route:n,map:r,error:i,mapOptions:o,encodedValues:s,drawAreas:a}){var l;const[c,d]=(0,u.useState)(!0),[h,p]=(0,u.useState)(!1);return(0,e.jsxs)(e.Fragment,{children:[c?(0,e.jsx)("div",{className:Xi.sidebar,children:(0,e.jsxs)("div",{className:Xi.sidebarContent,id:BE,children:[(0,e.jsx)(Co,{onClick:()=>d(!1),className:Xi.sidebarCloseButton,children:(0,e.jsx)(Xs,{})}),(0,e.jsx)(Ca,{routingProfiles:t.profiles,selectedProfile:t.routingProfile,showCustomModelBox:h,toggleCustomModelBox:()=>p(!h),customModelBoxEnabled:t.customModelEnabled}),h&&(0,e.jsx)(Eu,{customModelEnabled:t.customModelEnabled,encodedValues:s,customModelStr:t.customModelStr,queryOngoing:(null===(l=t.currentRequest.subRequests[0])||void 0===l?void 0:l.state)===Li.SENT,drawAreas:a}),(0,e.jsx)(qs,{points:t.queryPoints}),(0,e.jsx)("div",{children:!i.isDismissed&&(0,e.jsx)(Ks,{error:i})}),(0,e.jsx)(Gc,{info:n.routingResult.info,paths:n.routingResult.paths,selectedPath:n.selectedPath,currentRequest:t.currentRequest,profile:t.routingProfile.name}),(0,e.jsx)("div",{children:(0,e.jsx)(pd,{})})]})}):(0,e.jsx)("div",{className:Xi.sidebarWhenClosed,onClick:()=>d(!0),children:(0,e.jsx)(Co,{className:Xi.sidebarOpenButton,children:(0,e.jsx)(tE,{})})}),(0,e.jsx)("div",{className:Xi.popupContainer,id:NE}),(0,e.jsxs)("div",{className:Xi.onMapRightSide,children:[(0,e.jsx)(Mo,{...o}),(0,e.jsx)(jE,{queryPoints:t.queryPoints})]}),(0,e.jsx)("div",{className:Xi.map,children:(0,e.jsx)(_o,{map:r})}),(0,e.jsx)("div",{className:Xi.pathDetails,children:(0,e.jsx)(Di,{selectedPath:n.selectedPath})})]})}function GE({query:t,route:n,map:r,error:i,mapOptions:o,encodedValues:s,drawAreas:a}){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Xi.smallScreenSidebar,children:(0,e.jsx)(Mu,{query:t,route:n,error:i,encodedValues:s,drawAreas:a})}),(0,e.jsx)("div",{className:Xi.smallScreenMap,children:(0,e.jsx)(_o,{map:r})}),(0,e.jsx)("div",{className:Xi.smallScreenMapOptions,children:(0,e.jsxs)("div",{className:Xi.onMapRightSide,children:[(0,e.jsx)(Mo,{...o}),(0,e.jsx)(jE,{queryPoints:t.queryPoints})]})}),(0,e.jsx)("div",{className:Xi.smallScreenRoutingResult,children:(0,e.jsx)(Gc,{info:n.routingResult.info,paths:n.routingResult.paths,selectedPath:n.selectedPath,currentRequest:t.currentRequest,profile:t.routingProfile.name})}),(0,e.jsx)("div",{className:Xi.smallScreenPoweredBy,children:(0,e.jsx)(pd,{})})]})}class VE extends Ai{static getEmptyPath(){return{bbox:void 0,instructions:[],points:{coordinates:[],type:"LineString"},points_encoded:!1,snapped_waypoints:{type:"LineString",coordinates:[]},ascend:0,descend:0,details:{max_speed:[],street_name:[],toll:[],road_environment:[],road_class:[],track_type:[],country:[],get_off_bike:[],road_access:[]},distance:0,points_order:[],time:0,description:""}}constructor(e){super(VE.getInitialState()),this.queryStore=e}reduce(e,t){return t instanceof Xr?this.reduceRouteReceived(e,t):t instanceof Qr?{...e,selectedPath:t.path}:t instanceof jr||t instanceof Yr||t instanceof Gr||t instanceof Vr?VE.getInitialState():e}static getInitialState(){return{routingResult:{paths:[],info:{copyright:[],road_data_timestamp:"",took:0}},selectedPath:VE.getEmptyPath()}}reduceRouteReceived(e,t){return VE.containsPaths(t.result.paths)?{routingResult:t.result,selectedPath:t.result.paths[0]}:VE.getInitialState()}static containsPaths(e){return e.length>0}}class WE extends Ai{constructor(){super(WE.getInitialState())}static getInitialState(){return{version:"",bbox:[0,0,0,0],profiles:[],elevation:!1,encoded_values:[]}}reduce(e,t){return t instanceof Dr?t.result:e}}class HE extends Ai{constructor(){super(HE.getInitialState())}static getInitialState(){return{isDismissed:!0,lastError:""}}reduce(e,t){return t instanceof Kr?{lastError:t.message,isDismissed:!1}:t instanceof Jr||t instanceof Xr?{...e,isDismissed:!0}:e}}const UE=wi().keys.omniscale,ZE=wi().keys.maptiler,XE=wi().keys.thunderforest,KE=wi().keys.kurviger,$E='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors',YE=window.devicePixelRatio>1||window.matchMedia&&window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),(min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),(min-resolution: 1.5dppx)").matches,QE=YE?2:1,JE=YE?"@2x":"",eM={name:"Omniscale",type:"raster",url:["https://maps.omniscale.net/v2/"+UE+"/style.default/{z}/{x}/{y}.png"+(YE?"?hq=true":"")],attribution:$E+', © <a href="https://maps.omniscale.com/" target="_blank">Omniscale</a>',tilePixelRatio:QE},tM="/raster/styles/kurviger-liberty/{z}/{x}/{y}"+JE+".png?key="+KE,nM=[eM,{name:"OpenStreetMap",type:"raster",url:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],attribution:$E,maxZoom:19},{name:"Cyclosm",type:"raster",url:["https://a.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png","https://b.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png","https://c.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png"],attribution:$E+', © <a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" target="_blank">CyclOSM</a>',maxZoom:19},{name:"Esri Satellite",type:"raster",url:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],attribution:'© <a href="http://www.esri.com/" target="_blank">Esri</a> i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',maxZoom:18},{name:"MapTiler Satellite",type:"vector",url:"https://api.maptiler.com/maps/hybrid/style.json?key="+ZE,attribution:$E+', © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>'},{name:"TF Transport",type:"raster",url:["https://a.tile.thunderforest.com/transport/{z}/{x}/{y}"+JE+".png?apikey="+XE,"https://b.tile.thunderforest.com/transport/{z}/{x}/{y}"+JE+".png?apikey="+XE,"https://c.tile.thunderforest.com/transport/{z}/{x}/{y}"+JE+".png?apikey="+XE],attribution:$E+', <a href="https://www.thunderforest.com/maps/transport/" target="_blank">Thunderforest Transport</a>',tilePixelRatio:QE},{name:"TF Cycle",type:"raster",url:["https://a.tile.thunderforest.com/cycle/{z}/{x}/{y}"+JE+".png?apikey="+XE,"https://b.tile.thunderforest.com/cycle/{z}/{x}/{y}"+JE+".png?apikey="+XE,"https://c.tile.thunderforest.com/cycle/{z}/{x}/{y}"+JE+".png?apikey="+XE],attribution:$E+', <a href="https://www.thunderforest.com/maps/opencyclemap/" target="_blank">Thunderforest Cycle</a>',tilePixelRatio:QE},{name:"TF Outdoors",type:"raster",url:["https://a.tile.thunderforest.com/outdoors/{z}/{x}/{y}"+JE+".png?apikey="+XE,"https://b.tile.thunderforest.com/outdoors/{z}/{x}/{y}"+JE+".png?apikey="+XE,"https://c.tile.thunderforest.com/outdoors/{z}/{x}/{y}"+JE+".png?apikey="+XE],attribution:$E+', <a href="https://www.thunderforest.com/maps/outdoors/" target="_blank">Thunderforest Outdoors</a>',tilePixelRatio:QE},{name:"Kurviger Liberty",type:"raster",url:["https://a-tiles.mapilion.com"+tM,"https://b-tiles.mapilion.com"+tM,"https://c-tiles.mapilion.com"+tM,"https://d-tiles.mapilion.com"+tM,"https://e-tiles.mapilion.com"+tM],attribution:$E+',© <a href="https://kurviger.de/" target="_blank">Kurviger</a> © <a href="https://mapilion.com/attribution" target="_blank">Mapilion</a> <a href="http://www.openmaptiles.org/" target="_blank">© OpenMapTiles</a>',maxZoom:22,tilePixelRatio:QE},{name:"Mapilion",type:"vector",url:"https://tiles.mapilion.com/assets/osm-bright/style.json?key="+KE,attribution:$E+', © <a href="https://mapilion.com/attribution" target="_blank">Mapilion</a> <a href="http://www.openmaptiles.org/" target="_blank">© OpenMapTiles</a>'},{name:"Lyrk",type:"raster",url:["https://tiles.lyrk.org/lr/{z}/{x}/{y}?apikey=6e8cfef737a140e2a58c8122aaa26077"],attribution:$E+', <a href="https://geodienste.lyrk.de/">Lyrk</a>',maxZoom:15},{name:"WanderReitKarte",type:"raster",url:["https://topo.wanderreitkarte.de/topo/{z}/{x}/{y}.png","https://topo2.wanderreitkarte.de/topo/{z}/{x}/{y}.png","https://topo3.wanderreitkarte.de/topo/{z}/{x}/{y}.png","https://topo4.wanderreitkarte.de/topo/{z}/{x}/{y}.png"],attribution:$E+', <a href="https://wanderreitkarte.de" target="_blank">WanderReitKarte</a>',maxZoom:18}];class rM extends Ai{constructor(){super(rM.getInitialState())}static getInitialState(){const e=nM.find((e=>e.name===wi().defaultTiles));return e||console.warn(`Could not find tile layer specified in config: '${wi().defaultTiles}', using default instead`),{selectedStyle:e||eM,styleOptions:nM,routingGraphEnabled:!1,urbanDensityEnabled:!1,externalMVTEnabled:!1,isMapLoaded:!1}}reduce(e,t){if(t instanceof ei){const n=e.styleOptions.find((e=>e.name===t.layer));if(n)return{...e,selectedStyle:n}}else{if(t instanceof ti)return{...e,routingGraphEnabled:t.routingGraphEnabled};if(t instanceof ni)return{...e,urbanDensityEnabled:t.urbanDensityEnabled};if(t instanceof ri)return{...e,externalMVTEnabled:t.externalMVTLayerEnabled};if(t instanceof ii)return{...e,isMapLoaded:!0}}return e}}class iM extends Ai{constructor(){super(iM.getInitialState())}static getInitialState(){return{pathDetailsPoint:null,pathDetailBbox:void 0,pathDetailsHighlightedSegments:[]}}reduce(e,t){return t instanceof ai?{...e,pathDetailsPoint:t.pathDetailsPoint}:t instanceof li?{...e,pathDetailBbox:t.bbox?t.bbox:void 0}:t instanceof ui?{...e,pathDetailsHighlightedSegments:t.segments}:e}}const oM=window;class sM{constructor(e,t){this.ignoreStateUpdates=!1,this.queryStore=e,this.mapStore=t,oM.addEventListener("popstate",(async()=>await this.updateStateFromUrl()))}async startSyncingUrlWithAppState(){oM.history.replaceState(null,"",this.createUrlFromState()),this.queryStore.register((()=>this.updateUrlFromState())),this.mapStore.register((()=>this.updateUrlFromState()))}static createUrl(e,t,n){const r=new URL(e);return t.queryPoints.filter((e=>e.isInitialized)).length>0&&t.queryPoints.map((e=>e.isInitialized?sM.pointToParam(e):"")).forEach((e=>r.searchParams.append("point",e))),r.searchParams.append("profile",t.routingProfile.name),r.searchParams.append("layer",n.selectedStyle.name),t.customModelEnabled&&r.searchParams.append("custom_model",t.customModelStr.replace(/\s+/g,"")),r}static pointToParam(e){const t=vi(e.coordinate);return t===e.queryText?t:t+"_"+e.queryText}static parsePoints(e){return e.searchParams.getAll("point").map(((e,t)=>{const n=e.split("_"),r={coordinate:{lat:0,lng:0},isInitialized:!1,id:t,queryText:e,color:"",type:Ii.Via};if(n.length>=1)try{r.coordinate=sM.parseCoordinate(n[0]),Number.isNaN(r.coordinate.lat)||Number.isNaN(r.coordinate.lng)||(r.queryText=n.length>=2?n[1]:vi(r.coordinate),r.isInitialized=!0)}catch(e){}return r}))}static parseCoordinate(e){const t=e.split(",");if(2!==t.length)throw Error('Could not parse coordinate with value: "'+e[0]+'"');return{lat:Number.parseFloat(t[0]),lng:Number.parseFloat(t[1])}}static parseProfile(e){return e.searchParams.has("profile")?e.searchParams.get("profile"):e.searchParams.has("vehicle")?e.searchParams.get("vehicle"):""}static parseLayer(e){return e.searchParams.get("layer")}async updateStateFromUrl(){this.ignoreStateUpdates=!0,Fr.dispatch(new Gr);const e=new URL(oM.location.href),t=sM.parseProfile(e);t&&Fr.dispatch(new Nr({name:t}));const n=sM.parsePoints(e);if(n.some((e=>!e.isInitialized&&e.queryText.length>0))){const e=n.map((e=>e.isInitialized?Promise.resolve(e):Ci().geocode(e.queryText,"nominatim").then((t=>0==t.hits.length?e:{...e,queryText:t.hits[0].name,coordinate:{lat:t.hits[0].point.lat,lng:t.hits[0].point.lng},isInitialized:!0})).catch((()=>Promise.resolve(e))))),t=await Promise.all(e);sM.dispatchQueryPoints(t)}else sM.dispatchQueryPoints(n);const r=sM.parseLayer(e);r&&Fr.dispatch(new ei(r)),this.ignoreStateUpdates=!1}static dispatchQueryPoints(e){const t=e.filter((e=>e.isInitialized)),n=1==t.length?Ri(t[0].coordinate):sM.getBBoxFromUrlPoints(t.map((e=>e.coordinate)));return n&&Fr.dispatch(new si(n)),Fr.dispatch(new qr(e))}updateUrlFromState(){if(this.ignoreStateUpdates)return;const e=this.createUrlFromState();e!==oM.location.href&&oM.history.pushState(null,"",e)}createUrlFromState(){return sM.createUrl(oM.location.origin+oM.location.pathname,this.queryStore.state,this.mapStore.state).toString()}static getBBoxFromUrlPoints(e){const t=e.reduce(((e,t)=>[Math.min(e[0],t.lng),Math.min(e[1],t.lat),Math.max(e[2],t.lng),Math.max(e[3],t.lat)]),[180,90,-180,-90]);return t[0]<t[2]&&t[1]<t[3]?t:null}}function aM(e,t,n,r){const i=Np([t[0],t[1]]),o=Np([t[2],t[3]]);e.getView().fit([i[0],i[1],o[0],o[1]],{size:r||e.getSize(),padding:n?[200,16,32,16]:[100,100,200,500]})}console.log("Source code: https://github.com/graphhopper/graphhopper-maps/tree/df1ca0953b72dfd8e75d12e21d7eeb3fb6ea6491");const lM=new URL(window.location.href);!function(e,t=!1){if(o&&!t)throw new Error("translation already initialized");e=e.toLowerCase().replace("-","_");const n=r;let a=Object.keys(n).find((t=>e==t||e==s(t)));if(!a){const t=e.length>2?e.substring(0,2):e;a=Object.keys(n).find((e=>t==s(e))),a||(a="en_US",console.warn("cannot find language "+e+" fallback to "+a))}o=new i(a,n[a],n.en_US)}(lM.searchParams.get("locale")||navigator.language);const uM=lM.searchParams.has("key")?lM.searchParams.get("key"):xi.keys.graphhopper;!function(e,t,n){ki=new Si(e,t,n)}(xi.routingApi,xi.geocodingApi,uM||"");const cM=lM.searchParams.get("custom_model"),dM=new Oi(Ci(),cM),hM=new VE(dM);var pM;pM={settingsStore:new class extends Ai{constructor(){super({showDistanceInMiles:!1,drawAreasEnabled:!1})}reduce(e,t){if(t instanceof hi)return{...e,showDistanceInMiles:!e.showDistanceInMiles};if(t instanceof Ur){if(!t.enabled&&e.drawAreasEnabled)return{...e,drawAreasEnabled:!1}}else if(t instanceof pi)return{...e,drawAreasEnabled:t.enabled};return e}},queryStore:dM,routeStore:hM,infoStore:new WE,errorStore:new HE,mapOptionsStore:new rM,pathDetailsStore:new iM,mapFeatureStore:new class extends Ai{constructor(){super({roadAttributesCoordinate:null,roadAttributes:{},instructionCoordinate:null,instructionText:""})}reduce(e,t){return t instanceof ci?{...e,roadAttributesCoordinate:t.point,roadAttributes:t.properties}:t instanceof di?{...e,instructionCoordinate:t.coordinate,instructionText:t.text}:e}}},Ki=pM.settingsStore,$i=pM.queryStore,Yi=pM.routeStore,Qi=pM.infoStore,Ji=pM.errorStore,eo=pM.mapOptionsStore,to=pM.pathDetailsStore,no=pM.mapFeatureStore,FA=new Tv({view:new Am({enableRotation:!1,multiWorld:!1,constrainResolution:!0,center:Np([10,10]),zoom:2}),controls:Zy({zoom:!0,zoomOptions:{className:go.customZoom},attribution:!0,attributionOptions:{className:go.customAttribution,collapsible:!1}})}),FA.once("postrender",(()=>{Fr.dispatch(new ii)})),Fr.register(ro()),Fr.register(io()),Fr.register(oo()),Fr.register(so()),Fr.register(ao()),Fr.register(lo()),Fr.register(uo()),Fr.register(co());const fM=window.matchMedia("(max-width: 44rem)"),mM=new class{constructor(e,t,n){this.map=e,this.routeStore=t,this.isSmallScreenQuery=n}receive(e){const t=this.isSmallScreenQuery();if(e instanceof si)aM(this.map,e.bbox,t,[window.innerWidth,window.innerHeight]);else if(e instanceof oi)this.map.getView().animate({zoom:e.zoom,center:Np([e.coordinate.lng,e.coordinate.lat]),duration:400});else if(e instanceof Xr){const n=e.result.paths[0].bbox,r=[n[0],n[1],n[2],n[3]];e.request.points.forEach((e=>{r[0]=Math.min(e[0],r[0]),r[1]=Math.min(e[1],r[1]),r[2]=Math.max(e[0],r[2]),r[3]=Math.max(e[1],r[3])})),r[2]-r[0]<.001&&(r[0]-=5e-4,r[2]+=5e-4),r[3]-r[1]<.001&&(r[1]-=5e-4,r[3]+=5e-4),e.zoom&&aM(this.map,r,t)}else if(e instanceof Qr)aM(this.map,e.path.bbox,t);else if(e instanceof li){const n=e.bbox?e.bbox:this.routeStore.state.selectedPath.bbox;n&&aM(this.map,n,t)}else e instanceof Dr&&("[-180,-90,180,90]"===JSON.stringify(e.result.bbox)||aM(this.map,e.result.bbox,t))}}(DA(),hM,(()=>fM.matches));Fr.register(mM);const gM=new sM(io(),lo());Ci().info().then((e=>{Fr.dispatch(new Dr(e)),gM.updateStateFromUrl().then((()=>gM.startSyncingUrlWithAppState()))})).catch((e=>Fr.dispatch(new Kr(e.message))));const _M=document.createElement("div");_M.id="root",_M.style.height="100%",document.body.appendChild(_M),(0,t.s)(_M).render((0,e.jsx)((function(){const[t,n]=(0,u.useState)(ro().state),[r,i]=(0,u.useState)(io().state),[o,s]=(0,u.useState)(so().state),[a,l]=(0,u.useState)(oo().state),[c,d]=(0,u.useState)(ao().state),[h,p]=(0,u.useState)(lo().state),[f,m]=(0,u.useState)(uo().state),[g,_]=(0,u.useState)(co().state),y=DA();(0,u.useEffect)((()=>{const e=()=>n(ro().state),t=()=>i(io().state),r=()=>s(so().state),o=()=>l(oo().state),a=()=>d(ao().state),u=()=>p(lo().state),c=()=>m(uo().state),h=()=>_(co().state);return ro().register(e),io().register(t),so().register(r),oo().register(o),ao().register(a),lo().register(u),uo().register(c),co().register(h),t(),r(),o(),a(),u(),c(),h(),()=>{ro().register(e),io().deregister(t),so().deregister(r),oo().deregister(o),ao().deregister(a),lo().deregister(u),uo().deregister(c),co().deregister(h)}}),[]),function(e,t){(0,u.useEffect)((()=>(HS(e),function(e,t){if("vector"===t.type)!function(e,t,n){var r;if(void 0===n&&(n={}),r="string"==typeof e||e instanceof HTMLElement?new Tv({target:e}):e,"string"==typeof t){var i=t.startsWith("data:")?location.href:jC(t,n.accessToken);n=qC(i,n),new Promise((function(e,o){dS(t,n).then((function(t){QC(t,r,i,n).then((function(){e(r)})).catch(o)})).catch((function(e){o(new Error("Could not load "+t+": "+e.message))}))}))}else new Promise((function(e,i){QC(t,r,!n.styleUrl||n.styleUrl.startsWith("data:")?location.href:jC(n.styleUrl,n.accessToken),n).then((function(){e(r)})).catch(i)}))}(e,t.url);else{const n=t,r=new fg({source:new jg({urls:n.url,maxZoom:n.maxZoom,attributions:[n.attribution],tilePixelRatio:n.tilePixelRatio})});r.set("background-raster-layer",!0),e.addLayer(r)}}(e,t),function(e){e.on("pointermove",(function(t){const n=e.getFeaturesAtPixel(t.pixel).some((e=>e instanceof $d));e.getTargetElement().style.cursor=n?"pointer":"default"}))}(e),()=>{HS(e)})),[e,t])}(y,h.selectedStyle),function(e,t){(0,u.useEffect)((()=>{const n=new tx({declutter:!0,source:new ox({attributions:"",format:new my({featureClass:$d}),url:xi.externalMVTLayer?xi.externalMVTLayer.url:"",maxZoom:xi.externalMVTLayer?xi.externalMVTLayer.maxZoom:14}),renderMode:"vector",zIndex:.6,style:e=>function(e){const t=xi.externalMVTLayer.styles[e.get("layer")];return t?new N_({stroke:new L_({color:[...t.color,1],width:t.width}),fill:new y_({color:[...t.color,.3]})}):void 0}(e)}),r=new Yb,i=new qb({source:r,zIndex:.7,style:e=>{const t=xi.externalMVTLayer.styles[e.get("layer")];return new N_({stroke:new L_({color:[252,144,175],width:1.2*t.width})})}}),o=t=>{r.clear();const i=e.getFeaturesAtPixel(t.pixel,{layerFilter:e=>e===n,hitTolerance:5});if(i.length>0){r.addFeatures(i);const e=Bp(t.coordinate),n=i[0].getProperties();Fr.dispatch(new ci({lat:e[1],lng:e[0]},n))}else Fr.dispatch(new ci(null,{}))};return e.removeLayer(n),e.removeLayer(i),t&&(e.addLayer(n),e.addLayer(i),e.on("pointermove",o)),()=>{e.un("pointermove",o),e.removeLayer(n),e.removeLayer(i)}}),[e,t])}(y,h.externalMVTEnabled),function(e,t){(0,u.useEffect)((()=>(qA(e),"[-180,-90,180,90]"!==JSON.stringify(t)&&function(e,t){const n=new qb({source:new Yb({features:(new sy).readFeatures({type:"Feature",geometry:{type:"LineString",coordinates:[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]],[t[0],t[1]]].map((e=>Np(e)))}})}),style:new N_({stroke:new L_({color:"#AAAAAA",width:2})})});n.set(BA,!0),n.setZIndex(.1),e.addLayer(n)}(e,t),()=>{qA(e)})),[e,t])}(y,o.bbox),function(e,t,n,r){const i=(0,u.useRef)(n);(0,u.useEffect)((()=>(kE(e),i.current=n,function(e,t,n){let r=xE(n.current);if(null==r)return;const i=new N_({stroke:new L_({color:"#F97777",width:3}),fill:new y_({color:"rgba(229,229,229,0.5)"})}),o=function(e){try{return new sy({featureProjection:"EPSG:3857"}).readFeatures(e)}catch(e){return null}}(null==r?void 0:r.areas),s=new Yb({features:o||[]}),a=new qb({source:s,style:i});if(a.set(bE,!0),a.setZIndex(1),e.addLayer(a),!t)return void function(e){e.getInteractions().getArray().forEach((e=>{"gh:areas"==e.get("source")&&(e instanceof gE||e instanceof eA||e instanceof vE||e instanceof uA)&&e.setActive(!1)}))}(e);const l=new eA({source:s});l.set("source","gh:areas"),e.addInteraction(l),l.on("modifyend",(e=>{const t=xE(n.current);if(null==t)return;e.features.getArray().forEach((e=>{const n=wE(e);n.id=e.getId(),t.areas.features=t.areas.features.map((t=>t.id==e.getId()?n:t))}));const r=JSON.stringify(t,null,2);Fr.dispatch(new Zr(r,!0))}));const u=new gE({source:s,type:"Polygon"});u.set("source","gh:areas"),e.addInteraction(u),u.on("drawend",(e=>{var t;if(!e.feature)return;const r=xE(n.current);if(null==r)return;let i=0;if(null===(t=r.areas)||void 0===t?void 0:t.features){const e=r.areas.features.map((e=>e.id?parseInt(e.id.match(/\d+/)[0]):0));e.length>0&&(i=Math.max(...e))}else r.areas={type:"FeatureCollection",features:[]};const o=wE(e.feature);o.id="area"+(i+1),r.areas.features.push(o),r.priority.push({if:"in_"+o.id,multiply_by:"0"});const s=JSON.stringify(r,null,2);return Fr.dispatch(new Zr(s,!0)),!1}));const c=new vE({source:s});c.set("source","gh:areas"),e.addInteraction(c)}(e,t,i),()=>{kE(e)})),[e,t,r,n])}(y,t.drawAreasEnabled,r.customModelStr,r.customModelEnabled),function(e,t){(0,u.useEffect)((()=>{const n=new tx({declutter:!0,source:new ox({attributions:"",format:new my,url:`${xi.routingApi}mvt/{z}/{x}/{y}.mvt`}),zIndex:.5,style:(t,n)=>function(e,t){if("roads"===e.get("layer")){const n=e.get("road_class");let r="#aaa5a7",i=1;return"motorway"===n?(r="#dd504b",i=3):"primary"===n||"trunk"===n?(r="#e2a012",i=2):"secondary"===n&&(r="#f7c913",i=2),t>16?i+=3:t>15?i+=2:t>13&&(i+=1),new N_({stroke:new L_({color:r,width:i})})}}(t,e.getView().getZoomForResolution(n))}),r=new tx({renderMode:"vector",source:n.getSource(),zIndex:.6}),i=t=>{const i=e.getFeaturesAtPixel(t.pixel,{layerFilter:e=>e===n,hitTolerance:5});if(i.length>0){const e=Bp(t.coordinate),n=i[0].getProperties();r.setStyle((e=>{if(n.edge_id&&e.getProperties().edge_id===n.edge_id)return new N_({stroke:new L_({color:"red",width:5})})})),Fr.dispatch(new ci({lat:e[1],lng:e[0]},n))}else r.setStyle((()=>{})),Fr.dispatch(new ci(null,{}))};return e.removeLayer(n),e.removeLayer(r),t&&(e.addLayer(n),e.addLayer(r),e.on("pointermove",i)),()=>{Fr.dispatch(new ci(null,{})),e.un("pointermove",i),e.removeLayer(n),e.removeLayer(r)}}),[e,t])}(y,h.routingGraphEnabled),function(e,t){(0,u.useEffect)((()=>(NA(e),t&&function(e){const t=new tx({declutter:!0,source:new ox({attributions:"",format:new my,url:`${xi.routingApi}mvt/{z}/{x}/{y}.mvt?render_all=true`}),style:e=>function(e){if("roads"===e.get("layer")){const t=e.get("urban_density");let n="#0aaff1";return"residential"===t?n="#fd084a":"city"===t&&(n="#edf259"),new N_({stroke:new L_({color:n,width:2})})}}(e)});t.set(jA,!0),t.setZIndex(.6),e.addLayer(t)}(e),()=>{NA(e)})),[e,t])}(y,h.urbanDensityEnabled),function(e,t,n,r){(0,u.useEffect)((()=>(pA(e),function(e,t){const n=new N_({stroke:new L_({color:"#5B616A",width:5,lineCap:"round",lineJoin:"round"})}),r=new qb({source:new Yb({features:(new sy).readFeatures(mA(t))}),style:()=>n,opacity:.8});r.set(cA,!0),r.setZIndex(1),e.addLayer(r),function(e){e.getInteractions().getArray().filter((e=>e.get("gh:select_path_interaction"))).forEach((t=>e.removeInteraction(t)))}(e);const i=new uA({condition:iv,layers:[r],style:null,hitTolerance:5});i.on("select",(e=>{const n=e.selected[0].getProperties().index;Fr.dispatch(new Qr(t[n]))})),i.set("gh:select_path_interaction",!0),e.addInteraction(i)}(e,t.filter((e=>e!=n))),function(e,t){const n=new N_({stroke:new L_({color:"#275DAD",width:6,lineCap:"round",lineJoin:"round"})}),r=new qb({source:new Yb({features:(new sy).readFeatures(gA(t))}),style:()=>n,opacity:.8});r.set(dA,!0),r.setZIndex(2),e.addLayer(r)}(e,n),function(e,t,n){var r;const i=new N_({stroke:new L_({color:"#275DAD",width:4,lineDash:[1,10],lineCap:"round",lineJoin:"round"})}),o=new qb({source:new Yb});o.setStyle(i);for(let e=0;e<t.snapped_waypoints.coordinates.length;e++){const i=Np([n[e].coordinate.lng,n[e].coordinate.lat]),s=Np(t.snapped_waypoints.coordinates[e]);null===(r=o.getSource())||void 0===r||r.addFeature(new $d(fA(i,s)))}o.set(hA,!0),o.setZIndex(1),e.addLayer(o)}(e,n,r),()=>{pA(e)})),[e,t,n])}(y,a.routingResult.paths,a.selectedPath,r.queryPoints),function(e,t){(0,u.useEffect)((()=>{iA(e);const n=function(e,t){const n=t.map(((e,t)=>({index:t,point:e}))).filter((e=>e.point.isInitialized)).map(((e,t)=>{const n=new $d({geometry:new im(Np([e.point.coordinate.lng,e.point.coordinate.lat]))});return n.set("gh:query_point",e.point),n.set("gh:marker_props",{color:e.point.color,number:e.point.type==Ii.Via?t:void 0,size:35}),n})),r=new qb({source:new Yb({features:n})});r.set("gh:query_points",!0),r.setZIndex(3);const i={};return r.setStyle((e=>{const t=e.get("gh:marker_props"),n=t.number+"-"+t.color+"-"+t.size;let r=i[n];return r||(r=new N_({image:new S_({src:"data:image/svg+xml;utf8,"+rA(t),displacement:[0,17.5]})}),i[n]=r,r)})),e.addLayer(r),r}(e,t);return oA(e),function(e,t){const n=new eA({hitDetection:t,source:t.getSource(),style:[]});n.on("modifystart",(t=>{e.getViewport().style.cursor="grabbing"})),n.on("modifyend",(t=>{e.getViewport().style.cursor="default";const n=t.features.getArray()[0],r=n.get("gh:query_point"),i=Bp(n.getGeometry().getCoordinates()),o={lng:i[0],lat:i[1]};Fr.dispatch(new jr({...r,coordinate:o,queryText:vi(o)},!1))})),n.set("gh:drag_query_point",!0),e.addInteraction(n)}(e,n),()=>{iA(e),oA(e)}}),[e,t])}(y,r.queryPoints),function(e,t){(0,u.useEffect)((()=>(OA(e),function(e,t){const n=new N_({stroke:new L_({color:"red",width:4,lineCap:"round",lineJoin:"round"})}),r=new qb({source:new Yb({features:(new sy).readFeatures(zA(t.pathDetailsHighlightedSegments))}),style:()=>n});r.set(LA,!0),r.setZIndex(3),e.addLayer(r)}(e,t),()=>{OA(e)})),[e,t])}(y,f);const v=(0,gs.useMediaQuery)({query:"(max-width: 44rem)"});return(0,e.jsx)(Fi.Provider,{value:t.showDistanceInMiles,children:(0,e.jsxs)("div",{className:Xi.appWrapper,children:[(0,e.jsx)(QA,{map:y,pathDetails:f,mapFeatures:g}),(0,e.jsx)(RA,{map:y,route:a,queryPoints:r.queryPoints}),v?(0,e.jsx)(GE,{query:r,route:a,map:y,mapOptions:h,error:c,encodedValues:o.encoded_values,drawAreas:t.drawAreasEnabled}):(0,e.jsx)(qE,{query:r,route:a,map:y,mapOptions:h,error:c,encodedValues:o.encoded_values,drawAreas:t.drawAreasEnabled})]})})}),{}))})()})();
|