@graphhopper/graphhopper-maps-bundle 0.0.0-e409a24c23ba83383e5550a7068ad70aea00f9eb → 0.0.0-e4b03f99

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.
Files changed (72) hide show
  1. package/README.md +30 -7
  2. package/dist/01f24e0d2b07a8c8b132.png +0 -0
  3. package/dist/assets/android-chrome-144x144.png +0 -0
  4. package/dist/assets/android-chrome-192x192.png +0 -0
  5. package/dist/assets/android-chrome-256x256.png +0 -0
  6. package/dist/assets/android-chrome-36x36.png +0 -0
  7. package/dist/assets/android-chrome-384x384.png +0 -0
  8. package/dist/assets/android-chrome-48x48.png +0 -0
  9. package/dist/assets/android-chrome-512x512.png +0 -0
  10. package/dist/assets/android-chrome-72x72.png +0 -0
  11. package/dist/assets/android-chrome-96x96.png +0 -0
  12. package/dist/assets/apple-touch-icon-1024x1024.png +0 -0
  13. package/dist/assets/apple-touch-icon-114x114.png +0 -0
  14. package/dist/assets/apple-touch-icon-120x120.png +0 -0
  15. package/dist/assets/apple-touch-icon-144x144.png +0 -0
  16. package/dist/assets/apple-touch-icon-152x152.png +0 -0
  17. package/dist/assets/apple-touch-icon-167x167.png +0 -0
  18. package/dist/assets/apple-touch-icon-180x180.png +0 -0
  19. package/dist/assets/apple-touch-icon-57x57.png +0 -0
  20. package/dist/assets/apple-touch-icon-60x60.png +0 -0
  21. package/dist/assets/apple-touch-icon-72x72.png +0 -0
  22. package/dist/assets/apple-touch-icon-76x76.png +0 -0
  23. package/dist/assets/apple-touch-icon-precomposed.png +0 -0
  24. package/dist/assets/apple-touch-icon.png +0 -0
  25. package/dist/assets/favicon-16x16.png +0 -0
  26. package/dist/assets/favicon-32x32.png +0 -0
  27. package/dist/assets/favicon-48x48.png +0 -0
  28. package/dist/assets/favicon.ico +0 -0
  29. package/dist/assets/mstile-144x144.png +0 -0
  30. package/dist/assets/mstile-150x150.png +0 -0
  31. package/dist/assets/mstile-310x150.png +0 -0
  32. package/dist/assets/mstile-310x310.png +0 -0
  33. package/dist/assets/mstile-70x70.png +0 -0
  34. package/dist/bundle.b5823dbf6b7de7d39b76.js +2 -0
  35. package/dist/{bundle.js.LICENSE.txt → bundle.b5823dbf6b7de7d39b76.js.LICENSE.txt} +17 -15
  36. package/dist/ceb05254cedfa895b512.ttf +0 -0
  37. package/dist/config.js +1 -1
  38. package/dist/eae34fa8f1e0c4c6d797.ttf +0 -0
  39. package/dist/fc2b5060f7accec5cf74.ttf +0 -0
  40. package/dist/fc3d2f2e3a203d0037c1.ttf +0 -0
  41. package/dist/index.html +6 -2
  42. package/dist/manifest.json +21 -0
  43. package/package.json +1 -1
  44. package/dist/assets/apple-touch-startup-image-1125x2436.png +0 -0
  45. package/dist/assets/apple-touch-startup-image-1136x640.png +0 -0
  46. package/dist/assets/apple-touch-startup-image-1170x2532.png +0 -0
  47. package/dist/assets/apple-touch-startup-image-1242x2208.png +0 -0
  48. package/dist/assets/apple-touch-startup-image-1242x2688.png +0 -0
  49. package/dist/assets/apple-touch-startup-image-1284x2778.png +0 -0
  50. package/dist/assets/apple-touch-startup-image-1334x750.png +0 -0
  51. package/dist/assets/apple-touch-startup-image-1536x2048.png +0 -0
  52. package/dist/assets/apple-touch-startup-image-1620x2160.png +0 -0
  53. package/dist/assets/apple-touch-startup-image-1668x2224.png +0 -0
  54. package/dist/assets/apple-touch-startup-image-1668x2388.png +0 -0
  55. package/dist/assets/apple-touch-startup-image-1792x828.png +0 -0
  56. package/dist/assets/apple-touch-startup-image-2048x1536.png +0 -0
  57. package/dist/assets/apple-touch-startup-image-2048x2732.png +0 -0
  58. package/dist/assets/apple-touch-startup-image-2160x1620.png +0 -0
  59. package/dist/assets/apple-touch-startup-image-2208x1242.png +0 -0
  60. package/dist/assets/apple-touch-startup-image-2224x1668.png +0 -0
  61. package/dist/assets/apple-touch-startup-image-2388x1668.png +0 -0
  62. package/dist/assets/apple-touch-startup-image-2436x1125.png +0 -0
  63. package/dist/assets/apple-touch-startup-image-2532x1170.png +0 -0
  64. package/dist/assets/apple-touch-startup-image-2688x1242.png +0 -0
  65. package/dist/assets/apple-touch-startup-image-2732x2048.png +0 -0
  66. package/dist/assets/apple-touch-startup-image-2778x1284.png +0 -0
  67. package/dist/assets/apple-touch-startup-image-640x1136.png +0 -0
  68. package/dist/assets/apple-touch-startup-image-750x1334.png +0 -0
  69. package/dist/assets/apple-touch-startup-image-828x1792.png +0 -0
  70. package/dist/assets/yandex-browser-50x50.png +0 -0
  71. package/dist/assets/yandex-browser-manifest.json +0 -9
  72. package/dist/bundle.js +0 -2
package/dist/bundle.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see bundle.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),h=new URL(n(6050),n.b),d=new URL(n(1090),n.b),p=new URL(n(6192),n.b),f=s()(i()),g=l()(u),m=l()(c),y=l()(h),v=l()(d),_=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("+g+");\n}\n\n.CodeMirror-lint-mark-error {\n background-image: url("+m+");\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("+y+");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n background-image: url("+v+");\n}\n\n.CodeMirror-lint-marker-multiple {\n background-image: url("+_+");\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},1055:(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},6431:(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(9994),n.b),c=new URL(n(8633),n.b),h=s()(i()),d=l()(u),p=l()(c);h.push([e.id,".heightgraph-container {\n background-color: rgba(250,250,250,.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, .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("+d+") 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-hover {\n cursor: pointer;\n}\n\n.legend-text {\n fill: #000;\n font-size: 10px;\n cursor: pointer;\n}\n\n.tick, .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",""]);const f=h},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},6718:(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,".q_kT5WMd9udchozNJlZr {\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n display: grid;\n grid-template-columns: 25rem 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.fOXO82gMC4hOgam0cJSy {\n grid-column: 1 / span 3;\n grid-row: 1 / span 1;\n}\n\n.j8hT5hPrAp23jBq33rWL {\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.qd4NFogg84XQE8c8hkH9 {\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.jP8_HhcWiju8R65rmoVL {\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.vUJODfAL4oeiSMQD6gLZ {\n grid-column: 3 / span 1;\n grid-row: 1 / span 1;\n align-self: start;\n z-index: 1;\n display: flex;\n margin: 0.5rem;\n padding: 0.5rem;\n background-color: white;\n border-radius: 0.5rem;\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);\n}\n\n.Kh7EL29e7Lsbvljx1Pmb {\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 0.5rem 1.5rem 0;\n pointer-events: none;\n}\n\n.QLeGcrqm_XosygpFBQsq {\n grid-row: 1 / span 3;\n grid-column: 1 / span 1;\n}\n\n.Y2YStLqBk0Ztuoe7o7w0 {\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.Jx5JUkckWSBSz4HKACK2 {\n grid-row: 2 / span 1;\n grid-column: 1 / span 1;\n justify-self: end;\n z-index: 1;\n background-color: transparent;\n pointer-events: none;\n}\n\n.mci2Zj15lHsiwdQ1ZecX {\n background-color: white;\n border-radius: 0.5rem;\n padding: 0.5rem;\n margin: 0.5rem;\n pointer-events: all;\n}\n\n.Bj2Mvobenr5pb_5tCvVq {\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.KkhGqhNDXeD2btHHGEPK {\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 .q_kT5WMd9udchozNJlZr {\n grid-template-columns: 100%;\n grid-template-rows: auto 0 1fr auto auto;\n }\n}\n",""]),s.locals={appWrapper:"q_kT5WMd9udchozNJlZr",map:"fOXO82gMC4hOgam0cJSy",sidebar:"j8hT5hPrAp23jBq33rWL",popupContainer:"qd4NFogg84XQE8c8hkH9",sidebarContent:"jP8_HhcWiju8R65rmoVL",mapOptions:"vUJODfAL4oeiSMQD6gLZ",pathDetails:"Kh7EL29e7Lsbvljx1Pmb",smallScreenMap:"QLeGcrqm_XosygpFBQsq",smallScreenSidebar:"Y2YStLqBk0Ztuoe7o7w0",smallScreenMapOptions:"Jx5JUkckWSBSz4HKACK2",smallScreenMapOptionsContent:"mci2Zj15lHsiwdQ1ZecX",smallScreenRoutingResult:"Bj2Mvobenr5pb_5tCvVq",smallScreenPoweredBy:"KkhGqhNDXeD2btHHGEPK"};const a=s},4245:(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,".vtJ9TRIjabzub_3dfQay {\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.vtJ9TRIjabzub_3dfQay:hover {\n cursor: pointer;\n color: #2a2b31;\n}\n\n.vtJ9TRIjabzub_3dfQay:active {\n color: lightgray;\n}\n",""]),s.locals={button:"vtJ9TRIjabzub_3dfQay"};const a=s},7406:(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,".APSjO3PVMvD1hJE5Autg {\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:"APSjO3PVMvD1hJE5Autg"};const a=s},4601:(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,".q1GtXOUECNXncBufsnbO {\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:"q1GtXOUECNXncBufsnbO"};const a=s},8737:(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.RPo5XgmSHlrhwavzfG_Y {\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.RPo5XgmSHlrhwavzfG_Y:after,\n.RPo5XgmSHlrhwavzfG_Y: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.RPo5XgmSHlrhwavzfG_Y:after {\n border-top-color: white;\n border-width: 10px;\n left: 48px;\n margin-left: -10px;\n}\n.RPo5XgmSHlrhwavzfG_Y:before {\n border-top-color: #cccccc;\n border-width: 11px;\n left: 48px;\n margin-left: -11px;\n}\n",""]),s.locals={popup:"RPo5XgmSHlrhwavzfG_Y"};const a=s},7970:(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,".ddt1nLKTnu4Vi7d3161h {\n display: flex;\n flex-direction: column;\n max-width: 11em;\n}\n\nbutton.wwH3N7sDWQ4iJV3aXSjv div {\n margin-bottom: 2px;\n padding-right: 8px;\n}\n\n.wwH3N7sDWQ4iJV3aXSjv {\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.wwH3N7sDWQ4iJV3aXSjv:hover {\n background-color: #ececec;\n}\n\n.wwH3N7sDWQ4iJV3aXSjv:active {\n background-color: #c6c6c6;\n}\n\n.wwH3N7sDWQ4iJV3aXSjv:disabled {\n color: lightgray;\n}\n",""]),s.locals={wrapper:"ddt1nLKTnu4Vi7d3161h",entry:"wwH3N7sDWQ4iJV3aXSjv"};const a=s},5639:(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,".Fy4UH5CXsl5NRUEgaDuv {\n z-index: 3;\n}\n\n.Qk3LDvrN2Fx3Vrp56YpC {\n height: 100%;\n width: 100%;\n}\n",""]),s.locals={contextMenu:"Fy4UH5CXsl5NRUEgaDuv",mapContainer:"Qk3LDvrN2Fx3Vrp56YpC"};const a=s},7092:(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,".DYcjRltc5gbNndYTeMTy {\n display: flex;\n}\n\n.pLocswSdJiZ78ZZcVB3w {\n display: flex;\n flex-direction: column;\n margin: 0.5rem;\n}\n\n.a14RvmtxeXcekVDVpDQ5 {\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n align-items: center;\n}\n\n.fL_OimgD6FTUYe9ws5_b {\n width: 1.2rem;\n height: 1.2rem;\n margin: 0.5rem;\n}\n\n.fL_OimgD6FTUYe9ws5_b svg {\n width: 100%;\n display: block;\n}\n",""]),s.locals={mapOptionsContainer:"DYcjRltc5gbNndYTeMTy",options:"pLocswSdJiZ78ZZcVB3w",option:"a14RvmtxeXcekVDVpDQ5",layerButton:"fL_OimgD6FTUYe9ws5_b"};const a=s},1428:(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,".hVnSeZJrEFIK6F47h0xl {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n\n.GKkIltRz_lOhn3vvw3zx {\n position: relative;\n pointer-events: auto;\n background-color: white;\n border-radius: 0.3rem;\n}\n",""]),s.locals={heightgraphContainer:"hVnSeZJrEFIK6F47h0xl",innerDiv:"GKkIltRz_lOhn3vvw3zx"};const a=s},6218:(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,".V1kjzdMzmZIx3OCLd9h9 {\n margin: 0.6em 0;\n padding: 0 0;\n border-top: lightgray solid 1px;\n height: 18rem;\n}\n\n#_VmLb7Kw26u3587tyLU5::-webkit-scrollbar {\n display: none;\n}\n\n.QuHD2Qaw3cz6pCYhH_5T {\n display: flex;\n border-bottom: lightgray solid 1px;\n}\n\n.eAK1C3Ea5ZvRG0hma7P0 {\n text-decoration: none;\n flex-grow: 1;\n}\n\n.fW_i66g138rGuxSuC1nw,\n.eAK1C3Ea5ZvRG0hma7P0,\n.LBT2pllUrn07K3M8pioX button {\n font-family: Arial, serif;\n font-size: 14px;\n}\n\n.fW_i66g138rGuxSuC1nw {\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.fW_i66g138rGuxSuC1nw option {\n background-color: white;\n color: rgba(0, 60, 136, 0.7);\n}\n\n/* show disabled button while route calculation */\n.rsrewjIL7ecQyGpbEcVH button,\n.mDdeNmMja8Yr9GztXfRs button {\n cursor: default !important;\n color: lightgray !important;\n}\n\n.T0zKND70vjbdX0_YVZ_3 {\n animation: I83HdeuoPOpr9gRN5wCJ 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 I83HdeuoPOpr9gRN5wCJ {\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.eAK1C3Ea5ZvRG0hma7P0:hover {\n color: black;\n}\n\n.eAK1C3Ea5ZvRG0hma7P0,\n.fW_i66g138rGuxSuC1nw {\n cursor: pointer;\n color: #5b616a;\n}\n\n.LBT2pllUrn07K3M8pioX button {\n background-color: rgb(124, 179, 66, 0.1);\n}\n\n.LBT2pllUrn07K3M8pioX button,\n.eAK1C3Ea5ZvRG0hma7P0 {\n padding: 0.8em 1.7em;\n}\n",""]),s.locals={customModelBox:"V1kjzdMzmZIx3OCLd9h9",element:"_VmLb7Kw26u3587tyLU5",customModelBoxBottomBar:"QuHD2Qaw3cz6pCYhH_5T",helpLink:"eAK1C3Ea5ZvRG0hma7P0",examples:"fW_i66g138rGuxSuC1nw",applyButton:"LBT2pllUrn07K3M8pioX",applyButtonProgress:"rsrewjIL7ecQyGpbEcVH",applyButtonInvalid:"mDdeNmMja8Yr9GztXfRs",infiniteProgressBar:"T0zKND70vjbdX0_YVZ_3",progress:"I83HdeuoPOpr9gRN5wCJ"};const a=s},7984:(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,".sT7mSpDJFBGNvKgKAGwS {\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.FdzKN92A2KQQctU5wV4X {\n font-size: smaller;\n word-break: break-word;\n max-width: 90%;\n user-select: all;\n}\n\n.rcBDa2NJjP3Lh0aFSFJh {\n width: 0.8rem;\n color: white;\n align-self: flex-start;\n flex-shrink: 0;\n}\n\n.rcBDa2NJjP3Lh0aFSFJh svg {\n width: 100%;\n}\n",""]),s.locals={errorMessageContainer:"sT7mSpDJFBGNvKgKAGwS",errorMessage:"FdzKN92A2KQQctU5wV4X",errorMessageCloseBtn:"rcBDa2NJjP3Lh0aFSFJh"};const a=s},6820:(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,".NmmQhpQV0oKRzD5GW5Ne {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.gTENAVP1fij9UCtgLCLA {\n pointer-events: all; /* we want all the content to behave normally*/\n background-color: white;\n}\n\n.KtFf1T1cZh3TmPhlYZ4Z {\n height: 100%;\n}\n\n.lOl39aPc0HpIQ7Gh1NTK {\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n padding: 0.5rem;\n}\n\n.xSYg6dcNW9d8EAuH_fYk {\n flex-grow: 1;\n}\n\n.Hj0Nrt44Jfm5H5ji7t0c {\n display: flex;\n flex-direction: column;\n padding: 0.25rem 0.5rem;\n border: 1px black solid;\n margin: 0.5rem;\n border-radius: 0.2rem;\n}\n\n.Vf6SYl7sFXpby_vNJgFt {\n display: flex;\n flex-direction: row;\n}\n\n.KkWbod6GAF7ABERgPWeM {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: #5b616a;\n}\n\n.Dxy1s_NPAwvAsqLqxpV9 {\n font-size: large;\n font-weight: bold;\n color: inherit;\n}\n\n.k3q9wwpqOILTSzlxHhm7 {\n font-size: small;\n}\n\n.jv2ezCTzlpGyf56vXRwR {\n align-self: center;\n justify-self: center;\n width: 0.6rem;\n margin-right: 0.5rem;\n flex-shrink: 0;\n}\n\n.jv2ezCTzlpGyf56vXRwR > svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.VMEtahbPoz9OkIeAU3pP {\n display: flex;\n flex-direction: column;\n}\n\n.Alj5hJbLKVH0D5sVdWxl {\n width: 1rem;\n margin: 0.5rem;\n align-self: flex-end;\n}\n",""]),s.locals={sidebar:"NmmQhpQV0oKRzD5GW5Ne",background:"gTENAVP1fij9UCtgLCLA",fullHeight:"KtFf1T1cZh3TmPhlYZ4Z",addressSearch:"lOl39aPc0HpIQ7Gh1NTK",addressInputContainer:"xSYg6dcNW9d8EAuH_fYk",mapView:"Hj0Nrt44Jfm5H5ji7t0c",mapViewPoint:"Vf6SYl7sFXpby_vNJgFt",queryPointText:"KkWbod6GAF7ABERgPWeM",queryPointTextTo:"Dxy1s_NPAwvAsqLqxpV9",queryPointTextVia:"k3q9wwpqOILTSzlxHhm7",markerContainer:"jv2ezCTzlpGyf56vXRwR",btnCloseContainer:"VMEtahbPoz9OkIeAU3pP",btnClose:"Alj5hJbLKVH0D5sVdWxl"};const a=s},3861:(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,".oujwcLH9HTmG0b_I6Co2 {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 0.3rem;\n font-size: x-small;\n}\n\n@media {\n .oujwcLH9HTmG0b_I6Co2 {\n padding: 0.1rem;\n }\n}\n\n.vQ_Bnbkx9prAyfcuNAbC {\n width: 7rem;\n display: flex;\n}\n",""]),s.locals={poweredByContainer:"oujwcLH9HTmG0b_I6Co2",logoContainer:"vQ_Bnbkx9prAyfcuNAbC"};const a=s},7049:(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,'.rnBAFlnLfBmxxhPIVIor {\n border-bottom: 1px lightgray solid;\n}\n\n.ns5p5DMYkmHxzEFGCEAT {\n padding: 1rem 0;\n border-left: white solid 0.25rem;\n}\n\n.ns5p5DMYkmHxzEFGCEAT:hover .BVWRawvSKxjG86rLu2ll {\n border-left: lightgray solid 0.25rem;\n padding: 0 1rem 0 15px;\n}\n\n.BVWRawvSKxjG86rLu2ll {\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.FxaeXJtOSjrGxXMgNOMQ {\n border-left: #275dad solid 0.25rem !important;\n padding: 0 1rem 0 15px;\n}\n\n.hhIjTiclndNNH1TX6hcS {\n cursor: pointer;\n width: 50%;\n\n display: flex;\n flex-direction: column;\n}\n\n.Q6EH5iMRh0gtiie3OKQc {\n font-size: large;\n font-weight: bold;\n margin-bottom: 0.1rem;\n}\n\n.FYekzl3rZwF4B5O67EB0,\n.l2ASXmYR4da65zO4bLqD div,\n.oBXjI_9QdeZf4gSGGYiD {\n color: #5b616a;\n}\n\n.FHXtAg0gIxxNvou372BZ {\n color: #5b616a;\n font-size: 12px;\n}\n\n.myXv9V5zPUfMFZoZgqME,\n.l2ASXmYR4da65zO4bLqD {\n padding-top: 1px; /* correction for "height: auto" of svg */\n}\n\n.myXv9V5zPUfMFZoZgqME div,\n.fPuaaIaKe9rWmjJMY289 div,\n.l2ASXmYR4da65zO4bLqD div {\n color: #5b616a;\n font-size: 12px;\n float: left;\n padding-top: 0.15em;\n padding-left: 0.5em;\n}\n\n.myXv9V5zPUfMFZoZgqME svg,\n.fPuaaIaKe9rWmjJMY289 svg,\n.l2ASXmYR4da65zO4bLqD svg {\n float: left;\n width: 1.2em;\n height: auto;\n}\n\n.l2ASXmYR4da65zO4bLqD:active div,\n.myXv9V5zPUfMFZoZgqME:active div,\n.fPuaaIaKe9rWmjJMY289:active div {\n color: lightgray;\n}\n\n.myXv9V5zPUfMFZoZgqME:active svg path,\n.l2ASXmYR4da65zO4bLqD:active svg path,\n.fPuaaIaKe9rWmjJMY289:active svg path {\n fill: lightgray;\n}\n\n.l2ASXmYR4da65zO4bLqD:hover div,\n.myXv9V5zPUfMFZoZgqME:hover div,\n.fPuaaIaKe9rWmjJMY289:hover div {\n color: black;\n}\n\n.myXv9V5zPUfMFZoZgqME:hover svg path,\n.l2ASXmYR4da65zO4bLqD:hover svg path,\n.fPuaaIaKe9rWmjJMY289:hover svg path {\n fill: black;\n}\n\n.myXv9V5zPUfMFZoZgqME svg path,\n.l2ASXmYR4da65zO4bLqD svg path {\n fill: #5b616a;\n stroke: #5b616a;\n}\n\n.XOrqA2NDgl5emOnCLNlQ {\n margin: 1.08rem 1rem;\n}\n\n.u9T08ToHmhbghoIRw76J {\n height: 1.25rem;\n width: 7rem;\n background-color: lightgray;\n margin-bottom: 0.5rem;\n border-radius: 0.2rem;\n animation-name: oZeQP67dynKLo7LWmq8H;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n}\n\n._DuyLfrPs59CwglQ2S3G {\n height: 1rem;\n width: 5rem;\n margin-bottom: 0;\n animation-delay: 0.25s;\n}\n\n@keyframes oZeQP67dynKLo7LWmq8H {\n from {\n opacity: 0.5;\n }\n to {\n opacity: 1;\n }\n}\n\n.hyAtvUblABk1IQDsfw8B div {\n padding: 0 1.5em 0.2em 1.4em;\n}\n\n.hyAtvUblABk1IQDsfw8B div {\n font-size: small;\n color: #f97777;\n}\n\n.hyAtvUblABk1IQDsfw8B {\n padding-bottom: 1em;\n}\n',""]),s.locals={resultRow:"rnBAFlnLfBmxxhPIVIor",resultSelectableArea:"ns5p5DMYkmHxzEFGCEAT",resultSummary:"BVWRawvSKxjG86rLu2ll",selectedResultSummary:"FxaeXJtOSjrGxXMgNOMQ",resultValues:"hhIjTiclndNNH1TX6hcS",resultMainText:"Q6EH5iMRh0gtiie3OKQc",resultSecondaryText:"FYekzl3rZwF4B5O67EB0",exportButton:"l2ASXmYR4da65zO4bLqD",elevationHint:"oBXjI_9QdeZf4gSGGYiD",resultTertiaryText:"FHXtAg0gIxxNvou372BZ",detailsButton:"myXv9V5zPUfMFZoZgqME",detailsButtonExpanded:"fPuaaIaKe9rWmjJMY289",placeholderContainer:"XOrqA2NDgl5emOnCLNlQ",placeholderMain:"u9T08ToHmhbghoIRw76J",pulse:"oZeQP67dynKLo7LWmq8H",placeholderSecondary:"_DuyLfrPs59CwglQ2S3G",routeHints:"hyAtvUblABk1IQDsfw8B"};const a=s},3266:(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,".ImebIylYACNb8Fq3EfvP {\n}\n\n.ZsnKv4cu3FV33fjn0Xld {\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: 3rem auto;\n align-items: center;\n}\n\n.i3ZyBdJKckilbcln5CKW {\n grid-row: 1 / span 2;\n justify-self: center;\n align-self: center;\n height: 1.5rem;\n}\n\n.i3ZyBdJKckilbcln5CKW > svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.p6AHLJ6yuiQD8tgsdh0P {\n margin-top: 1rem;\n}\n\n.jm34NfrOIuJdt6kAoujT {\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:"ImebIylYACNb8Fq3EfvP",instruction:"ZsnKv4cu3FV33fjn0Xld",sign:"i3ZyBdJKckilbcln5CKW",mainText:"p6AHLJ6yuiQD8tgsdh0P",distance:"jm34NfrOIuJdt6kAoujT"};const a=s},557:(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,".gsqdc2uMxzynfsV4gjMB {\n position: relative;\n}\n\n.QRZ4v7CCyIPB_9Bx1RYg {\n display: none;\n}\n\n.U9hg9dtVbR9N4aUvQAG8 {\n display: grid;\n grid-template-columns: 1fr auto;\n grid-gap: 0;\n}\n\n.Sq7cqEmcVxJYmknzRAoN {\n box-sizing: border-box;\n width: 100%;\n padding: 0.25rem 0.5rem;\n font-size: 1rem;\n border: 1px solid #5b616a;\n border-radius: 0.2rem;\n -webkit-appearance: none;\n}\n\n@media (max-width: 44rem) {\n .s3akjMY7p0pF14XeTOBO {\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 .s3akjMY7p0pF14XeTOBO .U9hg9dtVbR9N4aUvQAG8 {\n grid-gap: 0.5rem;\n }\n\n .s3akjMY7p0pF14XeTOBO .QRZ4v7CCyIPB_9Bx1RYg {\n display: flex;\n align-self: stretch;\n justify-self: stretch;\n align-items: center;\n }\n}\n\n.kNFBBjGEXaAE6XRYVX9M {\n padding-top: 3px;\n margin-top: -5px;\n border-top: dashed gray 2px;\n}\n\n.OFUiAEXzbV2d61WKYwEF {\n padding-bottom: 3px;\n margin-bottom: -5px;\n border-bottom: dashed gray 2px;\n}\n",""]),s.locals={container:"gsqdc2uMxzynfsV4gjMB",btnClose:"QRZ4v7CCyIPB_9Bx1RYg",inputContainer:"U9hg9dtVbR9N4aUvQAG8",input:"Sq7cqEmcVxJYmknzRAoN",fullscreen:"s3akjMY7p0pF14XeTOBO",topBorder:"kNFBBjGEXaAE6XRYVX9M",bottomBorder:"OFUiAEXzbV2d61WKYwEF"};const a=s},1248:(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,".xQ3D_pFTHhMaUdgYeByw:not(:last-child) {\n border-bottom: 1px lightgray solid;\n}\n\n.z7WdRwzCAU2lGa_1rfeu {\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.AMZ1Jehmhz2MVBcEQd7t,\n.z7WdRwzCAU2lGa_1rfeu:hover {\n background-color: #ececec;\n}\n\n.z7WdRwzCAU2lGa_1rfeu:active {\n background-color: #c6c6c6;\n}\n\n.pe9HhtvNcaZOsP5oT3e2 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5rem;\n margin: 0.5rem 0.5rem;\n}\n\n.ASu5zf7FRLN5O0po0NrW {\n width: 1.2rem;\n}\n\n.ASu5zf7FRLN5O0po0NrW > svg {\n height: 100%;\n width: 100%;\n}\n\n.W4_qhHaJb52H2jirIP7r {\n padding: 0.5em 0em;\n}\n\n.GETCXIg8RjjqUQK55M9J {\n display: flex;\n flex-direction: column;\n text-align: start;\n margin: 0.4rem 0.5rem;\n}\n\n.zKLhjBdKPQtZV4jaEjmo {\n font-weight: bold;\n}\n\n.oq6_FSKENJAxVz7GXSJn,\n.Nu6h7RqyCSnMPIAcOCGk {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n font-size: small;\n color: #5b616a;\n}\n",""]),s.locals={autocompleteItem:"xQ3D_pFTHhMaUdgYeByw",selectableItem:"z7WdRwzCAU2lGa_1rfeu",highlightedItem:"AMZ1Jehmhz2MVBcEQd7t",currentLocationEntry:"pe9HhtvNcaZOsP5oT3e2",currentLocationIcon:"ASu5zf7FRLN5O0po0NrW",moreResultsEntry:"W4_qhHaJb52H2jirIP7r",geocodingEntry:"GETCXIg8RjjqUQK55M9J",mainText:"zKLhjBdKPQtZV4jaEjmo",moreResultsText:"oq6_FSKENJAxVz7GXSJn",secondaryText:"Nu6h7RqyCSnMPIAcOCGk"};const a=s},9292:(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,".ZyeefeOgdKopZAVXvZ27 {\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:"ZyeefeOgdKopZAVXvZ27"};const a=s},6042:(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,".tb0BV5_lCyeE2I1MApYE {\n margin: 0.1rem 0.5rem 0.5rem 0.5rem;\n}\n\n.B2w9MWbw0dwcg7CJRBha {\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.Ixvef2zO0J5Y6cBOYkOb {\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.Jk805a7DDlAztx4WXNSy {\n grid-column: 2 / span 2;\n}\n\n.Jvo0BF82Fk2_Sq1VEBLY {\n grid-column: 4;\n width: 1rem;\n color: #adadad;\n justify-self: center;\n}\n\n.M_SQkdEtm41My0IXllvS {\n grid-column: 1 / span 1;\n align-self: center;\n justify-self: center;\n width: 1rem;\n}\n\n.M_SQkdEtm41My0IXllvS > svg {\n height: 100%;\n width: 100%;\n}\n\n.L5m9WrFXzzIAAwTXjeHQ {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin: 1rem 0;\n}\n\n.QGfN0FsxXxHFFqV6CdAD {\n grid-column: 1 / span 3;\n}\n\n.IJMEr0mofcX6DEydiDZS {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-right: 2px;\n padding-bottom: 1rem;\n}\n\n.QtBVq7vhXtqq2nEPzZNc:hover path {\n fill: black;\n}\n\n.QtBVq7vhXtqq2nEPzZNc svg {\n color: #adadad;\n width: 1.1rem;\n padding: 0 1.25em 0 0;\n}\n\n.QtBVq7vhXtqq2nEPzZNc {\n display: flex;\n flex-direction: row;\n}\n\n.QtBVq7vhXtqq2nEPzZNc,\n.NKckyjNy98cJB_AGlgL1 {\n font-size: 14px;\n}\n\n.M_SQkdEtm41My0IXllvS:hover svg {\n fill: black !important;\n}\n\n.M_SQkdEtm41My0IXllvS,\n.wDWVe5Zn9LB35M3JjfLC,\n.epsdZsmnsryfJte7w407 {\n grid-column: 1 / span 1;\n align-self: center;\n justify-self: center;\n width: 1rem;\n}\n\n.M_SQkdEtm41My0IXllvS {\n outline: none;\n}\n\n.epsdZsmnsryfJte7w407:hover svg {\n fill: black;\n}\n\n.epsdZsmnsryfJte7w407:active svg {\n fill: lightgray;\n}\n\n.M_SQkdEtm41My0IXllvS > svg,\n.epsdZsmnsryfJte7w407 > svg {\n height: 100%;\n width: 100%;\n}\n\n.wDWVe5Zn9LB35M3JjfLC {\n margin-left: -4px;\n}\n\n.epsdZsmnsryfJte7w407 > svg {\n transform: scaleX(1.7) scaleY(1.5);\n margin-left: 3px;\n fill: gray;\n}\n\n.Cp4ouMqNv1osE4qFyqQ7 > svg {\n fill: black;\n}\n\n.ZOsjL0uMCXzHRXy3U31w {\n visibility: hidden;\n}\n",""]),s.locals={searchBoxParent:"tb0BV5_lCyeE2I1MApYE",searchBox:"B2w9MWbw0dwcg7CJRBha",searchBoxScrollable:"Ixvef2zO0J5Y6cBOYkOb",searchBoxInput:"Jk805a7DDlAztx4WXNSy",removeSearchBox:"Jvo0BF82Fk2_Sq1VEBLY",markerContainer:"M_SQkdEtm41My0IXllvS",searchOptions:"L5m9WrFXzzIAAwTXjeHQ",geocodingResults:"QGfN0FsxXxHFFqV6CdAD",lastSearchLine:"IJMEr0mofcX6DEydiDZS",addSearchBox:"QtBVq7vhXtqq2nEPzZNc",mikm:"NKckyjNy98cJB_AGlgL1",markerSelected:"wDWVe5Zn9LB35M3JjfLC",markerTarget:"epsdZsmnsryfJte7w407",dropPreview:"Cp4ouMqNv1osE4qFyqQ7",hide:"ZOsjL0uMCXzHRXy3U31w"};const a=s},9558:(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,".V9cVex8XnlCYmagTeB0Y {\n display: flex;\n flex-direction: row;\n padding: 0.6em 0 0 0;\n}\n\n.qgY6zn0r6XNYSUHmJI0A {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n padding-right: 0.5em;\n}\n\n.jc6f7fae68CuNGOiF9Ac {\n background-color: rgba(39, 93, 173, 0.2);\n color: #275dad;\n}\n\n.jc6f7fae68CuNGOiF9Ac:hover {\n color: #275dad;\n}\n\n.CJEh6f9s5CSok6mFaRka {\n border-radius: 50%;\n margin: 0.1em;\n padding: 0.3em;\n transform: scale(1.1);\n}\n\n.En7bkFmwgNF9fH1tvPwQ,\n.cEGy0brBn2KDrl2vGHtg {\n border-radius: 50%;\n}\n\n.En7bkFmwgNF9fH1tvPwQ svg path,\n.cEGy0brBn2KDrl2vGHtg svg path {\n fill: #a8a8a8;\n stroke: #a8a8a8;\n}\n\n.En7bkFmwgNF9fH1tvPwQ:active svg path,\n.cEGy0brBn2KDrl2vGHtg:active svg path {\n fill: lightgray;\n stroke: lightgray;\n}\n\n.cEGy0brBn2KDrl2vGHtg:hover svg path,\n.En7bkFmwgNF9fH1tvPwQ:hover svg path {\n fill: #000000;\n stroke: #000000;\n}\n\n.cEGy0brBn2KDrl2vGHtg:active svg path,\n.En7bkFmwgNF9fH1tvPwQ:active svg path {\n fill: lightgray;\n stroke: lightgray;\n}\n\n.En7bkFmwgNF9fH1tvPwQ svg,\n.cEGy0brBn2KDrl2vGHtg svg {\n margin: 0;\n padding: 8px;\n width: 18px;\n height: 18px;\n}\n\n.cEGy0brBn2KDrl2vGHtg svg {\n transform: rotate(0);\n animation-name: kqVeBV0S_BRY2Sv9cezC;\n animation-duration: 0.2s;\n}\n\n.En7bkFmwgNF9fH1tvPwQ svg {\n transform: rotate(180deg);\n animation-name: qJ9nJcGnS6OvkyKLSGfD;\n animation-duration: 0.2s;\n}\n\n@keyframes qJ9nJcGnS6OvkyKLSGfD {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(180deg);\n }\n}\n\n@keyframes kqVeBV0S_BRY2Sv9cezC {\n 0% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(0);\n }\n}\n",""]),s.locals={profilesParent:"V9cVex8XnlCYmagTeB0Y",profiles:"qgY6zn0r6XNYSUHmJI0A",selectedProfile:"jc6f7fae68CuNGOiF9Ac",profileBtn:"CJEh6f9s5CSok6mFaRka",enabledSettings:"En7bkFmwgNF9fH1tvPwQ",settings:"cEGy0brBn2KDrl2vGHtg",reverse_rotate:"kqVeBV0S_BRY2Sv9cezC",setting_rotate:"qJ9nJcGnS6OvkyKLSGfD"};const a=s},1852:function(e,t,n){var r;"undefined"!=typeof self&&self,e.exports=(r=n(9526),function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o=n(1),s=n.n(o),a=n(8),l=n.n(a),u=n(2),c=n(10),h=n.n(c),d=n(3),p=n(6),f=function(e){if(!e)return null;var t=Object.keys(e);return 0===t.length?null:t.reduce((function(t,n){return t[Object(u.a)(n)]=e[n],t}),{})},g=function(){var e=s.a.useRef(!1);return s.a.useEffect((function(){e.current=!0}),[]),e.current},m=function(e){var t=function(){return function(e){return e.query||Object(d.a)(e)}(e)},n=r(s.a.useState(t),2),i=n[0],o=n[1];return s.a.useEffect((function(){var e=t();i!==e&&o(e)}),[e]),i};t.a=function(e,t,n){var i=function(e){var t=s.a.useContext(p.a),n=function(){return f(e)||f(t)},i=r(s.a.useState(n),2),o=i[0],a=i[1];return s.a.useEffect((function(){var e=n();h()(o,e)||a(e)}),[e,t]),o}(t),o=m(e);if(!o)throw new Error("Invalid or missing MediaQuery!");var a=function(e,t){var n=function(){return l()(e,t||{},!!t)},i=r(s.a.useState(n),2),o=i[0],a=i[1],u=g();return s.a.useEffect((function(){return u&&a(n()),function(){o.dispose()}}),[e,t]),o}(o,i),u=function(e){var t=r(s.a.useState(e.matches),2),n=t[0],i=t[1];return s.a.useEffect((function(){var t=function(){i(e.matches)};return e.addListener(t),t(),function(){e.removeListener(t)}}),[e]),n}(a),c=g();return s.a.useEffect((function(){c&&n&&n(u)}),[u]),u}},function(e,t){e.exports=r},function(e,t,n){"use strict";function r(e){return"-"+e.toLowerCase()}var i=/[A-Z]/g,o=/^ms-/,s={};t.a=function(e){if(s.hasOwnProperty(e))return s[e];var t=e.replace(i,r);return s[e]=o.test(t)?"-"+t:t}},function(e,t,n){"use strict";var r=n(2),i=n(11);t.a=function(e){var t=[];return Object.keys(i.a.all).forEach((function(n){var i=e[n];null!=i&&t.push(function(e,t){var n=Object(r.a)(e);return"number"==typeof t&&(t="".concat(t,"px")),!0===t?n:!1===t?"not ".concat(n):"(".concat(n,": ").concat(t,")")}(n,i))})),t.join(" and ")}},function(e,t,n){"use strict";e.exports=n(13)},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(1),i=n.n(r).a.createContext();t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(17),o=n(3),s=n(6);n.d(t,"default",(function(){return i.a})),n.d(t,"useMediaQuery",(function(){return r.a})),n.d(t,"toQuery",(function(){return o.a})),n.d(t,"Context",(function(){return s.a}))},function(e,t,n){"use strict";function r(e,t,n){function r(e){s.matches=e.matches,s.media=e.media}var s=this;if(o&&!n){var a=o.call(window,e);this.matches=a.matches,this.media=a.media,a.addListener(r)}else this.matches=i(e,t),this.media=e;this.addListener=function(e){a&&a.addListener(e)},this.removeListener=function(e){a&&a.removeListener(e)},this.dispose=function(){a&&a.removeListener(r)}}var i=n(9).match,o="undefined"!=typeof window?window.matchMedia:null;e.exports=function(e,t,n){return new r(e,t,n)}},function(e,t,n){"use strict";function r(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(a),n=t[1],r=t[2],i=t[3]||"",o={};return o.inverse=!!n&&"not"===n.toLowerCase(),o.type=r?r.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],o.expressions=i.map((function(e){var t=e.match(l),n=t[1].toLowerCase().match(u);return{modifier:n[1],feature:n[2],value:t[2]}})),o}))}function i(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function o(e){var t=parseFloat(e);switch(String(e).match(h)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function s(e){var t=parseFloat(e);switch(String(e).match(c)[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}}t.match=function(e,t){return r(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var a=e.expressions.every((function(e){var n=e.feature,r=e.modifier,a=e.value,l=t[n];if(!l)return!1;switch(n){case"orientation":case"scan":return l.toLowerCase()===a.toLowerCase();case"width":case"height":case"device-width":case"device-height":a=s(a),l=s(l);break;case"resolution":a=o(a),l=o(l);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":a=i(a),l=i(l);break;case"grid":case"color":case"color-index":case"monochrome":a=parseInt(a,10)||1,l=parseInt(l,10)||0}switch(r){case"min":return l>=a;case"max":return l<=a;default:return l===a}}));return a&&!n||!a&&n}))},t.parse=r;var a=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,l=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,u=/^(?:(min|max)-)?(.+)/,c=/(em|rem|px|cm|mm|in|pt|pc)?$/,h=/(dpi|dpcm|dppx)?$/},function(e,t,n){"use strict";e.exports=function(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(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(12),a=n.n(s),l=a.a.oneOfType([a.a.string,a.a.number]),u={orientation:a.a.oneOf(["portrait","landscape"]),scan:a.a.oneOf(["progressive","interlace"]),aspectRatio:a.a.string,deviceAspectRatio:a.a.string,height:l,deviceHeight:l,width:l,deviceWidth:l,color:a.a.bool,colorIndex:a.a.bool,monochrome:a.a.bool,resolution:l},c=i({minAspectRatio:a.a.string,maxAspectRatio:a.a.string,minDeviceAspectRatio:a.a.string,maxDeviceAspectRatio:a.a.string,minHeight:l,maxHeight:l,minDeviceHeight:l,maxDeviceHeight:l,minWidth:l,maxWidth:l,minDeviceWidth:l,maxDeviceWidth:l,minColor:a.a.number,maxColor:a.a.number,minColorIndex:a.a.number,maxColorIndex:a.a.number,minMonochrome:a.a.number,maxMonochrome:a.a.number,minResolution:l,maxResolution:l},u),h={all:a.a.bool,grid:a.a.bool,aural:a.a.bool,braille:a.a.bool,handheld:a.a.bool,print:a.a.bool,projection:a.a.bool,screen:a.a.bool,tty:a.a.bool,tv:a.a.bool,embossed:a.a.bool},d=i(i({},h),c);u.type=Object.keys(h),t.a={all:d,types:h,matchers:u,features:c}},function(e,t,n){var r=n(4);e.exports=n(14)(r.isElement,!0)},function(e,t,n){"use strict";!function(){function e(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:var n=e.type;switch(n){case h:case d:case s:case l:case a:case f:return n;default:var r=n&&n.$$typeof;switch(r){case c:case p:case y:case m:case u:return r;default:return t}}case o:return t}}}function n(t){return e(t)===d}var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,_=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119,w=h,k=d,C=c,S=u,A=i,E=p,M=s,T=y,P=m,R=o,I=l,L=a,z=f,F=!1;t.AsyncMode=w,t.ConcurrentMode=k,t.ContextConsumer=C,t.ContextProvider=S,t.Element=A,t.ForwardRef=E,t.Fragment=M,t.Lazy=T,t.Memo=P,t.Portal=R,t.Profiler=I,t.StrictMode=L,t.Suspense=z,t.isAsyncMode=function(t){return F||(F=!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.")),n(t)||e(t)===h},t.isConcurrentMode=n,t.isContextConsumer=function(t){return e(t)===c},t.isContextProvider=function(t){return e(t)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(t){return e(t)===p},t.isFragment=function(t){return e(t)===s},t.isLazy=function(t){return e(t)===y},t.isMemo=function(t){return e(t)===m},t.isPortal=function(t){return e(t)===o},t.isProfiler=function(t){return e(t)===l},t.isStrictMode=function(t){return e(t)===a},t.isSuspense=function(t){return e(t)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===d||e===l||e===a||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===_||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=e}()},function(e,t,n){"use strict";function r(){return null}var i,o=n(4),s=n(15),a=n(5),l=n(16),u=Function.call.bind(Object.prototype.hasOwnProperty);i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},e.exports=function(e,t){function n(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function c(e){this.message=e,this.stack=""}function h(e){function n(n,s,l,u,h,d,p){if(u=u||_,d=d||l,p!==a){if(t){var f=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 f.name="Invariant Violation",f}if("undefined"!=typeof console){var g=u+":"+l;!r[g]&&o<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` 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."),r[g]=!0,o++)}}return null==s[l]?n?new c(null===s[l]?"The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`.":"The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(s,l,u,h,d)}var r={},o=0,s=n.bind(null,!1);return s.isRequired=n.bind(null,!0),s}function d(e){return h((function(t,n,r,i,o,s){var a=t[n];return f(a)!==e?new c("Invalid "+i+" `"+o+"` of type `"+g(a)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function p(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(p);if(null===t||e(t))return!0;var n=function(e){var t=e&&(y&&e[y]||e[v]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,i=n.call(t);if(n!==t.entries){for(;!(r=i.next()).done;)if(!p(r.value))return!1}else for(;!(r=i.next()).done;){var o=r.value;if(o&&!p(o[1]))return!1}return!0;default:return!1}}function f(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 g(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function m(e){var t=g(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}var y="function"==typeof Symbol&&Symbol.iterator,v="@@iterator",_="<<anonymous>>",b={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:h(r),arrayOf:function(e){return h((function(t,n,r,i,o){if("function"!=typeof e)return new c("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new c("Invalid "+i+" `"+o+"` of type `"+f(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<s.length;l++){var u=e(s,l,r,i,o+"["+l+"]",a);if(u instanceof Error)return u}return null}))},element:h((function(t,n,r,i,o){var s=t[n];return e(s)?null:new c("Invalid "+i+" `"+o+"` of type `"+f(s)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:h((function(e,t,n,r,i){var s=e[t];return o.isValidElementType(s)?null:new c("Invalid "+r+" `"+i+"` of type `"+f(s)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,i,o){if(!(t[n]instanceof e)){var s=e.name||_;return new c("Invalid "+i+" `"+o+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:_)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:h((function(e,t,n,r,i){return p(e[t])?null:new c("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,n,r,i,o){if("function"!=typeof e)return new c("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],l=f(s);if("object"!==l)return new c("Invalid "+i+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var h in s)if(u(s,h)){var d=e(s,h,r,i,o+"."+h,a);if(d instanceof Error)return d}return null}))},oneOf:function(e){function t(t,r,i,o,s){for(var a=t[r],l=0;l<e.length;l++)if(n(a,e[l]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===g(t)?String(t):t}));return new c("Invalid "+o+" `"+s+"` of value `"+String(a)+"` supplied to `"+i+"`, expected one of "+u+".")}return Array.isArray(e)?h(t):(i(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."),r)},oneOfType:function(e){if(!Array.isArray(e))return i("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(n)+" at index "+t+"."),r}return h((function(t,n,r,i,o){for(var s=0;s<e.length;s++)if(null==(0,e[s])(t,n,r,i,o,a))return null;return new c("Invalid "+i+" `"+o+"` supplied to `"+r+"`.")}))},shape:function(e){return h((function(t,n,r,i,o){var s=t[n],l=f(s);if("object"!==l)return new c("Invalid "+i+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var u in e){var h=e[u];if(h){var d=h(s,u,r,i,o+"."+u,a);if(d)return d}}return null}))},exact:function(e){return h((function(t,n,r,i,o){var l=t[n],u=f(l);if("object"!==u)return new c("Invalid "+i+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var h=s({},t[n],e);for(var d in h){var p=e[d];if(!p)return new c("Invalid "+i+" `"+o+"` key `"+d+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=p(l,d,r,i,o+"."+d,a);if(g)return g}return null}))}};return c.prototype=Error.prototype,b.checkPropTypes=l,b.resetWarningCache=l.resetWarningCache,b.PropTypes=b,b}},function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=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,t){for(var n,a,l=r(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))o.call(n,c)&&(l[c]=n[c]);if(i){a=i(n);for(var h=0;h<a.length;h++)s.call(n,a[h])&&(l[a[h]]=n[a[h]])}}return l}},function(e,t,n){"use strict";function r(e,t,n,r,l){for(var u in e)if(a(e,u)){var c;try{if("function"!=typeof e[u]){var h=Error((r||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.");throw h.name="Invariant Violation",h}c=e[u](t,u,r,n,null,o)}catch(e){c=e}if(!c||c instanceof Error||i((r||"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 s)){s[c.message]=!0;var d=l?l():"";i("Failed "+n+" type: "+c.message+(null!=d?d:""))}}}var i=function(){},o=n(5),s={},a=Function.call.bind(Object.prototype.hasOwnProperty);i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},r.resetWarningCache=function(){s={}},e.exports=r},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=function(e){var t=e.children,n=e.device,o=e.onChange,s=r(e,["children","device","onChange"]),a=Object(i.a)(s,n,o);return"function"==typeof t?t(a):a?t:null};var i=n(0)}]))},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 h=s[l].head;t.replaceRange("",n(h.line,h.ch-1),n(h.line,h.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 d,p=r(o,"closeBefore"),f=r(o,"triples"),g=s.charAt(c+1)==i,m=t.listSelections(),y=c%2==0,v=0;v<m.length;v++){var _,b=m[v],x=b.head,w=t.getRange(x,n(x.line,x.ch+1));if(y&&!b.empty())_="surround";else if(!g&&y||w!=i)if(g&&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;_="addFour"}else if(g){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;_="both"}else{if(!y||!(0===w.length||/\s/.test(w)||p.indexOf(w)>-1))return e.Pass;_="both"}else _=g&&h(t,x)?"both":f.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(d){if(d!=_)return e.Pass}else d=_}var C=c%2?s.charAt(c-1):i,S=c%2?i:s.charAt(c+1);t.operation((function(){if("skip"==d)l(t,1);else if("skipThree"==d)l(t,3);else if("surround"==d){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"==d?(t.replaceSelection(C+S,null),t.triggerElectric(C+S),l(t,-1)):"addFour"==d&&(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 h(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),h=!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(!h)return null;var d=">"==h.charAt(1)?1:-1;if(o&&o.strict&&d>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),f=s(e,n(t.line,l+(d>0?1:0)),d,p,o);return null==f?null:{from:n(t.line,l),to:f&&f.pos,match:f&&f.ch==h.charAt(0),forward:d>0}}function s(e,t,o,s,a){for(var l=a&&a.maxScanLineLength||1e4,u=a&&a.maxScanLines||1e3,c=[],h=i(a),d=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),p=t.line;p!=d;p+=o){var f=e.getLine(p);if(f){var g=o>0?0:f.length-1,m=o>0?f.length:-1;if(!(f.length>l))for(p==t.line&&(g=t.ch-(o<0?1:0));g!=m;g+=o){var y=f.charAt(g);if(h.test(y)&&(void 0===s||(e.getTokenTypeAt(n(p,g+1))||"")==(s||""))){var v=r[y];if(v&&">"==v.charAt(1)==o>0)c.push(y);else{if(!c.length)return{pos:n(p,g),ch:y};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 h=u[c].empty()&&o(e,u[c].head,i);if(h&&(h.match||!1!==a)&&e.getLine(h.from.line).length<=s){var d=h.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(h.from,n(h.from.line,h.from.ch+1),{className:d})),h.to&&e.getLine(h.to.line).length<=s&&l.push(e.markText(h.to,n(h.to.line,h.to.ch+1),{className:d}))}}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";function t(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(n){n=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in l)i[o]=l[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"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.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 t(this,n);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var n=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},r=window.cancelAnimationFrame||clearTimeout;function i(e){return"string"==typeof e?e:e.text}function o(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function s(t,n){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=n,this.picked=!1;var r=this,s=t.cm,a=s.getInputField().ownerDocument,l=a.defaultView||a.parentWindow,u=this.hints=a.createElement("ul");u.setAttribute("role","listbox"),u.setAttribute("aria-expanded","true"),u.id=this.id;var c=t.cm.options.theme;u.className="CodeMirror-hints "+c,this.selectedHint=n.selectedHint||0;for(var h=n.list,d=0;d<h.length;++d){var p=u.appendChild(a.createElement("li")),f=h[d],g="CodeMirror-hint"+(d!=this.selectedHint?"":" CodeMirror-hint-active");null!=f.className&&(g=f.className+" "+g),p.className=g,d==this.selectedHint&&p.setAttribute("aria-selected","true"),p.id=this.id+"-"+d,p.setAttribute("role","option"),f.render?f.render(p,n,f):p.appendChild(a.createTextNode(f.displayText||i(f))),p.hintId=d}var m=t.options.container||a.body,y=s.cursorCoords(t.options.alignWithWord?n.from:null),v=y.left,_=y.bottom,b=!0,x=0,w=0;if(m!==a.body){var k=-1!==["absolute","relative","fixed"].indexOf(l.getComputedStyle(m).position)?m:m.offsetParent,C=k.getBoundingClientRect(),S=a.body.getBoundingClientRect();x=C.left-S.left-k.scrollLeft,w=C.top-S.top-k.scrollTop}u.style.left=v-x+"px",u.style.top=_-w+"px";var A=l.innerWidth||Math.max(a.body.offsetWidth,a.documentElement.offsetWidth),E=l.innerHeight||Math.max(a.body.offsetHeight,a.documentElement.offsetHeight);m.appendChild(u),s.getInputField().setAttribute("aria-autocomplete","list"),s.getInputField().setAttribute("aria-owns",this.id),s.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var M,T=t.options.moveOnOverlap?u.getBoundingClientRect():new DOMRect,P=!!t.options.paddingForScrollbar&&u.scrollHeight>u.clientHeight+1;if(setTimeout((function(){M=s.getScrollInfo()})),T.bottom-E>0){var R=T.bottom-T.top,I=T.top-(y.bottom-y.top)-2;E-T.top<I?(R>I&&(u.style.height=(R=I)+"px"),u.style.top=(_=y.top-R)+w+"px",b=!1):u.style.height=E-T.top-2+"px"}var L,z=T.right-A;if(P&&(z+=s.display.nativeBarWidth),z>0&&(T.right-T.left>A&&(u.style.width=A-5+"px",z-=T.right-T.left-A),u.style.left=(v=Math.max(y.left-z-x,0))+"px"),P)for(var F=u.firstChild;F;F=F.nextSibling)F.style.paddingRight=s.display.nativeBarWidth+"px";s.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}(t,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:h.length,close:function(){t.close()},pick:function(){r.pick()},data:n})),t.options.closeOnUnfocus&&(s.on("blur",this.onBlur=function(){L=setTimeout((function(){t.close()}),100)}),s.on("focus",this.onFocus=function(){clearTimeout(L)})),s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),n=s.getWrapperElement().getBoundingClientRect();M||(M=s.getScrollInfo());var r=_+M.top-e.top,i=r-(l.pageYOffset||(a.documentElement||a.body).scrollTop);if(b||(i+=u.offsetHeight),i<=n.top||i>=n.bottom)return t.close();u.style.top=r+"px",u.style.left=v+M.left-e.left+"px"}),e.on(u,"dblclick",(function(e){var t=o(u,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())})),e.on(u,"click",(function(e){var n=o(u,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),t.options.completeOnSingleClick&&r.pick())})),e.on(u,"mousedown",(function(){setTimeout((function(){s.focus()}),20)}));var O=this.getSelectedHintRange();return 0===O.from&&0===O.to||this.scrollToActive(),e.signal(n,"select",h[this.selectedHint],u.childNodes[this.selectedHint]),!0}function a(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)}}t.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],o=this;this.cm.operation((function(){r.hint?r.hint(o.cm,t,r):o.cm.replaceRange(i(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),o.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(i.charAt(t.ch-1)))this.close();else{var o=this;this.debounce=n((function(){o.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;a(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 s(this,t),e.signal(t,"shown")))}},s.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(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" CodeMirror-hint-active",""),r.removeAttribute("aria-selected")),(r=this.hints.childNodes[this.selectedHint=t]).className+=" CodeMirror-hint-active",r.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",r.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},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);a(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 l={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";function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(t,r,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,r,i);function a(){var t;e.off(o,"mouseout",a),s&&((t=s).parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout((function(){n(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 i(e,t,n){for(var i in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},o)this.options[i]=o[i];for(var i in t)o.hasOwnProperty(i)?null!=t[i]&&(this.options[i]=t[i]):t.options||(this.linterOptions[i]=t[i]);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 i=n.getBoundingClientRect(),o=(i.left+i.right)/2,s=(i.top+i.bottom)/2,a=e.findMarksAt(e.coordsChar({left:o,top:s},"client")),u=[],c=0;c<a.length;++c){var h=a[c].__annotation;h&&u.push(h)}u.length&&function(e,t,n){for(var i=n.target||n.srcElement,o=document.createDocumentFragment(),s=0;s<t.length;s++){var a=t[s];o.appendChild(l(a))}r(e,n,o,i)}(e,u,t)}}(e,t)},this.waitingFor=0}var o={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function s(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 a(t,n,i,o,s){var a=document.createElement("div"),l=a;return a.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+i,o&&((l=a.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=s&&e.on(l,"mouseover",(function(e){r(t,e,n,l)})),a}function l(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 u(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(){c(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(){c(t,e)}))})):t.operation((function(){c(t,o)}))}}}function c(e,n){var r,i,o=e.state.lint;if(o){var u=o.options;s(e);for(var c=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}(n),h=0;h<c.length;++h){var d=c[h];if(d){var p=[];d=d.filter((function(e){return!(p.indexOf(e.message)>-1)&&p.push(e.message)}));for(var f=null,g=o.hasGutter&&document.createDocumentFragment(),m=0;m<d.length;++m){var y=d[m],v=y.severity;v||(v="error"),i=v,f="error"==(r=f)?r:i,u.formatAnnotation&&(y=u.formatAnnotation(y)),o.hasGutter&&g.appendChild(l(y)),y.to&&o.marked.push(e.markText(y.from,y.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+v,__annotation:y}))}o.hasGutter&&e.setGutterMarker(h,t,a(e,g,f,c[h].length>1,u.tooltips)),u.highlightLines&&e.addLineClass(h,"wrap","CodeMirror-lint-line-"+f)}}u.onUpdateLinting&&u.onUpdateLinting(n,c,e)}}function h(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){u(e)}),t.options.delay))}e.defineOption("lint",!1,(function(n,r,o){if(o&&o!=e.Init&&(s(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 a=n.getOption("gutters"),l=!1,c=0;c<a.length;++c)a[c]==t&&(l=!0);var d=n.state.lint=new i(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),u(n)}})),e.defineExtension("performLint",(function(){u(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),h=c&&+c[1],d=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),m=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),y=/Android/.test(e),v=m||y||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),_=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var k=_&&(u||d&&(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 z(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function F(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 O=function(e){e.select()};function D(e){return e.display.wrapper.ownerDocument}function N(e){return D(e).defaultView}function j(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 G(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}}m?O=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(O=function(e){try{e.select()}catch(e){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function q(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.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={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},U={origin:"*mouse"},X={origin:"+move"};function Z(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 K=[""];function Y(e){for(;K.length<=e;)K.push(Q(K)+" ");return K[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 $(){}function ee(e,t){var n;return Object.create?n=Object.create(e):($.prototype=e,n=new $),t&&B(t,n),n}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ne(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ne(e))||t.test(e):ne(e)}function ie(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function se(e){return e.charCodeAt(0)>=768&&oe.test(e)}function ae(e,t,n){for(;(n<0?t>0:t<e.length)&&se(e.charAt(t));)t+=n;return t}function le(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 ue=null;function ce(e,t,n){var r;ue=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:ue=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ue=i)}return null!=r?r:ue}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,h=[],d=0;d<c;++d)h.push((l=s.charCodeAt(d))<=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 g=h[p];"m"==g?h[p]=f:f=g}for(var m=0,y=u;m<c;++m){var v=h[m];"1"==v&&"r"==y?h[m]="n":n.test(v)&&(y=v,"r"==v&&(h[m]="R"))}for(var _=1,b=h[0];_<c-1;++_){var x=h[_];"+"==x&&"1"==b&&"1"==h[_+1]?h[_]="1":","!=x||b!=h[_+1]||"1"!=b&&"n"!=b||(h[_]=b),b=x}for(var w=0;w<c;++w){var k=h[w];if(","==k)h[w]="N";else if("%"==k){var C=void 0;for(C=w+1;C<c&&"%"==h[C];++C);for(var S=w&&"!"==h[w-1]||C<c&&"1"==h[C]?"1":"N",A=w;A<C;++A)h[A]=S;w=C-1}}for(var E=0,M=u;E<c;++E){var T=h[E];"L"==M&&"1"==T?h[E]="L":n.test(T)&&(M=T)}for(var P=0;P<c;++P)if(t.test(h[P])){var R=void 0;for(R=P+1;R<c&&t.test(h[R]);++R);for(var I="L"==(P?h[P-1]:u),L=I==("L"==(R<c?h[R]:u))?I?"L":"R":u,z=P;z<R;++z)h[z]=L;P=R-1}for(var F,O=[],D=0;D<c;)if(r.test(h[D])){var N=D;for(++D;D<c&&r.test(h[D]);++D);O.push(new o(0,N,D))}else{var j=D,B=O.length,G="rtl"==a?1:0;for(++D;D<c&&"L"!=h[D];++D);for(var V=j;V<D;)if(i.test(h[V])){j<V&&(O.splice(B,0,new o(1,j,V)),B+=G);var q=V;for(++V;V<D&&i.test(h[V]);++V);O.splice(B,0,new o(2,q,V)),B+=G,j=V}else++V;j<D&&O.splice(B,0,new o(1,j,D))}return"ltr"==a&&(1==O[0].level&&(F=s.match(/^\s+/))&&(O[0].from=F[0].length,O.unshift(new o(0,0,F[0].length))),1==Q(O).level&&(F=s.match(/\s+$/))&&(Q(O).to-=F[0].length,O.push(new o(0,c-F[0].length,c)))),"rtl"==a?O.reverse():O}}();function de(e,t){var n=e.order;return null==n&&(n=e.order=he(e.text,t)),n}var pe=[],fe=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]||pe).concat(n)}};function ge(e,t){return e._handlers&&e._handlers[t]||pe}function me(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=q(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),Ce(t)||t.codemirrorIgnore}function _e(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==q(n,t[r])&&n.push(t[r])}function be(e,t){return ge(e,t).length>0}function xe(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){we(e),ke(e)}function Ae(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),_&&e.ctrlKey&&1==t&&(t=3),t}var Me,Te,Pe=function(){if(s&&a<9)return!1;var e=P("div");return"draggable"in e||"dragDrop"in e}();function Re(e){if(null==Me){var t=P("span","​");T(e,P("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Me=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&a<8))}var n=Me?P("span","​"):P("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ie(e){if(null!=Te)return Te;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)&&(Te=r.right-n.right<3)}var Le,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)},Oe="oncopy"in(Le=P("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),De=null;var Ne={},je={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ne[e]=t}function Ge(e){if("string"==typeof e&&je.hasOwnProperty(e))e=je[e];else if(e&&"string"==typeof e.name&&je.hasOwnProperty(e.name)){var t=je[e.name];"string"==typeof t&&(t={name:t}),(e=ee(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return 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(qe.hasOwnProperty(t.name)){var i=qe[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 qe={};function We(e,t){B(t,qe.hasOwnProperty(e)?qe[e]:qe[e]={})}function He(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 Ue(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 Ze=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var 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 $e(e){if(null==e.parent)return null;for(var t=e.parent,n=q(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 et(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 tt(e,t){return t>=e.first&&t<e.first+e.size}function nt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function rt(e,t,n){if(void 0===n&&(n=null),!(this instanceof rt))return new rt(e,t,n);this.line=e,this.ch=t,this.sticky=n}function it(e,t){return e.line-t.line||e.ch-t.ch}function ot(e,t){return e.sticky==t.sticky&&0==it(e,t)}function st(e){return rt(e.line,e.ch)}function at(e,t){return it(e,t)<0?t:e}function lt(e,t){return it(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ct(e,t){if(t.line<e.first)return rt(e.first,0);var n=e.first+e.size-1;return t.line>n?rt(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?rt(e.line,t):n<0?rt(e.line,0):e}(t,Ke(e,t.line).text.length)}function ht(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ct(e,t[r]);return n}Ze.prototype.eol=function(){return this.pos>=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ze.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},Ze.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},Ze.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},Ze.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},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var dt=function(e,t){this.state=e,this.lookAhead=t},pt=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 ft(e,t,n,r){var i=[e.state.modeGen],o={};kt(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,kt(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=mt(e,$e(t)),i=t.text.length>e.options.maxHighlightLength&&He(e.doc.mode,r.state),o=ft(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 mt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new pt(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=Ke(o,a-1),u=l.stateAfter;if(u&&(!n||a+(u instanceof dt?u.lookAhead:0)<=o.modeFrontier))return a;var c=G(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}(e,t,n),s=o>r.first&&Ke(r,o-1).stateAfter,a=s?pt.fromSaved(r,s,o):new pt(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 Ze(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&vt(i,n.state);!o.eol();)_t(i,o,n.state),o.start=o.pos}function vt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ue(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function _t(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ue(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.")}pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},pt.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}},pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pt.fromSaved=function(e,t,n){return t instanceof dt?new pt(e,He(e.mode,t.state),n,t.lookAhead):new pt(e,He(e.mode,t),n)},pt.prototype.save=function(e){var t=!1!==e?He(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new dt(t,this.maxLookAhead):t};var bt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function xt(e,t,n,r){var i,o,s=e.doc,a=s.mode,l=Ke(s,(t=ct(s,t)).line),u=mt(e,t.line,n),c=new Ze(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=_t(a,c,u.state),r&&o.push(new bt(c,i,He(s.mode,u.state)));return r?o:new bt(c,i,u.state)}function wt(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 kt(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,u=0,c=null,h=new Ze(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&wt(vt(n,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(a=!1,s&&yt(e,t,r,h.pos),h.pos=t.length,l=null):l=wt(_t(n,h,r.state,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||c!=l){for(;u<h.start;)i(u=Math.min(h.start,u+5e3),c);c=l}h.start=h.pos}for(;u<h.pos;){var f=Math.min(h.pos,u+5e3);i(f,c),u=f}}var Ct=!1,St=!1;function At(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Mt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Tt(e,t){if(t.full)return null;var n=tt(e,t.from.line)&&Ke(e,t.from.line).markedSpans,r=tt(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==it(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 At(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 At(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 h=0;h<a.length;++h){var d=a[h];if(null==d.to){var p=Et(l,d.marker);p?u&&(d.to=null==p.to?null:p.to+c):d.to=i}}if(l)for(var f=0;f<l.length;++f){var g=l[f];null!=g.to&&(g.to+=c),null==g.from?Et(a,g.marker)||(g.from=c,u&&(a||(a=[])).push(g)):(g.from+=c,u&&(a||(a=[])).push(g))}a&&(a=Pt(a)),l&&l!=a&&(l=Pt(l));var m=[a];if(!u){var y,v=t.text.length-2;if(v>0&&a)for(var _=0;_<a.length;++_)null==a[_].to&&(y||(y=[])).push(new At(a[_].marker,null,null));for(var b=0;b<v;++b)m.push(y);m.push(l)}return m}function Pt(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 Rt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function It(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Lt(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=it(r.from,i.from)||Lt(e)-Lt(t);return o?-o:it(r.to,i.to)||zt(e)-zt(t)||t.id-e.id}function Ot(e,t){var n,r=St&&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 Dt(e){return Ot(e,!0)}function Nt(e){return Ot(e,!1)}function jt(e,t){var n,r=St&&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 Bt(e,t,n,r,i){var o=Ke(e,t),s=St&&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=it(u.from,n)||Lt(l.marker)-Lt(i),h=it(u.to,r)||zt(l.marker)-zt(i);if(!(c>=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?it(u.to,n)>=0:it(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?it(u.from,r)<=0:it(u.from,r)<0)))return!0}}}function Gt(e){for(var t;t=Dt(e);)e=t.find(-1,!0).line;return e}function Vt(e,t){var n=Ke(e,t),r=Gt(n);return n==r?t:$e(r)}function qt(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Wt(e,r))return t;for(;n=Nt(r);)r=n.find(1,!0).line;return $e(r)+1}function Wt(e,t){var n=St&&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&&Ht(e,t,r))return!0}}function Ht(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Ht(e,r.line,Et(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)&&Ht(e,t,i))return!0}function Ut(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=Dt(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 Zt(e){var t=e.display,n=e.doc;t.maxLine=Ke(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 Kt=function(e,t,n){this.text=e,It(this,t),this.height=n?n(this):1};function Yt(e){e.parent=null,Rt(e)}Kt.prototype.lineNo=function(){return $e(this)},xe(Kt);var Qt={},Jt={};function $t(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 en(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=nn,Ie(e.display.measure)&&(s=de(o,e.doc.direction))&&(r.addToken=rn(r.addToken,s)),r.map=[],sn(o,r,gt(e,o,t!=e.display.externalMeasured&&$e(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=F(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=F(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Re(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=F(r.pre.className,r.textClass||"")),r}function tn(e){var t=P("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function nn(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,h=e.cm.state.specialChars,d=!1;if(h.test(t)){u=document.createDocumentFragment();for(var p=0;;){h.lastIndex=p;var f=h.exec(t),g=f?f.index-p:t.length-p;if(g){var m=document.createTextNode(c.slice(p,p+g));s&&a<9?u.appendChild(P("span",[m])):u.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!f)break;p+=g+1;var y=void 0;if("\t"==f[0]){var v=e.cm.options.tabSize,_=v-e.col%v;(y=u.appendChild(P("span",Y(_),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text","\t"),e.col+=_}else"\r"==f[0]||"\n"==f[0]?((y=u.appendChild(P("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((y=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),s&&a<9?u.appendChild(P("span",[y])):u.appendChild(y),e.col+=1);e.map.push(e.pos,e.pos+1,y),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),s&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||d||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 rn(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 h=void 0,d=0;d<t.length&&!((h=t[d]).to>u&&h.from<=u);d++);if(h.to>=c)return e(n,r,i,o,s,a,l);e(n,r.slice(0,h.to-u),i,o,null,a,l),o=null,r=r.slice(h.to-u),u=h.to}}}function on(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 sn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,u,c,h,d,p=i.length,f=0,g=1,m="",y=0;;){if(y==f){l=u=c=a="",d=null,h=null,y=1/0;for(var 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)v.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&&y>x.to&&(y=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==y&&(_||(_=[])).push(w.endStyle,x.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var k in w.attributes)(d||(d={}))[k]=w.attributes[k];w.collapsed&&(!h||Ft(h.marker,w)<0)&&(h=x)}else x.from>f&&y>x.from&&(y=x.from)}if(_)for(var C=0;C<_.length;C+=2)_[C+1]==y&&(u+=" "+_[C]);if(!h||h.from==f)for(var S=0;S<v.length;++S)on(t,0,v[S]);if(h&&(h.from||0)==f){if(on(t,(null==h.to?p+1:h.to)-f,h.marker,null==h.from),null==h.to)return;h.to==f&&(h=!1)}}if(f>=p)break;for(var A=Math.min(p,y);;){if(m){var E=f+m.length;if(!h){var M=E>A?m.slice(0,A-f):m;t.addToken(t,M,s?s+l:l,c,f+M.length==y?u:"",a,d)}if(E>=A){m=m.slice(A-f),f=A;break}f=E,c=""}m=i.slice(o,o=n[g++]),s=$t(n[g++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,i.slice(o,o=n[T]),$t(n[T+1],t.cm.options))}function an(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?$e(Q(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Wt(e,t)}function ln(e,t,n){for(var r,i=[],o=t;o<n;o=r){var s=new an(e.doc,Ke(e.doc,o),o);r=o+s.size,i.push(s)}return i}var un=null;var cn=null;function hn(e,t){var n=ge(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);un?r=un.delayedCallbacks:cn?r=cn:(r=cn=[],setTimeout(dn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},s=0;s<n.length;++s)o(s)}}function dn(){var e=cn;cn=null;for(var t=0;t<e.length;++t)e[t]()}function pn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?mn(e,t):"gutter"==o?vn(e,t,n,r):"class"==o?yn(e,t):"widget"==o&&_n(e,t,r)}t.changes=null}function fn(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):en(e,t)}function mn(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=fn(t);t.background=r.insertBefore(P("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?fn(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=fn(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=fn(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",nt(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 _n(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);xn(e,t,n)}function bn(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),xn(e,t,r),t.node}function xn(e,t,n){if(wn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)wn(e,t.rest[r],t,n,!1)}function wn(e,t,n,r,i){if(t.widgets)for(var o=fn(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"),kn(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 kn(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 Cn(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 Sn(e,t){for(var n=Ae(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 An(e){return e.lineSpace.offsetTop}function En(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Mn(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 Tn(e){return 50-e.display.nativeBarWidth}function Pn(e){return e.display.scroller.clientWidth-Tn(e)-e.display.barWidth}function Rn(e){return e.display.scroller.clientHeight-Tn(e)-e.display.barHeight}function In(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($e(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Ln(e,t,n,r){return On(e,Fn(e,t),n,r)}function zn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[pr(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=$e(t),r=zn(e,n);r&&!r.text?r=null:r&&r.changes&&(pn(e,r,n,lr(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=$e(t=Gt(t)),r=e.display.externalMeasured=new an(e.doc,t,n);r.lineN=n;var i=r.built=en(e,r);return r.text=i.pre,T(e.display.lineMeasure,i.pre),r}(e,t));var i=In(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function On(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&&Pn(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=jn(t.map,n,r),l=o.node,u=o.start,c=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;u&&se(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&se(t.line.text.charAt(o.coverStart+c));)++c;if((i=s&&a<9&&0==u&&c==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Bn(A(l,u,c).getClientRects(),r)).left||i.right||0==u)break;c=u,u-=1,h="right"}s&&a<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=De)return De;var t=T(e,P("span","x")),n=t.getBoundingClientRect(),r=A(t,0,1).getBoundingClientRect();return De=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&&(h=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+ar(e.display),top:f.top,bottom:f.bottom}:Nn}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,y=(g+m)/2,v=t.view.measure.heights,_=0;_<v.length-1&&!(y<v[_]);_++);var b=_?v[_-1]:0,x=v[_],w={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:b,bottom:x};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=g,w.rbottom=m),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 Dn,Nn={left:0,right:0,top:0,bottom:0};function jn(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 Bn(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 qn(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 Wn(e){return c&&y?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Hn(e){return c&&y?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Un(e){var t=Gt(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Cn(t[r]));return n}function Xn(e,t,n,r,i){if(!i){var o=Un(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var s=Ut(t);if("local"==r?s+=An(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:Hn(D(e)));var l=a.left+("window"==r?0:Wn(D(e)));n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function Zn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Wn(D(e)),i-=Hn(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 Kn(e,t,n,r,i){return r||(r=Ke(e.doc,t.line)),Xn(e,r,Ln(e,r,t.ch,i),n)}function Yn(e,t,n,r,i,o){function s(t,s){var a=On(e,i,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,Xn(e,r,a,n)}r=r||Ke(e.doc,t.line),i||(i=Fn(e,r));var a=de(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 h=ce(a,l,u),d=ue,p=c(l,h,"before"==u);return null!=d&&(p.other=c(l,d,"before"!=u)),p}function Qn(e,t){var n=0;t=ct(e.doc,t),e.options.lineWrapping||(n=ar(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Ut(r)+An(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Jn(e,t,n,r,i){var o=rt(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var i=et(r,n),o=r.first+r.size-1;if(i>o)return Jn(r.first+r.size-1,Ke(r,o).text.length,null,1,1);t<0&&(t=0);for(var s=Ke(r,i);;){var a=rr(e,s,i,t,n),l=jt(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=Ke(r,i=u.line)}}function er(e,t,n,r){r-=Un(t);var i=t.text.length,o=le((function(t){return On(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=le((function(t){return On(e,n,t).top>r}),o,i)}}function tr(e,t,n,r){return n||(n=Fn(e,t)),er(e,t,n,Xn(e,t,On(e,n,r),"line").top)}function nr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function rr(e,t,n,r,i){i-=Ut(t);var o=Fn(e,t),s=Un(t),a=0,l=t.text.length,u=!0,c=de(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?or:ir)(e,t,n,o,c,r,i);a=(u=1!=h.level)?h.from:h.to-1,l=u?h.to:h.from-1}var d,p,f=null,g=null,m=le((function(t){var n=On(e,o,t);return n.top+=s,n.bottom+=s,!!nr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(f=t,g=n),!0)}),a,l),y=!1;if(g){var v=r-g.left<g.right-r,_=v==u;m=f+(_?0:1),p=_?"after":"before",d=v?g.left:g.right}else{u||m!=l&&m!=a||m++,p=0==m?"after":m==t.text.length?"before":On(e,o,m-(u?1:0)).bottom+s<=i==u?"after":"before";var b=Yn(e,rt(n,m,p),"line",t,o);d=b.left,y=i<b.top?-1:i>=b.bottom?1:0}return Jn(n,m=ae(t.text,m,1),p,y,r-d)}function ir(e,t,n,r,i,o,s){var a=le((function(a){var l=i[a],u=1!=l.level;return nr(Yn(e,rt(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,rt(n,u?l.from:l.to,u?"after":"before"),"line",t,r);nr(c,o,s,!0)&&c.top>s&&(l=i[a-1])}return l}function or(e,t,n,r,i,o,s){var a=er(e,t,r,s),l=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,d=0;d<i.length;d++){var p=i[d];if(!(p.from>=u||p.to<=l)){var f=On(e,r,1!=p.level?Math.min(u,p.to)-1:Math.max(l,p.from)).right,g=f<o?o-f+1e9:f-o;(!c||h>g)&&(c=p,h=g)}}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 sr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Dn){Dn=P("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(P("br"));Dn.appendChild(document.createTextNode("x"))}T(e.measure,Dn);var n=Dn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function ar(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 lr(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:ur(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ur(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function cr(e){var t=sr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ar(e.display)-3);return function(i){if(Wt(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=cr(e);t.iter((function(e){var t=n(e);t!=e.height&&Je(e,t)}))}function dr(e,t,n,r){var i=e.display;if(!n&&"true"==Ae(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=$n(e,o,s);if(r&&u.xRel>0&&(l=Ke(e.doc,u.line).text).length==u.ch){var c=G(l,l.length,e.options.tabSize)-l.length;u=rt(u.line,Math.max(0,Math.round((o-Mn(e.display).left)/ar(e.display))-c))}return u}function pr(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 fr(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)St&&Vt(e.doc,t)<i.viewTo&&mr(e);else if(n<=i.viewFrom)St&&qt(e.doc,n+r)>i.viewFrom?mr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)mr(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):mr(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):mr(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(ln(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):mr(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[pr(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==q(s,n)&&s.push(n)}}}function mr(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=pr(e,t),s=e.display.view;if(!St||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 _r(e){e.display.input.showSelection(e.display.input.prepareSelection())}function br(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&&xr(e,c,i)}else(u||e.options.showCursorWhenSelecting)&&xr(e,l.head,i);u||kr(e,l,o)}}return r}function xr(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=Kn(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 wr(e,t){return e.top-t.top||e.left-t.left}function kr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),s=Mn(e.display),a=s.left,l=Math.max(r.sizerWidth,Pn(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 h(t,n,r){var o,s,h=Ke(i,t),d=h.text.length;function p(n,r){return Kn(e,rt(t,n),"div",h,r)}function f(t,n,r){var i=tr(e,h,null,t),o="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=de(h,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")}(g,n||0,null==r?d:r,(function(e,t,i,h){var m="ltr"==i,y=p(e,m?"left":"right"),v=p(t-1,m?"right":"left"),_=null==n&&0==e,b=null==r&&t==d,x=0==h,w=!g||h==g.length-1;if(v.top-y.top<=3){var k=(u?b:_)&&w,C=(u?_:b)&&x?a:(m?y:v).left,S=k?l:(m?v:y).right;c(C,y.top,S-C,y.bottom)}else{var A,E,M,T;m?(A=u&&_&&x?a:y.left,E=u?l:f(e,i,"before"),M=u?a:f(t,i,"after"),T=u&&b&&w?l:v.right):(A=u?f(e,i,"before"):a,E=!u&&_&&x?l:y.right,M=!u&&b&&w?a:v.left,T=u?f(t,i,"after"):l),c(A,y.top,E-A,y.bottom),y.bottom<v.top&&c(a,y.bottom,null,v.top),c(M,v.top,T-M,v.bottom)}(!o||wr(y,o)<0)&&(o=y),wr(v,o)<0&&(o=v),(!s||wr(y,s)<0)&&(s=y),wr(v,s)<0&&(s=v)})),{start:o,end:s}}var d=t.from(),p=t.to();if(d.line==p.line)h(d.line,d.ch,p.ch);else{var f=Ke(i,d.line),g=Ke(i,p.line),m=Gt(f)==Gt(g),y=h(d.line,d.ch,m?f.text.length+1:null).end,v=h(p.line,m?0:null,p.ch).start;m&&(y.top<v.top-2?(c(y.right,y.top,null,y.bottom),c(a,v.top,v.left,v.bottom)):c(y.right,y.top,v.left-y.right,y.bottom)),y.bottom<v.top&&c(a,y.bottom,null,v.top)}n.appendChild(o)}function Cr(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()||Mr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Sr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Er(e))}function Ar(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Mr(e))}),100)}function Er(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,z(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()),Cr(e))}function Mr(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 Tr(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,h=void 0,d=0;if(!u.hidden){if(i+=u.line.height,s&&a<8){var p=u.node.offsetTop+u.node.offsetHeight;h=p-n,n=p}else{var f=u.node.getBoundingClientRect();h=f.bottom-f.top,!c&&u.text.firstChild&&(d=u.text.firstChild.getBoundingClientRect().right-f.left-1)}var g=u.line.height-h;if((g>.005||g<-.005)&&(i<r&&(o-=g),Je(u.line,h),Pr(u.line),u.rest))for(var m=0;m<u.rest.length;m++)Pr(u.rest[m]);if(d>e.display.sizerWidth){var y=Math.ceil(d/ar(e.display));y>e.display.maxLineLength&&(e.display.maxLineLength=y,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Pr(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 Rr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-An(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=et(t,r),s=et(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=et(t,Ut(Ke(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=et(t,Ut(Ke(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Ir(e,t){var n=e.display,r=sr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Rn(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+En(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 h=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,p=Pn(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<d?s.scrollLeft=Math.max(0,t.left+h-(f?0:10)):t.right>p+d-3&&(s.scrollLeft=t.right+(f?0:10)-p),s}function Lr(e,t){null!=t&&(Or(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function zr(e){Or(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||Or(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Or(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Dr(e,Qn(e,t.from),Qn(e,t.to),t.margin))}function Dr(e,t,n,r){var i=Ir(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||di(e,{top:t}),jr(e,t,!0),n&&di(e),si(e,100))}function jr(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 Br(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+En(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+Tn(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),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(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=_&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new V,this.disableVert=new V},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 qr=function(){};function Wr(e,t){t||(t=Gr(e));var n=e.display.barWidth,r=e.display.barHeight;Hr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Tr(e),Hr(e,Gr(e)),n=e.display.barWidth,r=e.display.barHeight}function Hr(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=""}qr.prototype.update=function(){return{bottom:0,right:0}},qr.prototype.setScrollLeft=function(){},qr.prototype.setScrollTop=function(){},qr.prototype.clear=function(){};var Ur={native:Vr,null:qr};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 Ur[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(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?Br(e,t):Nr(e,t)}),e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Zr=0;function Kr(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:++Zr,markArrays:null},t=e.curOp,un?un.ops.push(t):t.ownsGroup=un={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{un=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Qr(t[n]);for(var r=0;r<t.length;r++)Jr(t[r]);for(var i=0;i<t.length;i++)$r(t[i]);for(var o=0;o<t.length;o++)ei(t[o]);for(var s=0;s<t.length;s++)ti(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=Tn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Tn(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&Zt(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 li(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&ci(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&Tr(t),e.barMeasure=Gr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ln(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+Tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Pn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ei(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Br(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)&&Wr(t,e.barMeasure),e.updatedDisplay&&fi(t,e.barMeasure),e.selectionChanged&&Cr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Sr(e.cm)}function ti(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&&jr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Br(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&&!g){var s=P("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-An(e.display))+"px;\n height: "+(t.bottom-t.top+Tn(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?rt(t.line,t.ch+1,"before"):t,t=t.ch?rt(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=Ir(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,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(Nr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(s=!0)),null!=u.scrollLeft&&(Br(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return i}(t,ct(r,e.scrollToPos.from),ct(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 ni(e,t){if(e.curOp)return t();Kr(e);try{return t()}finally{Yr(e)}}function ri(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Kr(e);try{return t.apply(e,arguments)}finally{Yr(e)}}}function ii(e){return function(){if(this.curOp)return e.apply(this,arguments);Kr(this);try{return e.apply(this,arguments)}finally{Yr(this)}}}function oi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Kr(t);try{return e.apply(this,arguments)}finally{Yr(t)}}}function si(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,j(ai,e))}function ai(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=mt(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?He(t.mode,r.state):null,l=ft(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 h=!s||s.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!h&&d<s.length;++d)h=s[d]!=o.styles[d];h&&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 si(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&ni(e,(function(){for(var t=0;t<i.length;t++)gr(e,i[t],"text")}))}}var li=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Rr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Pn(e),this.force=n,this.dims=lr(e),this.events=[]};function ui(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=N(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 ci(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return mr(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;mi(e)&&(mr(e),t.dims=lr(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)),St&&(o=Vt(e.doc,o),s=qt(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=ln(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=ln(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(pr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(ln(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,pr(e,n)))),r.viewTo=n})(e,o,s),n.viewOffset=Ut(Ke(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=ui(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&&_&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,h=0;h<u.length;h++){var d=u[h];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;s!=d.node;)s=a(s);var p=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(q(d.changes,"gutter")>-1&&(p=!1),pn(e,d,c,n)),p&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(nt(e.options,c)))),s=d.node.nextSibling}else{var f=bn(e,d,c,n);o.insertBefore(f,s)}c+=d.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,si(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!=Pn(e))r&&(t.visible=Rr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+En(e.display)-Rn(e),n.top)}),t.visible=Rr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ci(e,t))break;Tr(e);var i=Gr(e);_r(e),Wr(e,i),fi(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 di(e,t){var n=new li(e,t);if(ci(e,n)){Tr(e),hi(e,n);var r=Gr(e);_r(e),Wr(e,r),fi(e,r),n.finish()}}function pi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",hn(e,"gutterChanged",e)}function fi(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+Tn(e)+"px"}function gi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ur(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 mi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=nt(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",pi(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",pi(e)}function _i(e){vi(e.display),fr(e),gi(e)}function bi(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: 50px; 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&&h>=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&&v||(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)}li.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},li.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var xi=0,wi=null;function ki(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 Ci(e){var t=ki(e);return t.x*=wi,t.y*=wi,t}function Si(e,t){c&&102==h&&(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=ki(t),i=r.x,o=r.y,s=wi;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&&_&&l)e:for(var g=t.target,m=a.view;g!=u;g=g.parentNode)for(var y=0;y<m.length;y++)if(m[y].node==g){e.display.currentWheelTarget=g;break e}if(i&&!n&&!d&&null!=s)return o&&f&&Nr(e,Math.max(0,u.scrollTop+o*s)),Br(e,Math.max(0,u.scrollLeft+i*s)),(!o||o&&f)&&we(t),void(a.wheelStartX=null);if(o&&null!=s){var v=o*s,b=e.doc.scrollTop,x=b+a.wrapper.clientHeight;v<0?b=Math.max(0,b+v-50):x=Math.min(e.doc.height,x+v+50),di(e,{top:b,bottom:x})}xi<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&&(wi=(wi*xi+n)/(xi+1),++xi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}s?wi=-.53:n?wi=15:c?wi=-.7:p&&(wi=-1/3);var Ai=function(e,t){this.ranges=e,this.primIndex=t};Ai.prototype.primary=function(){return this.ranges[this.primIndex]},Ai.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(!ot(n.anchor,r.anchor)||!ot(n.head,r.head))return!1}return!0},Ai.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ei(st(this.ranges[t].anchor),st(this.ranges[t].head));return new Ai(e,this.primIndex)},Ai.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ai.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(it(t,r.from())>=0&&it(e,r.to())<=0)return n}return-1};var Ei=function(e,t){this.anchor=e,this.head=t};function Mi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return it(e.from(),t.from())})),n=q(t,i);for(var o=1;o<t.length;o++){var s=t[o],a=t[o-1],l=it(a.to(),s.from());if(r&&!s.empty()?l>0:l>=0){var u=lt(a.from(),s.from()),c=at(a.to(),s.to()),h=a.empty()?s.from()==s.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new Ei(h?c:u,h?u:c))}}return new Ai(t,n)}function Ti(e,t){return new Ai([new Ei(e,t||e)],0)}function Pi(e){return e.text?rt(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ri(e,t){if(it(e,t.from)<0)return e;if(it(e,t.to)<=0)return Pi(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+=Pi(t).ch-t.to.ch),rt(n,r)}function Ii(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Ei(Ri(i.anchor,t),Ri(i.head,t)))}return Mi(e.cm,n,e.sel.primIndex)}function Li(e,t,n){return e.line==t.line?rt(n.line,e.ch-t.ch+n.ch):rt(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,si(e,100),e.state.modeGen++,e.curOp&&fr(e)}function Oi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Di(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),Rt(e),It(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 Kt(u[o],i(o),r));return n}var a=t.from,l=t.to,u=t.text,c=Ke(e,a.line),h=Ke(e,l.line),d=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(Oi(e,t)){var g=s(0,u.length-1);o(h,h.text,p),f&&e.remove(a.line,f),g.length&&e.insert(a.line,g)}else if(c==h)if(1==u.length)o(c,c.text.slice(0,a.ch)+d+c.text.slice(l.ch),p);else{var m=s(1,u.length-1);m.push(new Kt(d+c.text.slice(l.ch),p,r)),o(c,c.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,a.ch)+u[0]+h.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(h,d+h.text.slice(l.ch),p);var y=s(1,u.length-1);f>1&&e.remove(a.line+1,f-1),e.insert(a.line+1,y)}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 ji(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,hr(e),zi(e),Bi(e),e.options.direction=t.direction,e.options.lineWrapping||Zt(e),e.options.mode=t.modeOption,fr(e)}function Bi(e){("rtl"==e.doc.direction?z: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:st(t.from),to:Pi(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 qi(e){for(;e.length&&Q(e).ranges;)e.pop()}function Wi(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?(qi(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==it(t.from,t.to)&&0==it(t.from,s.to)?s.to=Pi(t):o.changes.push(Vi(e,t));else{var l=Q(i.done);for(l&&l.ranges||Ui(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 Hi(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:Ui(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&qi(i.undone)}function Ui(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 Zi(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 Ki(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(Zi(n[i]));return r}(e,t),r=Tt(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?Ai.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 h in u)(c=h.match(/^spans_(\d+)$/))&&q(t,Number(c[1]))>-1&&(Q(a)[h]=u[h],delete u[h])}}}return r}function Qi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=it(t,i)<0;o!=it(n,i)<0?(i=t,t=n):o!=it(t,n)<0&&(t=n)}return new Ei(i,t)}return new Ei(n||t,t)}function Ji(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),ro(e,new Ai([Qi(e.sel.primary(),t,n,i)],0),r)}function $i(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);ro(e,Mi(e.cm,r,e.sel.primIndex),n)}function eo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ro(e,Mi(e.cm,i,e.sel.primIndex),r)}function to(e,t,n,r){ro(e,Ti(t,n),r)}function no(e,t,n){var r=e.history.done,i=Q(r);i&&i.ranges?(r[r.length-1]=t,io(e,t,n)):ro(e,t,n)}function ro(e,t,n){io(e,t,n),Hi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function io(e,t,n){(be(e,"beforeSelectionChange")||e.cm&&be(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 Ei(ct(e,t[n].anchor),ct(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?Mi(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(it(t.primary().head,e.sel.primary().head)<0?-1:1);oo(e,ao(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||zr(e.cm)}function oo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,_e(e.cm)),hn(e,"cursorActivity",e))}function so(e){oo(e,ao(e,e.sel,null,!1))}function ao(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=uo(e,s.anchor,a&&a.anchor,n,r),u=s.head==s.anchor?l:uo(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 Ei(l,u))}return i?Mi(e.cm,i,t.primIndex):t}function lo(e,t,n,r,i){var o=Ke(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 h=l.find(r<0?1:-1),d=void 0;if((r<0?c:u)&&(h=co(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(d=it(h,n))&&(r<0?d<0:d>0))return lo(e,h,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?u:c)&&(p=co(e,p,r,p.line==t.line?o:null)),p?lo(e,p,t,r,i):null}}return t}function uo(e,t,n,r,i){var o=r||1;return lo(e,t,n,o,i)||!i&&lo(e,t,n,o,!0)||lo(e,t,n,-o,i)||!i&&lo(e,t,n,-o,!0)||(e.cantEdit=!0,rt(e.first,0))}function co(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ct(e,rt(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?rt(t.line+1,0):null:new rt(t.line,t.ch+n)}function ho(e){e.setSelection(rt(e.firstLine(),0),rt(e.lastLine()),H)}function po(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=ct(e,t)),n&&(r.to=ct(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 fo(e,t,n){if(e.cm){if(!e.cm.curOp)return ri(e.cm,fo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))||(t=po(e,t,!0))){var r=Ct&&!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!=q(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(!(it(u.to,a.from)<0||it(u.from,a.to)>0)){var c=[l,1],h=it(u.from,a.from),d=it(u.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&c.push({from:u.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&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!=it(t.from,t.to)){var n=Ii(e,t);Wi(e,t,n,e.cm?e.cm.curOp.id:NaN),vo(e,t,n,Tt(e,t));var r=[];Ni(e,(function(e,n){n||-1!=q(r,e.history)||(wo(e.history,t),r.push(e.history)),vo(e,t,null,Tt(e,t))}))}}function mo(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(Ui(i,l),n&&!i.equals(e.sel))return void ro(e,i,{clearRedo:!1});s=i}var c=[];Ui(s,l),l.push({changes:c,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var h=be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,h&&!po(e,r,!1))return a.length=0,{};c.push(Vi(e,r));var o=n?Ii(e,r):Q(a);vo(e,r,o,Ki(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Pi(r)});var s=[];Ni(e,(function(e,t){t||-1!=q(s,e.history)||(wo(e.history,r),s.push(e.history)),vo(e,r,null,Ki(e,r))}))},p=i.changes.length-1;p>=0;--p){var f=d(p);if(f)return f.v}}}}function yo(e,t){if(0!=t&&(e.first+=t,e.sel=new Ai(J(e.sel.ranges,(function(e){return new Ei(rt(e.anchor.line+t,e.anchor.ch),rt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fr(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 ri(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:rt(e.first,0),to:rt(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:rt(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),n||(n=Ii(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=$e(Gt(Ke(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&&_e(e),Di(r,t,n,cr(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=Ke(e,r).stateAfter;if(i&&(!(i instanceof dt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),si(e,400);var u=t.text.length-(s.line-o.line)-1;t.full?fr(e):o.line!=s.line||1!=t.text.length||Oi(e.doc,t)?fr(e,o.line,s.line+1,u):gr(e,o.line,"text");var c=be(e,"changes"),h=be(e,"change");if(h||c){var d={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};h&&hn(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):Di(e,t,r),io(e,n,H),e.cantEdit&&uo(e,rt(e.firstLine(),0))&&(e.cantEdit=!1)}}function _o(e,t,n,r,i){var o;r||(r=n),it(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),fo(e,{from:n,to:r,text:t,origin:i})}function bo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function xo(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++)bo(o.ranges[a].anchor,t,n,r),bo(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=rt(u.from.line+r,u.from.ch),u.to=rt(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 wo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;xo(e.done,n,r,i),xo(e.undone,n,r,i)}function ko(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ke(e,ut(e,t)):i=$e(t),null==i?null:(r(o,i)&&e.cm&&gr(e.cm,i,n),o)}function Co(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function So(e){this.children=e;for(var t=0,n=0,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}Ei.prototype.from=function(){return lt(this.anchor,this.head)},Ei.prototype.to=function(){return at(this.anchor,this.head)},Ei.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Co.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}},So.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 Co))){var a=[];this.collapse(a),this.children=[new Co(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 Co(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 So(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=q(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new So(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 Ao=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 Eo(e,t,n){Ut(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Lr(e,n)}Ao.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=$e(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=Cn(this);Je(n,Math.max(0,n.height-o)),e&&(ni(e,(function(){Eo(e,n,-o),gr(e,r,"widget")})),hn(e,"lineWidgetCleared",e,this,r))}},Ao.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Cn(this)-t;i&&(Wt(this.doc,r)||Je(r,r.height+i),n&&ni(n,(function(){n.curOp.forceUpdate=!0,Eo(n,r,i),hn(n,"lineWidgetChanged",n,e,$e(r))})))},xe(Ao);var Mo=0,To=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Mo};function Po(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=B(r)).shared=!1;var o=[Po(e,t,n,r,i)],s=o[0],a=r.widgetNode;return Ni(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Po(e,ct(e,t),ct(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=Q(o)})),new Ro(o,s)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ri(e.cm,Po)(e,t,n,r,i);var o=new To(e,i),s=it(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(Bt(e,t.line,t,n,o)||t.line!=n.line&&Bt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");St=!0}o.addToHistory&&Wi(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 At(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){Wt(e,t)&&Je(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Ct=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Mo,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)fr(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&&so(u.doc),hn(u,"markerAdded",u,o)}return o}To.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),be(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=Et(s.markedSpans,this);e&&!this.collapsed?gr(e,$e(s),"text"):e&&(null!=a.to&&(i=$e(s)),null!=a.from&&(r=$e(s))),s.markedSpans=Mt(s.markedSpans,a),null==a.from&&this.collapsed&&!Wt(this.doc,s)&&e&&Je(s,sr(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&&fr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&so(e.doc)),e&&hn(e,"markerCleared",e,this,r,i),t&&Yr(e),this.parent&&this.parent.clear()}},To.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=Et(o.markedSpans,this);if(null!=s.from&&(n=rt(t?o:$e(o),s.from),-1==e))return n;if(null!=s.to&&(r=rt(t?o:$e(o),s.to),1==e))return r}return n&&{from:n,to:r}},To.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&ni(r,(function(){var i=t.line,o=$e(t.line),s=zn(r,o);if(s&&(Gn(s),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Wt(n.doc,i)&&null!=n.height){var a=n.height;n.height=null;var l=Cn(n)-a;l&&Je(i,i.height+l)}hn(r,"markerChanged",r,e)}))},To.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=q(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},To.prototype.detachLine=function(e){if(this.lines.splice(q(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xe(To);var Ro=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Io(e){return e.findMarks(rt(e.first,0),e.clipPos(rt(e.lastLine())),(function(e){return e.parent}))}function Lo(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==q(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Ro.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")}},Ro.prototype.find=function(e,t){return this.primary.find(e,t)},xe(Ro);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),So.call(this,[new Co([new Kt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=rt(n,0);this.sel=Ti(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)),Di(this,{from:o,to:o,text:e}),ro(this,Ti(o),H)};Fo.prototype=ee(So.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:oi((function(e){var t=rt(this.first,0),n=this.first+this.size-1;fo(this,{from:t,to:rt(n,Ke(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Fr(this.cm,0,0),ro(this,Ti(t),H)})),replaceRange:function(e,t,n,r){_o(this,e,t=ct(this,t),n=n?ct(this,n):t,r)},getRange:function(e,t,n){var r=Ye(this,ct(this,e),ct(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(tt(this,e))return Ke(this,e)},getLineNumber:function(e){return $e(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(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 ct(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:oi((function(e,t,n){to(this,ct(this,"number"==typeof e?rt(e,t||0):e),null,n)})),setSelection:oi((function(e,t,n){to(this,ct(this,e),ct(this,t||e),n)})),extendSelection:oi((function(e,t,n){Ji(this,ct(this,e),t&&ct(this,t),n)})),extendSelections:oi((function(e,t){$i(this,ht(this,e),t)})),extendSelectionsBy:oi((function(e,t){$i(this,ht(this,J(this.sel.ranges,e)),t)})),setSelections:oi((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Ei(ct(this,e[i].anchor),ct(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ro(this,Mi(this.cm,r,t),n)}})),addSelection:oi((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Ei(ct(this,e),ct(this,t||e))),ro(this,Mi(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:oi((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=rt(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=Li(a.from,i,o),u=Li(Pi(a),i,o);if(i=a.to,o=u,"around"==n){var c=e.sel.ranges[s],h=it(c.head,c.anchor)<0;r[s]=new Ei(h?u:l,h?l:u)}else r[s]=new Ei(l,l)}return new Ai(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)fo(this,r[l]);a?no(this,a):this.cm&&zr(this.cm)})),undo:oi((function(){mo(this,"undo")})),redo:oi((function(){mo(this,"redo")})),undoSelection:oi((function(){mo(this,"undo",!0)})),redoSelection:oi((function(){mo(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:oi((function(e,t,n){return ko(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ie(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:oi((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ko(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ie(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!tt(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=$e(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:oi((function(e,t,n){return ko(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:oi((function(e,t,n){return ko(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:oi((function(e,t,n){return function(e,t,n,r){var i=new Ao(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ko(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&&!Wt(e,t)){var r=Ut(t)<e.scrollTop;Je(t,t.height+Cn(i)),r&&Lr(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&hn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:$e(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Po(this,ct(this,e),ct(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Po(this,e=ct(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ke(this,(e=ct(this,e)).line).markedSpans;if(n)for(var 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=ct(this,e),t=ct(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})),ct(this,rt(n,t))},indexFromPos:function(e){var t=(e=ct(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new 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(it(o,s)){var a=Po(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}(r,Io(this)),r},unlinkDoc:function(e){if(e instanceof Rs&&(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),Lo(Io(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:oi((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&ni(t=this.cm,(function(){Bi(t),fr(t)})))}))}),Fo.prototype.eachLine=Fo.prototype.iter;var Oo=0;function Do(e){var t=this;if(No(t),!ve(t,e)&&!Sn(t.display,e)){we(e),s&&(Oo=+new Date);var n=dr(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&&ri(t,(function(){var e={from:n=ct(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};fo(t.doc,e),no(t.doc,Ti(ct(t.doc,n),ct(t.doc,Pi(e))))}))()},u=function(e,n){if(t.options.allowDropFileTypes&&-1==q(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 h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),io(t.doc,Ti(n,n)),d)for(var p=0;p<d.length;++p)_o(t.doc,"",d[p].anchor,d[p].head,"drag");t.replaceSelection(h,"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 jo(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 Bo=!1;function Go(){var e;Bo||(fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,jo(Vo)}),100))})),fe(window,"blur",(function(){return jo(Mr)})),Bo=!0)}function Vo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var qo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Wo=0;Wo<10;Wo++)qo[Wo+48]=qo[Wo+96]=String(Wo);for(var Ho=65;Ho<=90;Ho++)qo[Ho]=String.fromCharCode(Ho);for(var Uo=1;Uo<=12;Uo++)qo[Uo+111]=qo[Uo+63235]="F"+Uo;var Xo={};function Zo(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 Ko(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(" "),Zo),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=es(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:qo[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 $o(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=qo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Jo(n,e,t))}function es(e){return"string"==typeof e?Xo[e]:e}function ts(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&it(o.from,Q(r).to)<=0;){var s=r.pop();if(it(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}ni(e,(function(){for(var t=r.length-1;t>=0;t--)_o(e.doc,"",r[t].from,r[t].to,"+delete");zr(e)}))}function ns(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function rs(e,t,n){var r=ns(e,t.ch,n);return null==r?null:new rt(t.line,r,n<0?"after":"before")}function is(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(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=On(t,u,s).top;s=le((function(e){return On(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=ns(n,s,1))}else s=i<0?a.to:a.from;return new rt(r,s,l)}}return new rt(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=_?Xo.macDefault:Xo.pcDefault;var os={selectAll:ho,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return ts(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:rt(t.head.line+1,0)}:{from:t.head,to:rt(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return ts(e,(function(t){return{from:rt(t.from().line,0),to:ct(e.doc,rt(t.to().line+1,0))}}))},delLineLeft:function(e){return ts(e,(function(e){return{from:rt(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return ts(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 ts(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(rt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(rt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return ss(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return as(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ke(e.doc,t),r=function(e){for(var t;t=Nt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=$e(r)),is(!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/)?as(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=G(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 ni(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Ke(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new rt(i.line,i.ch-1)),i.ch>0)i=new rt(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),rt(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=Ke(e.doc,i.line-1).text;s&&(i=new rt(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),rt(i.line-1,s.length-1),i,"+transpose"))}n.push(new Ei(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return ni(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 ss(e,t){var n=Ke(e.doc,t),r=Gt(n);return r!=n&&(t=$e(r)),is(!0,e,r,t,1)}function as(e,t){var n=ss(e,t.line),r=Ke(e.doc,n.line),i=de(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 rt(n.line,s?0:o,n.sticky)}return n}function ls(e,t,n){if("string"==typeof t&&!(t=os[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)!=W}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var us=new V;function cs(e,t,n,r){var i=e.state.keySeq;if(i){if(Qo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:us.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||(we(n),Cr(e)),!!i}function ds(e,t){var n=$o(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?cs(e,"Shift-"+n,t,(function(t){return ls(e,t,!0)}))||cs(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ls(e,t)})):cs(e,n,t,(function(t){return ls(e,t)})))}var ps=null;function fs(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=ds(t,e);d&&(ps=i?r:null,i||88!=r||Oe||!(_?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!_&&!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"),me(document,"keyup",n),me(document,"mouseover",n))}z(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n)}(t)}}function gs(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function ms(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Sn(t.display,e)||ve(t,e)||e.ctrlKey&&!e.altKey||_&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==ps)return ps=null,void we(e);if(!d||e.which&&!(e.which<10)||!ds(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return cs(e,"'"+n+"'",t,(function(t){return ls(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var ys,vs,_s=function(e,t,n){this.time=e,this.pos=t,this.button=n};function bs(e){var t=this,n=t.display;if(!(ve(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Sn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ks(t,e)){var r=dr(t,e),i=Ee(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 _s(n,e,t),ys=null,"double"):(ys=new _s(n,e,t),vs=null,"single")}(r,i):"single";N(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),cs(e,Jo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=os[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=W}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){s?setTimeout(j(Sr,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=_?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(_?n.altKey:n.ctrlKey)),i}(e,n,r),u=e.doc.sel;e.options.dragDrop&&Pe&&!e.isReadOnly()&&"single"==n&&(i=u.contains(t))>-1&&(it((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(it(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,u=ri(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Ar(e)),me(i.wrapper.ownerDocument,"mouseup",u),me(i.wrapper.ownerDocument,"mousemove",c),me(i.scroller,"dragstart",h),me(i.scroller,"drop",u),o||(we(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},h=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,fe(i.wrapper.ownerDocument,"mouseup",u),fe(i.wrapper.ownerDocument,"mousemove",c),fe(i.scroller,"dragstart",h),fe(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&&Ar(e);var i=e.display,o=e.doc;we(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 Ei(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Ei(n,n)),n=dr(e,t,!0,!0),l=-1;else{var h=xs(e,n,r.unit);a=r.extend?Qi(a,h.anchor,h.head,r.extend):h}r.addNew?-1==l?(l=c.length,ro(o,Mi(e,c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(ro(o,Mi(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):eo(o,l,a,U):(l=0,ro(o,new Ai([a],0),U),u=o.sel);var d=n;function p(t){if(0!=it(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],s=e.options.tabSize,c=G(Ke(o,n.line).text,n.ch,s),h=G(Ke(o,t.line).text,t.ch,s),p=Math.min(c,h),f=Math.max(c,h),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var y=Ke(o,g).text,v=Z(y,p,s);p==f?i.push(new Ei(rt(g,v),rt(g,v))):y.length>v&&i.push(new Ei(rt(g,v),rt(g,Z(y,f,s))))}i.length||i.push(new Ei(n,n)),ro(o,Mi(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var _,b=a,x=xs(e,t,r.unit),w=b.anchor;it(x.anchor,w)>0?(_=x.head,w=lt(b.from(),x.anchor)):(_=x.anchor,w=at(b.to(),x.head));var k=u.ranges.slice(0);k[l]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==it(n,r)&&n.sticky==r.sticky)return t;var o=de(i);if(!o)return t;var s=ce(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=ce(o,r.ch,r.sticky),h=c-s||(r.ch-n.ch)*(1==a.level?-1:1);l=c==u-1||c==u?h<0:h>0}var d=o[u+(l?-1:0)],p=l==(1==d.level),f=p?d.from:d.to,g=p?"after":"before";return n.ch==f&&n.sticky==g?t:new Ei(new rt(n.line,f,g),r)}(e,new Ei(ct(o,w),_)),ro(o,Mi(e,k,l),U)}}var f=i.wrapper.getBoundingClientRect(),g=0;function m(t){var n=++g,s=dr(e,t,!0,"rectangle"==r.unit);if(s)if(0!=it(s,d)){e.curOp.focus=L(D(e)),p(s);var a=Rr(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(ri(e,(function(){g==n&&m(t)})),150)}else{var l=t.clientY<f.top?-20:t.clientY>f.bottom?20:0;l&&setTimeout(ri(e,(function(){g==n&&(i.scroller.scrollTop+=l,m(t))})),50)}}function y(t){e.state.selectingText=!1,g=1/0,t&&(we(t),i.input.focus()),me(i.wrapper.ownerDocument,"mousemove",v),me(i.wrapper.ownerDocument,"mouseup",_),o.history.lastSelOrigin=null}var v=ri(e,(function(e){0!==e.buttons&&Ee(e)?m(e):y(e)})),_=ri(e,y);e.state.selectingText=_,fe(i.wrapper.ownerDocument,"mousemove",v),fe(i.wrapper.ownerDocument,"mouseup",_)}(e,r,t,o)}(t,r,o,e):Ae(e)==n.scroller&&we(e):2==i?(r&&Ji(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Ar(t)))}}function xs(e,t,n){if("char"==n)return new Ei(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ei(rt(t.line,0),ct(e.doc,rt(t.line+1,0)));var r=n(e,t);return new Ei(r.from,r.to)}function ws(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&&we(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!be(e,n))return Ce(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,et(e.doc,o),e.display.gutterSpecs[l].className,t),Ce(t)}}function ks(e,t){return ws(e,t,"gutterClick",!0)}function Cs(e,t){Sn(e.display,t)||function(e,t){return!!be(e,"gutterContextMenu")&&ws(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ss(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qn(e)}_s.prototype.compare=function(e,t,n){return this.time+400>e&&0==it(t,this.pos)&&n==this.button};var As={toString:function(){return"CodeMirror.Init"}},Es={},Ms={};function Ts(e,t,n){if(!t!=!(n&&n!=As)){var r=e.display.dragFunctions,i=t?fe:me;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 Ps(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),Zt(e)),hr(e),fr(e),qn(e),setTimeout((function(){return Wr(e)}),100)}function Rs(e,t){var n=this;if(!(this instanceof Rs))return new Rs(e,t);this.options=t=t?B(t):{},B(Es,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 Rs.inputStyles[t.inputStyle](this),o=this.display=new bi(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Ss(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 V,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),s&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",ri(e,bs)),fe(t.scroller,"dblclick",s&&a<11?ri(e,(function(t){if(!ve(e,t)){var n=dr(e,t);if(n&&!ks(e,t)&&!Sn(e.display,t)){we(t);var r=e.findWordAt(n);Ji(e.doc,r.anchor,r.head)}}})):function(t){return ve(e,t)||we(t)}),fe(t.scroller,"contextmenu",(function(t){return Cs(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Cs(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}fe(t.scroller,"touchstart",(function(i){if(!ve(e,i)&&!o(i)&&!ks(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)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Sn(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 Ei(s,s):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(s):new Ei(rt(s.line,0),ct(e.doc,rt(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),we(n)}i()})),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Nr(e,t.scroller.scrollTop),Br(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return Si(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return Si(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||Se(t)},over:function(t){ve(e,t)||(function(e,t){var n=dr(e,t);if(n){var r=document.createDocumentFragment();xr(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),Se(t))},start:function(t){return function(e,t){if(s&&(!e.state.draggingText||+new Date-Oo<100))Se(t);else if(!ve(e,t)&&!Sn(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==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ri(e,Do),leave:function(t){ve(e,t)||No(e)}};var u=t.input.getField();fe(u,"keyup",(function(t){return gs.call(e,t)})),fe(u,"keydown",ri(e,fs)),fe(u,"keypress",ri(e,ms)),fe(u,"focus",(function(t){return Er(e,t)})),fe(u,"blur",(function(t){return Mr(e,t)}))}(this),Go(),Kr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Mr(this),Ms)Ms.hasOwnProperty(u)&&Ms[u](this,t[u],As);mi(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Is.length;++c)Is[c](this);Yr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Rs.defaults=Es,Rs.optionHandlers=Ms;var Is=[];function Ls(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=mt(e,t).state:n="prev");var s=e.options.tabSize,a=Ke(o,t),l=G(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))==W||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?G(Ke(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 h="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/s);p;--p)d+=s,h+="\t";if(d<u&&(h+=Y(u-d)),h!=c)return _o(o,h,rt(t,0),rt(t,c.length),"+input"),a.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var g=o.sel.ranges[f];if(g.head.line==t&&g.head.ch<c.length){var m=rt(t,c.length);eo(o,f,new Ei(m,m));break}}}Rs.defineInitHook=function(e){return Is.push(e)};var zs=null;function Fs(e){zs=e}function Os(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 h=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var p=r.ranges[d],f=p.from(),g=p.to();p.empty()&&(n&&n>0?f=rt(f.line,f.ch-n):e.state.overwrite&&!a?g=rt(g.line,Math.min(Ke(o,g.line).text.length,g.ch+Q(l).length)):a&&zs&&zs.lineWise&&zs.text.join("\n")==l.join("\n")&&(f=g=rt(f.line,0)));var m={from:f,to:g,text:u?u[d%u.length]:l,origin:i||(a?"paste":e.state.cutIncoming>s?"cut":"+input")};fo(e.doc,m),hn(e,"inputRead",e,m)}t&&!a&&Ns(e,t),zr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ds(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||ni(t,(function(){return Os(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=Ls(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Ls(e,i.head.line,"smart"));s&&hn(e,"electricInput",e,i.head.line)}}}function js(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:rt(i,0),head:rt(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Bs(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"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"),m&&(e.style.border="1px solid black"),Bs(e),t}function Vs(e,t,n,r,i){var o=t,s=n,a=Ke(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 h=n>0?c>=55296&&c<56320:c>=56320&&c<57343;s=new rt(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(h?2:1))),-n)}}else s=i?function(e,t,n,r){var i=de(t,e.doc.direction);if(!i)return rs(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=ce(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 rs(t,n,r);var a,l=function(e,n){return ns(t,e instanceof rt?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(a=a||Fn(e,t),tr(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 h=1==s.level==r<0,d=l(n,h?1:-1);if(null!=d&&(h?d<=s.to&&d<=c.end:d>=s.from&&d>=c.begin)){var p=h?"before":"after";return new rt(n.line,d,p)}}var f=function(e,t,r){for(var o=function(e,t){return t?new rt(n.line,l(e,1),"before"):new rt(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)}},g=f(o+r,r,c);if(g)return g;var m=r>0?c.end:l(c.begin,-1);return null==m||r>0&&m==t.text.length||!(g=f(r>0?0:i.length-1,r,u(m)))?null:g}(e.cm,a,t,n):rs(a,t,n);if(null==s){if(o||((u=t.line+l)<e.first||u>=e.first+e.size||(t=new rt(u,t.ch,t.sticky),!(a=Ke(e,u)))))return!1;t=is(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,h="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var f=a.text.charAt(t.ch)||"\n",g=re(f,d)?"w":h&&"\n"==f?"n":!h||/\s/.test(f)?null:"p";if(!h||p||g||(g="s"),c&&c!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(c=g),n>0&&!u(!p))break}var m=uo(e,t,o,s,!0);return ot(o,m)&&(m.hitSide=!0),m}function qs(e,t,n,r){var i,o,s=e.doc,a=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,N(e).innerHeight||s(e).documentElement.clientHeight),u=Math.max(l-.5*sr(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=$n(e,a,i)).outside;){if(n<0?i<=0:i>=s.height){o.hitSide=!0;break}i+=5*n}return o}var Ws=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Hs(e,t){var n=zn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=In(n,r,t.line),o=de(r,e.doc.direction),s="left";o&&(s=ce(o,t.ch)%2?"right":"left");var a=jn(i.map,t.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Us(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 Us(e.clipPos(rt(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 Zs(o,t,n)}}function Zs(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!I(r,t))return Us(rt($e(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 Us(rt($e(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=$e(i<0?e.line:e.rest[i]),h=o[s]+r;return(r<0||a!=t)&&(h=o[s+(r?1:0)]),rt(c,h)}}}var h=c(s,a,n);if(h)return Us(h,i);for(var d=a.nextSibling,p=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(h=c(d,d.firstChild,0))return Us(rt(h.line,h.ch-p),i);p+=d.textContent.length}for(var f=a.previousSibling,g=n;f;f=f.previousSibling){if(h=c(f,f.firstChild,-1))return Us(rt(h.line,h.ch+g),i);g+=f.textContent.length}}Ws.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=js(r);Fs({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,H),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;r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),l.value=zs.text.join("\n");var u=L(i.ownerDocument);O(l),setTimeout((function(){r.display.lineSpace.removeChild(a),u.focus(),u==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Bs(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),fe(i,"paste",(function(e){!o(e)||ve(r,e)||Ds(e,r)||a<=11&&setTimeout(ri(r,(function(){return t.updateFromDOM()})),20)})),fe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(i,"touchstart",(function(){return n.forceCompositionEnd()})),fe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(i,"copy",s),fe(i,"cut",s)},Ws.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ws.prototype.prepareSelection=function(){var e=br(this.cm,!1);return e.focus=L(this.div.ownerDocument)==this.div,e},Ws.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ws.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ws.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!=it(lt(s,a),i)||0!=it(at(s,a),o)){var l=t.display.view,u=i.line>=t.display.viewFrom&&Hs(t,i)||{node:l[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&Hs(t,o);if(!c){var h=l[l.length-1].measure,d=h.maps?h.maps[h.maps.length-1]:h.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.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()}}},Ws.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)},Ws.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Ws.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ws.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return I(this.div,t)},Ws.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&L(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ws.prototype.blur=function(){this.div.blur()},Ws.prototype.getField=function(){return this.div},Ws.prototype.supportsTouch=function(){return!0},Ws.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):ni(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))}))},Ws.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ws.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(y&&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&&ni(t,(function(){ro(t.doc,Ti(n,r),H),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ws.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=rt(s.line-1,Ke(r.doc,s.line-1).length)),a.ch==Ke(r.doc,a.line).text.length&&a.line<r.lastLine()&&(a=rt(a.line+1,0)),s.line<i.viewFrom||a.line>i.viewTo-1)return!1;s.line==i.viewFrom||0==(e=pr(r,s.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=pr(r,a.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=$e(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var h=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 h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var o,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(rt(r,0),rt(i+1,0),(m=+d,function(e){return e.id==m}));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 g=0;g<t.childNodes.length;g++)h(t.childNodes[g]);/^(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 m}for(;h(t),t!=n;)t=t.nextSibling,l=!1;return o}(r,n,u,t,l)),d=Ye(r.doc,rt(t,0),rt(l,Ke(r.doc,l).text.length));h.length>1&&d.length>1;)if(Q(h)==Q(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),t++}for(var p=0,f=0,g=h[0],m=d[0],y=Math.min(g.length,m.length);p<y&&g.charCodeAt(p)==m.charCodeAt(p);)++p;for(var v=Q(h),_=Q(d),b=Math.min(v.length-(1==h.length?p:0),_.length-(1==d.length?p:0));f<b&&v.charCodeAt(v.length-f-1)==_.charCodeAt(_.length-f-1);)++f;if(1==h.length&&1==d.length&&t==s.line)for(;p&&p>s.ch&&v.charCodeAt(v.length-f-1)==_.charCodeAt(_.length-f-1);)p--,f++;h[h.length-1]=v.slice(0,v.length-f).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var x=rt(t,p),w=rt(l,d.length?Q(d).length-f:0);return h.length>1||h[0]||it(x,w)?(_o(r.doc,h,x,w,"+input"),!0):void 0},Ws.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ws.prototype.reset=function(){this.forceCompositionEnd()},Ws.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ws.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))},Ws.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ni(this.cm,(function(){return fr(e.cm)}))},Ws.prototype.setUneditable=function(e){e.contentEditable="false"},Ws.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ri(this.cm,Os)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ws.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ws.prototype.onContextMenu=function(){},Ws.prototype.resetPosition=function(){},Ws.prototype.needsContentAttribute=!0;var Ks=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null,this.resetting=!1};Ks.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=js(r);Fs({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),O(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),fe(i,"input",(function(){s&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(i,"paste",(function(e){ve(r,e)||Ds(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",(function(t){if(!Sn(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)}})),fe(e.lineSpace,"selectstart",(function(t){Sn(e,t)||we(t)})),fe(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"})}})),fe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ks.prototype.createField=function(e){this.wrapper=Gs(),this.textarea=this.wrapper.firstChild},Ks.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ks.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=br(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},Ks.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")},Ks.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&&O(this.textarea),s&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null));this.resetting=!1}},Ks.prototype.getField=function(){return this.textarea},Ks.prototype.supportsTouch=function(){return!1},Ks.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||L(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},Ks.prototype.blur=function(){this.textarea.blur()},Ks.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ks.prototype.receivedFocus=function(){this.slowPoll()},Ks.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ks.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))}))},Ks.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||_&&/[\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 ni(t,(function(){Os(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},Ks.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ks.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},Ks.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=dr(n,e),u=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ri(n,ro)(n.doc,Ti(o),H);var c,h=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=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),s&&a>=9&&m(),C){Se(e);var g=function(){me(window,"mouseup",g),setTimeout(y,20)};fe(window,"mouseup",g)}else setTimeout(y,50)}function m(){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 y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=h,s&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!s||s&&a<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ri(n,ho)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ks.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ks.prototype.setUneditable=function(){},Ks.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!=As&&i(e,t,n)}:i)}e.defineOption=n,e.Init=As,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),qn(e),fr(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(rt(r,o))}r++}));for(var i=n.length-1;i>=0;i--)_o(e.doc,t,n[i],rt(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!=As&&e.refresh()})),n("specialCharPlaceholder",tn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"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){Ss(e),_i(e)}),!0),n("keyMap","default",(function(e,t,n){var r=es(t),i=n!=As&&es(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ps,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=yi(t,e.options.lineNumbers),_i(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ur(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Wr(e)}),!0),n("scrollbarStyle","native",(function(e){Xr(e),Wr(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),_i(e)}),!0),n("firstLineNumber",1,_i,!0),n("lineNumberFormatter",(function(e){return e}),_i,!0),n("showCursorWhenSelecting",!1,_r,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Mr(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,Ts),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,_r,!0),n("singleCursorHeightPerLine",!0,_r,!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)}(Rs),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){N(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)&&ri(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"](es(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:ii((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++,fr(this)})),removeOverlay:ii((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 fr(this)}})),indentLine:ii((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),tt(this.doc,e)&&Ls(this,e,t,n)})),indentSelection:ii((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&&(Ls(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)Ls(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&eo(this.doc,r,new Ei(o,u[r].to()),H)}}})),getTokenAt:function(e,t){return xt(this,e,t)},getLineTokens:function(e,t){return xt(this,rt(e),t,!0)},getTokenTypeAt:function(e){e=ct(this.doc,e);var t,n=gt(this,Ke(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==q(r,u.val)&&r.push(u.val)}return r},getStateAfter:function(e,t){var n=this.doc;return mt(this,(e=ut(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Yn(this,null==e?n.head:"object"==typeof e?ct(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Kn(this,ct(this.doc,e),t||"page")},coordsChar:function(e,t){return $n(this,(e=Zn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Zn(this,{top:e,left:0},t||"page").top,et(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=Ke(this.doc,e)}else r=e;return Xn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Ut(r):0)},defaultTextHeight:function(){return sr(this.display)},defaultCharWidth:function(){return ar(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,ct(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 h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>d&&(c=d-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=Ir(o,s)).scrollTop&&Nr(o,a.scrollTop),null!=a.scrollLeft&&Br(o,a.scrollLeft))},triggerOnKeyDown:ii(fs),triggerOnKeyPress:ii(ms),triggerOnKeyUp:gs,triggerOnMouseDown:ii(bs),execCommand:function(e){if(os.hasOwnProperty(e))return os[e].call(null,this)},triggerElectric:ii((function(e){Ns(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=ct(this.doc,e),s=0;s<t&&!(o=Vs(this.doc,o,i,n,r)).hitSide;++s);return o},moveH:ii((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:ii((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):ts(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=ct(this.doc,e),a=0;a<t;++a){var l=Yn(this,s,"div");if(null==o?o=l.left:l.left=o,(s=qs(this,l,i,n)).hitSide)break}return s},moveV:ii((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=qs(n,a,e,t);return"page"==t&&s==r.sel.primary()&&Lr(n,Kn(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=Ke(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=re(o,i)?function(e){return re(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};n>0&&s(t.charAt(n-1));)--n;for(;r<t.length&&s(t.charAt(r));)++r}return new Ei(rt(e.line,n),rt(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?z(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:ii((function(e,t){Fr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Tn(this)-this.display.barHeight,width:e.scrollWidth-Tn(this)-this.display.barWidth,clientHeight:Rn(this),clientWidth:Pn(this)}},scrollIntoView:ii((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:rt(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){Or(e),e.curOp.scrollToPos=t}(this,e):Dr(this,e.from,e.to,e.margin)})),setSize:ii((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 ni(this,e)},startOperation:function(){return Kr(this)},endOperation:function(){return Yr(this)},refresh:ii((function(){var e=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,qn(this),Fr(this,this.doc.scrollLeft,this.doc.scrollTop),pi(this.display),(null==e||Math.abs(e-sr(this.display))>.5||this.options.lineWrapping)&&hr(this),ye(this,"refresh",this)})),swapDoc:ii((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),qn(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}},xe(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})}}(Rs);var Ys="iter insert remove copy getEditor constructor".split(" ");for(var Qs in Fo.prototype)Fo.prototype.hasOwnProperty(Qs)&&q(Ys,Qs)<0&&(Rs.prototype[Qs]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fo.prototype[Qs]));return xe(Fo),Rs.inputStyles={textarea:Ks,contenteditable:Ws},Rs.defineMode=function(e){Rs.defaults.mode||"null"==e||(Rs.defaults.mode=e),Be.apply(this,arguments)},Rs.defineMIME=function(e,t){je[e]=t},Rs.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Rs.defineMIME("text/plain","null"),Rs.defineExtension=function(e,t){Rs.prototype[e]=t},Rs.defineDocExtension=function(e,t){Fo.prototype[e]=t},Rs.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&&(fe(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&&(me(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Rs((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a},function(e){e.off=me,e.on=fe,e.wheelEventPixels=Ci,e.Doc=Fo,e.splitLines=ze,e.countColumn=G,e.findColumn=Z,e.isWordChar=ne,e.Pass=W,e.signal=ye,e.Line=Kt,e.changeEnd=Pi,e.scrollbarModel=Ur,e.Pos=rt,e.cmpPos=it,e.modes=Ne,e.mimeModes=je,e.resolveMode=Ge,e.getMode=Ve,e.modeExtensions=qe,e.extendMode=We,e.copyState=He,e.startState=Xe,e.innerMode=Ue,e.commands=os,e.keyMap=Xo,e.keyName=$o,e.isModifierKey=Qo,e.lookupKey=Yo,e.normalizeKeyMap=Ko,e.StringStream=Ze,e.SharedTextMarker=Ro,e.TextMarker=To,e.LineWidget=Ao,e.e_preventDefault=we,e.e_stopPropagation=ke,e.e_stop=Se,e.addClass=z,e.contains=I,e.rmClass=E,e.keyNames=qo}(Rs),Rs.version="5.65.9",Rs}()},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,h=n.wordCharacters||/[\w$\xa1-\uffff]/,d=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 g(e,t,n){return r=e,i=n,t}function m(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=m,g("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=m),g("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==r&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return g(r);if("="==r&&e.eat(">"))return g("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==r)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):$e(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/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==r)return t.tokenize=v,v(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==r&&e.eatWhile(h))return g("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("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(".")?g("."):g("operator","operator",e.current());if(h.test(r)){e.eatWhile(h);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return g(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",i)}return g("variable","variable",i)}}function y(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return g("comment","comment")}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=m;break}r=!r&&"\\"==n}return g("quasi","string-2",e.current())}function _(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="([{}])".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(h.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 b={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function x(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 w(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 k(e,t,n,r,i){var o=e.cc;for(C.state=e,C.stream=i,C.marked=null,C.cc=o,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?V:B)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return C.marked?C.marked:"variable"==n&&w(e,r)?"variable-2":t}}var C={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)C.cc.push(arguments[e])}function A(){return S.apply(null,arguments),!0}function E(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function M(e){var t=C.state;if(C.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=T(e,t.context);if(null!=r)return void(t.context=r)}else if(!E(e,t.localVars))return void(t.localVars=new I(e,t.localVars));n.globalVars&&!E(e,t.globalVars)&&(t.globalVars=new I(e,t.globalVars))}}function T(e,t){if(t){if(t.block){var n=T(e,t.prev);return n?n==t.prev?t:new R(n,t.vars,!0):null}return E(e,t.vars)?t:new R(t.prev,new I(e,t.vars),!1)}return null}function P(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function R(e,t,n){this.prev=e,this.vars=t,this.block=n}function I(e,t){this.name=e,this.next=t}var L=new I("this",new I("arguments",null));function z(){C.state.context=new R(C.state.context,C.state.localVars,!1),C.state.localVars=L}function F(){C.state.context=new R(C.state.context,C.state.localVars,!0),C.state.localVars=null}function O(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function D(e,t){var n=function(){var n=C.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 x(r,C.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function N(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function j(e){return function t(n){return n==e?A():";"==e||"}"==n||")"==n||"]"==n?S():A(t)}}function B(e,t){return"var"==e?A(D("vardef",t),Ce,j(";"),N):"keyword a"==e?A(D("form"),W,B,N):"keyword b"==e?A(D("form"),B,N):"keyword d"==e?C.stream.match(/^\s*$/,!1)?A():A(D("stat"),U,j(";"),N):"debugger"==e?A(j(";")):"{"==e?A(D("}"),F,le,N,O):";"==e?A():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==N&&C.state.cc.pop()(),A(D("form"),W,B,N,Pe)):"function"==e?A(ze):"for"==e?A(D("form"),F,Re,B,O,N):"class"==e||c&&"interface"==t?(C.marked="keyword",A(D("form","class"==e?e:t),je,N)):"variable"==e?c&&"declare"==t?(C.marked="keyword",A(B)):c&&("module"==t||"enum"==t||"type"==t)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==t?A(Qe):"type"==t?A(Oe,j("operator"),pe,j(";")):A(D("form"),Se,j("{"),D("}"),le,N,N)):c&&"namespace"==t?(C.marked="keyword",A(D("form"),V,B,N)):c&&"abstract"==t?(C.marked="keyword",A(B)):A(D("stat"),te):"switch"==e?A(D("form"),W,j("{"),D("}","switch"),F,le,N,N,O):"case"==e?A(V,j(":")):"default"==e?A(j(":")):"catch"==e?A(D("form"),z,G,B,N,O):"export"==e?A(D("stat"),qe,N):"import"==e?A(D("stat"),He,N):"async"==e?A(B):"@"==t?A(V,B):S(D("stat"),V,j(";"),N)}function G(e){if("("==e)return A(De,j(")"))}function V(e,t){return H(e,t,!1)}function q(e,t){return H(e,t,!0)}function W(e){return"("!=e?S():A(D(")"),U,j(")"),N)}function H(e,t,n){if(C.state.fatArrowAt==C.stream.start){var r=n?J:Q;if("("==e)return A(z,D(")"),se(De,")"),N,j("=>"),r,O);if("variable"==e)return S(z,Se,j("=>"),r,O)}var i=n?Z:X;return b.hasOwnProperty(e)?A(i):"function"==e?A(ze,i):"class"==e||c&&"interface"==t?(C.marked="keyword",A(D("form"),Ne,N)):"keyword c"==e||"async"==e?A(n?q:V):"("==e?A(D(")"),U,j(")"),N,i):"operator"==e||"spread"==e?A(n?q:V):"["==e?A(D("]"),Ye,N,i):"{"==e?ae(re,"}",null,i):"quasi"==e?S(K,i):"new"==e?A(function(e){return function(t){return"."==t?A(e?ee:$):"variable"==t&&c?A(xe,e?Z:X):S(e?q:V)}}(n)):A()}function U(e){return e.match(/[;\}\)\],]/)?S():S(V)}function X(e,t){return","==e?A(U):Z(e,t,!1)}function Z(e,t,n){var r=0==n?X:Z,i=0==n?V:q;return"=>"==e?A(z,n?J:Q,O):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?A(r):c&&"<"==t&&C.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?A(D(">"),se(pe,">"),N,r):"?"==t?A(V,j(":"),i):A(i):"quasi"==e?S(K,r):";"!=e?"("==e?ae(q,")","call",r):"."==e?A(ne,r):"["==e?A(D("]"),U,j("]"),N,r):c&&"as"==t?(C.marked="keyword",A(pe,r)):"regexp"==e?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),A(i)):void 0:void 0}function K(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?A(K):A(U,Y)}function Y(e){if("}"==e)return C.marked="string-2",C.state.tokenize=v,A(K)}function Q(e){return _(C.stream,C.state),S("{"==e?B:V)}function J(e){return _(C.stream,C.state),S("{"==e?B:q)}function $(e,t){if("target"==t)return C.marked="keyword",A(X)}function ee(e,t){if("target"==t)return C.marked="keyword",A(Z)}function te(e){return":"==e?A(N,B):S(X,j(";"),N)}function ne(e){if("variable"==e)return C.marked="property",A()}function re(e,t){return"async"==e?(C.marked="property",A(re)):"variable"==e||"keyword"==C.style?(C.marked="property","get"==t||"set"==t?A(ie):(c&&C.state.fatArrowAt==C.stream.start&&(n=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+n[0].length),A(oe))):"number"==e||"string"==e?(C.marked=a?"property":C.style+" property",A(oe)):"jsonld-keyword"==e?A(oe):c&&P(t)?(C.marked="keyword",A(re)):"["==e?A(V,ue,j("]"),oe):"spread"==e?A(q,oe):"*"==t?(C.marked="keyword",A(re)):":"==e?S(oe):void 0;var n}function ie(e){return"variable"!=e?S(oe):(C.marked="property",A(ze))}function oe(e){return":"==e?A(q):"("==e?S(ze):void 0}function se(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var s=C.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),A((function(n,r){return n==t||r==t?S():S(e)}),r)}return i==t||o==t?A():n&&n.indexOf(";")>-1?S(e):A(j(t))}return function(n,i){return n==t||i==t?A():S(e,r)}}function ae(e,t,n){for(var r=3;r<arguments.length;r++)C.cc.push(arguments[r]);return A(D(t,n),se(e,t),N)}function le(e){return"}"==e?A():S(B,le)}function ue(e,t){if(c){if(":"==e)return A(pe);if("?"==t)return A(ue)}}function ce(e,t){if(c&&(":"==e||"in"==t))return A(pe)}function he(e){if(c&&":"==e)return C.stream.match(/^\s*\w+\s+is\b/,!1)?A(V,de,pe):A(pe)}function de(e,t){if("is"==t)return C.marked="keyword",A()}function pe(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(C.marked="keyword",A("typeof"==t?q:pe)):"variable"==e||"void"==t?(C.marked="type",A(be)):"|"==t||"&"==t?A(pe):"string"==e||"number"==e||"atom"==e?A(be):"["==e?A(D("]"),se(pe,"]",","),N,be):"{"==e?A(D("}"),ge,N,be):"("==e?A(se(_e,")"),fe,be):"<"==e?A(se(pe,">"),pe):"quasi"==e?S(ye,be):void 0}function fe(e){if("=>"==e)return A(pe)}function ge(e){return e.match(/[\}\)\]]/)?A():","==e||";"==e?A(ge):S(me,ge)}function me(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",A(me)):"?"==t||"number"==e||"string"==e?A(me):":"==e?A(pe):"["==e?A(j("variable"),ce,j("]"),me):"("==e?S(Fe,me):e.match(/[;\}\)\],]/)?void 0:A()}function ye(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?A(ye):A(pe,ve)}function ve(e){if("}"==e)return C.marked="string-2",C.state.tokenize=v,A(ye)}function _e(e,t){return"variable"==e&&C.stream.match(/^\s*[?:]/,!1)||"?"==t?A(_e):":"==e?A(pe):"spread"==e?A(_e):S(pe)}function be(e,t){return"<"==t?A(D(">"),se(pe,">"),N,be):"|"==t||"."==e||"&"==t?A(pe):"["==e?A(pe,j("]"),be):"extends"==t||"implements"==t?(C.marked="keyword",A(pe)):"?"==t?A(pe,j(":"),pe):void 0}function xe(e,t){if("<"==t)return A(D(">"),se(pe,">"),N,be)}function we(){return S(pe,ke)}function ke(e,t){if("="==t)return A(pe)}function Ce(e,t){return"enum"==t?(C.marked="keyword",A(Qe)):S(Se,ue,Me,Te)}function Se(e,t){return c&&P(t)?(C.marked="keyword",A(Se)):"variable"==e?(M(t),A()):"spread"==e?A(Se):"["==e?ae(Ee,"]"):"{"==e?ae(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),"spread"==e?A(Se):"}"==e?S():"["==e?A(V,j("]"),j(":"),Ae):A(j(":"),Se,Me)):(M(t),A(Me))}function Ee(){return S(Se,Me)}function Me(e,t){if("="==t)return A(q)}function Te(e){if(","==e)return A(Ce)}function Pe(e,t){if("keyword b"==e&&"else"==t)return A(D("form","else"),B,N)}function Re(e,t){return"await"==t?A(Re):"("==e?A(D(")"),Ie,N):void 0}function Ie(e){return"var"==e?A(Ce,Le):"variable"==e?A(Le):S(Le)}function Le(e,t){return")"==e?A():";"==e?A(Le):"in"==t||"of"==t?(C.marked="keyword",A(V,Le)):S(V,Le)}function ze(e,t){return"*"==t?(C.marked="keyword",A(ze)):"variable"==e?(M(t),A(ze)):"("==e?A(z,D(")"),se(De,")"),N,he,B,O):c&&"<"==t?A(D(">"),se(we,">"),N,ze):void 0}function Fe(e,t){return"*"==t?(C.marked="keyword",A(Fe)):"variable"==e?(M(t),A(Fe)):"("==e?A(z,D(")"),se(De,")"),N,he,O):c&&"<"==t?A(D(">"),se(we,">"),N,Fe):void 0}function Oe(e,t){return"keyword"==e||"variable"==e?(C.marked="type",A(Oe)):"<"==t?A(D(">"),se(we,">"),N):void 0}function De(e,t){return"@"==t&&A(V,De),"spread"==e?A(De):c&&P(t)?(C.marked="keyword",A(De)):c&&"this"==e?A(ue,Me):S(Se,ue,Me)}function Ne(e,t){return"variable"==e?je(e,t):Be(e,t)}function je(e,t){if("variable"==e)return M(t),A(Be)}function Be(e,t){return"<"==t?A(D(">"),se(we,">"),N,Be):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(C.marked="keyword"),A(c?pe:V,Be)):"{"==e?A(D("}"),Ge,N):void 0}function Ge(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&P(t))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",A(Ge)):"variable"==e||"keyword"==C.style?(C.marked="property",A(Ve,Ge)):"number"==e||"string"==e?A(Ve,Ge):"["==e?A(V,ue,j("]"),Ve,Ge):"*"==t?(C.marked="keyword",A(Ge)):c&&"("==e?S(Fe,Ge):";"==e||","==e?A(Ge):"}"==e?A():"@"==t?A(V,Ge):void 0}function Ve(e,t){if("!"==t)return A(Ve);if("?"==t)return A(Ve);if(":"==e)return A(pe,Me);if("="==t)return A(q);var n=C.state.lexical.prev;return S(n&&"interface"==n.info?Fe:ze)}function qe(e,t){return"*"==t?(C.marked="keyword",A(Ke,j(";"))):"default"==t?(C.marked="keyword",A(V,j(";"))):"{"==e?A(se(We,"}"),Ke,j(";")):S(B)}function We(e,t){return"as"==t?(C.marked="keyword",A(j("variable"))):"variable"==e?S(q,We):void 0}function He(e){return"string"==e?A():"("==e?S(V):"."==e?S(X):S(Ue,Xe,Ke)}function Ue(e,t){return"{"==e?ae(Ue,"}"):("variable"==e&&M(t),"*"==t&&(C.marked="keyword"),A(Ze))}function Xe(e){if(","==e)return A(Ue,Xe)}function Ze(e,t){if("as"==t)return C.marked="keyword",A(Ue)}function Ke(e,t){if("from"==t)return C.marked="keyword",A(V)}function Ye(e){return"]"==e?A():S(se(q,"]"))}function Qe(){return S(D("form"),Se,j("{"),D("}"),se(Je,"}"),N,N)}function Je(){return S(Se,Me)}function $e(e,t,n){return t.tokenize==m&&/^(?: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,O.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new x((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new R(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(),_(e,t)),t.tokenize!=y&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",k(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==y||t.tokenize==v)return e.Pass;if(t.tokenize!=m)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!=Pe&&c!=O)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==X||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=a==h;return"vardef"==h?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==h&&"{"==a?l.indented:"form"==h?l.indented+o:"stat"==h?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||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?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:$e,skipExpression:function(t){k(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,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+h],h+=d,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,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,g=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+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-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*g}},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 h(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function d(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 g(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function m(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function y(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function v(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function _(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,h,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,g,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,m,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,y,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,v,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,_,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),h=.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+h)),Math.min(o,Math.floor(r+(a-l)*c/a+h)),s)}var d=n[r],p=i,f=o;for(t(n,i,r),s(n[o],d)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[i],d)?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 h(e){return e.maxX-e.minX+(e.maxY-e.minY)}function d(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 g(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):d(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||d(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||!d(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));g(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);g(e,c,h,l,this.compareMinY);for(var d=c;d<=h;d+=l){var p=Math.min(d+l-1,h);i.children.push(this._build(e,d,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),h=(d=e,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-u);h<o?(o=h,i=u<i?u:i,s=l):h===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var d,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,h,d=1/0,p=1/0,f=t;f<=n-t;f++){var g=s(e,0,f,this.toBBox),m=s(e,f,n,this.toBBox),y=(i=g,o=m,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),h=Math.min(i.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,h-l)),v=c(g)+c(m);y<d?(d=y,r=f,p=v<p?v:p):y===d&&v<p&&(p=v,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=h(o)+h(l),c=t;c<n-t;c++){var d=e.children[c];a(o,e.leaf?i(d):d),u+=h(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];a(l,e.leaf?i(f):f),u+=h(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),h=Object.prototype.hasOwnProperty,d=/^[: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 g(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 m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(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){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function _(e,t,n,r){var i=m.hasOwnProperty(t)?m[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!!h.call(f,e)||!h.call(p,e)&&(d.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,v);m[t]=new g(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,v);m[t]=new g(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,v);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(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 z=Symbol.iterator;function F(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=z&&e[z]||e["@@iterator"])?e:null}var O,D=Object.assign;function N(e){if(void 0===O)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);O=t&&t[1]||""}return"\n"+O+e}var j=!1;function B(e,t){if(!e||j)return"";j=!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{j=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function G(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("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 V(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:V(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return V(e(t))}catch(e){}}return null}function q(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 V(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 X(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 Z(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 Y(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 Q(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function J(e,t){Q(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 $(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&&Z(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,he=(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 de(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 ge(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 me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(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 ye=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 ve(e,t){if(t){if(ye[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 _e(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=_i(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 ze={};Object.defineProperty(ze,"passive",{get:function(){Le=!0}}),window.addEventListener("test",ze,ze),window.removeEventListener("test",ze,ze)}catch(ce){Le=!1}function Fe(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 Oe=!1,De=null,Ne=!1,je=null,Be={onError:function(e){Oe=!0,De=e}};function Ge(e,t,n,r,i,o,s,a,l){Oe=!1,De=null,Fe.apply(Be,arguments)}function Ve(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 qe(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(Ve(e)!==e)throw Error(o(188))}function He(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(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 Xe=i.unstable_scheduleCallback,Ze=i.unstable_cancelCallback,Ke=i.unstable_shouldYield,Ye=i.unstable_requestPaint,Qe=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,$e=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 ht(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 dt(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=ht(a):0!=(o&=s)&&(r=ht(o))}else 0!=(s=n&~i)?r=ht(s):0!==o&&(r=ht(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 gt(){var e=ut;return 0==(4194240&(ut<<=1))&&(ut=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function vt(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 _t=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=[],zt="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 Ft(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 Ot(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=_i(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=vi(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(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 Nt(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=_i(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 jt(e,t,n){Nt(e)&&n.delete(t)}function Bt(){At=!1,null!==Mt&&Nt(Mt)&&(Mt=null),null!==Tt&&Nt(Tt)&&(Tt=null),null!==Pt&&Nt(Pt)&&(Pt=null),Rt.forEach(jt),It.forEach(jt)}function Gt(e,t){e.blockedOn===t&&(e.blockedOn=null,At||(At=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bt)))}function Vt(e){function t(t){return Gt(t,e)}if(0<Et.length){Gt(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Mt&&Gt(Mt,e),null!==Tt&&Gt(Tt,e),null!==Pt&&Gt(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 qt=b.ReactCurrentBatchConfig,Wt=!0;function Ht(e,t,n,r){var i=_t,o=qt.transition;qt.transition=null;try{_t=1,Xt(e,t,n,r)}finally{_t=i,qt.transition=o}}function Ut(e,t,n,r){var i=_t,o=qt.transition;qt.transition=null;try{_t=4,Xt(e,t,n,r)}finally{_t=i,qt.transition=o}}function Xt(e,t,n,r){if(Wt){var i=Kt(e,t,n,r);if(null===i)Wr(e,t,r,Zt,n),Ft(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Mt=Ot(Mt,e,t,n,r,i),!0;case"dragenter":return Tt=Ot(Tt,e,t,n,r,i),!0;case"mouseover":return Pt=Ot(Pt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Rt.set(o,Ot(Rt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,It.set(o,Ot(It.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ft(e,r),4&t&&-1<zt.indexOf(e)){for(;null!==i;){var o=_i(i);if(null!==o&&xt(o),null===(o=Kt(e,t,n,r))&&Wr(e,t,r,Zt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Zt=null;function Kt(e,t,n,r){if(Zt=null,null!==(e=vi(e=xe(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(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 Zt=e,null}function Yt(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(Je()){case $e:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Jt=null,$t=null;function en(){if($t)return $t;var e,t,n=Jt,r=n.length,i="value"in Qt?Qt.value:Qt.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 $t=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),hn=D({},un,{view:0,detail:0}),dn=on(hn),pn=D({},hn,{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),gn=on(D({},pn,{dataTransfer:0})),mn=on(D({},hn,{relatedTarget:0})),yn=on(D({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=D({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_n=on(vn),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({},hn,{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({},hn,{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],zn=c&&"CompositionEvent"in window,Fn=null;c&&"documentMode"in document&&(Fn=document.documentMode);var On=c&&"TextEvent"in window&&!Fn,Dn=c&&(!zn||Fn&&8<Fn&&11>=Fn),Nn=String.fromCharCode(32),jn=!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 Gn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1,qn={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?!!qn[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,Xn=null;function Zn(e){Nr(e,0)}function Kn(e){if(X(bi(e)))return e}function Yn(e,t){if("change"===e)return t}var Qn=!1;if(c){var Jn;if(c){var $n="oninput"in document;if(!$n){var er=document.createElement("div");er.setAttribute("oninput","return;"),$n="function"==typeof er.oninput}Jn=$n}else Jn=!1;Qn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Un&&(Un.detachEvent("onpropertychange",nr),Xn=Un=null)}function nr(e){if("value"===e.propertyName&&Kn(Xn)){var t=[];Hn(t,Xn,e,xe(e)),Re(Zn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Xn=n,(Un=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Xn)}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(!h.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 hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((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=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(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 gr=c&&"documentMode"in document&&11>=document.documentMode,mr=null,yr=null,vr=null,_r=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_r||null==mr||mr!==Z(r)||(r="selectionStart"in(r=mr)&&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},vr&&lr(vr,r)||(vr=r,0<(r=Ur(yr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}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 zr=Rr[Lr];Ir(zr.toLowerCase(),"on"+(zr[0].toUpperCase()+zr.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 Fr="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(" "),Or=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fr));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(Ge.apply(this,arguments),Oe){if(!Oe)throw Error(o(198));var c=De;Oe=!1,De=null,Ne||(Ne=!0,je=c)}}(r,t,void 0,e),e.currentTarget=null}function Nr(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(Ne)throw e=je,Ne=!1,je=null,e}function jr(e,t){var n=t[gi];void 0===n&&(n=t[gi]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var Gr="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[Gr]){e[Gr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Or.has(t)||Br(t,!1,e),Br(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Gr]||(t[Gr]=!0,Br("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Yt(t)){case 1:var i=Ht;break;case 4:i=Ut;break;default:i=Xt}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=vi(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=mn;break;case"focusout":u="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;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=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Ar:case Er:case Mr:l=yn;break;case Tr:l=Pn;break;case"scroll":l=dn;break;case"wheel":l=In;break;case"copy":case"cut":case"paste":l=_n;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Mn}var c=0!=(4&t),h=!c&&"scroll"===e,d=c?null!==a?a+"Capture":null:a;c=[];for(var p,f=r;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==d&&null!=(g=Ie(f,d))&&c.push(Hr(f,g,p))),h)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)||!vi(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)?vi(u):null)&&(u!==(h=Ve(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=fn,g="onMouseLeave",d="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(c=Mn,g="onPointerLeave",d="onPointerEnter",f="pointer"),h=null==l?a:bi(l),p=null==u?a:bi(u),(a=new c(g,f+"leave",l,n,i)).target=h,a.relatedTarget=p,g=null,vi(i)===r&&((c=new c(d,f+"enter",u,n,i)).target=p,c.relatedTarget=h,g=c),h=g,l&&u)e:{for(d=u,f=0,p=c=l;p;p=Xr(p))f++;for(p=0,g=d;g;g=Xr(g))p++;for(;0<f-p;)c=Xr(c),f--;for(;0<p-f;)d=Xr(d),p--;for(;f--;){if(c===d||null!==d&&c===d.alternate)break e;c=Xr(c),d=Xr(d)}c=null}else c=null;null!==l&&Zr(s,a,l,c,!1),null!==u&&null!==h&&Zr(s,h,u,c,!0)}if("select"===(l=(a=r?bi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var m=Yn;else if(Wn(a))if(Qn)m=sr;else{m=ir;var y=rr}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=or);switch(m&&(m=m(e,r))?Hn(s,m,n,i):(y&&y(e,a,r),"focusout"===e&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&ee(a,"number",a.value)),y=r?bi(r):window,e){case"focusin":(Wn(y)||"true"===y.contentEditable)&&(mr=y,yr=r,vr=null);break;case"focusout":vr=yr=mr=null;break;case"mousedown":_r=!0;break;case"contextmenu":case"mouseup":case"dragend":_r=!1,br(s,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":br(s,n,i)}var v;if(zn)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Vn?Bn(e,n)&&(_="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(_="onCompositionStart");_&&(Dn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==_?"onCompositionEnd"===_&&Vn&&(v=en()):(Jt="value"in(Qt=i)?Qt.value:Qt.textContent,Vn=!0)),0<(y=Ur(r,_)).length&&(_=new bn(_,e,null,n,i),s.push({event:_,listeners:y}),(v||null!==(v=Gn(n)))&&(_.data=v))),(v=On?function(e,t){switch(e){case"compositionend":return Gn(t);case"keypress":return 32!==t.which?null:(jn=!0,Nn);case"textInput":return(e=t.data)===Nn&&jn?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!zn&&Bn(e,t)?(e=en(),$t=Jt=Qt=null,Vn=!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=v)}Nr(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 Xr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Zr(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,Yr=/\u0000|\uFFFD/g;function Qr(e){return("string"==typeof e?e:""+e).replace(Kr,"\n").replace(Yr,"")}function Jr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(o(425))}function $r(){}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 Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Vt(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 hi=Math.random().toString(36).slice(2),di="__reactFiber$"+hi,pi="__reactProps$"+hi,fi="__reactContainer$"+hi,gi="__reactEvents$"+hi,mi="__reactListeners$"+hi,yi="__reactHandles$"+hi;function vi(e){var t=e[di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[di]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[di])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function _i(e){return!(e=e[di]||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 zi(e,t,n){if(Mi.current!==Ei)throw Error(o(168));Ai(Mi,t),Ai(Ti,n)}function Fi(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,q(e)||"Unknown",i));return D({},n,r)}function Oi(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=Fi(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,Si(Ti),Si(Mi),Ai(Mi,e)):Si(Ti),Ai(Ti,n)}var Ni=null,ji=!1,Bi=!1;function Gi(e){null===Ni?Ni=[e]:Ni.push(e)}function Vi(){if(!Bi&&null!==Ni){Bi=!0;var e=0,t=_t;try{var n=Ni;for(_t=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ni=null,ji=!1}catch(t){throw null!==Ni&&(Ni=Ni.slice(e+1)),Xe($e,Vi),t}finally{_t=t,Bi=!1}}return null}var qi=[],Wi=0,Hi=null,Ui=0,Xi=[],Zi=0,Ki=null,Yi=1,Qi="";function Ji(e,t){qi[Wi++]=Ui,qi[Wi++]=Hi,Hi=e,Ui=t}function $i(e,t,n){Xi[Zi++]=Yi,Xi[Zi++]=Qi,Xi[Zi++]=Ki,Ki=e;var r=Yi;e=Qi;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,Yi=1<<32-st(t)+i|n<<i|r,Qi=o+e}else Yi=1<<o|n<<i|r,Qi=e}function eo(e){null!==e.return&&(Ji(e,1),$i(e,1,0))}function to(e){for(;e===Hi;)Hi=qi[--Wi],qi[Wi]=null,Ui=qi[--Wi],qi[Wi]=null;for(;e===Ki;)Ki=Xi[--Zi],Xi[Zi]=null,Qi=Xi[--Zi],Xi[Zi]=null,Yi=Xi[--Zi],Xi[Zi]=null}var no=null,ro=null,io=!1,oo=null;function so(e,t){var n=Ru(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:Yi,overflow:Qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ru(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 go(e){null===oo?oo=[e]:oo.push(e)}var mo=b.ReactCurrentBatchConfig;function yo(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 vo=Ci(null),_o=null,bo=null,xo=null;function wo(){xo=bo=_o=null}function ko(e){var t=vo.current;Si(vo),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){_o=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===_o)throw Error(o(308));bo=e,_o.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 zo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Ml)){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 Oo(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,vt(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 No(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 h=i.baseState;for(s=0,c=u=l=null,a=o;;){var d=a.lane,p=a.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,g=a;switch(d=t,p=n,g.tag){case 1:if("function"==typeof(f=g.payload)){h=f.call(p,h,d);break e}h=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(d="function"==typeof(f=g.payload)?f.call(p,h,d):f))break e;h=D({},h,d);break e;case 2:Ro=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===c?(u=c=p,l=h):c=c.next=p,s|=d;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(d=a).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===c&&(l=h),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);Ol|=s,e.lanes=s,e.memoizedState=h}}function jo(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 Go(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 Vo={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),o=zo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Fo(e,o,i))&&(nu(t,e,i,r),Oo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),o=zo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Fo(e,o,i))&&(nu(t,e,i,r),Oo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=zo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Fo(e,i,r))&&(nu(t,e,r,n),Oo(t,e,r))}};function qo(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=Vo,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&&Vo.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)&&(Go(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&&Vo.enqueueReplaceState(i,i.state,null),No(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Xo(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 Zo(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 Yo(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=Lu(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=Du(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?h(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=Xo(e,t,n),r.return=e,r):((r=zu(n.type,n.key,n.props,null,e.mode,r)).ref=Xo(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 h(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 d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Du(""+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=Xo(e,null,t),n.return=e,n;case w:return(t=Nu(t,e.mode,n)).return=e,t;case I:return d(e,(0,t._init)(t._payload),n)}if(te(t)||F(t))return(t=Fu(t,e.mode,n,null)).return=e,t;Zo(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)||F(n))return null!==i?null:h(e,t,n,r,null);Zo(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)||F(r))return h(t,e=e.get(n)||null,r,i,null);Zo(t,r)}return null}function g(i,o,a,l){for(var u=null,c=null,h=o,g=o=0,m=null;null!==h&&g<a.length;g++){h.index>g?(m=h,h=null):m=h.sibling;var y=p(i,h,a[g],l);if(null===y){null===h&&(h=m);break}e&&h&&null===y.alternate&&t(i,h),o=s(y,o,g),null===c?u=y:c.sibling=y,c=y,h=m}if(g===a.length)return n(i,h),io&&Ji(i,g),u;if(null===h){for(;g<a.length;g++)null!==(h=d(i,a[g],l))&&(o=s(h,o,g),null===c?u=h:c.sibling=h,c=h);return io&&Ji(i,g),u}for(h=r(i,h);g<a.length;g++)null!==(m=f(h,i,g,a[g],l))&&(e&&null!==m.alternate&&h.delete(null===m.key?g:m.key),o=s(m,o,g),null===c?u=m:c.sibling=m,c=m);return e&&h.forEach((function(e){return t(i,e)})),io&&Ji(i,g),u}function m(i,a,l,u){var c=F(l);if("function"!=typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(151));for(var h=c=null,g=a,m=a=0,y=null,v=l.next();null!==g&&!v.done;m++,v=l.next()){g.index>m?(y=g,g=null):y=g.sibling;var _=p(i,g,v.value,u);if(null===_){null===g&&(g=y);break}e&&g&&null===_.alternate&&t(i,g),a=s(_,a,m),null===h?c=_:h.sibling=_,h=_,g=y}if(v.done)return n(i,g),io&&Ji(i,m),c;if(null===g){for(;!v.done;m++,v=l.next())null!==(v=d(i,v.value,u))&&(a=s(v,a,m),null===h?c=v:h.sibling=v,h=v);return io&&Ji(i,m),c}for(g=r(i,g);!v.done;m++,v=l.next())null!==(v=f(g,i,m,v.value,u))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),a=s(v,a,m),null===h?c=v:h.sibling=v,h=v);return e&&g.forEach((function(e){return t(i,e)})),io&&Ji(i,m),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=Xo(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=Xo(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 g(r,o,s,l);if(F(s))return m(r,o,s,l);Zo(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=Du(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var Qo=Yo(!0),Jo=Yo(!1),$o={},es=Ci($o),ts=Ci($o),ns=Ci($o);function rs(e){if(e===$o)throw Error(o(174));return e}function is(e,t){switch(Ai(ns,t),Ai(ts,e),Ai(es,$o),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 hs(){for(var e=0;e<cs.length;e++)cs[e]._workInProgressVersionPrimary=null;cs.length=0}var ds=b.ReactCurrentDispatcher,ps=b.ReactCurrentBatchConfig,fs=0,gs=null,ms=null,ys=null,vs=!1,_s=!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,gs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=null===e||null===e.memoizedState?aa:la,e=n(r,i),_s){s=0;do{if(_s=!1,bs=0,25<=s)throw Error(o(301));s+=1,ys=ms=null,t.updateQueue=null,ds.current=ua,e=n(r,i)}while(_s)}if(ds.current=sa,t=null!==ms&&null!==ms.next,fs=0,ys=ms=gs=null,vs=!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===ys?gs.memoizedState=ys=e:ys=ys.next=e,ys}function Es(){if(null===ms){var e=gs.alternate;e=null!==e?e.memoizedState:null}else e=ms.next;var t=null===ys?gs.memoizedState:ys.next;if(null!==t)ys=t,ms=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ms=e).memoizedState,baseState:ms.baseState,baseQueue:ms.baseQueue,queue:ms.queue,next:null},null===ys?gs.memoizedState=ys=e:ys=ys.next=e}return ys}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=ms,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 h=c.lane;if((fs&h)===h)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 d={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=d,a=r):u=u.next=d,gs.lanes|=h,Ol|=h}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,gs.lanes|=s,Ol|=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=gs,r=Es(),i=t(),s=!ar(r.memoizedState,i);if(s&&(r.memoizedState=i,ba=!0),r=r.queue,Ws(Fs.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==ys&&1&ys.memoizedState.tag){if(n.flags|=2048,js(9,zs.bind(null,n,r,i,t),void 0,null),null===Tl)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=gs.updateQueue)?(t={lastEffect:null,stores:null},gs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function zs(e,t,n,r){t.value=n,t.getSnapshot=r,Os(t)&&Ds(e)}function Fs(e,t,n){return n((function(){Os(t)&&Ds(e)}))}function Os(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&&nu(t,e,1,-1)}function Ns(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,gs,e),[t.memoizedState,e]}function js(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=gs.updateQueue)?(t={lastEffect:null,stores:null},gs.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 Gs(e,t,n,r){var i=As();gs.flags|=e,i.memoizedState=js(1|t,n,void 0,void 0===r?null:r)}function Vs(e,t,n,r){var i=Es();r=void 0===r?null:r;var o=void 0;if(null!==ms){var s=ms.memoizedState;if(o=s.destroy,null!==r&&ks(r,s.deps))return void(i.memoizedState=js(t,n,o,r))}gs.flags|=e,i.memoizedState=js(1|t,n,o,r)}function qs(e,t){return Gs(8390656,8,e,t)}function Ws(e,t){return Vs(2048,8,e,t)}function Hs(e,t){return Vs(4,2,e,t)}function Us(e,t){return Vs(4,4,e,t)}function Xs(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 Zs(e,t,n){return n=null!=n?n.concat([e]):null,Vs(4,4,Xs.bind(null,t,e),n)}function Ks(){}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]:(n.memoizedState=[e,t],e)}function Qs(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 Js(e,t,n){return 0==(21&fs)?(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n):(ar(n,t)||(n=gt(),gs.lanes|=n,Ol|=n,e.baseState=!0),t)}function $s(e,t){var n=_t;_t=0!==n&&4>n?n:4,e(!0);var r=ps.transition;ps.transition={};try{e(!1),t()}finally{_t=n,ps.transition=r}}function ea(){return Es().memoizedState}function ta(e,t,n){var r=tu(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ra(e)?ia(t,n):null!==(n=To(e,t,n,r))&&(nu(n,e,r,eu()),oa(n,t,r))}function na(e,t,n){var r=tu(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))&&(nu(n,e,r,i=eu()),oa(n,t,r))}}function ra(e){var t=e.alternate;return e===gs||null!==t&&t===gs}function ia(e,t){_s=vs=!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,vt(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:qs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Gs(4194308,4,Xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(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,gs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},As().memoizedState=e},useState:Ns,useDebugValue:Ks,useDeferredValue:function(e){return As().memoizedState=e},useTransition:function(){var e=Ns(!1),t=e[0];return e=$s.bind(null,e[1]),As().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=gs,i=As();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Tl)throw Error(o(349));0!=(30&fs)||Ls(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,qs(Fs.bind(null,r,s,e),[e]),r.flags|=2048,js(9,zs.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=As(),t=Tl.identifierPrefix;if(io){var n=Qi;t=":"+t+"R"+(n=(Yi&~(1<<32-st(Yi)-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:Ys,useContext:Ao,useEffect:Ws,useImperativeHandle:Zs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Qs,useReducer:Ts,useRef:Bs,useState:function(){return Ts(Ms)},useDebugValue:Ks,useDeferredValue:function(e){return Js(Es(),ms.memoizedState,e)},useTransition:function(){return[Ts(Ms)[0],Es().memoizedState]},useMutableSource:Rs,useSyncExternalStore:Is,useId:ea,unstable_isNewReconciler:!1},ua={readContext:Ao,useCallback:Ys,useContext:Ao,useEffect:Ws,useImperativeHandle:Zs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Qs,useReducer:Ps,useRef:Bs,useState:function(){return Ps(Ms)},useDebugValue:Ks,useDeferredValue:function(e){var t=Es();return null===ms?t.memoizedState=e:Js(t,ms.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+=G(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 ha(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(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=zo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,Hl=r),da(0,t)},n}function ga(e,t,n){(n=zo(-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(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!=typeof r&&(null===Ul?Ul=new Set([this]):Ul.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ma(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=Su.bind(null,e,t,n),t.then(e,e))}function ya(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 va(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=zo(-1,1)).tag=2,Fo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var _a=b.ReactCurrentOwner,ba=!1;function xa(e,t,n,r){t.child=null===e?Jo(t,null,n,r):Qo(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,Wa(e,t,i))}function ka(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Iu(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 Wa(e,t,i)}return t.flags|=1,(e=Lu(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,Wa(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(Ll,Il),Il|=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(Ll,Il),Il|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ai(Ll,Il),Il|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ai(Ll,Il),Il|=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,Wa(e,t,i))}function Ma(e,t,n,r,i){if(Ii(n)){var o=!0;Oi(t)}else o=!1;if(So(t,i),null===t.stateNode)qa(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,h="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==u)&&Ho(t,s,r,u),Ro=!1;var d=t.memoizedState;s.state=d,No(t,r,s,i),l=t.memoizedState,a!==r||d!==l||Ti.current||Ro?("function"==typeof c&&(Go(t,n,c,r),l=t.memoizedState),(a=Ro||qo(t,n,a,r,d,l,u))?(h||"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:yo(t.type,a),s.props=u,h=t.pendingProps,d=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!==h||d!==l)&&Ho(t,s,r,l),Ro=!1,d=t.memoizedState,s.state=d,No(t,r,s,i);var f=t.memoizedState;a!==h||d!==f||Ti.current||Ro?("function"==typeof p&&(Go(t,n,p,r),f=t.memoizedState),(u=Ro||qo(t,n,u,r,d,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&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===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&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===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),Wa(e,t,o);r=t.stateNode,_a.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Qo(t,e.child,null,o),t.child=Qo(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?zi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&zi(0,t.context,!1),is(e,t.containerInfo)}function Ra(e,t,n,r,i){return fo(),go(i),t.flags|=256,xa(e,t,n,r),t.child}var Ia,La,za,Fa={dehydrated:null,treeContext:null,retryLane:0};function Oa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Da(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=Ou(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=Oa(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,ja(e,t,a,r=ha(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Ou({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)&&Qo(t,e.child,null,a),t.child.memoizedState=Oa(a),t.memoizedState=Fa,s);if(0==(1&t.mode))return ja(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,ja(e,t,a,r=ha(s=Error(o(419)),r,void 0))}if(l=0!=(a&e.childLanes),ba||l){if(null!==(r=Tl)){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),nu(r,e,i,-1))}return gu(),ja(e,t,a,r=ha(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Eu.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ro=ui(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Xi[Zi++]=Yi,Xi[Zi++]=Qi,Xi[Zi++]=Ki,Yi=e.id,Qi=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=Lu(s,u)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=Lu(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)?Oa(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=Lu(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=Ou({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ja(e,t,n,r){return null!==r&&go(r),Qo(t,e.child,null,n),(e=Na(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ba(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&&Ba(e,n,t);else if(19===e.tag)Ba(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 qa(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wa(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ol|=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=Lu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Lu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ha(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 Ua(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 Ua(t),null;case 1:case 17:return Ii(t.type)&&Li(),Ua(t),null;case 3:return r=t.stateNode,os(),Si(Ti),Si(Mi),hs(),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&&(su(oo),oo=null))),Ua(t),null;case 5:as(t);var i=rs(ns.current);if(n=t.type,null!==e&&null!=t.stateNode)La(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ua(t),null}if(e=rs(es.current),ho(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[di]=t,r[pi]=s,e=0!=(1&t.mode),n){case"dialog":jr("cancel",r),jr("close",r);break;case"iframe":case"object":case"embed":jr("load",r);break;case"video":case"audio":for(i=0;i<Fr.length;i++)jr(Fr[i],r);break;case"source":jr("error",r);break;case"img":case"image":case"link":jr("error",r),jr("load",r);break;case"details":jr("toggle",r);break;case"input":Y(r,s),jr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},jr("invalid",r);break;case"textarea":ie(r,s),jr("invalid",r)}for(var l in ve(n,s),i=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"==typeof u?r.textContent!==u&&(!0!==s.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",""+u]):a.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&jr("scroll",r)}switch(n){case"input":U(r),$(r,s,!0);break;case"textarea":U(r),se(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=$r)}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[di]=t,e[pi]=r,Ia(e,t),t.stateNode=e;e:{switch(l=_e(n,r),n){case"dialog":jr("cancel",e),jr("close",e),i=r;break;case"iframe":case"object":case"embed":jr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Fr.length;i++)jr(Fr[i],e);i=r;break;case"source":jr("error",e),i=r;break;case"img":case"image":case"link":jr("error",e),jr("load",e),i=r;break;case"details":jr("toggle",e),i=r;break;case"input":Y(e,r),i=K(e,r),jr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=D({},r,{value:void 0}),jr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),jr("invalid",e)}for(s in ve(n,i),u=i)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?me(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&he(e,c):"children"===s?"string"==typeof c?("textarea"!==n||""!==c)&&de(e,c):"number"==typeof c&&de(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=c&&"onScroll"===s&&jr("scroll",e):null!=c&&_(e,s,c,l))}switch(n){case"input":U(e),$(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=$r)}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 Ua(t),null;case 6:if(e&&null!=t.stateNode)za(0,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[di]=t,(s=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Jr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!=(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[di]=t,t.stateNode=r}return Ua(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[di]=t}else fo(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ua(t),s=!1}else null!==oo&&(su(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),Ua(t),null);case 4:return os(),null===e&&Vr(t.stateNode.containerInfo),Ua(t),null;case 10:return ko(t.type._context),Ua(t),null;case 19:if(Si(ls),null===(s=t.memoizedState))return Ua(t),null;if(r=0!=(128&t.flags),null===(l=s.rendering))if(r)Ha(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,Ha(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&&Qe()>Vl&&(t.flags|=128,r=!0,Ha(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),Ha(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!io)return Ua(t),null}else 2*Qe()-s.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,Ha(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=Qe(),t.sibling=null,n=ls.current,Ai(ls,r?1&n|2:1&n),t):(Ua(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&Il)&&(Ua(t),6&t.subtreeFlags&&(t.flags|=8192)):Ua(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Za(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),hs(),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(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=$r)}for(c in ve(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&&jr("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 Ka=!1,Ya=!1,Qa="function"==typeof WeakSet?WeakSet:Set,Ja=null;function $a(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Cu(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Cu(e,t,n)}}var tl=!1;function nl(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&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(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 il(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 ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[di],delete t[pi],delete t[gi],delete t[mi],delete t[yi]),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 sl(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(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 ll(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=$r));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(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(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,hl=!1;function dl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Ya||$a(n,t);case 6:var r=cl,i=hl;cl=null,dl(e,t,n),hl=i,null!==(cl=r)&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Vt(e)):li(cl,n.stateNode));break;case 4:r=cl,i=hl,cl=n.stateNode.containerInfo,hl=!0,dl(e,t,n),cl=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))&&el(n,t,s),i=i.next}while(i!==r)}dl(e,t,n);break;case 1:if(!Ya&&($a(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Cu(n,t,e)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(Ya=(r=Ya)||null!==n.memoizedState,dl(e,t,n),Ya=r):dl(e,t,n);break;default:dl(e,t,n)}}function fl(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=Mu.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:cl=l.stateNode,hl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===cl)throw Error(o(160));pl(s,a,i),cl=null,hl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){Cu(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ml(t,e),t=t.sibling}function ml(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{nl(3,e,e.return),rl(3,e)}catch(t){Cu(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Cu(e,e.return,t)}}break;case 1:gl(t,e),yl(e),512&r&&null!==n&&$a(n,n.return);break;case 5:if(gl(t,e),yl(e),512&r&&null!==n&&$a(n,n.return),32&e.flags){var i=e.stateNode;try{de(i,"")}catch(t){Cu(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&&Q(i,s),_e(l,a);var c=_e(l,s);for(a=0;a<u.length;a+=2){var h=u[a],d=u[a+1];"style"===h?me(i,d):"dangerouslySetInnerHTML"===h?he(i,d):"children"===h?de(i,d):_(i,h,d,c)}switch(l){case"input":J(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){Cu(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){Cu(e,e.return,t)}}break;case 3:if(gl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(t){Cu(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=Qe())),4&r&&fl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(Ya=(c=Ya)||h,gl(t,e),Ya=c):gl(t,e),yl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!h&&0!=(1&e.mode))for(Ja=e,h=e.child;null!==h;){for(d=Ja=h;null!==Ja;){switch(f=(p=Ja).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:$a(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){Cu(r,n,e)}}break;case 5:$a(p,p.return);break;case 22:if(null!==p.memoizedState){xl(d);continue}}null!==f?(f.return=p,Ja=f):xl(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{i=d.stateNode,c?"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=d.stateNode,a=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=ge("display",a))}catch(t){Cu(e,e.return,t)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){Cu(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gl(t,e),yl(e),4&r&&fl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(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&&(de(i,""),r.flags&=-33),ul(e,al(e),i);break;case 3:case 4:var s=r.stateNode.containerInfo;ll(e,al(e),s);break;default:throw Error(o(161))}}catch(t){Cu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Ja=e,_l(e,t,n)}function _l(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||Ka;if(!s){var a=i.alternate,l=null!==a&&null!==a.memoizedState||Ya;a=Ka;var u=Ya;if(Ka=s,(Ya=l)&&!u)for(Ja=i;null!==Ja;)l=(s=Ja).child,22===s.tag&&null!==s.memoizedState?wl(i):null!==l?(l.return=s,Ja=l):wl(i);for(;null!==o;)Ja=o,_l(o,t,n),o=o.sibling;Ja=i,Ka=a,Ya=u}bl(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Ja=o):bl(e)}}function bl(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||rl(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:yo(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&jo(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}jo(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 h=c.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Vt(d)}}}break;default:throw Error(o(163))}Ya||512&t.flags&&il(t)}catch(e){Cu(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 xl(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 wl(e){for(;null!==Ja;){var t=Ja;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(e){Cu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Cu(t,i,e)}}var o=t.return;try{il(t)}catch(e){Cu(t,o,e)}break;case 5:var s=t.return;try{il(t)}catch(e){Cu(t,s,e)}}}catch(e){Cu(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 kl,Cl=Math.ceil,Sl=b.ReactCurrentDispatcher,Al=b.ReactCurrentOwner,El=b.ReactCurrentBatchConfig,Ml=0,Tl=null,Pl=null,Rl=0,Il=0,Ll=Ci(0),zl=0,Fl=null,Ol=0,Dl=0,Nl=0,jl=null,Bl=null,Gl=0,Vl=1/0,ql=null,Wl=!1,Hl=null,Ul=null,Xl=!1,Zl=null,Kl=0,Yl=0,Ql=null,Jl=-1,$l=0;function eu(){return 0!=(6&Ml)?Qe():-1!==Jl?Jl:Jl=Qe()}function tu(e){return 0==(1&e.mode)?1:0!=(2&Ml)&&0!==Rl?Rl&-Rl:null!==mo.transition?(0===$l&&($l=gt()),$l):0!==(e=_t)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function nu(e,t,n,r){if(50<Yl)throw Yl=0,Ql=null,Error(o(185));yt(e,n,r),0!=(2&Ml)&&e===Tl||(e===Tl&&(0==(2&Ml)&&(Dl|=n),4===zl&&au(e,Rl)),ru(e,r),1===n&&0===Ml&&0==(1&t.mode)&&(Vl=Qe()+500,ji&&Vi()))}function ru(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=dt(e,e===Tl?Rl:0);if(0===r)null!==n&&Ze(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ze(n),1===t)0===e.tag?function(e){ji=!0,Gi(e)}(lu.bind(null,e)):Gi(lu.bind(null,e)),si((function(){0==(6&Ml)&&Vi()})),n=null;else{switch(bt(r)){case 1:n=$e;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Tu(n,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iu(e,t){if(Jl=-1,$l=0,0!=(6&Ml))throw Error(o(327));var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var r=dt(e,e===Tl?Rl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=mu(e,r);else{t=r;var i=Ml;Ml|=2;var s=fu();for(Tl===e&&Rl===t||(ql=null,Vl=Qe()+500,du(e,t));;)try{vu();break}catch(t){pu(e,t)}wo(),Sl.current=s,Ml=i,null!==Pl?t=0:(Tl=null,Rl=0,t=zl)}if(0!==t){if(2===t&&0!==(i=ft(e))&&(r=i,t=ou(e,i)),1===t)throw n=Fl,du(e,0),au(e,r),ru(e,Qe()),n;if(6===t)au(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=mu(e,r))&&0!==(s=ft(e))&&(r=s,t=ou(e,s)),1===t))throw n=Fl,du(e,0),au(e,r),ru(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:xu(e,Bl,ql);break;case 3:if(au(e,r),(130023424&r)===r&&10<(t=Gl+500-Qe())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(xu.bind(null,e,Bl,ql),t);break}xu(e,Bl,ql);break;case 4:if(au(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=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cl(r/1960))-r)){e.timeoutHandle=ri(xu.bind(null,e,Bl,ql),r);break}xu(e,Bl,ql);break;default:throw Error(o(329))}}}return ru(e,Qe()),e.callbackNode===n?iu.bind(null,e):null}function ou(e,t){var n=jl;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=mu(e,t))&&(t=Bl,Bl=n,null!==t&&su(t)),e}function su(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function au(e,t){for(t&=~Nl,t&=~Dl,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 lu(e){if(0!=(6&Ml))throw Error(o(327));wu();var t=dt(e,0);if(0==(1&t))return ru(e,Qe()),null;var n=mu(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=ou(e,r))}if(1===n)throw n=Fl,du(e,0),au(e,t),ru(e,Qe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xu(e,Bl,ql),ru(e,Qe()),null}function uu(e,t){var n=Ml;Ml|=1;try{return e(t)}finally{0===(Ml=n)&&(Vl=Qe()+500,ji&&Vi())}}function cu(e){null!==Zl&&0===Zl.tag&&0==(6&Ml)&&wu();var t=Ml;Ml|=1;var n=El.transition,r=_t;try{if(El.transition=null,_t=1,e)return e()}finally{_t=r,El.transition=n,0==(6&(Ml=t))&&Vi()}}function hu(){Il=Ll.current,Si(Ll)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Pl)for(n=Pl.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),hs();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(Tl=e,Pl=e=Lu(e.current,null),Rl=Il=t,zl=0,Fl=null,Nl=Dl=Ol=0,Bl=jl=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 pu(e,t){for(;;){var n=Pl;try{if(wo(),ds.current=sa,vs){for(var r=gs.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}vs=!1}if(fs=0,ys=ms=gs=null,_s=!1,bs=0,Al.current=null,null===n||null===n.return){zl=1,Fl=t,Pl=null;break}e:{var s=e,a=n.return,l=n,u=t;if(t=Rl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var f=ya(a);if(null!==f){f.flags&=-257,va(f,a,l,0,t),1&f.mode&&ma(s,c,t),u=c;var g=(t=f).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(0==(1&t)){ma(s,c,t),gu();break e}u=Error(o(426))}else if(io&&1&l.mode){var y=ya(a);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),va(y,a,l,0,t),go(ca(u,l));break e}}s=u=ca(u,l),4!==zl&&(zl=2),null===jl?jl=[s]:jl.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 v=s.type,_=s.stateNode;if(0==(128&s.flags)&&("function"==typeof v.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===Ul||!Ul.has(_)))){s.flags|=65536,t&=-t,s.lanes|=t,Do(s,ga(s,l,t));break e}}s=s.return}while(null!==s)}bu(n)}catch(e){t=e,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function fu(){var e=Sl.current;return Sl.current=sa,null===e?sa:e}function gu(){0!==zl&&3!==zl&&2!==zl||(zl=4),null===Tl||0==(268435455&Ol)&&0==(268435455&Dl)||au(Tl,Rl)}function mu(e,t){var n=Ml;Ml|=2;var r=fu();for(Tl===e&&Rl===t||(ql=null,du(e,t));;)try{yu();break}catch(t){pu(e,t)}if(wo(),Ml=n,Sl.current=r,null!==Pl)throw Error(o(261));return Tl=null,Rl=0,zl}function yu(){for(;null!==Pl;)_u(Pl)}function vu(){for(;null!==Pl&&!Ke();)_u(Pl)}function _u(e){var t=kl(e.alternate,e,Il);e.memoizedProps=e.pendingProps,null===t?bu(e):Pl=t,Al.current=null}function bu(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Xa(n,t,Il)))return void(Pl=n)}else{if(null!==(n=Za(n,t)))return n.flags&=32767,void(Pl=n);if(null===e)return zl=6,void(Pl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Pl=t);Pl=t=e}while(null!==t);0===zl&&(zl=5)}function xu(e,t,n){var r=_t,i=El.transition;try{El.transition=null,_t=1,function(e,t,n,r){do{wu()}while(null!==Zl);if(0!=(6&Ml))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===Tl&&(Pl=Tl=null,Rl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Xl||(Xl=!0,Tu(tt,(function(){return wu(),null}))),s=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||s){s=El.transition,El.transition=null;var a=_t;_t=1;var l=Ml;Ml|=4,Al.current=null,function(e,t){if(ei=Wt,pr(e=dr())){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,h=0,d=e,p=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(l=a+i),d!==s||0!==r&&3!==d.nodeType||(u=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(f=d.firstChild);)p=d,d=f;for(;;){if(d===e)break t;if(p===n&&++c===i&&(l=a),p===s&&++h===r&&(u=a),null!==(f=d.nextSibling))break;p=(d=p).parentNode}d=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 g=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!==g){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,_=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:yo(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=_}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){Cu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Ja=e;break}Ja=t.return}g=tl,tl=!1}(e,n),ml(n,e),fr(ti),Wt=!!ei,ti=ei=null,e.current=n,vl(n,e,i),Ye(),Ml=l,_t=a,El.transition=s}else e.current=n;if(Xl&&(Xl=!1,Zl=e,Kl=i),0===(s=e.pendingLanes)&&(Ul=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),ru(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Wl)throw Wl=!1,e=Hl,Hl=null,e;0!=(1&Kl)&&0!==e.tag&&wu(),0!=(1&(s=e.pendingLanes))?e===Ql?Yl++:(Yl=0,Ql=e):Yl=0,Vi()}(e,t,n,r)}finally{El.transition=i,_t=r}return null}function wu(){if(null!==Zl){var e=bt(Kl),t=El.transition,n=_t;try{if(El.transition=null,_t=16>e?16:e,null===Zl)var r=!1;else{if(e=Zl,Zl=null,Kl=0,0!=(6&Ml))throw Error(o(331));var i=Ml;for(Ml|=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 h=Ja;switch(h.tag){case 0:case 11:case 15:nl(8,h,s)}var d=h.child;if(null!==d)d.return=h,Ja=d;else for(;null!==Ja;){var p=(h=Ja).sibling,f=h.return;if(ol(h),h===c){Ja=null;break}if(null!==p){p.return=f,Ja=p;break}Ja=f}}}var g=s.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}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:nl(9,s,s.return)}var v=s.sibling;if(null!==v){v.return=s.return,Ja=v;break e}Ja=s.return}}var _=e.current;for(Ja=_;null!==Ja;){var b=(a=Ja).child;if(0!=(2064&a.subtreeFlags)&&null!==b)b.return=a,Ja=b;else e:for(a=_;null!==Ja;){if(0!=(2048&(l=Ja).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){Cu(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(Ml=i,Vi(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{_t=n,El.transition=t}}return!1}function ku(e,t,n){e=Fo(e,t=fa(0,t=ca(n,t),1),1),t=eu(),null!==e&&(yt(e,1,t),ru(e,t))}function Cu(e,t,n){if(3===e.tag)ku(e,e,n);else for(;null!==t;){if(3===t.tag){ku(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ul||!Ul.has(r))){t=Fo(t,e=ga(t,e=ca(n,e),1),1),e=eu(),null!==t&&(yt(t,1,e),ru(t,e));break}}t=t.return}}function Su(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Rl&n)===n&&(4===zl||3===zl&&(130023424&Rl)===Rl&&500>Qe()-Gl?du(e,0):Nl|=n),ru(e,t)}function Au(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ct,0==(130023424&(ct<<=1))&&(ct=4194304)));var n=eu();null!==(e=Po(e,t))&&(yt(e,t,n),ru(e,n))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Au(e,n)}function Mu(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),Au(e,n)}function Tu(e,t){return Xe(e,t)}function Pu(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 Ru(e,t,n,r){return new Pu(e,t,n,r)}function Iu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Lu(e,t){var n=e.alternate;return null===n?((n=Ru(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)Iu(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=Ru(12,n,t,2|i)).elementType=S,e.lanes=s,e;case T:return(e=Ru(13,n,t,i)).elementType=T,e.lanes=s,e;case P:return(e=Ru(19,n,t,i)).elementType=P,e.lanes=s,e;case L:return Ou(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=Ru(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Fu(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Ou(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function Du(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function Nu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ju(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=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bu(e,t,n,r,i,o,s,a,l){return e=new ju(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ru(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,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}}function Vu(e){if(!e)return Ei;e:{if(Ve(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 Fi(e,n,t)}return t}function qu(e,t,n,r,i,o,s,a,l){return(e=Bu(n,r,!0,e,0,o,0,a,l)).context=Vu(null),n=e.current,(o=zo(r=eu(),i=tu(n))).callback=null!=t?t:null,Fo(n,o,i),e.current.lanes=i,yt(e,i,r),ru(e,r),e}function Wu(e,t,n,r){var i=t.current,o=eu(),s=tu(i);return n=Vu(n),null===t.context?t.context=n:t.pendingContext=n,(t=zo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Fo(i,t,s))&&(nu(e,i,s,o),Oo(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 Xu(e,t){Uu(e,t),(e=e.alternate)&&Uu(e,t)}kl=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)&&Oi(t);break;case 4:is(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ai(vo,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)?Da(e,t,n):(Ai(ls,1&ls.current),null!==(e=Wa(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 Wa(e,t,n)}(e,t,n);ba=0!=(131072&e.flags)}else ba=!1,io&&0!=(1048576&t.flags)&&$i(t,Ui,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qa(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,Oi(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Io(t),i.updater=Vo,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(qa(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Iu(e)?1:0;if(null!=e){if((e=e.$$typeof)===M)return 11;if(e===R)return 14}return 2}(r),e=yo(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,yo(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:yo(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ma(e,t,r,i=t.elementType===r?i:yo(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),No(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=Jo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),r===i){t=Wa(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 Da(e,t,n);case 4:return is(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Qo(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:yo(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(vo,r._currentValue),r._currentValue=a,null!==s)if(ar(s.value,a)){if(s.children===i.children&&!Ti.current){t=Wa(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=zo(-1,n&-n)).tag=2;var c=s.updateQueue;if(null!==c){var h=(c=c.shared).pending;null===h?u.next=u:(u.next=h.next,h.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=yo(r=t.type,t.pendingProps),ka(e,t,r,i=yo(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:yo(r,i),qa(e,t),t.tag=1,Ii(r)?(e=!0,Oi(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 Zu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function Yu(e){this._internalRoot=e}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function $u(){}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=qu(t,r,e,0,null,!1,0,"",$u);return e._reactRootContainer=s,e[fi]=s.current,Vr(8===e.nodeType?e.parentNode:e),cu(),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=Bu(e,0,!1,null,0,!1,0,"",$u);return e._reactRootContainer=l,e[fi]=l.current,Vr(8===e.nodeType?e.parentNode:e),cu((function(){Wu(t,l,n,r)})),l}(n,t,e,i,r);return Hu(s)}Yu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Wu(e,t,null,null)},Yu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu((function(){Wu(null,e,null,null)})),t[fi]=null}},Yu.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=ht(t.pendingLanes);0!==n&&(vt(t,1|n),ru(t,Qe()),0==(6&Ml)&&(Vl=Qe()+500,Vi()))}break;case 13:cu((function(){var t=Po(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}})),Xu(e,1)}},wt=function(e){if(13===e.tag){var t=Po(e,134217728);null!==t&&nu(t,e,134217728,eu()),Xu(e,134217728)}},kt=function(e){if(13===e.tag){var t=tu(e),n=Po(e,t);null!==n&&nu(n,e,t,eu()),Xu(e,t)}},Ct=function(){return _t},St=function(e,t){var n=_t;try{return _t=e,t()}finally{_t=n}},we=function(e,t,n){switch(t){case"input":if(J(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));X(r),J(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Me=uu,Te=cu;var tc={usingClientEntryPoint:!1,Events:[_i,bi,xi,Ae,Ee,uu]},nc={findFiberByHostInstance:vi,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(!Qu(t))throw Error(o(200));return Gu(e,t,null,n)},t.createRoot=function(e,t){if(!Qu(e))throw Error(o(299));var n=!1,r="",i=Zu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Bu(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,Vr(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 cu(e)},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(o(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Qu(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,s="",a=Zu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=qu(t,null,e,1,null!=n?n:null,i,0,s,a),e[fi]=t.current,Vr(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 Yu(t)},t.render=function(e,t,n){if(!Ju(t))throw Error(o(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(o(40));return!!e._reactRootContainer&&(cu((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[fi]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ju(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)},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"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function v(){}function _(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}y.prototype.isReactComponent={},y.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")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var b=_.prototype=new v;b.constructor=_,g(b,y.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},z={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=y,t.Fragment=i,t.Profiler=s,t.PureComponent=_,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,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=g({},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:d,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:h,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=[],h=1,d=null,p=3,f=!1,g=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,_="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(m=!1,b(e),!g)if(null!==r(u))g=!0,L(w);else{var t=r(c);null!==t&&z(x,t.startTime-e)}}function w(e,n){g=!1,m&&(m=!1,v(A),A=-1),f=!0;var o=p;try{for(b(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!T());){var s=d.callback;if("function"==typeof s){d.callback=null,p=d.priorityLevel;var a=s(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?d.callback=a:d===r(u)&&i(u),b(n)}else i(u);d=r(u)}if(null!==d)var l=!0;else{var h=r(c);null!==h&&z(x,h.startTime-n),l=!1}return l}finally{d=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 _)k=function(){_(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(){y(P,0)};function L(e){S=e,C||(C=!0,k())}function z(e,n){A=y((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(){g||f||(g=!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:h++,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)&&(m?(v(A),A=-1):m=!0,z(x,o-s))):(e.sortIndex=a,n(u,e),g||f||(g=!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,h="".concat(u," ").concat(c);o[u]=c+1;var d=n(h),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var f=i(p,r);r.byIndex=a,t.splice(a,0,{identifier:h,updater:f,references:1})}s.push(h)}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){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="},9994:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xOTIwIDE1MzZ2MTI4aC0yMDQ4di0xNTM2aDEyOHYxNDA4aDE5MjB6bS0zODQtMTAyNGwyNTYgODk2aC0xNjY0di01NzZsNDQ4LTU3NiA1NzYgNTc2eiIvPjwvc3ZnPg=="},8633: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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),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","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","help_custom_model":"Help","apply_custom_model":"Apply","exclude_motorway_example":"Exclude Motorway","limit_speed_example":"Limit Speed","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","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","back_to_map":"Back","distance_unit":"Distances are in %1$s"},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"دراجة","racingbike":"دراجة سباق","mtb":"دراجة جبلية","car":"سيارة","foot":"مشياً","hike":"نزهة","small_truck":"شاحنة صغيرة","bus":"باص","truck":"شاحنة","staticlink":"رابط ثابت","motorcycle":"دراجة نارية","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"Fasta","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":"","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","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"Велосипед","racingbike":"Състезателно колело","mtb":"Планинско колело","car":"Автомобил","foot":"Пеша","hike":"Планински преход","small_truck":"Малък камион","bus":"Автобус","truck":"Камион","staticlink":"Постоянна препратка","motorcycle":"Мотоциклет","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"","racingbike":"","mtb":"","car":"","foot":"","hike":"","small_truck":"","bus":"","truck":"","staticlink":"","motorcycle":"","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"cs_CZ":{"total_ascend":"Celkové stoupání %1$s","total_descend":"Celkové klesání %1$s","way_contains_ford":"na cestě je brod","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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 sem mapu","show_coords":"Zobrazit souřadnice","query_osm":"","route":"Trasa","add_to_route":"","delete_from_route":"Odstranit z trasy","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Přes ","from_hint":"Z","gpx_export_button":"Export do GPX","gpx_button":"","hide_button":"","details_button":"","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 (%2$s)","locations_not_found":"Navigování není dostupné. Pozice nenalezena v této oblasti.","search_with_nominatim":"","powered_by":"","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":"neměnný odkaz","motorcycle":"Motocykl","back_to_map":"","distance_unit":""},"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":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","delete_from_route":"Fjern fra rute","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Via","from_hint":"Fra ","gpx_export_button":"Eksportér GPX-fil","gpx_button":"","hide_button":"","details_button":"","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":"","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","back_to_map":"","distance_unit":""},"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","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","help_custom_model":"Hilfe","apply_custom_model":"Anwenden","exclude_motorway_example":"Autobahn vermeiden","limit_speed_example":"Max. Geschwindigkeit","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":"","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","bike":"Fahrrad","racingbike":"Rennrad","mtb":"Mountainbike","car":"Auto","foot":"Zu Fuß","hike":"Wandern","small_truck":"Kleintransporter","bus":"Bus","truck":"LKW","staticlink":"Link","motorcycle":"Motorrad","back_to_map":"Zurück","distance_unit":"Distanzen sind in %1$s"},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"Ποδήλατο","racingbike":"Αγωνιστικό ποδήλατο","mtb":"Ποδήλατο βουνού","car":"Αυτοκίνητο","foot":"Πεζός","hike":"Πεζοπορία","small_truck":"Μικρό φορτηγό","bus":"Λεωφορείο","truck":"Φορτηγό","staticlink":"στατική διεύθυνση","motorcycle":"Μοτοσυκλέτα","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"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":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"دوچرخه","racingbike":"دوچرخه کورسی","mtb":"دوچرخه کوهستان","car":"ماشین","foot":"پیاده‌روی","hike":"پیاده‌گردی","small_truck":"وانت","bus":"اتوبوس","truck":"کامیون","staticlink":"پیوند ثابت","motorcycle":"موتورسیکلت","back_to_map":"","distance_unit":""},"fil":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"Bike","racingbike":"Racing Bike","mtb":"Mountain Bike","car":"kotse","foot":"lumakad","hike":"","small_truck":"","bus":"","truck":"","staticlink":"static link","motorcycle":"motorsiklo","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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ä","back_to_map":"","distance_unit":""},"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":"","way_contains":"","tracks":"","steps":"","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":"","delete_from_route":"Supprimer ce point de l\'itinéraire","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"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":"","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":"","delete_from_route":"Supprimer ce point de l\'itinéraire","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"gl":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"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":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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 עם הליכה (%3$s)","locations_not_found":"אין נתיב ישיר אל היעד. המיקום לא נמצא באזור.","search_with_nominatim":"","powered_by":"","bike":"אופניים","racingbike":"מסלולי אופניים","mtb":"אופני הרים","car":"מכונית","foot":"רגל","hike":"טיול רגלי","small_truck":"משאית קטנה","bus":"אוטובוס","truck":"משאית","staticlink":"קישור קבוע","motorcycle":"אופנוע","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"hsb":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"koleso","racingbike":"wubědźowanske koleso","mtb":"mountainbike","car":"awto","foot":"pěši","hike":"","small_truck":"","bus":"","truck":"","staticlink":"link","motorcycle":"motorske","back_to_map":"","distance_unit":""},"hu_HU":{"total_ascend":"Összes szintemelkedés: %1$s","total_descend":"Összes szintcsökkenés: %1$s","way_contains_ford":"gázló van az útvonalon","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","route":"Útvonal","add_to_route":"","delete_from_route":"Eltávolítás az útvonalról","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Ezen keresztül","from_hint":"Innen","gpx_export_button":"GPX export","gpx_button":"","hide_button":"","details_button":"","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":"","powered_by":"","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","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"it":{"total_ascend":"%1$s di dislivello positivo","total_descend":"%1$s di dislivello negativo","way_contains_ford":"c\'é un guado sulla strada","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","delete_from_route":"Elimina dall\'itinerario","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"attraverso","from_hint":"Da","gpx_export_button":"Esporta GPX","gpx_button":"","hide_button":"","details_button":"","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 solocamminando (%2$s)","locations_not_found":"Percorso non calcolabile. Località non trovata(e) nell\'area.","search_with_nominatim":"","powered_by":"","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","back_to_map":"","distance_unit":""},"ja":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"自転車","racingbike":"レースバイク","mtb":"マウンテンバイク","car":"車","foot":"徒歩","hike":"","small_truck":"","bus":"","truck":"","staticlink":"パーマリンク","motorcycle":"オートバイ","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"자전거","racingbike":"경주용 자전거","mtb":"산악자전거","car":"자동차","foot":"도보","hike":"하이킹","small_truck":"소형 트럭","bus":"버스","truck":"트럭","staticlink":"정적 링크","motorcycle":"모터사이클","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"ne":{"total_ascend":"","total_descend":"","way_contains_ford":"","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"बाईक ","racingbike":"छिटो गतिका बाईक","mtb":"माउन्टेन बाईक","car":"गाडी","foot":"पैदल","hike":"","small_truck":"","bus":"","truck":"","staticlink":"ईस्ट्यातिक लिंक","motorcycle":"मोटरसाइकल ","back_to_map":"","distance_unit":""},"nl":{"total_ascend":"%1$s totale klim","total_descend":"%1$s totale daling","way_contains_ford":"Er is een doorwaadbare plaats","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","route":"Route","add_to_route":"","delete_from_route":"Van route verwijderen","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"via","from_hint":"van","gpx_export_button":"GPX export","gpx_button":"","hide_button":"","details_button":"","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":"","bike":"fiets","racingbike":"racefiets","mtb":"mountainbike","car":"auto","foot":"te voet","hike":"wandelen","small_truck":"kleine vrachtwagen","bus":"bus","truck":"vrachtwagen","staticlink":"statische link","motorcycle":"motorfiets","back_to_map":"","distance_unit":""},"pl_PL":{"total_ascend":"%1$s podejść ogółem","total_descend":"%1$s zejść ogółem","way_contains_ford":"bród na trasie","way_contains_ferry":"","way_contains_private":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","route":"Trasa","add_to_route":"","delete_from_route":"Usuń z trasy","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Przez","from_hint":"Z","gpx_export_button":"Eksportuj GPX","gpx_button":"","hide_button":"","details_button":"","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. Lokalizacja(e) nie została(y) znalezione. ","search_with_nominatim":"","powered_by":"","bike":"Rower","racingbike":"Rower wyścigowy","mtb":"Rower górski","car":"Samochod","foot":"Pieszo","hike":"Szlakiem turystycznym","small_truck":"Mała ciężarówka","bus":"Autobus","truck":"Ciężarówka","staticlink":"link","motorcycle":"Motocykl","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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ă","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"Велосипед","racingbike":"Гоночный велосипед","mtb":"Горный велосипед","car":"Автомобиль","foot":"Пешком","hike":"Пеший туризм","small_truck":"Лёгкий грузовик","bus":"Автобус","truck":"Грузовой автомобиль","staticlink":"Постоянная ссылка","motorcycle":"Мотоцикл","back_to_map":"","distance_unit":""},"sk":{"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"sl_SI":{"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":"","way_contains_toll":"","way_crosses_border":"","way_contains":"","tracks":"","steps":"","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":"","route":"Trasa","add_to_route":"","delete_from_route":"Odstrániť z trasy","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","searching_location":"","searching_location_failed":"","via_hint":"Cez","from_hint":"Odkiaľ","gpx_export_button":"Export do GPX","gpx_button":"","hide_button":"","details_button":"","to_hint":"Kam","route_info":"%1$s zaberie %2$s","search_button":"Vyhľadať","more_button":"viac","pt_route_info":"","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":"","powered_by":"","bike":"Bicykel","racingbike":"Cestný bicykel","mtb":"Horský bicykel","car":"Automobil","foot":"Pešo","hike":"Túra","small_truck":"Dodávka","bus":"Autobus","truck":"Jazdná súprava","staticlink":"nemenný odkaz","motorcycle":"Motocykel","back_to_map":"","distance_unit":""},"sr_RS":{"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"sv_SE":{"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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","back_to_map":"","distance_unit":""},"tr":{"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":"","tracks":"","steps":"","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":"","delete_from_route":"Ta bort från rutt","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","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":"","searching_location":"","searching_location_failed":"","via_hint":"Via","from_hint":"Från","gpx_export_button":"exportera GPX-fil","gpx_button":"","hide_button":"","details_button":"","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":"","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","back_to_map":"","distance_unit":""},"uk":{"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 bin","way_contains_private":"özel yol ","way_contains_toll":"paralı yol","way_crosses_border":"","way_contains":"","tracks":"","steps":"","start_label":"Başlangıç","intermediate_label":"Orta","end_label":"Son","set_start":"Başlangıç olarak ayarla","set_intermediate":"Orta olarak ayarla","set_end":"Bitiş olarak ayarla","center_map":"Haritayı buraya ortala","show_coords":"Koordinatları göster","query_osm":"","route":"Rota","add_to_route":"","delete_from_route":"Rotadan kaldır","open_custom_model_box":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","exclude_area_example":"","combined_example":"","examples_custom_model":"","marker":"İşaretçi","gh_offline_info":"GraphHopper API çevrimdışı?","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":"","route_request_failed":"","current_location":"","searching_location":"","searching_location_failed":"","via_hint":"Yoluyla","from_hint":"Şuradan","gpx_export_button":"GPX dışa aktar","gpx_button":"","hide_button":"","details_button":"","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 planlanamadı. Bölgede yer bulunamadı.","search_with_nominatim":"","powered_by":"","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":"durağan bağlantı","motorcycle":"motosiklet","back_to_map":"","distance_unit":""},"vi_VN":{"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"Велосипед","racingbike":"Шосейний велосипед","mtb":"Гірський велосипед","car":"Автомобіль","foot":"Пішки","hike":"Пішохідний туризм","small_truck":"Мала вантажівка","bus":"Автобус","truck":"Велика вантажівка","staticlink":"статичне посилання","motorcycle":"Мотоцикл","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","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ô","back_to_map":"","distance_unit":""},"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":"","tracks":"","steps":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"步行(%2$s), %1$s到达","locations_not_found":"地点未找到","search_with_nominatim":"","powered_by":"","bike":"自行车","racingbike":"竞技自行车","mtb":"山地自行车","car":"驾车","foot":"步行","hike":"徒步","small_truck":"小火车","bus":"公交车","truck":"卡车","staticlink":"静态链接","motorcycle":"摩托车","back_to_map":"","distance_unit":""},"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":"","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":"","help_custom_model":"","apply_custom_model":"","exclude_motorway_example":"","limit_speed_example":"","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":"","bike":"單車","racingbike":"競技單車","mtb":"越野單車","car":"汽車","foot":"步行","hike":"","small_truck":"小型貨車","bus":"巴士","truck":"貨車","staticlink":"鏈接","motorcycle":"電單車","back_to_map":"","distance_unit":""}}');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(){if(!o)throw new Error("init translation via setTranslation before using getTranslation");return o}function a(e,t){return s().get(e,t)}var l=n(9526),u=n(5701),c=n.n(u),h=n(8236),d=n.n(h),p=n(6080),f=n.n(p),g=n(6850),m=n.n(g),y=n(7182),v=n.n(y),_=n(9213),b=n.n(_),x=n(1428),w={};w.styleTagTransform=b(),w.setAttributes=m(),w.insert=f().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=v(),c()(x.Z,w);const k=x.Z&&x.Z.locals?x.Z.locals:void 0;function C(){}function S(e){return null==e?C:function(){return this.querySelector(e)}}function A(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function E(){return[]}function M(e){return function(t){return t.matches(e)}}var T=Array.prototype.find;function P(){return this.firstElementChild}var R=Array.prototype.filter;function I(){return Array.from(this.children)}function L(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){return function(){return e}}function O(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,h=t.length,d=o.length,p=new Array(h);for(a=0;a<h;++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<d;++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<h;++a)(l=t[a])&&c.get(p[a])===l&&(i[a]=l)}function N(e){return e.__data__}function j(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 G="http://www.w3.org/1999/xhtml";const V={svg:"http://www.w3.org/2000/svg",xhtml:G,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function q(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),V.hasOwnProperty(t)?{space:V[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 X(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Z(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 Y(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Q(e){return function(){this.style.removeProperty(e)}}function J(e,t,n){return function(){this.style.setProperty(e,t,n)}}function $(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,t){return e.style.getPropertyValue(t)||Y(e).getComputedStyle(e,null).getPropertyValue(t)}function te(e){return function(){delete this[e]}}function ne(e,t){return function(){this[e]=t}}function re(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function ie(e){return e.trim().split(/^|\s+/)}function oe(e){return e.classList||new se(e)}function se(e){this._node=e,this._names=ie(e.getAttribute("class")||"")}function ae(e,t){for(var n=oe(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function le(e,t){for(var n=oe(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ue(e){return function(){ae(this,e)}}function ce(e){return function(){le(this,e)}}function he(e,t){return function(){(t.apply(this,arguments)?ae:le)(this,e)}}function de(){this.textContent=""}function pe(e){return function(){this.textContent=e}}function fe(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function ge(){this.innerHTML=""}function me(e){return function(){this.innerHTML=e}}function ye(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function ve(){this.nextSibling&&this.parentNode.appendChild(this)}function _e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function be(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===G&&t.documentElement.namespaceURI===G?t.createElement(e):t.createElementNS(n,e)}}function xe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function we(e){var t=q(e);return(t.local?xe:be)(t)}function ke(){return null}function Ce(){var e=this.parentNode;e&&e.removeChild(this)}function Se(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ae(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ee(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}}))}function Me(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 Te(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 Pe(e,t,n){var r=Y(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 Re(e,t){return function(){return Pe(this,e,t)}}function Ie(e,t){return function(){return Pe(this,e,t.apply(this,arguments))}}se.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 Le=[null];function ze(e,t){this._groups=e,this._parents=t}function Fe(e){return"string"==typeof e?new ze([[document.querySelector(e)]],[document.documentElement]):new ze([[e]],Le)}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 De(e){return"string"==typeof e?new ze([document.querySelectorAll(e)],[document.documentElement]):new ze([A(e)],Le)}ze.prototype=function(){return new ze([[document.documentElement]],Le)}.prototype={constructor:ze,select:function(e){"function"!=typeof e&&(e=S(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 ze(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return A(e.apply(this,arguments))}}(e):function(e){return null==e?E: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 ze(r,i)},selectChild:function(e){return this.select(null==e?P:function(e){return function(){return T.call(this.children,e)}}("function"==typeof e?e:M(e)))},selectChildren:function(e){return this.selectAll(null==e?I:function(e){return function(){return R.call(this.children,e)}}("function"==typeof e?e:M(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 ze(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,N);var n=t?D:O,r=this._parents,i=this._groups;"function"!=typeof e&&(e=F(e));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],d=h.length,p=j(e.call(c,c&&c.__data__,u,r)),f=p.length,g=a[u]=new Array(f),m=s[u]=new Array(f),y=l[u]=new Array(d);n(c,h,g,m,y,p,t);for(var v,_,b=0,x=0;b<f;++b)if(v=g[b]){for(b>=x&&(x=b+1);!(_=m[x])&&++x<f;);v._next=_||null}}return(s=new ze(s,r))._enter=a,s._exit=l,s},enter:function(){return new ze(this._enter||this._groups.map(L),this._parents)},exit:function(){return new ze(this._exit||this._groups.map(L),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],h=r[l],d=c.length,p=a[l]=new Array(d),f=0;f<d;++f)(u=c[f]||h[f])&&(p[f]=u);for(;l<i;++l)a[l]=n[l];return new ze(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 ze(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=q(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:Z:n.local?X:U)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Q:"function"==typeof t?$:J)(e,t,null==n?"":n)):ee(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?te:"function"==typeof t?re:ne)(e,t)):this.node()[e]},classed:function(e,t){var n=ie(e+"");if(arguments.length<2){for(var r=oe(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?he:t?ue:ce)(n,t))},text:function(e){return arguments.length?this.each(null==e?de:("function"==typeof e?fe:pe)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?ge:("function"==typeof e?ye:me)(e)):this.node().innerHTML},raise:function(){return this.each(ve)},lower:function(){return this.each(_e)},append:function(e){var t="function"==typeof e?e:we(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:we(e),r=null==t?ke:"function"==typeof t?t:S(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ce)},clone:function(e){return this.select(e?Ae:Se)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=Ee(e+""),s=o.length;if(!(arguments.length<2)){for(a=t?Te:Me,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?Ie:Re)(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 Ne extends Map{constructor(e,t=qe){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(Be(this,e))}has(e){return super.has(Be(this,e))}set(e,t){return super.set(Ge(this,e),t)}delete(e){return super.delete(Ve(this,e))}}class je extends Set{constructor(e,t=qe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const t of e)this.add(t)}has(e){return super.has(Be(this,e))}add(e){return super.add(Ge(this,e))}delete(e){return super.delete(Ve(this,e))}}function Be({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Ge({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ve({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function qe(e){return null!==e&&"object"==typeof e?e.valueOf():e}function We(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const He=Symbol("implicit");function Ue(){var e=new Ne,t=[],n=[],r=He;function i(i){let o=e.get(i);if(void 0===o){if(r!==He)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 Ne;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 Ue(t,n).unknown(r)},We.apply(i,arguments),i}var Xe=Math.sqrt(50),Ze=Math.sqrt(10),Ke=Math.sqrt(2);function Ye(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Xe?10:o>=Ze?5:o>=Ke?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Xe?10:o>=Ze?5:o>=Ke?2:1)}function Qe(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Je(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $e(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=Qe,n=(t,n)=>Qe(e(t),n),r=(t,n)=>e(t)-n):(t=e===Qe||e===Je?e:et,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 et(){return 0}const tt=$e(Qe),nt=tt.right,rt=(tt.left,$e((function(e){return null===e?NaN:+e})).center,nt);function it(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ot(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function st(){}var at=.7,lt=1/at,ut="\\s*([+-]?\\d+)\\s*",ct="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dt=/^#([0-9a-f]{3,8})$/,pt=new RegExp(`^rgb\\(${ut},${ut},${ut}\\)$`),ft=new RegExp(`^rgb\\(${ht},${ht},${ht}\\)$`),gt=new RegExp(`^rgba\\(${ut},${ut},${ut},${ct}\\)$`),mt=new RegExp(`^rgba\\(${ht},${ht},${ht},${ct}\\)$`),yt=new RegExp(`^hsl\\(${ct},${ht},${ht}\\)$`),vt=new RegExp(`^hsla\\(${ct},${ht},${ht},${ct}\\)$`),_t={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 bt(){return this.rgb().formatHex()}function xt(){return this.rgb().formatRgb()}function wt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=dt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?kt(t):3===n?new Et(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ct(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ct(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=pt.exec(e))?new Et(t[1],t[2],t[3],1):(t=ft.exec(e))?new Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gt.exec(e))?Ct(t[1],t[2],t[3],t[4]):(t=mt.exec(e))?Ct(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=yt.exec(e))?Lt(t[1],t[2]/100,t[3]/100,1):(t=vt.exec(e))?Lt(t[1],t[2]/100,t[3]/100,t[4]):_t.hasOwnProperty(e)?kt(_t[e]):"transparent"===e?new Et(NaN,NaN,NaN,0):null}function kt(e){return new Et(e>>16&255,e>>8&255,255&e,1)}function Ct(e,t,n,r){return r<=0&&(e=t=n=NaN),new Et(e,t,n,r)}function St(e){return e instanceof st||(e=wt(e)),e?new Et((e=e.rgb()).r,e.g,e.b,e.opacity):new Et}function At(e,t,n,r){return 1===arguments.length?St(e):new Et(e,t,n,null==r?1:r)}function Et(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Mt(){return`#${It(this.r)}${It(this.g)}${It(this.b)}`}function Tt(){const e=Pt(this.opacity);return`${1===e?"rgb(":"rgba("}${Rt(this.r)}, ${Rt(this.g)}, ${Rt(this.b)}${1===e?")":`, ${e})`}`}function Pt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function It(e){return((e=Rt(e))<16?"0":"")+e.toString(16)}function Lt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ft(e,t,n,r)}function zt(e){if(e instanceof Ft)return new Ft(e.h,e.s,e.l,e.opacity);if(e instanceof st||(e=wt(e)),!e)return new Ft;if(e instanceof Ft)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 Ft(s,a,l,e.opacity)}function Ft(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ot(e){return(e=(e||0)%360)<0?e+360:e}function Dt(e){return Math.max(0,Math.min(1,e||0))}function Nt(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 jt(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}it(st,wt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bt,formatHex:bt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return zt(this).formatHsl()},formatRgb:xt,toString:xt}),it(Et,At,ot(st,{brighter(e){return e=null==e?lt:Math.pow(lt,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?at:Math.pow(at,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Et(Rt(this.r),Rt(this.g),Rt(this.b),Pt(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:Mt,formatHex:Mt,formatHex8:function(){return`#${It(this.r)}${It(this.g)}${It(this.b)}${It(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Tt,toString:Tt})),it(Ft,(function(e,t,n,r){return 1===arguments.length?zt(e):new Ft(e,t,n,null==r?1:r)}),ot(st,{brighter(e){return e=null==e?lt:Math.pow(lt,e),new Ft(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?at:Math.pow(at,e),new Ft(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 Et(Nt(e>=240?e-240:e+120,i,r),Nt(e,i,r),Nt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ft(Ot(this.h),Dt(this.s),Dt(this.l),Pt(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=Pt(this.opacity);return`${1===e?"hsl(":"hsla("}${Ot(this.h)}, ${100*Dt(this.s)}%, ${100*Dt(this.l)}%${1===e?")":`, ${e})`}`}}));const Bt=e=>()=>e;function Gt(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Bt(isNaN(e)?t:e)}const Vt=function e(t){var n=function(e){return 1==(e=+e)?Gt: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):Bt(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=At(e)).r,(t=At(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),s=Gt(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 qt(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=At(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 Wt(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]=Jt(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 Ht(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ut(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Xt(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]=Jt(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}qt((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 jt((n-r/t)*t,s,i,o,a)}})),qt((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 jt((n-r/t)*t,i,o,s,a)}}));var Zt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Kt=new RegExp(Zt.source,"g");function Yt(e,t){var n,r,i,o=Zt.lastIndex=Kt.lastIndex=0,s=-1,a=[],l=[];for(e+="",t+="";(n=Zt.exec(e))&&(r=Kt.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:Ut(n,r)})),o=Kt.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 Qt(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 Jt(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?Bt(t):("number"===i?Ut:"string"===i?(n=wt(t))?(t=n,Vt):Yt:t instanceof wt?Vt:t instanceof Date?Ht:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?Wt:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Xt:Ut:Qt))(e,t)}function $t(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function en(e){return+e}var tn=[0,1];function nn(e){return e}function rn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function on(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=rn(i,r),o=n(s,o)):(r=rn(r,i),o=n(o,s)),function(e){return o(r(e))}}function sn(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]=rn(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(t){var n=rt(e,t,1,r)-1;return o[n](i[n](t))}}function an(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ln(){return function(){var e,t,n,r,i,o,s=tn,a=tn,l=Jt,u=nn;function c(){var e,t,n,l=Math.min(s.length,a.length);return u!==nn&&(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?sn:on,i=o=null,h}function h(t){return null==t||isNaN(t=+t)?n:(i||(i=r(s.map(e),a,l)))(e(u(t)))}return h.invert=function(n){return u(t((o||(o=r(a,s.map(e),Ut)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,en),c()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),c()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=$t,c()},h.clamp=function(e){return arguments.length?(u=!!e||nn,c()):u!==nn},h.interpolate=function(e){return arguments.length?(l=e,c()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,r){return e=n,t=r,c()}}()(nn,nn)}var un,cn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hn(e){if(!(t=cn.exec(e)))throw new Error("invalid format: "+e);var t;return new dn({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 dn(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 pn(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 fn(e){return(e=pn(Math.abs(e)))?e[1]:NaN}function gn(e,t){var n=pn(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")}hn.prototype=dn.prototype,dn.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 mn={"%":(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)=>gn(100*e,t),r:gn,s:function(e,t){var n=pn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(un=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")+pn(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function yn(e){return e}var vn,_n,bn,xn=Array.prototype.map,wn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kn(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,s,a=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(s=Ye(e,t,n))||!isFinite(s))return[];if(s>0){let n=Math.round(e/s),r=Math.round(t/s);for(n*s<e&&++n,r*s>t&&--r,o=new Array(i=r-n+1);++a<i;)o[a]=(n+a)*s}else{s=-s;let n=Math.round(e*s),r=Math.round(t*s);for(n/s<e&&++n,r/s>t&&--r,o=new Array(i=r-n+1);++a<i;)o[a]=(n+a)/s}return r&&o.reverse(),o}(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){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Xe?i*=10:o>=Ze?i*=5:o>=Ke&&(i*=2),t<e?-i:i}(e,t,n);switch((r=hn(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(fn(t)/3)))-fn(Math.abs(e)))}(o,s))||(r.precision=i),bn(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,fn(t)-fn(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,-fn(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return _n(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=Ye(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 Cn(){var e=ln();return e.copy=function(){return an(e,Cn())},We.apply(e,arguments),kn(e)}function Sn(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}vn=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?yn:(t=xn.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?yn:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(xn.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 h(e){var t=(e=hn(e)).fill,n=e.align,h=e.sign,d=e.symbol,p=e.zero,f=e.width,g=e.comma,m=e.precision,y=e.trim,v=e.type;"n"===v?(g=!0,v="g"):mn[v]||(void 0===m&&(m=12),y=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var _="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===d?o:/[%p]/.test(v)?l:"",x=mn[v],w=/[defgprs%]/.test(v);function k(e){var i,o,l,d=_,k=b;if("c"===v)k=x(e)+k,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),m),y&&(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&&"+"!==h&&(C=!1),d=(C?"("===h?h:u:"-"===h||"("===h?"":h)+d,k=("s"===v?wn[8+un/3]:"")+k+(C&&"("===h?")":""),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}}g&&!p&&(e=r(e,1/0));var S=d.length+e.length+k.length,A=S<f?new Array(f-S+1).join(t):"";switch(g&&p&&(e=r(A+e,A.length?f-k.length:1/0),A=""),n){case"<":e=d+e+k+A;break;case"=":e=d+A+e+k;break;case"^":e=A.slice(0,S=A.length>>1)+d+e+k+A.slice(S);break;default:e=A+d+e+k}return a(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return e+""},k}return{format:h,formatPrefix:function(e,t){var n=h(((e=hn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(fn(t)/3))),i=Math.pow(10,-r),o=wn[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),_n=vn.format,bn=vn.formatPrefix;var An={value:()=>{}};function En(){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 Mn(r)}function Mn(e){this._=e}function Tn(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}}))}function Pn(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function Rn(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=An,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Mn.prototype=En.prototype={constructor:Mn,on:function(e,t){var n,r=this._,i=Tn(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]=Rn(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Rn(r[n],e.name,null);return this}for(;++o<s;)if((n=(e=i[o]).type)&&(n=Pn(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Mn(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 In=En,Ln={passive:!1},zn={capture:!0,passive:!1};function Fn(e){e.stopImmediatePropagation()}function On(e){e.preventDefault(),e.stopImmediatePropagation()}const Dn=e=>()=>e;function Nn(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 jn(e){return!e.ctrlKey&&!e.button}function Bn(){return this.parentNode}function Gn(e,t){return null==t?{x:e.x,y:e.y}:t}function Vn(){return navigator.maxTouchPoints||"ontouchstart"in this}function qn(e){return e}Nn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Wn=1e-6;function Hn(e){return"translate("+e+",0)"}function Un(e){return"translate(0,"+e+")"}function Xn(e){return t=>+e(t)}function Zn(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Kn(){return!this.__axis}function Yn(e,t){var n=[],r=null,i=null,o=6,s=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===e||4===e?-1:1,c=4===e||2===e?"x":"y",h=1===e||3===e?Hn:Un;function d(d){var p=null==r?t.ticks?t.ticks.apply(t,n):t.domain():r,f=null==i?t.tickFormat?t.tickFormat.apply(t,n):qn:i,g=Math.max(o,0)+a,m=t.range(),y=+m[0]+l,v=+m[m.length-1]+l,_=(t.bandwidth?Zn:Xn)(t.copy(),l),b=d.selection?d.selection():d,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*g).attr("dy",1===e?"0em":3===e?"0.71em":"0.32em")),d!==b&&(x=x.transition(d),w=w.transition(d),S=S.transition(d),A=A.transition(d),k=k.transition(d).attr("opacity",Wn).attr("transform",(function(e){return isFinite(e=_(e))?h(e+l):this.getAttribute("transform")})),C.attr("opacity",Wn).attr("transform",(function(e){var t=this.parentNode.__axis;return h((t&&isFinite(t=t(e))?t:_(e))+l)}))),k.remove(),x.attr("d",4===e||2===e?s?"M"+u*s+","+y+"H"+l+"V"+v+"H"+u*s:"M"+l+","+y+"V"+v:s?"M"+y+","+u*s+"V"+l+"H"+v+"V"+u*s:"M"+y+","+l+"H"+v),w.attr("opacity",1).attr("transform",(function(e){return h(_(e)+l)})),S.attr(c+"2",u*o),A.attr(c,u*g).text(f),b.filter(Kn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===e?"start":4===e?"end":"middle"),b.each((function(){this.__axis=_}))}return d.scale=function(e){return arguments.length?(t=e,d):t},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),d):n.slice()},d.tickValues=function(e){return arguments.length?(r=null==e?null:Array.from(e),d):r&&r.slice()},d.tickFormat=function(e){return arguments.length?(i=e,d):i},d.tickSize=function(e){return arguments.length?(o=s=+e,d):o},d.tickSizeInner=function(e){return arguments.length?(o=+e,d):o},d.tickSizeOuter=function(e){return arguments.length?(s=+e,d):s},d.tickPadding=function(e){return arguments.length?(a=+e,d):a},d.offset=function(e){return arguments.length?(l=+e,d):l},d}function Qn(e){return Yn(3,e)}function Jn(e){return Yn(4,e)}Math.abs,Math.atan2;const $n=Math.cos,er=(Math.max,Math.min,Math.sin),tr=Math.sqrt,nr=Math.PI,rr=2*nr,ir=tr(3),or={draw(e,t){const n=-tr(t/(3*ir));e.moveTo(0,2*n),e.lineTo(-ir*n,-n),e.lineTo(ir*n,-n),e.closePath()}},sr=Math.PI,ar=2*sr,lr=1e-6,ur=ar-lr;function cr(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hr(){return new cr}cr.prototype=hr.prototype={constructor:cr,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-e,l=r-t,u=o-e,c=s-t,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>lr)if(Math.abs(c*a-l*u)>lr&&i){var d=n-o,p=r-s,f=a*a+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(h),v=i*Math.tan((sr-Math.acos((f+h-g)/(2*m*y)))/2),_=v/y,b=v/m;Math.abs(_-1)>lr&&(this._+="L"+(e+_*u)+","+(t+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*p)+","+(this._x1=e+b*a)+","+(this._y1=t+b*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=e+s,u=t+a,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>lr||Math.abs(this._y1-u)>lr)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%ar+ar),h>ur?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>lr&&(this._+="A"+n+","+n+",0,"+ +(h>=sr)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const dr=hr;function pr(e){return function(){return e}}tr(3);const fr={draw(e,t){const n=tr(t/nr);e.moveTo(n,0),e.arc(0,0,n,0,rr)}};tr(1/3),er(nr/10),er(7*nr/10);function gr(e,t){let n=null;function r(){let r;if(n||(n=r=dr()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return e="function"==typeof e?e:pr(e||fr),t="function"==typeof t?t:pr(void 0===t?64:+t),r.type=function(t){return arguments.length?(e="function"==typeof t?t:pr(t),r):e},r.size=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r}function mr(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function yr(e){this._context=e}function vr(e){return new yr(e)}function _r(e){return e[0]}function br(e){return e[1]}function xr(e,t){var n=pr(!0),r=null,i=vr,o=null;function s(s){var a,l,u,c=(s=mr(s)).length,h=!1;for(null==r&&(o=i(u=dr())),a=0;a<=c;++a)!(a<c&&n(l=s[a],a,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(l,a,s),+t(l,a,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?_r:pr(e),t="function"==typeof t?t:void 0===t?br:pr(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:pr(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:pr(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function wr(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 kr(e){this._context=e}function Cr(e){return new kr(e)}function Sr(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}er(rr/10),$n(rr/10),tr(3),tr(3),tr(12),Array.prototype.slice,yr.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)}}},kr.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:wr(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:wr(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};const Ar=Sr("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Er=Sr("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Mr=Sr("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Tr=Sr("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Pr=Sr("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Rr=Sr("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Ir={width:800,height:280,margins:{top:10,right:30,bottom:55,left:50},imperial:!1,expand:!0,expandControls:!0,translation:{}};class Lr{constructor(e,t={},n={}){this._container=e,t=Object.assign(Ir,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=[Ar,Er,Mr,Tr,Pr,Rr],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=Fe(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._expand&&this._expandContainer()}resize(e){e.width&&(this._width=e.width),e.height&&(this._height=e.height),Fe(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._createSelectionBox()}_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=Fe(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?(Fe(this._button).style("display","block"),Fe(this._container).selectAll("svg").style("display","none"),Fe(this._closeButton).style("display","none")):(Fe(this._button).style("display","none"),Fe(this._container).selectAll("svg").style("display","block"),Fe(this._closeButton).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=Ue(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,h;const d=[],p=e[n].features[i].geometry.coordinates.length,f=e[n].features[i].properties.attributeType;let g,m;if(void 0===this._mappings)f in s?(g=f,m=s[f]):(g=f,m=t(i),s[f]=m);else if(a){const t=this._mappings[e[n].properties.summary](f);g=t.text,m=t.color}else g=this._mappings[e[n].properties.summary][f].text,m=this._mappings[e[n].properties.summary][f].color;const y={type:f,text:g,color:m};this._categories[n].attributes.push(y),f in this._categories[n].legend||(this._categories[n].legend[f]=y);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]),h=this._calcDistance(u,c)/1e3,r+=h,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],d.push({altitude:l,position:s,x:u.lng,y:u.lat,latlng:u,type:g,areaIdx:i})}this._categories[n].distances.push(r),this._categories[n].geometries.push(d)}n===e.length-1&&(this._totalDistance=r)}}_calculateElevationBounds(){if(0===this._elevations.length)return void(this._elevationBounds={min:0,max:0});const e=Sn(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=De(".focusbox text").size();De(".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:or,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));Fe(e).attr("transform",(e=>"translate("+e.x+","+i+") rotate("+e.angle+")")),Fe(".horizontalLine").attr("y1",i).attr("y2",i),this._highlightedCoords=r>=n?[]:this._findCoordsForY(r),Fe(".horizontalLineText").attr("y",i<10?0:i-10).text(Fr(this._y.invert(i),this._imperial,!0)),this._routeSegmentsSelected(this._highlightedCoords)},n=e=>{Fe(e).classed("active",!1),Fe(".horizontalLine").classed("active",!1),this._routeSegmentsSelected(this._highlightedCoords)};this._svg.selectAll(".horizontal-symbol").data(e).enter().append("path").attr("class","lineSelection").attr("d",gr().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=jn,o=Bn,s=Gn,a=Vn,l={},u=In("start","drag","end"),c=0,h=0;function d(e){e.on("mousedown.drag",p).filter(a).on("touchstart.drag",m).on("touchmove.drag",y,Ln).on("touchend.drag touchcancel.drag",v).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=_(this,o.call(this,s,a),s,a,"mouse");l&&(Fe(s.view).on("mousemove.drag",f,zn).on("mouseup.drag",g,zn),function(e){var t=e.document.documentElement,n=Fe(e).on("dragstart.drag",On,zn);"onselectstart"in t?n.on("selectstart.drag",On,zn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(s.view),Fn(s),n=!1,e=s.clientX,t=s.clientY,l("start",s))}}function f(r){if(On(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>h}l.mouse("drag",r)}function g(e){Fe(e.view).on("mousemove.drag mouseup.drag",null),function(e,t){var n=e.document.documentElement,r=Fe(e).on("dragstart.drag",null);t&&(r.on("click.drag",On,zn),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),On(e),l.mouse("end",e)}function m(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=_(this,a,e,t,s[n].identifier,s[n]))&&(Fn(e),r("start",e,s[n]))}}function y(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(On(e),n("drag",e,r[t]))}function v(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])&&(Fn(e),n("end",e,i[t]))}function _(e,t,n,r,i,o){var a,h,p,f=u.copy(),g=Oe(o||n,t);if(null!=(p=s.call(e,new Nn("beforestart",{sourceEvent:n,target:d,identifier:i,active:c,x:g[0],y:g[1],dx:0,dy:0,dispatch:f}),r)))return a=p.x-g[0]||0,h=p.y-g[1]||0,function n(o,s,u){var m,y=g;switch(o){case"start":l[i]=n,m=c++;break;case"end":delete l[i],--c;case"drag":g=Oe(u||s,t),m=c}f.call(o,e,new Nn(o,{sourceEvent:s,subject:p,target:d,identifier:i,active:m,x:g[0]+a,y:g[1]+h,dx:g[0]-y[0],dy:g[1]-y[1],dispatch:f}),r)}}return d.filter=function(e){return arguments.length?(i="function"==typeof e?e:Dn(!!e),d):i},d.container=function(e){return arguments.length?(o="function"==typeof e?e:Dn(e),d):o},d.subject=function(e){return arguments.length?(s="function"==typeof e?e:Dn(e),d):s},d.touchable=function(e){return arguments.length?(a="function"==typeof e?e:Dn(!!e),d):a},d.on=function(){var e=u.on.apply(u,arguments);return e===u?d:e},d.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,d):Math.sqrt(h)},d}().on("start",(function(e,t){Fe(this).raise().classed("active",!0),Fe(".horizontalLine").raise().classed("active",!0)})).on("drag",(function(e,n){t(this,e)})).on("end",(function(e,t){n(this)})))}_appendScales(){this._x=Cn().range([0,this._svgWidth]),this._y=Cn().range([this._svgHeight,0]),this._x.domain([0,this._totalDistance]),this._y.domain([this._elevationBounds.min,this._elevationBounds.max]),this._xAxis=Qn().scale(this._x),this._xAxis.tickFormat((e=>zr(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=Jn().scale(this._y).tickFormat((e=>Fr(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=Fe(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=pr(!0),o=null,s=vr,a=null;function l(l){var u,c,h,d,p,f=(l=mr(l)).length,g=!1,m=new Array(f),y=new Array(f);for(null==o&&(a=s(p=dr())),u=0;u<=f;++u){if(!(u<f&&i(d=l[u],u,l))===g)if(g=!g)c=u,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=u-1;h>=c;--h)a.point(m[h],y[h]);a.lineEnd(),a.areaEnd()}g&&(m[u]=+e(d,u,l),y[u]=+t(d,u,l),a.point(r?+r(d,u,l):m[u],n?+n(d,u,l):y[u]))}if(p)return a=null,p+""||null}function u(){return xr().defined(i).curve(s).context(o)}return e="function"==typeof e?e:void 0===e?_r:pr(+e),t="function"==typeof t?t:pr(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?br:pr(+n),l.x=function(t){return arguments.length?(e="function"==typeof t?t:pr(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:pr(+t),l):e},l.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:pr(+e),l):r},l.y=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:pr(+e),l):t},l.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:pr(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:pr(!!e),l):i},l.curve=function(e){return arguments.length?(s=e,null!=o&&(a=s(o)),l):s},l.context=function(e){return arguments.length?(null==e?o=a=null:a=s(o=e),l):o},l}().x((e=>{const t=this._x(e.position);return e.xDiagonalCoordinate=t,t})).y0(this._svgHeight).y1((e=>this._y(e.altitude))).curve(vr),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 Qn().scale(this._x)}_make_y_axis(){return Jn().scale(this._y)}_createSelectionBox(){const e=Fe(this._container).select("svg"),t=this._width-this._margin.right,n=this._height-this._margin.bottom+this._margin.bottom/2+6,r=[{x:t-25,y:n+3,color:"#000",type:or,id:"leftArrowSelection",angle:0},{x:t-10,y:n,color:"#000",type:or,id:"rightArrowSelection",angle:180}];let i=e.selectAll(".select-symbol").data(r);i.remove(),i=e.selectAll(".select-symbol").data(r),this._data.length>1&&i.enter().append("path").merge(i).attr("class","select-symbol").attr("d",gr().type((e=>e.type))).attr("transform",(e=>"translate("+e.x+","+e.y+") rotate("+e.angle+")")).attr("id",(e=>e.id)).style("fill",(e=>e.color)).on("mousedown",((e,t)=>{this._arrowClick=!0,"rightArrowSelection"===t.id&&s(),"leftArrowSelection"===t.id&&a()}));const o=r=>{if(this._selectionText&&this._selectionText.remove(),0===this._categories.length)return;const i=this._categories[r].info;"function"==typeof this._chooseSelectionCallback&&this._chooseSelectionCallback(r,i);const o=[{selection:i.text}];this._selectionText=e.selectAll("selection_text").data(o).enter().append("text").attr("x",t-35).attr("y",n+4).text((e=>e.selection)).attr("class","select-info").attr("id","selectionText").attr("text-anchor","end")};o(this._currentSelection);let s=()=>{let e=this._currentSelection+=1;e===this._categories.length&&(this._currentSelection=e=0),o(e),this._routeSegmentsSelected([]),this._removeChart(),this._createChart(e),this._removeDragRectangle(),this._rectangle&&this._drawDragRectangle(this._rectangle[0],this._rectangle[1])},a=()=>{let e=this._currentSelection-=1;-1===e&&(this._currentSelection=e=this._categories.length-1),o(e),this._routeSegmentsSelected([]),this._removeChart(),this._createChart(e),this._removeDragRectangle(),this._rectangle&&this._drawDragRectangle(this._rectangle[0],this._rectangle[1])}}_createLegend(){const e=[];if(this._categories.length>0)for(let t in this._categories[this._currentSelection].legend)e.push(this._categories[this._currentSelection].legend[t]);const t=this._height-this._margin.bottom,n=t+this._margin.bottom/2,r=[{text:this._getTranslation("legend")}],i=this._svg.selectAll(".hlegend-hover").data(e).enter().append("g").attr("class","legend").style("display","none").attr("transform",((e,t)=>"translate(-8,"+(14*t-28)+")")),o=i.append("rect").attr("class","legend-rect").attr("x",15).attr("y",36).attr("width",6).attr("height",6);0!==Object.keys(this._graphStyle).length?(Object.entries(this._graphStyle).forEach((([e,t])=>o.style(e,t))),o.style("stroke",((e,t)=>e.color)).style("fill",((e,t)=>e.color))):o.style("stroke","black").style("fill",((e,t)=>e.color)),i.append("text").attr("class","legend-text").attr("x",30).attr("y",42).text(((e,n)=>{const r=e.text;return this._boxBoundY=(t-2*t/3+7)*n,r}));let s=this._svg.selectAll(".legend-hover").data(r).enter().append("g").attr("class","legend-hover");this._showLegend=!1,s.append("text").attr("x",15).attr("y",n).attr("text-anchor","start").text(((e,t)=>e.text)).on("mouseover",(()=>{De(".legend").style("display","block")})).on("mouseleave",(()=>{this._showLegend||De(".legend").style("display","none")})).on("click",(()=>{this._showLegend=!this._showLegend}))}_createBorderTopLine(){const e=this._areasFlattended,t=xr().x((e=>(0,this._x)(e.position))).y((e=>(0,this._y)(e.altitude))).curve(Cr);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=Nr(".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(" "+zr(1e3*i,this._totalDistance,this._imperial,!0)),this._altTspan.text(" "+Fr(r,this._imperial,!0)),this._areaTspan.text(" "+zr(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=$e((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 zr(e,t,n,r){return n?Or(1e3*t)<.1?Dr(e).toFixed(r?1:0)+" ft":Or(1e3*t)<10?Or(e).toFixed(r?3:1)+" mi":Or(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 Fr(e,t,n){return t?Dr(e).toFixed(n?1:0)+" ft":e.toFixed(n?2:0)+" m"}function Or(e){return e/1609.34}function Dr(e){return e/.3048}const Nr=e=>{const t=[],n=[];return De(e).nodes().map((e=>e.getBBox())).forEach((e=>{t.push(e.width),n.push(e.height)})),{width:Sn(t),height:Sn(n)}};var jr=n(6431),Br={};Br.styleTagTransform=b(),Br.setAttributes=m(),Br.insert=f().bind(null,"head"),Br.domAPI=d(),Br.insertStyleElement=v(),c()(jr.Z,Br),jr.Z&&jr.Z.locals&&jr.Z.locals;const Gr=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 Vr{constructor(e){this.result=e}}class qr{constructor(e,t){this.point=e,this.zoom=t}}class Wr{constructor(e){this.profile=e}}class Hr{constructor(e,t,n){this.atIndex=e,this.coordinate=t,this.isInitialized=n}}class Ur{constructor(e,t){this.queryPoints=e,this.routingProfile=t}}class Xr{}class Zr{constructor(e){this.point=e}}class Kr{constructor(e,t){this.point=e,this.newIndex=t}}class Yr{constructor(e){this.point=e}}class Qr{constructor(e){this.enabled=e}}class Jr{constructor(e,t,n=!1){this.customModel=e,this.valid=t,this.issueRouteRequest=n}}class $r{constructor(e,t){this.result=t,this.request=e}}class ei{constructor(e){this.message=e}}class ti extends ei{constructor(e,t){super(t),this.request=e}}class ni{}class ri{constructor(e){this.path=e}}class ii{}class oi{constructor(e){this.styleOption=e}}class si{constructor(e){this.routingGraphEnabled=e}}class ai{constructor(e){this.urbanDensityEnabled=e}}class li{}class ui{constructor(e,t){this.coordinate=e,this.zoom=t}}class ci{constructor(e){this.bbox=e}}class hi{constructor(e){this.pathDetailsPoint=e}}class di{constructor(e){this.bbox=e}}class pi{constructor(e){this.segments=e}}class fi{constructor(e,t){this.point=e,this.properties=t}}class gi{}function mi(e){const t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=t>0?t+" h":"";return 0==n&&r.length>0?r:r+" "+n+" min"}const yi=new Intl.NumberFormat(navigator.language,{maximumFractionDigits:1});function vi(e,t,n=!1){return t?e<160.934||n?Math.floor(e/.3048)+" ft":yi.format(e/1609.34)+" mi":e<1e3||n?Math.floor(e)+" m":yi.format(e/1e3)+" km"}function _i(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.country&&(n+=(n?", ":"")+e.country),n}function bi(e){return Math.round(1e6*e.lat)/1e6+","+Math.round(1e6*e.lng)/1e6}function xi(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 wi=config;var ki=n.n(wi);let Ci;function Si(){if(!Ci)throw Error('Api must be initialized before it can be used. Use "setApi" when starting the app');return Ci}class Ai{constructor(e,t){this.apiAddress=e,this.apiKey=t}async info(){const e=await fetch(this.getURLWithKey("info").toString(),{headers:{Accept:"application/json"}});if(e.ok){const t=await e.json();return Ai.convertToApiInfo(t)}throw new Error("Could not connect to the Service. Try to reload!")}infoWithDispatch(){this.info().then((e=>Gr.dispatch(new Vr(e)))).catch((e=>Gr.dispatch(new ei(e.message))))}async geocode(e,t){const n=this.getURLWithKey("geocode");n.searchParams.append("q",e),n.searchParams.append("provider",t);const r=s().getLang().split("_");n.searchParams.append("locale",r.length>0?r[0]:"en");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)}async route(e){const t=Ai.createRequest(e),n=await fetch(this.getURLWithKey("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:Ai.decodeResult(e,t.elevation)}}if(500===n.status)throw new Error(a("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(a("route_request_failed"))}routeWithDispatch(e){this.route(e).then((t=>Gr.dispatch(new $r(e,t)))).catch((t=>(console.warn("error when performing /route request: ",t),Gr.dispatch(new ti(e,t.message)))))}getURLWithKey(e){const t=new URL(this.apiAddress+e);return t.searchParams.append("key",this.apiKey),t}static createRequest(e){var t,n;const r={points:e.points,profile:e.profile,elevation:!0,debug:!1,instructions:!0,locale:s().getLang(),optimize:"false",points_encoded:!0,snap_preventions:(null===(t=wi.request)||void 0===t?void 0:t.snapPreventions)?wi.request.snapPreventions:[],details:(null===(n=wi.request)||void 0===n?void 0:n.details)?wi.request.details:[],...wi.extraProfiles?wi.extraProfiles[e.profile]:{}};return e.customModel&&(r.custom_model=e.customModel,r["ch.disable"]=!0),e.points.length<=2&&e.maxAlternativeRoutes>1?{...r,"alternative_route.max_paths":e.maxAlternativeRoutes,algorithm:"alternative_route"}:r}static convertToApiInfo(e){let t=[0,0,0,0],n="",r="";const i=[];for(const t in e.profiles){const n={name:e.profiles[t].name};i.push(n)}let o=["car","truck","scooter","foot","hike","bike"];i.sort(((e,t)=>{let n=o.findIndex((t=>e.name.indexOf(t)>=0)),r=o.findIndex((e=>t.name.indexOf(e)>=0));return n<0&&(n=o.length),r<0&&(r=o.length),n-r}));for(const i in e)"bbox"===i?t=e[i]:"version"===i?n=e[i]:"import_date"===i&&(r=e[i]);return{profiles:i,elevation:e.elevation,bbox:t,version:n,import_date:r,encoded_values:e.encoded_values}}static decodeResult(e,t){return e.paths.map((e=>({...e,points:Ai.decodePoints(e,t),snapped_waypoints:Ai.decodeWaypoints(e,t)}))).map((e=>({...e,instructions:Ai.setPointsOnInstructions(e)})))}static decodePoints(e,t){return e.points_encoded?{type:"LineString",coordinates:Ai.decodePath(e.points,t)}:e.points}static decodeWaypoints(e,t){return e.points_encoded?{type:"LineString",coordinates:Ai.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")}}class Ei{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 Mi(e,t){const n=e.lat,r=t.lat,i=e.lng,o=t.lng,s=Math.sin(Ti(r-n)/2),a=Math.sin(Ti(o-i)/2);return 12742e3*Math.asin(Math.sqrt(s*s+a*a*Math.cos(Ti(n))*Math.cos(Ti(r))))}function Ti(e){return.017453292519943295*e}var Pi,Ri;!function(e){e[e.From=0]="From",e[e.To=1]="To",e[e.Via=2]="Via"}(Pi||(Pi={})),function(e){e[e.SENT=0]="SENT",e[e.SUCCESS=1]="SUCCESS",e[e.FAILED=2]="FAILED"}(Ri||(Ri={}));class Ii extends Ei{constructor(e,t=null){super(Ii.getInitialState(t)),this.api=e}static getInitialState(e){return{queryPoints:[Ii.getEmptyPoint(0,Pi.From),Ii.getEmptyPoint(1,Pi.To)],nextQueryPointId:2,currentRequest:{subRequests:[]},maxAlternativeRoutes:3,routingProfile:{name:""},customModelEnabled:null!=e,customModelValid:!1,customModel:null,zoom:!0,initialCustomModelStr:e}}reduce(e,t){if(t instanceof Yr){const n=Ii.replacePoint(e.queryPoints,{...t.point,isInitialized:!1});return{...e,queryPoints:n}}if(t instanceof Xr){const t=e.queryPoints.map((e=>({...e,queryText:"",point:{lat:0,lng:0},isInitialized:!1})));return{...e,queryPoints:t}}if(t instanceof qr){const n={...e,queryPoints:Ii.replacePoint(e.queryPoints,t.point),zoom:t.zoom};return this.routeIfReady(n)}if(t instanceof Kr){const n=Ii.movePoint(e.queryPoints,t.point,t.newIndex).map(((t,n)=>{const r=Ii.getPointType(n,e.queryPoints.length);return{...t,color:Ii.getMarkerColor(r),type:r,id:this.state.nextQueryPointId+n}})),r={...e,nextQueryPointId:e.nextQueryPointId+e.queryPoints.length,queryPoints:n};return this.routeIfReady(r)}if(t instanceof Hr){const n=e.queryPoints.slice(),r=t.isInitialized?bi(t.coordinate):"";n.splice(t.atIndex,0,{coordinate:t.coordinate,id:e.nextQueryPointId,queryText:r,color:"",isInitialized:t.isInitialized,type:Pi.Via});const i=n.map(((e,t)=>{const r=Ii.getPointType(t,n.length);return{...e,color:Ii.getMarkerColor(r),type:r}})),o={...e,nextQueryPointId:e.nextQueryPointId+1,queryPoints:i};return this.routeIfReady(o)}if(t instanceof Ur){const n=t.queryPoints.map(((n,r)=>{const i=Ii.getPointType(r,t.queryPoints.length),o=n.isInitialized&&!n.queryText?bi(n.coordinate):n.queryText;return{...n,id:e.nextQueryPointId+r,type:i,color:Ii.getMarkerColor(i),queryText:o}})),r=e.nextQueryPointId+n.length;return this.routeIfReady({...e,queryPoints:n,nextQueryPointId:r,routingProfile:t.routingProfile})}if(t instanceof Zr){const n=e.queryPoints.filter((e=>e.id!==t.point.id)).map(((t,n)=>{const r=Ii.getPointType(n,e.queryPoints.length-1);return{...t,color:Ii.getMarkerColor(r),type:r}})),r={...e,queryPoints:n};return this.routeIfReady(r)}if(t instanceof Vr){if(e.routingProfile.name||t.result.profiles.length<=0)return e;const n=t.result.profiles[0];return this.routeIfReady({...e,routingProfile:n})}if(t instanceof Wr){const n={...e,routingProfile:t.profile};return this.routeIfReady(n)}if(t instanceof Jr){const n={...e,customModel:t.customModel,customModelValid:t.valid};return t.issueRouteRequest?this.routeIfReady(n):n}if(t instanceof $r||t instanceof ti)return Ii.handleFinishedRequest(e,t);if(t instanceof Qr){const n={...e,customModelEnabled:t.enabled};return this.routeIfReady(n)}return e}static handleFinishedRequest(e,t){const n=t instanceof $r?Ri.SUCCESS:Ri.FAILED,r=Ii.replaceSubRequest(e.currentRequest.subRequests,t.request,n);return{...e,currentRequest:{subRequests:r}}}routeIfReady(e){if(Ii.isReadyToRoute(e)){let t;const n=function(e){let t=0;for(let n=1;n<e.length;n++){const r=Mi(e[n-1].coordinate,e[n].coordinate);t=Math.max(r,t)}return t}(e.queryPoints);if(e.customModelEnabled)if(n<2e5)t=[Ii.buildRouteRequest(e)];else{if(!(n<5e5))return Gr.dispatch(new ei("Using the custom model feature is unfortunately not possible when the request points are further than "+vi(5e5,!1)+" apart.")),e;t=[Ii.buildRouteRequest({...e,maxAlternativeRoutes:1})]}else t=[Ii.buildRouteRequest({...e,maxAlternativeRoutes:1})],2===e.queryPoints.length&&e.maxAlternativeRoutes>1&&(Ai.isMotorVehicle(e.routingProfile.name)||n<5e5)&&t.push(Ii.buildRouteRequest(e));return{...e,currentRequest:{subRequests:this.send(t)}}}return e}send(e){const t=e.map((e=>({args:e,state:Ri.SENT})));return t.forEach((e=>this.api.routeWithDispatch(e.args))),t}static isReadyToRoute(e){return!(e.customModelEnabled&&!e.customModel||e.customModelEnabled&&e.customModel&&!e.customModelValid||e.queryPoints.length<=1||!e.queryPoints.every((e=>e.isInitialized))||!e.routingProfile.name)}static movePoint(e,t,n){if(n<0)return e;let 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 Li(e,(e=>e.id===t.id),(()=>t))}static replaceSubRequest(e,t,n){return Li(e,(e=>e.args===t),(e=>({...e,state:n})))}static getMarkerColor(e){switch(e){case Pi.From:return"#7cb342";case Pi.To:return"#F97777";default:return"#76D0F7"}}static getPointType(e,t){return 0===e?Pi.From:e===t-1?Pi.To:Pi.Via}static buildRouteRequest(e){const t=e.queryPoints.map((e=>[e.coordinate.lng,e.coordinate.lat]));return{points:t,profile:e.routingProfile.name,maxAlternativeRoutes:e.maxAlternativeRoutes,customModel:e.customModelEnabled?e.customModel:null,zoom:e.zoom}}static getEmptyPoint(e,t){return{isInitialized:!1,queryText:"",coordinate:{lat:0,lng:0},id:e,color:Ii.getMarkerColor(t),type:t}}}function Li(e,t,n){const r=[];for(const i of e)t(i)?r.push(n(i)):r.push(i);return r}const zi=l.createContext(!1);function Fi({selectedPath:t}){const n=(0,l.useRef)(null),r=(0,l.useRef)(null),[i,o]=(0,l.useState)(null);(0,l.useEffect)((()=>{const e={width:Oi(n.current.clientWidth),height:224,expandControls:!0},t={pointSelectedCallback:Di,areaSelectedCallback:Ni,routeSegmentsSelectedCallback:ji};o(new Lr(r.current,e,t))}),[r]);const s=()=>{null==i||i.resize({width:Oi(n.current.clientWidth)})};(0,l.useEffect)((()=>(window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)))),(0,l.useEffect)((()=>{const e=function(e){const t=e.points.coordinates.map((e=>2==e.length?[...e,0]:e)),n={data:[],mappings:{}},r=Vi("Elevation",[Gi(t,"elevation")]);n.data.push(r),n.mappings.Elevation=function(){return{text:"Elevation",color:Ii.getMarkerColor(Pi.From)}};const i=[];for(let e=0;e<t.length-1;e++){const n=t[e],r=t[e+1],o=qi(n,r),s=100*(r[2]-n[2])/o;i.push(Gi([n,r],s))}const o=Vi("Slope",i);if(n.data.push(o),n.mappings.Slope=Bi,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=qi(o,s),l=100*(s[2]-o[2])/a;let u=0;for(let e=0;e<n.length;e++){const t=u/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&&(u+=qi(n[e],n[e+1]))}i.push(Gi(n,l))}const o=Vi("Towerslope",i);n.data.push(o),n.mappings.Towerslope=Bi}return Object.entries(e.details).map((([e,r])=>{const i=r.map((([e,n,r="Undefined"])=>Gi(t.slice(e,n+1),r)));n.data.push(Vi(e,i)),n.mappings[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,l.useContext)(zi);(0,l.useEffect)((()=>{null==i||i.setImperial(a),null==i||i.redraw()}),[i,a]);const u={display:0!==t.points.coordinates.length?null:"none"};return(0,e.jsx)("div",{className:k.heightgraphContainer,ref:n,children:(0,e.jsx)("div",{className:k.innerDiv,style:u,ref:r})})}function Oi(e){return Math.min(e,1e3)}function Di(e,t,n){Gr.dispatch(new hi(e?{point:e,elevation:t,description:n}:null))}function Ni(e){Gr.dispatch(new di(e?[e.sw.lng,e.sw.lat,e.ne.lng,e.ne.lat]:null))}function ji(e){Gr.dispatch(new pi(e))}function Bi(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.toFixed(2),color:"rgb("+i[0]+", "+i[1]+", "+i[2]+")"}}function Gi(e,t){return{type:"Feature",geometry:{type:"LineString",coordinates:e},properties:{attributeType:t}}}function Vi(e,t){return{type:"FeatureCollection",features:t,properties:{summary:e,records:t.length}}}function qi(e,t){return Mi({lat:e[1],lng:e[0]},{lat:t[1],lng:t[0]})}var Wi=n(6718),Hi={};Hi.styleTagTransform=b(),Hi.setAttributes=m(),Hi.insert=f().bind(null,"head"),Hi.domAPI=d(),Hi.insertStyleElement=v(),c()(Wi.Z,Hi);const Ui=Wi.Z&&Wi.Z.locals?Wi.Z.locals:void 0;let Xi,Zi,Ki,Yi,Qi,Ji,$i,eo;const to=()=>Xi,no=()=>Zi,ro=()=>Ki,io=()=>Yi,oo=()=>Qi,so=()=>Ji,ao=()=>$i,lo=()=>eo;var uo=n(1788),co={};co.styleTagTransform=b(),co.setAttributes=m(),co.insert=f().bind(null,"head"),co.domAPI=d(),co.insertStyleElement=v(),c()(uo.Z,co),uo.Z&&uo.Z.locals&&uo.Z.locals;var ho=n(5639),po={};po.styleTagTransform=b(),po.setAttributes=m(),po.insert=f().bind(null,"head"),po.domAPI=d(),po.insertStyleElement=v(),c()(ho.Z,po);const fo=ho.Z&&ho.Z.locals?ho.Z.locals:void 0;function go({map:t}){const n=(0,l.useRef)(null);return(0,l.useEffect)((()=>{t.setTarget(n.current)}),[t]),(0,e.jsx)("div",{ref:n,className:fo.mapContainer})}var mo=n(7092),yo={};yo.styleTagTransform=b(),yo.setAttributes=m(),yo.insert=f().bind(null,"head"),yo.domAPI=d(),yo.insertStyleElement=v(),c()(mo.Z,yo);const vo=mo.Z&&mo.Z.locals?mo.Z.locals:void 0;var _o=n(4245),bo={};bo.styleTagTransform=b(),bo.setAttributes=m(),bo.insert=f().bind(null,"head"),bo.domAPI=d(),bo.insertStyleElement=v(),c()(_o.Z,bo);const xo=_o.Z&&_o.Z.locals?_o.Z.locals:void 0;function wo(t){const n=xo.button+" "+t.className;return(0,e.jsx)("button",{...t,className:n,children:t.children})}var ko;function Co(){return Co=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},Co.apply(this,arguments)}const So=function(e){return l.createElement("svg",Co({"aria-hidden":"true","data-prefix":"fas","data-icon":"layer-group",className:"layer-group-solid_svg__svg-inline--fa layer-group-solid_svg__fa-layer-group layer-group-solid_svg__fa-w-16",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",role:"img"},e),ko||(ko=l.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 Ao(t){const[n,r]=(0,l.useState)(!1);return(0,e.jsx)("div",{className:vo.mapOptionsContainer,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:n?(0,e.jsx)(Eo,{storeState:t,notifyChanged:()=>r(!1)}):(0,e.jsx)(wo,{className:vo.layerButton,onClick:()=>r(!0),children:(0,e.jsx)(So,{})})})}const Eo=function({storeState:t,notifyChanged:n}){return(0,e.jsxs)("div",{className:vo.options,children:[(0,e.jsx)("div",{onChange:e=>{n(),function(e,t){const n=t.find((t=>t.name===e.value));n&&Gr.dispatch(new oi(n))}(e.target,t.styleOptions)},children:t.styleOptions.map((n=>(0,e.jsxs)("div",{className:vo.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)))}),wi.routingGraphLayerAllowed&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:vo.option,children:[(0,e.jsx)("input",{type:"checkbox",id:"routing-graph-checkbox",checked:t.routingGraphEnabled,onChange:e=>{n(),Gr.dispatch(new si(e.target.checked))}}),(0,e.jsx)("label",{htmlFor:"routing-graph-checkbox",children:"Show Routing Graph"})]}),(0,e.jsxs)("div",{className:vo.option,children:[(0,e.jsx)("input",{type:"checkbox",id:"urban-density-checkbox",checked:t.urbanDensityEnabled,onChange:e=>{n(),Gr.dispatch(new ai(e.target.checked))}}),(0,e.jsx)("label",{htmlFor:"urban-density-checkbox",children:"Show Urban Density"})]})]})]})};var Mo=n(6820),To={};To.styleTagTransform=b(),To.setAttributes=m(),To.insert=f().bind(null,"head"),To.domAPI=d(),To.insertStyleElement=v(),c()(Mo.Z,To);const Po=Mo.Z&&Mo.Z.locals?Mo.Z.locals:void 0;var Ro=n(6042),Io={};Io.styleTagTransform=b(),Io.setAttributes=m(),Io.insert=f().bind(null,"head"),Io.domAPI=d(),Io.insertStyleElement=v(),c()(Ro.Z,Io);const Lo=Ro.Z&&Ro.Z.locals?Ro.Z.locals:void 0;var zo;function Fo(){return Fo=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},Fo.apply(this,arguments)}const Oo=function(e){return l.createElement("svg",Fo({"data-prefix":"fas","data-icon":"minus-circle",className:"minus-circle-solid_svg__svg-inline--fa minus-circle-solid_svg__fa-minus-circle minus-circle-solid_svg__fa-w-16",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",role:"img"},e),zo||(zo=l.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 Do;function No(){return No=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},No.apply(this,arguments)}const jo=function(e){return l.createElement("svg",No({"aria-hidden":"true","data-prefix":"fas","data-icon":"plus-circle",className:"plus-circle-solid_svg__svg-inline--fa plus-circle-solid_svg__fa-plus-circle plus-circle-solid_svg__fa-w-16",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",role:"img"},e),Do||(Do=l.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 Bo;function Go(){return Go=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},Go.apply(this,arguments)}const Vo=function(e){return l.createElement("svg",Go({xmlns:"http://www.w3.org/2000/svg",height:48,width:48,viewBox:"0 0 50 50",role:"img"},e),Bo||(Bo=l.createElement("path",{d:"M6 40V8l38 16Zm3-4.65L36.2 24 9 12.5v8.4L21.1 24 9 27Zm0 0V12.5 27Z"})))};var qo=n(1248),Wo={};Wo.styleTagTransform=b(),Wo.setAttributes=m(),Wo.insert=f().bind(null,"head"),Wo.domAPI=d(),Wo.insertStyleElement=v(),c()(qo.Z,Wo);const Ho=qo.Z&&qo.Z.locals?qo.Z.locals:void 0;var Uo,Xo;function Zo(){return Zo=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},Zo.apply(this,arguments)}const Ko=function(e){return l.createElement("svg",Zo({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img"},e),Uo||(Uo=l.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"})),Xo||(Xo=l.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 Yo{constructor(e,t,n){this.mainText=e,this.secondText=t,this.point=n}toText(){return this.mainText+", "+this.secondText}}class Qo{}class Jo{constructor(e){this.search=e}}function $o({items:t,highlightedItem:n,onSelect:r}){return(0,e.jsx)("ul",{children:t.map(((t,i)=>(0,e.jsx)("li",{className:Ho.autocompleteItem,children:es(t,n===t,r)},i)))})}function es(t,n,r){if(t instanceof Yo)return(0,e.jsx)(rs,{item:t,isHighlighted:n,onSelect:r});if(t instanceof Qo)return(0,e.jsx)(ns,{item:t,isHighlighted:n,onSelect:r});if(t instanceof Jo)return(0,e.jsx)(ts,{item:t,isHighlighted:n,onSelect:r});throw Error("Unsupported item type: "+typeof t)}function ts({item:t,isHighlighted:n,onSelect:r}){return(0,e.jsx)(is,{isHighlighted:n,onSelect:()=>r(t),children:(0,e.jsx)("div",{className:Ho.moreResultsEntry,children:(0,e.jsx)("span",{className:Ho.moreResultsText,children:a("search_with_nominatim")})})})}function ns({item:t,isHighlighted:n,onSelect:r}){return(0,e.jsx)(is,{isHighlighted:n,onSelect:()=>r(t),children:(0,e.jsxs)("div",{className:Ho.currentLocationEntry,children:[(0,e.jsx)("div",{className:Ho.currentLocationIcon,children:(0,e.jsx)(Ko,{})}),(0,e.jsx)("span",{className:Ho.mainText,children:a("current_location")})]})})}function rs({item:t,isHighlighted:n,onSelect:r}){return(0,e.jsx)(is,{isHighlighted:n,onSelect:()=>r(t),children:(0,e.jsxs)("div",{className:Ho.geocodingEntry,title:t.toText(),children:[(0,e.jsx)("span",{className:Ho.mainText,children:t.mainText}),(0,e.jsx)("span",{className:Ho.secondaryText,children:t.secondText})]})})}function is({isHighlighted:t,children:n,onSelect:r}){const[i,o]=(0,l.useState)(!1),s=t?Ho.selectableItem+" "+Ho.highlightedItem:Ho.selectableItem;return(0,e.jsx)("button",{className:s,onClick:()=>r(),onTouchEnd:e=>{e.preventDefault(),i||r()},onPointerCancel:()=>o(!0),onPointerDown:e=>{o(!1),e.preventDefault()},children:n})}var os=n(557),ss={};ss.styleTagTransform=b(),ss.setAttributes=m(),ss.insert=f().bind(null,"head"),ss.domAPI=d(),ss.insertStyleElement=v(),c()(os.Z,ss);const as=os.Z&&os.Z.locals?os.Z.locals:void 0;var ls=n(1852),us=n(3961),cs=n(9292),hs={};hs.styleTagTransform=b(),hs.setAttributes=m(),hs.insert=f().bind(null,"head"),hs.domAPI=d(),hs.insertStyleElement=v(),c()(cs.Z,hs);const ds=cs.Z&&cs.Z.locals?cs.Z.locals:void 0;function ps({children:e,inputElement:t,keepClearAtBottom:n}){const r=(0,l.useRef)(document.createElement("div")),i=(0,l.useRef)(document.getElementById(Wk)),o=function(e,t){const[n,r]=(0,l.useState)(DOMRect.fromRect());return(0,l.useEffect)((()=>{t&&r(t.getBoundingClientRect())}),[t]),(0,l.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}(Hk,t);return(0,l.useEffect)((()=>(r.current.className=ds.popup,i.current.appendChild(r.current),()=>{i.current.removeChild(r.current)})),[r]),(0,l.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,us.createPortal)(e,r.current)}function fs(t){const[n,r]=(0,l.useState)(t.point.queryText);(0,l.useEffect)((()=>r(t.point.queryText)),[t.point.queryText]);const[i,o]=(0,l.useState)(!1),[s,u]=(0,l.useState)([]),[c]=(0,l.useState)(new ys(Si(),((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.indexOf(n)>=0?"":n.length>0?n+", ":"")+(r.indexOf(e.postcode)>=0?"":e.postcode?e.postcode+" ":"")+(r.indexOf(e.city)>=0?"":e.city?e.city+", ":"")+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:_i(e,t)}}(e);return new Yo(n.mainText,n.secondText,e.point)}));"nominatim"!==t?(r.push(new Jo(e)),u(r)):u(r)})));(0,l.useEffect)((()=>u([])),[t.point]),(0,l.useEffect)((()=>{i&&0==n.length&&0===s.length&&u([new Qo])}),[s,i]);const[h,d]=(0,l.useState)(-1);(0,l.useEffect)((()=>d(-1)),[s]);const p=(0,l.useRef)(null),f=(0,l.useCallback)((e=>{if("Escape"!==e.key)switch(e.key){case"ArrowUp":d((e=>ms(s.length,e,-1)));break;case"ArrowDown":d((e=>ms(s.length,e,1)));break;case"Enter":case"Tab":const e=xi(n);if(e)t.onAddressSelected(n,e);else if(s.length>0){const e=s[h>=0?h:0];e instanceof Yo&&t.onAddressSelected(e.toText(),e.point)}p.current.blur()}else p.current.blur()}),[s,h]),g=i?as.container+" "+as.fullscreen:as.container,m=t.point.type;return(0,e.jsxs)("div",{className:g,children:[(0,e.jsxs)("div",{className:[as.inputContainer,t.dropPreviewIndex==t.index?t.dropPreviewIndex<t.moveStartIndex?as.topBorder:as.bottomBorder:{}].join(" "),children:[(0,e.jsx)("input",{style:t.moveStartIndex==t.index?{borderWidth:"2px",margin:"-1px"}:{},className:as.input,type:"text",ref:p,onChange:e=>{r(e.target.value),xi(e.target.value)||c.request(e.target.value,"default"),t.onChange(e.target.value)},onKeyDown:f,onFocus:e=>{t.clearSelectedInput(),o(!0),e.target.select()},onBlur:()=>{c.cancel(),o(!1),u([])},value:n,placeholder:a(m==Pi.From?"from_hint":m==Pi.To?"to_hint":"via_hint")}),(0,e.jsx)(wo,{className:as.btnClose,onClick:()=>o(!1),children:a("back_to_map")})]}),s.length>0&&(0,e.jsx)(gs,{inputRef:p.current,children:(0,e.jsx)($o,{items:s,highlightedItem:s[h],onSelect:e=>{var n;e instanceof Yo?(p.current.blur(),t.onAddressSelected(e.toText(),e.point)):e instanceof Qo?(p.current.blur(),n=t.onAddressSelected,navigator.geolocation?(n(a("searching_location")+" ...",void 0),navigator.geolocation.getCurrentPosition((e=>{n(a("current_location"),{lat:e.coords.latitude,lng:e.coords.longitude})}),(e=>{Gr.dispatch(new ei(a("searching_location_failed")+": "+e.message)),n("",void 0)}),{timeout:3e5,enableHighAccuracy:!0})):Gr.dispatch(new ei("Geolocation is not supported in this browser"))):e instanceof Jo&&(xi(e.search)||c.request(e.search,"nominatim"))}})})]})}function gs({inputRef:t,children:n}){const r=(0,ls.useMediaQuery)({query:"(max-width: 44rem)"});return(0,e.jsx)(e.Fragment,{children:r?n:(0,e.jsx)(ps,{inputElement:t,keepClearAtBottom:270,children:n})})}function ms(e,t,n){const r=t+n;return r>=e?0:r<0?e-1:r}class ys{constructor(e,t){this.requestId=0,this.timeout=new vs(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=ys.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 vs{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 _s={cursor:"pointer",stroke:"none"};function bs({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:{..._s,fill:t,cursor:i||_s.cursor},children:[(0,e.jsx)("path",{d:"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"}),void 0===n?(0,e.jsx)("path",{d:"M192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z",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:""})]})}function xs({points:t}){let[n,r]=(0,l.useState)(!0),[i,o]=(0,l.useState)(-1),[s,u]=(0,l.useState)(-1);const c=(0,l.useContext)(zi);return(0,e.jsxs)("div",{className:Lo.searchBoxParent,children:[(0,e.jsx)("div",{className:Lo.searchBox,children:t.map(((a,l)=>(0,e.jsx)(ws,{index:l,points:t,deletable:t.length>2,onChange:()=>{Gr.dispatch(new ni),Gr.dispatch(new Yr(a))},showTargetIcons:n,moveStartIndex:i,onMoveStartSelect:(e,t)=>{o(e),r(t)},dropPreviewIndex:s,onDropPreviewSelect:u},a.id)))}),(0,e.jsxs)("div",{className:Lo.lastSearchLine,children:[(0,e.jsxs)(wo,{style:n&&i>=0&&i+1<t.length?{paddingTop:"2rem"}:{},onClick:()=>Gr.dispatch(new Hr(t.length,{lat:0,lng:0},!1)),className:Lo.addSearchBox,children:[(0,e.jsx)(jo,{}),(0,e.jsx)("div",{children:a("add_to_route")})]}),(0,e.jsx)(wo,{className:Lo.mikm,title:a("distance_unit",[c?"mi":"km"]),onClick:()=>Gr.dispatch(new gi),children:c?"mi":"km"})]})]})}const ws=({index:t,points:n,onChange:r,deletable:i,moveStartIndex:o,showTargetIcons:s,onMoveStartSelect:u,dropPreviewIndex:c,onDropPreviewSelect:h})=>{let d=n[t];const p=(0,l.useRef)(null);function f(){h(-1);let e=o<t?t+1:t;Gr.dispatch(new Kr(n[o],e)),u(t,!1),setTimeout((()=>{u(-1,!0)}),1e3)}return(0,l.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:a("drag_to_reorder"),className:Lo.markerContainer,draggable:!0,onDragStart:()=>{o!=t&&(u(t,!0),h(-1))},onDragEnd:()=>{u(-1,!0),h(-1)},onClick:()=>{o==t?(u(-1,!0),h(-1)):u(t,!0)},children:(0,e.jsx)(bs,{number:t>0&&t+1<n.length?t:void 0,cursor:"ns-resize",color:o>=0?"gray":d.color})}),o>=0&&o!=t&&(0,e.jsx)(wo,{title:a("click to move selected input here"),className:[s?"":Lo.hide,Lo.markerTarget,c>=0&&c==t?Lo.dropPreview:""].join(" "),style:o>t?{marginTop:"-2.4rem"}:{marginBottom:"-2.4rem"},onDragOver:e=>{e.preventDefault(),h(t)},onDragLeave:()=>h(-1),onDrop:f,onClick:f,children:(0,e.jsx)(Vo,{})}),(0,e.jsx)("div",{className:Lo.searchBoxInput,children:(0,e.jsx)(fs,{moveStartIndex:o,dropPreviewIndex:c,index:t,point:d,onCancel:()=>console.log("cancel"),onAddressSelected:(e,t)=>Gr.dispatch(new qr({...d,isInitialized:!!t,queryText:e,coordinate:t||d.coordinate},!0)),clearSelectedInput:()=>{u(-1,!0),h(-1)},onChange:r})}),i&&(0,e.jsx)(wo,{title:a("delete_from_route"),onClick:()=>{Gr.dispatch(new Zr(d)),u(-1,!0)},className:Lo.removeSearchBox,children:(0,e.jsx)(Oo,{})})]})};var ks=n(7984),Cs={};Cs.styleTagTransform=b(),Cs.setAttributes=m(),Cs.insert=f().bind(null,"head"),Cs.domAPI=d(),Cs.insertStyleElement=v(),c()(ks.Z,Cs);const Ss=ks.Z&&ks.Z.locals?ks.Z.locals:void 0;var As;function Es(){return Es=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},Es.apply(this,arguments)}const Ms=function(e){return l.createElement("svg",Es({"aria-hidden":"true","data-prefix":"fas","data-icon":"times",className:"times-solid_svg__svg-inline--fa times-solid_svg__fa-times times-solid_svg__fa-w-11",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 352 512",role:"img"},e),As||(As=l.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 Ts({error:t}){return(0,e.jsxs)("div",{className:Ss.errorMessageContainer,children:[(0,e.jsx)("span",{className:Ss.errorMessage,children:t.lastError}),(0,e.jsx)(wo,{className:Ss.errorMessageCloseBtn,onClick:()=>Gr.dispatch(new ii),children:(0,e.jsx)(Ms,{})})]})}var Ps=n(9558),Rs={};Rs.styleTagTransform=b(),Rs.setAttributes=m(),Rs.insert=f().bind(null,"head"),Rs.domAPI=d(),Rs.insertStyleElement=v(),c()(Ps.Z,Rs);const Is=Ps.Z&&Ps.Z.locals?Ps.Z.locals:void 0;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 zs=function(e){return l.createElement("svg",Ls({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.30522,stroke:"currentColor",fill:"none"},cx:17.346,cy:1044.106,r:3.092}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.30522,stroke:"currentColor",fill:"none"},cx:6.759,cy:1044.106,r:3.092}),l.createElement("circle",{style:{strokeWidth:.243187,stroke:"none",fillOpacity:1,fill:"currentColor"},cx:12.729,cy:1033.707,r:1.128}),l.createElement("path",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.25956,stroke:"currentColor",fill:"none"},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"}),l.createElement("path",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:2.29606,stroke:"currentColor",fill:"none"},d:"m9.962 1039.68 1.78-3.357v0"}),l.createElement("path",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.20108,stroke:"currentColor",fill:"none"},d:"m12.15 1036.158 2.803 2.52"})))};function Fs(){return Fs=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},Fs.apply(this,arguments)}const Os=function(e){return l.createElement("svg",Fs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:"1.38819px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,fill:"currentColor"},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",transform:"translate(0 -1028.362)"}),l.createElement("path",{style:{fillOpacity:1,strokeWidth:2.08227,strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,fill:"currentColor",stroke:"currentColor"},d:"m6.39 1043.127-.008 2.192",transform:"translate(0 -1028.362)"}),l.createElement("path",{style:{fillOpacity:1,strokeWidth:2.07309,strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,fill:"currentColor",stroke:"currentColor"},d:"m17.587 1043.12-.009 2.199",transform:"translate(0 -1028.362)"}),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:"1.38819px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,fill:"currentColor"},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",transform:"translate(0 -1028.362)"}))};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 Ns=function(e){return l.createElement("svg",Ds({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.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)"}),l.createElement("g",{style:{fill:"currentColor"}},l.createElement("g",{style:{display:"inline",fill:"currentColor"}},l.createElement("path",{style:{color:"currentColor",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"},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",transform:"matrix(.9775 0 0 .9775 -3.025 -982.366)"}))),l.createElement("path",{style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.5,fill:"none",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"},d:"M0 1028.362h24v24H0z",transform:"translate(0 -1028.362)"}),l.createElement("path",{style:{enableBackground:"accumulate",marker:"none",strokeWidth:1.95499,stroke:"none",fillRule:"nonzero",fillOpacity:1,fill:"currentColor",visibility:"visible",overflow:"visible",display:"inline",color:"currentColor"},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",transform:"translate(0 -1028.362)"}),l.createElement("path",{style:{enableBackground:"accumulate",marker:"none",strokeWidth:1.95499,stroke:"none",fillRule:"nonzero",fillOpacity:1,fill:"currentColor",visibility:"visible",overflow:"visible",display:"inline",color:"currentColor"},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",transform:"translate(0 -1028.362)"}))};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 Bs=function(e){return l.createElement("svg",js({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.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"}}),l.createElement("g",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.00006006,stroke:"none",fillOpacity:1,fill:"currentColor"}},l.createElement("g",{style:{display:"inline",stroke:"none",strokeOpacity:1,fill:"currentColor",fillOpacity:1,strokeWidth:1.00006006,strokeMiterlimit:4,strokeDasharray:"none"}},l.createElement("path",{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"},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",transform:"translate(-2.753 51.71) scale(.97194)"}))),l.createElement("path",{style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.5,fill:"none",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"},d:"M0 1028.362h24v24H0z"}),l.createElement("path",{style:{color:"currentColor",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:1.94389,marker:"none",enableBackground:"accumulate"},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"}),l.createElement("path",{style:{color:"currentColor",display:"inline",overflow:"visible",visibility:"visible",fill:"currentColor",fillOpacity:1,fillRule:"nonzero",stroke:"none",strokeWidth:1.94389,marker:"none",enableBackground:"accumulate"},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"}),l.createElement("rect",{style:{fill:"currentColor",fillOpacity:1,stroke:"none",strokeWidth:.971942},width:2.7,height:2.395,x:274.144,y:1069.759,transform:"skewX(-14.409) scale(1 .96854)",ry:.293}),l.createElement("rect",{style:{fill:"currentColor",fillOpacity:1,stroke:"none",strokeWidth:.971942},width:2.467,height:4.322,x:110.265,y:1041.998,transform:"skewX(-5.616) scale(1 .9952)",ry:.529}),l.createElement("path",{style:{fill:"none",stroke:"currentColor",strokeWidth:.777553,strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1},d:"m16.008 1040.567.332 7.844"})))};function Gs(){return Gs=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},Gs.apply(this,arguments)}const Vs=function(e){return l.createElement("svg",Gs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("path",{style:{strokeWidth:.960606,stroke:"none",fillOpacity:1,fill:"currentColor"},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"}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.4,stroke:"currentColor",fill:"none"},r:3.002,cy:1042.641,cx:18.2}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:1.4,stroke:"currentColor",fill:"none"},r:3.002,cy:1042.592,cx:5.732}),l.createElement("path",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.52584,stroke:"currentColor",fill:"none"},d:"m16.147 1039.015 1.99 3.568"}),l.createElement("rect",{style:{strokeWidth:.960606,stroke:"none",fillOpacity:1,fill:"currentColor",opacity:.99},width:6.45,height:1.035,x:235.031,y:1002.115,transform:"matrix(.96339 .26812 -.22085 .9753 0 0)",ry:0}),l.createElement("path",{style:{strokeWidth:.960606,stroke:"none",fillOpacity:1,fill:"currentColor"},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"})))};function qs(){return qs=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},qs.apply(this,arguments)}const Ws=function(e){return l.createElement("svg",qs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("circle",{style:{fill:"none",strokeWidth:1.20111,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},cx:17.398,cy:1042.2,r:2.846}),l.createElement("circle",{style:{fill:"none",strokeWidth:1.20119,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},cx:6.753,cy:1044.276,r:2.846}),l.createElement("circle",{style:{strokeWidth:.252678,fillOpacity:1,fill:"currentColor",stroke:"currentColor"},cx:14.234,cy:1033.513,r:1.173}),l.createElement("path",{style:{fill:"none",strokeWidth:1.30871,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},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"}),l.createElement("path",{style:{fill:"none",strokeWidth:2.38567,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},d:"m9.992 1039.283 2.824-3.072"}),l.createElement("path",{style:{fill:"none",strokeWidth:1.24796,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},d:"m13.47 1036.203 2.89 1.47"}),l.createElement("path",{style:{fill:"none",strokeWidth:".949028px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,stroke:"currentColor"},d:"m2.787 1050.013 2.373-1.78 5.22-.296 6.227-1.78 3.915.534 2.017-2.432"})))};function Hs(){return Hs=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},Hs.apply(this,arguments)}const Us=function(e){return l.createElement("svg",Hs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("circle",{style:{fill:"none",strokeWidth:1.3502,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},cx:17.366,cy:1043.13,r:3.199}),l.createElement("circle",{style:{fill:"none",strokeWidth:1.3502,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},cx:6.414,cy:1043.13,r:3.199}),l.createElement("circle",{style:{strokeWidth:.251568,stroke:"none",fillOpacity:1,fill:"currentColor"},cx:16.52,cy:1035.737,r:1.167}),l.createElement("path",{style:{fill:"none",strokeWidth:1.30296,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},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"}),l.createElement("path",{style:{fill:"none",strokeWidth:2.37518,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},d:"m10.693 1038.554 3.734-1.229v0"}),l.createElement("path",{style:{fill:"none",strokeWidth:1.24247,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},d:"m15.263 1037.495 1.103 3.74"}),l.createElement("path",{style:{fill:"#4d4d4d",strokeWidth:.755886,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},d:"m11.245 1034.652-6.437-.354"}),l.createElement("path",{style:{fill:"#474747",fillOpacity:1,strokeWidth:.755886,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},d:"m6.604 1037.74-3.42-.201"}),l.createElement("path",{style:{fill:"none",strokeWidth:.755886,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},d:"m8.474 1036.063-5.295-.32"})))};function Xs(){return Xs=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},Xs.apply(this,arguments)}const Zs=function(e){return l.createElement("svg",Xs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("path",{style:{stroke:"none",fillOpacity:1,fill:"currentColor"},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"}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.957069,stroke:"currentColor",fill:"none"},cx:19.143,cy:1043.334,r:2.267}),l.createElement("path",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.16776,stroke:"currentColor",fill:"none"},d:"m17.614 1040.655 1.523 2.73"}),l.createElement("path",{style:{stroke:"none",fillOpacity:1,fill:"currentColor"},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"}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.957069,stroke:"currentColor",fill:"none"},cx:5.436,cy:1043.355,r:2.267}),l.createElement("path",{style:{stroke:"none",fillOpacity:1,fill:"currentColor"},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"}),l.createElement("path",{style:{strokeOpacity:1,strokeLinejoin:"miter",strokeLinecap:"butt",strokeWidth:1,stroke:"none",fillRule:"evenodd",fillOpacity:1,fill:"currentColor"},d:"M16.68 1035.348s-1.95.398-1.72.89c.197.416.944-.126 1.72-.89z"}),l.createElement("path",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:1.7,stroke:"none",fillOpacity:1,fill:"currentColor"},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"})))};function Ks(){return Ks=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},Ks.apply(this,arguments)}const Ys=function(e){return l.createElement("svg",Ks({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("path",{style:{fillOpacity:1,strokeWidth:1.15286,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor",fill:"currentColor"},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"}),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:1.04201,fill:"currentColor"},d:"M3.697 1039.694h6.218v3.192H3.697z"}),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:1.0461,fill:"currentColor"},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"}),l.createElement("path",{style:{fill:"none",strokeWidth:"1.04276px",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:1,stroke:"currentColor"},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"}),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:1.04201,fill:"currentColor"},d:"m5.402 1035.907 4.112-1.26.09 1.555z"}),l.createElement("circle",{style:{fill:"#fff",fillOpacity:.0820312,strokeWidth:.864469,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},cx:18.949,cy:1044.363,r:1.441}),l.createElement("circle",{style:{fill:"#fff",fillOpacity:.0820312,strokeWidth:.864469,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1,stroke:"currentColor"},cx:6.078,cy:1044.363,r:1.441}),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:1.04201,fill:"currentColor"},d:"M7.999 1036.68h6.218v3.192H7.999z"})))};function Qs(){return Qs=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},Qs.apply(this,arguments)}const Js=function(e){return l.createElement("svg",Qs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("rect",{style:{strokeWidth:.99494,stroke:"none",fillOpacity:1,fill:"currentColor"},width:7.3,height:2.796,x:6.392,y:1041.53,ry:.684}),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:.99494,fill:"currentColor"},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"}),l.createElement("path",{style:{strokeOpacity:1,strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"1.19518px",stroke:"currentColor",fill:"none"},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"}),l.createElement("rect",{style:{fillOpacity:1,stroke:"none",strokeWidth:.99494,fill:"currentColor"},width:2.329,height:4.491,x:5.468,y:1036.143,ry:.022}),l.createElement("path",{style:{fillOpacity:1,stroke:"none",strokeWidth:2.00558,strokeOpacity:1,fill:"currentColor"},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"}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.919458,stroke:"currentColor",fillOpacity:0,fill:"#fff"},cx:16.288,cy:1044.289,r:1.533,fill:"none"}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.919458,stroke:"currentColor",fillOpacity:0,fill:"#fff"},cx:4.887,cy:1044.289,r:1.533,fill:"none"}),l.createElement("circle",{style:{strokeOpacity:1,strokeDasharray:"none",strokeMiterlimit:4,strokeWidth:.919458,stroke:"currentColor",fillOpacity:0,fill:"#fff"},cx:20.733,cy:1044.289,r:1.533,fill:"none"})))};var $s;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 ta=function(e){return l.createElement("svg",ea({height:24,width:24,xmlnsXlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("defs",null,$s||($s=l.createElement("pattern",{patternTransform:"matrix(10 0 0 10 -20.86 7.16)",id:"wheelchair_svg__b",xlinkHref:"#wheelchair_svg__a"})),l.createElement("pattern",{patternUnits:"userSpaceOnUse",width:2,height:1,patternTransform:"scale(10)",id:"wheelchair_svg__a"},l.createElement("path",{style:{fill:"#000",stroke:"none"},d:"M0-.5h1v2H0z"}))),l.createElement("g",{transform:"translate(0 -1028.362)"},l.createElement("path",{style:{color:"#000",display:"inline",overflow:"visible",visibility:"visible",opacity:.5,fill:"none",stroke:"none",strokeWidth:2,marker:"none",enableBackground:"accumulate"},d:"M0 1028.362h24v24H0z"}),l.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"}}),l.createElement("path",{style:{fill:"none",fillOpacity:1,stroke:"currentColor",strokeWidth:1.037,strokeMiterlimit:10,strokeDasharray:"none",strokeOpacity:1},d:"M11 1041.362a3.281 3.281 0 1 0 0 6.563 3.281 3.281 0 0 0 0-6.563z"}),l.createElement("circle",{style:{strokeWidth:1.33307,fill:"currentColor"},cx:11.402,cy:1034.037,r:1.75})))};function na(){return na=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},na.apply(this,arguments)}const ra=function(e){return l.createElement("svg",na({width:96,height:96,viewBox:"0 0 11 11",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l.createElement("path",{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}}),l.createElement("rect",{style:{fill:"#fff",strokeWidth:.209373},width:1.208,height:1.633,x:4.803,y:3.421,ry:.049}))};function ia({routingProfiles:t,selectedProfile:n,customModelAllowed:r,customModelEnabled:i}){const o=wi.extraProfiles?Object.keys(wi.extraProfiles).map((e=>({name:e}))):[],s=t.concat(o);return(0,e.jsxs)("div",{className:Is.profilesParent,children:[r&&(0,e.jsx)(wo,{title:a("open_custom_model_box"),className:i?Is.enabledSettings:Is.settings,onClick:()=>{i&&Gr.dispatch(new ii),Gr.dispatch(new ni),Gr.dispatch(new Qr(!i))},children:(0,e.jsx)(ra,{})}),(0,e.jsx)("ul",{className:Is.profiles,children:s.map((t=>{const r=t.name===n.name?Is.selectedProfile+" "+Is.profileBtn:Is.profileBtn;return(0,e.jsx)("li",{children:(0,e.jsx)(wo,{title:a(t.name),onClick:()=>Gr.dispatch(new Wr(t)),className:r,children:oa(t)})},t.name)}))})]})}function oa(t){switch(t.name){case"car":return(0,e.jsx)(Os,{});case"small_truck":return(0,e.jsx)(Ys,{});case"truck":return(0,e.jsx)(Js,{});case"scooter":return(0,e.jsx)(Zs,{});case"foot":return(0,e.jsx)(Ns,{});case"hike":return(0,e.jsx)(Bs,{});case"bike":return(0,e.jsx)(zs,{});case"mtb":return(0,e.jsx)(Ws,{});case"racingbike":return(0,e.jsx)(Us,{});case"motorcycle":return(0,e.jsx)(Vs,{});case"wheelchair":return(0,e.jsx)(ta,{});default:return t.name}}function sa({query:t,route:n,info:r,error:i}){const o=(0,ls.useMediaQuery)({query:"(max-height: 55rem)"}),[s,a]=(0,l.useState)(o&&aa(n)),u=(0,l.useRef)(null),c=(0,l.useCallback)((e=>{var t;!(e.target instanceof Node&&(null===(t=u.current)||void 0===t?void 0:t.contains(e.target)))&&o&&aa(n)&&a(!0)}),[o,n]);return(0,l.useEffect)((()=>(window.addEventListener("mousedown",c),window.addEventListener("touchstart",c),()=>{window.removeEventListener("mousedown",c),window.removeEventListener("touchstart",c)}))),(0,e.jsx)("div",{className:Po.sidebar,children:(0,e.jsxs)("div",{className:Po.background,ref:u,children:[s?(0,e.jsx)(la,{points:t.queryPoints,onClick:()=>a(!1)}):(0,e.jsxs)("div",{className:Po.btnCloseContainer,children:[(0,e.jsx)(ia,{routingProfiles:r.profiles,selectedProfile:t.routingProfile,customModelAllowed:!1,customModelEnabled:t.customModelEnabled}),(0,e.jsx)(xs,{points:t.queryPoints})]}),!i.isDismissed&&(0,e.jsx)(Ts,{error:i})]})})}function aa(e){return e.routingResult.paths.length>0}function la(t){const n=t.points[0],r=t.points[t.points.length-1];return(0,e.jsxs)("div",{className:Po.mapView,onClick:t.onClick,children:[(0,e.jsx)(ua,{text:n.queryText,color:n.color,position:n.type}),(0,e.jsx)(ha,{points:t.points}),(0,e.jsx)(ua,{text:r.queryText,color:r.color,position:r.type})]})}function ua({text:t,color:n,position:r}){return(0,e.jsxs)("div",{className:Po.mapViewPoint,children:[(0,e.jsx)("div",{className:Po.markerContainer,children:(0,e.jsx)(bs,{color:n})}),(0,e.jsx)("span",{className:ca(r),children:t})]})}function ca(e){switch(e){case Pi.To:return Po.queryPointText+" "+Po.queryPointTextTo;case Pi.Via:return Po.queryPointText+" "+Po.queryPointTextVia;default:return Po.queryPointText}}function ha({points:t}){return 3===t.length?(0,e.jsx)(ua,{text:t[1].queryText,color:t[1].color,position:Pi.Via}):t.length>3?(0,e.jsx)(ua,{text:t.length-2+" via points",color:"#76D0F7",position:Pi.Via}):(0,e.jsx)("div",{})}var da=n(7049),pa={};pa.styleTagTransform=b(),pa.setAttributes=m(),pa.insert=f().bind(null,"head"),pa.domAPI=d(),pa.insertStyleElement=v(),c()(da.Z,pa);const fa=da.Z&&da.Z.locals?da.Z.locals:void 0;var ga;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 ya=function(e){return l.createElement("svg",ma({xmlns:"http://www.w3.org/2000/svg",height:48,width:48,viewBox:"0 0 50 50",role:"img"},e),ga||(ga=l.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 va;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 ba=function(e){return l.createElement("svg",_a({xmlns:"http://www.w3.org/2000/svg",height:48,width:48,viewBox:"0 0 50 50",role:"img"},e),va||(va=l.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 xa=n(3266),wa={};wa.styleTagTransform=b(),wa.setAttributes=m(),wa.insert=f().bind(null,"head"),wa.domAPI=d(),wa.insertStyleElement=v(),c()(xa.Z,wa);const ka=xa.Z&&xa.Z.locals?xa.Z.locals:void 0;function Ca(t){return(0,e.jsx)("ul",{className:ka.instructionsList,children:t.instructions.map(((t,n)=>(0,e.jsx)(Sa,{instruction:t,index:n},n)))})}const Sa=function({instruction:t,index:n}){const r=(0,l.useContext)(zi);return(0,e.jsxs)("li",{className:ka.instruction,children:[Aa(t.sign,n),(0,e.jsx)("span",{className:ka.mainText,children:t.text}),(0,e.jsx)("span",{className:ka.distance,children:vi(t.distance,r)})]})};function Aa(t,n){if(0===n||4===t||5===t){let r;return r=0===n?Ii.getMarkerColor(Pi.From):4===t?Ii.getMarkerColor(Pi.To):Ii.getMarkerColor(Pi.Via),(0,e.jsx)("div",{className:ka.sign,children:(0,e.jsx)(bs,{color:r})})}return(0,e.jsx)("img",{className:ka.sign,src:Ea(t),alt:"turn instruction"})}function Ea(e){switch(e){case-98:case-8:return"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";case-7:return"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==";case-3:return"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=";case-2:return"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";case-1:return"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==";case 0:return"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";case 1:return"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";case 2:return"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==";case 3:return"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=";case 6:return"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";case 7:return"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=";case 8:return"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==";case 101:return"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=";case 102:return"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=";case 103:return"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=";default:return"unknown"}}function Ma(t){const n=(0,ls.useMediaQuery)({query:"(max-height: 45rem) and (orientation: landscape), (max-height: 70rem) and (orientation: portrait)"});return(0,e.jsx)("ul",{children:n?za(t):Fa(t)})}function Ta({path:t,isSelected:n,profile:r}){const[i,o]=(0,l.useState)(!1),s=n?fa.resultSummary+" "+fa.selectedResultSummary:fa.resultSummary;(0,l.useEffect)((()=>o(n&&i)),[n]);const u=Pa(t.details.road_environment,"ford"),c=Pa(t.details.toll,"all"),h=Pa(t.details.road_environment,"ferry"),d=Ai.isMotorVehicle(r)&&function(e){if(!e)return!1;for(let t in e){if("grade2"==e[t][2])return!0;if("grade3"==e[t][2])return!0;if("grade4"==e[t][2])return!0;if("grade5"==e[t][2])return!0}return!1}(t.details.track_type),p=Ai.isBikeLike(r)&&Pa(t.details.road_class,"steps"),f=function(e){if(!e||0==e.length)return!1;const t=e[0][2];for(let n in e)if(e[n][2]!=t)return!0;return!1}(t.details.country),g=u||c||h||d||p||f,m=(0,l.useContext)(zi);return(0,e.jsxs)("div",{className:fa.resultRow,children:[(0,e.jsx)("div",{className:fa.resultSelectableArea,onClick:()=>Gr.dispatch(new ri(t)),children:(0,e.jsxs)("div",{className:s,children:[(0,e.jsxs)("div",{className:fa.resultValues,children:[(0,e.jsx)("span",{className:fa.resultMainText,children:mi(t.time)}),(0,e.jsx)("span",{className:fa.resultSecondaryText,children:vi(t.distance,m)}),n&&!Ai.isMotorVehicle(r)&&(0,e.jsxs)("div",{className:fa.elevationHint,children:[(0,e.jsxs)("span",{title:a("total_ascend",[Math.round(t.ascend)+"m"]),children:["↗",vi(t.ascend,m)," "]}),(0,e.jsxs)("span",{title:a("total_descend",[Math.round(t.descend)+"m"]),children:["↘",vi(t.descend,m)]})]}),t.description&&(0,e.jsxs)("span",{className:fa.resultTertiaryText,children:[a("Via")," ",t.description]})]}),n&&(0,e.jsxs)(wo,{className:fa.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-Route-${vi(e.distance,t)}-${o.getUTCFullYear()}-${Ra(o.getUTCMonth()+1)}-${Ra(o.getUTCDate())}.gpx`,r.click()}(t,m),children:[(0,e.jsx)(ba,{}),(0,e.jsx)("div",{children:a("gpx_button")})]}),n&&(0,e.jsxs)(wo,{className:i?fa.detailsButtonExpanded:fa.detailsButton,onClick:()=>o(!i),children:[(0,e.jsx)(ya,{}),(0,e.jsx)("div",{children:a(i?"hide_button":"details_button")})]})]})}),n&&!i&&g&&(0,e.jsxs)("div",{className:fa.routeHints,children:[u&&(0,e.jsx)("div",{children:a("way_contains_ford")}),h&&(0,e.jsx)("div",{children:a("way_contains_ferry")}),f&&(0,e.jsx)("div",{children:a("way_crosses_border")}),c&&(0,e.jsx)("div",{children:a("way_contains_toll")}),p&&(0,e.jsx)("div",{children:a("way_contains",[a("steps")])}),d&&(0,e.jsx)("div",{children:a("way_contains",[a("tracks")])})]}),i&&(0,e.jsx)(Ca,{instructions:t.instructions})]})}function Pa(e,t){if(!e)return!1;for(let n in e)if(e[n][2]==t)return!0;return!1}function Ra(e){return e<10?"0"+e:""+e}function Ia(){return(0,e.jsx)("div",{className:fa.resultRow,children:(0,e.jsxs)("div",{className:fa.placeholderContainer,children:[(0,e.jsx)("div",{className:fa.placeholderMain}),(0,e.jsx)("div",{className:fa.placeholderMain+" "+fa.placeholderSecondary})]})})}function La(e){return e.some((e=>e.state===Ri.SENT))}function za(t){return t.paths.length>0?(0,e.jsx)(Ta,{path:t.selectedPath,isSelected:!0,profile:t.profile}):La(t.currentRequest.subRequests)?(0,e.jsx)(Ia,{},1):""}function Fa({paths:t,currentRequest:n,selectedPath:r,profile:i}){const o=function(e,t){return t.length>0&&La(t)?Math.max(t[t.length-1].args.maxAlternativeRoutes,e.length):e.length}(t,n.subRequests),s=[];for(let n=0;n<o;n++)n<t.length?s.push((0,e.jsx)(Ta,{path:t[n],isSelected:t[n]===r,profile:i},n)):s.push((0,e.jsx)(Ia,{},n));return s}var Oa=n(3861),Da={};Da.styleTagTransform=b(),Da.setAttributes=m(),Da.insert=f().bind(null,"head"),Da.domAPI=d(),Da.insertStyleElement=v(),c()(Oa.Z,Da);const Na=Oa.Z&&Oa.Z.locals?Oa.Z.locals:void 0;var ja,Ba,Ga,Va,qa,Wa,Ha,Ua;function Xa(){return Xa=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},Xa.apply(this,arguments)}const Za=function(e){return l.createElement("svg",Xa({viewBox:"0 0 260 50",width:260,height:30,xmlns:"http://www.w3.org/2000/svg",role:"img"},e),ja||(ja=l.createElement("g",{fill:"#ccc"},l.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"}),l.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"}),l.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"}),l.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"}))),Ba||(Ba=l.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"})),Ga||(Ga=l.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"})),Va||(Va=l.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"})),qa||(qa=l.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"})),Wa||(Wa=l.createElement("g",{fill:"#ccc"},l.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"}),l.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"}))),Ha||(Ha=l.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"})),Ua||(Ua=l.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 Ka(){return(0,e.jsxs)("div",{className:Na.poweredByContainer,children:[(0,e.jsx)("span",{children:a("powered_by")}),(0,e.jsx)("a",{className:Na.logoContainer,href:"https://www.graphhopper.com",target:"_blank",children:(0,e.jsx)(Za,{})})]})}const Ya=class{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},Qa="propertychange",Ja=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function $a(e,t){return e>t?1:e<t?-1:0}function el(e,t,n){const r=e.length;if(e[0]<=t)return 0;if(t<=e[r-1])return r-1;{let i;if(n>0){for(i=1;i<r;++i)if(e[i]<t)return i-1}else if(n<0){for(i=1;i<r;++i)if(e[i]<=t)return i}else for(i=1;i<r;++i){if(e[i]==t)return i;if(e[i]<t)return"function"==typeof n?n(t,e[i-1],e[i])>0?i-1:i:e[i-1]-t<t-e[i]?i-1:i}return r-1}}function tl(e,t,n){for(;t<n;){const r=e[t];e[t]=e[n],e[n]=r,++t,--n}}function nl(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 rl(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 il(){return!0}function ol(){return!1}function sl(){}function al(e){for(const t in e)delete e[t]}function ll(e){let t;for(t in e)return!1;return!t}const ul=class extends Ja{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 Ya(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,sl);delete o[n]}return a}disposeInternal(){this.listeners_&&al(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]=sl,++this.pendingRemovals_[e]):(n.splice(r,1),0===n.length&&delete this.listeners_[e]))}}},cl="change",hl="contextmenu",dl="click",pl="keydown",fl="keypress",gl="touchmove",ml="wheel";function yl(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 vl(e,t,n,r){return yl(e,t,n,r,!0)}function _l(e){e&&e.target&&(e.target.removeEventListener(e.type,e.listener),al(e))}class bl extends ul{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(cl)}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]=yl(this,e[i],t);return r}return yl(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]=vl(this,e[i],t)}else n=vl(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)_l(e[t]);else _l(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)}}bl.prototype.on,bl.prototype.once,bl.prototype.un;const xl=bl;function wl(){throw new Error("Unimplemented abstract method.")}let kl=0;function Cl(e){return e.ol_uid||(e.ol_uid=String(++kl))}class Sl extends Ya{constructor(e,t,n){super(e),this.key=t,this.oldValue=n}}const Al=class extends xl{constructor(e){super(),this.on,this.once,this.un,Cl(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 Sl(n,e,t)),n=Qa,this.hasListener(n)&&this.dispatchEvent(new Sl(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],ll(this.values_)&&(this.values_=null),t||this.notify(e,n)}}},El={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"};class Ml extends Error{constructor(e){const t=El[e];super(t),this.code=e,this.name="AssertionError",this.message=t}}const Tl=Ml;function Pl(e,t){if(!e)throw new Tl(t)}class Rl extends Al{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 Rl(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_&&(_l(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=yl(e,cl,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:(Pl("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 Il=Rl,Ll="opacity",zl="visible",Fl="extent",Ol="zIndex",Dl="maxResolution",Nl="minResolution",jl="maxZoom",Bl="minZoom",Gl="source";function Vl(e,t,n){return Math.min(Math.max(e,t),n)}function ql(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 Wl(e,t,n,r)}function Wl(e,t,n,r){const i=n-e,o=r-t;return i*i+o*o}function Hl(e){return e*Math.PI/180}function Ul(e,t){const n=e%t;return n*t<0?n+t:n}function Xl(e,t,n){return e+n*(t-e)}function Zl(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}function Kl(e,t){return Math.floor(Zl(e,t))}function Yl(e,t){return Math.ceil(Zl(e,t))}const Ql=class extends Al{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.opacity=void 0!==e.opacity?e.opacity:1,Pl("number"==typeof t.opacity,64),t.visible=void 0===e.visible||e.visible,t.zIndex=e.zIndex,t.maxResolution=void 0!==e.maxResolution?e.maxResolution:1/0,t.minResolution=void 0!==e.minResolution?e.minResolution:0,t.minZoom=void 0!==e.minZoom?e.minZoom:-1/0,t.maxZoom=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=Vl(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 wl()}getLayerStatesArray(e){return wl()}getExtent(){return this.get(Fl)}getMaxResolution(){return this.get(Dl)}getMinResolution(){return this.get(Nl)}getMinZoom(){return this.get(Bl)}getMaxZoom(){return this.get(jl)}getOpacity(){return this.get(Ll)}getSourceState(){return wl()}getVisible(){return this.get(zl)}getZIndex(){return this.get(Ol)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Fl,e)}setMaxResolution(e){this.set(Dl,e)}setMinResolution(e){this.set(Nl,e)}setMaxZoom(e){this.set(jl,e)}setMinZoom(e){this.set(Bl,e)}setOpacity(e){Pl("number"==typeof e,64),this.set(Ll,e)}setVisible(e){this.set(zl,e)}setZIndex(e){this.set(Ol,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},Jl="precompose",$l="rendercomplete";function eu(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 tu=class extends Ql{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.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(Gl,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(Gl)||null}getRenderSource(){return this.getSource()}getSourceState(){const e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(_l(this.sourceChangeKey_),this.sourceChangeKey_=null);const e=this.getSource();e&&(this.sourceChangeKey_=yl(e,cl,this.handleSourceChange_,this)),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):new Promise((e=>e([])))}getData(e){return this.renderer_&&this.rendered?this.renderer_.getData(e):null}render(e,t){const n=this.getRenderer();if(n.prepareFrame(e))return this.rendered=!0,n.renderFrame(e,t)}unrender(){this.rendered=!1}setMapInternal(e){e||this.unrender(),this.set("map",e)}getMapInternal(){return this.get("map")}setMap(e){this.mapPrecomposeKey_&&(_l(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(_l(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=yl(e,Jl,(function(e){const t=e.frameState.layerStatesArray,n=this.getLayerState(!1);Pl(!t.some((function(e){return e.layer===n.layer})),67),t.push(n)}),this),this.mapRenderKey_=yl(this,cl,e.render,e),this.changed())}setSource(e){this.set(Gl,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()}},nu="preload",ru="useInterimTilesOnError",iu=class extends tu{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(nu)}setPreload(e){this.set(nu,e)}getUseInterimTilesOnError(){return this.get(ru)}setUseInterimTilesOnError(e){this.set(ru,e)}getData(e){return super.getData(e)}},ou=class extends xl{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.declutterExecutorGroup=null}getFeatures(e){return wl()}getData(e){return null}prepareFrame(e){return wl()}renderFrame(e,t){return wl()}loadedTileCallback(e,t,n){e[t]||(e[t]={}),e[t][n.tileCoord.toString()]=n}createLoadedTileFinder(e,t,n){return function(r,i){const o=this.loadedTileCallback.bind(this,n,r);return e.forEachLoadedTile(t,r,i,o)}.bind(this)}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(cl,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()}},su=class extends Ya{constructor(e,t,n,r){super(e),this.inversePixelTransform=t,this.frameState=n,this.context=r}},au="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",lu=au.includes("firefox"),uu=(au.includes("safari")&&!au.includes("chrom")&&(au.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(au)),au.includes("webkit")&&!au.includes("edge")),cu=au.includes("macintosh"),hu="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,du="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,pu="undefined"!=typeof Image&&Image.prototype.decode,fu=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}(),gu=new Array(6);function mu(e){return vu(e,1,0,0,1,0,0)}function yu(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],h=t[3],d=t[4],p=t[5];return e[0]=n*l+i*u,e[1]=r*l+o*u,e[2]=n*c+i*h,e[3]=r*c+o*h,e[4]=n*d+i*p+s,e[5]=r*d+o*p+a,e}function vu(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 _u(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 bu(e,t,n){return yu(e,vu(gu,t,0,0,n,0,0))}function xu(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 wu(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;Pl(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 ku;function Cu(e){const t="matrix("+e.join(", ")+")";if(du)return t;const n=ku||(ku=document.createElement("div"));return n.style.transform=t,n.style.transform}const Su=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Au=/^([a-z]*)$|^hsla?\(.*\)$/i;function Eu(e){return"string"==typeof e?e:Ru(e)}const Mu=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(Au.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)),Su.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),Pu(o)):e.startsWith("rgb(")?(o=e.slice(4,-1).split(",").map(Number),o.push(1),Pu(o)):Pl(!1,14);return o}(n),e[n]=r,++t}return r}}();function Tu(e){return Array.isArray(e)?e:Mu(e)}function Pu(e){return e[0]=Vl(e[0]+.5|0,0,255),e[1]=Vl(e[1]+.5|0,0,255),e[2]=Vl(e[2]+.5|0,0,255),e[3]=Vl(e[3],0,1),e}function Ru(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 Iu(e,t,n,r){let i;return i=n&&n.length?n.shift():du?new OffscreenCanvas(e||300,t||300):document.createElement("canvas"),e&&(i.width=e),t&&(i.height=t),i.getContext("2d",r)}function Lu(e){const t=e.canvas;t.width=1,t.height=1,e.clearRect(0,0,1,1)}function zu(e){let t=e.offsetWidth;const n=getComputedStyle(e);return t+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10),t}function Fu(e){let t=e.offsetHeight;const n=getComputedStyle(e);return t+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10),t}function Ou(e,t){const n=t.parentNode;n&&n.replaceChild(e,t)}function Du(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}function Nu(e){for(;e.lastChild;)e.removeChild(e.lastChild)}function ju(e){const t=[1/0,1/0,-1/0,-1/0];for(let n=0,r=e.length;n<r;++n)$u(t,e[n]);return t}function Bu(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 Gu(e,t){return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):e.slice()}function Vu(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 qu(e,t){return Hu(e,t[0],t[1])}function Wu(e,t){return e[0]<=t[0]&&t[2]<=e[2]&&e[1]<=t[1]&&t[3]<=e[3]}function Hu(e,t,n){return e[0]<=t&&t<=e[2]&&e[1]<=n&&n<=e[3]}function Uu(e,t){const n=e[0],r=e[1],i=e[2],o=e[3],s=t[0],a=t[1];let l=0;return s<n?l|=16:s>i&&(l|=4),a<r?l|=8:a>o&&(l|=2),0===l&&(l=1),l}function Xu(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 Zu(e){return Xu(1/0,1/0,-1/0,-1/0,e)}function Ku(e,t){const n=e[0],r=e[1];return Xu(n,r,n,r,t)}function Yu(e,t,n,r,i){return ec(Zu(i),e,t,n,r)}function Qu(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]}function Ju(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 $u(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 ec(e,t,n,r,i){for(;n<r;n+=i)tc(e,t[n],t[n+1]);return e}function tc(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 nc(e,t){let n;return n=t(ic(e)),n||(n=t(oc(e)),n||(n=t(pc(e)),n||(n=t(dc(e)),n||!1)))}function rc(e){let t=0;return mc(e)||(t=fc(e)*cc(e)),t}function ic(e){return[e[0],e[1]]}function oc(e){return[e[2],e[1]]}function sc(e){return[(e[0]+e[2])/2,(e[1]+e[3])/2]}function ac(e,t){let n;return"bottom-left"===t?n=ic(e):"bottom-right"===t?n=oc(e):"top-left"===t?n=dc(e):"top-right"===t?n=pc(e):Pl(!1,13),n}function lc(e,t,n,r,i){const[o,s,a,l,u,c,h,d]=uc(e,t,n,r);return Xu(Math.min(o,a,u,h),Math.min(s,l,c,d),Math.max(o,a,u,h),Math.max(s,l,c,d),i)}function uc(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,h=o*a,d=e[0],p=e[1];return[d-l+h,p-u-c,d-l-h,p-u+c,d+l-h,p+u+c,d+l+h,p+u-c,d-l+h,p-u-c]}function cc(e){return e[3]-e[1]}function hc(e,t,n){const r=n||[1/0,1/0,-1/0,-1/0];return gc(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]):Zu(r),r}function dc(e){return[e[0],e[3]]}function pc(e){return[e[2],e[3]]}function fc(e){return e[2]-e[0]}function gc(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}function mc(e){return e[2]<e[0]||e[3]<e[1]}function yc(e,t,n,r){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 Xu(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 vc(e,t){const n=t.getExtent(),r=sc(e);if(t.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){const t=fc(n),i=Math.floor((r[0]-n[0])/t)*t;e[0]-=i,e[2]-=i}return e}const _c=[];let bc=null;const xc=class extends ou{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;bc||function(){const e=document.createElement("canvas");e.width=1,e.height=1,bc=e.getContext("2d")}(),bc.clearRect(0,0,1,1);try{bc.drawImage(e,t,n,1,1,0,0,1,1),r=bc.getImageData(0,0,1,1).data}catch(e){return bc=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&&rl(Tu(e.style.backgroundColor),Tu(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=Iu();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=dc(n),i=pc(n),o=oc(n),s=ic(n);_u(t.coordinateToPixelTransform,r),_u(t.coordinateToPixelTransform,i),_u(t.coordinateToPixelTransform,o),_u(t.coordinateToPixelTransform,s);const a=this.inversePixelTransform;_u(a,r),_u(a,i),_u(a,o),_u(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 su(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,h=-e[0]+s,d=-e[1];return xu(this.tempTransform,a,l,u,c,-n,h,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}};function wc(e){return Math.pow(e,3)}function kc(e){return 1-wc(1-e)}function Cc(e){return 3*e*e-2*e*e*e}function Sc(e){return e}const Ac=class extends ul{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(cl)}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(){wl()}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:wc(r/this.transition_)}inTransition(e){return!!this.transition_&&-1!==this.transitionStarts_[e]}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}};function Ec(e,t,n){const r=e;let i=!0,o=!1,s=!1;const a=[vl(r,"load",(function(){s=!0,o||t()}))];return r.src&&pu?(o=!0,r.decode().then((function(){i&&t()})).catch((function(e){i&&(s?t():n())}))):a.push(vl(r,"error",n)),function(){i=!1,a.forEach(_l)}}const Mc=class extends Ac{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=Iu(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_=Ec(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}},Tc={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},Pc=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_||Tc[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_}},Rc=6378137,Ic=Math.PI*Rc,Lc=[-Ic,-Ic,Ic,Ic],zc=[-180,-85,180,85],Fc=Rc*Math.log(Math.tan(Math.PI/2));class Oc extends Pc{constructor(e){super({code:e,units:"m",extent:Lc,global:!0,worldExtent:zc,getPointResolution:function(e,t){return e/Math.cosh(t[1]/Rc)}})}}const Dc=[new Oc("EPSG:3857"),new Oc("EPSG:102100"),new Oc("EPSG:102113"),new Oc("EPSG:900913"),new Oc("http://www.opengis.net/def/crs/EPSG/0/3857"),new Oc("http://www.opengis.net/gml/srs/epsg.xml#3857")];const Nc=[-180,-90,180,90],jc=6378137*Math.PI/180;class Bc extends Pc{constructor(e,t){super({code:e,units:"degrees",extent:Nc,axisOrientation:t,global:!0,metersPerUnit:jc,worldExtent:Nc})}}const Gc=[new Bc("CRS:84"),new Bc("EPSG:4326","neu"),new Bc("urn:ogc:def:crs:OGC:1.3:CRS84"),new Bc("urn:ogc:def:crs:OGC:2:84"),new Bc("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Bc("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Bc("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Vc={},qc={};function Wc(e,t,n){const r=e.getCode(),i=t.getCode();r in qc||(qc[r]={}),qc[r][i]=n}function Hc(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,h=u-a,d=0===c&&0===h?0:(c*(n-s)+h*(r-a))/(c*c+h*h||0);let p,f;return d<=0?(p=s,f=a):d>=1?(p=l,f=u):(p=s+d*c,f=a+d*h),[p,f]}function Uc(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 Xc(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 Zc(e,t){const n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function Kc(e,t){return Math.sqrt(Zc(e,t))}function Yc(e,t){if(t.canWrapX()){const n=fc(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||fc(r),i=Math.floor((e[0]-r[0])/n)),i}(e,t,n);r&&(e[0]-=r*n)}return e}function Qc(e,t,n){n=n||6371008.8;const r=Hl(e[1]),i=Hl(t[1]),o=(i-r)/2,s=Hl(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))}let Jc=!0;function $c(e){Jc=!(void 0===e||e)}function eh(e,t,n){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 th(e,t,n){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 nh(e){!function(e,t){Vc[e]=t}(e.getCode(),e),Wc(e,e,eh)}function rh(e){return"string"==typeof e?Vc[t=e]||Vc[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:e||null;var t}function ih(e,t,n,r){let i;const o=(e=rh(e)).getPointResolutionFunc();if(o){if(i=o(t,n),r&&r!==e.getUnits()){const t=e.getMetersPerUnit();t&&(i=i*t/Tc[r])}}else{const o=e.getUnits();if("degrees"==o&&!r||"degrees"==r)i=t;else{const s=ch(e,rh("EPSG:4326"));if(s===th&&"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=(Qc(e.slice(0,2),e.slice(2,4))+Qc(e.slice(4,6),e.slice(6,8)))/2}const a=r?Tc[r]:e.getMetersPerUnit();void 0!==a&&(i/=a)}}return i}function oh(e){!function(e){e.forEach(nh)}(e),e.forEach((function(t){e.forEach((function(e){t!==e&&Wc(t,e,eh)}))}))}function sh(e,t){return e?"string"==typeof e?rh(e):e:rh(t)}function ah(e,t){return $c(),dh(e,"EPSG:4326",void 0!==t?t:"EPSG:3857")}function lh(e,t){const n=dh(e,void 0!==t?t:"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=Ul(r+180,360)-180),n}function uh(e,t){if(e===t)return!0;const n=e.getUnits()===t.getUnits();return(e.getCode()===t.getCode()||ch(e,t)===eh)&&n}function ch(e,t){let n=function(e,t){let n;return e in qc&&t in qc[e]&&(n=qc[e][t]),n}(e.getCode(),t.getCode());return n||(n=th),n}function hh(e,t){return ch(rh(e),rh(t))}function dh(e,t,n){return hh(t,n)(e,void 0,e.length)}let ph=null;function fh(){return ph}function gh(e,t){return e}function mh(e,t){return Jc&&!Uc(e,[0,0])&&e[0]>=-180&&e[0]<=180&&e[1]>=-90&&e[1]<=90&&(Jc=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),e}function yh(e,t){return e}function vh(e,t){return e}function _h(e,t){return e}var bh,xh,wh;oh(Dc),oh(Gc),bh=Dc,xh=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]=Ic*e[i]/180;let n=Rc*Math.log(Math.tan(Math.PI*(+e[i+1]+90)/360));n>Fc?n=Fc:n<-Fc&&(n=-Fc),t[i+1]=n}return t},wh=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]/Ic,t[i+1]=360*Math.atan(Math.exp(e[i+1]/Rc))/Math.PI-90;return t},Gc.forEach((function(e){bh.forEach((function(t){Wc(e,t,xh),Wc(t,e,wh)}))}));let kh;const Ch=[];function Sh(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 Ah(e,t){return Math.abs(e[4*t]-210)>2||Math.abs(e[4*t+3]-191.25)>2}function Eh(e,t,n,r){const i=dh(n,t,e);let o=ih(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||qu(l,i)){const t=ih(e,o,i)/o;isFinite(t)&&t>0&&(o/=t)}return o}const Mh=class extends Ac{constructor(e,t,n,r,i,o,s,a,l,u,c,h){super(i,0,{interpolate:!!h}),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 d=r.getTileCoordExtent(this.wrappedTileCoord_),p=this.targetTileGrid_.getExtent();let f=this.sourceTileGrid_.getExtent();const g=p?hc(d,p):d;if(0===rc(g))return void(this.state=4);const m=e.getExtent();m&&(f=f?hc(f,m):m);const y=r.getResolution(this.wrappedTileCoord_[0]),v=function(e,t,n,r){const i=sc(n);let o=Eh(e,t,i,r);return(!isFinite(o)||o<=0)&&nc(n,(function(n){return o=Eh(e,t,n,r),isFinite(o)&&o>0})),o}(e,n,g,y);if(!isFinite(v)||v<=0)return void(this.state=4);const _=void 0!==u?u:.5;if(this.triangulation_=new class{constructor(e,t,n,r,i,o){this.sourceProj_=e,this.targetProj_=t;let s={};const a=hh(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()&&fc(r)==fc(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?fc(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?fc(this.targetProj_.getExtent()):null;const l=dc(n),u=pc(n),c=oc(n),h=ic(n),d=this.transformInv_(l),p=this.transformInv_(u),f=this.transformInv_(c),g=this.transformInv_(h),m=10+(o?Math.max(0,Math.ceil(Math.log2(rc(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,c,h,d,p,f,g,m),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(function(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)}}.bind(this))}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=ju([i,o,s,a]),c=this.sourceWorldWidth_?fc(u)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&c>.5&&c<1;let p=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(p=fc(ju([e,t,n,r]))/this.targetWorldWidth_>.25||p),!d&&this.sourceProj_.isGlobal()&&c&&(p=c>.25||p)),!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!gc(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=d?(Ul(i[0],h)+Ul(s[0],h))/2-Ul(r[0],h):(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),h=[(r[0]+e[0])/2,(r[1]+e[1])/2],d=this.transformInv_(h);this.addQuad_(e,t,u,h,i,o,c,d,l-1),this.addQuad_(h,u,n,r,d,c,s,a,l-1)}else{const u=[(e[0]+t[0])/2,(e[1]+t[1])/2],c=this.transformInv_(u),h=[(n[0]+r[0])/2,(n[1]+r[1])/2],d=this.transformInv_(h);this.addQuad_(e,u,h,r,i,c,d,a,l-1),this.addQuad_(u,t,n,h,c,o,s,d,l-1)}return}}if(d){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;$u(e,i[0]),$u(e,i[1]),$u(e,i[2])})),e}getTriangles(){return this.triangles_}}(e,n,g,f,v*_,y),0===this.triangulation_.getTriangles().length)return void(this.state=4);this.sourceZ_=t.getZForResolution(v);let b=this.triangulation_.calculateSourceExtent();if(f&&(e.canWrapX()?(b[1]=Vl(b[1],f[1],f[3]),b[3]=Vl(b[3],f[1],f[3])):b=hc(b,f)),rc(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(function(t,n,r){t&&2==t.getState()&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}.bind(this)),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_=function(e,t,n,r,i,o,s,a,l,u,c,h){const d=Iu(Math.round(n*e),Math.round(n*t),Ch);if(h||(d.imageSmoothingEnabled=!1),0===l.length)return d.canvas;function p(e){return Math.round(e*n)/n}d.scale(n,n),d.globalCompositeOperation="lighter";const f=[1/0,1/0,-1/0,-1/0];l.forEach((function(e,t,n){Ju(f,e.extent)}));const g=fc(f),m=cc(f),y=Iu(Math.round(n*g/r),Math.round(n*m/r));h||(y.imageSmoothingEnabled=!1);const v=n/r;l.forEach((function(e,t,n){const r=e.extent[0]-f[0],i=-(e.extent[3]-f[3]),o=fc(e.extent),s=cc(e.extent);e.image.width>0&&e.image.height>0&&y.drawImage(e.image,u,u,e.image.width-2*u,e.image.height-2*u,r*v,i*v,o*v,s*v)}));const _=dc(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],g=s[1][1],m=s[2][0],v=s[2][1];const b=p((a[0][0]-_[0])/o),x=p(-(a[0][1]-_[1])/o),w=p((a[1][0]-_[0])/o),k=p(-(a[1][1]-_[1])/o),C=p((a[2][0]-_[0])/o),S=p(-(a[2][1]-_[1])/o),A=l,E=u;l=0,u=0,c-=A,g-=E,m-=A,v-=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,g,0,0,w-b],[m,v,0,0,C-b],[0,0,c,g,k-x],[0,0,m,v,S-x]]);if(M){if(d.save(),d.beginPath(),function(){if(void 0===kh){const e=document.createElement("canvas").getContext("2d");e.globalCompositeOperation="lighter",e.fillStyle="rgba(210, 0, 0, 0.75)",Sh(e,4,5,4,0),Sh(e,4,5,0,5);const t=e.getImageData(0,0,3,3).data;kh=Ah(t,0)||Ah(t,4)||Ah(t,8)}return kh}()||!h){d.moveTo(w,k);const e=4,t=b-w,n=x-k;for(let r=0;r<e;r++)d.lineTo(w+p((r+1)*t/e),k+p(r*n/(e-1))),r!=e-1&&d.lineTo(w+p((r+1)*t/e),k+p((r+1)*n/(e-1)));d.lineTo(C,S)}else d.moveTo(w,k),d.lineTo(b,x),d.lineTo(C,S);d.clip(),d.transform(M[0],M[2],M[1],M[3],b,x),d.translate(f[0]-A,f[3]-E),d.scale(r/n,-r/n),d.drawImage(y.canvas,0,0),d.restore()}})),c&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach((function(e,t,n){const r=e.target,i=(r[0][0]-_[0])/o,s=-(r[0][1]-_[1])/o,a=(r[1][0]-_[0])/o,l=-(r[1][1]-_[1])/o,u=(r[2][0]-_[0])/o,c=-(r[2][1]-_[1])/o;d.beginPath(),d.moveTo(a,l),d.lineTo(i,s),d.lineTo(u,c),d.closePath(),d.stroke()})),d.restore()),d.canvas}(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(function(t,n,r){const i=t.getState();if(0==i||1==i){e++;const n=yl(t,cl,(function(r){const i=t.getState();2!=i&&3!=i&&4!=i||(_l(n),e--,0===e&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(n)}}.bind(this)),0===e?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(e,t,n){0==e.getState()&&e.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(_l),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Lu(this.canvas_.getContext("2d")),Ch.push(this.canvas_),this.canvas_=null),super.release()}};class Th{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 Ph(e,t,n,r,i){return void 0!==i?(i.minX=e,i.maxX=t,i.minY=n,i.maxY=r,i):new Th(e,t,n,r)}const Rh=Th;function Ih(e){return e[0]>0&&e[1]>0}function Lh(e,t){return Array.isArray(e)?e:(void 0===t?t=[e,e]:(t[0]=e,t[1]=e),t)}const zh=class extends xc{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 Rh(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=_u(t.pixelToCoordinateTransform,e.slice()),i=n.getExtent();if(i&&!qu(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 Mc||n instanceof Mh)||n instanceof Mh&&4===n.getState())return null;if(2!==n.getState())continue;const i=u.getOrigin(e),h=Lh(u.getTileSize(e)),d=u.getResolution(e),p=Math.floor(c*((r[0]-i[0])/d-t[1]*h[0])),f=Math.floor(c*((i[1]-r[1])/d-t[2]*h[1])),g=Math.round(c*l.getGutterForProjection(a.projection));return this.getImageData(n.getImage(),p+g,f+g)}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(),h=c.getRevision(),d=c.getTileGridForProjection(i),p=d.getZForResolution(o,c.zDirection),f=d.getResolution(p);let g=e.extent;const m=e.viewState.resolution,y=c.getTilePixelRatio(l),v=Math.round(fc(g)/m*l),_=Math.round(cc(g)/m*l),b=n.extent&&vh(n.extent);b&&(g=hc(g,vh(n.extent)));const x=f*v/2/y,w=f*_/2/y,k=[s[0]-x,s[1]-w,s[0]+x,s[1]+w],C=d.getTileRangeForExtentAndZ(g,p),S={};S[p]={};const A=this.createLoadedTileFinder(c,i,S),E=this.tmpExtent,M=this.tmpTileRange_;this.newTiles_=!1;const T=a?uc(r.center,m,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&&!d.tileCoordIntersectsViewport([p,t,r],T))continue;const i=this.getTile(p,t,r,e);if(this.isDrawableTile(i)){const t=Cl(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=d.getTileCoordChildTileRange(i.tileCoord,M,E);let s=!1;o&&(s=A(p+1,o)),s||d.forEachTileCoordParentTileRange(i.tileCoord,A,M,E)}const P=f/o*l/y;xu(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/l,1/l,a,-v/2,-_/2);const R=Cu(this.pixelTransform);this.useContainer(t,R,this.getBackground(e));const I=this.context,L=I.canvas;wu(this.inversePixelTransform,this.pixelTransform),xu(this.tempTransform,v/2,_/2,P,P,0,-v/2,-_/2),L.width!=v||L.height!=_?(L.width=v,L.height=_):this.containerReused||I.clearRect(0,0,v,_),b&&this.clipUnrotated(I,e,b),c.getInterpolate()||(I.imageSmoothingEnabled=!1),this.preRender(I,e),this.renderedTiles.length=0;let z,F,O,D=Object.keys(S).map(Number);D.sort($a),1!==n.opacity||this.containerReused&&!c.getOpaque(e.viewState.projection)?(z=[],F=[]):D=D.reverse();for(let t=D.length-1;t>=0;--t){const n=D[t],r=c.getTilePixelSize(n,l,i),o=d.getResolution(n)/f,s=r[0]*o*P,a=r[1]*o*P,u=d.getTileCoordForCoordAndZ(dc(k),n),h=d.getTileCoordExtent(u),g=_u(this.tempTransform,[y*(h[0]-k[0])/f,y*(k[3]-h[3])/f]),m=y*c.getGutterForProjection(i),v=S[n];for(const t in v){const r=v[t],i=r.tileCoord,o=u[1]-i[1],l=Math.round(g[0]-(o-1)*s),h=u[2]-i[2],d=Math.round(g[1]-(h-1)*a),f=Math.round(g[0]-o*s),y=Math.round(g[1]-h*a),_=l-f,b=d-y,x=p===n,w=x&&1!==r.getAlpha(Cl(this),e.time);let k=!1;if(!w)if(z){O=[f,y,f+_,y,f+_,y+b,f,y+b];for(let e=0,t=z.length;e<t;++e)if(p!==n&&n<F[e]){const t=z[e];gc([f,y,f+_,y+b],[t[0],t[3],t[4],t[7]])&&(k||(I.save(),k=!0),I.beginPath(),I.moveTo(O[0],O[1]),I.lineTo(O[2],O[3]),I.lineTo(O[4],O[5]),I.lineTo(O[6],O[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())}z.push(O),F.push(n)}else I.clearRect(f,y,_,b);this.drawTileImage(r,e,f,y,_,b,m,x),z&&!w?(k&&I.restore(),this.renderedTiles.unshift(r)):this.renderedTiles.push(r),this.updateUsedTiles(e.usedTiles,c,r)}}return this.renderedRevision=h,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!Qu(this.renderedExtent_,k),this.renderedExtent_=k,this.renderedPixelRatio=l,this.renderedProjection=i,this.manageTilePyramid(e,c,d,l,i,g,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=Cl(this),c=t.layerStatesArray[t.layerIndex],h=c.opacity*(a?e.getAlpha(u,t.time):1),d=h!==this.context.globalAlpha;d&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(l,s,s,l.width-2*s,l.height-2*s,n,r,i,o),d&&this.context.restore(),h!==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=Cl(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=Cl(t);r in e||(e[r]={}),e[r][n.getKey()]=!0}manageTilePyramid(e,t,n,r,i,o,s,a,l){const u=Cl(t);u in e.wantedTiles||(e.wantedTiles[u]={});const c=e.wantedTiles[u],h=e.tileQueue,d=n.getMinZoom(),p=e.viewState.rotation,f=p?uc(e.viewState.center,e.viewState.resolution,p,e.size):void 0;let g,m,y,v,_,b,x=0;for(b=d;b<=s;++b)for(m=n.getTileRangeForExtentAndZ(o,b,m),y=n.getResolution(b),v=m.minX;v<=m.maxX;++v)for(_=m.minY;_<=m.maxY;++_)p&&!n.tileCoordIntersectsViewport([b,v,_],f)||(s-b<=a?(++x,g=t.getTile(b,v,_,r,i),0==g.getState()&&(c[g.getKey()]=!0,h.isKeyQueued(g.getKey())||h.enqueue([g,u,n.getTileCoordCenter(g.tileCoord),y])),void 0!==l&&l(g)):t.useTile(b,v,_,i));t.updateCacheSize(x,i)}},Fh=class extends iu{constructor(e){super(e)}createRenderer(){return new zh(this)}},Oh=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 Pl(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 Pl(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){Pl(!(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 Dh(e,t,n,r){return void 0!==r?(r[0]=e,r[1]=t,r[2]=n,r):[e,t,n]}function Nh(e,t,n){return e+"/"+t+"/"+n}function jh(e){return Nh(e[0],e[1],e[2])}function Bh(e){return e.split("/").map(Number)}const Gh=class extends Oh{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=Bh(this.peekFirstKey())[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove(jh(t.tileCoord)),t.release())}.bind(this))}};function Vh(e){return e?Array.isArray(e)?function(t){return e}:"function"==typeof e?e:function(t){return[e]}:null}const qh=class extends Al{constructor(e){super(),this.projection=rh(e.projection),this.attributions_=Vh(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(){return wl()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=Vh(e),this.changed()}setState(e){this.state_=e,this.changed()}};function Wh(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 Hh(e,t,n,r,i){return!nc(i,(function(i){return!Uh(e,t,n,r,i[0],i[1])}))}function Uh(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 Xh(e,t,n,r,i,o){if(0===n.length)return!1;if(!Uh(e,t,n[0],r,i,o))return!1;for(let t=1,s=n.length;t<s;++t)if(Uh(e,n[t-1],n[t],r,i,o))return!1;return!0}function Zh(e,t,n,r,i){const o=ec([1/0,1/0,-1/0,-1/0],e,t,n,r);return!!gc(i,o)&&(!!Wu(i,o)||o[0]>=i[0]&&o[2]<=i[2]||o[1]>=i[1]&&o[3]<=i[3]||Wh(e,t,n,r,(function(e,t){return function(e,t,n){let r=!1;const i=Uu(e,t),o=Uu(e,n);if(1===i||1===o)r=!0;else{const s=e[0],a=e[1],l=e[2],u=e[3],c=t[0],h=t[1],d=n[0],p=n[1],f=(p-h)/(d-c);let g,m;2&o&&!(2&i)&&(g=d-(p-u)/f,r=g>=s&&g<=l),r||!(4&o)||4&i||(m=p-(d-l)*f,r=m>=a&&m<=u),r||!(8&o)||8&i||(g=d-(p-a)/f,r=g>=s&&g<=l),r||!(16&o)||16&i||(m=p-(d-s)*f,r=m>=a&&m<=u)}return r}(i,e,t)})))}function Kh(e,t,n,r,i){return!!(Zh(e,t,n,r,i)||Uh(e,t,n,r,i[0],i[1])||Uh(e,t,n,r,i[0],i[3])||Uh(e,t,n,r,i[2],i[1])||Uh(e,t,n,r,i[2],i[3]))}function Yh(e,t,n,r,i){if(!Kh(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(Hh(e,n[t-1],n[t],r,i)&&!Zh(e,n[t-1],n[t],r,i))return!1;return!0}const Qh=[0,0,0],Jh=class{constructor(e){let t;if(this.minZoom=void 0!==e.minZoom?e.minZoom:0,this.resolutions_=e.resolutions,Pl(function(e,t,n){const r=function(e,t){return t-e}||$a;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,Pl(this.origins_.length==this.resolutions_.length,20));const n=e.extent;void 0===n||this.origin_||this.origins_||(this.origin_=dc(n)),Pl(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==e.tileSizes&&(this.tileSizes_=e.tileSizes,Pl(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==e.tileSize?e.tileSize:this.tileSizes_?null:256,Pl(!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 Rh(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=Ph(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 Ph(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 Ph(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?Ph(s,s,a,a,n):Ph(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)}getTileRangeExtent(e,t,n){const r=this.getOrigin(e),i=this.getResolution(e),o=Lh(this.getTileSize(e),this.tmpSize_),s=r[0]+t.minX*o[0]*i,a=r[0]+(t.maxX+1)*o[0]*i;return Xu(s,r[1]+t.minY*o[1]*i,a,r[1]+(t.maxY+1)*o[1]*i,n)}getTileRangeForExtentAndZ(e,t,n){const r=Qh;this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,r);const i=r[1],o=r[2];return this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,r),Ph(i,r[1],o,r[2],n)}getTileCoordCenter(e){const t=this.getOrigin(e[0]),n=this.getResolution(e[0]),r=Lh(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=Lh(this.getTileSize(e[0]),this.tmpSize_),o=n[0]+e[1]*i[0]*r,s=n[1]-(e[2]+1)*i[1]*r;return Xu(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=Lh(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=Yl(u,5)-1,c=Yl(c,5)-1):(u=Kl(u,5),c=Kl(c,5)),Dh(o,u,c,i)}getTileCoordForXYAndZ_(e,t,n,r,i){const o=this.getOrigin(n),s=this.getResolution(n),a=Lh(this.getTileSize(n),this.tmpSize_);let l=(e-o[0])/s/a[0],u=(o[1]-t)/s/a[1];return r?(l=Yl(l,5)-1,u=Yl(u,5)-1):(l=Kl(l,5),u=Kl(u,5)),Dh(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 Vl(el(this.resolutions_,e,t||0),this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,t){return Kh(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 $h(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=td(e,undefined,n);return new Jh({extent:e,origin:ac(e,r),resolutions:i,tileSize:n})}(nd(e),0,void 0,void 0)}(e),e.setDefaultTileGrid(t)),t}function ed(e){const t=e||{},n=t.extent||rh("EPSG:3857").getExtent(),r={extent:n,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:td(n,t.maxZoom,t.tileSize,t.maxResolution)};return new Jh(r)}function td(e,t,n,r){t=void 0!==t?t:42,n=Lh(void 0!==n?n:256);const i=cc(e),o=fc(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 nd(e){let t=(e=rh(e)).getExtent();if(!t){const n=180*Tc.degrees/e.getMetersPerUnit();t=Xu(-n,-n,n,n)}return t}class rd extends Ya{constructor(e,t){super(e),this.tile=t}}const id=class extends qh{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&&Lh(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new Gh(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=Nh(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(){return this.tileGrid?this.tileGrid.getResolutions():null}getTile(e,t,n,r,i){return wl()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:$h(e)}getTileCacheForProjection(e){const t=this.getProjection();return Pl(null===t||uh(t,e),68),this.tileCache}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,t,n){const r=this.getTileGridForProjection(n),i=this.getTilePixelRatio(t),o=Lh(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=nd(n);if(qu(o,i))return t;{const t=fc(o),n=Math.ceil((o[0]-i[0])/t);return i[0]+=t*n,e.getTileCoordForCoordAndZ(i,r)}}(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 od(e,t){const n=/\{z\}/g,r=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?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 Pl(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}function sd(e,t){const n=e.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=od(e[i],t);return function(e){return 1===e.length?e[0]:function(t,n,r){if(t){const i=function(e){return(e[1]<<e[0])+e[2]}(t),o=Ul(i,e.length);return e[o](t,n,r)}}}(r)}class ad extends id{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===ad.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=Cl(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 rd(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=function(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}(e);this.urls=t,this.setUrls(t)}setUrls(e){this.urls=e;const t=e.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(sd(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,n){}useTile(e,t,n){const r=Nh(e,t,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const ld=ad;function ud(e,t){e.getImage().src=t}const cd=class extends ld{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:ud,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:Mc,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&&!uh(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&&!uh(this.getProjection(),e))&&super.getOpaque(e)}getTileGridForProjection(e){const t=this.getProjection();if(!this.tileGrid||t&&!uh(t,e)){const t=Cl(e);return t in this.tileGridForProjection||(this.tileGridForProjection[t]=$h(e)),this.tileGridForProjection[t]}return this.tileGrid}getTileCacheForProjection(e){const t=this.getProjection();if(!t||uh(t,e))return this.tileCache;{const t=Cl(e);return t in this.tileCacheForProjection||(this.tileCacheForProjection[t]=new Gh(this.tileCache.highWaterMark)),this.tileCacheForProjection[t]}}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(cl,this.handleTileChange.bind(this)),u}getTile(e,t,n,r,i){const o=this.getProjection();if(o&&i&&!uh(o,i)){const s=this.getTileCacheForProjection(i),a=[e,t,n];let l;const u=jh(a);s.containsKey(u)&&(l=s.get(u));const c=this.getKey();if(l&&l.key==c)return l;{const e=this.getTileGridForProjection(o),t=this.getTileGridForProjection(i),n=this.getTileCoordForTileUrlFunction(a,i),h=new Mh(o,e,i,t,a,n,this.getTilePixelRatio(r),this.getGutter(),function(e,t,n,r){return this.getTileInternal(e,t,n,r,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return h.key=c,l?(h.interimTile=l,h.refreshInterimChain(),s.replace(u,h)):s.set(u,h),h}}return this.getTileInternal(e,t,n,r,o||i)}getTileInternal(e,t,n,r,i){let o=null;const s=Nh(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=rh(e);if(n){const e=Cl(n);e in this.tileGridForProjection||(this.tileGridForProjection[e]=t)}}clear(){super.clear();for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}},hd=class extends cd{constructor(e){const t=void 0!==(e=e||{}).projection?e.projection:"EPSG:3857",n=void 0!==e.tileGrid?e.tileGrid:ed({extent:nd(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 dd{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Lh(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new dd({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 wl()}getImage(e){return wl()}getHitDetectionImage(){return wl()}getPixelRatio(e){return 1}getImageState(){return wl()}getImageSize(){return wl()}getOrigin(){return wl()}getSize(){return wl()}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_=Lh(e)}listenImageChange(e){wl()}load(){wl()}unlistenImageChange(e){wl()}}const pd=dd;function fd(e){return Array.isArray(e)?Ru(e):e}const gd="ol-hidden",md="ol-control",yd=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"),vd=["style","variant","weight","size","lineHeight","family"],_d=function(e){const t=e.match(yd);if(!t)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let e=0,r=vd.length;e<r;++e){const r=t[e+1];void 0!==r&&(n[vd[e]]=r)}return n.families=n.family.split(/,\s?/),n},bd="10px sans-serif",xd="#000",wd="round",kd=[],Cd="round",Sd="#000",Ad="center",Ed="middle",Md=[0,0,0,0],Td=new Al;let Pd,Rd=null;const Id={},Ld=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=Od(i+" "+s+" "+e+n,r),a!=n){const t=Od(i+" "+s+" "+e+a+","+n,r);l=l&&t!=o}}return!!l}function a(){let e=!0;const t=Td.getKeys();for(let n=0,r=t.length;n<r;++n){const r=t[n];Td.get(r)<100&&(s.apply(this,r.split("\n"))?(al(Id),Rd=null,Pd=void 0,Td.set(r,100)):(Td.set(r,Td.get(r)+1,!0),e=!1))}e&&(clearInterval(i),i=void 0)}return function(e){const t=_d(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===Td.get(o)&&(Td.set(o,100,!0),s(t.style,t.weight,r)||(Td.set(o,0,!0),void 0===i&&(i=setInterval(a,32))))}}}(),zd=function(){let e;return function(t){let n=Id[t];if(null==n){if(du){const e=_d(t),r=Fd(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);Id[t]=n}return n}}();function Fd(e,t){return Rd||(Rd=Iu(1,1)),e!=Pd&&(Rd.font=e,Pd=Rd.font),Rd.measureText(t)}function Od(e,t){return Fd(e,t).width}function Dd(e,t,n){if(t in n)return n[t];const r=t.split("\n").reduce(((t,n)=>Math.max(t,Od(e,n))),0);return n[t]=r,r}class Nd extends pd{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 Nd({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=Iu(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 h=t/2/c,d=t/2*(l/u),p=Math.sqrt((r+h)*(r+h)+d*d)-r;if(void 0===this.radius2_||"bevel"===e)return 2*p;const f=r*Math.sin(s),g=i-Math.sqrt(r*r-f*f),m=Math.sqrt(f*f+g*g)/f;if(m<=n){const e=m*t/2-i-r;return 2*Math.max(p,e)}return 2*p}createRenderOptions(){let e,t=Cd,n=0,r=null,i=0,o=0;this.stroke_&&(e=this.stroke_.getColor(),null===e&&(e=Sd),e=fd(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=Cd),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=xd),t.fillStyle=fd(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=Tu(t)),null===t?n=1:Array.isArray(t)&&(n=4===t.length?t[3]:1),0===n){const t=Iu(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=xd,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 jd=Nd;class Bd extends jd{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 Bd({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 Gd=Bd;class Vd{constructor(e){e=e||{},this.color_=void 0!==e.color?e.color:null}clone(){const e=this.getColor();return new Vd({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){this.color_=e}}const qd=Vd;function Wd(e,t,n){return t+":"+e+":"+(n?Eu(n):"null")}const Hd=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=Wd(e,t,n);return r in this.cache_?this.cache_[r]:null}set(e,t,n,r){const i=Wd(e,t,n);this.cache_[i]=r,++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}};let Ud=null;class Xd extends ul{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_){Ud||(Ud=Iu(1,1)),Ud.drawImage(this.image_,0,0);try{Ud.getImageData(0,0,1,1),this.tainted_=!1}catch(e){Ud=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(cl)}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=Iu(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_=Ec(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=Eu(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)}}class Zd extends pd{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;Pl(!(void 0!==s&&o),4),Pl(!o||o&&this.imgSize_,5),void 0!==s&&0!==s.length||!o||(s=o.src||Cl(o)),Pl(void 0!==s&&s.length>0,6);const a=void 0!==e.src?0:2;this.color_=void 0!==e.color?Tu(e.color):null,this.iconImage_=function(e,t,n,r,i,o){let s=Hd.get(t,r,o);return s||(s=new Xd(e,t,n,r,i,o),Hd.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}clone(){const e=this.getScale();return new Zd({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:Array.isArray(e)?e.slice():e,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()}listenImageChange(e){this.iconImage_.addEventListener(cl,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(cl,e)}}const Kd=Zd;function Yd(e,t,n,r,i,o,s){let a,l,u,c,h,d,p;const f=i[o+1],g=[];for(let i=0,o=n.length;i<o;++i){const o=n[i];for(c=e[o-r],d=e[o-r+1],a=t;a<o;a+=r)h=e[a],p=e[a+1],(f<=d&&p<=f||d<=f&&f<=p)&&(u=(f-d)/(p-d)*(h-c)+c,g.push(u)),c=h,d=p}let m=NaN,y=-1/0;for(g.sort($a),c=g[0],a=1,l=g.length;a<l;++a){h=g[a];const i=Math.abs(h-c);i>y&&(u=(c+h)/2,Xh(e,t,n,r,u,f)&&(m=u,y=i)),c=h}return isNaN(m)&&(m=i[o]),s?(s.push(m,f,y),s):[m,f,y]}function Qd(e,t,n,r,i){let o=[];for(let s=0,a=n.length;s<a;++s){const a=n[s];o=Yd(e,t,a,r,i,2*s,o),t=a[a.length-1]}return o}function Jd(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 h=i*u,d=function(e,t,n){let r,i;n=n||$a;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,h);d<0?(l=(h-c[-d-2])/(c[-d-1]-c[-d-2]),a=t+(-d-2)*r):a=t+d*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]:Xl(e[a+t],e[a+r+t],l);return o}function $d(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(Xl(e[(a-1)*r+t],e[a*r+t],c));return s.push(i),s}function ep(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=Yu(e,t,a[0],r),i.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=a[a.length-1]}return i}function tp(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 np(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 h=0;for(let i=t;i<n;i+=r){const t=e[i]-u,n=e[i+1]-c;s[h++]=u+t*a-n*l,s[h++]=c+t*l+n*a;for(let t=i+2;t<i+r;++t)s[h++]=e[t]}return s&&s.length!=h&&(s.length=h),s}const rp=[1,0,0,1,0,0];class ip{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_?Ku(this.flatCoordinates_):Yu(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const e=sc(this.getExtent());this.flatInteriorPoints_=Yd(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const e=ep(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Qd(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=Jd(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=Jd(e,t,i,2,.5);nl(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=rh(e)).getExtent(),n=e.getWorldExtent();if(t&&n){const e=cc(n)/cc(t);xu(rp,n[0],n[3],e,-e,0,0,0),tp(this.flatCoordinates_,0,this.flatCoordinates_.length,2,rp,this.flatCoordinates_)}}getEnds(){return this.ends_}}ip.prototype.getEndss=ip.prototype.getEnds,ip.prototype.getFlatCoordinates=ip.prototype.getOrientedFlatCoordinates;const op=ip;class sp{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 sp({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 ap=sp;class lp{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=dp,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 lp({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_=dp,this.geometry_=e}setZIndex(e){this.zIndex_=e}}let up=null;function cp(e,t){if(!up){const e=new qd({color:"rgba(255,255,255,0.4)"}),t=new ap({color:"#3399CC",width:1.25});up=[new lp({image:new Gd({fill:e,stroke:t,radius:5}),fill:e,stroke:t})]}return up}function hp(){const e={},t=[255,255,255,1],n=[0,153,255,1];return e.Polygon=[new lp({fill:new qd({color:[255,255,255,.5]})})],e.MultiPolygon=e.Polygon,e.LineString=[new lp({stroke:new ap({color:t,width:5})}),new lp({stroke:new ap({color:n,width:3})})],e.MultiLineString=e.LineString,e.Circle=e.Polygon.concat(e.LineString),e.Point=[new lp({image:new Gd({radius:6,fill:new qd({color:n}),stroke:new ap({color:t,width:1.5})}),zIndex:1/0})],e.MultiPoint=e.Point,e.GeometryCollection=e.Polygon.concat(e.LineString,e.Point),e}function dp(e){return e.getGeometry()}const pp=lp;class fp{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=Lh(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new qd({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 fp({font:this.getFont(),placement:this.getPlacement(),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_}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}setRotateWithView(e){this.rotateWithView_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=Lh(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 gp=fp,mp=[1,0,0,1,0,0],yp=class extends Al{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&&rl(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 wl()}closestPointXY(e,t,n,r){return wl()}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 wl()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Zu(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){wl()}scale(e,t,n){wl()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return wl()}getType(){return wl()}applyTransform(e){wl()}intersectsExtent(e){return wl()}translate(e,t){wl()}transform(e,t){const n=rh(e),r="tile-pixels"==n.getUnits()?function(e,r,i){const o=n.getExtent(),s=n.getWorldExtent(),a=cc(s)/cc(o);return xu(mp,s[0],s[3],a,-a,0,0,0),tp(e,0,e.length,i,mp,r),hh(n,t)(e,r,i)}:hh(n,t);return this.applyTransform(r),this}};class vp extends yp{constructor(e){super(),this.geometries_=e||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(_l),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let e=0,t=this.geometries_.length;e<t;++e)this.changeEventsKeys_.push(yl(this.geometries_[e],cl,this.changed,this))}clone(){const e=new vp(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e}closestPointXY(e,t,n,r){if(r<Vu(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){Zu(e);const t=this.geometries_;for(let n=0,r=t.length;n<r;++n)Ju(e,t[n].getExtent());return e}getGeometries(){return _p(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 vp(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=sc(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(_p(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 _p(e){const t=[];for(let n=0,r=e.length;n<r;++n)t.push(e[n].clone());return t}const bp=vp,xp=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let n=t.dataProjection?rh(t.dataProjection):this.readProjection(e);t.extent&&n&&"tile-pixels"===n.getUnits()&&(n=rh(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 wl()}readFeature(e,t){return wl()}readFeatures(e,t){return wl()}readGeometry(e,t){return wl()}readProjection(e){return wl()}writeFeature(e,t){return wl()}writeFeatures(e,t){return wl()}writeGeometry(e,t){return wl()}};function wp(e,t,n){const r=n?rh(n.featureProjection):null,i=n?rh(n.dataProjection):null;let o;if(o=r&&i&&!uh(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 kp(e){if("string"==typeof e){return JSON.parse(e)||null}return null!==e?e:null}const Cp=class extends xp{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(kp(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(kp(e),this.getReadOptions(e,t))}readFeatureFromObject(e,t){return wl()}readFeaturesFromObject(e,t){return wl()}readGeometry(e,t){return this.readGeometryFromObject(kp(e),this.getReadOptions(e,t))}readGeometryFromObject(e,t){return wl()}readProjection(e){return this.readProjectionFromObject(kp(e))}readProjectionFromObject(e){return wl()}writeFeature(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}writeFeatureObject(e,t){return wl()}writeFeatures(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}writeFeaturesObject(e,t){return wl()}writeGeometry(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}writeGeometryObject(e,t){return wl()}};function Sp(e){let t;return"XY"==e?t=2:"XYZ"==e||"XYM"==e?t=3:"XYZM"==e&&(t=4),t}const Ap=class extends yp{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(e){return Yu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return wl()}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=Sp(e),this.layout=e,this.flatCoordinates=t}setCoordinates(e,t){wl()}setLayout(e,t,n){let r;if(e)r=Sp(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();np(n,0,n.length,r,e,t,n),this.changed()}}scale(e,t,n){void 0===t&&(t=e),n||(n=sc(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 Ep(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 h;if(0===u&&0===c)h=t;else{const d=((i-a)*u+(o-l)*c)/(u*u+c*c);if(d>1)h=n;else{if(d>0){for(let i=0;i<r;++i)s[i]=Xl(e[t+i],e[n+i],d);return void(s.length=r)}h=t}}for(let t=0;t<r;++t)s[t]=e[h+t];s.length=r}function Mp(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=Wl(o,s,n,r);a>i&&(i=a),o=n,s=r}return i}function Tp(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o){const s=n[o];i=Mp(e,t,s,r,i),t=s}return i}function Pp(e,t,n,r,i,o,s,a,l,u,c){if(t==n)return u;let h,d;if(0===i){if(d=Wl(s,a,e[t],e[t+1]),d<u){for(h=0;h<r;++h)l[h]=e[t+h];return l.length=r,d}return u}c=c||[NaN,NaN];let p=t+r;for(;p<n;)if(Ep(e,p-r,p,r,s,a,c),d=Wl(s,a,c[0],c[1]),d<u){for(u=d,h=0;h<r;++h)l[h]=c[h];l.length=r,p+=r}else p+=r*Math.max((Math.sqrt(d)-Math.sqrt(u))/i|0,1);if(o&&(Ep(e,n-r,t,r,s,a,c),d=Wl(s,a,c[0],c[1]),d<u)){for(u=d,h=0;h<r;++h)l[h]=c[h];l.length=r}return u}function Rp(e,t,n,r,i,o,s,a,l,u,c){c=c||[NaN,NaN];for(let h=0,d=n.length;h<d;++h){const d=n[h];u=Pp(e,t,d,r,i,o,s,a,l,u,c),t=d}return u}function Ip(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 Lp(e,t,n,r,i){i=i||[];let o=0;for(let s=0,a=n.length;s<a;++s){const a=Ip(e,t,n[s],r);i[o++]=a,t=a}return i.length=o,i}function zp(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],h=e[o+1],d=e[n],p=e[n+1];for(let t=o+r;t<n;t+=r){const n=ql(e[t],e[t+1],a,h,d,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 Fp(e,t){return t*Math.round(e/t)}function Op(e,t,n,r,i,o,s){if(t==n)return s;let a,l,u=Fp(e[t],i),c=Fp(e[t+1],i);t+=r,o[s++]=u,o[s++]=c;do{if(a=Fp(e[t],i),l=Fp(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=Fp(e[t],i),h=Fp(e[t+1],i);if(t+=r,n==a&&h==l)continue;const d=a-u,p=l-c,f=n-u,g=h-c;d*g==p*f&&(d<0&&f<d||d==f||d>0&&f>d)&&(p<0&&g<p||p==g||p>0&&g>p)?(a=n,l=h):(o[s++]=a,o[s++]=l,u=a,c=l,a=n,l=h)}return o[s++]=a,o[s++]=l,s}function Dp(e,t,n,r,i,o,s,a){for(let l=0,u=n.length;l<u;++l){const u=n[l];s=Op(e,t,u,r,i,o,s),a.push(s),t=u}return s}function Np(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 jp(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++]=Np(e,t,a,r,i[o]),t=a}return i.length=o,i}function Bp(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?[]:jp(e,t,a,r,i[o]),t=a[a.length-1]}return i.length=o,i}function Gp(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 Vp extends Ap{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?nl(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()}clone(){const e=new Vp(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<Vu(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Mp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Pp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,n,r))}forEachSegment(e){return Wh(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,$d(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return Np(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return Jd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return Gp(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=zp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new Vp(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return Zh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ip(this.flatCoordinates,0,e,this.stride),this.changed()}}const qp=Vp;class Wp extends Ap{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()),nl(r,o.getFlatCoordinates()),i.push(r.length)}this.setFlatCoordinates(t,r),this.ends_=i}}appendLineString(e){this.flatCoordinates?nl(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new Wp(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<Vu(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Tp(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Rp(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 $d(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 $d(e,t,s,r,i,!1);t=s}}return null}(this.flatCoordinates,0,this.ends_,this.stride,e,t,n))}getCoordinates(){return jp(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new qp(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 qp(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];nl(e,Jd(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=zp(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 Wp(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(Zh(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=Lp(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()}}const Hp=Wp;class Up extends Ap{constructor(e,t){super(),this.setCoordinates(e,t)}clone(){const e=new Up(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){const i=this.flatCoordinates,o=Wl(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 Ku(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return Hu(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(e,t,n,r){for(let r=0,i=n.length;r<i;++r)e[t++]=n[r];return t}(this.flatCoordinates,0,e,this.stride),this.changed()}}const Xp=Up;class Zp extends Ap{constructor(e,t){super(),t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){this.flatCoordinates?nl(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()}clone(){const e=new Zp(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,n,r){if(r<Vu(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=Wl(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 Np(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 Xp(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 Xp(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(Hu(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=Ip(this.flatCoordinates,0,e,this.stride),this.changed()}}const Kp=Zp;function Yp(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 Qp(e,t,n,r){let i=0;for(let o=0,s=n.length;o<s;++o){const s=n[o];i+=Yp(e,t,s,r),t=s}return i}class Jp extends Ap{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 Jp(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,t,n,r){return r<Vu(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Mp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Pp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,n,r))}getArea(){return Yp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Np(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const t=[];return t.length=zp(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new Jp(t,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ip(this.flatCoordinates,0,e,this.stride),this.changed()}}const $p=Jp;function ef(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 tf(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 nf(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=tf(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 rf(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=tf(e,t,s,r);(0===o?i&&a||!i&&!a:i&&!a||!i&&a)&&ef(e,t,s,r),t=s}return t}function of(e,t,n,r,i){for(let o=0,s=n.length;o<s;++o)t=rf(e,t,n[o],r,i);return t}class sf extends Ap{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?nl(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new sf(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,n,r){return r<Vu(this.getExtent(),e,t)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Tp(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Rp(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,n,r))}containsXY(e,t){return Xh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}getArea(){return Qp(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let t;return void 0!==e?(t=this.getOrientedFlatCoordinates().slice(),rf(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,jp(t,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=sc(this.getExtent());this.flatInteriorPoint_=Yd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Xp(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new $p(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 $p(t.slice(i,s),e);r.push(a),i=s}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;nf(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=rf(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],n=[];return t.length=Dp(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,n),new sf(t,"XY",n)}getType(){return"Polygon"}intersectsExtent(e){return Yh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=Lp(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()}}const af=sf;function lf(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 sf(o,"XY",[o.length])}function uf(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 sf(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*Ul(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}class cf extends Ap{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;nl(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;nl(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 cf(this.flatCoordinates.slice(),this.layout,t);return n.applyProperties(this),n}closestPointXY(e,t,n,r){return r<Vu(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=Tp(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,h=n.length;o<h;++o){const h=n[o];u=Rp(e,t,h,r,i,true,s,a,l,u,c),t=h[h.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(Xh(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+=Qp(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(),of(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,Bp(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=ep(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Qd(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Kp(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(!nf(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=of(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=Dp(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 cf(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 af(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 af(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(Yh(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=Lp(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 hf=cf;function df(e,t){if(!e)return null;let n;switch(e.type){case"Point":n=function(e){return new Xp(e.coordinates)}(e);break;case"LineString":n=function(e){return new qp(e.coordinates)}(e);break;case"Polygon":n=function(e){return new af(e.coordinates)}(e);break;case"MultiPoint":n=function(e){return new Kp(e.coordinates)}(e);break;case"MultiLineString":n=function(e){return new Hp(e.coordinates)}(e);break;case"MultiPolygon":n=function(e){return new hf(e.coordinates)}(e);break;case"GeometryCollection":n=function(e,t){const n=e.geometries.map((function(e){return df(e,undefined)}));return new bp(n)}(e);break;default:throw new Error("Unsupported GeoJSON type: "+e.type)}return wp(n,!1,t)}function pf(e,t){const n=(e=wp(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){return delete(t=Object.assign({},t)).featureProjection,{type:"GeometryCollection",geometries:e.getGeometriesArray().map((function(e){return pf(e,t)}))}}(e,t);break;case"Circle":r={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return r}const ff=class extends Cp{constructor(e){e=e||{},super(),this.dataProjection=rh(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=rh(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=df(n.geometry,t),i=new Il;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 df(e,t)}readProjectionFromObject(e){const t=e.crs;let n;return t?"name"==t.type?n=rh(t.properties.name):"EPSG"===t.type?n=rh("EPSG:"+t.properties.code):Pl(!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=pf(o,t),delete i[e.getGeometryName()]),ll(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 pf(e,this.adaptOptions(t))}};var gf=n(4459);function mf(e,t,n){if(3===e){const e={keys:[],values:[],features:[]},r=n.readVarint()+n.pos;n.readFields(yf,e,r),e.length=e.features.length,e.length&&(t[e.name]=e)}}function yf(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 vf(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 _f(e,t,n){e.pos=t.features[n];const r=e.readVarint()+e.pos,i={layer:t,type:0,properties:{}};return e.readFields(vf,i,r),i}const bf=class extends xp{constructor(e){super(),e=e||{},this.dataProjection=new Pc({code:"",units:"tile-pixels"}),this.featureClass_=e.featureClass?e.featureClass:op,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):Pl(!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_===op)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(tf(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 hf(a,"XY",t):new af(a,"XY",l)}else e="Point"===u?new Xp(a,"XY"):"LineString"===u?new qp(a,"XY"):"MultiPoint"===u?new Kp(a,"XY"):"MultiLineString"===u?new Hp(a,"XY",l):null;i=new(0,this.featureClass_),this.geometryName_&&i.setGeometryName(this.geometryName_);const t=wp(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=rh((t=this.adaptOptions(t)).dataProjection);r.setWorldExtent(t.extent),t.dataProjection=r;const i=new gf(e),o=i.readFields(mf,{}),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=_f(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}},xf="add",wf="remove",kf="length";class Cf extends Ya{constructor(e,t,n){super(e),this.element=t,this.index=n}}const Sf=class extends Al{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(kf)}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 Cf(xf,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 Cf(wf,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 Cf(wf,n,e)),this.dispatchEvent(new Cf(xf,t,e))}updateLength_(){this.set(kf,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 Tl(58)}};function Af(e,t){Hd.expire()}const Ef=class extends Ja{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){wl()}calculateMatrices2D(e){const t=e.viewState,n=e.coordinateToPixelTransform,r=e.pixelToCoordinateTransform;xu(n,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),wu(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 h=u.projection,d=Yc(e.slice(),h),p=[[0,0]];if(h.canWrapX()&&r){const e=fc(h.getExtent());p.push([-e,0],[e,0])}const f=t.layerStatesArray,g=f.length,m=[],y=[];for(let r=0;r<p.length;r++)for(let i=g-1;i>=0;--i){const o=f[i],h=o.layer;if(h.hasRenderer()&&eu(o,u)&&s.call(a,h)){const i=h.getRenderer(),s=h.getSource();if(i&&s){const a=s.getWrapX()?d:e,u=c.bind(null,o.managed);y[0]=a[0]+p[r][0],y[1]=a[1]+p[r][1],l=i.forEachFeatureAtCoordinate(y,t,n,u,m)}if(l)return l}}if(0===m.length)return;const v=1/m.length;return m.forEach(((e,t)=>e.distanceSq+=t*v)),m.sort(((e,t)=>e.distanceSq-t.distanceSq)),m.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,il,this,i,o)}getMap(){return this.map_}renderFrame(e){wl()}scheduleExpireIconCache(e){Hd.canExpireCache()&&e.postRenderFunctions.push(Af)}},Mf=class extends Ef{constructor(e){super(e),this.fontChangeListenerKey_=yl(Td,Qa,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="ol-unselectable 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 su(e,void 0,t);n.dispatchEvent(r)}}disposeInternal(){_l(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(Jl,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(!eu(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 Tf extends Ya{constructor(e,t){super(e),this.layer=t}}const Pf="layers";class Rf extends Ql{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(Pf,this.handleLayersChanged_),n?Array.isArray(n)?n=new Sf(n.slice(),{unique:!0}):Pl("function"==typeof n.getArray,43):n=new Sf(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(_l),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(yl(e,xf,this.handleLayersAdd_,this),yl(e,wf,this.handleLayersRemove_,this));for(const e in this.listenerKeys_)this.listenerKeys_[e].forEach(_l);al(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 Tf("addlayer",n))}this.changed()}registerLayerListeners_(e){const t=[yl(e,Qa,this.handleLayerChange_,this),yl(e,cl,this.handleLayerChange_,this)];e instanceof Rf&&t.push(yl(e,"addlayer",this.handleLayerGroupAdd_,this),yl(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[Cl(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new Tf("addlayer",e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new Tf("removelayer",e.layer))}handleLayersAdd_(e){const t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new Tf("addlayer",t)),this.changed()}handleLayersRemove_(e){const t=e.element,n=Cl(t);this.listenerKeys_[n].forEach(_l),delete this.listenerKeys_[n],this.dispatchEvent(new Tf("removelayer",t)),this.changed()}getLayers(){return this.get(Pf)}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 Tf("removelayer",e[t]))}this.set(Pf,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=hc(n.extent,r.extent):n.extent=r.extent),void 0===n.zIndex&&(n.zIndex=i)}return t}getSourceState(){return"ready"}}const If=Rf,Lf=class extends Ya{constructor(e,t,n){super(e),this.map=t,this.frameState=void 0!==n?n:null}},zf=class extends Lf{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()}},Ff={SINGLECLICK:"singleclick",CLICK:dl,DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Of="pointerdown",Df=class extends ul{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_=yl(n,Of,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=yl(n,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(gl,this.boundHandleTouchMove_,!!fu&&{passive:!1})}emulateClick_(e){let t=new zf(Ff.CLICK,this.map_,e);this.dispatchEvent(t),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new zf(Ff.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const t=new zf(Ff.SINGLECLICK,this.map_,e);this.dispatchEvent(t)}.bind(this),250)}updateActivePointers_(e){const t=e,n=t.pointerId;if(t.type==Ff.POINTERUP||t.type==Ff.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!=Ff.POINTERDOWN&&t.type!=Ff.POINTERMOVE||(this.trackedTouches_[n]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new zf(Ff.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(_l),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 zf(Ff.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.down_={};for(const t in e){const n=e[t];this.down_[t]="function"==typeof n?sl:n}if(0===this.dragListenerKeys_.length){const e=this.map_.getOwnerDocument();this.dragListenerKeys_.push(yl(e,Ff.POINTERMOVE,this.handlePointerMove_,this),yl(e,Ff.POINTERUP,this.handlePointerUp_,this),yl(this.element_,Ff.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==e&&this.dragListenerKeys_.push(yl(this.element_.getRootNode(),Ff.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new zf(Ff.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 zf(Ff.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_&&(_l(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(gl,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(_l(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(_l),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Nf="postrender",jf="loadstart",Bf="loadend",Gf="layergroup",Vf="size",qf="target",Wf="view",Hf=1/0,Uf=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,al(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){Pl(!(this.keyFunction_(e)in this.queuedElements_),31);const t=this.priorityFunction_(e);return t!=Hf&&(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==Hf?delete this.queuedElements_[this.keyFunction_(o)]:(n[r]=a,t[r++]=o);t.length=r,n.length=r,this.heapify_()}},Xf=class extends Uf{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(cl,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(cl,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())}},Zf={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function Kf(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,h=a?a[1]:0;let d=e[0]+l/2+c,p=e[2]-l/2+c,f=e[1]+u/2+h,g=e[3]-u/2+h;d>p&&(d=(p+d)/2,p=d),f>g&&(f=(g+f)/2,g=f);let m=Vl(r[0],d,p),y=Vl(r[1],f,g);if(s&&n&&i){const e=30*i;m+=-e*Math.log(1+Math.max(0,d-r[0])/e)+e*Math.log(1+Math.max(0,r[0]-p)/e),y+=-e*Math.log(1+Math.max(0,f-r[1])/e)+e*Math.log(1+Math.max(0,r[1]-g)/e)}return[m,y]}}function Yf(e){return e}function Qf(e,t,n,r){const i=fc(t)/n[0],o=cc(t)/n[1];return r?Math.min(e,Math.max(i,o)):Math.min(e,Math.min(i,o))}function Jf(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),Vl(r,n/2,2*t)}function $f(e,t,n,r,i){return n=void 0===n||n,function(o,s,a,l){if(void 0!==o){const s=r?Qf(e,r,a,i):e;return n&&l?Jf(o,s,t):Vl(o,t,s)}}}function eg(e){return void 0!==e?0:void 0}function tg(e){return void 0!==e?e:void 0}function ng(e,t){setTimeout((function(){e(t)}),0)}function rg(e){return!(e.sourceCenter&&e.targetCenter&&!Uc(e.sourceCenter,e.targetCenter))&&e.sourceResolution===e.targetResolution&&e.sourceRotation===e.targetRotation}function ig(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 og=class extends Al{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=sh(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&&$c(),e.center&&(e.center=mh(e.center,this.projection_)),e.extent&&(e.extent=vh(e.extent,this.projection_)),this.applyOptions_(e)}applyOptions_(e){const t=Object.assign({},e);for(const e in Zf)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=sh(e.projection,"EPSG:3857"),h=c.getExtent();let d=e.constrainOnlyCenter,p=e.extent;if(a||p||!c.isGlobal()||(d=!1,p=h),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?Qf(l,n,s,r):l;if(a)return t?Jf(i,c,u):Vl(i,u,c);const h=Math.min(c,i),d=Math.floor(el(e,h,o));return e[d]>c&&d<e.length-1?e[d+1]:e[d]}}}(s,l,!d&&p,u):$f(n,r,l,!d&&p,u)}else{const a=(h?Math.max(fc(h),cc(h)):360*Tc.degrees/c.getMetersPerUnit())/256/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?Qf(t,i,l,o):t;if(u)return r?Jf(s,c,n):Vl(s,n,c);const h=1e-9,d=Math.ceil(Math.log(t/c)/Math.log(e)-h),p=-a*(.5-h)+.5,f=Math.min(c,s),g=Math.floor(Math.log(t/f)/Math.log(e)+p),m=Math.max(d,g);return Vl(t/Math.pow(e,m),n,c)}}}(s,n,r,l,!d&&p,u):$f(n,r,l,!d&&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 Kf(e.extent,e.constrainOnlyCenter,t)}const t=sh(e.projection,"EPSG:3857");if(!0!==e.multiWorld&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Kf(e,!1,!1)}return Yf}(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||Hl(5),function(e,n){return n?e:void 0!==e?Math.abs(e)<=t?0:e:void 0}):!1===n?tg:"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):tg}return eg;var t}(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.getCenter();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=mh(n.center,this.getProjection())),n.anchor&&(n=Object.assign({},n),n.anchor=mh(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&&ng(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||Cc,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=Ul(e.rotation-a+Math.PI,2*Math.PI)-Math.PI;n.targetRotation=a+t,a=n.targetRotation}rg(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&&ng(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?Ul(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&&ng(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]],Xc(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?gh(e,this.getProjection()):e}getCenterInternal(){return this.get(Zf.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 yh(this.calculateExtentInternal(e),this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();Pl(t,1);const n=this.getResolution();Pl(void 0!==n,2);const r=this.getRotation();return Pl(void 0!==r,3),lc(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(Zf.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(vh(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const n=fc(e)/t[0],r=cc(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(Zf.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=ig(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()}}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=el(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=Vl(Math.floor(e),0,this.resolutions_.length-2),n=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(n,Vl(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,t){let n;if(Pl(Array.isArray(e)||"function"==typeof e.getSimplifiedGeometry,24),Array.isArray(e))Pl(!mc(e),25),n=lf(vh(e,this.getProjection()));else if("Circle"===e.getType()){const t=vh(e.getExtent(),this.getProjection());n=lf(t),n.rotate(this.getRotation(),sc(t))}else{const t=fh();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),h=sc(s);h[0]+=(r[1]-r[3])/2*a,h[1]+=(r[0]-r[2])/2*a;const d=h[0]*c-h[1]*u,p=h[1]*c+h[0]*u,f=this.getConstrainedCenter([d,p],a),g=t.callback?t.callback:sl;void 0!==t.duration?this.animateInternal({resolution:a,center:f,duration:t.duration,easing:t.easing},g):(this.targetResolution_=a,this.targetCenter_=f,this.applyTargetState_(!1,!0),ng(g,!0))}centerOn(e,t,n){this.centerOnInternal(mh(e,this.getProjection()),t,n)}centerOnInternal(e,t,n){this.setCenterInternal(ig(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=ig(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=gh(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&&mh(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=mh(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?mh(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(Zf.ROTATION)!==r&&this.set(Zf.ROTATION,r),this.get(Zf.RESOLUTION)!==o&&(this.set(Zf.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(Zf.CENTER)&&Uc(this.get(Zf.CENTER),s)||this.set(Zf.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()&&Uc(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:i,center:a,resolution:s,duration:e,easing:kc,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(1,1)}endInteraction(e,t,n){n=n&&mh(n,this.getProjection()),this.endInteractionInternal(e,t,n)}endInteractionInternal(e,t,n){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)}},sg=class extends Al{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(){Du(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&Du(this.element);for(let e=0,t=this.listenerKeys.length;e<t;++e)_l(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=e,e&&((this.target_?this.target_:e.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==sl&&this.listenerKeys.push(yl(e,Nf,this.render,this)),e.render())}render(e){}setTarget(e){this.target_="string"==typeof e?document.getElementById(e):e}},ag=class extends sg{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(dl,this.handleClick_.bind(this),!1);const l=t+" ol-unselectable "+md+(this.collapsed_&&this.collapsible_?" ol-collapsed":"")+(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={},n=[];let r=!0;const i=e.layerStatesArray;for(let o=0,s=i.length;o<s;++o){const s=i[o];if(!eu(s,e.viewState))continue;const a=s.layer.getSource();if(!a)continue;const l=a.getAttributions();if(!l)continue;const u=l(e);if(u)if(r=r&&!1!==a.getAttributionsCollapsible(),Array.isArray(u))for(let e=0,r=u.length;e<r;++e)u[e]in t||(n.push(u[e]),t[u[e]]=!0);else u in t||(n.push(u),t[u]=!0)}return this.overrideCollapsible_||this.setCollapsible(r),n}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),!rl(t,this.renderedAttributions_)){Nu(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("ol-collapsed"),this.collapsed_?Ou(this.collapseLabel_,this.label_):Ou(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)}},lg=class extends sg{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(dl,this.handleClick_.bind(this),!1);const s=t+" ol-unselectable "+md,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(gd)}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:kc}):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(gd);e||0!==n?e&&0!==n&&this.element.classList.remove(gd):this.element.classList.add(gd)}this.label_.style.transform=e}this.rotation_=n}},ug=class extends sg{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(dl,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(dl,this.handleClick_.bind(this,-n),!1);const h=t+" ol-unselectable "+md,d=this.element;d.className=h,d.appendChild(u),d.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:kc})):t.setZoom(r)}}};function cg(e){e=e||{};const t=new Sf;return(void 0===e.zoom||e.zoom)&&t.push(new ug(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&t.push(new lg(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&t.push(new ag(e.attributionOptions)),t}const hg="active";function dg(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:kc})}const pg=class extends Al{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(hg)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(hg,e)}setMap(e){this.map_=e}},fg=class extends pg{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==Ff.DBLCLICK){const n=e.originalEvent,r=e.map,i=e.coordinate,o=n.shiftKey?-this.delta_:this.delta_;dg(r.getView(),o,i,this.duration_),n.preventDefault(),t=!0}return!t}};function gg(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[n/t,r/t]}const mg=class extends pg{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==Ff.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==Ff.POINTERUP){const t=this.handleUpEvent(e);this.handlingDownUpSequence=t&&this.targetPointers.length>0}}else if(e.type==Ff.POINTERDOWN){const n=this.handleDownEvent(e);this.handlingDownUpSequence=n,t=this.stopDown(n)}else e.type==Ff.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 yg(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 vg=function(e){const t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},_g=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)},bg=il,xg=function(e){return e.type==Ff.CLICK},wg=function(e){const t=e.originalEvent;return 0==t.button&&!(uu&&cu&&t.ctrlKey)},kg=ol,Cg=function(e){return"pointermove"==e.type},Sg=function(e){return e.type==Ff.SINGLECLICK},Ag=function(e){const t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Eg=function(e){const t=e.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Mg=function(e){const t=e.originalEvent,n=t.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n&&!t.target.isContentEditable},Tg=function(e){const t=e.originalEvent;return Pl(void 0!==t,56),"mouse"==t.pointerType},Pg=function(e){const t=e.originalEvent;return Pl(void 0!==t,56),t.isPrimary&&0===t.button},Rg=class extends mg{constructor(e){super({stopDown:ol}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const t=e.condition?e.condition:yg(Ag,Pg);this.condition_=e.onFocusOnly?yg(_g,t):t,this.noKinetic_=!1}handleDragEvent(e){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const t=this.targetPointers,n=gg(t);if(t.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const t=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],r=e.map.getView();!function(e,t){e[0]*=t,e[1]*=t}(t,r.getResolution()),Xc(t,r.getRotation()),r.adjustCenterInternal(t)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=t.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:kc})}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}},Ig=class extends mg{constructor(e){e=e||{},super({stopDown:ol}),this.condition_=e.condition?e.condition:vg,this.lastAngle_=void 0,this.duration_=void 0!==e.duration?e.duration:250}handleDragEvent(e){if(!Tg(e))return;const t=e.map,n=t.getView();if(n.getConstraints().rotation===eg)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!Tg(e)||(e.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(e){return!!Tg(e)&&(!(!wg(e)||!this.condition_(e))&&(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}},Lg=class extends Ja{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 af([n])}getGeometry(){return this.geometry_}};class zg extends Ya{constructor(e,t,n){super(e),this.coordinate=t,this.mapBrowserEvent=n}}const Fg=class extends mg{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.box_=new Lg(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:wg,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 zg("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 zg(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 zg("boxstart",e.coordinate,e)),!0)}onBoxEnd(e){}},Og=class extends Fg{constructor(e){super({condition:(e=e||{}).condition?e.condition:Eg,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:kc})}},Dg=class extends pg{constructor(e){super(),e=e||{},this.defaultCondition_=function(e){return Ag(e)&&Mg(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==pl){const n=e.originalEvent,r=n.keyCode;if(this.condition_(e)&&(40==r||37==r||39==r||38==r)){const i=e.map.getView(),o=i.getResolution()*this.pixelDelta_;let s=0,a=0;40==r?a=-o:37==r?s=-o:39==r?s=o:a=o;const l=[s,a];Xc(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:Sc,center:e.getConstrainedCenter(i)})}}(i,l,this.duration_),n.preventDefault(),t=!0}}return!t}},Ng=class extends pg{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:Mg,this.delta_=e.delta?e.delta:1,this.duration_=void 0!==e.duration?e.duration:100}handleEvent(e){let t=!1;if(e.type==pl||e.type==fl){const n=e.originalEvent,r=n.charCode;if(this.condition_(e)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){const i=e.map,o=r=="+".charCodeAt(0)?this.delta_:-this.delta_;dg(i.getView(),o,void 0,this.duration_),n.preventDefault(),t=!0}}return!t}},jg=class extends pg{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:bg;this.condition_=e.onFocusOnly?yg(_g,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!==ml)return!0;const t=e.map,n=e.originalEvent;let r;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate),e.type==ml&&(r=n.deltaY,lu&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=hu),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=-Vl(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),dg(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)}},Bg=class extends mg{constructor(e){const t=e=e||{};t.stopDown||(t.stopDown=ol),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();if(s.getConstraints().rotation===eg)return;const a=o.getViewport().getBoundingClientRect(),l=gg(this.targetPointers);l[0]-=a.left,l[1]-=a.top,this.anchor_=o.getCoordinateFromPixelInternal(l),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}},Gg=class extends mg{constructor(e){const t=e=e||{};t.stopDown||(t.stopDown=ol),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);const u=a.getViewport().getBoundingClientRect(),c=gg(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(c),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 Vg(e){e instanceof tu?e.setMapInternal(null):e instanceof If&&e.getLayers().forEach(Vg)}function qg(e,t){if(e instanceof tu)e.setMapInternal(t);else if(e instanceof If){const n=e.getLayers().getArray();for(let e=0,r=n.length;e<r;++e)qg(n[e],t)}}const Wg=class extends Al{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 If({layers:e.layers});let i,o,s;return n.layergroup=r,n.target=e.target,n.view=e.view instanceof og?e.view:new og,void 0!==e.controls&&(Array.isArray(e.controls)?i=new Sf(e.controls.slice()):(Pl("function"==typeof e.controls.getArray,47),i=e.controls)),void 0!==e.interactions&&(Array.isArray(e.interactions)?o=new Sf(e.interactions.slice()):(Pl("function"==typeof e.interactions.getArray,48),o=e.interactions)),void 0!==e.overlays?Array.isArray(e.overlays)?s=new Sf(e.overlays.slice()):(Pl("function"==typeof e.overlays.getArray,49),s=e.overlays):s=new Sf,{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:hu,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.controls=t.controls||cg(),this.interactions=t.interactions||function(e){e=e||{};const t=new Sf,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 Ig),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&t.push(new fg({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&t.push(new Rg({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&t.push(new Bg),(void 0===e.pinchZoom||e.pinchZoom)&&t.push(new Gg({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(t.push(new Dg),t.push(new Ng({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&t.push(new jg({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&t.push(new Og({duration:e.zoomDuration})),t}({onFocusOnly:!0}),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Xf(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Gf,this.handleLayerGroupChanged_),this.addChangeListener(Wf,this.handleViewChanged_),this.addChangeListener(Vf,this.handleSizeChanged_),this.addChangeListener(qf,this.handleTargetChanged_),this.setProperties(t.values);const n=this;!e.view||e.view instanceof og||e.view.then((function(e){n.setView(new og(e))})),this.controls.addEventListener(xf,function(e){e.element.setMap(this)}.bind(this)),this.controls.addEventListener(wf,function(e){e.element.setMap(null)}.bind(this)),this.interactions.addEventListener(xf,function(e){e.element.setMap(this)}.bind(this)),this.interactions.addEventListener(wf,function(e){e.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(xf,function(e){this.addOverlayInternal_(e.element)}.bind(this)),this.overlays_.addEventListener(wf,function(e){const t=e.element.getId();void 0!==t&&delete this.overlayIdIndex_[t.toString()],e.element.setMap(null)}.bind(this)),this.controls.forEach(function(e){e.setMap(this)}.bind(this)),this.interactions.forEach(function(e){e.setMap(this)}.bind(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){qg(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.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:il,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 If?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:il,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="changedTouches"in e?e.changedTouches[0]:e;return[n.clientX-t.left,n.clientY-t.top]}getTarget(){return this.get(qf)}getTargetElement(){const e=this.getTarget();return void 0!==e?"string"==typeof e?document.getElementById(e):e:null}getCoordinateFromPixel(e){return gh(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?_u(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(Gf)}setLayers(e){const t=this.getLayerGroup();if(e instanceof Sf)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=mh(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}getPixelFromCoordinateInternal(e){const t=this.frameState_;return t?_u(t.coordinateToPixelTransform,e.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Vf)}getView(){return this.get(Wf)}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 Hf;if(!e.wantedTiles[n][t.getKey()])return Hf;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 zf(t,this,e);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(e){if(!this.frameState_)return;const t=e.originalEvent,n=t.type;if(n===Of||n===ml||n===pl){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($l)&&this.renderer_.dispatchRenderEvent($l,e),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new Lf(Bf,this,e)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new Lf(jf,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)_l(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(hl,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(ml,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Du(this.viewport_)}const e=this.getTargetElement();if(e){e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Mf(this)),this.mapBrowserEventHandler_=new Df(this,this.moveTolerance_);for(const e in Ff)this.mapBrowserEventHandler_.addEventListener(Ff[e],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(hl,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(ml,this.boundHandleBrowserEvent_,!!fu&&{passive:!1});const t=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[yl(n,pl,this.handleBrowserEvent,this),yl(n,fl,this.handleBrowserEvent,this),yl(t,"resize",this.updateSize,this)]}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_&&(_l(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(_l(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const e=this.getView();e&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=yl(e,Qa,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=yl(e,cl,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(_l),this.layerGroupPropertyListenerKeys_=null);const e=this.getLayerGroup();e&&(this.handleLayerAdd_(new Tf("addlayer",e)),this.layerGroupPropertyListenerKeys_=[yl(e,Qa,this.render,this),yl(e,cl,this.render,this),yl(e,"addlayer",this.handleLayerAdd_,this),yl(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){Vg(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&&Ih(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:lc(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:Cl(this),renderTargets:{}},o.nextCenter&&o.nextResolution){const e=isNaN(o.nextRotation)?o.rotation:o.nextRotation;i.nextExtent=lc(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_||!mc(this.previousExtent_)&&!Qu(i.extent,this.previousExtent_))&&(this.dispatchEvent(new Lf("movestart",this,r)),this.previousExtent_=Zu(this.previousExtent_)),this.previousExtent_&&!i.viewHints[0]&&!i.viewHints[1]&&!Qu(i.extent,this.previousExtent_)&&(this.dispatchEvent(new Lf("moveend",this,i)),Gu(i.extent,this.previousExtent_))),this.dispatchEvent(new Lf(Nf,this,i)),this.renderComplete_=this.hasListener(jf)||this.hasListener(Bf)||this.hasListener($l)?!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 Tf("removelayer",t)),this.set(Gf,e)}setSize(e){this.set(Vf,e)}setTarget(e){this.set(qf,e)}setView(e){if(!e||e instanceof og)return void this.set(Wf,e);this.set(Wf,new og);const t=this;e.then((function(e){t.setView(new og(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],!Ih(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}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)}}};class Hg extends Error{constructor(e){super("Unexpected response status: "+e.status),this.name="ResponseError",this.response=e}}class Ug extends Error{constructor(e){super("Failed to issue request"),this.name="ClientError",this.client=e}}const Xg=class extends cd{constructor(e){if(super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:rh("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_"+Cl(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):Pl(!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=rh("EPSG:4326"),n=this.getProjection();let r;if(void 0!==e.bounds){const i=ch(t,n);r=yc(e.bounds,i)}const i=nd(n),o=e.minzoom||0,s=ed({extent:i,maxZoom:e.maxzoom||22,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=s,this.tileUrlFunction=sd(e.tiles,s),e.attribution&&!this.getAttributions()){const t=void 0!==r?r:i;this.setAttributions((function(n){return gc(t,n.extent)?[e.attribution]:null}))}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}};var Zg=n(6656);function Kg(e){return new pp({fill:Yg(e,""),stroke:Qg(e,""),text:Jg(e),image:$g(e)})}function Yg(e,t){const n=e[t+"fill-color"];if(n)return new qd({color:n})}function Qg(e,t){const n=e[t+"stroke-width"],r=e[t+"stroke-color"];if(n||r)return new ap({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 Jg(e){const t=e["text-value"];if(t)return new gp({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"],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:Yg(e,"text-"),backgroundFill:Yg(e,"text-background-"),stroke:Qg(e,"text-"),backgroundStroke:Qg(e,"text-background-")})}function $g(e){const t=e["icon-src"],n=e["icon-img"];if(t||n)return new Kd({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"],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 jd({points:r,fill:Yg(e,t),stroke:Qg(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 Gd({radius:i,fill:Yg(e,t),stroke:Qg(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 em="renderOrder",tm=class extends tu{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(em)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e){e.declutterTree||(e.declutterTree=new Zg(9)),this.getRenderer().renderDeclutter(e)}setRenderOrder(e){this.set(em,e)}setStyle(e){let t;if(void 0===e)t=cp;else if(null===e)t=null;else if("function"==typeof e)t=e;else if(e instanceof pp)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 pp?n:Kg(n)}t=r}else t=Kg(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:(Pl("function"==typeof e.getZIndex,41),n=[e]),t=function(){return n}}return t}(this.style_),this.changed()}},nm={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},rm=[nm.FILL],im=[nm.STROKE],om=[nm.BEGIN_PATH],sm=[nm.CLOSE_PATH],am=nm,lm=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){}},um=class extends lm{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],qu(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 h=this.tmpCoordinate_;let d,p,f,g=!0;for(d=t+r;d<n;d+=r)h[0]=e[d],h[1]=e[d+1],f=Uu(l,h),f!==p?(g&&(s[a++]=u,s[a++]=c,g=!1),s[a++]=h[0],s[a++]=h[1]):1===f?(s[a++]=h[0],s[a++]=h[1],g=!1):g=!0,u=h[0],c=h[1],p=f;return(i&&g||d===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,h;switch(i){case"MultiPolygon":a=e.getOrientedFlatCoordinates(),c=[];const t=e.getEndss();h=0;for(let e=0,n=t.length;e<n;++e){const n=[];h=this.drawCustomCoordinates_(a,h,t[e],o,n),c.push(n)}this.instructions.push([am.CUSTOM,s,c,e,n,Bp]),this.hitDetectionInstructions.push([am.CUSTOM,s,c,e,r||n,Bp]);break;case"Polygon":case"MultiLineString":u=[],a="Polygon"==i?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),h=this.drawCustomCoordinates_(a,0,e.getEnds(),o,u),this.instructions.push([am.CUSTOM,s,u,e,n,jp]),this.hitDetectionInstructions.push([am.CUSTOM,s,u,e,r||n,jp]);break;case"LineString":case"Circle":a=e.getFlatCoordinates(),l=this.appendFlatLineCoordinates(a,0,a.length,o,!1,!1),this.instructions.push([am.CUSTOM,s,l,e,n,Np]),this.hitDetectionInstructions.push([am.CUSTOM,s,l,e,r||n,Np]);break;case"MultiPoint":a=e.getFlatCoordinates(),l=this.appendFlatPointCoordinates(a,o),l>s&&(this.instructions.push([am.CUSTOM,s,l,e,n,Np]),this.hitDetectionInstructions.push([am.CUSTOM,s,l,e,r||n,Np]));break;case"Point":a=e.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),l=this.coordinates.length,this.instructions.push([am.CUSTOM,s,l,e,n]),this.hitDetectionInstructions.push([am.CUSTOM,s,l,e,r||n])}this.endGeometry(t)}beginGeometry(e,t){this.beginGeometryInstruction1_=[am.BEGIN_GEOMETRY,t,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[am.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==am.END_GEOMETRY?o=t:i==am.BEGIN_GEOMETRY&&(r[2]=t,tl(this.hitDetectionInstructions,o,t),o=-1)}setFillStrokeStyle(e,t){const n=this.state;if(e){const t=e.getColor();n.fillStyle=fd(t||xd)}else n.fillStyle=void 0;if(t){const e=t.getColor();n.strokeStyle=fd(e||Sd);const r=t.getLineCap();n.lineCap=void 0!==r?r:wd;const i=t.getLineDash();n.lineDash=i?i.slice():kd;const o=t.getLineDashOffset();n.lineDashOffset=o||0;const s=t.getLineJoin();n.lineJoin=void 0!==s?s:Cd;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=[am.SET_FILL_STYLE,t];return"string"!=typeof t&&n.push(!0),n}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[am.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&&!rl(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=[am.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Gu(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;Bu(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},cm=class extends um{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(om),this.hitDetectionInstructions.push(om);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=[am.MOVE_TO_LINE_TO,a,l];this.instructions.push(u),this.hitDetectionInstructions.push(u),s&&(this.instructions.push(sm),this.hitDetectionInstructions.push(sm)),t=o}return o&&(this.instructions.push(rm),this.hitDetectionInstructions.push(rm)),s&&(this.instructions.push(im),this.hitDetectionInstructions.push(im)),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([am.SET_FILL_STYLE,xd]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([am.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=[am.CIRCLE,a];this.instructions.push(om,l),this.hitDetectionInstructions.push(om,l),void 0!==n.fillStyle&&(this.instructions.push(rm),this.hitDetectionInstructions.push(rm)),void 0!==n.strokeStyle&&(this.instructions.push(im),this.hitDetectionInstructions.push(im)),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([am.SET_FILL_STYLE,xd]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([am.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([am.SET_FILL_STYLE,xd]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([am.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]=Fp(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 hm(e,t,n,r,i){let o,s,a,l,u,c,h,d,p,f,g=n,m=n,y=0,v=0,_=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!==h&&(v+=a,o=Math.acos((h*p+d*f)/(a*l)),o>e&&(v>y&&(y=v,g=_,m=s),v=0,_=s-i)),a=l,h=p,d=f),u=n,c=r}return v+=l,v>y?[_,s]:[g,m]}const dm={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},pm={Circle:cm,Default:um,Image:class extends um{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([am.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([am.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([am.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([am.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 um{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=[am.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([am.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,kd,0],om);const o=e.getFlatCoordinates(),s=e.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(im),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([am.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],om);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(im),this.endGeometry(t)}finish(){const e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(im),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(im),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(om)}},Polygon:cm,Text:class extends um{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!=Md&&(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 h=this.pixelRatio;this.instructions.push([am.DRAW_IMAGE,s,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==Md?Md:c.map((function(e){return e*h})),!!i.backgroundFill,!!i.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const d=1/h;this.hitDetectionInstructions.push([am.DRAW_IMAGE,s,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[d,d],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(!gc(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.textAlign;let c,h=0;for(let e=0,t=n.length;e<t;++e){if(null==r){const t=hm(i.maxAngle,l,h,n[e],u);h=t[0],c=t[1]}else c=n[e];for(let e=h;e<c;e+=u)o.push(l[e],l[e+1]);const t=o.length;h=n[e],this.drawChars_(s,t),s=t}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||Ad,justify:t.justify,textBaseline:t.textBaseline||Ed,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=dm[r.textBaseline],u=this.textOffsetY_*a,c=this.text_,h=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([am.DRAW_CHARS,e,t,l,r.overflow,s,r.maxAngle,a,u,i,h*a,c,o,1]),this.hitDetectionInstructions.push([am.DRAW_CHARS,e,t,l,r.overflow,s,r.maxAngle,1,u,i,h,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=fd(t.getColor()||xd)):(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()||wd,i.lineDash=e?e.slice():kd,i.lineDashOffset=void 0===t?0:t,i.lineJoin=o.getLineJoin()||Cd,i.lineWidth=void 0===n?1:n,i.miterLimit=void 0===r?10:r,i.strokeStyle=fd(o.getColor()||Sd)}else i=null,this.textStrokeState_=i;n=this.textState_;const s=e.getFont()||bd;Ld(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.justify=e.getJustify(),n.textBaseline=e.getTextBaseline()||Ed,n.backgroundFill=e.getBackgroundFill(),n.backgroundStroke=e.getBackgroundStroke(),n.padding=e.getPadding()||Md,n.scale=void 0===a?[1,1]:a;const l=e.getOffsetX(),u=e.getOffsetY(),c=e.getRotateWithView(),h=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===h?0:h,this.strokeKey_=i?("string"==typeof i.strokeStyle?i.strokeStyle:Cl(i.strokeStyle))+i.lineCap+i.lineDashOffset+"|"+i.lineWidth+i.lineJoin+i.miterLimit+"["+i.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+Cl(r.fillStyle):""}else this.text_="";this.declutterImageWithText_=t}}},fm=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,pm[t])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[t]=i),i}};function gm(e,t,n,r,i,o,s,a,l,u,c,h){let d=e[t],p=e[t+1],f=0,g=0,m=0,y=0;function v(){f=d,g=p,d=e[t+=r],p=e[t+1],y+=m,m=Math.sqrt((d-f)*(d-f)+(p-g)*(p-g))}do{v()}while(t<n-r&&y+m<o);let _=0===m?0:(o-y)/m;const b=Xl(f,d,_),x=Xl(g,p,_),w=t-r,k=y,C=o+a*l(u,i,c);for(;t<n-r&&y+m<C;)v();_=0===m?0:(C-y)/m;const S=Xl(f,d,_),A=Xl(g,p,_);let E;if(h){const e=[b,x,S,A];np(e,0,4,2,h,e,e),E=e[0]>e[2]}else E=b>S;const M=Math.PI,T=[],P=w+r===t;let R;if(m=0,y=k,d=e[t=w],p=e[t+1],P){v(),R=Math.atan2(p-g,d-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,h=(i=i.replace(/\n/g," ")).length;e<h;){v();let b=Math.atan2(p-g,d-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<h;++e){const s=a*l(u,i[E?h-e-1:e],c);if(t+r<n&&y+m<o+w+s/2)break;w+=s}if(e===x)continue;const k=E?i.substring(h-x,h-e):i.substring(x,e);_=0===m?0:(o+w/2-y)/m;const C=Xl(f,d,_),S=Xl(g,p,_);T.push([C,S,w/2,b,k]),o+=w}return T}const mm=[1/0,1/0,-1/0,-1/0],ym=[],vm=[],_m=[],bm=[];function xm(e){return e[3].declutterBox}const wm=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 km(e,t){return"start"!==t&&"end"!==t||wm.test(e)||(t="start"===t?"left":"right"),dm[t]}function Cm(e,t,n){return n>0&&e.push("\n",""),e.push(t,""),e}const Sm=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),h=a.justify?dm[a.justify]:km(Array.isArray(e)?e[0]:e,a.textAlign||Ad),d=r&&o.lineWidth?o.lineWidth:0,p=c?e:e.split("\n").reduce(Cm,[]),{width:f,height:g,widths:m,heights:y,lineWidths:v}=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 h=t[u];if("\n"===h||u===c){o=Math.max(o,s),i.push(s),s=0,a+=l;continue}const d=t[u+1]||e.font,p=Od(d,h);n.push(p),s+=p;const f=zd(d);r.push(f),l=Math.max(l,f)}return{width:o,height:a,widths:n,heights:r,lineWidths:i}}(a,p),_=f+d,b=[],x=(_+2)*u[0],w=(g+d)*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",d),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-h;let S=h*_+C*d;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=h*_+C*d,++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,y[R]);const o=[t,S+C*m[R]+h*(m[R]-v[I]),.5*(d+T)+P];S+=m[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,h,d,p,f,g){let m=n-(s*=h[0]),y=r-(a*=h[1]);const v=i+l>e?e-l:i,_=o+u>t?t-u:o,b=p[3]+v*h[0]+p[1],x=p[0]+_*h[1]+p[2],w=m-p[3],k=y-p[0];let C;return(f||0!==c)&&(ym[0]=w,bm[0]=w,ym[1]=k,vm[1]=k,vm[0]=w+b,_m[0]=vm[0],_m[1]=k+x,bm[1]=_m[1]),0!==c?(C=xu([1,0,0,1,0,0],n,r,1,1,c,-n,-r),_u(C,ym),_u(C,vm),_u(C,_m),_u(C,bm),Xu(Math.min(ym[0],vm[0],_m[0],bm[0]),Math.min(ym[1],vm[1],_m[1],bm[1]),Math.max(ym[0],vm[0],_m[0],bm[0]),Math.max(ym[1],vm[1],_m[1],bm[1]),mm)):Xu(Math.min(w,w+b),Math.min(k,k+x),Math.max(w,w+b),Math.max(k,k+x),mm),d&&(m=Math.round(m),y=Math.round(y)),{drawImageX:m,drawImageY:y,drawImageW:v,drawImageH:_,originX:l,originY:u,declutterBox:{minX:mm[0],minY:mm[1],maxX:mm[2],maxY:mm[3],value:g},canvasTransform:C,scale:h}}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,ym,vm,_m,bm,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=_u(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=km(Array.isArray(e)?e[0]:e,i.textAlign||Ad),u=dm[i.textBaseline||Ed],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_&&rl(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=tp(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 h=0;const d=r.length;let p,f,g,m,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},z=this.instructions!=r||this.overlaps?0:200;let F,O,D,N;for(;h<d;){const n=r[h];switch(n[0]){case am.BEGIN_GEOMETRY:F=n[1],N=n[3],F.getGeometry()?void 0===s||gc(s,N.getExtent())?++h:h=n[2]+1:h=n[2];break;case am.BEGIN_PATH:A>z&&(this.fill_(e),A=0),E>z&&(e.stroke(),E=0),A||E||(e.beginPath(),m=NaN,y=NaN),++h;break;case am.CIRCLE:S=n[1];const r=l[S],u=l[S+1],c=l[S+2]-r,d=l[S+3]-u,j=Math.sqrt(c*c+d*d);e.moveTo(r+j,u),e.arc(r,u,j,0,2*Math.PI,!0),++h;break;case am.CLOSE_PATH:e.closePath(),++h;break;case am.CUSTOM:S=n[1],p=n[2];const B=n[3],G=n[4],V=6==n.length?n[5]:void 0;L.geometry=B,L.feature=F,h in P||(P[h]=[]);const q=P[h];V?V(l,S,p,2,q):(q[0]=l[S],q[1]=l[S+1],q.length=2),G(q,L),++h;break;case am.DRAW_IMAGE:S=n[1],p=n[2],b=n[3],f=n[4],g=n[5];let W=n[6];const H=n[7],U=n[8],X=n[9],Z=n[10];let K=n[11];const Y=n[12];let Q=n[13];const J=n[14],$=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];g=(e.anchorY-r)*this.pixelRatio,n[5]=g,W=b.height,n[6]=W,Q=b.width,n[13]=Q}let ee,te,ne,re;n.length>25&&(ee=n[25]),n.length>17?(te=n[16],ne=n[17],re=n[18]):(te=Md,ne=!1,re=!1),Z&&I?K+=R:Z||I||(K-=R);let ie=0;for(;S<p;S+=2){if(ee&&ee[ie++]<Q/this.pixelRatio)continue;const n=this.calculateImageOrLabelDimensions_(b.width,b.height,l[S],l[S+1],Q,W,f,g,U,X,K,Y,i,te,ne||re,F),r=[e,t,b,n,H,ne?M:null,re?T:null];if(a){if("none"===J)continue;if("obstacle"===J){a.insert(n.declutterBox);continue}{let e,t;if($){const n=p-S;if(!$[n]){$[n]=r;continue}if(e=$[n],delete $[n],t=xm(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)}++h;break;case am.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],he=n[8];k=n[9];const de=n[10];x=n[11],w=n[12];const pe=[n[13],n[13]],fe=this.textStates[w],ge=fe.font,me=[fe.scale[0]*ce,fe.scale[1]*ce];let ye;ge in this.widths_?ye=this.widths_[ge]:(ye={},this.widths_[ge]=ye);const ve=Gp(l,oe,se,2),_e=Math.abs(me[0])*Dd(ge,x,ye);if(le||_e<=ve){const n=this.textStates[w].textAlign,r=gm(l,oe,se,2,x,(ve-_e)*dm[n],ue,Math.abs(me[0]),Dd,ge,ye,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]+(me[0]<0?-de:de),g=ae*l.height+2*(.5-ae)*de*me[1]/me[0]-he;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,u[0],u[1],l.width,l.height,f,g,0,0,u[3],pe,!1,Md,!1,F);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],g=ae*l.height-he;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,u[0],u[1],l.width,l.height,f,g,0,0,u[3],pe,!1,Md,!1,F);if(a&&a.collides(o.declutterBox))break e;n.push([e,t,l,o,1,null,null])}a&&a.load(n.map(xm));for(let e=0,t=n.length;e<t;++e)this.replayImageOrLabel_.apply(this,n[e])}}++h;break;case am.END_GEOMETRY:if(void 0!==o){F=n[1];const e=o(F,N);if(e)return e}++h;break;case am.FILL:z?A++:this.fill_(e),++h;break;case am.MOVE_TO_LINE_TO:for(S=n[1],p=n[2],O=l[S],D=l[S+1],v=O+.5|0,_=D+.5|0,v===m&&_===y||(e.moveTo(O,D),m=v,y=_),S+=2;S<p;S+=2)O=l[S],D=l[S+1],v=O+.5|0,_=D+.5|0,S!=p-2&&v===m&&_===y||(e.lineTo(O,D),m=v,y=_);++h;break;case am.SET_FILL_STYLE:M=n,this.alignFill_=n[2],A&&(this.fill_(e),A=0,E&&(e.stroke(),E=0)),e.fillStyle=n[1],++h;break;case am.SET_STROKE_STYLE:T=n,E&&(e.stroke(),E=0),this.setStrokeStyle_(e,n),++h;break;case am.STROKE:z?E++:e.stroke(),++h;break;default:++h}}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)}},Am=["Polygon","Circle","LineString","Image","Text","Default"],Em={},Mm=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 Sm(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=xu(this.hitDetectionTransform_,r+.5,r+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=Iu(s,s));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],$u(c,e),Bu(c,t*(this.renderBuffer_+r),c));const h=function(e){if(void 0!==Em[e])return Em[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 Em[e]=i,i}(r);let d;function p(e,t){const n=u.getImageData(0,0,s,s).data;for(let a=0,l=h.length;a<l;a++)if(n[h[a]]>0){if(!o||"Image"!==d&&"Text"!==d||o.includes(e)){const n=(h[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 g,m,y,v,_;for(f.sort($a),g=f.length-1;g>=0;--g){const e=f[g].toString();for(y=this.executorsByZIndex_[e],m=Am.length-1;m>=0;--m)if(d=Am[m],v=y[d],void 0!==v&&(_=v.executeHitDetection(u,a,n,p,c),_))return _}}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 tp(s,0,8,2,e,s),s}isEmpty(){return ll(this.executorsByZIndex_)}execute(e,t,n,r,i,o,s){const a=Object.keys(this.executorsByZIndex_).map(Number);let l,u,c,h,d,p;for(a.sort($a),this.maxExtent_&&(e.save(),this.clip(e,n)),o=o||Am,s&&a.reverse(),l=0,u=a.length;l<u;++l){const u=a[l].toString();for(d=this.executorsByZIndex_[u],c=0,h=o.length;c<h;++c)p=d[o[c]],void 0!==p&&p.execute(e,t,n,r,i,s)}this.maxExtent_&&e.restore()}},Tm=class extends lm{constructor(e,t,n,r,i,o,s){super(),this.context_=e,this.pixelRatio_=t,this.extent_=n,this.transform_=r,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=tp(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_;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_;xu(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=tp(e,t,n,r,this.transform_,this.pixelCoordinates_),o=this.context_;let s=this.textRotation_;for(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=tp(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(gc(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){const i=e.getStride();return tp(r,0,r.length,i,t,n)}return null}(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&&gc(this.extent_,n.getExtent())&&(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_)),gc(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(gc(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_)),gc(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_)),gc(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),rl(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:Ad;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:fd(t||xd)}}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||kd;this.strokeState_={lineCap:void 0!==n?n:wd,lineDash:1===this.pixelRatio_?l:l.map((e=>e*this.pixelRatio_)),lineDashOffset:(i||0)*this.pixelRatio_,lineJoin:void 0!==o?o:Cd,lineWidth:(void 0!==s?s:1)*this.pixelRatio_,miterLimit:void 0!==a?a:10,strokeStyle:fd(e||Sd)}}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:fd(e||xd)}}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:wd,lineDash:r||kd,lineDashOffset:i||0,lineJoin:void 0!==o?o:Cd,lineWidth:void 0!==s?s:1,miterLimit:void 0!==a?a:10,strokeStyle:fd(e||Sd)}}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(),h=e.getTextBaseline();this.textState_={font:void 0!==r?r:bd,textAlign:void 0!==c?c:Ad,textBaseline:void 0!==h?h:Ed},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_=""}},Pm=.5;function Rm(e,t,n,r,i,o,s){const a=Iu(e[0]*Pm,e[1]*Pm);a.imageSmoothingEnabled=!1;const l=a.canvas,u=new Tm(a,Pm,i,null,s),c=n.length,h=Math.floor(16777215/c),d={};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="#"+("000000"+(e*h).toString(16)).slice(-6);for(let e=0,n=a.length;e<n;++e){const n=a[e],r=n.getGeometryFunction()(t);if(!r||!gc(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=Iu(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 Kd({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 h=o.getZIndex()||0;let p=d[h];p||(p={},d[h]=p,p.Polygon=[],p.Circle=[],p.LineString=[],p.Point=[]),p[r.getType().replace("Multi","")].push(r,o)}}const p=Object.keys(d).map(Number).sort($a);for(let e=0,n=p.length;e<n;++e){const n=d[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 Im(e,t,n){const r=[];if(n){const i=Math.floor(Math.round(e[0])*Pm),o=Math.floor(Math.round(e[1])*Pm),s=4*(Vl(i,0,n.width-1)+Vl(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 Lm={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,Lm[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 zm(e,t){return parseInt(Cl(e),10)-parseInt(Cl(t),10)}function Fm(e,t){const n=Om(e,t);return n*n}function Om(e,t){return.5*e/t}function Dm(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()?Nm(e,a,n,t):(0,Lm[a.getType()])(e,a,n,t,o)}(e,t,n,r,o,s),a}function Nm(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)Nm(e,i[t],n,r)}}const jm=class extends xc{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(),h=t.pixelRatio,d=t.viewHints,p=!(d[0]||d[1]),f=this.compositionContext_,g=Math.round(t.size[0]*h),m=Math.round(t.size[1]*h),y=c.getWrapX()&&a.canWrapX(),v=y?fc(u):null,_=y?Math.ceil((r[2]-u[2])/v)+1:1;let b=y?Math.floor((r[0]-u[0])/v):0;do{const t=this.getRenderTransform(o,s,l,h,g,m,b*v);e.execute(f,1,t,l,p,void 0,n)}while(++b<_)}setupCompositionContext_(){if(1!==this.opacity_){const e=Iu(this.context.canvas.width,this.context.canvas.height,_c);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,Lu(this.compositionContext_),_c.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){vu(e,t,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),wu(this.inversePixelTransform,this.pixelTransform);const i=Cu(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 h=e.viewState;h.projection;this.opacity_=r.opacity,this.setupCompositionContext_();let d=!1,p=!0;if(r.extent&&this.clipping){const t=vh(r.extent);p=gc(t,e.extent),d=p&&!Wu(t,e.extent),d&&this.clipUnrotated(this.compositionContext_,e,t)}return p&&this.renderWorlds(a,e),d&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,e),this.renderedRotation_!==h.rotation&&(this.renderedRotation_=h.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(e){return new Promise(function(t){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const e=[this.context.canvas.width,this.context.canvas.height];_u(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]*Pm,u=e[1]*Pm;a.push(this.getRenderTransform(t,n,r,Pm,l,u,0).slice());const c=s.getSource(),h=i.getExtent();if(c.getWrapX()&&i.canWrapX()&&!Wu(h,o)){let e=o[0];const i=fc(h);let s,c=0;for(;e<h[0];)--c,s=i*c,a.push(this.getRenderTransform(t,n,r,Pm,l,u,s).slice()),e+=i;for(c=0,e=o[2];e>h[2];)++c,s=i*c,a.push(this.getRenderTransform(t,n,r,Pm,l,u,s).slice()),e-=i}this.hitDetectionImageData_=Rm(e,a,this.renderedFeatures_,s.getStyleFunction(),o,n,r)}t(Im(e,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}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=Cl(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 h=[this.replayGroup_];return this.declutterExecutorGroup&&h.push(this.declutterExecutorGroup),h.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,h=e.pixelRatio,d=t.getRevision(),p=t.getRenderBuffer();let f=t.getRenderOrder();void 0===f&&(f=zm);const g=l.center.slice(),m=Bu(a,p*c),y=m.slice(),v=[m.slice()],_=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Wu(_,e.extent)){const e=fc(_),t=Math.max(fc(m)/2,e);m[0]=_[0]-t,m[2]=_[2]+t,Yc(g,u);const n=vc(v[0],u);n[0]<_[0]&&n[2]<_[2]?v.push([n[0]+e,n[1],n[2]+e,n[3]]):n[0]>_[0]&&n[2]>_[2]&&v.push([n[0]-e,n[1],n[2]-e,n[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==f&&Wu(this.wrappedRenderedExtent_,m))return rl(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new fm(Om(c,h),m,c,h);let x;this.getLayer().getDeclutter()&&(x=new fm(Om(c,h),m,c,h));const w=fh();let k;if(w){for(let e=0,t=v.length;e<t;++e){const t=yh(v[e]);n.loadFeatures(t,_h(c),w)}k=ch(w,u)}else for(let e=0,t=v.length;e<t;++e)n.loadFeatures(v[e],c,u);const C=Fm(c,h);let S=!0;const A=function(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}}.bind(this),E=yh(m),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 Mm(m,c,h,n.getOverlaps(),T,t.getRenderBuffer());return x&&(this.declutterExecutorGroup=new Mm(m,c,h,n.getOverlaps(),x.finish(),t.getRenderBuffer())),this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=f,this.renderedExtent_=y,this.wrappedRenderedExtent_=m,this.renderedCenter_=g,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=Dm(r,e,n[a],t,this.boundHandleStyleImageChange_,i,o)||s;else s=Dm(r,e,n,t,this.boundHandleStyleImageChange_,i,o);return s}},Bm=class extends tm{constructor(e){super(e)}createRenderer(){return new jm(this)}},Gm=class{constructor(e){this.rbush_=new Zg(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_[Cl(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_[Cl(o)]=s}this.rbush_.load(n)}remove(e){const t=Cl(e),n=this.items_[t];return delete this.items_[t],null!==this.rbush_.remove(n)}update(e,t){const n=this.items_[Cl(t)];Qu([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 ll(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const t=this.rbush_.toJSON();return Xu(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]}},Vm="addfeature",qm="removefeature";function Wm(e,t){return[[-1/0,-1/0,1/0,1/0]]}function Hm(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=false,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 Um(e,t){return function(n,r,i,o,s){const a=this;Hm(e,t,n,r,i,(function(e,t){a.addFeatures(e),void 0!==o&&o(e)}),s||sl)}}class Xm extends Ya{constructor(e,t,n){super(e),this.feature=t,this.features=n}}const Zm=class extends qh{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_=sl,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_&&(Pl(this.format_,7),this.loader_=Um(this.url_,this.format_)),this.strategy_=void 0!==e.strategy?e.strategy:Wm;const t=void 0===e.useSpatialIndex||e.useSpatialIndex;let n,r;this.featuresRtree_=t?new Gm:null,this.loadedExtentsRtree_=new Gm,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 Sf(r)),void 0!==r&&this.addFeaturesInternal(r),void 0!==n&&this.bindFeaturesCollection_(n)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=Cl(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 Xm(Vm,e))}setupChangeEvents_(e,t){this.featureChangeKeys_[e]=[yl(t,cl,this.handleFeatureChange_,this),yl(t,Qa,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&&(Pl(!(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=Cl(r);this.addToIndex_(i,r)&&n.push(r)}for(let e=0,i=n.length;e<i;e++){const i=n[e],o=Cl(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(Vm))for(let e=0,t=n.length;e<t;e++)this.dispatchEvent(new Xm(Vm,n[e]))}bindFeaturesCollection_(e){let t=!1;this.addEventListener(Vm,(function(n){t||(t=!0,e.push(n.feature),t=!1)})),this.addEventListener(qm,(function(n){t||(t=!0,e.remove(n.feature),t=!1)})),e.addEventListener(xf,function(e){t||(t=!0,this.addFeature(e.element),t=!1)}.bind(this)),e.addEventListener(wf,function(e){t||(t=!0,this.removeFeature(e.element),t=!1)}.bind(this)),this.featuresCollection_=e}clear(e){if(e){for(const e in this.featureChangeKeys_)this.featureChangeKeys_[e].forEach(_l);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const e=function(e){this.removeFeatureInternal(e)}.bind(this);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 Xm("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){return n.getGeometry().intersectsCoordinate(e)?t(n):void 0}))}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(),ll(this.nullGeometryFeatures_)||nl(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]]];vc(e,t);const r=fc(n);if(fc(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||il,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=Cl(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 Xm("changefeature",t))}hasFeature(e){const t=e.getId();return void 0!==t?t in this.idIndex_:Cl(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&ll(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 Wu(e.extent,o)}));s||(++this.loadingExtentsCount_,this.dispatchEvent(new Xm("featuresloadstart")),this.loader_.call(this,o,t,n,function(e){--this.loadingExtentsCount_,this.dispatchEvent(new Xm("featuresloadend",void 0,e))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Xm("featuresloaderror"))}.bind(this)),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(Qu(t.extent,e))return n=t,!0})),n&&t.remove(n)}removeFeature(e){if(!e)return;const t=Cl(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=Cl(e),n=this.featureChangeKeys_[t];if(!n)return;n.forEach(_l),delete this.featureChangeKeys_[t];const r=e.getId();return void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[t],this.dispatchEvent(new Xm(qm,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){Pl(this.format_,7),this.url_=e,this.setLoader(Um(e,this.format_))}},Km={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Ym={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]},Qm=class extends zh{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,h=!(c[0]||c[1]);return!h&&u.wantedResolution||(u.wantedResolution=s),this.prepareTile(u,i,a)&&(h||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()?Cl(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(),h=l.getTileGridForProjection(n).getTileCoordExtent(e.wrappedTileCoord),d=l.getSourceTiles(t,n,e),p=Cl(r);delete e.hitDetectionImageData[p],e.executorGroups[p]=[],u&&(e.declutterExecutorGroups[p]=[]),a.dirty=!1;for(let n=0,i=d.length;n<i;++n){const i=d[n];if(2!=i.getState())continue;const f=i.tileCoord,g=c.getTileCoordExtent(f),m=hc(h,g),y=Bu(m,r.getRenderBuffer()*s,this.tmpExtent),v=Qu(g,m)?null:y,_=new fm(0,y,s,t),b=u?new fm(0,m,s,t):void 0,x=Fm(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,_,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];v&&!gc(v,t.getGeometry().getExtent())||w.call(this,t)}const C=_.finish(),S="vector"!==r.getRenderMode()&&u&&1===d.length?null:m,A=new Mm(S,s,t,l.getOverlaps(),C,r.getRenderBuffer());if(e.executorGroups[p].push(A),b){const n=new Mm(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=ju([e]);Bu(u,o*n,u);const c={},h=function(e,t,n){let o=e.getId();void 0===o&&(o=Cl(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})}},d=this.renderedTiles;let p;for(let r=0,i=d.length;!p&&r<i;++r){const i=d[r];if(!gc(l.getTileCoordExtent(i.wrappedTileCoord),u))continue;const c=Cl(a),f=[i.executorGroups[c]],g=i.declutterExecutorGroups[c];g&&f.push(g),f.some((r=>{const i=r===g?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,h,i),p)return!0}}))}return p}getFeatures(e){return new Promise(function(t,n){const r=this.getLayer(),i=Cl(r),o=r.getSource(),s=this.renderedProjection,a=s.getExtent(),l=this.renderedResolution,u=o.getTileGridForProjection(s),c=_u(this.renderedPixelToCoordinateTransform_,e.slice()),h=u.getTileCoordForCoordAndResolution(c,l);let d;for(let e=0,t=this.renderedTiles.length;e<t;++e)if(h.toString()===this.renderedTiles[e].tileCoord.toString()){if(d=this.renderedTiles[e],2===d.getState()){const e=u.getTileCoordExtent(d.tileCoord);o.getWrapX()&&s.canWrapX()&&!Wu(a,e)&&Yc(c,s);break}d=void 0}if(!d||d.loadingSourceTiles>0)return void t([]);const p=dc(u.getTileCoordExtent(d.wrappedTileCoord)),f=[(c[0]-p[0])/l,(p[1]-c[1])/l],g=d.getSourceTiles().reduce((function(e,t){return e.concat(t.getFeatures())}),[]);let m=d.hitDetectionImageData[i];if(!m&&!this.animatingOrInteracting_){const e=Lh(u.getTileSize(u.getZForResolution(l,o.zDirection))),t=this.renderedRotation_;m=Rm(e,[this.getRenderTransform(u.getTileCoordCenter(d.wrappedTileCoord),l,0,Pm,e[0]*Pm,e[1]*Pm,0)],g,r.getStyleFunction(),u.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(r).renderedResolution,t),d.hitDetectionImageData[i]=m}t(Im(f,g,m))}.bind(this))}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[Cl(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),h=e.tileCoord,d=c.getTileCoordExtent(e.wrappedTileCoord),p=c.getTileCoordExtent(h,this.tmpExtent)[0]-d[0];return yu(bu(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=Ym[o],l=t.viewState,u=l.rotation,c=i.getSource(),h=c.getTileGridForProjection(l.projection).getZForResolution(l.resolution,c.zDirection),d=this.renderedTiles,p=[],f=[];let g=!0;for(let n=d.length-1;n>=0;--n){const o=d[n];g=g&&!o.getReplayState(i).dirty;const s=o.executorGroups[Cl(i)].filter((e=>e.hasExecutors(a)));if(0===s.length)continue;const l=this.getTileRenderTransform(o,t),c=o.tileCoord[0];let m=!1;const y=s[0].getClipCoords(l);if(y){for(let t=0,n=p.length;t<n;++t)if(h!==c&&c<f[t]){const n=p[t];gc([y[0],y[3],y[4],y[7]],[n[0],n[3],n[4],n[7]])&&(m||(e.save(),m=!0),e.beginPath(),e.moveTo(y[0],y[1]),e.lineTo(y[2],y[3]),e.lineTo(y[4],y[5]),e.lineTo(y[6],y[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(y),f.push(c)}for(let t=0,n=s.length;t<n;++t)s[t].execute(e,1,l,u,r,a);m&&e.restore()}e.globalAlpha=s,this.ready=g,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=Dm(r,e,n[s],t,this.boundHandleStyleImageChange_,void 0,i)||o;else o=Dm(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[Cl(n)];r.renderedTileRevision=i;const s=e.wrappedTileCoord,a=s[0],l=n.getSource();let u=t.pixelRatio;const c=t.viewState.projection,h=l.getTileGridForProjection(c),d=h.getResolution(e.tileCoord[0]),p=t.pixelRatio/e.wantedResolution*d,f=h.getResolution(a),g=e.getContext(n);u=Math.round(Math.max(u,p/u));const m=l.getTilePixelSize(a,u,c);g.canvas.width=m[0],g.canvas.height=m[1];const y=u/p;if(1!==y){const e=mu(this.tmpTransform_);bu(e,y,y),g.setTransform.apply(g,e)}const v=h.getTileCoordExtent(s,this.tmpExtent),_=p/f,b=mu(this.tmpTransform_);bu(b,_,-_),function(e,t,n){yu(e,vu(gu,1,0,0,1,t,n))}(b,-v[0],-v[3]);for(let e=0,t=o.length;e<t;++e)o[e].execute(g,y,b,0,!0,Km[n.getRenderMode()]);r.renderedTileResolution=e.wantedResolution}},Jm=class extends tm{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";Pl("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 Qm(this)}getFeatures(e){return super.getFeatures(e)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(nu)}getUseInterimTilesOnError(){return this.get(ru)}setPreload(e){this.set(nu,e)}setUseInterimTilesOnError(e){this.set(ru,e)}},$m=class extends Ac{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}},ey=[],ty=class extends Ac{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=Cl(e);return t in this.context_||(this.context_[t]=Iu(1,1,ey)),this.context_[t]}hasContext(e){return Cl(e)in this.context_}getImage(e){return this.hasContext(e)?this.getContext(e).canvas:null}getReplayState(e){const t=Cl(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];Lu(t),ey.push(t.canvas),delete this.context_[e]}super.release()}},ny=class extends ld{constructor(e){const t=e.projection||"EPSG:3857",n=e.extent||nd(t),r=e.tileGrid||ed({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:ry,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 Gh(this.tileCache.highWaterMark),this.overlaps_=null==e.overlaps||e.overlaps,this.tileClass=e.tileClass?e.tileClass:$m,this.tileGrids_={}}getFeaturesInExtent(e){const t=[],n=this.tileCache;if(0===n.getCount())return t;const r=Bh(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(gc(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();gc(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 Nh(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);Bu(o,-a,o);const l=this.tileGrid,u=l.getExtent();u&&hc(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(cl,e),0===n.loadingSourceTiles&&n.setState(ll(n.errorTileKeys)?2:3)}};o.addEventListener(cl,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=Nh(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(),h=this.getTileGridForProjection(i);if(u&&c){const t=h.getTileCoordExtent(u);Bu(t,-h.getResolution(e),t),gc(c,t)||(u=null)}let d=!0;if(null!==u){const t=this.tileGrid,n=h.getResolution(e),o=t.getZForResolution(n,1),s=h.getTileCoordExtent(u);Bu(s,-n,s),t.forEachTileCoord(s,o,function(e){d=d&&!this.tileUrlFunction(e,r,i)}.bind(this))}const p=new ty(l,d?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=43;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 Jh({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=Lh(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 ry(e,t){e.setLoader((function(n,r,i){Hm(t,e.getFormat(),n,r,i,e.onLoad.bind(e),e.onError.bind(e))}))}var iy,oy={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 sy(e){return(e=Math.round(e))<0?0:e>255?255:e}function ay(e){return e<0?0:e>1?1:e}function ly(e){return"%"===e[e.length-1]?sy(parseFloat(e)/100*255):sy(parseInt(e))}function uy(e){return"%"===e[e.length-1]?ay(parseFloat(e)/100):ay(parseFloat(e))}function cy(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{iy={}.parseCSSColor=function(e){var t,n=e.replace(/ /g,"").toLowerCase();if(n in oy)return oy[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=uy(s.pop());case"rgb":return 3!==s.length?null:[ly(s[0]),ly(s[1]),ly(s[2]),a];case"hsla":if(4!==s.length)return null;a=uy(s.pop());case"hsl":if(3!==s.length)return null;var l=(parseFloat(s[0])%360+360)%360/360,u=uy(s[1]),c=uy(s[2]),h=c<=.5?c*(u+1):c+u-c*u,d=2*c-h;return[sy(255*cy(d,h,l+1/3)),sy(255*cy(d,h,l)),sy(255*cy(d,h,l-1/3)),a];default:return null}}return null}}catch(e){}var hy=function(e,t,n,r){void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r};function dy(e){return"object"==typeof e?["literal",e]:e}function py(e){switch(e.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function fy(e,t){var n,r,i=dy((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 gy(e,t,n){var r=vy(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(fy(e,t)),o}if("categorical"===r){for(var u=["match",i],c=0,h=n;c<h.length;c+=1){var d=h[c];yy(u,d[0],d[1],!1)}return u.push(fy(e,t)),u}if("interval"===r){for(var p=["step",["number",i]],f=0,g=n;f<g.length;f+=1){var m=g[f];yy(p,m[0],m[1],!0)}return my(p),void 0===e.default?p:["case",["==",["typeof",i],"number"],p,dy(e.default)]}if("exponential"===r){for(var y=void 0!==e.base?e.base:1,v=[py(e),1===y?["linear"]:["exponential",y],["number",i]],_=0,b=n;_<b.length;_+=1){var x=b[_];yy(v,x[0],x[1],!1)}return void 0===e.default?v:["case",["==",["typeof",i],"number"],v,dy(e.default)]}throw new Error("Unknown property function type "+r)}function my(e){"step"===e[0]&&3===e.length&&(e.push(0),e.push(e[3]))}function yy(e,t,n,r){e.length>3&&t===e[e.length-2]||(r&&2===e.length||e.push(t),e.push(n))}function vy(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function _y(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}hy.parse=function(e){if(e){if(e instanceof hy)return e;if("string"==typeof e){var t=iy(e);if(t)return new hy(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},hy.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+")"},hy.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]},hy.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]},hy.prototype.toArray01PremultipliedAlpha=function(){var e=this;return[e.r,e.g,e.b,e.a]},hy.black=new hy(0,0,0,1),hy.white=new hy(1,1,1,1),hy.transparent=new hy(0,0,0,0),hy.red=new hy(1,0,0,1),hy.blue=new hy(0,0,1,1);var by=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),xy=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}};xy.prototype.concat=function(e){return new xy(this,e)},xy.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.")},xy.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var wy={kind:"null"},ky={kind:"number"},Cy={kind:"string"},Sy={kind:"boolean"},Ay={kind:"color"},Ey={kind:"object"},My={kind:"value"},Ty={kind:"collator"},Py={kind:"formatted"},Ry={kind:"resolvedImage"};function Iy(e,t){return{kind:"array",itemType:e,N:t}}function Ly(e){if("array"===e.kind){var t=Ly(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var zy=[wy,ky,Cy,Sy,Ay,Py,Ey,Iy(My),Ry];function Fy(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Fy(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=zy;n<r.length;n+=1)if(!Fy(r[n],t))return null}return"Expected "+Ly(e)+" but found "+Ly(t)+" instead."}function Oy(e,t){return t.some((function(t){return t.kind===e.kind}))}function Dy(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 Ny=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"})};Ny.prototype.compare=function(e,t){return this.collator.compare(e,t)},Ny.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var jy=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},By=function(e){this.sections=e};By.fromString=function(e){return new By([new jy(e,null,null,null,null)])},By.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}))},By.factory=function(e){return e instanceof By?e:By.fromString(e)},By.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},By.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 Gy=function(e){this.name=e.name,this.available=e.available};function Vy(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 qy(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 hy)return!0;if(e instanceof Ny)return!0;if(e instanceof By)return!0;if(e instanceof Gy)return!0;if(Array.isArray(e)){for(var t=0,n=e;t<n.length;t+=1)if(!qy(n[t]))return!1;return!0}if("object"==typeof e){for(var r in e)if(!qy(e[r]))return!1;return!0}return!1}function Wy(e){if(null===e)return wy;if("string"==typeof e)return Cy;if("boolean"==typeof e)return Sy;if("number"==typeof e)return ky;if(e instanceof hy)return Ay;if(e instanceof Ny)return Ty;if(e instanceof By)return Py;if(e instanceof Gy)return Ry;if(Array.isArray(e)){for(var t,n=e.length,r=0,i=e;r<i.length;r+=1){var o=Wy(i[r]);if(t){if(t===o)continue;t=My;break}t=o}return Iy(t||My,n)}return Ey}function Hy(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof hy||e instanceof By||e instanceof Gy?e.toString():JSON.stringify(e)}Gy.prototype.toString=function(){return this.name},Gy.fromString=function(e){return e?new Gy({name:e,available:!1}):null},Gy.prototype.serialize=function(){return["image",this.name]};var Uy=function(e,t){this.type=e,this.value=t};Uy.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!qy(e[1]))return t.error("invalid value");var n=e[1],r=Wy(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 Uy(r,n)},Uy.prototype.evaluate=function(){return this.value},Uy.prototype.eachChild=function(){},Uy.prototype.outputDefined=function(){return!0},Uy.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof hy?["rgba"].concat(this.value.toArray()):this.value instanceof By?this.value.serialize():this.value};var Xy=function(e){this.name="ExpressionEvaluationError",this.message=e};Xy.prototype.toJSON=function(){return this.message};var Zy={string:Cy,number:ky,boolean:Sy,object:Ey},Ky=function(e,t){this.type=e,this.args=t};Ky.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 Zy)||"object"===a)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Zy[a],r++}else o=My;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=Iy(o,s)}else n=Zy[i];for(var l=[];r<e.length;r++){var u=t.parse(e[r],r,My);if(!u)return null;l.push(u)}return new Ky(n,l)},Ky.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var n=this.args[t].evaluate(e);if(!Fy(this.type,Wy(n)))return n;if(t===this.args.length-1)throw new Xy("Expected value to be of type "+Ly(this.type)+", but found "+Ly(Wy(n))+" instead.")}return null},Ky.prototype.eachChild=function(e){this.args.forEach(e)},Ky.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},Ky.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 Yy=function(e){this.type=Py,this.sections=e};Yy.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,ky)))return null;var l=null;if(s["text-font"]&&!(l=t.parse(s["text-font"],1,Iy(Cy))))return null;var u=null;if(s["text-color"]&&!(u=t.parse(s["text-color"],1,Ay)))return null;var c=r[r.length-1];c.scale=a,c.font=l,c.textColor=u}else{var h=t.parse(e[o],1,My);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:h,scale:null,font:null,textColor:null})}}return new Yy(r)},Yy.prototype.evaluate=function(e){return new By(this.sections.map((function(t){var n=t.content.evaluate(e);return Wy(n)===Ry?new jy("",n,null,null,null):new jy(Hy(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},Yy.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)}},Yy.prototype.outputDefined=function(){return!1},Yy.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 Qy=function(e){this.type=Ry,this.input=e};Qy.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,Cy);return n?new Qy(n):t.error("No image name provided.")},Qy.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=Gy.fromString(t);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(t)>-1),n},Qy.prototype.eachChild=function(e){e(this.input)},Qy.prototype.outputDefined=function(){return!1},Qy.prototype.serialize=function(){return["image",this.input.serialize()]};var Jy={"to-boolean":Sy,"to-color":Ay,"to-number":ky,"to-string":Cy},$y=function(e,t){this.type=e,this.args=t};$y.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=Jy[n],i=[],o=1;o<e.length;o++){var s=t.parse(e[o],o,My);if(!s)return null;i.push(s)}return new $y(r,i)},$y.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 hy)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.":Vy(t[0],t[1],t[2],t[3])))return new hy(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Xy(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 Xy("Could not convert "+JSON.stringify(s)+" to number.")}return"formatted"===this.type.kind?By.fromString(Hy(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?Gy.fromString(Hy(this.args[0].evaluate(e))):Hy(this.args[0].evaluate(e))},$y.prototype.eachChild=function(e){this.args.forEach(e)},$y.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},$y.prototype.serialize=function(){if("formatted"===this.type.kind)return new Yy([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Qy(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var ev=["Unknown","Point","LineString","Polygon"],tv=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};tv.prototype.id=function(){return this.feature&&void 0!==this.feature.id?this.feature.id:null},tv.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?ev[this.feature.type]:this.feature.type:null},tv.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},tv.prototype.canonicalID=function(){return this.canonical},tv.prototype.properties=function(){return this.feature&&this.feature.properties||{}},tv.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},tv.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=hy.parse(e)),t};var nv=function(e,t,n,r){this.name=e,this.type=t,this._evaluate=n,this.args=r};nv.prototype.evaluate=function(e){return this._evaluate(e,this.args)},nv.prototype.eachChild=function(e){this.args.forEach(e)},nv.prototype.outputDefined=function(){return!1},nv.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},nv.parse=function(e,t){var n,r=e[0],i=nv.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 h=c[u],d=h[0],p=h[1];l=new Av(t.registry,t.path,null,t.scope);for(var f=[],g=!1,m=1;m<e.length;m++){var y=e[m],v=Array.isArray(d)?d[m-1]:d.type,_=l.parse(y,1+f.length,v);if(!_){g=!0;break}f.push(_)}if(!g)if(Array.isArray(d)&&d.length!==f.length)l.error("Expected "+d.length+" arguments, but found "+f.length+" instead.");else{for(var b=0;b<f.length;b++){var x=Array.isArray(d)?d[b]:d.type,w=f[b];l.concat(b+1).checkSubtype(x,w.type)}if(0===l.errors.length)return new nv(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(Ly).join(", ")+")":"("+Ly(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(Ly(A.type))}t.error("Expected arguments of type "+k+", but found ("+C.join(", ")+") instead.")}return null},nv.register=function(e,t){for(var n in nv.definitions=t,t)e[n]=nv};var rv=function(e,t,n){this.type=Ty,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=t};rv.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,Sy);if(!r)return null;var i=t.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,Sy);if(!i)return null;var o=null;return n.locale&&!(o=t.parse(n.locale,1,Cy))?null:new rv(r,i,o)},rv.prototype.evaluate=function(e){return new Ny(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},rv.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},rv.prototype.outputDefined=function(){return!1},rv.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 iv=8192;function ov(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 sv(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function av(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*iv),Math.round(i*o*iv)]}function lv(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 uv(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 cv(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(lv(e,o[s],o[s+1]))return!1;uv(e,o[s],o[s+1])&&(n=!n)}return n}function hv(e,t){for(var n=0;n<t.length;n++)if(cv(e,t[n]))return!0;return!1}function dv(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,h=s*u-l*a;return c>0&&h<0||c<0&&h>0}function pv(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],h=void 0,d=void 0,p=void 0,p=[l[0]-a[0],l[1]-a[1]],0!=(h=[c[0]-u[0],c[1]-u[1]])[0]*(d=p)[1]-h[1]*d[0]&&dv(a,l,u,c)&&dv(u,c,a,l))return!0;var a,l,u,c,h,d,p;return!1}function fv(e,t){for(var n=0;n<e.length;++n)if(!cv(e[n],t))return!1;for(var r=0;r<e.length-1;++r)if(pv(e[r],e[r+1],t))return!1;return!0}function gv(e,t){for(var n=0;n<t.length;n++)if(fv(e,t[n]))return!0;return!1}function mv(e,t,n){for(var r=[],i=0;i<e.length;i++){for(var o=[],s=0;s<e[i].length;s++){var a=av(e[i][s],n);ov(t,a),o.push(a)}r.push(o)}return r}function yv(e,t,n){for(var r=[],i=0;i<e.length;i++){var o=mv(e[i],t,n);r.push(o)}return r}function vv(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}ov(t,e)}function _v(e,t,n,r){var i=Math.pow(2,r.z)*iv,o=[r.x*iv,r.y*iv],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 h=c[u],d=[h.x+o[0],h.y+o[1]];vv(d,t,n,i),s.push(d)}return s}function bv(e,t,n,r){var i,o=Math.pow(2,r.z)*iv,s=[r.x*iv,r.y*iv],a=[];if(!e)return a;for(var l=0,u=e;l<u.length;l+=1){for(var c=[],h=0,d=u[l];h<d.length;h+=1){var p=d[h],f=[p.x+s[0],p.y+s[1]];ov(t,f),c.push(f)}a.push(c)}if(t[2]-t[0]<=o/2){(i=t)[0]=i[1]=1/0,i[2]=i[3]=-1/0;for(var g=0,m=a;g<m.length;g+=1)for(var y=0,v=m[g];y<v.length;y+=1)vv(v[y],t,n,o)}return a}var xv=function(e,t){this.type=Sy,this.geojson=e,this.geometries=t};function wv(e){if(e instanceof nv){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 xv)return!1;var t=!0;return e.eachChild((function(e){t&&!wv(e)&&(t=!1)})),t}function kv(e){if(e instanceof nv&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!kv(e)&&(t=!1)})),t}function Cv(e,t){if(e instanceof nv&&t.indexOf(e.name)>=0)return!1;var n=!0;return e.eachChild((function(e){n&&!Cv(e,t)&&(n=!1)})),n}xv.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(qy(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 xv(n,n.features[r].geometry)}else if("Feature"===n.type){var o=n.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new xv(n,n.geometry)}else if("Polygon"===n.type||"MultiPolygon"===n.type)return new xv(n,n)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},xv.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=mv(t.coordinates,r,i),s=_v(e.geometry(),n,r,i);if(!sv(n,r))return!1;for(var a=0,l=s;a<l.length;a+=1)if(!cv(l[a],o))return!1}if("MultiPolygon"===t.type){var u=yv(t.coordinates,r,i),c=_v(e.geometry(),n,r,i);if(!sv(n,r))return!1;for(var h=0,d=c;h<d.length;h+=1)if(!hv(d[h],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=mv(t.coordinates,r,i),s=bv(e.geometry(),n,r,i);if(!sv(n,r))return!1;for(var a=0,l=s;a<l.length;a+=1)if(!fv(l[a],o))return!1}if("MultiPolygon"===t.type){var u=yv(t.coordinates,r,i),c=bv(e.geometry(),n,r,i);if(!sv(n,r))return!1;for(var h=0,d=c;h<d.length;h+=1)if(!gv(d[h],u))return!1}return!0}(e,this.geometries)}return!1},xv.prototype.eachChild=function(){},xv.prototype.outputDefined=function(){return!0},xv.prototype.serialize=function(){return["within",this.geojson]};var Sv=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};Sv.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 Sv(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)},Sv.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},Sv.prototype.eachChild=function(){},Sv.prototype.outputDefined=function(){return!1},Sv.prototype.serialize=function(){return["var",this.name]};var Av=function(e,t,n,r,i){void 0===t&&(t=[]),void 0===r&&(r=new xy),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};function Ev(e){if(e instanceof Sv)return Ev(e.boundExpression);if(e instanceof nv&&"error"===e.name)return!1;if(e instanceof rv)return!1;if(e instanceof xv)return!1;var t=e instanceof $y||e instanceof Ky,n=!0;return e.eachChild((function(e){n=t?n&&Ev(e):n&&e instanceof Uy})),!!n&&wv(e)&&Cv(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Mv(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 Xy("Input is not a number.");s=a-1}return 0}Av.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)},Av.prototype._parse=function(e,t){function n(e,t,n){return"assert"===n?new Ky(t,[e]):"coerce"===n?new $y(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 Uy)&&"resolvedImage"!==o.type.kind&&Ev(o)){var l=new tv;try{o=new Uy(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.")},Av.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 Av(this.registry,r,t||null,i,this.errors)},Av.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 by(r,e))},Av.prototype.checkSubtype=function(e,t){var n=Fy(e,t);return n&&this.error(n),n};var Tv=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)}};Tv.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,ky);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 Tv(i,n,r)},Tv.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[Mv(t,r)].evaluate(e)},Tv.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1)e(n[t])},Tv.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},Tv.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 Pv=Rv;function Rv(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 Iv(e,t,n){return e*(1-n)+t*n}Rv.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},Rv.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},Rv.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},Rv.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},Rv.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var Lv=Object.freeze({__proto__:null,number:Iv,color:function(e,t,n){return new hy(Iv(e.r,t.r,n),Iv(e.g,t.g,n),Iv(e.b,t.b,n),Iv(e.a,t.a,n))},array:function(e,t,n){return e.map((function(e,r){return Iv(e,t[r],n)}))}}),zv=.95047,Fv=1.08883,Ov=4/29,Dv=6/29,Nv=3*Dv*Dv,jv=Math.PI/180,Bv=180/Math.PI;function Gv(e){return e>.008856451679035631?Math.pow(e,1/3):e/Nv+Ov}function Vv(e){return e>Dv?e*e*e:Nv*(e-Ov)}function qv(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Wv(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hv(e){var t=Wv(e.r),n=Wv(e.g),r=Wv(e.b),i=Gv((.4124564*t+.3575761*n+.1804375*r)/zv),o=Gv((.2126729*t+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Gv((.0193339*t+.119192*n+.9503041*r)/Fv)),alpha:e.a}}function Uv(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*Vv(t),n=zv*Vv(n),r=Fv*Vv(r),new hy(qv(3.2404542*n-1.5371385*t-.4985314*r),qv(-.969266*n+1.8760108*t+.041556*r),qv(.0556434*n-.2040259*t+1.0572252*r),e.alpha)}function Xv(e,t,n){var r=t-e;return e+n*(r>180||r<-180?r-360*Math.round(r/360):r)}var Zv={forward:Hv,reverse:Uv,interpolate:function(e,t,n){return{l:Iv(e.l,t.l,n),a:Iv(e.a,t.a,n),b:Iv(e.b,t.b,n),alpha:Iv(e.alpha,t.alpha,n)}}},Kv=function(e){var t=Hv(e),n=t.l,r=t.a,i=t.b,o=Math.atan2(i,r)*Bv;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:e.a}},Yv=function(e){var t=e.h*jv,n=e.c;return Uv({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})},Qv=function(e,t,n){return{h:Xv(e.h,t.h,n),c:Iv(e.c,t.c,n),l:Iv(e.l,t.l,n),alpha:Iv(e.alpha,t.alpha,n)}},Jv=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 $v(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)}Jv.interpolationFactor=function(e,t,n,r){var i=0;if("exponential"===e.name)i=$v(t,e.base,n,r);else if("linear"===e.name)i=$v(t,1,n,r);else if("cubic-bezier"===e.name){var o=e.controlPoints;i=new Pv(o[0],o[1],o[2],o[3]).solve($v(t,1,n,r))}return i},Jv.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,ky)))return null;var l=[],u=null;"interpolate-hcl"===n||"interpolate-lab"===n?u=Ay:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c<o.length;c+=2){var h=o[c],d=o[c+1],p=c+3,f=c+4;if("number"!=typeof h)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]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var g=t.parse(d,f,u);if(!g)return null;u=u||g.type,l.push([h,g])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Jv(u,n,r,i,l):t.error("Type "+Ly(u)+" is not interpolatable.")},Jv.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=Mv(t,r),s=t[o],a=t[o+1],l=Jv.interpolationFactor(this.interpolation,r,s,a),u=n[o].evaluate(e),c=n[o+1].evaluate(e);return"interpolate"===this.operator?Lv[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?Yv(Qv(Kv(u),Kv(c),l)):Zv.reverse(Zv.interpolate(Zv.forward(u),Zv.forward(c),l))},Jv.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1)e(n[t])},Jv.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},Jv.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 e_=function(e,t){this.type=e,this.args=t};e_.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 Fy(r,e.type)}));return new e_(u?My:n,i)},e_.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 Gy&&!n.available&&(t||(t=n),n=null,r===this.args.length))return t;if(null!==n)break}return n},e_.prototype.eachChild=function(e){this.args.forEach(e)},e_.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},e_.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var t_=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};t_.prototype.evaluate=function(e){return this.result.evaluate(e)},t_.prototype.eachChild=function(e){for(var t=0,n=this.bindings;t<n.length;t+=1)e(n[t][1]);e(this.result)},t_.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 t_(n,s):null},t_.prototype.outputDefined=function(){return this.result.outputDefined()},t_.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 n_=function(e,t,n){this.type=e,this.index=t,this.input=n};n_.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,ky),r=t.parse(e[2],2,Iy(t.expectedType||My));if(!n||!r)return null;var i=r.type;return new n_(i.itemType,n,r)},n_.prototype.evaluate=function(e){var t=this.index.evaluate(e),n=this.input.evaluate(e);if(t<0)throw new Xy("Array index out of bounds: "+t+" < 0.");if(t>=n.length)throw new Xy("Array index out of bounds: "+t+" > "+(n.length-1)+".");if(t!==Math.floor(t))throw new Xy("Array index must be an integer, but found "+t+" instead.");return n[t]},n_.prototype.eachChild=function(e){e(this.index),e(this.input)},n_.prototype.outputDefined=function(){return!1},n_.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var r_=function(e,t){this.type=Sy,this.needle=e,this.haystack=t};r_.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,My),r=t.parse(e[2],2,My);return n&&r?Oy(n.type,[Sy,Cy,ky,wy,My])?new r_(n,r):t.error("Expected first argument to be of type boolean, string, number or null, but found "+Ly(n.type)+" instead"):null},r_.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(null==n)return!1;if(!Dy(t,["boolean","string","number","null"]))throw new Xy("Expected first argument to be of type boolean, string, number or null, but found "+Ly(Wy(t))+" instead.");if(!Dy(n,["string","array"]))throw new Xy("Expected second argument to be of type array or string, but found "+Ly(Wy(n))+" instead.");return n.indexOf(t)>=0},r_.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},r_.prototype.outputDefined=function(){return!0},r_.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var i_=function(e,t,n){this.type=ky,this.needle=e,this.haystack=t,this.fromIndex=n};i_.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,My),r=t.parse(e[2],2,My);if(!n||!r)return null;if(!Oy(n.type,[Sy,Cy,ky,wy,My]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+Ly(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,ky);return i?new i_(n,r,i):null}return new i_(n,r)},i_.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Dy(t,["boolean","string","number","null"]))throw new Xy("Expected first argument to be of type boolean, string, number or null, but found "+Ly(Wy(t))+" instead.");if(!Dy(n,["string","array"]))throw new Xy("Expected second argument to be of type array or string, but found "+Ly(Wy(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)},i_.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},i_.prototype.outputDefined=function(){return!1},i_.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 o_=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};o_.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,h=a;c<h.length;c+=1){var d=h[c];if("number"!=typeof d&&"string"!=typeof d)return u.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,Wy(d)))return null}else n=Wy(d);if(void 0!==i[String(d)])return u.error("Branch labels must be unique.");i[String(d)]=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,My);if(!f)return null;var g=t.parse(e[e.length-1],e.length-1,r);return g?"value"!==f.type.kind&&t.concat(1).checkSubtype(n,f.type)?null:new o_(n,r,f,i,o,g):null},o_.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Wy(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},o_.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},o_.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},o_.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===(h=r[this.cases[s]])?(r[this.cases[s]]=n.length,n.push([this.cases[s],[s]])):n[h][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],h=c[0],d=c[1];1===d.length?t.push(a(d[0])):t.push(d.map(a)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var s_=function(e,t,n){this.type=e,this.branches=t,this.otherwise=n};s_.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,Sy);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 s_(n,r,a):null},s_.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)},s_.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)},s_.prototype.outputDefined=function(){return this.branches.every((function(e){return e[0],e[1].outputDefined()}))&&this.otherwise.outputDefined()},s_.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var a_=function(e,t,n,r){this.type=e,this.input=t,this.beginIndex=n,this.endIndex=r};function l_(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 u_(e,t,n,r){return 0===r.compare(t,n)}function c_(e,t,n){var r="=="!==e&&"!="!==e;return function(){function i(e,t,n){this.type=Sy,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,My);if(!o)return null;if(!l_(n,o.type))return t.concat(1).error('"'+n+"\" comparisons are not supported for type '"+Ly(o.type)+"'.");var s=t.parse(e[2],2,My);if(!s)return null;if(!l_(n,s.type))return t.concat(2).error('"'+n+"\" comparisons are not supported for type '"+Ly(s.type)+"'.");if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return t.error("Cannot compare types '"+Ly(o.type)+"' and '"+Ly(s.type)+"'.");r&&("value"===o.type.kind&&"value"!==s.type.kind?o=new Ky(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new Ky(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,Ty)))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=Wy(o),l=Wy(s);if(a.kind!==l.kind||"string"!==a.kind&&"number"!==a.kind)throw new Xy('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=Wy(o),c=Wy(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}()}a_.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,My),r=t.parse(e[2],2,ky);if(!n||!r)return null;if(!Oy(n.type,[Iy(My),Cy,My]))return t.error("Expected first argument to be of type array or string, but found "+Ly(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,ky);return i?new a_(n.type,n,r,i):null}return new a_(n.type,n,r)},a_.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Dy(t,["string","array"]))throw new Xy("Expected first argument to be of type array or string, but found "+Ly(Wy(t))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)},a_.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},a_.prototype.outputDefined=function(){return!1},a_.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 h_=c_("==",(function(e,t,n){return t===n}),u_),d_=c_("!=",(function(e,t,n){return t!==n}),(function(e,t,n,r){return!u_(0,t,n,r)})),p_=c_("<",(function(e,t,n){return t<n}),(function(e,t,n,r){return r.compare(t,n)<0})),f_=c_(">",(function(e,t,n){return t>n}),(function(e,t,n,r){return r.compare(t,n)>0})),g_=c_("<=",(function(e,t,n){return t<=n}),(function(e,t,n,r){return r.compare(t,n)<=0})),m_=c_(">=",(function(e,t,n){return t>=n}),(function(e,t,n,r){return r.compare(t,n)>=0})),y_=function(e,t,n,r,i,o){this.type=Cy,this.number=e,this.locale=t,this.currency=n,this.unit=r,this.minFractionDigits=i,this.maxFractionDigits=o};y_.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,ky);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,Cy)))return null;var o=null;if(r.currency&&!(o=t.parse(r.currency,1,Cy)))return null;var s=null;if(r.unit&&!(s=t.parse(r.unit,1,Cy)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=t.parse(r["min-fraction-digits"],1,ky)))return null;var l=null;return r["max-fraction-digits"]&&!(l=t.parse(r["max-fraction-digits"],1,ky))?null:new y_(n,i,o,s,a,l)},y_.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))},y_.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)},y_.prototype.outputDefined=function(){return!1},y_.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 v_=function(e){this.type=ky,this.input=e};v_.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 "+Ly(n.type)+" instead."):new v_(n):null},v_.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 Xy("Expected value to be of type string or array, but found "+Ly(Wy(t))+" instead.")},v_.prototype.eachChild=function(e){e(this.input)},v_.prototype.outputDefined=function(){return!1},v_.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var __={"==":h_,"!=":d_,">":f_,"<":p_,">=":m_,"<=":g_,array:Ky,at:n_,boolean:Ky,case:s_,coalesce:e_,collator:rv,format:Yy,image:Qy,in:r_,"index-of":i_,interpolate:Jv,"interpolate-hcl":Jv,"interpolate-lab":Jv,length:v_,let:t_,literal:Uy,match:o_,number:Ky,"number-format":y_,object:Ky,slice:a_,step:Tv,string:Ky,"to-boolean":$y,"to-color":$y,"to-number":$y,"to-string":$y,var:Sv,within:xv};function b_(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=Vy(n,r,i,s);if(a)throw new Xy(a);return new hy(n/255*s,r/255*s,i/255*s,s)}function x_(e,t){return e in t}function w_(e,t){var n=t[e];return void 0===n?null:n}function k_(e){return{type:e}}function C_(e){return{result:"success",value:e}}function S_(e){return{result:"error",value:e}}function A_(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}nv.register(__,{error:[{kind:"error"},[Cy],function(e,t){var n=t[0];throw new Xy(n.evaluate(e))}],typeof:[Cy,[My],function(e,t){return Ly(Wy(t[0].evaluate(e)))}],"to-rgba":[Iy(ky,4),[Ay],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Ay,[ky,ky,ky],b_],rgba:[Ay,[ky,ky,ky,ky],b_],has:{type:Sy,overloads:[[[Cy],function(e,t){return x_(t[0].evaluate(e),e.properties())}],[[Cy,Ey],function(e,t){var n=t[0],r=t[1];return x_(n.evaluate(e),r.evaluate(e))}]]},get:{type:My,overloads:[[[Cy],function(e,t){return w_(t[0].evaluate(e),e.properties())}],[[Cy,Ey],function(e,t){var n=t[0],r=t[1];return w_(n.evaluate(e),r.evaluate(e))}]]},"feature-state":[My,[Cy],function(e,t){return w_(t[0].evaluate(e),e.featureState||{})}],properties:[Ey,[],function(e){return e.properties()}],"geometry-type":[Cy,[],function(e){return e.geometryType()}],id:[My,[],function(e){return e.id()}],zoom:[ky,[],function(e){return e.globals.zoom}],pitch:[ky,[],function(e){return e.globals.pitch||0}],"distance-from-center":[ky,[],function(e){return e.distanceFromCenter()}],"heatmap-density":[ky,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[ky,[],function(e){return e.globals.lineProgress||0}],"sky-radial-progress":[ky,[],function(e){return e.globals.skyRadialProgress||0}],accumulated:[My,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[ky,k_(ky),function(e,t){for(var n=0,r=0,i=t;r<i.length;r+=1)n+=i[r].evaluate(e);return n}],"*":[ky,k_(ky),function(e,t){for(var n=1,r=0,i=t;r<i.length;r+=1)n*=i[r].evaluate(e);return n}],"-":{type:ky,overloads:[[[ky,ky],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)-r.evaluate(e)}],[[ky],function(e,t){return-t[0].evaluate(e)}]]},"/":[ky,[ky,ky],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)/r.evaluate(e)}],"%":[ky,[ky,ky],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)%r.evaluate(e)}],ln2:[ky,[],function(){return Math.LN2}],pi:[ky,[],function(){return Math.PI}],e:[ky,[],function(){return Math.E}],"^":[ky,[ky,ky],function(e,t){var n=t[0],r=t[1];return Math.pow(n.evaluate(e),r.evaluate(e))}],sqrt:[ky,[ky],function(e,t){var n=t[0];return Math.sqrt(n.evaluate(e))}],log10:[ky,[ky],function(e,t){var n=t[0];return Math.log(n.evaluate(e))/Math.LN10}],ln:[ky,[ky],function(e,t){var n=t[0];return Math.log(n.evaluate(e))}],log2:[ky,[ky],function(e,t){var n=t[0];return Math.log(n.evaluate(e))/Math.LN2}],sin:[ky,[ky],function(e,t){var n=t[0];return Math.sin(n.evaluate(e))}],cos:[ky,[ky],function(e,t){var n=t[0];return Math.cos(n.evaluate(e))}],tan:[ky,[ky],function(e,t){var n=t[0];return Math.tan(n.evaluate(e))}],asin:[ky,[ky],function(e,t){var n=t[0];return Math.asin(n.evaluate(e))}],acos:[ky,[ky],function(e,t){var n=t[0];return Math.acos(n.evaluate(e))}],atan:[ky,[ky],function(e,t){var n=t[0];return Math.atan(n.evaluate(e))}],min:[ky,k_(ky),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[ky,k_(ky),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[ky,[ky],function(e,t){var n=t[0];return Math.abs(n.evaluate(e))}],round:[ky,[ky],function(e,t){var n=t[0].evaluate(e);return n<0?-Math.round(-n):Math.round(n)}],floor:[ky,[ky],function(e,t){var n=t[0];return Math.floor(n.evaluate(e))}],ceil:[ky,[ky],function(e,t){var n=t[0];return Math.ceil(n.evaluate(e))}],"filter-==":[Sy,[Cy,My],function(e,t){var n=t[0],r=t[1];return e.properties()[n.value]===r.value}],"filter-id-==":[Sy,[My],function(e,t){var n=t[0];return e.id()===n.value}],"filter-type-==":[Sy,[Cy],function(e,t){var n=t[0];return e.geometryType()===n.value}],"filter-<":[Sy,[Cy,My],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-<":[Sy,[My],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r<i}],"filter->":[Sy,[Cy,My],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->":[Sy,[My],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[Sy,[Cy,My],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-<=":[Sy,[My],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[Sy,[Cy,My],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->=":[Sy,[My],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[Sy,[My],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Sy,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[Sy,[Iy(Cy)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Sy,[Iy(My)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Sy,[Cy,Iy(My)],function(e,t){var n=t[0];return t[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[Sy,[Cy,Iy(My)],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:Sy,overloads:[[[Sy,Sy],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)&&r.evaluate(e)}],[k_(Sy),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:Sy,overloads:[[[Sy,Sy],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)||r.evaluate(e)}],[k_(Sy),function(e,t){for(var n=0,r=t;n<r.length;n+=1)if(r[n].evaluate(e))return!0;return!1}]]},"!":[Sy,[Sy],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[Sy,[Cy],function(e,t){var n=t[0],r=e.globals&&e.globals.isSupportedScript;return!r||r(n.evaluate(e))}],upcase:[Cy,[Cy],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[Cy,[Cy],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[Cy,k_(My),function(e,t){return t.map((function(t){return Hy(t.evaluate(e))})).join("")}],"resolved-locale":[Cy,[Ty],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var E_=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new tv,this._defaultValue=t?function(e){return"color"===e.type&&(A_(e.default)||Array.isArray(e.default))?new hy(0,0,0,0):"color"===e.type?hy.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function M_(e,t){var n=new Av(__,[],t?function(e){var t={color:Ay,string:Cy,number:ky,enum:Cy,boolean:Sy,formatted:Py,resolvedImage:Ry};return"array"===e.type?Iy(t[e.value]||My,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?C_(new E_(r,t)):S_(n.errors)}E_.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)},E_.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 Xy("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 T_=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!kv(t.expression)};T_.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)},T_.prototype.evaluate=function(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)};var P_=function(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!kv(t.expression),this.interpolationType=r};function R_(e,t){if("error"===(e=M_(e,t)).result)return e;var n=e.value.expression,r=wv(n);if(!r&&!function(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}(t))return S_([new by("","data expressions not supported")]);var i=Cv(n,["zoom","pitch","distance-from-center"]);if(!i&&!function(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}(t))return S_([new by("","zoom expressions not supported")]);var o=I_(n);if(!o&&!i)return S_([new by("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof by)return S_([o]);if(o instanceof Jv&&!function(e){return!!e.expression&&e.expression.interpolated}(t))return S_([new by("",'"interpolate" expressions cannot be used with this property')]);if(!o)return C_(new T_(r?"constant":"source",e.value));var s=o instanceof Jv?o.interpolation:void 0;return C_(new P_(r?"camera":"composite",e.value,o.labels,s))}function I_(e){var t=null;if(e instanceof t_)t=I_(e.result);else if(e instanceof e_)for(var n=0,r=e.args;n<r.length;n+=1){var i=r[n];if(t=I_(i))break}else(e instanceof Tv||e instanceof Jv)&&e.input instanceof nv&&"zoom"===e.input.name&&(t=e);return t instanceof by||e.eachChild((function(e){var n=I_(e);n instanceof by?t=n:!t&&n?t=new by("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new by("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function L_(e){if(Array.isArray(e))return e.map(L_);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){var t={};for(var n in e)t[n]=L_(e[n]);return t}return function(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}(e)}P_.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)},P_.prototype.evaluate=function(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)},P_.prototype.interpolationFactor=function(e,t,n){return this.interpolationType?Jv.interpolationFactor(this.interpolationType,e,t,n):0};var z_={$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:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"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}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-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:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},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"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function F_(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(!F_(r)&&"boolean"!=typeof r)return!1}return!0;default:return!0}}function O_(e,t){if(void 0===t&&(t="fill"),null==e)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};F_(e)||(e=q_(e));var n=e,r=!0;try{r=function(e){if(!j_(e))return e;var t=L_(e);return N_(t),D_(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=z_["filter_"+t],s=M_(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=M_(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=!wv(u.value.expression)}return{filter:i,dynamicFilter:a||void 0,needGeometry:V_(r),needFeature:!!l}}function D_(e){if(!Array.isArray(e))return e;var t=function(e){if(B_.has(e[0]))for(var t=1;t<e.length;t++)if(j_(e[t]))return!0;return e}(e);return!0===t?t:t.map((function(e){return D_(e)}))}function N_(e){var t=!1,n=[];if("case"===e[0]){for(var r=1;r<e.length-1;r+=2)t=t||j_(e[r]),n.push(e[r+1]);n.push(e[e.length-1])}else if("match"===e[0]){t=t||j_(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||j_(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++)N_(e[s])}function j_(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(j_(e[n]))return!0;return!1}var B_=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function G_(e,t){return e<t?-1:e>t?1:0}function V_(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t<e.length;t++)if(V_(e[t]))return!0;return!1}function q_(e){if(!e)return!0;var t,n=e[0];return e.length<=1?"any"!==n:"=="===n?W_(e[1],e[2],"=="):"!="===n?X_(W_(e[1],e[2],"==")):"<"===n||">"===n||"<="===n||">="===n?W_(e[1],e[2],n):"any"===n?(t=e.slice(1),["any"].concat(t.map(q_))):"all"===n?["all"].concat(e.slice(1).map(q_)):"none"===n?["all"].concat(e.slice(1).map(q_).map(X_)):"in"===n?H_(e[1],e.slice(2)):"!in"===n?X_(H_(e[1],e.slice(2))):"has"===n?U_(e[1]):"!has"===n?X_(U_(e[1])):"within"!==n||e}function W_(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 H_(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(G_)]]:["filter-in-small",e,["literal",t]]}}function U_(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function X_(e){return["!",e]}var Z_=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function K_(e,t){var n={};for(var r in e)"ref"!==r&&(n[r]=e[r]);return Z_.forEach((function(e){e in t&&(n[e]=t[e])})),n}var Y_={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},Q_=" ",J_=/(italic|oblique)$/i,$_={},eb=function(e,t,n){var r=$_[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 h in"normal"==c||"italic"==c||"oblique"==c?(o=c,u.pop(),c=u[u.length-1].toLowerCase()):J_.test(c)&&(c=c.replace(J_,""),o=u[u.length-1].replace(c,"")),Y_){var d=u.length>1?u[u.length-2].toLowerCase():"";if(c==h||c==h.replace("-","")||d+"-"+c==h){i=Y_[h],u.pop(),d&&h.startsWith(d)&&u.pop();break}}"number"==typeof c&&(i=c);var p=u.join(Q_).replace("Klokantech Noto Sans","Noto Sans");-1!==p.indexOf(Q_)&&(p='"'+p+'"'),s.push(p)}r=$_[e]=[o,i,s]}return r[0]+Q_+r[1]+Q_+t+"px"+(n?"/"+n:"")+Q_+r[2]},tb="https://api.mapbox.com";function nb(e){var t="mapbox://";return 0!==e.indexOf(t)?"":e.slice(t.length)}function rb(e,t){var n=nb(e);if(!n)return decodeURI(new URL(e,location.href).href);var r="styles/";if(0!==n.indexOf(r))throw new Error("unexpected style url: "+e);var i=n.slice(r.length);return tb+"/styles/v1/"+i+"?&access_token="+t}function ib(e,t,n,r){var i=new URL(e,r),o=nb(e);return o?"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 ob(e){return e*Math.PI/180}var sb=function(){for(var e=[],t=78271.51696402048;e.length<=24;t/=2)e.push(t);return e}();function ab(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 lb(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 ub={};function cb(e,t,n){if(void 0===n&&(n={}),t in ub)return ub[t];var r=n.transformRequest&&n.transformRequest(t,e)||new Request(t);r.headers.get("Accept")||r.headers.set("Accept","application/json");var i=fetch(r).then((function(e){return delete ub[t],e.ok?e.json():Promise.reject(new Error("Error fetching source "+t))})).catch((function(e){return delete ub[t],Promise.reject(new Error("Error fetching source "+t))}));return ub[t]=i,i}function hb(e,t){if("string"!=typeof e)return Promise.resolve(e);if(!e.trim().startsWith("{"))return cb("Style",e=rb(e,t.accessToken),t);try{var n=JSON.parse(e);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}var db={};function pb(e,t,n){void 0===n&&(n={});var r=[t,JSON.stringify(e)].toString(),i=db[r];if(!i||n.transformRequest){var o=e.url;if(o&&!e.tiles){var s=ib(o,n.accessToken,n.accessTokenParam||"access_token",t||location.href);i=o.startsWith("mapbox://")?Promise.resolve(Object.assign({},e,{url:void 0,tiles:s})):cb("Source",s,n).then((function(e){for(var t=0,r=e.tiles.length;t<r;++t){var i=e.tiles[t];if(n.transformRequest){var o=n.transformRequest(s,"Source");o&&(s=o.url)}var a=ib(i,n.accessToken,n.accessTokenParam||"access_token",s);if(n.transformRequest){var l=n.transformRequest(a,"Tiles");l instanceof Request&&(a=decodeURI(l.url))}e.tiles[t]=a}return Promise.resolve(e)}))}else e=Object.assign({},e,{tiles:e.tiles.map((function(e){return ib(e,n.accessToken,n.accessTokenParam||"access_token",t||location.href)}))}),i=Promise.resolve(Object.assign({},e));db[r]=i}return i}var fb,gb=Array(256).join(" ");function mb(e,t){if(t>=.05){for(var n="",r=e.split("\n"),i=gb.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 yb(){return fb||(fb=ab(1,1).getContext("2d")),fb}function vb(e,t){return yb().measureText(e).width+(e.length-1)*t}var _b={};function bb(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(bb(i[s],t,n,r));return o.join("\n")}var l=n+","+t+","+e+","+r,u=_b[l];if(!u){var c=e.split(" ");if(c.length>1){var h=yb();h.font=t;for(var d=h.measureText("M").width*n,p="",f=[],g=0,m=c.length;g<m;++g){var y=c[g],v=p+(p?" ":"")+y;vb(v,r)<=d?p=v:(p&&f.push(p),p=y)}p&&f.push(p);for(var _=0,b=f.length;_<b&&b>1;++_){var x=f[_];if(vb(x,r)<.35*d){var w=_>0?vb(f[_-1],r):1/0,k=_<b-1?vb(f[_+1],r):1/0;f.splice(_,1),b-=1,w<k?(f[_-1]+=" "+x,_-=1):f[_]=x+" "+f[_]}}for(var C=0,S=f.length-1;C<S;++C){var A=f[C],E=f[C+1];if(vb(A,r)>.7*d&&vb(E,r)<.6*d){var M=A.split(" "),T=M.pop();vb(T,r)<.2*d&&(f[C]=M.join(" "),f[C+1]=T+" "+E),S-=1}}u=f.join("\n")}else u=e;u=mb(u,r),_b[l]=u}return u}var xb,wb=/font-family: ?([^;]*);/,kb=/("|')/g;function Cb(e){if(!xb){xb={};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(wb);xb[u[1].replace(kb,"")]=!0}}}catch(e){}}}return e in xb}var Sb={};function Ab(e){var t=e.toString();if(t in Sb)return Sb[t];for(var n=[],r=0,i=e.length;r<i;++r){e[r]=e[r].replace("Arial Unicode MS","Arial");var o=e[r],s=eb(o,1);Ld(s);var a=s.split(" ");n.push([a.slice(3).join(" ").replace(/"/g,""),a[1],a[0]])}for(var l=0,u=n.length;l<u;++l){var c=n[l],h=c[0];if(!Cb(h)&&100!==Td.get(c[2]+"\n"+c[1]+" \n"+h)){var d="https://fonts.googleapis.com/css?family="+h.replace(/ /g,"+")+":"+c[1]+c[2];if(!document.querySelector('link[href="'+d+'"]')){var p=document.createElement("link");p.href=d,p.rel="stylesheet",document.head.appendChild(p)}}}return Sb[t]=e,e}var Eb,Mb,Tb={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Pb={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]},Rb={},Ib={zoom:0};function Lb(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]||Rb)[n],h=z_[t+"_"+e.type][n];void 0===c&&(c=h.default);var d=(l=c,Array.isArray(l)&&l.length>0&&"string"==typeof l[0]&&l[0]in __);if(!d&&A_(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,dy(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],_y(e[1])]:[e[0],dy(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"===vy({},t)){for(var u=[py(e),["linear"],["zoom"]],c=0,h=o;c<h.length;c+=1){var d=h[c];yy(u,d,gy(r[d],t,i[d]),!1)}return u}for(var p=["step",["zoom"]],f=0,g=o;f<g.length;f+=1){var m=g[f];yy(p,m,gy(r[m],t,i[m]),!0)}return my(p),p}(e,t,n):o?function(e,t,n,r){void 0===r&&(r=["zoom"]);var i,o=vy(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=[py(e),1===a?["linear"]:["exponential",a],r]}for(var l=0,u=n;l<u.length;l+=1){var c=u[l];yy(i,c[0],c[1],s)}return my(i),i}(e,t,n):gy(e,t,n)}(c,h),d=!0),d){var p=function(e,t){var n=R_(e,t);if("error"===n.result)throw new Error(n.value.map((function(e){return e.key+": "+e.message})).join(", "));return n.value}(c,h);u[n]=p.evaluate.bind(p)}else"color"==h.type&&(c=hy.parse(c)),u[n]=function(){return c}}return Ib.zoom=r,u[n](Ib,i,s)}function zb(e,t,n,r){return Lb(e,"layout","icon-allow-overlap",t,n,r)?Lb(e,"layout","icon-ignore-placement",t,n,r)?"none":"obstacle":"declutter"}function Fb(e,t,n,r,i){return i||console.warn("No filterCache provided to evaluateFilter()"),e in i||(i[e]=O_(t).filter),Ib.zoom=r,i[e](Ib,n)}function Ob(e,t){if(e){if(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 Db=/\{[^{}}]*\}/g;function Nb(e,t){return e.replace(Db,(function(e){return t[e.slice(1,-1)]||""}))}function jb(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 Bb(e,t,n,r,i){var o,s,a,l;return void 0===n&&(n=""),void 0===r&&(r={}),void 0===i&&(i=void 0),l="string"==typeof n||Array.isArray(n)?n:(a=n).source||a.layers,"string"==typeof r?(o=r,a={}):(o=r.styleUrl,a=r),i||(i=a.resolutions),o||"string"!=typeof t||t.trim().startsWith("{")||(o=t),o&&(o=o.startsWith("data:")?location.href:rb(o,a.accessToken),a=jb(o,a)),new Promise((function(n,r){hb(t,a).then((function(t){if(8!=t.version)return r(new Error("glStyle version 8 required."));if(!(e instanceof Bm||e instanceof Jm))return r(new Error("Can only apply to VectorLayer or VectorTileLayer"));var u,c,h,d=e instanceof Jm?"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===d})),l=s),!s)return r(new Error("No "+d+" source found in the glStyle."));function p(){if(e instanceof Jm)return Hb(t.sources[s],o,a).then((function(t){var n=e.getSource();if(n?t!==n&&(n.setTileUrlFunction(t.getTileUrlFunction()),n.format_||(n.format_=t.format_),n.getAttributions()||n.setAttributions(t.getAttributions()),n.getTileLoadFunction()===ry&&n.setTileLoadFunction(t.getTileLoadFunction()),uh(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=Kb(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 f(){h||t.sprite&&!u?h?(e.setStyle(h),p().then(n).catch(r)):r(new Error("Something went wrong trying to apply style.")):(h=function(e,t,n,r,i,o,s,a){if(void 0===r&&(r=sb),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(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 h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(e){"imageLoaded"===e.data.action&&e.data.src===o&&(l=e.data.image,u=[l.width,l.height])}))}for(var d,p=function(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]=K_(e[r],t[e[r].ref]));return e}(t.layers),f={},g=[],m={},y={},v={},_={},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(d){if(w.source!==d)throw new Error('Layer "'+k+'" does not use source "'+d)}else{d=w.source;var S=t.sources[d];if(!S)throw new Error('Source "'+d+'" is not defined');var A=S.type;if("vector"!==A&&"geojson"!==A)throw new Error('Source "'+d+'" is not of type "vector" or "geojson", but "'+A+'"')}var E=f[C];E||(E=[],f[C]=E),E.push({layer:w,index:b}),g.push(k)}}var M=new ap,T=new qd,P=[],R=function(t,n){var o=t.getProperties(),c=f[o.layer];if(c){var h=r.indexOf(n);-1==h&&(h=lb(n,r));for(var d=Tb[t.getGeometry().getType()],p={properties:o,type:d},g=e.get("mapbox-featurestate")[t.getId()],b=-1,x=0,w=c.length;x<w;++x){var k=c[x],C=k.layer,S=C.id,A=C.layout||Rb,E=C.paint||Rb;if(!("none"===A.visibility||"minzoom"in C&&h<C.minzoom||"maxzoom"in C&&h>=C.maxzoom)){var R=C.filter;if(!R||Fb(S,R,p,h,_)){var I=void 0,L=void 0,z=void 0,F=void 0,O=void 0,D=void 0,N=k.index;if(3==d&&("fill"==C.type||"fill-extrusion"==C.type))if(L=Lb(C,"paint",C.type+"-opacity",h,p,v,g),C.type+"-pattern"in E){var j=Lb(C,"paint",C.type+"-pattern",h,p,v,g);if(j){var B="string"==typeof j?Nb(j,o):j.toString();if(l&&i&&i[B]){++b,(D=P[b])&&D.getFill()&&!D.getStroke()&&!D.getText()||(D=new pp({fill:new qd}),P[b]=D),z=D.getFill(),D.setZIndex(N);var G=B+"."+L,V=y[G];if(!V){var q=i[B],W=ab(q.width,q.height),H=W.getContext("2d");H.globalAlpha=L,H.drawImage(l,q.x,q.y,q.width,q.height,0,0,q.width,q.height),V=H.createPattern(W,"repeat"),y[G]=V}z.setColor(V)}}}else I=Ob(Lb(C,"paint",C.type+"-color",h,p,v,g),L),C.type+"-outline-color"in E&&(O=Ob(Lb(C,"paint",C.type+"-outline-color",h,p,v,g),L)),O||(O=I),(I||O)&&(++b,(!(D=P[b])||I&&!D.getFill()||!I&&D.getFill()||O&&!D.getStroke()||!O&&D.getStroke()||D.getText())&&(D=new pp({fill:I?new qd:void 0,stroke:O?new ap:void 0}),P[b]=D),I&&(z=D.getFill()).setColor(I),O&&((F=D.getStroke()).setColor(O),F.setWidth(.5)),D.setZIndex(N));if(1!=d&&"line"==C.type){I=!("line-pattern"in E)&&"line-color"in E?Ob(Lb(C,"paint","line-color",h,p,v,g),Lb(C,"paint","line-opacity",h,p,v,g)):void 0;var U=Lb(C,"paint","line-width",h,p,v,g);I&&U>0&&(++b,(D=P[b])&&D.getStroke()&&!D.getFill()&&!D.getText()||(D=new pp({stroke:new ap}),P[b]=D),(F=D.getStroke()).setLineCap(Lb(C,"layout","line-cap",h,p,v,g)),F.setLineJoin(Lb(C,"layout","line-join",h,p,v,g)),F.setMiterLimit(Lb(C,"layout","line-miter-limit",h,p,v,g)),F.setColor(I),F.setWidth(U),F.setLineDash(E["line-dasharray"]?Lb(C,"paint","line-dasharray",h,p,v,g).map((function(e){return e*U})):null),D.setZIndex(N))}var X=!1,Z=null,K=0,Y=void 0,Q=void 0,J=void 0;if((1==d||2==d)&&"icon-image"in A){var $=Lb(C,"layout","icon-image",h,p,v,g);if($){Y="string"==typeof $?Nb($,o):$.toString();var ee=void 0,te=a?a(e,Y):void 0;if(l&&i&&i[Y]||te){var ne=Lb(C,"layout","icon-rotation-alignment",h,p,v,g);if(2==d){var re=t.getGeometry();if(re.getFlatMidpoint||re.getFlatMidpoints){var ie=re.getExtent();if(Math.sqrt(Math.max(Math.pow((ie[2]-ie[0])/n,2),Math.pow((ie[3]-ie[1])/n,2)))>150){var oe="MultiLineString"===re.getType()?re.getFlatMidpoints():re.getFlatMidpoint();if(Mb||(Mb=new op("Point",Eb=[NaN,NaN],[],{},null)),ee=Mb,Eb[0]=oe[0],Eb[1]=oe[1],"line"===Lb(C,"layout","symbol-placement",h,p,v,g)&&"map"===ne)for(var se=re.getStride(),ae=re.getFlatCoordinates(),le=0,ue=ae.length-se;le<ue;le+=se){var ce=ae[le],he=ae[le+1],de=ae[le+se],pe=ae[le+se+1],fe=Math.min(ce,de),ge=Math.min(he,pe),me=Math.max(ce,de),ye=Math.max(he,pe);if(oe[0]>=fe&&oe[0]<=me&&oe[1]>=ge&&oe[1]<=ye){K=Math.atan2(he-pe,de-ce);break}}}}}if(2!==d||ee){var ve=Lb(C,"layout","icon-size",h,p,v,g),_e=void 0!==E["icon-color"]?Lb(C,"paint","icon-color",h,p,v,g):null;if(!_e||0!==_e.a){var be=Y+"."+ve;if(null!==_e&&(be+="."+_e),!(Q=m[be])){var xe=zb(C,h,p,v),we=void 0;"icon-offset"in A&&((we=Lb(C,"layout","icon-offset",h,p,v,g))[1]*=-1);var ke=_e?[255*_e.r,255*_e.g,255*_e.b,_e.a]:void 0;if(te)Q=new Kd("string"==typeof te?{color:ke,src:te,rotateWithView:"map"===ne,displacement:we,declutterMode:xe}:{color:ke,img:te,imgSize:[te.width,te.height],rotateWithView:"map"===ne,displacement:we,declutterMode:xe});else{var Ce=i[Y];Q=new Kd({color:ke,img:l,imgSize:u,size:[Ce.width,Ce.height],offset:[Ce.x,Ce.y],rotateWithView:"map"===ne,scale:ve/Ce.pixelRatio,displacement:we,declutterMode:xe})}m[be]=Q}}Q&&(++b,(D=P[b])&&D.getImage()&&!D.getFill()&&!D.getStroke()||(D=new pp,P[b]=D),D.setGeometry(ee),Q.setRotation(K+ob(Lb(C,"layout","icon-rotate",h,p,v,g))),Q.setOpacity(Lb(C,"paint","icon-opacity",h,p,v,g)),Q.setAnchor(Pb[Lb(C,"layout","icon-anchor",h,p,v,g)]),D.setImage(Q),Z=D.getText(),D.setText(void 0),D.setZIndex(N),X=!0,J=!1)}else J=!0}}}if(1==d&&"circle"===C.type){++b,(D=P[b])&&D.getImage()&&!D.getFill()&&!D.getStroke()||(D=new pp,P[b]=D);var Se="circle-radius"in E?Lb(C,"paint","circle-radius",h,p,v,g):5,Ae=Ob(Lb(C,"paint","circle-stroke-color",h,p,v,g),Lb(C,"paint","circle-stroke-opacity",h,p,v,g)),Ee=Ob(Lb(C,"paint","circle-color",h,p,v,g),Lb(C,"paint","circle-opacity",h,p,v,g)),Me=Lb(C,"paint","circle-stroke-width",h,p,v,g),Te=Se+"."+Ae+"."+Ee+"."+Me;(Q=m[Te])||(Q=new Gd({radius:Se,stroke:Ae&&Me>0?new ap({width:Me,color:Ae}):void 0,fill:Ee?new qd({color:Ee}):void 0,declutterMode:"none"}),m[Te]=Q),D.setImage(Q),Z=D.getText(),D.setText(void 0),D.setGeometry(void 0),D.setZIndex(N),X=!0}var Pe=void 0,Re=void 0,Ie=void 0,Le=void 0,ze=void 0,Fe=void 0;if("text-field"in A){Le=Math.round(Lb(C,"layout","text-size",h,p,v,g));var Oe=Lb(C,"layout","text-font",h,p,v,g);Ie=Lb(C,"layout","text-line-height",h,p,v,g),(Re=eb(s?s(Oe):Oe,Le,Ie)).includes("sans-serif")||(Re+=",sans-serif"),ze=Lb(C,"layout","text-letter-spacing",h,p,v,g),Fe=Lb(C,"layout","text-max-width",h,p,v,g);var De=Lb(C,"layout","text-field",h,p,v,g);Pe="object"==typeof De&&De.sections?1===De.sections.length?De.toString():De.sections.reduce((function(e,t,n){var r=t.fontStack?t.fontStack.split(","):Oe,i=eb(s?s(r):r,Le*(t.scale||1),Ie),o=t.text;if("\n"===o)return e.push("\n",""),e;if(2!=d){for(var a=0,l=(o=bb(o,i,Fe,ze).split("\n")).length;a<l;++a)a>0&&e.push("\n",""),e.push(o[a],i);return e}e.push(mb(o,ze),i)}),[]):Nb(De,o).trim(),L=Lb(C,"paint","text-opacity",h,p,v,g)}if(Pe&&L&&!J){X||(++b,(D=P[b])&&D.getText()&&!D.getFill()&&!D.getStroke()||(D=new pp,P[b]=D),D.setImage(void 0),D.setGeometry(void 0)),D.getText()||D.setText(Z||new gp({padding:[2,2,2,2]})),Z=D.getText();var Ne=A["text-transform"];"uppercase"==Ne?Pe=Array.isArray(Pe)?Pe.map((function(e,t){return t%2?e:e.toUpperCase()})):Pe.toUpperCase():"lowercase"==Ne&&(Pe=Array.isArray(Pe)?Pe.map((function(e,t){return t%2?e:e.toLowerCase()})):Pe.toLowerCase());var je=Array.isArray(Pe)?Pe:2==d?mb(Pe,ze):bb(Pe,Re,Fe,ze);Z.setText(je),Z.setFont(Re),Z.setRotation(ob(Lb(C,"layout","text-rotate",h,p,v,g)));var Be=Lb(C,"layout","text-anchor",h,p,v,g),Ge=X||1==d?"point":Lb(C,"layout","symbol-placement",h,p,v,g);Z.setPlacement(Ge),Z.setOverflow("point"===Ge);var Ve=Lb(C,"paint","text-halo-width",h,p,v,g),qe=Lb(C,"layout","text-offset",h,p,v,g),We=Lb(C,"paint","text-translate",h,p,v,g),He=0,Ue=0;if("point"==Ge){var Xe="center";-1!==Be.indexOf("left")?(Xe="left",Ue=Ve):-1!==Be.indexOf("right")&&(Xe="right",Ue=-Ve),Z.setTextAlign(Xe);var Ze=Lb(C,"layout","text-rotation-alignment",h,p,v,g);Z.setRotateWithView("map"==Ze)}else Z.setMaxAngle(ob(Lb(C,"layout","text-max-angle",h,p,v,g))*Pe.length/je.length),Z.setTextAlign(),Z.setRotateWithView(!1);var Ke="middle";0==Be.indexOf("bottom")?(Ke="bottom",He=-Ve-.5*(Ie-1)*Le):0==Be.indexOf("top")&&(Ke="top",He=Ve+.5*(Ie-1)*Le),Z.setTextBaseline(Ke);var Ye=Lb(C,"layout","text-justify",h,p,v,g);Z.setJustify("auto"===Ye?void 0:Ye),Z.setOffsetX(qe[0]*Le+Ue+We[0]),Z.setOffsetY(qe[1]*Le+He+We[1]),T.setColor(Ob(Lb(C,"paint","text-color",h,p,v,g),L)),Z.setFill(T);var Qe=Ob(Lb(C,"paint","text-halo-color",h,p,v,g),L);if(Qe){M.setColor(Qe),Ve*=2;var Je=.5*Le;M.setWidth(Ve<=Je?Ve:Je),Z.setStroke(M)}else Z.setStroke(void 0);var $e=Lb(C,"layout","text-padding",h,p,v,g),et=Z.getPadding();$e!==et[0]&&(et[0]=$e,et[1]=$e,et[2]=$e,et[3]=$e),D.setZIndex(N)}}}}return b>-1?(P.length=b+1,P):void 0}};return e.setStyle(R),e.set("mapbox-source",d),e.set("mapbox-layers",g),e.set("mapbox-featurestate",{}),R}(e,t,l,i,u,c,Ab,a.getImage),e.getStyle()?p().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=nb(e);if(!r)return decodeURI(new URL(e,n).href);var i="sprites/";if(0!==r.indexOf(i))throw new Error("unexpected sprites url: "+e);var o=r.slice(i.length);return tb+"/styles/v1/"+o+"/sprite?access_token="+t}(t.sprite,a.accessToken,o||location.href)),m=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",y=g.origin+g.pathname+m+".json"+g.search;new Promise((function(e,t){cb("Sprite",y,a).then(e).catch((function(n){cb("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.")),u=e,c=g.origin+g.pathname+m+".png"+g.search,a.transformRequest){var t=a.transformRequest(c,"SpriteImage");t instanceof Request&&(c=encodeURI(t.url))}f()})).catch((function(e){r(new Error("Sprites cannot be loaded: "+y+": "+e.message))}))}else f()})).catch(r)}))}var Gb={};function Vb(e,t,n){var r={id:t.id,type:t.type},i={},o=0,s=!1;function a(e){if(e.frameState.time!==o&&(o=e.frameState.time,s=!1),!s){if(!(e.context instanceof CanvasRenderingContext2D))throw new Error("Cannot apply background to WebGL context");var a=function(e){var o=t.layout||{},s=t.paint||{};r.paint=s;var a,l,u=lb(e,n.resolutions||sb);return void 0!==s["background-color"]&&(a=Lb(r,"paint","background-color",u,Gb,i)),void 0!==s["background-opacity"]&&(l=Lb(r,"paint","background-opacity",u,Gb,i)),"none"==o.visibility?void 0:Ob(a,l)}(e.frameState.viewState.resolution);if(a){var l=e.context,u=l.globalAlpha,c=l.globalCompositeOperation;l.globalAlpha=1,l.globalCompositeOperation="destination-over",l.fillStyle=a,l.fillRect(0,0,e.context.canvas.width,e.context.canvas.height),l.globalAlpha=u,l.globalCompositeOperation=c}s=!0}}if("function"==typeof e.getLayers){var l=e.getLayers();l.forEach((function(e){e.on("postrender",a)})),l.on("add",(function(e){e.element.on("postrender",a)})),l.on("remove",(function(e){e.element.un("postrender",a)}))}else e.on("postrender",a)}function qb(e,t){var n;return e.some((function(e){if(e.id==t)return n=e.source,!0})),n}function Wb(e){var t=e.bounds;if(t){var n=ah([t[0],t[1]]),r=ah([t[2],t[3]]);return[n[0],n[1],r[0],r[1]]}}function Hb(e,t,n){return new Promise((function(r,i){pb(e,t,n).then((function(e){var t=new Xg({tileJSON:e}),n=t.getTileJSON(),i=t.getTileGrid(),o=Wb(n),s=n.minzoom||0,a=n.maxzoom||22,l={attributions:t.getAttributions(),format:new bf,tileGrid:new Jh({origin:i.getOrigin(0),extent:o||i.getExtent(),minZoom:s,resolutions:sb.slice(0,a+1),tileSize:512})};Array.isArray(n.tiles)?l.urls=n.tiles:l.url=n.tiles,e.olSourceOptions&&Object.assign(l,e.olSourceOptions),r(new ny(l))})).catch(i)}))}function Ub(e,t,n){var r=new Jm({declutter:!0,visible:!1});return Hb(e,t,n).then((function(t){t.set("mapbox-source",e),r.setSource(t)})).catch((function(e){r.setSource(void 0)})),r}function Xb(e,t,n){var r=new Fh;return pb(e,t,n).then((function(t){var n=new Xg({transition:0,crossOrigin:"anonymous",tileJSON:t}),i=Wb(t),o=n.getTileGrid(),s=e.tileSize||t.tileSize||512,a=t.minzoom||0,l=t.maxzoom||22;n.tileGrid=new Jh({origin:o.getOrigin(0),extent:i||o.getExtent(),minZoom:a,resolutions:ed({maxZoom:l,tileSize:s}).getResolutions(),tileSize:s});var u=n.getTileUrlFunction();n.setTileUrlFunction((function(e,t,r){var i=u(e,t,r);if(-1!=i.indexOf("{bbox-epsg-3857}")){var o=n.getTileGrid().getTileCoordExtent(e);i=i.replace("{bbox-epsg-3857}",o.toString())}return i})),n.set("mapbox-source",e),r.setSource(n)})).catch((function(e){r.setSource(void 0)})),r}var Zb=new ff;function Kb(e,t,n){var r=e.data,i={};if("string"==typeof r){var o=ib(r,n.accessToken,n.accessTokenParam||"access_token",t||location.href);if(n.transformRequest){var s=n.transformRequest(o,"GeoJSON");s instanceof Request&&(o=encodeURI(s.url))}i.url=o}else i.features=Zb.readFeatures(r,{featureProjection:fh()||"EPSG:3857"});var a=new Zm(Object.assign({attributions:e.attribution,format:Zb},i));return a.set("mapbox-source",e),a}function Yb(e,t,n){return new Bm({declutter:!0,source:Kb(e,t,n),visible:!1})}function Qb(e,t,n){var r=null;return function(i){i.frameState.viewState.zoom!==r&&(r=i.frameState.viewState.zoom,function(e,t,n,r){var i=Lb(e,"paint","raster-opacity",n,Gb,r);t.setOpacity(i)}(e,t,r,n))}}function Jb(e,t,n,r){var i=[],o=null;t instanceof Wg&&((o=t.getView()).isDef()||o.getRotation()||o.getResolutions()||(o=new og(Object.assign(o.getProperties(),{maxResolution:sb[0]})),t.setView(o)),"center"in e&&!o.getCenter()&&o.setCenter(ah(e.center)),"zoom"in e&&void 0===o.getZoom()&&o.setResolution(sb[0]/Math.pow(2,e.zoom)),o.getCenter()&&void 0!==o.getZoom()||o.fit(o.getProjection().getExtent(),{nearest:!0,size:t.getSize()}));for(var s,a,l,u,c,h=e.layers,d=[],p=0,f=h.length;p<f;++p){var g=(s=h[p]).type;if("heatmap"==g||"hillshade"==g)throw new Error(g+" layers are not supported");"background"==g?Vb(t,s,r):((u=s.source||qb(h,s.ref))!=l&&(d.length&&(i.push($b(c,d,e,n,t,r)),d=[]),"vector"==(a=e.sources[u]).type?c=Ub(a,n,r):"raster"==a.type?((c=Xb(a,n,r)).setVisible(!s.layout||"none"!==s.layout.visibility),c.on("prerender",Qb(s,c,{}))):"geojson"==a.type&&(c=Yb(a,n,r)),l=u,c&&c.set("mapbox-source",l)),d.push(s.id))}return i.push($b(c,d,e,n,t,r)),t.set("mapbox-style",e),Promise.all(i)}function $b(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 h=l[u];-1!==t.indexOf(h.id)&&(s=Math.min("minzoom"in h?h.minzoom:0,s),a=Math.max("maxzoom"in h?h.maxzoom:24,a))}return new Promise((function(l,u){var c=function(){var i=e.getSource();if(i&&"error"!==i.getState()){if("getTileGrid"in i){var c=i.getTileGrid();if(c){var h=c.getMinZoom();(s>0||h>0)&&e.setMaxResolution(Math.min(sb[s],c.getResolution(h))+1e-9),a<24&&e.setMinResolution(sb[a]+1e-9)}}i instanceof Zm||i instanceof ny?Bb(e,n,t,Object.assign({styleUrl:r},o)).then((function(){e.setVisible(!0),l()})).catch(u):l()}else u(new Error("Error accessing data for source "+e.get("mapbox-source")))};e.set("mapbox-layers",t);var h=i.getLayers();-1===h.getArray().indexOf(e)&&h.push(e),e.getSource()?c():e.once("change:source",c)}))}function ex(e){e.getLayers().getArray().filter((e=>e.get("mapbox-source")||e.get("background-raster-layer"))).forEach((t=>e.removeLayer(t)))}const tx=[0,0,0,0],nx=[],rx="modifyend";class ix extends Ya{constructor(e,t,n){super(e),this.features=t,this.mapBrowserEvent=n}}function ox(e,t){return e.index-t.index}function sx(e,t,n){const r=t.geometry;if("Circle"===r.getType()){let i=r;if(1===t.index){const t=fh();t&&(i=i.clone().transform(t,n));const r=Zc(i.getCenter(),mh(e)),o=Math.sqrt(r)-i.getRadius();return o*o}}const i=mh(e);return nx[0]=mh(t.segment[0]),nx[1]=mh(t.segment[1]),function(e,t){return Zc(e,Hc(e,t))}(i,nx)}function ax(e,t,n){const r=t.geometry;if("Circle"===r.getType()&&1===t.index){let t=r;const i=fh();return i&&(t=t.clone().transform(i,n)),gh(t.getClosestPoint(mh(e)))}const i=mh(e);return nx[0]=mh(t.segment[0]),nx[1]=mh(t.segment[1]),gh(Hc(i,nx))}function lx(){const e=hp();return function(t,n){return e.Point}}const ux=class extends mg{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:Pg,this.defaultDeleteCondition_=function(e){return function(e){const t=e.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey}(e)&&Sg(e)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:bg,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new Gm,this.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Bm({source:new Zm({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:lx(),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 Sf(this.source_.getFeatures()),this.source_.addEventListener(Vm,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(qm,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(xf,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(wf,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(cl,this.boundHandleFeatureChange_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new Sf;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 ix("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(cl,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(ju(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(ju(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(ju(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(ju(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(Ku(n),r);let s=t;const a=fh();if(a&&this.getMap()){const e=this.getMap().getView().getProjection();s=s.clone().transform(a,e),s=uf(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 Il(new Xp(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!=Ff.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(t=!(e.type!=Ff.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==Ff.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 h=s.segment,d=o[1];for(;t.length<l.getStride();)t.push(h[d][t.length]);switch(l.getType()){case"Point":c=t,h[0]=t,h[1]=t;break;case"MultiPoint":c=l.getCoordinates(),c[s.index]=t,h[0]=t,h[1]=t;break;case"LineString":c=l.getCoordinates(),c[s.index+d]=t,h[d]=t;break;case"MultiLineString":case"Polygon":c=l.getCoordinates(),c[u[0]][s.index+d]=t,h[d]=t;break;case"MultiPolygon":c=l.getCoordinates(),c[u[1]][u[0]][s.index+d]=t,h[d]=t;break;case"Circle":if(h[0]=t,h[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=Kc(mh(l.getCenter()),mh(t));const i=fh();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=ju([o]),a=this.rBush_.getInExtent(s),l={};a.sort(ox);for(let n=0,s=a.length;n<s;++n){const s=a[n],u=s.segment;let c=Cl(s.geometry);const h=s.depth;if(h&&(c+="-"+h.join("-")),l[c]||(l[c]=new Array(2)),"Circle"!==s.geometry.getType()||1!==s.index)if(!Uc(u[0],o)||l[c][0])if(!Uc(u[1],o)||l[c][1])Cl(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[h[1]];case"Polygon":if(s.index!==e[h[0]].length-2)continue}}this.dragSegments_.push([s,1]),l[c][1]=s}else this.dragSegments_.push([s,0]),l[c][0]=s;else Uc(ax(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(Ku(t),i);let s=r;const a=fh();if(a){const t=e.map.getView().getProjection();s=s.clone().transform(a,t),s=uf(s).transform(t,a)}this.rBush_.update(s.getExtent(),o)}else this.rBush_.update(ju(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new ix(rx,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 sx(r,e,i)-sx(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)=>{if("Point"===(n=n||e.getGeometry()).getType()&&this.features_.getArray().includes(e)){a=n;const t=n.getFlatCoordinates().slice(0,2);s=[{feature:e,geometry:n,segment:[t,t]}]}return!0}),{layerFilter:n})}if(!s){const e=yh(Bu(vh(Ku(r,tx)),t.getView().getResolution()*this.pixelTolerance_,tx));s=this.rBush_.getInExtent(e)}if(s&&s.length>0){const n=s.sort(o)[0],l=n.segment;let u=ax(r,n,i);const c=t.getPixelFromCoordinate(u);let h=Kc(e,c);if(a||h<=this.pixelTolerance_){const e={};if(e[Cl(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=Zc(c,r),a=Zc(c,i);h=Math.sqrt(Math.min(o,a)),this.snappedToVertex_=h<=this.pixelTolerance_,this.snappedToVertex_&&(u=o>a?l[1]:l[0]),this.createOrUpdateVertexFeature_(u,[n.feature],[n.geometry]);const d={};d[Cl(n.geometry)]=!0;for(let t=1,n=s.length;t<n;++t){const n=s[t].segment;if(!(Uc(l[0],n[0])&&Uc(l[1],n[1])||Uc(l[0],n[1])&&Uc(l[1],n[0])))break;{const r=Cl(s[t].geometry);r in d||(d[r]=!0,e[Cl(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(ju(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(ju(c.segment),c),this.dragSegments_.push([c,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Ff.POINTERDRAG){const e=this.lastPointerEvent_;this.willModifyFeatures_(e,this.dragSegments_);const t=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new ix(rx,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,h,d,p=!1;for(s=e.length-1;s>=0;--s)i=e[s],h=i[0],d=Cl(h.feature),h.depth&&(d+="-"+h.depth.join("-")),d in t||(t[d]={}),0===i[1]?(t[d].right=h,t[d].index=h.index):1==i[1]&&(t[d].left=h,t[d].index=h.index+1);for(d in t){switch(c=t[d].right,l=t[d].left,a=t[d].index,u=a-1,h=void 0!==l?l:c,u<0&&(u=0),o=h.geometry,r=o.getCoordinates(),n=r,p=!1,o.getType()){case"MultiLineString":r[h.depth[0]].length>2&&(r[h.depth[0]].splice(a,1),p=!0);break;case"LineString":r.length>2&&(r.splice(a,1),p=!0);break;case"MultiPolygon":n=n[h.depth[1]];case"Polygon":n=n[h.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:h.depth,feature:h.feature,geometry:h.geometry,index:u,segment:t};this.rBush_.insert(ju(e.segment),e)}this.updateSegmentIndices_(o,a,h.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||rl(i.depth,n))&&i.index>t&&(i.index+=r)}))}};function cx({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="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"/>${void 0===t?'<path d="M192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z" 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>`}class hx extends Ya{constructor(e,t,n,r){super(e),this.selected=t,this.deselected=n,this.mapBrowserEvent=r}}const dx={};class px extends pg{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:Sg,this.addCondition_=e.addCondition?e.addCondition:kg,this.removeCondition_=e.removeCondition?e.removeCondition:kg,this.toggleCondition_=e.toggleCondition?e.toggleCondition:Eg,this.multi_=!!e.multi&&e.multi,this.filter_=e.filter?e.filter:il,this.hitTolerance_=e.hitTolerance?e.hitTolerance:0,this.style_=void 0!==e.style?e.style:function(){const e=hp();return nl(e.Polygon,e.LineString),nl(e.GeometryCollection,e.LineString),function(t){return t.getGeometry()?e[t.getGeometry().getType()]:null}}(),this.features_=e.features||new Sf,e.layers)if("function"==typeof e.layers)t=e.layers;else{const n=e.layers;t=function(e){return n.includes(e)}}else t=il;this.layerFilter_=t,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(e,t){this.featureLayerAssociation_[Cl(e)]=t}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(e){return this.featureLayerAssociation_[Cl(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(xf,this.boundAddFeature_),this.features_.addEventListener(wf,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(xf,this.boundAddFeature_),this.features_.removeEventListener(wf,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 Bm&&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=Cl(e);t in dx||(dx[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 px&&r.getStyle()&&-1!==r.getFeatures().getArray().lastIndexOf(e))return void e.setStyle(r.getStyle())}const n=Cl(e);e.setStyle(dx[n]),delete dx[n]}removeFeatureLayerAssociation_(e){delete this.featureLayerAssociation_[Cl(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){al(this.featureLayerAssociation_),o.forEachFeatureAtPixel(e.pixel,function(e,t){if(e instanceof Il&&this.filter_(e,t))return this.addFeatureLayerAssociation_(e,t),l.push(e),!this.multi_}.bind(this),{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,function(e,i){if(e instanceof Il&&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_}.bind(this),{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 hx("select",l,a,e)),!0}}const fx=px,gx="pathsLayer",mx="selectedPathLayer";function yx(e){e.getLayers().getArray().filter((e=>e.get(gx)||e.get(mx))).forEach((t=>e.removeLayer(t)))}function vx(e){const t={type:"FeatureCollection",features:e.map(((e,t)=>({type:"Feature",properties:{index:t},geometry:{...e.points,coordinates:e.points.coordinates.map((e=>ah(e)))}})))};return t}function _x(e){return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:{...e.points,coordinates:e.points.coordinates.map((e=>ah(e)))}}]}}const bx="element",xx="map",wx="offset",kx="position",Cx="positioning",Sx=class extends Al{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(bx,this.handleElementChanged),this.addChangeListener(xx,this.handleMapChanged),this.addChangeListener(wx,this.handleOffsetChanged),this.addChangeListener(kx,this.handlePositionChanged),this.addChangeListener(Cx,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(bx)}getId(){return this.id}getMap(){return this.get(xx)||null}getOffset(){return this.get(wx)}getPosition(){return this.get(kx)}getPositioning(){return this.get(Cx)}handleElementChanged(){Nu(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){this.mapPostrenderListenerKey&&(Du(this.element),_l(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=yl(e,Nf,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(bx,e)}setMap(e){this.set(xx,e)}setOffset(e){this.set(wx,e)}setPosition(e){this.set(kx,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(kx))return;const n=this.getRect(t.getTargetElement(),t.getSize()),r=this.getElement(),i=this.getRect(r,[zu(r),Fu(r)]),o=void 0===(e=e||{}).margin?20:e.margin;if(!Wu(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(Cx,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 Ax=n(7970),Ex={};Ex.styleTagTransform=b(),Ex.setAttributes=m(),Ex.insert=f().bind(null,"head"),Ex.domAPI=d(),Ex.insertStyleElement=v(),c()(Ax.Z,Ex);const Mx=Ax.Z&&Ax.Z.locals?Ax.Z.locals:void 0;function Tx({coordinate:t,queryPoints:n,route:r,onSelect:i}){const o=function(e,t){i(),Gr.dispatch(new qr({...e,coordinate:t,queryText:bi(t),isInitialized:!0},!0))};return(0,e.jsxs)("div",{className:Mx.wrapper,onMouseUp:e=>{const t=new MouseEvent("click",{bubbles:!0});t.stopPropagation=()=>{},e.target.dispatchEvent(t)},children:[(0,e.jsxs)("button",{className:Mx.entry,onClick:()=>o(n[0],t),children:[(0,e.jsx)("div",{children:(0,e.jsx)(bs,{size:16,color:Ii.getMarkerColor(Pi.From)})}),(0,e.jsx)("span",{children:a("set_start")})]}),(0,e.jsxs)("button",{className:Mx.entry,disabled:function(e){const t=e.filter((e=>e.type===Pi.Via));return 0!==t.length&&t.every((e=>!e.isInitialized))}(n),onClick:()=>function(e,n){const r=e.filter((e=>e.type===Pi.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=>{Mi(a,e.wayPoints[s])<1&&(s=Math.min(e.wayPoints.length-1,s+1));const l=Mi(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;Gr.dispatch(new Hr(e,t,!0))}}(n,r),children:[(0,e.jsx)("div",{children:(0,e.jsx)(bs,{size:16,color:Ii.getMarkerColor(Pi.Via)})}),(0,e.jsx)("span",{children:a("set_intermediate")})]}),(0,e.jsxs)("button",{style:{paddingBottom:"10px"},className:Mx.entry,onClick:()=>o(n[n.length-1],t),children:[(0,e.jsx)("div",{children:(0,e.jsx)(bs,{size:16,color:Ii.getMarkerColor(Pi.To)})}),(0,e.jsx)("span",{children:a("set_end")})]}),(0,e.jsx)("button",{style:{borderTop:"1px solid lightgray",paddingTop:"10px"},className:Mx.entry,onClick:()=>{i(),Gr.dispatch(new ui(t,8))},children:a("center_map")}),(0,e.jsx)("button",{className:Mx.entry,onClick:()=>{i(),window.open(`https://www.openstreetmap.org/query?lat=${t.lat}&lon=${t.lng}`,"_blank","noopener,noreferrer")},children:a("query_osm")})]})}var Px=n(7406),Rx={};Rx.styleTagTransform=b(),Rx.setAttributes=m(),Rx.insert=f().bind(null,"head"),Rx.domAPI=d(),Rx.insertStyleElement=v(),c()(Px.Z,Rx);const Ix=Px.Z&&Px.Z.locals?Px.Z.locals:void 0,Lx=new Sx({autoPan:!0});function zx({map:t,route:n,queryPoints:r}){const[i,o]=(0,l.useState)(null),s=(0,l.useRef)(),a=()=>{o(null)};return(0,l.useEffect)((()=>{function e(e){e.preventDefault();const n=lh(t.getEventCoordinate(e));o({lng:n[0],lat:n[1]})}Lx.setElement(s.current),t.addOverlay(Lx);const n=new Fx((t=>e(t)));return t.once("change:target",(()=>{t.getTargetElement().addEventListener("contextmenu",e),t.getTargetElement().addEventListener("touchstart",(e=>n.onTouchStart(e))),t.getTargetElement().addEventListener("touchmove",(()=>n.onTouchEnd())),t.getTargetElement().addEventListener("touchend",(()=>n.onTouchEnd())),t.getTargetElement().addEventListener("click",a)})),()=>{t.getTargetElement().removeEventListener("contextmenu",e),t.getTargetElement().removeEventListener("click",a),t.removeOverlay(Lx)}}),[t]),(0,l.useEffect)((()=>{Lx.setPosition(i?ah([i.lng,i.lat]):void 0)}),[i]),(0,e.jsx)("div",{className:Ix.contextMenu,ref:s,children:i&&(0,e.jsx)(Tx,{coordinate:i,queryPoints:r,route:n,onSelect:a})})}class Fx{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 Ox="highlightedPathSegmentLayer";function Dx(e){e.getLayers().getArray().filter((e=>e.get(Ox))).forEach((t=>e.removeLayer(t)))}function Nx(e){return{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiLineString",coordinates:e.map((e=>e.map((e=>ah([e.lng,e.lat])))))},properties:{}}]}}var jx=n(8737),Bx={};Bx.styleTagTransform=b(),Bx.setAttributes=m(),Bx.insert=f().bind(null,"head"),Bx.domAPI=d(),Bx.insertStyleElement=v(),c()(jx.Z,Bx);const Gx=jx.Z&&jx.Z.locals?jx.Z.locals:void 0;function Vx({map:t,pathDetails:n}){const[r,i]=(0,l.useState)(),o=(0,l.useRef)();(0,l.useEffect)((()=>{const e=new Sx({element:o.current,autoPan:!1});i(e),t.addOverlay(e)}),[t]),(0,l.useEffect)((()=>{const e=n.pathDetailsPoint?ah([n.pathDetailsPoint.point.lng,n.pathDetailsPoint.point.lat]):void 0;null==r||r.setPosition(e)}),[n.pathDetailsPoint]);const s=(0,l.useContext)(zi);return(0,e.jsx)("div",{className:Gx.popup,ref:o,children:n.pathDetailsPoint&&(0,e.jsxs)("p",{children:[vi(Math.round(n.pathDetailsPoint.elevation),s,!0),(0,e.jsx)("br",{}),n.pathDetailsPoint.description]})})}let qx;function Wx(){if(!qx)throw Error('Map must be initialized before it can be used. Use "createMap" when starting the app');return qx}var Hx=n(1240),Ux={};Ux.styleTagTransform=b(),Ux.setAttributes=m(),Ux.insert=f().bind(null,"head"),Ux.domAPI=d(),Ux.insertStyleElement=v(),c()(Hx.Z,Ux),Hx.Z&&Hx.Z.locals&&Hx.Z.locals;var Xx=n(5734),Zx={};Zx.styleTagTransform=b(),Zx.setAttributes=m(),Zx.insert=f().bind(null,"head"),Zx.domAPI=d(),Zx.insertStyleElement=v(),c()(Xx.Z,Zx),Xx.Z&&Xx.Z.locals&&Xx.Z.locals;var Kx=n(9735),Yx={};Yx.styleTagTransform=b(),Yx.setAttributes=m(),Yx.insert=f().bind(null,"head"),Yx.domAPI=d(),Yx.insertStyleElement=v(),c()(Kx.Z,Yx),Kx.Z&&Kx.Z.locals&&Kx.Z.locals;var Qx=n(1055),Jx={};Jx.styleTagTransform=b(),Jx.setAttributes=m(),Jx.insert=f().bind(null,"head"),Jx.domAPI=d(),Jx.insertStyleElement=v(),c()(Qx.Z,Jx),Qx.Z&&Qx.Z.locals&&Qx.Z.locals;var $x=n(6218),ew={};ew.styleTagTransform=b(),ew.setAttributes=m(),ew.insert=f().bind(null,"head"),ew.domAPI=d(),ew.insertStyleElement=v(),c()($x.Z,ew);const tw=$x.Z&&$x.Z.locals?$x.Z.locals:void 0;var nw,rw,iw,ow,sw=n(3710),aw=n.n(sw);function lw(e){return 32===e||9===e}function uw(e){return 10===e||13===e}function cw(e){return e>=48&&e<=57}function hw(e,t,n=rw.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,h=0;function d(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="",h=0,o=r,l=a,c=u,r>=n)return o=n,s=17;let t=e.charCodeAt(r);if(lw(t)){do{r++,i+=String.fromCharCode(t),t=e.charCodeAt(r)}while(lw(t));return s=15}if(uw(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),h=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(uw(o)){t+=e.substring(i,r),h=2;break}h=6}r++}else{if(t+=e.substring(i,r),r++,r>=n){h=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=d(4,!0);e>=0?t+=String.fromCharCode(e):h=4;break;default:h=5}i=r}}return t}(),s=10;case 47:const l=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!uw(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++,uw(t)&&(13===t&&10===e.charCodeAt(r)&&r++,a++,u=r)}return o||(r++,h=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||!cw(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&&cw(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&cw(e.charCodeAt(r))))return h=3,e.substring(t,r);for(r++;r<e.length&&cw(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&&cw(e.charCodeAt(r))){for(r++;r<e.length&&cw(e.charCodeAt(r));)r++;n=r}else h=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(lw(e)||uw(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,h=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:()=>h}}(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),h=o(t.onObjectEnd),d=s(t.onArrayBegin),p=o(t.onArrayEnd),f=l(t.onLiteralValue),g=a(t.onSeparator),m=o(t.onComment),y=a(t.onError),v=n&&n.disallowComments,_=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:v||x(11);break;case 2:x(12);break;case 6:x(16)}switch(e){case 12:case 13:v?x(10):m();break;case 16:x(1);break;case 15:case 14:break;default:return e}}}function x(e,t=[],n=[]){if(y(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(){d(),b();let t=!0,n=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(n||x(4,[],[]),g(","),b(),4===r.getToken()&&_)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,[],[]),g(","),b(),2===r.getToken()&&_)break}else t&&x(6,[],[]);(10!==r.getToken()?(x(3,[],[2,5]),0):(w(!1),6===r.getToken()?(g(":"),b(),e()||x(4,[],[2,5])):x(5,[],[2,5]),i.pop(),1))||x(4,[],[2,5]),t=!0}return h(),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 dw(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"}(nw||(nw={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(rw||(rw={})),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"}(iw||(iw={})),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"}(ow||(ow={}));const pw=function(e,t=[],n=rw.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:dw(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})}};hw(e,s,n);const a=r.children[0];return a&&delete a.parent,a},fw=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 gw;!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"}(gw||(gw={}));const mw=["speed","priority","distance_influence","areas"],yw=["if","else_if","else"],vw=["multiply_by","limit_to"],_w=yw.concat(vw);let bw=[],xw=[],ww=[];function kw(e){if(bw=[],xw=[],ww=[],0===e.trim().length)return{errors:[jw("root","must be an object",[0,e.length])],jsonErrors:[],conditionRanges:bw,operatorValueRanges:xw,areas:ww};const t=[],n=pw(e,t,{allowEmptyContent:!1,allowTrailingComma:!1,disallowComments:!0}),r=t.map((e=>jw("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 Nw("root",e,(e=>mw.indexOf(e.value)>=0),((e,t,n)=>[]),`possible keys: ${Hw(mw)}`,Cw)}(n):[];return{errors:i,jsonErrors:r,conditionRanges:bw,operatorValueRanges:xw,areas:ww}}function Cw(e,t,n){if("null"===n.type)return[jw(`${t.value}`,"must not be null",qw(n))];if("speed"===t.value||"priority"===t.value)return function(e,t){const n=Lw(e,t,0,-1,Sw);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;yw.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(jw(`${e}[${t}]`,`'${i[t]}' clause must be preceded by 'if' or 'else_if'`,qw(r[t]))),o=i[t];return n}(t.value,n);if("distance_influence"===t.value)return function(e){return Gw(e)?[]:[jw("distance_influence",`must be a number. given type: ${Ww(e)}`,qw(e))]}(n);if("areas"===t.value)return Nw("areas",n,Dw,((e,t,n)=>(ww=t,[])),"names may only contain a-z, digits and _",Mw);throw`Unexpected root key ${t.value}`}function Sw(e,t,n){return Nw(e,t,(e=>_w.indexOf(e.value)>=0),Aw,`possible keys: ${Hw(_w)}`,Ew)}function Aw(e,t,n){const r=[];t.length>2&&r.push(jw(e,`too many keys. maximum: 2. given: ${t.sort()}`,n));const i=t.some((e=>yw.indexOf(e)>=0)),o=t.some((e=>vw.indexOf(e)>=0));return i||r.push(jw(e,`every statement must have a clause ${Hw(yw)}. given: ${t}`,n)),o||r.push(jw(e,`every statement must have an operator ${Hw(vw)}. given: ${t}`,n)),r}function Ew(e,t,n){const r=[],i=yw.indexOf(t.value)>=0,o=vw.indexOf(t.value)>=0;if(i&&("else"===t.value?Vw(n)&&""===n.value||r.push(jw(`${e}[else]`,`must be an empty string. given: '${n.value}'`,qw(n))):Vw(n)?bw.push(qw(n)):r.push(jw(`${e}[${t.value}]`,`must be a string. given type: ${Ww(n)}`,qw(n)))),o&&(Vw(n)?xw.push(qw(n)):r.push(jw(`${e}[${t.value}]`,`must be a string. given type: ${Ww(n)}`,qw(n)))),i===o)throw`Unexpected statement: ${i} ${o} ${t} ${n}`;return r}function Mw(e,t,n){const r=["type","geometry","id","properties"],i=`possible keys: ${Hw(r)}`;return Nw(`${e}[${t.value}]`,n,(e=>r.indexOf(e.value)>=0),Tw,i,Pw)}function Tw(e,t,n){const r=["type","geometry"],i=[];for(let o=0;o<r.length;o++)t.indexOf(r[o])<0&&i.push(jw(e,`missing '${r[o]}'. given: ${Hw(t)}`,n));return i}function Pw(e,t,n){if("type"===t.value)return Vw(n)?"Feature"!==n.value?[jw(`${e}[${t.value}]`,`must be "Feature". given: "${n.value}"`,qw(n))]:[]:[jw(`${e}[${t.value}]`,`must be "Feature". given type: ${Ww(n)}`,qw(n))];if("properties"===t.value)return Nw(`${e}[${t.value}]`,n,(()=>!0),(()=>[]),"",(()=>[]));if("id"!==t.value){if("geometry"===t.value){const r=["type","coordinates"],i=`possible keys: ${Hw(r)}`,o=e=>r.indexOf(e.value)>=0;return Nw(`${e}[${t.value}]`,n,o,Rw,i,Iw)}return console.error(`unexpected area field ${t.value}`),[]}return Vw(n)?void 0:[jw(`${e}[${t.value}]`,`must be a string. given type: ${Ww(n)}`,qw(n))]}function Rw(e,t,n){const r=["type","coordinates"],i=[];for(let o=0;o<r.length;o++)t.indexOf(r[o])<0&&i.push(jw(e,`missing '${r[o]}'. given: ${Hw(t)}`,n));return i}function Iw(e,t,n){if("type"===t.value)return"Polygon"!==n.value?[jw(`${e}[${t.value}]`,`must be "Polygon". given: '${n.value}'`,qw(n))]:[];if("coordinates"===t.value)return function(e,t,n){return Lw(e,n,1,-1,zw)}(`${e}[${t.value}]`,0,n);throw`unexpected geometry field ${t.value}`}function Lw(e,t,n,r,i){if(!function(e){return"array"===e.type}(t))return[jw(e,`must be an array. given type: ${Ww(t)}`,qw(t))];const o=t.children;if(o.length<n)return[jw(e,`minimum length: ${n}, given: ${o.length}`,qw(t))];if(r>=0&&o.length>r)return[jw(e,`maximum length: ${r}, given: ${o.length}`,qw(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 zw(e,t,n){const r=Lw(e,t,4,-1,Fw);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?[jw(`${e}`,"the last point must be equal to the first",qw(o))]:[];var s,a}function Fw(e,t,n){return Lw(e,t,2,2,Ow)}function Ow(e,t,n){const r=[];return Gw(t)?(0===n&&(t.value<-180||t.value>180)&&r.push(jw(`${e}`,"longitude must be in [-180, +180]",qw(t))),1===n&&(t.value<-90||t.value>90)&&r.push(jw(`${e}`,"latitude must be in [-90, +90]",qw(t)))):r.push(jw(e,"must be a number",qw(t))),r}function Dw(e){return/^[a-z][0-9A-Za-z_]*$/g.test(e.value)}function Nw(e,t,n,r,i,o){if("object"!==t.type)return[jw(e,`must be an object. given type: ${Ww(t)}`,qw(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(!Bw(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(jw(e,`keys must be non-empty and must not only consist of whitespace. given: '${a.value}'`,qw(a))):t(a)?o.has(a.value)?i.push(jw(e,`keys must be unique. duplicate: '${a.value}'`,qw(a))):o.add(a.value):i.push(jw(e,`${n}. given: '${a.value}'`,qw(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,qw(t))),a.length>0||a.push.apply(a,function(e,t,n){const r=[];for(let i=0;i<t.length;++i){if(!Bw(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(jw(t,"missing value",qw(o)))}}return r}(e,t.children,o)),a}function jw(e,t,n){return{path:e,message:t,range:n}}function Bw(e){return"property"===e.type}function Gw(e){return"number"===e.type}function Vw(e){return"string"===e.type}function qw(e){return[e.offset,e.offset+e.length]}function Ww(e){return e.type}function Hw(e){return`[${e.map((e=>`'${e}'`)).join(", ")}]`}const Uw=["(",")","<",">"],Xw=["||","&&","==","!=","<=",">="],Zw=["*","/","+","-"],Kw=[];function Yw(e,t,n,r){if(t<0||t>=e.length)throw`pos ${t} out of range: [0, ${e.length}[`;const i=Qw(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 Qw(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 Jw(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 $w=["==","!="],ek=["<","<=",">",">=","==","!="],tk=["||","&&"];let nk,rk,ik,ok;function sk(e,t,n){const r=function(e){return Qw(e,Uw,Xw)}(e),i=function(e,t,n){for(let[e,n]of Object.entries(t))if("enum"===n.type){if(n.values.length<1)return fk(`no values given for enum category ${e}`)}else if("boolean"!==n.type&&"numeric"!==n.type)return fk(`unknown category type: ${n.type} for category ${e}`);nk=t,rk=n,ik=e,ok=0;const r=ak();return null!==r.error?r:ck()?{error:null,range:[],completions:[]}:fk(`unexpected token '${ik[ok]}'`,[ok,ok+1],tk)}(r.tokens,t,n);return i.tokens=r.tokens,null!==i.error&&(i.range=Jw(e,r.ranges,i.range[0],i.range[1])),i}function ak(){const e=lk();if(null!==e.error)return e;if(ck())return{error:null,range:[],completions:[]};for(;t=ik[ok],tk.indexOf(t)>=0;){if(hk(),ck())return fk(`unexpected token '${ik[ok-1]}'`,[ok-1,ok],[]);const e=lk();if(null!==e.error)return e}var t;return{error:null,range:[],completions:[]}}function lk(){return dk()&&"enum"===nk[ik[ok]].type?uk($w,((e,t,n)=>function(e,t){return nk[e].values.indexOf(t)>=0}(e,n)),((e,t,n)=>void 0!==nk[e]?nk[e].values:[])):dk()&&"numeric"===nk[ik[ok]].type?uk(ek,((e,t,n)=>function(e){return!isNaN(Number(e))}(n)),((e,t,n)=>["__hint__type a number"])):pk(ik[ok])?(ok++,{error:null,range:[],completions:[]}):dk()&&"boolean"===nk[ik[ok]].type?ok+1===ik.length||$w.indexOf(ik[ok+1])<0?(ok++,{error:null,range:[],completions:[]}):uk($w,((e,t,n)=>pk(n)),((e,t,n)=>["true","false"])):function(){const e=ik[ok];return"string"==typeof e&&"in_"===e.substr(0,3)}()?function(){const e=ik[ok];if(e.length<"in_".length)return void console.error(`expected something like 'in_xyz', but got: '${e}'`);const t=e.substring("in_".length);return rk.indexOf(t)<0?fk(`unknown area: '${t}'`,[ok,ok+1],rk.map((e=>"in_"+e))):ok+1===ik.length||$w.indexOf(ik[ok+1])<0?(ok++,{error:null,range:[],completions:[]}):uk($w,((e,t,n)=>pk(n)),((e,t,n)=>["true","false"]))}():"("===ik[ok]?function(){const e=ok;if(ck())return fk("unmatched opening '('",[e,ok],[]);hk();const t=ak();return null!==t.error?t:")"===ik[ok]?(hk(),{error:null,range:[],completions:[]}):fk("unmatched opening '('",[e,ok],[])}():ck()?fk("empty comparison",[ok,ok],[]):function(){const e=ik[ok];return"string"==typeof e&&rk.indexOf(e)>=0}()?function(){const e=ik[ok];if("in_"!==e.substring(0,3))return fk("area names must be prefixed with 'in_'",[ok,ok+1],rk.map((e=>"in_"+e)));console.error(`${e} is a valid area operator and should have been detected earlier`)}():fk(`unexpected token '${ik[ok]}'`,[ok,ok+1],Object.keys(nk).concat(rk.map((e=>"in_"+e))).concat(["true","false"]))}function uk(e,t,n){if(ok+1>=ik.length)return fk("invalid comparison. missing operator.",[ok,ok+1],[]);const r=ik[ok],i=ik[ok+1];if(e.indexOf(i)<0)return fk(`invalid operator '${i}'`,[ok+1,ok+2],e);if(ok+2>=ik.length)return fk("invalid comparison. missing value.",[ok,ok+2],[]);const o=ik[ok+2];return t(r,i,o)?(ok+=3,{error:null,range:[],completions:[]}):fk(`invalid ${r}: '${o}'`,[ok+2,ok+3],n(r,i,o))}function ck(){return ok===ik.length}function hk(){ok++}function dk(){return void 0!==nk[ik[ok]]}function pk(e){return"true"===e||"false"===e}function fk(e,t,n){return{error:e,range:t,completions:n}}const gk=["+","-","*"];let mk,yk,vk;function _k(e,t){const n=function(e){return Qw(e,Zw,Kw)}(e),r=function(e,t){mk=t,yk=e,vk=0;const n=function(){const e=bk();if(null!==e.error)return e;if(xk())return{error:null,range:[],completions:[]};for(;t=void 0,t=yk[vk],gk.indexOf(t)>=0;){if(wk(),xk())return kk(`unexpected token '${yk[vk-1]}'`,[vk-1,vk],[]);const e=bk();if(null!==e.error)return e}var t;return{error:null,range:[],completions:[]}}();return null!==n.error?n:xk()?e.reduce(((e,n)=>e+(t.indexOf(n)>=0)),0)>1?kk("too many encoded values, max: 1",[0,yk.length],[]):{error:null,range:[],completions:[]}:kk(`unexpected token '${yk[vk]}'`,[vk,vk+1],gk)}(n.tokens,t);return r.tokens=n.tokens,null!==r.error&&(r.range=Jw(e,n.ranges,r.range[0],r.range[1])),r}function bk(){return xk()?kk("empty expression",[vk,vk],[]):mk.indexOf(yk[vk])>=0||function(e){return!isNaN(Number(e))}(yk[vk])?(wk(),{error:null,range:[],completions:[]}):kk(`unexpected token '${yk[vk]}'`,[vk,vk+1],["__hint__type a number"].concat(mk))}function xk(){return vk===yk.length}function wk(){vk++}function kk(e,t,n){return{error:e,range:t,completions:n}}function Ck(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=>Sk(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=>Sk(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 Sk(e,t){return e.substring(0,t.length)===t}function Ak(e,t){for(;t>=e.length;)e+=" ";const n=function(e,t){if(0===e.trim().length)return{path:[],signature:["root"],tokenRange:[]};const n=pw(e,[],{allowEmptyContent:!1,allowTrailingComma:!1,disallowComments:!0});if(!n)return{path:[],signature:[],tokenRange:[]};const r=fw(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=>!Ek(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&&Mk(n.path[3].children,n.path[4],e),o=n.signature.length>4&&Mk(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]-object(-property-key)?$/.test(r))return{suggestions:["__hint__type an area name"],range:n.tokenRange};if(/^root-object-property\[areas]-object-property\[[a-zA-Z0-9_]*]-object(-property-key)?$/.test(r)){return{suggestions:['"geometry"','"type"'].filter((e=>!Ek(n.path[4].children,n.path[5],e))),range:"key"===n.signature[n.signature.length-1]?n.tokenRange:[t,t+1]}}if(/^root-object-property\[areas]-object-property\[[a-zA-Z0-9_]*]-object-property\[type]-value$/.test(r))return{suggestions:['"Feature"'],range:n.tokenRange};if(/^root-object-property\[areas]-object-property\[[a-zA-Z0-9_]*]-object-property\[geometry]-object(-property-key)?$/.test(r)){return{suggestions:['"type"','"coordinates"'].filter((e=>!Ek(n.path[6].children,n.path[7],e))),range:"key"===n.signature[n.signature.length-1]?n.tokenRange:[t,t+1]}}return/^root-object-property\[areas]-object-property\[[a-zA-Z0-9_]*]-object-property\[geometry]-object-property\[type]-value$/.test(r)?{suggestions:['"Polygon"'],range:n.tokenRange}:{suggestions:[],range:[]}}function Ek(e,t,n){return e.some((e=>e!==t&&e.children&&`"${e.children[0].value}"`===n))}function Mk(e,t,n){return e.some((e=>e!==t&&e.children&&n.indexOf(`"${e.children[0].value}"`)>=0))}class Tk{cm;_categories={};_numericCategories=[];_validListener;constructor(e,t){this.categories=e,this.cm=aw()(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=kw(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=sk(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=_k(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=kw(this.cm.getValue()),t=this.cm.indexFromPos(this.cm.getCursor()),n=Ak(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 Ck(e,t,(e=>sk(e,n,r)),((e,t)=>function(e,t){return Yw(e,t,Uw,Xw)}(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 Ck(e,t,(e=>_k(e,n)),((e,t)=>function(e,t){return Yw(e,t,Zw,Kw)}(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,t.length)===t?{text:"",displayText:e.substring("__hint__".length)}:{text:e};var t}))};return aw().on(n,"pick",(function(e){})),n},completeSingle:!1};this.cm.showHint(n)}}const Pk={empty:{distance_influence:15,speed:[],priority:[],areas:{}},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"}]},exclude_area:{priority:[{if:"in_berlin_bbox",multiply_by:"0"}],areas:{berlin_bbox:{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[13.253,52.608],[13.228,52.437],[13.579,52.447],[13.563,52.609],[13.253,52.608]]]}}}},combined:{distance_influence:100,speed:[{if:"road_class == STEPS || road_environment == FERRY",multiply_by:"0"}],priority:[{if:"road_environment == TUNNEL",multiply_by:"0.5"},{if:"max_weight < 3 || max_height < 2.5",multiply_by:"0.0"}]}};function Rk({enabled:t,encodedValues:n,initialCustomModelStr:r,queryOngoing:i}){const[o,s]=(0,l.useState)(),[u,c]=(0,l.useState)(!1),h=(0,l.useRef)(null);(0,l.useEffect)((()=>{const e=new Tk({},(e=>{var t;return null===(t=h.current)||void 0===t?void 0:t.appendChild(e)}));if(s(e),e.cm.setSize("100%","100%"),null!=r)try{r=Lk(JSON.parse(r))}catch(e){}e.value=null==r?Lk(Pk.empty):r,t&&Ik(e.value,!0,!0),e.validListener=t=>{Ik(e.value,t,!1),c(t)}}),[]),(0,l.useEffect)((()=>{t&&(null==o||o.cm.focus())}),[t]),(0,l.useEffect)((()=>{if(!o)return;const e={};Object.keys(n).forEach((t=>{const r=n[t];2===r.length&&"true"===r[0]&&"false"===r[1]?e[t]={type:"boolean"}:2===r.length&&">number"===r[0]&&"<number"===r[1]?e[t]={type:"numeric"}:e[t]={type:"enum",values:r.sort()}})),o.categories=e}),[n]);const d=(0,l.useCallback)((e=>{if(e.ctrlKey&&"Enter"===e.key){const e=!0;Ik(o.value,e,!0)}}),[o,u]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{ref:h,className:tw.customModelBox,style:{display:t?"block":"none"},onKeyUp:d}),t&&(0,e.jsxs)("div",{className:tw.customModelBoxBottomBar,children:[(0,e.jsxs)("select",{className:tw.examples,onChange:e=>{o.value=Lk(Pk[e.target.value]),Ik(JSON.stringify(Pk[e.target.value]),!0,!0)},children:[(0,e.jsx)("option",{value:"empty",children:a("examples_custom_model")}),(0,e.jsx)("option",{value:"exclude_motorway",children:a("exclude_motorway_example")}),(0,e.jsx)("option",{value:"limit_speed",children:a("limit_speed_example")}),(0,e.jsx)("option",{value:"exclude_area",children:a("exclude_area_example")}),(0,e.jsx)("option",{value:"combined",children:a("combined_example")})]}),(0,e.jsx)("a",{target:"_blank",className:tw.helpLink,href:"https://github.com/graphhopper/graphhopper/blob/master/docs/core/custom-models.md",children:a("help_custom_model")}),(0,e.jsxs)("div",{className:`${tw.applyButton} ${u?"":tw.applyButtonInvalid} ${i?tw.applyButtonProgress:""}`,children:[(0,e.jsx)(wo,{title:a("Apply custom model of text box to routing request"),disabled:!u||i,onClick:()=>Ik(o.value,!0,!0),children:a("apply_custom_model")}),i&&(0,e.jsx)("div",{className:tw.infiniteProgressBar})]})]})]})}function Ik(e,t,n){try{const r=JSON.parse(e);t&&Gr.dispatch(new ii),Gr.dispatch(new Jr(r,t,n))}catch(e){Gr.dispatch(new Jr(null,!1,n))}}function Lk(e){return JSON.stringify(e,null,2)}const zk="routingGraphLayer";function Fk(e){e.getLayers().getArray().filter((e=>e.get(zk))).forEach((t=>e.removeLayer(t)))}var Ok=n(4601),Dk={};Dk.styleTagTransform=b(),Dk.setAttributes=m(),Dk.insert=f().bind(null,"head"),Dk.domAPI=d(),Dk.insertStyleElement=v(),c()(Ok.Z,Dk);const Nk=Ok.Z&&Ok.Z.locals?Ok.Z.locals:void 0;function jk({map:t,point:n,properties:r}){const[i,o]=(0,l.useState)(),s=(0,l.useRef)();return(0,l.useEffect)((()=>{const e=new Sx({element:s.current,autoPan:!1});o(e),t.addOverlay(e)}),[t]),(0,l.useEffect)((()=>{null==i||i.setPosition(n?ah([n.lng,n.lat]):void 0)}),[n]),(0,e.jsx)("div",{className:Nk.popup,ref:s,children:(0,e.jsx)("ul",{children:Object.entries(r).map((([t,n],r)=>(0,e.jsx)("li",{children:`${t}=${n}`},r)))})})}const Bk="urbanDensityLayer";function Gk(e){e.getLayers().getArray().filter((e=>e.get(Bk))).forEach((t=>e.removeLayer(t)))}const Vk="borderLayer";function qk(e){e.getLayers().getArray().filter((e=>e.get(Vk))).forEach((t=>e.removeLayer(t)))}const Wk="popup-container",Hk="sidebar-content";function Uk({query:t,route:n,map:r,error:i,mapOptions:o,info:s}){var a;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Ui.sidebar,children:(0,e.jsxs)("div",{className:Ui.sidebarContent,id:Hk,children:[(0,e.jsx)(ia,{routingProfiles:s.profiles,selectedProfile:t.routingProfile,customModelAllowed:!0,customModelEnabled:t.customModelEnabled}),(0,e.jsx)(Rk,{enabled:t.customModelEnabled,encodedValues:s.encoded_values,initialCustomModelStr:t.initialCustomModelStr,queryOngoing:(null===(a=t.currentRequest.subRequests[0])||void 0===a?void 0:a.state)===Ri.SENT}),(0,e.jsx)(xs,{points:t.queryPoints}),(0,e.jsx)("div",{children:!i.isDismissed&&(0,e.jsx)(Ts,{error:i})}),(0,e.jsx)(Ma,{paths:n.routingResult.paths,selectedPath:n.selectedPath,currentRequest:t.currentRequest,profile:t.routingProfile.name}),(0,e.jsx)("div",{children:(0,e.jsx)(Ka,{})})]})}),(0,e.jsx)("div",{className:Ui.popupContainer,id:Wk}),(0,e.jsx)("div",{className:Ui.map,children:(0,e.jsx)(go,{map:r})}),(0,e.jsx)("div",{className:Ui.mapOptions,children:(0,e.jsx)(Ao,{...o})}),(0,e.jsx)("div",{className:Ui.pathDetails,children:(0,e.jsx)(Fi,{selectedPath:n.selectedPath})})]})}function Xk({query:t,route:n,map:r,error:i,mapOptions:o,info:s}){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Ui.smallScreenSidebar,children:(0,e.jsx)(sa,{info:s,query:t,route:n,error:i})}),(0,e.jsx)("div",{className:Ui.smallScreenMap,children:(0,e.jsx)(go,{map:r})}),(0,e.jsx)("div",{className:Ui.smallScreenMapOptions,children:(0,e.jsx)("div",{className:Ui.smallScreenMapOptionsContent,children:(0,e.jsx)(Ao,{...o})})}),(0,e.jsx)("div",{className:Ui.smallScreenRoutingResult,children:(0,e.jsx)(Ma,{paths:n.routingResult.paths,selectedPath:n.selectedPath,currentRequest:t.currentRequest,profile:t.routingProfile.name})}),(0,e.jsx)("div",{className:Ui.smallScreenPoweredBy,children:(0,e.jsx)(Ka,{})})]})}class Zk extends Ei{constructor(e){super(Zk.getInitialState()),this.queryStore=e}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:[]},distance:0,points_order:[],time:0,description:""}}reduce(e,t){return t instanceof $r?this.reduceRouteReceived(e,t):t instanceof ri?{...e,selectedPath:t.path}:t instanceof qr||t instanceof ni||t instanceof Xr||t instanceof Zr?Zk.getInitialState():e}static getInitialState(){return{routingResult:{paths:[],info:{copyright:[],took:0}},selectedPath:Zk.getEmptyPath()}}reduceRouteReceived(e,t){return this.isStaleRequest(t.request)?e:Zk.containsPaths(t.result.paths)?{routingResult:t.result,selectedPath:t.result.paths[0]}:Zk.getInitialState()}isStaleRequest(e){const t=this.queryStore.state.currentRequest.subRequests;let n=-1,r=-1;for(let i=0;i<t.length;i++){const o=t[i];o.args===e&&(n=i),o.state===Ri.SUCCESS&&(r=i)}return n<0&&n<r}static containsPaths(e){return e.length>0}}class Kk extends Ei{constructor(){super(Kk.getInitialState())}static getInitialState(){return{version:"",bbox:[0,0,0,0],profiles:[],elevation:!1,import_date:"",encoded_values:[]}}reduce(e,t){return t instanceof Vr?t.result:e}}class Yk extends Ei{constructor(){super(Yk.getInitialState())}static getInitialState(){return{isDismissed:!0,lastError:""}}reduce(e,t){return t instanceof ei?{lastError:t.message,isDismissed:!1}:t instanceof ii||t instanceof $r?{...e,isDismissed:!0}:e}}const Qk=ki().keys.omniscale,Jk=ki().keys.maptiler,$k=ki().keys.thunderforest,eC=ki().keys.kurviger,tC='&copy; <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors',nC=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,rC=nC?2:1,iC=nC?"@2x":"",oC={name:"Omniscale",type:"raster",url:["https://maps.omniscale.net/v2/"+Qk+"/style.default/{z}/{x}/{y}.png"+(nC?"?hq=true":"")],attribution:tC+', &copy; <a href="https://maps.omniscale.com/" target="_blank">Omniscale</a>',tilePixelRatio:rC},sC="/raster/styles/kurviger-liberty/{z}/{x}/{y}"+iC+".png?key="+eC,aC=[oC,{name:"OpenStreetMap",type:"raster",url:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png","https://c.tile.openstreetmap.org/{z}/{x}/{y}.png"],attribution:tC,maxZoom:19},{name:"Esri Satellite",type:"raster",url:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],attribution:'&copy; <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="+Jk,attribution:tC+', &copy; <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>'},{name:"MapTiler",type:"vector",url:"https://api.maptiler.com/maps/1f566542-c726-4cc5-8f2d-2309b90083db/style.json?key="+Jk,attribution:tC+', &copy; <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}"+iC+".png?apikey="+$k,"https://b.tile.thunderforest.com/transport/{z}/{x}/{y}"+iC+".png?apikey="+$k,"https://c.tile.thunderforest.com/transport/{z}/{x}/{y}"+iC+".png?apikey="+$k],attribution:tC+', <a href="https://www.thunderforest.com/maps/transport/" target="_blank">Thunderforest Transport</a>',tilePixelRatio:rC},{name:"TF Cycle",type:"raster",url:["https://a.tile.thunderforest.com/cycle/{z}/{x}/{y}"+iC+".png?apikey="+$k,"https://b.tile.thunderforest.com/cycle/{z}/{x}/{y}"+iC+".png?apikey="+$k,"https://c.tile.thunderforest.com/cycle/{z}/{x}/{y}"+iC+".png?apikey="+$k],attribution:tC+', <a href="https://www.thunderforest.com/maps/opencyclemap/" target="_blank">Thunderforest Cycle</a>',tilePixelRatio:rC},{name:"TF Outdoors",type:"raster",url:["https://a.tile.thunderforest.com/outdoors/{z}/{x}/{y}"+iC+".png?apikey="+$k,"https://b.tile.thunderforest.com/outdoors/{z}/{x}/{y}"+iC+".png?apikey="+$k,"https://c.tile.thunderforest.com/outdoors/{z}/{x}/{y}"+iC+".png?apikey="+$k],attribution:tC+', <a href="https://www.thunderforest.com/maps/outdoors/" target="_blank">Thunderforest Outdoors</a>',tilePixelRatio:rC},{name:"TF Atlas",type:"raster",url:["https://a.tile.thunderforest.com/atlas/{z}/{x}/{y}"+iC+".png?apikey="+$k,"https://b.tile.thunderforest.com/atlas/{z}/{x}/{y}"+iC+".png?apikey="+$k,"https://c.tile.thunderforest.com/atlas/{z}/{x}/{y}"+iC+".png?apikey="+$k],attribution:tC+', <a href="https://thunderforest.com/maps/atlas/" target="_blank">Thunderforest Atlas</a>',tilePixelRatio:rC},{name:"Kurviger Liberty",type:"raster",url:["https://a-tiles.mapilion.com"+sC,"https://b-tiles.mapilion.com"+sC,"https://c-tiles.mapilion.com"+sC,"https://d-tiles.mapilion.com"+sC,"https://e-tiles.mapilion.com"+sC],attribution:tC+',&copy; <a href="https://kurviger.de/" target="_blank">Kurviger</a> &copy; <a href="https://mapilion.com/attribution" target="_blank">Mapilion</a> <a href="http://www.openmaptiles.org/" target="_blank">&copy; OpenMapTiles</a>',maxZoom:22,tilePixelRatio:rC},{name:"Mapilion",type:"vector",url:"https://tiles.mapilion.com/assets/osm-bright/style.json?key="+eC,attribution:tC+', &copy; <a href="https://mapilion.com/attribution" target="_blank">Mapilion</a> <a href="http://www.openmaptiles.org/" target="_blank">&copy; OpenMapTiles</a>'},{name:"OpenStreetmap.de",type:"raster",url:["https://a.tile.openstreetmap.de/{z}/{x}/{y}.png","https://b.tile.openstreetmap.de/{z}/{x}/{y}.png","https://c.tile.openstreetmap.de/{z}/{x}/{y}.png"],attribution:tC,maxZoom:18},{name:"Lyrk",type:"raster",url:["https://tiles.lyrk.org/lr/{z}/{x}/{y}?apikey=6e8cfef737a140e2a58c8122aaa26077"],attribution:tC+', <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:tC+', <a href="https://wanderreitkarte.de" target="_blank">WanderReitKarte</a>',maxZoom:18}];class lC extends Ei{constructor(){super(lC.getInitialState())}static getInitialState(){const e=aC.find((e=>e.name===ki().defaultTiles));return e||console.warn(`Could not find tile layer specified in config: '${ki().defaultTiles}', using default instead`),{selectedStyle:e||oC,styleOptions:aC,routingGraphEnabled:!1,urbanDensityEnabled:!1,isMapLoaded:!1}}reduce(e,t){return t instanceof oi?{...e,selectedStyle:t.styleOption}:t instanceof si?{...e,routingGraphEnabled:t.routingGraphEnabled}:t instanceof ai?{...e,urbanDensityEnabled:t.urbanDensityEnabled}:t instanceof li?{...e,isMapLoaded:!0}:e}}class uC extends Ei{constructor(){super(uC.getInitialState())}static getInitialState(){return{pathDetailsPoint:null,pathDetailBbox:void 0,pathDetailsHighlightedSegments:[]}}reduce(e,t){return t instanceof hi?{...e,pathDetailsPoint:t.pathDetailsPoint}:t instanceof di?{...e,pathDetailBbox:t.bbox?t.bbox:void 0}:t instanceof pi?{...e,pathDetailsHighlightedSegments:t.segments}:e}}const cC=window;class hC{constructor(e,t){this.isIgnoreQueryStoreUpdates=!1,this.queryStore=e,this.queryStore.register((()=>this.onQueryStateChanged())),this.mapStore=t,this.mapStore.register((()=>this.onQueryStateChanged())),cC.addEventListener("popstate",(()=>this.parseUrlAndReplaceQuery()))}static createUrl(e,t,n){const r=new URL(e);return t.queryPoints.filter((e=>e.isInitialized)).map((e=>this.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&&t.customModel&&t.customModelValid&&r.searchParams.append("custom_model",JSON.stringify(t.customModel)),r}static pointToParam(e){const t=bi(e.coordinate);return t===e.queryText?t:t+"_"+e.queryText}parsePoints(e,t){const n=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:Pi.Via};if(n.length>=1)try{r.coordinate=hC.parseCoordinate(n[0]),Number.isNaN(r.coordinate.lat)||Number.isNaN(r.coordinate.lng)||(r.queryText=n.length>=2?n[1]:bi(r.coordinate),r.isInitialized=!0)}catch(e){}return r}));if(n.some((e=>!e.isInitialized&&e.queryText.length>0))){t.name||(t={name:"car"});let e=Array.from({length:n.length});return n.forEach(((n,r)=>{n.isInitialized?e[r]=n:Si().geocode(n.queryText,"nominatim").then((i=>{i.hits.length<=0||(e[r]={...n,queryText:i.hits[0].name,coordinate:{lat:i.hits[0].point.lat,lng:i.hits[0].point.lng},isInitialized:!0},e.every((e=>e.isInitialized))&&(e.length<=2&&this.fillPoints(e),Gr.dispatch(new Ur(e,t))))}))})),[]}return n.length>2?n:this.fillPoints(n)}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"):""}parseLayer(e){let t=e.searchParams.get("layer");return this.mapStore.state.styleOptions.find((e=>e.name===t))||this.mapStore.state.selectedStyle}parseUrlAndReplaceQuery(){this.isIgnoreQueryStoreUpdates=!0,Gr.dispatch(new Xr);const e=new URL(cC.location.href),t=hC.parseProfile(e),n=t?{name:t}:this.queryStore.state.routingProfile,r=this.parsePoints(e,n),i=this.getBBoxFromUrlPoints(r.map((e=>e.coordinate)));i&&Gr.dispatch(new ci(i)),r.length>0&&Gr.dispatch(new Ur(r,n));const o=this.parseLayer(e);Gr.dispatch(new oi(o)),this.isIgnoreQueryStoreUpdates=!1}fillPoints(e){const t=this.queryStore.state.queryPoints;for(let n=0;n<t.length&&n<e.length;n++)t[n]=e[n];return t}onQueryStateChanged(){if(this.isIgnoreQueryStoreUpdates)return;const e=hC.createUrl(cC.location.origin+cC.location.pathname,this.queryStore.state,this.mapStore.state).toString();e!==cC.location.href&&cC.history.pushState("last state","",e)}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 dC(e,t,n,r){const i=ah([t[0],t[1]]),o=ah([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,300,500]})}console.log("Source code: https://github.com/graphhopper/graphhopper-maps/tree/e409a24c23ba83383e5550a7068ad70aea00f9eb");const pC=new URL(window.location.href);!function(e,t=!1){if(o&&!t)throw new Error("translation already initialized");e=e.replace("-","_");let n=r,s=Object.keys(n).find((t=>e==t||t.indexOf("_")>0&&e==t.substring(0,t.indexOf("_"))));if(!s){let t=e.length>2?e.substring(0,2):e;s=Object.keys(n).find((e=>e.startsWith(t))),s||(s="en_US",console.warn("cannot find language "+e+" fallback to "+s))}o=new i(s,n[s],n.en_US)}(pC.searchParams.get("locale")||navigator.language);const fC=pC.searchParams.has("key")?pC.searchParams.get("key"):wi.keys.graphhopper;!function(e,t){Ci=new Ai(e,t)}(wi.api,fC||"");const gC=pC.searchParams.get("custom_model"),mC=new Ii(Si(),gC),yC=new Zk(mC);var vC;vC={settingsStore:new class extends Ei{constructor(){super({showDistanceInMiles:!1})}reduce(e,t){return t instanceof gi?{...e,showDistanceInMiles:!e.showDistanceInMiles}:e}},queryStore:mC,routeStore:yC,infoStore:new Kk,errorStore:new Yk,mapOptionsStore:new lC,pathDetailsStore:new uC,mapFeatureStore:new class extends Ei{constructor(){super({point:null,properties:{}})}reduce(e,t){return t instanceof fi?{...e,point:t.point,properties:t.properties}:e}}},Xi=vC.settingsStore,Zi=vC.queryStore,Ki=vC.routeStore,Yi=vC.infoStore,Qi=vC.errorStore,Ji=vC.mapOptionsStore,$i=vC.pathDetailsStore,eo=vC.mapFeatureStore,qx=new Wg({view:new og({enableRotation:!1,multiWorld:!1,constrainResolution:!0,center:ah([10,10]),zoom:2}),controls:cg({zoom:!1,attribution:!0,attributionOptions:{collapsible:!1}})}),qx.once("postrender",(()=>{Gr.dispatch(new li)})),Gr.register(to()),Gr.register(no()),Gr.register(ro()),Gr.register(io()),Gr.register(oo()),Gr.register(so()),Gr.register(ao()),Gr.register(lo());const _C=window.matchMedia("(max-width: 44rem)"),bC=new class{constructor(e,t,n){this.map=e,this.routeStore=t,this.isSmallScreenQuery=n}receive(e){const t=this.isSmallScreenQuery();if(e instanceof ci)dC(this.map,e.bbox,t,[window.innerWidth,window.innerHeight]);else if(e instanceof ui)this.map.getView().animate({zoom:e.zoom,center:ah([e.coordinate.lng,e.coordinate.lat]),duration:400});else if(e instanceof $r){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.request.zoom&&dC(this.map,r,t)}else if(e instanceof ri)dC(this.map,e.path.bbox,t);else if(e instanceof di){const n=e.bbox?e.bbox:this.routeStore.state.selectedPath.bbox;n&&dC(this.map,n,t)}else e instanceof Vr&&("[-180,-90,180,90]"===JSON.stringify(e.result.bbox)||dC(this.map,e.result.bbox,t))}}(Wx(),yC,(()=>_C.matches));Gr.register(bC),Si().infoWithDispatch(),new hC(no(),so()).parseUrlAndReplaceQuery();const xC=document.createElement("div");xC.id="root",xC.style.height="100%",document.body.appendChild(xC),(0,t.s)(xC).render((0,e.jsx)((function(){const[t,n]=(0,l.useState)(to().state),[r,i]=(0,l.useState)(no().state),[o,s]=(0,l.useState)(io().state),[a,u]=(0,l.useState)(ro().state),[c,h]=(0,l.useState)(oo().state),[d,p]=(0,l.useState)(so().state),[f,g]=(0,l.useState)(ao().state),[m,y]=(0,l.useState)(lo().state),v=Wx();(0,l.useEffect)((()=>{const e=()=>n(to().state),t=()=>i(no().state),r=()=>s(io().state),o=()=>u(ro().state),a=()=>h(oo().state),l=()=>p(so().state),c=()=>g(ao().state),d=()=>y(lo().state);return to().register(e),no().register(t),io().register(r),ro().register(o),oo().register(a),so().register(l),ao().register(c),lo().register(d),t(),r(),o(),a(),l(),c(),d(),()=>{to().register(e),no().deregister(t),io().deregister(r),ro().deregister(o),oo().deregister(a),so().deregister(l),ao().deregister(c),lo().deregister(d)}}),[]),function(e,t){(0,l.useEffect)((()=>(ex(e),function(e,t){if("vector"===t.type)!function(e,t,n){if(void 0===n&&(n={}),("string"==typeof e||e instanceof HTMLElement)&&(e=new Wg({target:e})),"string"==typeof t){var r=t.startsWith("data:")?location.href:rb(t,n.accessToken);n=jb(r,n),new Promise((function(i,o){hb(t,n).then((function(t){Jb(t,e,r,n).then((function(){i(e)})).catch(o)})).catch((function(e){o(new Error("Could not load "+t+": "+e.message))}))}))}else new Promise((function(r,i){Jb(t,e,!n.styleUrl||n.styleUrl.startsWith("data:")?location.href:rb(n.styleUrl,n.accessToken),n).then((function(){r(e)})).catch(i)}))}(e,t.url);else{const n=t,r=new Fh({source:new hd({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 Il));e.getTargetElement().style.cursor=n?"pointer":"default"}))}(e),()=>{ex(e)})),[e,t])}(v,d.selectedStyle),function(e,t){(0,l.useEffect)((()=>(qk(e),"[-180,-90,180,90]"!==JSON.stringify(t)&&function(e,t){const n=new Bm({source:new Zm({features:(new ff).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=>ah(e)))}})}),style:new pp({stroke:new ap({color:"#AAAAAA",width:2})})});n.set(Vk,!0),n.setZIndex(.1),e.addLayer(n)}(e,t),()=>{qk(e)})),[e,t])}(v,o.bbox),function(e,t){(0,l.useEffect)((()=>(Fk(e),t&&function(e){const t=new Jm({declutter:!0,source:new ny({attributions:"",format:new bf,url:`${wi.api}mvt/{z}/{x}/{y}.mvt`}),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 pp({stroke:new ap({color:r,width:i})})}}(t,e.getView().getZoomForResolution(n))});t.set(zk,!0),t.setZIndex(.5),e.addLayer(t);const n=new fx({condition:Cg,layers:[t],hitTolerance:5,style:null});n.on("select",(e=>{if(e.selected.length>0){const t=lh(e.mapBrowserEvent.coordinate),n=e.selected[0].getProperties();Gr.dispatch(new fi({lat:t[1],lng:t[0]},n))}else Gr.dispatch(new fi(null,{}))})),e.addInteraction(n)}(e),()=>{Fk(e)})),[e,t])}(v,d.routingGraphEnabled),function(e,t){(0,l.useEffect)((()=>(Gk(e),t&&function(e){const t=new Jm({declutter:!0,source:new ny({attributions:"",format:new bf,url:`${wi.api}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 pp({stroke:new ap({color:n,width:2})})}}(e)});t.set(Bk,!0),t.setZIndex(.6),e.addLayer(t)}(e),()=>{Gk(e)})),[e,t])}(v,d.urbanDensityEnabled),function(e,t,n){(0,l.useEffect)((()=>(yx(e),function(e,t){const n=new Bm({source:new Zm({features:(new ff).readFeatures(vx(t))}),style:()=>new pp({stroke:new ap({color:"#5B616A",width:5,lineCap:"round",lineJoin:"round"})}),opacity:.8});n.set(gx,!0),n.setZIndex(1),e.addLayer(n),function(e){e.getInteractions().getArray().filter((e=>e.get("gh:select_path_interaction"))).forEach((t=>e.removeInteraction(t)))}(e);const r=new fx({condition:xg,layers:[n],style:null,hitTolerance:5});r.on("select",(e=>{const n=e.selected[0].getProperties().index;Gr.dispatch(new ri(t[n]))})),r.set("gh:select_path_interaction",!0),e.addInteraction(r)}(e,t.filter((e=>e!=n))),function(e,t){const n=new Bm({source:new Zm({features:(new ff).readFeatures(_x(t))}),style:()=>new pp({stroke:new ap({color:"#275DAD",width:6,lineCap:"round",lineJoin:"round"})}),opacity:.8});n.set(mx,!0),n.setZIndex(2),e.addLayer(n)}(e,n),()=>{yx(e)})),[e,t,n])}(v,a.routingResult.paths,a.selectedPath),function(e,t){(0,l.useEffect)((()=>{!function(e){e.getLayers().getArray().filter((e=>e.get("gh:query_points"))).forEach((t=>e.removeLayer(t)))}(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 Il({geometry:new Xp(ah([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==Pi.Via?t:void 0,size:35}),n})),r=new Bm({source:new Zm({features:n})});return r.set("gh:query_points",!0),r.setZIndex(3),r.setStyle((e=>new pp({image:new Kd({src:"data:image/svg+xml;utf8,"+cx(e.get("gh:marker_props")),displacement:[0,17.5]})}))),e.addLayer(r),r}(e,t);!function(e){e.getInteractions().getArray().filter((e=>e.get("gh:drag_query_point"))).forEach((t=>e.removeInteraction(t)))}(e),function(e,t){const n=new ux({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=lh(n.getGeometry().getCoordinates()),o={lng:i[0],lat:i[1]};Gr.dispatch(new qr({...r,coordinate:o,queryText:bi(o)},!1))})),n.set("gh:drag_query_point",!0),e.addInteraction(n)}(e,n)}),[e,t])}(v,r.queryPoints),function(e,t){(0,l.useEffect)((()=>(Dx(e),function(e,t){const n=new Bm({source:new Zm({features:(new ff).readFeatures(Nx(t.pathDetailsHighlightedSegments))}),style:()=>new pp({stroke:new ap({color:"red",width:4,lineCap:"round",lineJoin:"round"})})});n.set(Ox,!0),n.setZIndex(3),e.addLayer(n)}(e,t),()=>{Dx(e)})),[e,t])}(v,f);const _=(0,ls.useMediaQuery)({query:"(max-width: 44rem)"});return(0,e.jsx)(zi.Provider,{value:t.showDistanceInMiles,children:(0,e.jsxs)("div",{className:Ui.appWrapper,children:[(0,e.jsx)(Vx,{map:v,pathDetails:f}),(0,e.jsx)(zx,{map:v,route:a,queryPoints:r.queryPoints}),(0,e.jsx)(jk,{map:v,point:m.point,properties:m.properties}),_?(0,e.jsx)(Xk,{query:r,route:a,map:v,mapOptions:d,error:c,info:o}):(0,e.jsx)(Uk,{query:r,route:a,map:v,mapOptions:d,error:c,info:o})]})})}),{}))})()})();