From: Sarah Hoffmann Date: Thu, 14 Apr 2022 19:47:11 +0000 (+0200) Subject: Rebundle latest version X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/commitdiff_plain/161644ac1e2a9ec708e72bc5f33b61657488be2b Rebundle latest version --- diff --git a/dist/build/bundle.css b/dist/build/bundle.css index daa972e..470448a 100644 --- a/dist/build/bundle.css +++ b/dist/build/bundle.css @@ -11263,7 +11263,7 @@ textarea.form-control-lg { } } -/*# sourceMappingURL=bootstrap.css.map */.sidebar.svelte-1d53ob0{width:25%;min-width:200px;padding:15px;padding-top:0;display:block;float:left}#map-wrapper.svelte-1d53ob0{position:relative;height:calc(100vh - 250pt);min-height:300px;width:75%;padding-right:20px;display:block;float:left}@media(max-width: 768px){#content.svelte-1d53ob0{top:0;position:relative}.sidebar.svelte-1d53ob0{width:100%}#map-wrapper.svelte-1d53ob0{width:100%;height:300px;padding-left:20px}}.sidebar.svelte-1d53ob0{width:25%;min-width:200px;padding:15px;padding-top:0;display:block;float:left}#map-wrapper.svelte-1d53ob0{position:relative;height:calc(100vh - 250pt);min-height:300px;width:75%;padding-right:20px;display:block;float:left}@media(max-width: 768px){#content.svelte-1d53ob0{top:0;position:relative}.sidebar.svelte-1d53ob0{width:100%}#map-wrapper.svelte-1d53ob0{width:100%;height:300px;padding-left:20px}}footer.svelte-1f2bd8l.svelte-1f2bd8l{clear:both;font-size:0.8em;text-align:center}footer.svelte-1f2bd8l p.svelte-1f2bd8l{margin:1em}h1.svelte-dl2ttu.svelte-dl2ttu{margin:10px 0;padding-left:8px}h1.svelte-dl2ttu small.svelte-dl2ttu a{font-size:0.5em;white-space:nowrap}h2.svelte-dl2ttu.svelte-dl2ttu{font-size:2em;padding-left:8px;background-color:white}h3.svelte-dl2ttu.svelte-dl2ttu{font-size:1.5em;padding-left:8px}tr.all-columns.svelte-dl2ttu.svelte-dl2ttu{background-color:white !important;border:none}tr.all-columns.svelte-dl2ttu td.svelte-dl2ttu{border-top:none !important;padding-left:0 !important}span.noname{color:#800}#map-wrapper.svelte-dl2ttu.svelte-dl2ttu{width:100%;min-height:auto;height:300px;border:1px solid #666}#about-help.svelte-1l5yrvt{max-width:800px;padding:4em}#map.svelte-1vbvdrk{height:100%;background:#eee}.btn-outline-secondary.svelte-1vbvdrk{background-color:white}.btn-outline-secondary.svelte-1vbvdrk:hover{color:#111}@media(max-width: 768px){#map.svelte-1vbvdrk{height:300px}}label.svelte-1pqxd6v{font-size:0.9rem;margin-top:0.3rem}#switch-coords.svelte-1pqxd6v{font-size:0.6rem;font-weight:bold;cursor:pointer;padding:2px;margin:5px}@media(max-width: 850px){#reverse-lon.svelte-1pqxd6v,#reverse-lat.svelte-1pqxd6v,#reverse-zoom.svelte-1pqxd6v{width:8em}}.navbar-brand.svelte-1q88nx a:hover{text-decoration:none}.navbar-brand.svelte-1q88nx h1.svelte-1q88nx{display:inline;font-size:1.2em;color:#333}.navbar-brand.svelte-1q88nx img.svelte-1q88nx{display:inline-block;margin-right:5px;margin-top:-5px}.nav-item.svelte-1q88nx.svelte-1q88nx{white-space:nowrap}.page-title-section.svelte-1q88nx.svelte-1q88nx{display:none;text-align:center;padding:1em}@media(max-width: 600px){.page-title-section.svelte-1q88nx.svelte-1q88nx{display:block}}.search-section.svelte-1q88nx.svelte-1q88nx{padding:1em 30px;background-color:#f5f5f5;border-top:2px solid #ddd;border-bottom:2px solid #ddd}.result.svelte-5fm7ib.svelte-5fm7ib{font-size:0.8em;margin:5px;margin-top:0px;padding:4px 8px;border-radius:2px;background:#F0F7FF;border:2px solid #D7E7FF;cursor:pointer;min-height:5em}.result.highlight.svelte-5fm7ib.svelte-5fm7ib{background-color:#D9E7F7;border-color:#9DB9E4}.result.highlight.svelte-5fm7ib a{margin:10px auto;display:block;max-width:10em;padding:1px;background-color:white}.result.svelte-5fm7ib .type.svelte-5fm7ib{color:gray;font-size:0.8em}.result.svelte-5fm7ib a{display:none}.result.svelte-5fm7ib .coords.svelte-5fm7ib{display:none}.noresults.svelte-5fm7ib.svelte-5fm7ib{text-align:center;padding:1em}.more.svelte-5fm7ib.svelte-5fm7ib{text-align:center;margin-top:1em}.result.highlight.svelte-5fm7ib a:hover{color:#111}.nav-tabs.svelte-1u2ltgo.svelte-1u2ltgo{font-size:0.8em;margin-top:-1em}.nav-link.svelte-1u2ltgo.svelte-1u2ltgo{padding:0.1rem 1rem}#q.svelte-1u2ltgo.svelte-1u2ltgo{width:500px;max-width:100%}#searchAdvancedOptions.svelte-1u2ltgo ul.svelte-1u2ltgo{list-style-type:none;padding:0;font-size:0.85rem}#searchAdvancedOptions.svelte-1u2ltgo li.svelte-1u2ltgo{display:inline-block;padding:4px 10px;border-radius:5px;border:1px dotted #ccc;margin-right:1em}#searchAdvancedOptions.svelte-1u2ltgo label.svelte-1u2ltgo{margin-right:0.5em}.notused.svelte-6a43i0 td.svelte-6a43i0{color:#ccc}td.svelte-6a43i0.svelte-6a43i0{padding:2px 8px;font-size:0.9em}form.svelte-1kvo9ki .form-control.svelte-1kvo9ki{width:500px;max-width:100%}.form-text.svelte-1kvo9ki em.svelte-1kvo9ki{font-family:monospace;font-style:normal}.mapicon.svelte-180cawe{margin:10px 0}td.svelte-1184nr4{padding:2px 8px;font-size:0.9em}#postcode-hint.svelte-yw4tm0{font-size:0.9em;background-color:#ededff;display:none}.close.svelte-yw4tm0{font-size:1rem}.name.svelte-ndknvb{font-weight:bold;overflow-wrap:anywhere}/* required styles */ +/*# sourceMappingURL=bootstrap.css.map */footer.svelte-1f2bd8l.svelte-1f2bd8l{clear:both;font-size:0.8em;text-align:center}footer.svelte-1f2bd8l p.svelte-1f2bd8l{margin:1em}.sidebar.svelte-1d53ob0{width:25%;min-width:200px;padding:15px;padding-top:0;display:block;float:left}#map-wrapper.svelte-1d53ob0{position:relative;height:calc(100vh - 250pt);min-height:300px;width:75%;padding-right:20px;display:block;float:left}@media(max-width: 768px){#content.svelte-1d53ob0{top:0;position:relative}.sidebar.svelte-1d53ob0{width:100%}#map-wrapper.svelte-1d53ob0{width:100%;height:300px;padding-left:20px}}h1.svelte-dl2ttu.svelte-dl2ttu{margin:10px 0;padding-left:8px}h1.svelte-dl2ttu small.svelte-dl2ttu a{font-size:0.5em;white-space:nowrap}h2.svelte-dl2ttu.svelte-dl2ttu{font-size:2em;padding-left:8px;background-color:white}h3.svelte-dl2ttu.svelte-dl2ttu{font-size:1.5em;padding-left:8px}tr.all-columns.svelte-dl2ttu.svelte-dl2ttu{background-color:white !important;border:none}tr.all-columns.svelte-dl2ttu td.svelte-dl2ttu{border-top:none !important;padding-left:0 !important}span.noname{color:#800}#map-wrapper.svelte-dl2ttu.svelte-dl2ttu{width:100%;min-height:auto;height:300px;border:1px solid #666}.sidebar.svelte-1d53ob0{width:25%;min-width:200px;padding:15px;padding-top:0;display:block;float:left}#map-wrapper.svelte-1d53ob0{position:relative;height:calc(100vh - 250pt);min-height:300px;width:75%;padding-right:20px;display:block;float:left}@media(max-width: 768px){#content.svelte-1d53ob0{top:0;position:relative}.sidebar.svelte-1d53ob0{width:100%}#map-wrapper.svelte-1d53ob0{width:100%;height:300px;padding-left:20px}}#about-help.svelte-1l5yrvt{max-width:800px;padding:4em}.navbar-brand.svelte-1q88nx a:hover{text-decoration:none}.navbar-brand.svelte-1q88nx h1.svelte-1q88nx{display:inline;font-size:1.2em;color:#333}.navbar-brand.svelte-1q88nx img.svelte-1q88nx{display:inline-block;margin-right:5px;margin-top:-5px}.nav-item.svelte-1q88nx.svelte-1q88nx{white-space:nowrap}.page-title-section.svelte-1q88nx.svelte-1q88nx{display:none;text-align:center;padding:1em}@media(max-width: 600px){.page-title-section.svelte-1q88nx.svelte-1q88nx{display:block}}.search-section.svelte-1q88nx.svelte-1q88nx{padding:1em 30px;background-color:#f5f5f5;border-top:2px solid #ddd;border-bottom:2px solid #ddd}.nav-tabs.svelte-1u2ltgo.svelte-1u2ltgo{font-size:0.8em;margin-top:-1em}.nav-link.svelte-1u2ltgo.svelte-1u2ltgo{padding:0.1rem 1rem}#q.svelte-1u2ltgo.svelte-1u2ltgo{width:500px;max-width:100%}#searchAdvancedOptions.svelte-1u2ltgo ul.svelte-1u2ltgo{list-style-type:none;padding:0;font-size:0.85rem}#searchAdvancedOptions.svelte-1u2ltgo li.svelte-1u2ltgo{display:inline-block;padding:4px 10px;border-radius:5px;border:1px dotted #ccc;margin-right:1em}#searchAdvancedOptions.svelte-1u2ltgo label.svelte-1u2ltgo{margin-right:0.5em}.result.svelte-5fm7ib.svelte-5fm7ib{font-size:0.8em;margin:5px;margin-top:0px;padding:4px 8px;border-radius:2px;background:#F0F7FF;border:2px solid #D7E7FF;cursor:pointer;min-height:5em}.result.highlight.svelte-5fm7ib.svelte-5fm7ib{background-color:#D9E7F7;border-color:#9DB9E4}.result.highlight.svelte-5fm7ib a{margin:10px auto;display:block;max-width:10em;padding:1px;background-color:white}.result.svelte-5fm7ib .type.svelte-5fm7ib{color:gray;font-size:0.8em}.result.svelte-5fm7ib a{display:none}.result.svelte-5fm7ib .coords.svelte-5fm7ib{display:none}.noresults.svelte-5fm7ib.svelte-5fm7ib{text-align:center;padding:1em}.more.svelte-5fm7ib.svelte-5fm7ib{text-align:center;margin-top:1em}.result.highlight.svelte-5fm7ib a:hover{color:#111}#map.svelte-1vbvdrk{height:100%;background:#eee}.btn-outline-secondary.svelte-1vbvdrk{background-color:white}.btn-outline-secondary.svelte-1vbvdrk:hover{color:#111}@media(max-width: 768px){#map.svelte-1vbvdrk{height:300px}}.mapicon.svelte-180cawe{margin:10px 0}form.svelte-1kvo9ki .form-control.svelte-1kvo9ki{width:500px;max-width:100%}.form-text.svelte-1kvo9ki em.svelte-1kvo9ki{font-family:monospace;font-style:normal}.notused.svelte-6a43i0 td.svelte-6a43i0{color:#ccc}td.svelte-6a43i0.svelte-6a43i0{padding:2px 8px;font-size:0.9em}#postcode-hint.svelte-yw4tm0{font-size:0.9em;background-color:#ededff;display:none}.close.svelte-yw4tm0{font-size:1rem}td.svelte-1184nr4{padding:2px 8px;font-size:0.9em}.name.svelte-ndknvb{font-weight:bold;overflow-wrap:anywhere}label.svelte-1pqxd6v{font-size:0.9rem;margin-top:0.3rem}#switch-coords.svelte-1pqxd6v{font-size:0.6rem;font-weight:bold;cursor:pointer;padding:2px;margin:5px}@media(max-width: 850px){#reverse-lon.svelte-1pqxd6v,#reverse-lat.svelte-1pqxd6v,#reverse-zoom.svelte-1pqxd6v{width:8em}}/* required styles */ .leaflet-pane, .leaflet-tile, @@ -11903,7 +11903,7 @@ svg.leaflet-image-layer.leaflet-interactive path { margin-left: -12px; border-right-color: #fff; } -.leaflet-control-minimap{border:rgba(255,255,255,1) solid;box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:3px;background:#f8f8f9;transition:all .6s}.leaflet-control-minimap a{background-color:rgba(255,255,255,1);background-repeat:no-repeat;z-index:99999;transition:all .6s}.leaflet-control-minimap a.minimized-bottomright{-webkit-transform:rotate(180deg);transform:rotate(180deg);border-radius:0}.leaflet-control-minimap a.minimized-topleft{-webkit-transform:rotate(0deg);transform:rotate(0deg);border-radius:0}.leaflet-control-minimap a.minimized-bottomleft{-webkit-transform:rotate(270deg);transform:rotate(270deg);border-radius:0}.leaflet-control-minimap a.minimized-topright{-webkit-transform:rotate(90deg);transform:rotate(90deg);border-radius:0}.leaflet-control-minimap-toggle-display{background-image:url(images/toggle.svg);background-size:cover;position:absolute;border-radius:3px 0 0}.leaflet-oldie .leaflet-control-minimap-toggle-display{background-image:url(images/toggle.png)}.leaflet-control-minimap-toggle-display-bottomright{bottom:0;right:0}.leaflet-control-minimap-toggle-display-topleft{top:0;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.leaflet-control-minimap-toggle-display-bottomleft{bottom:0;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.leaflet-control-minimap-toggle-display-topright{top:0;right:0;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.leaflet-oldie .leaflet-control-minimap{border:1px solid #999}.leaflet-oldie .leaflet-control-minimap a{background-color:#fff}.leaflet-oldie .leaflet-control-minimap a.minimized{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}#map-position.svelte-1b30dq3{display:none;position:absolute;top:0;right:20px;padding:0 5px;color:#333;font-size:11px;background-color:rgba(255, 255, 255, 0.7);z-index:1000}#map-position-close.svelte-1b30dq3{text-align:right}@media(max-width: 768px){#map-position.svelte-1b30dq3{top:20px;right:20px}}#last-updated.svelte-1i1228w{position:relative;font-size:0.8rem;font-style:italic}#loading.svelte-1i1228w{display:none;position:absolute;padding:0.5em 1em;top:0;left:0;width:100%;background-color:#eee;z-index:100}/* +.leaflet-control-minimap{border:rgba(255,255,255,1) solid;box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:3px;background:#f8f8f9;transition:all .6s}.leaflet-control-minimap a{background-color:rgba(255,255,255,1);background-repeat:no-repeat;z-index:99999;transition:all .6s}.leaflet-control-minimap a.minimized-bottomright{-webkit-transform:rotate(180deg);transform:rotate(180deg);border-radius:0}.leaflet-control-minimap a.minimized-topleft{-webkit-transform:rotate(0deg);transform:rotate(0deg);border-radius:0}.leaflet-control-minimap a.minimized-bottomleft{-webkit-transform:rotate(270deg);transform:rotate(270deg);border-radius:0}.leaflet-control-minimap a.minimized-topright{-webkit-transform:rotate(90deg);transform:rotate(90deg);border-radius:0}.leaflet-control-minimap-toggle-display{background-image:url(images/toggle.svg);background-size:cover;position:absolute;border-radius:3px 0 0}.leaflet-oldie .leaflet-control-minimap-toggle-display{background-image:url(images/toggle.png)}.leaflet-control-minimap-toggle-display-bottomright{bottom:0;right:0}.leaflet-control-minimap-toggle-display-topleft{top:0;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.leaflet-control-minimap-toggle-display-bottomleft{bottom:0;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.leaflet-control-minimap-toggle-display-topright{top:0;right:0;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.leaflet-oldie .leaflet-control-minimap{border:1px solid #999}.leaflet-oldie .leaflet-control-minimap a{background-color:#fff}.leaflet-oldie .leaflet-control-minimap a.minimized{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}#last-updated.svelte-1i1228w{position:relative;font-size:0.8rem;font-style:italic}#loading.svelte-1i1228w{display:none;position:absolute;padding:0.5em 1em;top:0;left:0;width:100%;background-color:#eee;z-index:100}#map-position.svelte-1b30dq3{display:none;position:absolute;top:0;right:20px;padding:0 5px;color:#333;font-size:11px;background-color:rgba(255, 255, 255, 0.7);z-index:1000}#map-position-close.svelte-1b30dq3{text-align:right}@media(max-width: 768px){#map-position.svelte-1b30dq3{top:20px;right:20px}}/* Svelte allows to set ':global(rule)' in components which get added to the bundle.css file. https://svelte.dev/docs#style But the rules get added to the top of bundle.css, before we load the Bootstrap CSS rules. We want to have our rules at the end of diff --git a/dist/build/bundle.js b/dist/build/bundle.js index 6f9911d..03a81d3 100644 --- a/dist/build/bundle.js +++ b/dist/build/bundle.js @@ -1,4 +1,4 @@ -!function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function i(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,l;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function h(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function u(t){let e;return h(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(h(e,n))}function p(t,e,n,i){if(t){const o=m(t,e,n,i);return t[0](o)}}function m(t,n,i,o){return t[1]&&o?e(i.ctx.slice(),t[1](o(n))):i.ctx}function f(t,e,n,i){if(t[2]&&i){const o=t[2](i(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let i=0;i32){const e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,i)}function k(t){return function(e){return e.preventDefault(),t.call(this,e)}}function M(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function A(t,e){t.value=null==e?"":e}function z(t,e){for(let n=0;n{Y.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}function nt(t,e,n){const i=t.$$.props[e];void 0!==i&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function it(t){t&&t.c()}function ot(t,e,i,r){const{fragment:a,on_mount:l,on_destroy:c,after_update:h}=t.$$;a&&a.m(e,i),r||F((()=>{const e=l.map(n).filter(s);c?c.push(...e):o(e),t.$$.on_mount=[]})),h.forEach(F)}function st(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e){-1===t.$$.dirty[0]&&(D.push(t),W||(W=!0,H.then(K)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const o=i.length?i[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),m&&rt(e,t)),n})):[],p.update(),m=!0,o(p.before_update),p.fragment=!!r&&r(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(b)}else p.fragment&&p.fragment.c();n.intro&&tt(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),K()}N(d)}class lt{$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;(function(){const t=1e6,e=1e3,n="transitionend",i=t=>null==t?`${t}`:{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},s=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e},r=t=>{const e=s(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=s(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:n,transitionDelay:i}=window.getComputedStyle(t);const o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],(Number.parseFloat(n)+Number.parseFloat(i))*e):0},c=t=>{t.dispatchEvent(new Event(n))},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,d=(t,e,n)=>{Object.keys(n).forEach((o=>{const s=n[o],r=e[o],a=r&&h(r)?"element":i(r);if(!new RegExp(s).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${o}" provided type "${a}" but expected type "${s}".`)}))},p=t=>!(!h(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),m=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},v=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},y=[],b=t=>{"loading"===document.readyState?(y.length||document.addEventListener("DOMContentLoaded",(()=>{y.forEach((t=>t()))})),y.push(t)):t()},w=()=>"rtl"===document.documentElement.dir,x=t=>{b((()=>{const e=v();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}}))},$=t=>{"function"==typeof t&&t()},L=(t,e,i=!0)=>{if(!i)return void $(t);const o=5,s=l(e)+o;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(n,a),$(t))};e.addEventListener(n,a),setTimeout((()=>{r||c(e)}),s)},T=(t,e,n,i)=>{let o=t.indexOf(e);if(-1===o)return t[!n&&i?t.length-1:0];const s=t.length;return o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))]},P=/[^.]*(?=\..*)\.|.*/,E=/\..*/,k=/::\d+$/,M={};let C=1;const S={mouseenter:"mouseover",mouseleave:"mouseout"},A=/^(mouseenter|mouseleave)/i,z=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function I(t){const e=O(t);return t.uidEvent=e,M[e]=M[e]||{},M[e]}function N(t,e){return function n(i){return i.delegateTarget=t,n.oneOff&&F.off(t,i.type,e),e.apply(t,[i])}}function B(t,e,n){return function i(o){const s=t.querySelectorAll(e);for(let{target:r}=o;r&&r!==this;r=r.parentNode)for(let a=s.length;a--;)if(s[a]===r)return o.delegateTarget=r,i.oneOff&&F.off(t,o.type,e,n),n.apply(r,[o]);return null}}function D(t,e,n=null){const i=Object.keys(t);for(let o=0,s=i.length;ofunction(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};i?i=t(i):n=t(n)}const[s,r,a]=Z(e,n,i),l=I(t),c=l[a]||(l[a]={}),h=D(c,r,s?n:null);if(h)return void(h.oneOff=h.oneOff&&o);const u=O(r,e.replace(P,"")),d=s?B(t,n,i):N(t,n);d.delegationSelector=s?n:null,d.originalHandler=r,d.oneOff=o,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,s)}function j(t,e,n,i,o){const s=D(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}function H(t,e,n,i){const o=e[n]||{};Object.keys(o).forEach((s=>{if(s.includes(i)){const i=o[s];j(t,e,n,i.originalHandler,i.delegationSelector)}}))}function W(t){return t=t.replace(E,""),S[t]||t}const F={on(t,e,n,i){R(t,e,n,i,!1)},one(t,e,n,i){R(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[o,s,r]=Z(e,n,i),a=r!==e,l=I(t),c=e.startsWith(".");if(void 0!==s){if(!l||!l[r])return;return void j(t,l,r,s,o?n:null)}c&&Object.keys(l).forEach((n=>{H(t,l,n,e.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((n=>{const i=n.replace(k,"");if(!a||e.includes(i)){const e=h[n];j(t,l,r,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=v(),o=W(e),s=e!==o,r=z.has(o);let a,l=!0,c=!0,h=!1,u=null;return s&&i&&(a=i.Event(e,n),i(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(u=document.createEvent("HTMLEvents"),u.initEvent(o,l,!0)):u=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((t=>{Object.defineProperty(u,t,{get:()=>n[t]})})),h&&u.preventDefault(),c&&t.dispatchEvent(u),u.defaultPrevented&&void 0!==a&&a.preventDefault(),u}},q=new Map,U={set(t,e,n){q.has(t)||q.set(t,new Map);const i=q.get(t);i.has(e)||0===i.size?i.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>q.has(t)&&q.get(t).get(e)||null,remove(t,e){if(!q.has(t))return;const n=q.get(t);n.delete(e),0===n.size&&q.delete(t)}},V="5.1.3";class K{constructor(t){(t=u(t))&&(this._element=t,U.set(this._element,this.constructor.DATA_KEY,this))}dispose(){U.remove(this._element,this.constructor.DATA_KEY),F.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}_queueCallback(t,e,n=!0){L(t,e,n)}static getInstance(t){return U.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return V}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const G=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;F.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),m(this))return;const o=a(this)||this.closest(`.${i}`);t.getOrCreateInstance(o)[e]()}))},Y="alert",X=".bs.alert",J=`close${X}`,Q=`closed${X}`,tt="fade",et="show";class nt extends K{static get NAME(){return Y}close(){if(F.trigger(this._element,J).defaultPrevented)return;this._element.classList.remove(et);const t=this._element.classList.contains(tt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),F.trigger(this._element,Q),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=nt.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(nt,"close"),x(nt);const it="button",ot="active",st='[data-bs-toggle="button"]',rt="click.bs.button.data-api";class at extends K{static get NAME(){return it}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(ot))}static jQueryInterface(t){return this.each((function(){const e=at.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function lt(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function ct(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}F.on(document,rt,st,(t=>{t.preventDefault();const e=t.target.closest(st);at.getOrCreateInstance(e).toggle()})),x(at);const ht={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${ct(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ct(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter((t=>t.startsWith("bs"))).forEach((n=>{let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=lt(t.dataset[n])})),e},getDataAttribute:(t,e)=>lt(t.getAttribute(`data-bs-${ct(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},ut=3,dt={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&i.nodeType!==ut;)i.matches(e)&&n.push(i),i=i.parentNode;return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(", ");return this.find(e,t).filter((t=>!m(t)&&p(t)))}},pt="carousel",mt=".bs.carousel",ft=".data-api",_t=500,gt=40,vt={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},yt={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},bt="next",wt="prev",xt="left",$t="right",Lt={ArrowLeft:$t,ArrowRight:xt},Tt=`slide${mt}`,Pt=`slid${mt}`,Et=`keydown${mt}`,kt=`mouseenter${mt}`,Mt=`mouseleave${mt}`,Ct=`touchstart${mt}`,St=`touchmove${mt}`,At=`touchend${mt}`,zt=`pointerdown${mt}`,Ot=`pointerup${mt}`,It=`dragstart${mt}`,Nt=`load${mt}${ft}`,Bt=`click${mt}${ft}`,Dt="carousel",Zt="active",Rt="slide",jt="carousel-item-end",Ht="carousel-item-start",Wt="carousel-item-next",Ft="carousel-item-prev",qt="pointer-event",Ut=".active",Vt=".active.carousel-item",Kt=".carousel-item",Gt=".carousel-item img",Yt=".carousel-item-next, .carousel-item-prev",Xt=".carousel-indicators",Jt="[data-bs-target]",Qt="[data-bs-slide], [data-bs-slide-to]",te='[data-bs-ride="carousel"]',ee="touch",ne="pen";class ie extends K{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=dt.findOne(Xt,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return vt}static get NAME(){return pt}next(){this._slide(bt)}nextWhenVisible(){!document.hidden&&p(this._element)&&this.next()}prev(){this._slide(wt)}pause(t){t||(this._isPaused=!0),dt.findOne(Yt,this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=dt.findOne(Vt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void F.one(this._element,Pt,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const n=t>e?bt:wt;this._slide(n,this._items[t])}_getConfig(t){return t={...vt,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(pt,t,yt),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=gt)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?$t:xt)}_addEventListeners(){this._config.keyboard&&F.on(this._element,Et,(t=>this._keydown(t))),"hover"===this._config.pause&&(F.on(this._element,kt,(t=>this.pause(t))),F.on(this._element,Mt,(t=>this.cycle(t)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&(t.pointerType===ne||t.pointerType===ee),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},n=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},i=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),_t+this._config.interval))};dt.find(Gt,this._element).forEach((t=>{F.on(t,It,(t=>t.preventDefault()))})),this._pointerEvent?(F.on(this._element,zt,(t=>e(t))),F.on(this._element,Ot,(t=>i(t))),this._element.classList.add(qt)):(F.on(this._element,Ct,(t=>e(t))),F.on(this._element,St,(t=>n(t))),F.on(this._element,At,(t=>i(t))))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Lt[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?dt.find(Kt,t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const n=t===bt;return T(this._items,e,n,this._config.wrap)}_triggerSlideEvent(t,e){const n=this._getItemIndex(t),i=this._getItemIndex(dt.findOne(Vt,this._element));return F.trigger(this._element,Tt,{relatedTarget:t,direction:e,from:i,to:n})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=dt.findOne(Ut,this._indicatorsElement);e.classList.remove(Zt),e.removeAttribute("aria-current");const n=dt.find(Jt,this._indicatorsElement);for(let e=0;e{F.trigger(this._element,Pt,{relatedTarget:s,direction:u,from:o,to:r})};if(this._element.classList.contains(Rt)){s.classList.add(h),g(s),i.classList.add(c),s.classList.add(c);const t=()=>{s.classList.remove(c,h),s.classList.add(Zt),i.classList.remove(Zt,h,c),this._isSliding=!1,setTimeout(d,0)};this._queueCallback(t,i,!0)}else i.classList.remove(Zt),s.classList.add(Zt),this._isSliding=!1,d();a&&this.cycle()}_directionToOrder(t){return[$t,xt].includes(t)?w()?t===xt?wt:bt:t===xt?bt:wt:t}_orderToDirection(t){return[bt,wt].includes(t)?w()?t===wt?xt:$t:t===wt?$t:xt:t}static carouselInterface(t,e){const n=ie.getOrCreateInstance(t,e);let{_config:i}=n;"object"==typeof e&&(i={...i,...e});const o="string"==typeof e?e:i.slide;if("number"==typeof e)n.to(e);else if("string"==typeof o){if(void 0===n[o])throw new TypeError(`No method named "${o}"`);n[o]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}static jQueryInterface(t){return this.each((function(){ie.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=a(this);if(!e||!e.classList.contains(Dt))return;const n={...ht.getDataAttributes(e),...ht.getDataAttributes(this)},i=this.getAttribute("data-bs-slide-to");i&&(n.interval=!1),ie.carouselInterface(e,n),i&&ie.getInstance(e).to(i),t.preventDefault()}}F.on(document,Bt,Qt,ie.dataApiClickHandler),F.on(window,Nt,(()=>{const t=dt.find(te);for(let e=0,n=t.length;et===this._element));null!==i&&o.length&&(this._selector=i,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ae}static get NAME(){return oe}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=dt.find(ve,this._config.parent);e=dt.find(xe,this._config.parent).filter((e=>!t.includes(e)))}const n=dt.findOne(this._selector);if(e.length){const i=e.find((t=>n!==t));if(t=i?Le.getInstance(i):null,t&&t._isTransitioning)return}if(F.trigger(this._element,ce).defaultPrevented)return;e.forEach((e=>{n!==e&&Le.getOrCreateInstance(e,{toggle:!1}).hide(),t||U.set(e,se,null)}));const i=this._getDimension();this._element.classList.remove(fe),this._element.classList.add(_e),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(_e),this._element.classList.add(fe,me),this._element.style[i]="",F.trigger(this._element,he)},s=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[i]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(F.trigger(this._element,ue).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(_e),this._element.classList.remove(fe,me);const e=this._triggerArray.length;for(let t=0;t{this._isTransitioning=!1,this._element.classList.remove(_e),this._element.classList.add(fe),F.trigger(this._element,de)};this._element.style[t]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(me)}_getConfig(t){return(t={...ae,...ht.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=u(t.parent),d(oe,t,le),t}_getDimension(){return this._element.classList.contains(ye)?be:we}_initializeChildren(){if(!this._config.parent)return;const t=dt.find(ve,this._config.parent);dt.find($e,this._config.parent).filter((e=>!t.includes(e))).forEach((t=>{const e=a(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}))}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach((t=>{e?t.classList.remove(ge):t.classList.add(ge),t.setAttribute("aria-expanded",e)}))}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const n=Le.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}F.on(document,pe,$e,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this);dt.find(e).forEach((t=>{Le.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),x(Le);var Te="top",Pe="bottom",Ee="right",ke="left",Me="auto",Ce=[Te,Pe,Ee,ke],Se="start",Ae="end",ze="clippingParents",Oe="viewport",Ie="popper",Ne="reference",Be=Ce.reduce((function(t,e){return t.concat([e+"-"+Se,e+"-"+Ae])}),[]),De=[].concat(Ce,[Me]).reduce((function(t,e){return t.concat([e,e+"-"+Se,e+"-"+Ae])}),[]),Ze="beforeRead",Re="read",je="afterRead",He="beforeMain",We="main",Fe="afterMain",qe="beforeWrite",Ue="write",Ve="afterWrite",Ke=[Ze,Re,je,He,We,Fe,qe,Ue,Ve];function Ge(t){return t?(t.nodeName||"").toLowerCase():null}function Ye(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Xe(t){return t instanceof Ye(t).Element||t instanceof Element}function Je(t){return t instanceof Ye(t).HTMLElement||t instanceof HTMLElement}function Qe(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ye(t).ShadowRoot||t instanceof ShadowRoot)}function tn(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];Je(o)&&Ge(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))}function en(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],o=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});Je(i)&&Ge(i)&&(Object.assign(i.style,s),Object.keys(o).forEach((function(t){i.removeAttribute(t)})))}))}}const nn={name:"applyStyles",enabled:!0,phase:"write",fn:tn,effect:en,requires:["computeStyles"]};function on(t){return t.split("-")[0]}function sn(t,e){var n=t.getBoundingClientRect(),i=1,o=1;return{width:n.width/i,height:n.height/o,top:n.top/o,right:n.right/i,bottom:n.bottom/o,left:n.left/i,x:n.left/i,y:n.top/o}}function rn(t){var e=sn(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function an(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Qe(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ln(t){return Ye(t).getComputedStyle(t)}function cn(t){return["table","td","th"].indexOf(Ge(t))>=0}function hn(t){return((Xe(t)?t.ownerDocument:t.document)||window.document).documentElement}function un(t){return"html"===Ge(t)?t:t.assignedSlot||t.parentNode||(Qe(t)?t.host:null)||hn(t)}function dn(t){return Je(t)&&"fixed"!==ln(t).position?t.offsetParent:null}function pn(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Je(t)&&"fixed"===ln(t).position)return null;for(var n=un(t);Je(n)&&["html","body"].indexOf(Ge(n))<0;){var i=ln(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function mn(t){for(var e=Ye(t),n=dn(t);n&&cn(n)&&"static"===ln(n).position;)n=dn(n);return n&&("html"===Ge(n)||"body"===Ge(n)&&"static"===ln(n).position)?e:n||pn(t)||e}function fn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var _n=Math.max,gn=Math.min,vn=Math.round;function yn(t,e,n){return _n(t,gn(e,n))}function bn(){return{top:0,right:0,bottom:0,left:0}}function wn(t){return Object.assign({},bn(),t)}function xn(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var $n=function(t,e){return wn("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:xn(t,Ce))};function Ln(t){var e,n=t.state,i=t.name,o=t.options,s=n.elements.arrow,r=n.modifiersData.popperOffsets,a=on(n.placement),l=fn(a),c=[ke,Ee].indexOf(a)>=0?"height":"width";if(s&&r){var h=$n(o.padding,n),u=rn(s),d="y"===l?Te:ke,p="y"===l?Pe:Ee,m=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],f=r[l]-n.rects.reference[l],_=mn(s),g=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,v=m/2-f/2,y=h[d],b=g-u[c]-h[p],w=g/2-u[c]/2+v,x=yn(y,w,b),$=l;n.modifiersData[i]=((e={})[$]=x,e.centerOffset=x-w,e)}}function Tn(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&an(e.elements.popper,i)&&(e.elements.arrow=i)}const Pn={name:"arrow",enabled:!0,phase:"main",fn:Ln,effect:Tn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function En(t){return t.split("-")[1]}var kn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mn(t){var e=t.x,n=t.y,i=window.devicePixelRatio||1;return{x:vn(vn(e*i)/i)||0,y:vn(vn(n*i)/i)||0}}function Cn(t){var e,n=t.popper,i=t.popperRect,o=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=!0===h?Mn(r):"function"==typeof h?h(r):r,d=u.x,p=void 0===d?0:d,m=u.y,f=void 0===m?0:m,_=r.hasOwnProperty("x"),g=r.hasOwnProperty("y"),v=ke,y=Te,b=window;if(c){var w=mn(n),x="clientHeight",$="clientWidth";w===Ye(n)&&"static"!==ln(w=hn(n)).position&&"absolute"===a&&(x="scrollHeight",$="scrollWidth"),w=w,o!==Te&&(o!==ke&&o!==Ee||s!==Ae)||(y=Pe,f-=w[x]-i.height,f*=l?1:-1),o!==ke&&(o!==Te&&o!==Pe||s!==Ae)||(v=Ee,p-=w[$]-i.width,p*=l?1:-1)}var L,T=Object.assign({position:a},c&&kn);return l?Object.assign({},T,((L={})[y]=g?"0":"",L[v]=_?"0":"",L.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",L)):Object.assign({},T,((e={})[y]=g?f+"px":"",e[v]=_?p+"px":"",e.transform="",e))}function Sn(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,s=n.adaptive,r=void 0===s||s,a=n.roundOffsets,l=void 0===a||a,c={placement:on(e.placement),variation:En(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Cn(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Cn(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const An={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Sn,data:{}};var zn={passive:!0};function On(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,s=void 0===o||o,r=i.resize,a=void 0===r||r,l=Ye(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach((function(t){t.addEventListener("scroll",n.update,zn)})),a&&l.addEventListener("resize",n.update,zn),function(){s&&c.forEach((function(t){t.removeEventListener("scroll",n.update,zn)})),a&&l.removeEventListener("resize",n.update,zn)}}const In={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:On,data:{}};var Nn={left:"right",right:"left",bottom:"top",top:"bottom"};function Bn(t){return t.replace(/left|right|bottom|top/g,(function(t){return Nn[t]}))}var Dn={start:"end",end:"start"};function Zn(t){return t.replace(/start|end/g,(function(t){return Dn[t]}))}function Rn(t){var e=Ye(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function jn(t){return sn(hn(t)).left+Rn(t).scrollLeft}function Hn(t){var e=Ye(t),n=hn(t),i=e.visualViewport,o=n.clientWidth,s=n.clientHeight,r=0,a=0;return i&&(o=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=i.offsetLeft,a=i.offsetTop)),{width:o,height:s,x:r+jn(t),y:a}}function Wn(t){var e,n=hn(t),i=Rn(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=_n(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=_n(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+jn(t),l=-i.scrollTop;return"rtl"===ln(o||n).direction&&(a+=_n(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Fn(t){var e=ln(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function qn(t){return["html","body","#document"].indexOf(Ge(t))>=0?t.ownerDocument.body:Je(t)&&Fn(t)?t:qn(un(t))}function Un(t,e){var n;void 0===e&&(e=[]);var i=qn(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),s=Ye(i),r=o?[s].concat(s.visualViewport||[],Fn(i)?i:[]):i,a=e.concat(r);return o?a:a.concat(Un(un(r)))}function Vn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Kn(t){var e=sn(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Gn(t,e){return e===Oe?Vn(Hn(t)):Je(e)?Kn(e):Vn(Wn(hn(t)))}function Yn(t){var e=Un(un(t)),n=["absolute","fixed"].indexOf(ln(t).position)>=0&&Je(t)?mn(t):t;return Xe(n)?e.filter((function(t){return Xe(t)&&an(t,n)&&"body"!==Ge(t)})):[]}function Xn(t,e,n){var i="clippingParents"===e?Yn(t):[].concat(e),o=[].concat(i,[n]),s=o[0],r=o.reduce((function(e,n){var i=Gn(t,n);return e.top=_n(i.top,e.top),e.right=gn(i.right,e.right),e.bottom=gn(i.bottom,e.bottom),e.left=_n(i.left,e.left),e}),Gn(t,s));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function Jn(t){var e,n=t.reference,i=t.element,o=t.placement,s=o?on(o):null,r=o?En(o):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(s){case Te:e={x:a,y:n.y-i.height};break;case Pe:e={x:a,y:n.y+n.height};break;case Ee:e={x:n.x+n.width,y:l};break;case ke:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=s?fn(s):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Se:e[c]=e[c]-(n[h]/2-i[h]/2);break;case Ae:e[c]=e[c]+(n[h]/2-i[h]/2)}}return e}function Qn(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=void 0===i?t.placement:i,s=n.boundary,r=void 0===s?ze:s,a=n.rootBoundary,l=void 0===a?Oe:a,c=n.elementContext,h=void 0===c?Ie:c,u=n.altBoundary,d=void 0!==u&&u,p=n.padding,m=void 0===p?0:p,f=wn("number"!=typeof m?m:xn(m,Ce)),_=h===Ie?Ne:Ie,g=t.rects.popper,v=t.elements[d?_:h],y=Xn(Xe(v)?v:v.contextElement||hn(t.elements.popper),r,l),b=sn(t.elements.reference),w=Jn({reference:b,element:g,strategy:"absolute",placement:o}),x=Vn(Object.assign({},g,w)),$=h===Ie?x:b,L={top:y.top-$.top+f.top,bottom:$.bottom-y.bottom+f.bottom,left:y.left-$.left+f.left,right:$.right-y.right+f.right},T=t.modifiersData.offset;if(h===Ie&&T){var P=T[o];Object.keys(L).forEach((function(t){var e=[Ee,Pe].indexOf(t)>=0?1:-1,n=[Te,Pe].indexOf(t)>=0?"y":"x";L[t]+=P[n]*e}))}return L}function ti(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?De:l,h=En(i),u=h?a?Be:Be.filter((function(t){return En(t)===h})):Ce,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,n){return e[n]=Qn(t,{placement:n,boundary:o,rootBoundary:s,padding:r})[on(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function ei(t){if(on(t)===Me)return[];var e=Bn(t);return[Zn(t),e,Zn(e)]}function ni(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,h=n.boundary,u=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=void 0===p||p,f=n.allowedAutoPlacements,_=e.options.placement,g=on(_),v=l||(g!==_&&m?ei(_):[Bn(_)]),y=[_].concat(v).reduce((function(t,n){return t.concat(on(n)===Me?ti(e,{placement:n,boundary:h,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)}),[]),b=e.rects.reference,w=e.rects.popper,x=new Map,$=!0,L=y[0],T=0;T=0,C=M?"width":"height",S=Qn(e,{placement:P,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),A=M?k?Ee:ke:k?Pe:Te;b[C]>w[C]&&(A=Bn(A));var z=Bn(A),O=[];if(s&&O.push(S[E]<=0),a&&O.push(S[A]<=0,S[z]<=0),O.every((function(t){return t}))){L=P,$=!1;break}x.set(P,O)}if($)for(var I=function(t){var e=y.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return L=e,"break"},N=m?3:1;N>0&&"break"!==I(N);N--);e.placement!==L&&(e.modifiersData[i]._skip=!0,e.placement=L,e.reset=!0)}}const ii={name:"flip",enabled:!0,phase:"main",fn:ni,requiresIfExists:["offset"],data:{_skip:!1}};function oi(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function si(t){return[Te,Ee,Pe,ke].some((function(e){return t[e]>=0}))}function ri(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,r=Qn(e,{elementContext:"reference"}),a=Qn(e,{altBoundary:!0}),l=oi(r,i),c=oi(a,o,s),h=si(l),u=si(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}const ai={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ri};function li(t,e,n){var i=on(t),o=[ke,Te].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[ke,Ee].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function ci(t){var e=t.state,n=t.options,i=t.name,o=n.offset,s=void 0===o?[0,0]:o,r=De.reduce((function(t,n){return t[n]=li(n,e.rects,s),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}const hi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ci};function ui(t){var e=t.state,n=t.name;e.modifiersData[n]=Jn({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const di={name:"popperOffsets",enabled:!0,phase:"read",fn:ui,data:{}};function pi(t){return"x"===t?"y":"x"}function mi(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0!==r&&r,l=n.boundary,c=n.rootBoundary,h=n.altBoundary,u=n.padding,d=n.tether,p=void 0===d||d,m=n.tetherOffset,f=void 0===m?0:m,_=Qn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),g=on(e.placement),v=En(e.placement),y=!v,b=fn(g),w=pi(b),x=e.modifiersData.popperOffsets,$=e.rects.reference,L=e.rects.popper,T="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,P={x:0,y:0};if(x){if(s||a){var E="y"===b?Te:ke,k="y"===b?Pe:Ee,M="y"===b?"height":"width",C=x[b],S=x[b]+_[E],A=x[b]-_[k],z=p?-L[M]/2:0,O=v===Se?$[M]:L[M],I=v===Se?-L[M]:-$[M],N=e.elements.arrow,B=p&&N?rn(N):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:bn(),Z=D[E],R=D[k],j=yn(0,$[M],B[M]),H=y?$[M]/2-z-j-Z-T:O-j-Z-T,W=y?-$[M]/2+z+j+R+T:I+j+R+T,F=e.elements.arrow&&mn(e.elements.arrow),q=F?"y"===b?F.clientTop||0:F.clientLeft||0:0,U=e.modifiersData.offset?e.modifiersData.offset[e.placement][b]:0,V=x[b]+H-U-q,K=x[b]+W-U;if(s){var G=yn(p?gn(S,V):S,C,p?_n(A,K):A);x[b]=G,P[b]=G-C}if(a){var Y="x"===b?Te:ke,X="x"===b?Pe:Ee,J=x[w],Q=J+_[Y],tt=J-_[X],et=yn(p?gn(Q,V):Q,J,p?_n(tt,K):tt);x[w]=et,P[w]=et-J}}e.modifiersData[i]=P}}const fi={name:"preventOverflow",enabled:!0,phase:"main",fn:mi,requiresIfExists:["offset"]};function _i(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function gi(t){return t!==Ye(t)&&Je(t)?_i(t):Rn(t)}function vi(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,i=e.height/t.offsetHeight||1;return 1!==n||1!==i}function yi(t,e,n){void 0===n&&(n=!1);var i=Je(e);Je(e)&&vi(e);var o=hn(e),s=sn(t),r={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(i||!i&&!n)&&(("body"!==Ge(e)||Fn(o))&&(r=gi(e)),Je(e)?((a=sn(e)).x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=jn(o))),{x:s.left+r.scrollLeft-a.x,y:s.top+r.scrollTop-a.y,width:s.width,height:s.height}}function bi(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),i}function wi(t){var e=bi(t);return Ke.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}function xi(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function $i(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Li={placement:"bottom",modifiers:[],strategy:"absolute"};function Ti(){for(var t=arguments.length,e=new Array(t),n=0;nF.on(t,"mouseover",_))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ki),this._element.classList.add(Ki),F.trigger(this._element,Fi,t)}hide(){if(m(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){F.trigger(this._element,ji,t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>F.off(t,"mouseover",_))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Ki),this._element.classList.remove(Ki),this._element.setAttribute("aria-expanded","false"),ht.removeDataAttribute(this._menu,"popper"),F.trigger(this._element,Hi,t))}_getConfig(t){if(t={...this.constructor.Default,...ht.getDataAttributes(this._element),...t},d(Si,t,this.constructor.DefaultType),"object"==typeof t.reference&&!h(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Si.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===Ci)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:h(this._config.reference)?e=u(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const n=this._getPopperConfig(),i=n.modifiers.find((t=>"applyStyles"===t.name&&!1===t.enabled));this._popper=Mi(e,this._menu,n),i&&ht.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Ki)}_getMenuElement(){return dt.next(this._element,to)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains(Yi))return ao;if(t.classList.contains(Xi))return lo;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(Gi)?e?oo:io:e?ro:so}_detectNavbar(){return null!==this._element.closest(`.${Ji}`)}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=dt.find(no,this._menu).filter(p);n.length&&T(n,e,t===Di,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=uo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(t.button===Zi||"keyup"===t.type&&t.key!==Ni))return;const e=dt.find(Qi);for(let n=0,i=e.length;ne+t)),this._setElementAttributes(po,"paddingRight",(e=>e+t)),this._setElementAttributes(mo,"marginRight",(e=>e-t))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth(),o=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t)[e];t.style[e]=`${n(Number.parseFloat(o))}px`};this._applyManipulationCallback(t,o)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(po,"paddingRight"),this._resetElementAttributes(mo,"marginRight")}_saveInitialAttribute(t,e){const n=t.style[e];n&&ht.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){const n=t=>{const n=ht.getDataAttribute(t,e);void 0===n?t.style.removeProperty(e):(ht.removeDataAttribute(t,e),t.style[e]=n)};this._applyManipulationCallback(t,n)}_applyManipulationCallback(t,e){h(t)?e(t):dt.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const _o={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},go={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},vo="backdrop",yo="fade",bo="show",wo=`mousedown.bs.${vo}`;class xo{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&g(this._getElement()),this._getElement().classList.add(bo),this._emulateAnimation((()=>{$(t)}))):$(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(bo),this._emulateAnimation((()=>{this.dispose(),$(t)}))):$(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(yo),this._element=t}return this._element}_getConfig(t){return(t={..._o,..."object"==typeof t?t:{}}).rootElement=u(t.rootElement),d(vo,t,go),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),F.on(this._getElement(),wo,(()=>{$(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&(F.off(this._element,wo),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){L(t,this._getElement(),this._config.isAnimated)}}const $o={trapElement:null,autofocus:!0},Lo={trapElement:"element",autofocus:"boolean"},To="focustrap",Po=".bs.focustrap",Eo=`focusin${Po}`,ko=`keydown.tab${Po}`,Mo="Tab",Co="forward",So="backward";class Ao{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),F.off(document,Po),F.on(document,Eo,(t=>this._handleFocusin(t))),F.on(document,ko,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,F.off(document,Po))}_handleFocusin(t){const{target:e}=t,{trapElement:n}=this._config;if(e===document||e===n||n.contains(e))return;const i=dt.focusableChildren(n);0===i.length?n.focus():this._lastTabNavDirection===So?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Mo&&(this._lastTabNavDirection=t.shiftKey?So:Co)}_getConfig(t){return t={...$o,..."object"==typeof t?t:{}},d(To,t,Lo),t}}const zo="modal",Oo=".bs.modal",Io="Escape",No={backdrop:!0,keyboard:!0,focus:!0},Bo={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Do=`hide${Oo}`,Zo=`hidePrevented${Oo}`,Ro=`hidden${Oo}`,jo=`show${Oo}`,Ho=`shown${Oo}`,Wo=`resize${Oo}`,Fo=`click.dismiss${Oo}`,qo=`keydown.dismiss${Oo}`,Uo=`mouseup.dismiss${Oo}`,Vo=`mousedown.dismiss${Oo}`,Ko=`click${Oo}.data-api`,Go="modal-open",Yo="fade",Xo="show",Jo="modal-static",Qo=".modal.show",ts=".modal-dialog",es=".modal-body",ns='[data-bs-toggle="modal"]';class is extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=dt.findOne(ts,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new fo}static get Default(){return No}static get NAME(){return zo}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||F.trigger(this._element,jo,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Go),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),F.on(this._dialog,Vo,(()=>{F.one(this._element,Uo,(t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;if(F.trigger(this._element,Do).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(Xo),F.off(this._element,Fo),F.off(this._dialog,Vo),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((t=>F.off(t,Oo))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new xo({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ao({trapElement:this._element})}_getConfig(t){return t={...No,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(zo,t,Bo),t}_showElement(t){const e=this._isAnimated(),n=dt.findOne(es,this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,n&&(n.scrollTop=0),e&&g(this._element),this._element.classList.add(Xo);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,F.trigger(this._element,Ho,{relatedTarget:t})};this._queueCallback(i,this._dialog,e)}_setEscapeEvent(){this._isShown?F.on(this._element,qo,(t=>{this._config.keyboard&&t.key===Io?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==Io||this._triggerBackdropTransition()})):F.off(this._element,qo)}_setResizeEvent(){this._isShown?F.on(window,Wo,(()=>this._adjustDialog())):F.off(window,Wo)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Go),this._resetAdjustments(),this._scrollBar.reset(),F.trigger(this._element,Ro)}))}_showBackdrop(t){F.on(this._element,Fo,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains(Yo)}_triggerBackdropTransition(){if(F.trigger(this._element,Zo).defaultPrevented)return;const{classList:t,scrollHeight:e,style:n}=this._element,i=e>document.documentElement.clientHeight;!i&&"hidden"===n.overflowY||t.contains(Jo)||(i||(n.overflowY="hidden"),t.add(Jo),this._queueCallback((()=>{t.remove(Jo),i||this._queueCallback((()=>{n.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;(!n&&t&&!w()||n&&!t&&w())&&(this._element.style.paddingLeft=`${e}px`),(n&&!t&&!w()||!n&&t&&w())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}F.on(document,Ko,ns,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),F.one(e,jo,(t=>{t.defaultPrevented||F.one(e,Ro,(()=>{p(this)&&this.focus()}))}));const n=dt.findOne(Qo);n&&is.getInstance(n).hide(),is.getOrCreateInstance(e).toggle(this)})),G(is),x(is);const os="offcanvas",ss=".bs.offcanvas",rs=".data-api",as=`load${ss}${rs}`,ls="Escape",cs={backdrop:!0,keyboard:!0,scroll:!1},hs={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},us="show",ds="offcanvas-backdrop",ps=".offcanvas.show",ms=`show${ss}`,fs=`shown${ss}`,_s=`hide${ss}`,gs=`hidden${ss}`,vs=`click${ss}${rs}`,ys=`keydown.dismiss${ss}`,bs='[data-bs-toggle="offcanvas"]';class ws extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return os}static get Default(){return cs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(F.trigger(this._element,ms,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new fo).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(us);const e=()=>{this._config.scroll||this._focustrap.activate(),F.trigger(this._element,fs,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(F.trigger(this._element,_s).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(us),this._backdrop.hide();const t=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new fo).reset(),F.trigger(this._element,gs)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...cs,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(os,t,hs),t}_initializeBackDrop(){return new xo({className:ds,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ao({trapElement:this._element})}_addEventListeners(){F.on(this._element,ys,(t=>{this._config.keyboard&&t.key===ls&&this.hide()}))}static jQueryInterface(t){return this.each((function(){const e=ws.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}F.on(document,vs,bs,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this))return;F.one(e,gs,(()=>{p(this)&&this.focus()}));const n=dt.findOne(ps);n&&n!==e&&ws.getInstance(n).hide(),ws.getOrCreateInstance(e).toggle(this)})),F.on(window,as,(()=>dt.find(ps).forEach((t=>ws.getOrCreateInstance(t).show())))),G(ws),x(ws);const xs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),$s=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ls=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ts=(t,e)=>{const n=t.nodeName.toLowerCase();if(e.includes(n))return!xs.has(n)||Boolean($s.test(t.nodeValue)||Ls.test(t.nodeValue));const i=e.filter((t=>t instanceof RegExp));for(let t=0,e=i.length;t{Ts(t,r)||n.removeAttribute(t.nodeName)}))}return i.body.innerHTML}const ks="tooltip",Ms=".bs.tooltip",Cs="bs-tooltip",Ss=new Set(["sanitize","allowList","sanitizeFn"]),As={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},zs={AUTO:"auto",TOP:"top",RIGHT:w()?"left":"right",BOTTOM:"bottom",LEFT:w()?"right":"left"},Os={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:Ps,popperConfig:null},Is={HIDE:`hide${Ms}`,HIDDEN:`hidden${Ms}`,SHOW:`show${Ms}`,SHOWN:`shown${Ms}`,INSERTED:`inserted${Ms}`,CLICK:`click${Ms}`,FOCUSIN:`focusin${Ms}`,FOCUSOUT:`focusout${Ms}`,MOUSEENTER:`mouseenter${Ms}`,MOUSELEAVE:`mouseleave${Ms}`},Ns="fade",Bs="show",Ds="show",Zs="out",Rs=".tooltip-inner",js=".modal",Hs="hide.bs.modal",Ws="hover",Fs="focus",qs="click",Us="manual";class Vs extends K{constructor(t,e){if(void 0===Ci)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Os}static get NAME(){return ks}static get Event(){return Is}static get DefaultType(){return As}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Bs))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),F.off(this._element.closest(js),Hs,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=F.trigger(this._element,this.constructor.Event.SHOW),e=f(this._element),n=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!n)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Rs).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const i=this.getTipElement(),s=o(this.constructor.NAME);i.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&i.classList.add(Ns);const r="function"==typeof this._config.placement?this._config.placement.call(this,i,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;U.set(i,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(i),F.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Mi(this._element,i,this._getPopperConfig(a)),i.classList.add(Bs);const c=this._resolvePossibleFunction(this._config.customClass);c&&i.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{F.on(t,"mouseover",_)}));const h=()=>{const t=this._hoverState;this._hoverState=null,F.trigger(this._element,this.constructor.Event.SHOWN),t===Zs&&this._leave(null,this)},u=this.tip.classList.contains(Ns);this._queueCallback(h,this.tip,u)}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==Ds&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),F.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(F.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Bs),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>F.off(t,"mouseover",_))),this._activeTrigger[qs]=!1,this._activeTrigger[Fs]=!1,this._activeTrigger[Ws]=!1;const n=this.tip.classList.contains(Ns);this._queueCallback(e,this.tip,n),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Ns,Bs),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Rs)}_sanitizeAndSetContent(t,e,n){const i=dt.findOne(n,t);e||!i?this.setElementContent(i,e):i.remove()}setElementContent(t,e){if(null!==t)return h(e)?(e=u(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=Es(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return zs[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((t=>{if("click"===t)F.on(this._element,this.constructor.Event.CLICK,this._config.selector,(t=>this.toggle(t)));else if(t!==Us){const e=t===Ws?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,n=t===Ws?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;F.on(this._element,e,this._config.selector,(t=>this._enter(t))),F.on(this._element,n,this._config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},F.on(this._element.closest(js),Hs,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?Fs:Ws]=!0),e.getTipElement().classList.contains(Bs)||e._hoverState===Ds?e._hoverState=Ds:(clearTimeout(e._timeout),e._hoverState=Ds,e._config.delay&&e._config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===Ds&&e.show()}),e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?Fs:Ws]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Zs,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===Zs&&e.hide()}),e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=ht.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{Ss.has(t)&&delete e[t]})),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d(ks,t,this.constructor.DefaultType),t.sanitize&&(t.template=Es(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),n=t.getAttribute("class").match(e);null!==n&&n.length>0&&n.map((t=>t.trim())).forEach((e=>t.classList.remove(e)))}_getBasicClassPrefix(){return Cs}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=Vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}x(Vs);const Ks="popover",Gs=".bs.popover",Ys="bs-popover",Xs={...Vs.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:''},Js={...Vs.DefaultType,content:"(string|element|function)"},Qs={HIDE:`hide${Gs}`,HIDDEN:`hidden${Gs}`,SHOW:`show${Gs}`,SHOWN:`shown${Gs}`,INSERTED:`inserted${Gs}`,CLICK:`click${Gs}`,FOCUSIN:`focusin${Gs}`,FOCUSOUT:`focusout${Gs}`,MOUSEENTER:`mouseenter${Gs}`,MOUSELEAVE:`mouseleave${Gs}`},tr=".popover-header",er=".popover-body";class nr extends Vs{static get Default(){return Xs}static get NAME(){return Ks}static get Event(){return Qs}static get DefaultType(){return Js}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),tr),this._sanitizeAndSetContent(t,this._getContent(),er)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return Ys}static jQueryInterface(t){return this.each((function(){const e=nr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}x(nr);const ir="scrollspy",or=".bs.scrollspy",sr={offset:10,method:"auto",target:""},rr={offset:"number",method:"string",target:"(string|element)"},ar=`activate${or}`,lr=`scroll${or}`,cr=`load${or}.data-api`,hr="dropdown-item",ur="active",dr='[data-bs-spy="scroll"]',pr=".nav, .list-group",mr=".nav-link",fr=".nav-item",_r=".list-group-item",gr=`${mr}, ${_r}, .${hr}`,vr=".dropdown",yr=".dropdown-toggle",br="offset",wr="position";class xr extends K{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,F.on(this._scrollElement,lr,(()=>this._process())),this.refresh(),this._process()}static get Default(){return sr}static get NAME(){return ir}refresh(){const t=this._scrollElement===this._scrollElement.window?br:wr,e="auto"===this._config.method?t:this._config.method,n=e===wr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),dt.find(gr,this._config.target).map((t=>{const i=r(t),o=i?dt.findOne(i):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[ht[e](o).top+n,i]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){F.off(this._scrollElement,or),super.dispose()}_getConfig(t){return(t={...sr,...ht.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=u(t.target)||document.documentElement,d(ir,t,rr),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),n=dt.findOne(e.join(","),this._config.target);n.classList.add(ur),n.classList.contains(hr)?dt.findOne(yr,n.closest(vr)).classList.add(ur):dt.parents(n,pr).forEach((t=>{dt.prev(t,`${mr}, ${_r}`).forEach((t=>t.classList.add(ur))),dt.prev(t,fr).forEach((t=>{dt.children(t,mr).forEach((t=>t.classList.add(ur)))}))})),F.trigger(this._scrollElement,ar,{relatedTarget:t})}_clear(){dt.find(gr,this._config.target).filter((t=>t.classList.contains(ur))).forEach((t=>t.classList.remove(ur)))}static jQueryInterface(t){return this.each((function(){const e=xr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(window,cr,(()=>{dt.find(dr).forEach((t=>new xr(t)))})),x(xr);const $r="tab",Lr=".bs.tab",Tr=`hide${Lr}`,Pr=`hidden${Lr}`,Er=`show${Lr}`,kr=`shown${Lr}`,Mr=`click${Lr}.data-api`,Cr="dropdown-menu",Sr="active",Ar="fade",zr="show",Or=".dropdown",Ir=".nav, .list-group",Nr=".active",Br=":scope > li > .active",Dr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Zr=".dropdown-toggle",Rr=":scope > .dropdown-menu .active";class jr extends K{static get NAME(){return $r}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Sr))return;let t;const e=a(this._element),n=this._element.closest(Ir);if(n){const e="UL"===n.nodeName||"OL"===n.nodeName?Br:Nr;t=dt.find(e,n),t=t[t.length-1]}const i=t?F.trigger(t,Tr,{relatedTarget:this._element}):null;if(F.trigger(this._element,Er,{relatedTarget:t}).defaultPrevented||null!==i&&i.defaultPrevented)return;this._activate(this._element,n);const o=()=>{F.trigger(t,Pr,{relatedTarget:this._element}),F.trigger(this._element,kr,{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,n){const i=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?dt.children(e,Nr):dt.find(Br,e))[0],o=n&&i&&i.classList.contains(Ar),s=()=>this._transitionComplete(t,i,n);i&&o?(i.classList.remove(zr),this._queueCallback(s,t,!0)):s()}_transitionComplete(t,e,n){if(e){e.classList.remove(Sr);const t=dt.findOne(Rr,e.parentNode);t&&t.classList.remove(Sr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Sr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),g(t),t.classList.contains(Ar)&&t.classList.add(zr);let i=t.parentNode;if(i&&"LI"===i.nodeName&&(i=i.parentNode),i&&i.classList.contains(Cr)){const e=t.closest(Or);e&&dt.find(Zr,e).forEach((t=>t.classList.add(Sr))),t.setAttribute("aria-expanded",!0)}n&&n()}static jQueryInterface(t){return this.each((function(){const e=jr.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(document,Mr,Dr,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this)||jr.getOrCreateInstance(this).show()})),x(jr);const Hr="toast",Wr=".bs.toast",Fr=`mouseover${Wr}`,qr=`mouseout${Wr}`,Ur=`focusin${Wr}`,Vr=`focusout${Wr}`,Kr=`hide${Wr}`,Gr=`hidden${Wr}`,Yr=`show${Wr}`,Xr=`shown${Wr}`,Jr="fade",Qr="hide",ta="show",ea="showing",na={animation:"boolean",autohide:"boolean",delay:"number"},ia={animation:!0,autohide:!0,delay:5e3};class oa extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return na}static get Default(){return ia}static get NAME(){return Hr}show(){if(F.trigger(this._element,Yr).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Jr);const t=()=>{this._element.classList.remove(ea),F.trigger(this._element,Xr),this._maybeScheduleHide()};this._element.classList.remove(Qr),g(this._element),this._element.classList.add(ta),this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ta))return;if(F.trigger(this._element,Kr).defaultPrevented)return;const t=()=>{this._element.classList.add(Qr),this._element.classList.remove(ea),this._element.classList.remove(ta),F.trigger(this._element,Gr)};this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ta)&&this._element.classList.remove(ta),super.dispose()}_getConfig(t){return t={...ia,...ht.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},d(Hr,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){F.on(this._element,Fr,(t=>this._onInteraction(t,!0))),F.on(this._element,qr,(t=>this._onInteraction(t,!1))),F.on(this._element,Ur,(t=>this._onInteraction(t,!0))),F.on(this._element,Vr,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=oa.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(oa),x(oa)})();const ct=[];function ht(e,n=t){let i;const o=new Set;function s(t){if(r(e,t)&&(e=t,i)){const t=!ct.length;for(const t of o)t[1](),ct.push(t,e);if(t){for(let t=0;t{o.delete(l),0===o.size&&(i(),i=null)}}}}const ut=ht(),dt=ht(),pt=ht(),mt=ht(),ft=ht(),_t=Nominatim_Config.Reverse_Only?"reverse":"search",gt=[_t,"reverse","details","deletable","polygons","status","about"];function vt(t,e){if(void 0===t)t=window.location.pathname.replace(".html","").replace(/^.*\//,""),gt.includes(t)||(t=_t),e=new URLSearchParams(window.location.search);else{gt.includes(t)||(t=_t),void 0===e&&(e=new URLSearchParams);let n=e.toString();n&&(n="?"+n);let i=t+".html"+n;window.location.protocol.match(/^http/)?window.history.pushState([],"",i):window.location.href=i}ft.set({tab:t,params:e}),pt.set(null),mt.set(null)}function yt(e){let n;return{c(){n=x("footer"),n.innerHTML='

Addresses and postcodes are approximate

\n ',C(n,"class","svelte-1f2bd8l")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}class bt extends lt{constructor(t){super(),at(this,t,null,yt,r,{})}}function wt(t){var e=document.getElementById("loading");e&&(e.style.display="start"===t?"block":null)}async function xt(t,e,n){var i=function(t,e){return function(t,e){for(var n=Object.keys(e),i=0;iencodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}(t,e),o=new URLSearchParams(window.location.search);o&&o.get("httpbin_status")&&(i="https://httpbin.org/status/"+parseInt(o.get("httpbin_status"),10)),wt("start"),"status"!==t&&pt.set(null);try{await fetch(i,{headers:Nominatim_Config.Nominatim_API_Endpoint_Headers||{}}).then((async t=>{if(t.status>=200&&t.status<300||404===t.status){var e;try{e=await t.json()}catch(t){return void mt.set(`Error parsing JSON data from ${i} (${t})`)}return e}mt.set(`Error fetching data from ${i} (${t.statusText})`)})).then((t=>{t&&(t.error&&mt.set(t.error.message),n(t)),wt("finish")}))}catch(t){mt.set(`Error fetching data from ${i} (${t})`),wt("finish")}"status"!==t&&pt.set(i)}var $t={};async function Lt(t,e){if(window.location.protocol.match(/^http/))if($t[t])e.innerHTML=$t[t];else try{await fetch(t).then((t=>t.text())).then((n=>{n=n.replace("Nominatim_API_Endpoint",Nominatim_Config.Nominatim_API_Endpoint),e.innerHTML=n,$t[t]=n}))}catch(n){e.innerHTML=`Error fetching content from ${t} (${n})`}else e.innerHTML=`Cannot display data from ${t} here. Browser security prevents loading content from file:// URLs.`}function Tt(t){document.title=[t,Nominatim_Config.Page_Title].filter((t=>t&&t.length>1)).join(" | ")}function Pt(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),C(e,"href",t[1]),C(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=E(e,"click",M(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&C(e,"href",t[1]),(!n||1&i)&&C(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Et(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e,{params_hash:r={}}=e,{extra_classes:a=""}=e,l=s+".html";return t.$$set=t=>{"page"in t&&n(3,s=t.page),"params_hash"in t&&n(4,r=t.params_hash),"extra_classes"in t&&n(0,a=t.extra_classes),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(24&t.$$.dirty){let t=new URLSearchParams(r).toString();n(1,l=s+".html"+(t?"?":"")+t)}},[a,l,function(){vt(s,new URLSearchParams(r))},s,r,o,i]}class kt extends lt{constructor(t){super(),at(this,t,Et,Pt,r,{page:3,params_hash:4,extra_classes:0})}}function Mt(t){let e,n,i,o;const s=t[7].default,r=p(s,t,t[6],null);return{c(){e=x("a"),r&&r.c(),C(e,"href",t[2]),C(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=E(e,"click",M(k(t[8]))),i=!0)},p(t,[i]){r&&r.p&&(!n||64&i)&&_(r,s,t,t[6],n?f(s,t[6],i,null):g(t[6]),null),(!n||4&i)&&C(e,"href",t[2]),(!n||1&i)&&C(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Ct(t,e,n){let{$$slots:i={},$$scope:o}=e,{lat:s=null}=e,{lon:r=null}=e,{zoom:a=null}=e,{extra_classes:l=""}=e,c=new URLSearchParams,h="reverse.html";return t.$$set=t=>{"lat"in t&&n(3,s=t.lat),"lon"in t&&n(4,r=t.lon),"zoom"in t&&n(5,a=t.zoom),"extra_classes"in t&&n(0,l=t.extra_classes),"$$scope"in t&&n(6,o=t.$$scope)},t.$$.update=()=>{if(56&t.$$.dirty){let t=new URLSearchParams;s&&r&&(t.set("lat",s),t.set("lon",r),a&&t.set("zoom",a)),n(1,c=t)}if(2&t.$$.dirty){let t=c.toString();n(2,h="reverse.html"+(t?"?":"")+t)}},[l,c,h,s,r,a,o,i,()=>vt("reverse",c)]}class St extends lt{constructor(t){super(),at(this,t,Ct,Mt,r,{lat:3,lon:4,zoom:5,extra_classes:0})}}var At=["second","minute","hour","day","week","month","year"];var zt=["秒","分钟","小时","天","周","个月","年"];var Ot={},It=function(t,e){Ot[t]=e},Nt=[60,60,24,7,365/7/12,12];function Bt(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))}var Dt=function(t,e,n){var i=function(t,e){return(+(e?Bt(e):new Date)-+Bt(t))/1e3}(t,n&&n.relativeDate);return function(t,e){for(var n=t<0?1:0,i=t=Math.abs(t),o=0;t>=Nt[o]&&o(0==(o*=2)?9:1)&&(o+=1),e(t,o,i)[n].replace("%s",t.toString())}(i,function(t){return Ot[t]||Ot.en_US}(e))};function Zt(t){let e,n,i,o,s,r,a,l,c,h,u;return{c(){e=x("div"),n=$("Data from "),i=x("a"),o=$("API request"),s=T(),r=x("span"),a=$("("),l=x("a"),c=$("debug output"),u=$(")"),C(i,"href",t[1]),C(l,"href",h=t[1]+"&debug=1"),C(r,"id","api-request-debug"),C(e,"id","api-request")},m(t,h){y(t,e,h),v(e,n),v(e,i),v(i,o),v(e,s),v(e,r),v(r,a),v(r,l),v(l,c),v(r,u)},p(t,e){2&e&&C(i,"href",t[1]),2&e&&h!==(h=t[1]+"&debug=1")&&C(l,"href",h)},d(t){t&&b(e)}}}function Rt(t){let e,n,i,o,s=Dt(new Date(t[0]))+"";return{c(){e=$("Data last updated:\n "),n=x("abbr"),i=$(s),C(n,"id","data-date"),C(n,"title",o=t[0]+" (UTC timezone)")},m(t,o){y(t,e,o),y(t,n,o),v(n,i)},p(t,e){1&e&&s!==(s=Dt(new Date(t[0]))+"")&&S(i,s),1&e&&o!==(o=t[0]+" (UTC timezone)")&&C(n,"title",o)},d(t){t&&b(e),t&&b(n)}}}function jt(t){let e;return{c(){e=$("Details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ht(t){let e,n,i,o,s,r,a,l,c,h,u,d=t[1]&&Zt(t),p=t[0]&&Rt(t);return c=new kt({props:{page:"status",$$slots:{default:[jt]},$$scope:{ctx:t}}}),{c(){e=x("div"),n=x("div"),n.innerHTML='
\n Loading data from API ...',i=T(),o=x("div"),s=x("div"),d&&d.c(),r=T(),a=x("div"),p&&p.c(),l=$("\n ("),it(c.$$.fragment),h=$(")"),C(n,"id","loading"),C(n,"class","py-2 px-4 svelte-1i1228w"),C(s,"class","col-sm-6"),C(a,"class","col-sm-6 text-end"),C(o,"class","row"),C(e,"id","last-updated"),C(e,"class","container-fluid py-2 px-4 mb-3 svelte-1i1228w")},m(t,m){y(t,e,m),v(e,n),v(e,i),v(e,o),v(o,s),d&&d.m(s,null),v(o,r),v(o,a),p&&p.m(a,null),v(a,l),ot(c,a,null),v(a,h),u=!0},p(t,[e]){t[1]?d?d.p(t,e):(d=Zt(t),d.c(),d.m(s,null)):d&&(d.d(1),d=null),t[0]?p?p.p(t,e):(p=Rt(t),p.c(),p.m(a,l)):p&&(p.d(1),p=null);const n={};8&e&&(n.$$scope={dirty:e,ctx:t}),c.$set(n)},i(t){u||(tt(c.$$.fragment,t),u=!0)},o(t){et(c.$$.fragment,t),u=!1},d(t){t&&b(e),d&&d.d(),p&&p.d(),st(c)}}}function Wt(t,e,n){let i,o,s=!1;return pt.subscribe((t=>{n(1,o=t),o&&(n(1,o=new URL(o,window.location.origin)),o.searchParams.delete("polygon_geojson"),n(1,o=o.toString())),s||i||(s=!0,xt("status",{format:"json"},(function(t){n(0,i=t.data_updated),s=!1})))})),[i,o]}It("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=At[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),It("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var n=zt[~~(e/2)];return[t+" "+n+"前",t+" "+n+"后"]}));class Ft extends lt{constructor(t){super(),at(this,t,Wt,Ht,r,{})}}function qt(t){let e,n,i,o,s,r;return{c(){e=x("div"),n=$(t[0]),i=T(),o=x("button"),C(o,"type","button"),C(o,"class","btn-close float-end"),C(o,"aria-label","dismiss"),C(e,"id","error"),C(e,"class","container-fluid alert-danger py-3 px-4")},m(a,l){y(a,e,l),v(e,n),v(e,i),v(e,o),s||(r=E(o,"click",t[1]),s=!0)},p(t,e){1&e&&S(n,t[0])},d(t){t&&b(e),s=!1,r()}}}function Ut(e){let n,i=e[0]&&qt(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=qt(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function Vt(t,e,n){let i;return mt.subscribe((t=>{n(0,i=t)})),[i,function(){mt.set(null)}]}class Kt extends lt{constructor(t){super(),at(this,t,Vt,Ut,r,{})}}function Gt(t){let e,n,i,o,s;return{c(){e=x("img"),i=T(),o=x("h1"),s=$(t[3]),C(e,"alt","logo"),C(e,"id","theme-logo"),c(e.src,n="theme/logo.png")||C(e,"src","theme/logo.png"),C(e,"class","svelte-1q88nx"),C(o,"class","svelte-1q88nx")},m(t,n){y(t,e,n),y(t,i,n),y(t,o,n),v(o,s)},p(t,e){8&e&&S(s,t[3])},d(t){t&&b(e),t&&b(i),t&&b(o)}}}function Yt(t){let e,n,i;return n=new kt({props:{page:"search",extra_classes:"nav-link "+("search"===t[4]?"active":""),$$slots:{default:[Xt]},$$scope:{ctx:t}}}),{c(){e=x("li"),it(n.$$.fragment),C(e,"class","nav-item svelte-1q88nx")},m(t,o){y(t,e,o),ot(n,e,null),i=!0},p(t,e){const i={};16&e&&(i.extra_classes="nav-link "+("search"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){t&&b(e),st(n)}}}function Xt(t){let e;return{c(){e=$("Search")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Jt(t){let e;return{c(){e=$("Reverse")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Qt(t){let e;return{c(){e=$("Search By ID")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function te(t){let e;return{c(){e=$("About & Help")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ee(t){let e,n,i,o,s,r,a,l,c,h,u,d,m,w,L,P,E,k,M,A,z,O,I,N,B,D,Z,R,j,H,W;s=new kt({props:{page:t[2]?"reverse":"search",$$slots:{default:[Gt]},$$scope:{ctx:t}}});let F=!t[2]&&Yt(t);m=new St({props:{lat:t[0],lon:t[1],extra_classes:"nav-link "+("reverse"===t[4]?"active":""),$$slots:{default:[Jt]},$$scope:{ctx:t}}}),P=new kt({props:{page:"details",extra_classes:"nav-link "+("details"===t[4]?"active":""),$$slots:{default:[Qt]},$$scope:{ctx:t}}}),A=new kt({props:{page:"about",extra_classes:"nav-link "+("about"===t[4]?"active":""),$$slots:{default:[te]},$$scope:{ctx:t}}});const q=t[6].default,U=p(q,t,t[7],null);return R=new Kt({}),H=new Ft({}),{c(){e=x("header"),n=x("nav"),i=x("div"),o=x("div"),it(s.$$.fragment),r=T(),a=x("button"),a.innerHTML='',l=T(),c=x("div"),h=x("ul"),F&&F.c(),u=T(),d=x("li"),it(m.$$.fragment),w=T(),L=x("li"),it(P.$$.fragment),E=T(),k=x("ul"),M=x("li"),it(A.$$.fragment),z=T(),O=x("section"),I=x("h2"),N=$(t[4]),B=T(),D=x("section"),U&&U.c(),Z=T(),it(R.$$.fragment),j=T(),it(H.$$.fragment),C(o,"class","navbar-brand svelte-1q88nx"),C(a,"class","navbar-toggler"),C(a,"type","button"),C(a,"data-bs-toggle","collapse"),C(a,"data-bs-target","#navbarSupportedContent"),C(a,"aria-controls","navbarSupportedContent"),C(a,"aria-expanded","false"),C(a,"aria-label","Toggle navigation"),C(d,"class","nav-item svelte-1q88nx"),C(L,"class","nav-item svelte-1q88nx"),C(h,"class","navbar-nav me-auto"),C(c,"class","collapse navbar-collapse"),C(c,"id","navbarSupportedContent"),C(M,"class","nav-item svelte-1q88nx"),C(k,"class","navbar-nav"),C(i,"class","container-fluid"),C(n,"class","navbar navbar-expand-sm navbar-light"),C(e,"class","container-fluid"),C(O,"class","page-title-section svelte-1q88nx"),C(D,"class","search-section svelte-1q88nx")},m(t,p){y(t,e,p),v(e,n),v(n,i),v(i,o),ot(s,o,null),v(i,r),v(i,a),v(i,l),v(i,c),v(c,h),F&&F.m(h,null),v(h,u),v(h,d),ot(m,d,null),v(h,w),v(h,L),ot(P,L,null),v(i,E),v(i,k),v(k,M),ot(A,M,null),y(t,z,p),y(t,O,p),v(O,I),v(I,N),y(t,B,p),y(t,D,p),U&&U.m(D,null),y(t,Z,p),ot(R,t,p),y(t,j,p),ot(H,t,p),W=!0},p(t,[e]){const n={};4&e&&(n.page=t[2]?"reverse":"search"),136&e&&(n.$$scope={dirty:e,ctx:t}),s.$set(n),t[2]?F&&(J(),et(F,1,1,(()=>{F=null})),Q()):F?(F.p(t,e),4&e&&tt(F,1)):(F=Yt(t),F.c(),tt(F,1),F.m(h,u));const i={};1&e&&(i.lat=t[0]),2&e&&(i.lon=t[1]),16&e&&(i.extra_classes="nav-link "+("reverse"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),m.$set(i);const o={};16&e&&(o.extra_classes="nav-link "+("details"===t[4]?"active":"")),128&e&&(o.$$scope={dirty:e,ctx:t}),P.$set(o);const r={};16&e&&(r.extra_classes="nav-link "+("about"===t[4]?"active":"")),128&e&&(r.$$scope={dirty:e,ctx:t}),A.$set(r),(!W||16&e)&&S(N,t[4]),U&&U.p&&(!W||128&e)&&_(U,q,t,t[7],W?f(q,t[7],e,null):g(t[7]),null)},i(t){W||(tt(s.$$.fragment,t),tt(F),tt(m.$$.fragment,t),tt(P.$$.fragment,t),tt(A.$$.fragment,t),tt(U,t),tt(R.$$.fragment,t),tt(H.$$.fragment,t),W=!0)},o(t){et(s.$$.fragment,t),et(F),et(m.$$.fragment,t),et(P.$$.fragment,t),et(A.$$.fragment,t),et(U,t),et(R.$$.fragment,t),et(H.$$.fragment,t),W=!1},d(t){t&&b(e),st(s),F&&F.d(),st(m),st(P),st(A),t&&b(z),t&&b(O),t&&b(B),t&&b(D),U&&U.d(t),t&&b(Z),st(R,t),t&&b(j),st(H,t)}}}function ne(t,e,n){let i,o,s,r;d(t,ft,(t=>n(5,r=t)));let a,l,{$$slots:c={},$$scope:h}=e;return ut.subscribe((t=>{t&&t.on("move",(function(){n(0,a=t.getCenter().lat),n(1,l=t.getCenter().lng)}))})),t.$$set=t=>{"$$scope"in t&&n(7,h=t.$$scope)},t.$$.update=()=>{32&t.$$.dirty&&n(4,i=r.tab)},n(3,o=Nominatim_Config.Page_Title),n(2,s=Nominatim_Config.Reverse_Only),[a,l,s,o,i,r,c,h]}class ie extends lt{constructor(t){super(),at(this,t,ne,ee,r,{})}}function oe(t){let e,n,i,o,s;const r=t[3].default,a=p(r,t,t[2],null);return{c(){e=x("form"),n=x("div"),a&&a.c(),C(n,"class","row g-2"),C(e,"class","form-inline"),C(e,"role","search"),C(e,"accept-charset","UTF-8"),C(e,"action","")},m(r,l){y(r,e,l),v(e,n),a&&a.m(n,null),i=!0,o||(s=E(e,"submit",k(t[0])),o=!0)},p(t,[e]){a&&a.p&&(!i||4&e)&&_(a,r,t,t[2],i?f(r,t[2],e,null):g(t[2]),null)},i(t){i||(tt(a,t),i=!0)},o(t){et(a,t),i=!1},d(t){t&&b(e),a&&a.d(t),o=!1,s()}}}function se(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e;return t.$$set=t=>{"page"in t&&n(1,s=t.page),"$$scope"in t&&n(2,o=t.$$scope)},[function(t){let e=t.target,n=!0;Array.prototype.slice.call(e.elements).forEach((function(t){(function(t){return!("hidden"===t.type&&t.value.length&&t.pattern&&!t.value.match(t.pattern))&&t.checkValidity()})(t)||(alert("Invalid input in "+t.name),n=!1)})),n&&vt(s,function(t){var e=new URLSearchParams;return Array.prototype.slice.call(t.elements).forEach((function(t){!t.name||t.disabled||["submit","button"].indexOf(t.type)>-1||["checkbox","radio"].indexOf(t.type)>-1&&!t.checked||void 0!==t.value&&""!==t.value&&e.set(t.name,t.value)})),e}(e))},s,o,i]}class re extends lt{constructor(t){super(),at(this,t,se,oe,r,{page:1})}}function ae(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,E,k,M,S,A,z;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("button"),r.textContent="Search",a=T(),l=x("input"),h=T(),u=x("input"),p=T(),m=x("input"),_=T(),g=x("input"),$=T(),L=x("input"),E=T(),k=x("input"),S=T(),A=x("input"),C(n,"id","q"),C(n,"name","q"),C(n,"type","text"),C(n,"class","form-control form-control-sm svelte-1u2ltgo"),C(n,"placeholder","Search"),n.value=i=t[1].q||"",C(e,"class","col-auto"),C(r,"type","submit"),C(r,"class","btn btn-primary btn-sm mx-1"),C(l,"type","hidden"),C(l,"name","viewbox"),l.value=c=t[2]||"",C(u,"type","hidden"),C(u,"name","dedupe"),u.value=d=t[1].dedupe?1:"",C(m,"type","hidden"),C(m,"name","bounded"),m.value=f=t[1].bounded?1:"",C(g,"type","hidden"),C(g,"name","accept-language"),g.value=w=t[1]["accept-language"]||"",C(L,"type","hidden"),C(L,"name","countrycodes"),L.value=P=t[1].countrycodes||"",C(L,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(k,"type","hidden"),C(k,"name","limit"),k.value=M=t[1].limit||"",C(A,"type","hidden"),C(A,"name","polygon_threshold"),A.value=z=t[1].polygon_threshold||"",C(s,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),v(s,a),v(s,l),v(s,h),v(s,u),v(s,p),v(s,m),v(s,_),v(s,g),v(s,$),v(s,L),v(s,E),v(s,k),v(s,S),v(s,A)},p(t,e){2&e&&i!==(i=t[1].q||"")&&n.value!==i&&(n.value=i),4&e&&c!==(c=t[2]||"")&&(l.value=c),2&e&&d!==(d=t[1].dedupe?1:"")&&(u.value=d),2&e&&f!==(f=t[1].bounded?1:"")&&(m.value=f),2&e&&w!==(w=t[1]["accept-language"]||"")&&(g.value=w),2&e&&P!==(P=t[1].countrycodes||"")&&(L.value=P),2&e&&M!==(M=t[1].limit||"")&&(k.value=M),2&e&&z!==(z=t[1].polygon_threshold||"")&&(A.value=z)},d(t){t&&b(e),t&&b(o),t&&b(s)}}}function le(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,E,k,M,S,A,z,O,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,J,Q;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("input"),l=T(),c=x("div"),h=x("input"),d=T(),p=x("div"),m=x("input"),_=T(),g=x("div"),w=x("input"),L=T(),P=x("div"),E=x("input"),M=T(),S=x("div"),A=x("button"),A.textContent="Search",z=T(),O=x("input"),N=T(),B=x("input"),Z=T(),R=x("input"),H=T(),W=x("input"),q=T(),U=x("input"),K=T(),G=x("input"),X=T(),J=x("input"),C(n,"name","street"),C(n,"type","text"),C(n,"class","form-control form-control-sm me-1"),C(n,"placeholder","House number/Street"),n.value=i=t[1].street||"",C(e,"class","col-auto"),C(r,"name","city"),C(r,"type","text"),C(r,"class","form-control form-control-sm me-1"),C(r,"placeholder","City"),r.value=a=t[1].city||"",C(s,"class","col-auto"),C(h,"id","county"),C(h,"name","county"),C(h,"type","text"),C(h,"class","form-control form-control-sm me-1"),C(h,"placeholder","County"),h.value=u=t[1].county||"",C(c,"class","col-auto"),C(m,"name","state"),C(m,"type","text"),C(m,"class","form-control form-control-sm me-1"),C(m,"placeholder","State"),m.value=f=t[1].state||"",C(p,"class","col-auto"),C(w,"name","country"),C(w,"type","text"),C(w,"class","form-control form-control-sm me-1"),C(w,"placeholder","Country"),w.value=$=t[1].country||"",C(g,"class","col-auto"),C(E,"name","postalcode"),C(E,"type","text"),C(E,"class","form-control form-control-sm me-1"),C(E,"placeholder","Postal Code"),E.value=k=t[1].postalcode||"",C(P,"class","col-auto"),C(A,"type","submit"),C(A,"class","btn btn-primary btn-sm"),C(O,"type","hidden"),C(O,"name","viewbox"),O.value=I=t[2]||"",C(B,"type","hidden"),C(B,"name","dedupe"),B.value=D=t[1].dedupe?1:"",C(R,"type","hidden"),C(R,"name","bounded"),R.value=j=t[1].bounded?1:"",C(W,"type","hidden"),C(W,"name","accept-language"),W.value=F=t[1]["accept-language"]||"",C(U,"type","hidden"),C(U,"name","countrycodes"),U.value=V=t[1].countrycodes||"",C(U,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(G,"type","hidden"),C(G,"name","limit"),G.value=Y=t[1].limit||"",C(J,"type","hidden"),C(J,"name","polygon_threshold"),J.value=Q=t[1].polygon_threshold||"",C(S,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),y(t,l,i),y(t,c,i),v(c,h),y(t,d,i),y(t,p,i),v(p,m),y(t,_,i),y(t,g,i),v(g,w),y(t,L,i),y(t,P,i),v(P,E),y(t,M,i),y(t,S,i),v(S,A),v(S,z),v(S,O),v(S,N),v(S,B),v(S,Z),v(S,R),v(S,H),v(S,W),v(S,q),v(S,U),v(S,K),v(S,G),v(S,X),v(S,J)},p(t,e){2&e&&i!==(i=t[1].street||"")&&n.value!==i&&(n.value=i),2&e&&a!==(a=t[1].city||"")&&r.value!==a&&(r.value=a),2&e&&u!==(u=t[1].county||"")&&h.value!==u&&(h.value=u),2&e&&f!==(f=t[1].state||"")&&m.value!==f&&(m.value=f),2&e&&$!==($=t[1].country||"")&&w.value!==$&&(w.value=$),2&e&&k!==(k=t[1].postalcode||"")&&E.value!==k&&(E.value=k),4&e&&I!==(I=t[2]||"")&&(O.value=I),2&e&&D!==(D=t[1].dedupe?1:"")&&(B.value=D),2&e&&j!==(j=t[1].bounded?1:"")&&(R.value=j),2&e&&F!==(F=t[1]["accept-language"]||"")&&(W.value=F),2&e&&V!==(V=t[1].countrycodes||"")&&(U.value=V),2&e&&Y!==(Y=t[1].limit||"")&&(G.value=Y),2&e&&Q!==(Q=t[1].polygon_threshold||"")&&(J.value=Q)},d(t){t&&b(e),t&&b(o),t&&b(s),t&&b(l),t&&b(c),t&&b(d),t&&b(p),t&&b(_),t&&b(g),t&&b(L),t&&b(P),t&&b(M),t&&b(S)}}}function ce(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,k,M,S,A,z,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,J,Q,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt,Tt;return u=new re({props:{page:"search",$$slots:{default:[ae]},$$scope:{ctx:t}}}),m=new re({props:{page:"search",$$slots:{default:[le]},$$scope:{ctx:t}}}),{c(){e=x("ul"),n=x("li"),i=x("a"),i.textContent="Simple",s=T(),r=x("li"),a=x("a"),a.textContent="Structured",l=T(),c=x("div"),h=x("div"),it(u.$$.fragment),d=T(),p=x("div"),it(m.$$.fragment),f=T(),_=x("details"),g=x("summary"),g.innerHTML="Advanced options",w=T(),$=x("ul"),L=x("li"),P=x("div"),k=x("label"),k.textContent="apply viewbox",M=T(),S=x("input"),z=T(),I=x("li"),N=x("div"),B=x("label"),B.textContent="bounded to viewbox",D=T(),Z=x("input"),j=T(),H=x("li"),W=x("div"),F=x("label"),F.textContent="deduplicate results",q=T(),U=x("input"),K=T(),G=x("li"),Y=x("label"),Y.textContent="Maximum number of results",X=T(),J=x("input"),nt=T(),rt=x("li"),at=x("label"),at.textContent="Polygon simplification",lt=T(),ct=x("input"),ut=T(),dt=x("li"),pt=x("label"),pt.textContent="Languages",mt=T(),ft=x("input"),gt=T(),vt=x("li"),yt=x("label"),yt.textContent="Country Codes",bt=T(),wt=x("input"),C(i,"class","nav-link svelte-1u2ltgo"),C(i,"data-bs-toggle","tab"),C(i,"href","#simple"),O(i,"active",!t[0]),C(n,"class","nav-item"),C(a,"class","nav-link svelte-1u2ltgo"),C(a,"data-bs-toggle","tab"),C(a,"href","#structured"),O(a,"active",t[0]),C(r,"class","nav-item"),C(e,"class","nav nav-tabs svelte-1u2ltgo"),C(h,"class","tab-pane"),C(h,"id","simple"),C(h,"role","tabpanel"),O(h,"active",!t[0]),C(p,"class","tab-pane"),C(p,"id","structured"),C(p,"role","tabpanel"),O(p,"active",t[0]),C(c,"class","tab-content py-2"),C(k,"class","form-check-label svelte-1u2ltgo"),C(k,"for","use_viewbox"),C(S,"type","checkbox"),C(S,"class","form-check-input api-param-setting"),C(S,"id","use_viewbox"),S.checked=A=t[1].viewbox,C(P,"class","form-check form-check-inline"),C(L,"class","svelte-1u2ltgo"),C(B,"class","form-check-label svelte-1u2ltgo"),C(B,"for","option_bounded"),C(Z,"type","checkbox"),C(Z,"class","form-check-input api-param-setting"),C(Z,"id","option_bounded"),Z.checked=R=!!t[1].bounded,C(N,"class","form-check form-check-inline"),C(I,"class","svelte-1u2ltgo"),C(F,"class","form-check-label svelte-1u2ltgo"),C(F,"for","option_dedupe"),C(U,"type","checkbox"),C(U,"class","form-check-input api-param-setting"),C(U,"id","option_dedupe"),U.checked=V=!!t[1].dedupe,C(W,"class","form-check form-check-inline"),C(H,"class","svelte-1u2ltgo"),C(Y,"for","option_limit"),C(Y,"class","svelte-1u2ltgo"),C(J,"type","number"),C(J,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(J,"data-api-param","limit"),C(J,"id","option_limit"),C(J,"min","1"),C(J,"max","50"),J.value=Q=t[1].limit||"",C(G,"class","svelte-1u2ltgo"),C(at,"for","option_polygon_threshold"),C(at,"class","svelte-1u2ltgo"),C(ct,"type","number"),C(ct,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(ct,"data-api-param","polygon_threshold"),C(ct,"id","option_polygon_threshold"),C(ct,"min","0.0"),C(ct,"max","1.0"),C(ct,"step","0.001"),ct.value=ht=t[1].polygon_threshold||"",C(rt,"class","svelte-1u2ltgo"),C(pt,"for","accept_lang"),C(pt,"class","svelte-1u2ltgo"),C(ft,"type","text"),C(ft,"placeholder","e.g. en,zh-Hant"),C(ft,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(ft,"data-api-param","accept-language"),C(ft,"id","accept_lang"),C(ft,"size","15"),ft.value=_t=t[1]["accept-language"]||"",C(dt,"class","svelte-1u2ltgo"),C(yt,"for","option_ccode"),C(yt,"class","svelte-1u2ltgo"),C(wt,"type","text"),C(wt,"placeholder","e.g. de,gb"),C(wt,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(wt,"data-api-param","countrycodes"),C(wt,"id","option_ccode"),C(wt,"size","15"),wt.value=xt=t[1].countrycodes||"",C(wt,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(vt,"class","svelte-1u2ltgo"),C($,"class","svelte-1u2ltgo"),C(_,"id","searchAdvancedOptions"),C(_,"class","svelte-1u2ltgo")},m(o,b){y(o,e,b),v(e,n),v(n,i),v(e,s),v(e,r),v(r,a),y(o,l,b),y(o,c,b),v(c,h),ot(u,h,null),v(c,d),v(c,p),ot(m,p,null),y(o,f,b),y(o,_,b),v(_,g),v(_,w),v(_,$),v($,L),v(L,P),v(P,k),v(P,M),v(P,S),v($,z),v($,I),v(I,N),v(N,B),v(N,D),v(N,Z),v($,j),v($,H),v(H,W),v(W,F),v(W,q),v(W,U),v($,K),v($,G),v(G,Y),v(G,X),v(G,J),v($,nt),v($,rt),v(rt,at),v(rt,lt),v(rt,ct),v($,ut),v($,dt),v(dt,pt),v(dt,mt),v(dt,ft),v($,gt),v($,vt),v(vt,yt),v(vt,bt),v(vt,wt),$t=!0,Lt||(Tt=[E(S,"change",t[3]),E(Z,"change",he),E(U,"change",ue),E(J,"change",de),E(ct,"change",de),E(ft,"change",de),E(wt,"change",de)],Lt=!0)},p(t,[e]){1&e&&O(i,"active",!t[0]),1&e&&O(a,"active",t[0]);const n={};262&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n),1&e&&O(h,"active",!t[0]);const o={};262&e&&(o.$$scope={dirty:e,ctx:t}),m.$set(o),1&e&&O(p,"active",t[0]),(!$t||2&e&&A!==(A=t[1].viewbox))&&(S.checked=A),(!$t||2&e&&R!==(R=!!t[1].bounded))&&(Z.checked=R),(!$t||2&e&&V!==(V=!!t[1].dedupe))&&(U.checked=V),(!$t||2&e&&Q!==(Q=t[1].limit||"")&&J.value!==Q)&&(J.value=Q),(!$t||2&e&&ht!==(ht=t[1].polygon_threshold||"")&&ct.value!==ht)&&(ct.value=ht),(!$t||2&e&&_t!==(_t=t[1]["accept-language"]||"")&&ft.value!==_t)&&(ft.value=_t),(!$t||2&e&&xt!==(xt=t[1].countrycodes||"")&&wt.value!==xt)&&(wt.value=xt)},i(t){$t||(tt(u.$$.fragment,t),tt(m.$$.fragment,t),$t=!0)},o(t){et(u.$$.fragment,t),et(m.$$.fragment,t),$t=!1},d(t){t&&b(e),t&&b(l),t&&b(c),st(u),st(m),t&&b(f),t&&b(_),Lt=!1,o(Tt)}}}function he(t){document.querySelector("input[name=bounded]").value=t.target.checked?1:""}function ue(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:""}function de(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}function pe(t,e,n){let i,{bStructuredSearch:o=!1}=e,{api_request_params:s={}}=e;function r(t){let e=document.getElementById("use_viewbox");e&&e.checked?n(2,i=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)):n(2,i="")}function a(t){let e=t.wrapLatLng(t.getCenter());e.lat.toFixed(5),e.lng.toFixed(5)}return ut.subscribe((t=>{t&&(t.on("move",(function(){r(t),a(t)})),t.on("load",(function(){r(t),a(t)})))})),t.$$set=t=>{"bStructuredSearch"in t&&n(0,o=t.bStructuredSearch),"api_request_params"in t&&n(1,s=t.api_request_params)},[o,s,i,function(){let t=u(ut);t&&r(t)}]}class me extends lt{constructor(t){super(),at(this,t,pe,ce,r,{bStructuredSearch:0,api_request_params:1})}} +!function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function i(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,l;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function h(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function u(t){let e;return h(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(h(e,n))}function p(t,e,n,i){if(t){const o=m(t,e,n,i);return t[0](o)}}function m(t,n,i,o){return t[1]&&o?e(i.ctx.slice(),t[1](o(n))):i.ctx}function f(t,e,n,i){if(t[2]&&i){const o=t[2](i(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let i=0;i32){const e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,i)}function k(t){return function(e){return e.preventDefault(),t.call(this,e)}}function M(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function A(t,e){t.value=null==e?"":e}function z(t,e){for(let n=0;n{Y.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}function nt(t,e,n){const i=t.$$.props[e];void 0!==i&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function it(t){t&&t.c()}function ot(t,e,i,r){const{fragment:a,on_mount:l,on_destroy:c,after_update:h}=t.$$;a&&a.m(e,i),r||F((()=>{const e=l.map(n).filter(s);c?c.push(...e):o(e),t.$$.on_mount=[]})),h.forEach(F)}function st(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e){-1===t.$$.dirty[0]&&(D.push(t),W||(W=!0,H.then(K)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const o=i.length?i[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),m&&rt(e,t)),n})):[],p.update(),m=!0,o(p.before_update),p.fragment=!!r&&r(p.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);p.fragment&&p.fragment.l(t),t.forEach(b)}else p.fragment&&p.fragment.c();n.intro&&tt(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),K()}N(d)}class lt{$destroy(){st(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;(function(){const t=1e6,e=1e3,n="transitionend",i=t=>null==t?`${t}`:{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},s=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e},r=t=>{const e=s(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=s(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:n,transitionDelay:i}=window.getComputedStyle(t);const o=Number.parseFloat(n),s=Number.parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],(Number.parseFloat(n)+Number.parseFloat(i))*e):0},c=t=>{t.dispatchEvent(new Event(n))},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,d=(t,e,n)=>{Object.keys(n).forEach((o=>{const s=n[o],r=e[o],a=r&&h(r)?"element":i(r);if(!new RegExp(s).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${o}" provided type "${a}" but expected type "${s}".`)}))},p=t=>!(!h(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),m=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},v=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},y=[],b=t=>{"loading"===document.readyState?(y.length||document.addEventListener("DOMContentLoaded",(()=>{y.forEach((t=>t()))})),y.push(t)):t()},w=()=>"rtl"===document.documentElement.dir,x=t=>{b((()=>{const e=v();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}}))},$=t=>{"function"==typeof t&&t()},L=(t,e,i=!0)=>{if(!i)return void $(t);const o=5,s=l(e)+o;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(n,a),$(t))};e.addEventListener(n,a),setTimeout((()=>{r||c(e)}),s)},T=(t,e,n,i)=>{let o=t.indexOf(e);if(-1===o)return t[!n&&i?t.length-1:0];const s=t.length;return o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))]},P=/[^.]*(?=\..*)\.|.*/,E=/\..*/,k=/::\d+$/,M={};let C=1;const S={mouseenter:"mouseover",mouseleave:"mouseout"},A=/^(mouseenter|mouseleave)/i,z=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function I(t){const e=O(t);return t.uidEvent=e,M[e]=M[e]||{},M[e]}function N(t,e){return function n(i){return i.delegateTarget=t,n.oneOff&&F.off(t,i.type,e),e.apply(t,[i])}}function B(t,e,n){return function i(o){const s=t.querySelectorAll(e);for(let{target:r}=o;r&&r!==this;r=r.parentNode)for(let a=s.length;a--;)if(s[a]===r)return o.delegateTarget=r,i.oneOff&&F.off(t,o.type,e,n),n.apply(r,[o]);return null}}function D(t,e,n=null){const i=Object.keys(t);for(let o=0,s=i.length;ofunction(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};i?i=t(i):n=t(n)}const[s,r,a]=Z(e,n,i),l=I(t),c=l[a]||(l[a]={}),h=D(c,r,s?n:null);if(h)return void(h.oneOff=h.oneOff&&o);const u=O(r,e.replace(P,"")),d=s?B(t,n,i):N(t,n);d.delegationSelector=s?n:null,d.originalHandler=r,d.oneOff=o,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,s)}function j(t,e,n,i,o){const s=D(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}function H(t,e,n,i){const o=e[n]||{};Object.keys(o).forEach((s=>{if(s.includes(i)){const i=o[s];j(t,e,n,i.originalHandler,i.delegationSelector)}}))}function W(t){return t=t.replace(E,""),S[t]||t}const F={on(t,e,n,i){R(t,e,n,i,!1)},one(t,e,n,i){R(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[o,s,r]=Z(e,n,i),a=r!==e,l=I(t),c=e.startsWith(".");if(void 0!==s){if(!l||!l[r])return;return void j(t,l,r,s,o?n:null)}c&&Object.keys(l).forEach((n=>{H(t,l,n,e.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((n=>{const i=n.replace(k,"");if(!a||e.includes(i)){const e=h[n];j(t,l,r,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=v(),o=W(e),s=e!==o,r=z.has(o);let a,l=!0,c=!0,h=!1,u=null;return s&&i&&(a=i.Event(e,n),i(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(u=document.createEvent("HTMLEvents"),u.initEvent(o,l,!0)):u=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((t=>{Object.defineProperty(u,t,{get:()=>n[t]})})),h&&u.preventDefault(),c&&t.dispatchEvent(u),u.defaultPrevented&&void 0!==a&&a.preventDefault(),u}},q=new Map,U={set(t,e,n){q.has(t)||q.set(t,new Map);const i=q.get(t);i.has(e)||0===i.size?i.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>q.has(t)&&q.get(t).get(e)||null,remove(t,e){if(!q.has(t))return;const n=q.get(t);n.delete(e),0===n.size&&q.delete(t)}},V="5.1.3";class K{constructor(t){(t=u(t))&&(this._element=t,U.set(this._element,this.constructor.DATA_KEY,this))}dispose(){U.remove(this._element,this.constructor.DATA_KEY),F.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}_queueCallback(t,e,n=!0){L(t,e,n)}static getInstance(t){return U.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return V}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const G=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;F.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),m(this))return;const o=a(this)||this.closest(`.${i}`);t.getOrCreateInstance(o)[e]()}))},Y="alert",X=".bs.alert",J=`close${X}`,Q=`closed${X}`,tt="fade",et="show";class nt extends K{static get NAME(){return Y}close(){if(F.trigger(this._element,J).defaultPrevented)return;this._element.classList.remove(et);const t=this._element.classList.contains(tt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),F.trigger(this._element,Q),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=nt.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(nt,"close"),x(nt);const it="button",ot="active",st='[data-bs-toggle="button"]',rt="click.bs.button.data-api";class at extends K{static get NAME(){return it}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(ot))}static jQueryInterface(t){return this.each((function(){const e=at.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function lt(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function ct(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}F.on(document,rt,st,(t=>{t.preventDefault();const e=t.target.closest(st);at.getOrCreateInstance(e).toggle()})),x(at);const ht={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${ct(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ct(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter((t=>t.startsWith("bs"))).forEach((n=>{let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=lt(t.dataset[n])})),e},getDataAttribute:(t,e)=>lt(t.getAttribute(`data-bs-${ct(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},ut=3,dt={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&i.nodeType!==ut;)i.matches(e)&&n.push(i),i=i.parentNode;return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(", ");return this.find(e,t).filter((t=>!m(t)&&p(t)))}},pt="carousel",mt=".bs.carousel",ft=".data-api",_t=500,gt=40,vt={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},yt={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},bt="next",wt="prev",xt="left",$t="right",Lt={ArrowLeft:$t,ArrowRight:xt},Tt=`slide${mt}`,Pt=`slid${mt}`,Et=`keydown${mt}`,kt=`mouseenter${mt}`,Mt=`mouseleave${mt}`,Ct=`touchstart${mt}`,St=`touchmove${mt}`,At=`touchend${mt}`,zt=`pointerdown${mt}`,Ot=`pointerup${mt}`,It=`dragstart${mt}`,Nt=`load${mt}${ft}`,Bt=`click${mt}${ft}`,Dt="carousel",Zt="active",Rt="slide",jt="carousel-item-end",Ht="carousel-item-start",Wt="carousel-item-next",Ft="carousel-item-prev",qt="pointer-event",Ut=".active",Vt=".active.carousel-item",Kt=".carousel-item",Gt=".carousel-item img",Yt=".carousel-item-next, .carousel-item-prev",Xt=".carousel-indicators",Jt="[data-bs-target]",Qt="[data-bs-slide], [data-bs-slide-to]",te='[data-bs-ride="carousel"]',ee="touch",ne="pen";class ie extends K{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=dt.findOne(Xt,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return vt}static get NAME(){return pt}next(){this._slide(bt)}nextWhenVisible(){!document.hidden&&p(this._element)&&this.next()}prev(){this._slide(wt)}pause(t){t||(this._isPaused=!0),dt.findOne(Yt,this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=dt.findOne(Vt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void F.one(this._element,Pt,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const n=t>e?bt:wt;this._slide(n,this._items[t])}_getConfig(t){return t={...vt,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(pt,t,yt),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=gt)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?$t:xt)}_addEventListeners(){this._config.keyboard&&F.on(this._element,Et,(t=>this._keydown(t))),"hover"===this._config.pause&&(F.on(this._element,kt,(t=>this.pause(t))),F.on(this._element,Mt,(t=>this.cycle(t)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&(t.pointerType===ne||t.pointerType===ee),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},n=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},i=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),_t+this._config.interval))};dt.find(Gt,this._element).forEach((t=>{F.on(t,It,(t=>t.preventDefault()))})),this._pointerEvent?(F.on(this._element,zt,(t=>e(t))),F.on(this._element,Ot,(t=>i(t))),this._element.classList.add(qt)):(F.on(this._element,Ct,(t=>e(t))),F.on(this._element,St,(t=>n(t))),F.on(this._element,At,(t=>i(t))))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Lt[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?dt.find(Kt,t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const n=t===bt;return T(this._items,e,n,this._config.wrap)}_triggerSlideEvent(t,e){const n=this._getItemIndex(t),i=this._getItemIndex(dt.findOne(Vt,this._element));return F.trigger(this._element,Tt,{relatedTarget:t,direction:e,from:i,to:n})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=dt.findOne(Ut,this._indicatorsElement);e.classList.remove(Zt),e.removeAttribute("aria-current");const n=dt.find(Jt,this._indicatorsElement);for(let e=0;e{F.trigger(this._element,Pt,{relatedTarget:s,direction:u,from:o,to:r})};if(this._element.classList.contains(Rt)){s.classList.add(h),g(s),i.classList.add(c),s.classList.add(c);const t=()=>{s.classList.remove(c,h),s.classList.add(Zt),i.classList.remove(Zt,h,c),this._isSliding=!1,setTimeout(d,0)};this._queueCallback(t,i,!0)}else i.classList.remove(Zt),s.classList.add(Zt),this._isSliding=!1,d();a&&this.cycle()}_directionToOrder(t){return[$t,xt].includes(t)?w()?t===xt?wt:bt:t===xt?bt:wt:t}_orderToDirection(t){return[bt,wt].includes(t)?w()?t===wt?xt:$t:t===wt?$t:xt:t}static carouselInterface(t,e){const n=ie.getOrCreateInstance(t,e);let{_config:i}=n;"object"==typeof e&&(i={...i,...e});const o="string"==typeof e?e:i.slide;if("number"==typeof e)n.to(e);else if("string"==typeof o){if(void 0===n[o])throw new TypeError(`No method named "${o}"`);n[o]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}static jQueryInterface(t){return this.each((function(){ie.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=a(this);if(!e||!e.classList.contains(Dt))return;const n={...ht.getDataAttributes(e),...ht.getDataAttributes(this)},i=this.getAttribute("data-bs-slide-to");i&&(n.interval=!1),ie.carouselInterface(e,n),i&&ie.getInstance(e).to(i),t.preventDefault()}}F.on(document,Bt,Qt,ie.dataApiClickHandler),F.on(window,Nt,(()=>{const t=dt.find(te);for(let e=0,n=t.length;et===this._element));null!==i&&o.length&&(this._selector=i,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ae}static get NAME(){return oe}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=dt.find(ve,this._config.parent);e=dt.find(xe,this._config.parent).filter((e=>!t.includes(e)))}const n=dt.findOne(this._selector);if(e.length){const i=e.find((t=>n!==t));if(t=i?Le.getInstance(i):null,t&&t._isTransitioning)return}if(F.trigger(this._element,ce).defaultPrevented)return;e.forEach((e=>{n!==e&&Le.getOrCreateInstance(e,{toggle:!1}).hide(),t||U.set(e,se,null)}));const i=this._getDimension();this._element.classList.remove(fe),this._element.classList.add(_e),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(_e),this._element.classList.add(fe,me),this._element.style[i]="",F.trigger(this._element,he)},s=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[i]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(F.trigger(this._element,ue).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(_e),this._element.classList.remove(fe,me);const e=this._triggerArray.length;for(let t=0;t{this._isTransitioning=!1,this._element.classList.remove(_e),this._element.classList.add(fe),F.trigger(this._element,de)};this._element.style[t]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(me)}_getConfig(t){return(t={...ae,...ht.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=u(t.parent),d(oe,t,le),t}_getDimension(){return this._element.classList.contains(ye)?be:we}_initializeChildren(){if(!this._config.parent)return;const t=dt.find(ve,this._config.parent);dt.find($e,this._config.parent).filter((e=>!t.includes(e))).forEach((t=>{const e=a(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}))}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach((t=>{e?t.classList.remove(ge):t.classList.add(ge),t.setAttribute("aria-expanded",e)}))}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const n=Le.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}F.on(document,pe,$e,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this);dt.find(e).forEach((t=>{Le.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),x(Le);var Te="top",Pe="bottom",Ee="right",ke="left",Me="auto",Ce=[Te,Pe,Ee,ke],Se="start",Ae="end",ze="clippingParents",Oe="viewport",Ie="popper",Ne="reference",Be=Ce.reduce((function(t,e){return t.concat([e+"-"+Se,e+"-"+Ae])}),[]),De=[].concat(Ce,[Me]).reduce((function(t,e){return t.concat([e,e+"-"+Se,e+"-"+Ae])}),[]),Ze="beforeRead",Re="read",je="afterRead",He="beforeMain",We="main",Fe="afterMain",qe="beforeWrite",Ue="write",Ve="afterWrite",Ke=[Ze,Re,je,He,We,Fe,qe,Ue,Ve];function Ge(t){return t?(t.nodeName||"").toLowerCase():null}function Ye(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Xe(t){return t instanceof Ye(t).Element||t instanceof Element}function Je(t){return t instanceof Ye(t).HTMLElement||t instanceof HTMLElement}function Qe(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ye(t).ShadowRoot||t instanceof ShadowRoot)}function tn(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];Je(o)&&Ge(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))}function en(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],o=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});Je(i)&&Ge(i)&&(Object.assign(i.style,s),Object.keys(o).forEach((function(t){i.removeAttribute(t)})))}))}}const nn={name:"applyStyles",enabled:!0,phase:"write",fn:tn,effect:en,requires:["computeStyles"]};function on(t){return t.split("-")[0]}function sn(t,e){var n=t.getBoundingClientRect(),i=1,o=1;return{width:n.width/i,height:n.height/o,top:n.top/o,right:n.right/i,bottom:n.bottom/o,left:n.left/i,x:n.left/i,y:n.top/o}}function rn(t){var e=sn(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function an(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Qe(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ln(t){return Ye(t).getComputedStyle(t)}function cn(t){return["table","td","th"].indexOf(Ge(t))>=0}function hn(t){return((Xe(t)?t.ownerDocument:t.document)||window.document).documentElement}function un(t){return"html"===Ge(t)?t:t.assignedSlot||t.parentNode||(Qe(t)?t.host:null)||hn(t)}function dn(t){return Je(t)&&"fixed"!==ln(t).position?t.offsetParent:null}function pn(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Je(t)&&"fixed"===ln(t).position)return null;for(var n=un(t);Je(n)&&["html","body"].indexOf(Ge(n))<0;){var i=ln(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function mn(t){for(var e=Ye(t),n=dn(t);n&&cn(n)&&"static"===ln(n).position;)n=dn(n);return n&&("html"===Ge(n)||"body"===Ge(n)&&"static"===ln(n).position)?e:n||pn(t)||e}function fn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var _n=Math.max,gn=Math.min,vn=Math.round;function yn(t,e,n){return _n(t,gn(e,n))}function bn(){return{top:0,right:0,bottom:0,left:0}}function wn(t){return Object.assign({},bn(),t)}function xn(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var $n=function(t,e){return wn("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:xn(t,Ce))};function Ln(t){var e,n=t.state,i=t.name,o=t.options,s=n.elements.arrow,r=n.modifiersData.popperOffsets,a=on(n.placement),l=fn(a),c=[ke,Ee].indexOf(a)>=0?"height":"width";if(s&&r){var h=$n(o.padding,n),u=rn(s),d="y"===l?Te:ke,p="y"===l?Pe:Ee,m=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],f=r[l]-n.rects.reference[l],_=mn(s),g=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,v=m/2-f/2,y=h[d],b=g-u[c]-h[p],w=g/2-u[c]/2+v,x=yn(y,w,b),$=l;n.modifiersData[i]=((e={})[$]=x,e.centerOffset=x-w,e)}}function Tn(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&an(e.elements.popper,i)&&(e.elements.arrow=i)}const Pn={name:"arrow",enabled:!0,phase:"main",fn:Ln,effect:Tn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function En(t){return t.split("-")[1]}var kn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mn(t){var e=t.x,n=t.y,i=window.devicePixelRatio||1;return{x:vn(vn(e*i)/i)||0,y:vn(vn(n*i)/i)||0}}function Cn(t){var e,n=t.popper,i=t.popperRect,o=t.placement,s=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=!0===h?Mn(r):"function"==typeof h?h(r):r,d=u.x,p=void 0===d?0:d,m=u.y,f=void 0===m?0:m,_=r.hasOwnProperty("x"),g=r.hasOwnProperty("y"),v=ke,y=Te,b=window;if(c){var w=mn(n),x="clientHeight",$="clientWidth";w===Ye(n)&&"static"!==ln(w=hn(n)).position&&"absolute"===a&&(x="scrollHeight",$="scrollWidth"),w=w,o!==Te&&(o!==ke&&o!==Ee||s!==Ae)||(y=Pe,f-=w[x]-i.height,f*=l?1:-1),o!==ke&&(o!==Te&&o!==Pe||s!==Ae)||(v=Ee,p-=w[$]-i.width,p*=l?1:-1)}var L,T=Object.assign({position:a},c&&kn);return l?Object.assign({},T,((L={})[y]=g?"0":"",L[v]=_?"0":"",L.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",L)):Object.assign({},T,((e={})[y]=g?f+"px":"",e[v]=_?p+"px":"",e.transform="",e))}function Sn(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,s=n.adaptive,r=void 0===s||s,a=n.roundOffsets,l=void 0===a||a,c={placement:on(e.placement),variation:En(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Cn(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Cn(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const An={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Sn,data:{}};var zn={passive:!0};function On(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,s=void 0===o||o,r=i.resize,a=void 0===r||r,l=Ye(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach((function(t){t.addEventListener("scroll",n.update,zn)})),a&&l.addEventListener("resize",n.update,zn),function(){s&&c.forEach((function(t){t.removeEventListener("scroll",n.update,zn)})),a&&l.removeEventListener("resize",n.update,zn)}}const In={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:On,data:{}};var Nn={left:"right",right:"left",bottom:"top",top:"bottom"};function Bn(t){return t.replace(/left|right|bottom|top/g,(function(t){return Nn[t]}))}var Dn={start:"end",end:"start"};function Zn(t){return t.replace(/start|end/g,(function(t){return Dn[t]}))}function Rn(t){var e=Ye(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function jn(t){return sn(hn(t)).left+Rn(t).scrollLeft}function Hn(t){var e=Ye(t),n=hn(t),i=e.visualViewport,o=n.clientWidth,s=n.clientHeight,r=0,a=0;return i&&(o=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=i.offsetLeft,a=i.offsetTop)),{width:o,height:s,x:r+jn(t),y:a}}function Wn(t){var e,n=hn(t),i=Rn(t),o=null==(e=t.ownerDocument)?void 0:e.body,s=_n(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=_n(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+jn(t),l=-i.scrollTop;return"rtl"===ln(o||n).direction&&(a+=_n(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Fn(t){var e=ln(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function qn(t){return["html","body","#document"].indexOf(Ge(t))>=0?t.ownerDocument.body:Je(t)&&Fn(t)?t:qn(un(t))}function Un(t,e){var n;void 0===e&&(e=[]);var i=qn(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),s=Ye(i),r=o?[s].concat(s.visualViewport||[],Fn(i)?i:[]):i,a=e.concat(r);return o?a:a.concat(Un(un(r)))}function Vn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Kn(t){var e=sn(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Gn(t,e){return e===Oe?Vn(Hn(t)):Je(e)?Kn(e):Vn(Wn(hn(t)))}function Yn(t){var e=Un(un(t)),n=["absolute","fixed"].indexOf(ln(t).position)>=0&&Je(t)?mn(t):t;return Xe(n)?e.filter((function(t){return Xe(t)&&an(t,n)&&"body"!==Ge(t)})):[]}function Xn(t,e,n){var i="clippingParents"===e?Yn(t):[].concat(e),o=[].concat(i,[n]),s=o[0],r=o.reduce((function(e,n){var i=Gn(t,n);return e.top=_n(i.top,e.top),e.right=gn(i.right,e.right),e.bottom=gn(i.bottom,e.bottom),e.left=_n(i.left,e.left),e}),Gn(t,s));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function Jn(t){var e,n=t.reference,i=t.element,o=t.placement,s=o?on(o):null,r=o?En(o):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(s){case Te:e={x:a,y:n.y-i.height};break;case Pe:e={x:a,y:n.y+n.height};break;case Ee:e={x:n.x+n.width,y:l};break;case ke:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=s?fn(s):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Se:e[c]=e[c]-(n[h]/2-i[h]/2);break;case Ae:e[c]=e[c]+(n[h]/2-i[h]/2)}}return e}function Qn(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=void 0===i?t.placement:i,s=n.boundary,r=void 0===s?ze:s,a=n.rootBoundary,l=void 0===a?Oe:a,c=n.elementContext,h=void 0===c?Ie:c,u=n.altBoundary,d=void 0!==u&&u,p=n.padding,m=void 0===p?0:p,f=wn("number"!=typeof m?m:xn(m,Ce)),_=h===Ie?Ne:Ie,g=t.rects.popper,v=t.elements[d?_:h],y=Xn(Xe(v)?v:v.contextElement||hn(t.elements.popper),r,l),b=sn(t.elements.reference),w=Jn({reference:b,element:g,strategy:"absolute",placement:o}),x=Vn(Object.assign({},g,w)),$=h===Ie?x:b,L={top:y.top-$.top+f.top,bottom:$.bottom-y.bottom+f.bottom,left:y.left-$.left+f.left,right:$.right-y.right+f.right},T=t.modifiersData.offset;if(h===Ie&&T){var P=T[o];Object.keys(L).forEach((function(t){var e=[Ee,Pe].indexOf(t)>=0?1:-1,n=[Te,Pe].indexOf(t)>=0?"y":"x";L[t]+=P[n]*e}))}return L}function ti(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?De:l,h=En(i),u=h?a?Be:Be.filter((function(t){return En(t)===h})):Ce,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,n){return e[n]=Qn(t,{placement:n,boundary:o,rootBoundary:s,padding:r})[on(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function ei(t){if(on(t)===Me)return[];var e=Bn(t);return[Zn(t),e,Zn(e)]}function ni(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,h=n.boundary,u=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=void 0===p||p,f=n.allowedAutoPlacements,_=e.options.placement,g=on(_),v=l||(g!==_&&m?ei(_):[Bn(_)]),y=[_].concat(v).reduce((function(t,n){return t.concat(on(n)===Me?ti(e,{placement:n,boundary:h,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)}),[]),b=e.rects.reference,w=e.rects.popper,x=new Map,$=!0,L=y[0],T=0;T=0,C=M?"width":"height",S=Qn(e,{placement:P,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),A=M?k?Ee:ke:k?Pe:Te;b[C]>w[C]&&(A=Bn(A));var z=Bn(A),O=[];if(s&&O.push(S[E]<=0),a&&O.push(S[A]<=0,S[z]<=0),O.every((function(t){return t}))){L=P,$=!1;break}x.set(P,O)}if($)for(var I=function(t){var e=y.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return L=e,"break"},N=m?3:1;N>0&&"break"!==I(N);N--);e.placement!==L&&(e.modifiersData[i]._skip=!0,e.placement=L,e.reset=!0)}}const ii={name:"flip",enabled:!0,phase:"main",fn:ni,requiresIfExists:["offset"],data:{_skip:!1}};function oi(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function si(t){return[Te,Ee,Pe,ke].some((function(e){return t[e]>=0}))}function ri(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,r=Qn(e,{elementContext:"reference"}),a=Qn(e,{altBoundary:!0}),l=oi(r,i),c=oi(a,o,s),h=si(l),u=si(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}const ai={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ri};function li(t,e,n){var i=on(t),o=[ke,Te].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[ke,Ee].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function ci(t){var e=t.state,n=t.options,i=t.name,o=n.offset,s=void 0===o?[0,0]:o,r=De.reduce((function(t,n){return t[n]=li(n,e.rects,s),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}const hi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ci};function ui(t){var e=t.state,n=t.name;e.modifiersData[n]=Jn({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const di={name:"popperOffsets",enabled:!0,phase:"read",fn:ui,data:{}};function pi(t){return"x"===t?"y":"x"}function mi(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,s=void 0===o||o,r=n.altAxis,a=void 0!==r&&r,l=n.boundary,c=n.rootBoundary,h=n.altBoundary,u=n.padding,d=n.tether,p=void 0===d||d,m=n.tetherOffset,f=void 0===m?0:m,_=Qn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),g=on(e.placement),v=En(e.placement),y=!v,b=fn(g),w=pi(b),x=e.modifiersData.popperOffsets,$=e.rects.reference,L=e.rects.popper,T="function"==typeof f?f(Object.assign({},e.rects,{placement:e.placement})):f,P={x:0,y:0};if(x){if(s||a){var E="y"===b?Te:ke,k="y"===b?Pe:Ee,M="y"===b?"height":"width",C=x[b],S=x[b]+_[E],A=x[b]-_[k],z=p?-L[M]/2:0,O=v===Se?$[M]:L[M],I=v===Se?-L[M]:-$[M],N=e.elements.arrow,B=p&&N?rn(N):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:bn(),Z=D[E],R=D[k],j=yn(0,$[M],B[M]),H=y?$[M]/2-z-j-Z-T:O-j-Z-T,W=y?-$[M]/2+z+j+R+T:I+j+R+T,F=e.elements.arrow&&mn(e.elements.arrow),q=F?"y"===b?F.clientTop||0:F.clientLeft||0:0,U=e.modifiersData.offset?e.modifiersData.offset[e.placement][b]:0,V=x[b]+H-U-q,K=x[b]+W-U;if(s){var G=yn(p?gn(S,V):S,C,p?_n(A,K):A);x[b]=G,P[b]=G-C}if(a){var Y="x"===b?Te:ke,X="x"===b?Pe:Ee,J=x[w],Q=J+_[Y],tt=J-_[X],et=yn(p?gn(Q,V):Q,J,p?_n(tt,K):tt);x[w]=et,P[w]=et-J}}e.modifiersData[i]=P}}const fi={name:"preventOverflow",enabled:!0,phase:"main",fn:mi,requiresIfExists:["offset"]};function _i(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function gi(t){return t!==Ye(t)&&Je(t)?_i(t):Rn(t)}function vi(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,i=e.height/t.offsetHeight||1;return 1!==n||1!==i}function yi(t,e,n){void 0===n&&(n=!1);var i=Je(e);Je(e)&&vi(e);var o=hn(e),s=sn(t),r={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(i||!i&&!n)&&(("body"!==Ge(e)||Fn(o))&&(r=gi(e)),Je(e)?((a=sn(e)).x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=jn(o))),{x:s.left+r.scrollLeft-a.x,y:s.top+r.scrollTop-a.y,width:s.width,height:s.height}}function bi(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),i}function wi(t){var e=bi(t);return Ke.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}function xi(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function $i(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Li={placement:"bottom",modifiers:[],strategy:"absolute"};function Ti(){for(var t=arguments.length,e=new Array(t),n=0;nF.on(t,"mouseover",_))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ki),this._element.classList.add(Ki),F.trigger(this._element,Fi,t)}hide(){if(m(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){F.trigger(this._element,ji,t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>F.off(t,"mouseover",_))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Ki),this._element.classList.remove(Ki),this._element.setAttribute("aria-expanded","false"),ht.removeDataAttribute(this._menu,"popper"),F.trigger(this._element,Hi,t))}_getConfig(t){if(t={...this.constructor.Default,...ht.getDataAttributes(this._element),...t},d(Si,t,this.constructor.DefaultType),"object"==typeof t.reference&&!h(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Si.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===Ci)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:h(this._config.reference)?e=u(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const n=this._getPopperConfig(),i=n.modifiers.find((t=>"applyStyles"===t.name&&!1===t.enabled));this._popper=Mi(e,this._menu,n),i&&ht.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Ki)}_getMenuElement(){return dt.next(this._element,to)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains(Yi))return ao;if(t.classList.contains(Xi))return lo;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains(Gi)?e?oo:io:e?ro:so}_detectNavbar(){return null!==this._element.closest(`.${Ji}`)}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=dt.find(no,this._menu).filter(p);n.length&&T(n,e,t===Di,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=uo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(t.button===Zi||"keyup"===t.type&&t.key!==Ni))return;const e=dt.find(Qi);for(let n=0,i=e.length;ne+t)),this._setElementAttributes(po,"paddingRight",(e=>e+t)),this._setElementAttributes(mo,"marginRight",(e=>e-t))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth(),o=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t)[e];t.style[e]=`${n(Number.parseFloat(o))}px`};this._applyManipulationCallback(t,o)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(po,"paddingRight"),this._resetElementAttributes(mo,"marginRight")}_saveInitialAttribute(t,e){const n=t.style[e];n&&ht.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){const n=t=>{const n=ht.getDataAttribute(t,e);void 0===n?t.style.removeProperty(e):(ht.removeDataAttribute(t,e),t.style[e]=n)};this._applyManipulationCallback(t,n)}_applyManipulationCallback(t,e){h(t)?e(t):dt.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const _o={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},go={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},vo="backdrop",yo="fade",bo="show",wo=`mousedown.bs.${vo}`;class xo{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&g(this._getElement()),this._getElement().classList.add(bo),this._emulateAnimation((()=>{$(t)}))):$(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(bo),this._emulateAnimation((()=>{this.dispose(),$(t)}))):$(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(yo),this._element=t}return this._element}_getConfig(t){return(t={..._o,..."object"==typeof t?t:{}}).rootElement=u(t.rootElement),d(vo,t,go),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),F.on(this._getElement(),wo,(()=>{$(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&(F.off(this._element,wo),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){L(t,this._getElement(),this._config.isAnimated)}}const $o={trapElement:null,autofocus:!0},Lo={trapElement:"element",autofocus:"boolean"},To="focustrap",Po=".bs.focustrap",Eo=`focusin${Po}`,ko=`keydown.tab${Po}`,Mo="Tab",Co="forward",So="backward";class Ao{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),F.off(document,Po),F.on(document,Eo,(t=>this._handleFocusin(t))),F.on(document,ko,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,F.off(document,Po))}_handleFocusin(t){const{target:e}=t,{trapElement:n}=this._config;if(e===document||e===n||n.contains(e))return;const i=dt.focusableChildren(n);0===i.length?n.focus():this._lastTabNavDirection===So?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Mo&&(this._lastTabNavDirection=t.shiftKey?So:Co)}_getConfig(t){return t={...$o,..."object"==typeof t?t:{}},d(To,t,Lo),t}}const zo="modal",Oo=".bs.modal",Io="Escape",No={backdrop:!0,keyboard:!0,focus:!0},Bo={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Do=`hide${Oo}`,Zo=`hidePrevented${Oo}`,Ro=`hidden${Oo}`,jo=`show${Oo}`,Ho=`shown${Oo}`,Wo=`resize${Oo}`,Fo=`click.dismiss${Oo}`,qo=`keydown.dismiss${Oo}`,Uo=`mouseup.dismiss${Oo}`,Vo=`mousedown.dismiss${Oo}`,Ko=`click${Oo}.data-api`,Go="modal-open",Yo="fade",Xo="show",Jo="modal-static",Qo=".modal.show",ts=".modal-dialog",es=".modal-body",ns='[data-bs-toggle="modal"]';class is extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=dt.findOne(ts,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new fo}static get Default(){return No}static get NAME(){return zo}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||F.trigger(this._element,jo,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Go),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),F.on(this._dialog,Vo,(()=>{F.one(this._element,Uo,(t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;if(F.trigger(this._element,Do).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(Xo),F.off(this._element,Fo),F.off(this._dialog,Vo),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((t=>F.off(t,Oo))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new xo({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ao({trapElement:this._element})}_getConfig(t){return t={...No,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(zo,t,Bo),t}_showElement(t){const e=this._isAnimated(),n=dt.findOne(es,this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,n&&(n.scrollTop=0),e&&g(this._element),this._element.classList.add(Xo);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,F.trigger(this._element,Ho,{relatedTarget:t})};this._queueCallback(i,this._dialog,e)}_setEscapeEvent(){this._isShown?F.on(this._element,qo,(t=>{this._config.keyboard&&t.key===Io?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==Io||this._triggerBackdropTransition()})):F.off(this._element,qo)}_setResizeEvent(){this._isShown?F.on(window,Wo,(()=>this._adjustDialog())):F.off(window,Wo)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Go),this._resetAdjustments(),this._scrollBar.reset(),F.trigger(this._element,Ro)}))}_showBackdrop(t){F.on(this._element,Fo,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains(Yo)}_triggerBackdropTransition(){if(F.trigger(this._element,Zo).defaultPrevented)return;const{classList:t,scrollHeight:e,style:n}=this._element,i=e>document.documentElement.clientHeight;!i&&"hidden"===n.overflowY||t.contains(Jo)||(i||(n.overflowY="hidden"),t.add(Jo),this._queueCallback((()=>{t.remove(Jo),i||this._queueCallback((()=>{n.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;(!n&&t&&!w()||n&&!t&&w())&&(this._element.style.paddingLeft=`${e}px`),(n&&!t&&!w()||!n&&t&&w())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}F.on(document,Ko,ns,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),F.one(e,jo,(t=>{t.defaultPrevented||F.one(e,Ro,(()=>{p(this)&&this.focus()}))}));const n=dt.findOne(Qo);n&&is.getInstance(n).hide(),is.getOrCreateInstance(e).toggle(this)})),G(is),x(is);const os="offcanvas",ss=".bs.offcanvas",rs=".data-api",as=`load${ss}${rs}`,ls="Escape",cs={backdrop:!0,keyboard:!0,scroll:!1},hs={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},us="show",ds="offcanvas-backdrop",ps=".offcanvas.show",ms=`show${ss}`,fs=`shown${ss}`,_s=`hide${ss}`,gs=`hidden${ss}`,vs=`click${ss}${rs}`,ys=`keydown.dismiss${ss}`,bs='[data-bs-toggle="offcanvas"]';class ws extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return os}static get Default(){return cs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(F.trigger(this._element,ms,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new fo).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(us);const e=()=>{this._config.scroll||this._focustrap.activate(),F.trigger(this._element,fs,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(F.trigger(this._element,_s).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(us),this._backdrop.hide();const t=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new fo).reset(),F.trigger(this._element,gs)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...cs,...ht.getDataAttributes(this._element),..."object"==typeof t?t:{}},d(os,t,hs),t}_initializeBackDrop(){return new xo({className:ds,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ao({trapElement:this._element})}_addEventListeners(){F.on(this._element,ys,(t=>{this._config.keyboard&&t.key===ls&&this.hide()}))}static jQueryInterface(t){return this.each((function(){const e=ws.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}F.on(document,vs,bs,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this))return;F.one(e,gs,(()=>{p(this)&&this.focus()}));const n=dt.findOne(ps);n&&n!==e&&ws.getInstance(n).hide(),ws.getOrCreateInstance(e).toggle(this)})),F.on(window,as,(()=>dt.find(ps).forEach((t=>ws.getOrCreateInstance(t).show())))),G(ws),x(ws);const xs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),$s=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ls=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ts=(t,e)=>{const n=t.nodeName.toLowerCase();if(e.includes(n))return!xs.has(n)||Boolean($s.test(t.nodeValue)||Ls.test(t.nodeValue));const i=e.filter((t=>t instanceof RegExp));for(let t=0,e=i.length;t{Ts(t,r)||n.removeAttribute(t.nodeName)}))}return i.body.innerHTML}const ks="tooltip",Ms=".bs.tooltip",Cs="bs-tooltip",Ss=new Set(["sanitize","allowList","sanitizeFn"]),As={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},zs={AUTO:"auto",TOP:"top",RIGHT:w()?"left":"right",BOTTOM:"bottom",LEFT:w()?"right":"left"},Os={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:Ps,popperConfig:null},Is={HIDE:`hide${Ms}`,HIDDEN:`hidden${Ms}`,SHOW:`show${Ms}`,SHOWN:`shown${Ms}`,INSERTED:`inserted${Ms}`,CLICK:`click${Ms}`,FOCUSIN:`focusin${Ms}`,FOCUSOUT:`focusout${Ms}`,MOUSEENTER:`mouseenter${Ms}`,MOUSELEAVE:`mouseleave${Ms}`},Ns="fade",Bs="show",Ds="show",Zs="out",Rs=".tooltip-inner",js=".modal",Hs="hide.bs.modal",Ws="hover",Fs="focus",qs="click",Us="manual";class Vs extends K{constructor(t,e){if(void 0===Ci)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Os}static get NAME(){return ks}static get Event(){return Is}static get DefaultType(){return As}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Bs))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),F.off(this._element.closest(js),Hs,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=F.trigger(this._element,this.constructor.Event.SHOW),e=f(this._element),n=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!n)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Rs).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const i=this.getTipElement(),s=o(this.constructor.NAME);i.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&i.classList.add(Ns);const r="function"==typeof this._config.placement?this._config.placement.call(this,i,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;U.set(i,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(i),F.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Mi(this._element,i,this._getPopperConfig(a)),i.classList.add(Bs);const c=this._resolvePossibleFunction(this._config.customClass);c&&i.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{F.on(t,"mouseover",_)}));const h=()=>{const t=this._hoverState;this._hoverState=null,F.trigger(this._element,this.constructor.Event.SHOWN),t===Zs&&this._leave(null,this)},u=this.tip.classList.contains(Ns);this._queueCallback(h,this.tip,u)}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==Ds&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),F.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(F.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Bs),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>F.off(t,"mouseover",_))),this._activeTrigger[qs]=!1,this._activeTrigger[Fs]=!1,this._activeTrigger[Ws]=!1;const n=this.tip.classList.contains(Ns);this._queueCallback(e,this.tip,n),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Ns,Bs),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Rs)}_sanitizeAndSetContent(t,e,n){const i=dt.findOne(n,t);e||!i?this.setElementContent(i,e):i.remove()}setElementContent(t,e){if(null!==t)return h(e)?(e=u(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=Es(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return zs[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((t=>{if("click"===t)F.on(this._element,this.constructor.Event.CLICK,this._config.selector,(t=>this.toggle(t)));else if(t!==Us){const e=t===Ws?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,n=t===Ws?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;F.on(this._element,e,this._config.selector,(t=>this._enter(t))),F.on(this._element,n,this._config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},F.on(this._element.closest(js),Hs,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?Fs:Ws]=!0),e.getTipElement().classList.contains(Bs)||e._hoverState===Ds?e._hoverState=Ds:(clearTimeout(e._timeout),e._hoverState=Ds,e._config.delay&&e._config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===Ds&&e.show()}),e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?Fs:Ws]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Zs,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===Zs&&e.hide()}),e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=ht.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{Ss.has(t)&&delete e[t]})),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d(ks,t,this.constructor.DefaultType),t.sanitize&&(t.template=Es(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),n=t.getAttribute("class").match(e);null!==n&&n.length>0&&n.map((t=>t.trim())).forEach((e=>t.classList.remove(e)))}_getBasicClassPrefix(){return Cs}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=Vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}x(Vs);const Ks="popover",Gs=".bs.popover",Ys="bs-popover",Xs={...Vs.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:''},Js={...Vs.DefaultType,content:"(string|element|function)"},Qs={HIDE:`hide${Gs}`,HIDDEN:`hidden${Gs}`,SHOW:`show${Gs}`,SHOWN:`shown${Gs}`,INSERTED:`inserted${Gs}`,CLICK:`click${Gs}`,FOCUSIN:`focusin${Gs}`,FOCUSOUT:`focusout${Gs}`,MOUSEENTER:`mouseenter${Gs}`,MOUSELEAVE:`mouseleave${Gs}`},tr=".popover-header",er=".popover-body";class nr extends Vs{static get Default(){return Xs}static get NAME(){return Ks}static get Event(){return Qs}static get DefaultType(){return Js}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),tr),this._sanitizeAndSetContent(t,this._getContent(),er)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return Ys}static jQueryInterface(t){return this.each((function(){const e=nr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}x(nr);const ir="scrollspy",or=".bs.scrollspy",sr={offset:10,method:"auto",target:""},rr={offset:"number",method:"string",target:"(string|element)"},ar=`activate${or}`,lr=`scroll${or}`,cr=`load${or}.data-api`,hr="dropdown-item",ur="active",dr='[data-bs-spy="scroll"]',pr=".nav, .list-group",mr=".nav-link",fr=".nav-item",_r=".list-group-item",gr=`${mr}, ${_r}, .${hr}`,vr=".dropdown",yr=".dropdown-toggle",br="offset",wr="position";class xr extends K{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,F.on(this._scrollElement,lr,(()=>this._process())),this.refresh(),this._process()}static get Default(){return sr}static get NAME(){return ir}refresh(){const t=this._scrollElement===this._scrollElement.window?br:wr,e="auto"===this._config.method?t:this._config.method,n=e===wr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),dt.find(gr,this._config.target).map((t=>{const i=r(t),o=i?dt.findOne(i):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[ht[e](o).top+n,i]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){F.off(this._scrollElement,or),super.dispose()}_getConfig(t){return(t={...sr,...ht.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=u(t.target)||document.documentElement,d(ir,t,rr),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),n=dt.findOne(e.join(","),this._config.target);n.classList.add(ur),n.classList.contains(hr)?dt.findOne(yr,n.closest(vr)).classList.add(ur):dt.parents(n,pr).forEach((t=>{dt.prev(t,`${mr}, ${_r}`).forEach((t=>t.classList.add(ur))),dt.prev(t,fr).forEach((t=>{dt.children(t,mr).forEach((t=>t.classList.add(ur)))}))})),F.trigger(this._scrollElement,ar,{relatedTarget:t})}_clear(){dt.find(gr,this._config.target).filter((t=>t.classList.contains(ur))).forEach((t=>t.classList.remove(ur)))}static jQueryInterface(t){return this.each((function(){const e=xr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(window,cr,(()=>{dt.find(dr).forEach((t=>new xr(t)))})),x(xr);const $r="tab",Lr=".bs.tab",Tr=`hide${Lr}`,Pr=`hidden${Lr}`,Er=`show${Lr}`,kr=`shown${Lr}`,Mr=`click${Lr}.data-api`,Cr="dropdown-menu",Sr="active",Ar="fade",zr="show",Or=".dropdown",Ir=".nav, .list-group",Nr=".active",Br=":scope > li > .active",Dr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Zr=".dropdown-toggle",Rr=":scope > .dropdown-menu .active";class jr extends K{static get NAME(){return $r}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Sr))return;let t;const e=a(this._element),n=this._element.closest(Ir);if(n){const e="UL"===n.nodeName||"OL"===n.nodeName?Br:Nr;t=dt.find(e,n),t=t[t.length-1]}const i=t?F.trigger(t,Tr,{relatedTarget:this._element}):null;if(F.trigger(this._element,Er,{relatedTarget:t}).defaultPrevented||null!==i&&i.defaultPrevented)return;this._activate(this._element,n);const o=()=>{F.trigger(t,Pr,{relatedTarget:this._element}),F.trigger(this._element,kr,{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,n){const i=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?dt.children(e,Nr):dt.find(Br,e))[0],o=n&&i&&i.classList.contains(Ar),s=()=>this._transitionComplete(t,i,n);i&&o?(i.classList.remove(zr),this._queueCallback(s,t,!0)):s()}_transitionComplete(t,e,n){if(e){e.classList.remove(Sr);const t=dt.findOne(Rr,e.parentNode);t&&t.classList.remove(Sr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Sr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),g(t),t.classList.contains(Ar)&&t.classList.add(zr);let i=t.parentNode;if(i&&"LI"===i.nodeName&&(i=i.parentNode),i&&i.classList.contains(Cr)){const e=t.closest(Or);e&&dt.find(Zr,e).forEach((t=>t.classList.add(Sr))),t.setAttribute("aria-expanded",!0)}n&&n()}static jQueryInterface(t){return this.each((function(){const e=jr.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}F.on(document,Mr,Dr,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this)||jr.getOrCreateInstance(this).show()})),x(jr);const Hr="toast",Wr=".bs.toast",Fr=`mouseover${Wr}`,qr=`mouseout${Wr}`,Ur=`focusin${Wr}`,Vr=`focusout${Wr}`,Kr=`hide${Wr}`,Gr=`hidden${Wr}`,Yr=`show${Wr}`,Xr=`shown${Wr}`,Jr="fade",Qr="hide",ta="show",ea="showing",na={animation:"boolean",autohide:"boolean",delay:"number"},ia={animation:!0,autohide:!0,delay:5e3};class oa extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return na}static get Default(){return ia}static get NAME(){return Hr}show(){if(F.trigger(this._element,Yr).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Jr);const t=()=>{this._element.classList.remove(ea),F.trigger(this._element,Xr),this._maybeScheduleHide()};this._element.classList.remove(Qr),g(this._element),this._element.classList.add(ta),this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ta))return;if(F.trigger(this._element,Kr).defaultPrevented)return;const t=()=>{this._element.classList.add(Qr),this._element.classList.remove(ea),this._element.classList.remove(ta),F.trigger(this._element,Gr)};this._element.classList.add(ea),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ta)&&this._element.classList.remove(ta),super.dispose()}_getConfig(t){return t={...ia,...ht.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},d(Hr,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){F.on(this._element,Fr,(t=>this._onInteraction(t,!0))),F.on(this._element,qr,(t=>this._onInteraction(t,!1))),F.on(this._element,Ur,(t=>this._onInteraction(t,!0))),F.on(this._element,Vr,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=oa.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(oa),x(oa)})();const ct=[];function ht(e,n=t){let i;const o=new Set;function s(t){if(r(e,t)&&(e=t,i)){const t=!ct.length;for(const t of o)t[1](),ct.push(t,e);if(t){for(let t=0;t{o.delete(l),0===o.size&&(i(),i=null)}}}}const ut=ht(),dt=ht(),pt=ht(),mt=ht(),ft=ht(),_t=Nominatim_Config.Reverse_Only?"reverse":"search",gt=[_t,"reverse","details","deletable","polygons","status","about"];function vt(t,e){if(void 0===t)t=window.location.pathname.replace(".html","").replace(/^.*\//,""),gt.includes(t)||(t=_t),e=new URLSearchParams(window.location.search);else{gt.includes(t)||(t=_t),void 0===e&&(e=new URLSearchParams);let n=e.toString();n&&(n="?"+n);let i=t+".html"+n;window.location.protocol.match(/^http/)?window.history.pushState([],"",i):window.location.href=i}ft.set({tab:t,params:e}),pt.set(null),mt.set(null)}function yt(e){let n;return{c(){n=x("footer"),n.innerHTML='

Addresses and postcodes are approximate

\n ',C(n,"class","svelte-1f2bd8l")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}class bt extends lt{constructor(t){super(),at(this,t,null,yt,r,{})}}function wt(t){var e=document.getElementById("loading");e&&(e.style.display="start"===t?"block":null)}async function xt(t,e,n){var i=function(t,e){1===e.dedupe&&delete e.dedupe;return function(t,e){for(var n=Object.keys(e),i=0;iencodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}(t,e),o=new URLSearchParams(window.location.search);o&&o.get("httpbin_status")&&(i="https://httpbin.org/status/"+parseInt(o.get("httpbin_status"),10)),wt("start"),"status"!==t&&pt.set(null);try{await fetch(i,{headers:Nominatim_Config.Nominatim_API_Endpoint_Headers||{}}).then((async t=>{if(t.status>=200&&t.status<300||404===t.status){var e;try{e=await t.json()}catch(t){return void mt.set(`Error parsing JSON data from ${i} (${t})`)}return e}mt.set(`Error fetching data from ${i} (${t.statusText})`)})).then((t=>{t&&(t.error&&mt.set(t.error.message),n(t)),wt("finish")}))}catch(t){mt.set(`Error fetching data from ${i} (${t})`),wt("finish")}"status"!==t&&pt.set(i)}var $t={};async function Lt(t,e){if(window.location.protocol.match(/^http/))if($t[t])e.innerHTML=$t[t];else try{await fetch(t).then((t=>t.text())).then((n=>{n=n.replace("Nominatim_API_Endpoint",Nominatim_Config.Nominatim_API_Endpoint),e.innerHTML=n,$t[t]=n}))}catch(n){e.innerHTML=`Error fetching content from ${t} (${n})`}else e.innerHTML=`Cannot display data from ${t} here. Browser security prevents loading content from file:// URLs.`}function Tt(t){document.title=[t,Nominatim_Config.Page_Title].filter((t=>t&&t.length>1)).join(" | ")}function Pt(t){let e,n,i,o;const s=t[6].default,r=p(s,t,t[5],null);return{c(){e=x("a"),r&&r.c(),C(e,"href",t[1]),C(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=E(e,"click",M(k(t[2]))),i=!0)},p(t,[i]){r&&r.p&&(!n||32&i)&&_(r,s,t,t[5],n?f(s,t[5],i,null):g(t[5]),null),(!n||2&i)&&C(e,"href",t[1]),(!n||1&i)&&C(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Et(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e,{params_hash:r={}}=e,{extra_classes:a=""}=e,l=s+".html";return t.$$set=t=>{"page"in t&&n(3,s=t.page),"params_hash"in t&&n(4,r=t.params_hash),"extra_classes"in t&&n(0,a=t.extra_classes),"$$scope"in t&&n(5,o=t.$$scope)},t.$$.update=()=>{if(24&t.$$.dirty){let t=new URLSearchParams(r).toString();n(1,l=s+".html"+(t?"?":"")+t)}},[a,l,function(){vt(s,new URLSearchParams(r))},s,r,o,i]}class kt extends lt{constructor(t){super(),at(this,t,Et,Pt,r,{page:3,params_hash:4,extra_classes:0})}}function Mt(t){let e,n,i,o;const s=t[7].default,r=p(s,t,t[6],null);return{c(){e=x("a"),r&&r.c(),C(e,"href",t[2]),C(e,"class",t[0])},m(s,a){y(s,e,a),r&&r.m(e,null),n=!0,i||(o=E(e,"click",M(k(t[8]))),i=!0)},p(t,[i]){r&&r.p&&(!n||64&i)&&_(r,s,t,t[6],n?f(s,t[6],i,null):g(t[6]),null),(!n||4&i)&&C(e,"href",t[2]),(!n||1&i)&&C(e,"class",t[0])},i(t){n||(tt(r,t),n=!0)},o(t){et(r,t),n=!1},d(t){t&&b(e),r&&r.d(t),i=!1,o()}}}function Ct(t,e,n){let{$$slots:i={},$$scope:o}=e,{lat:s=null}=e,{lon:r=null}=e,{zoom:a=null}=e,{extra_classes:l=""}=e,c=new URLSearchParams,h="reverse.html";return t.$$set=t=>{"lat"in t&&n(3,s=t.lat),"lon"in t&&n(4,r=t.lon),"zoom"in t&&n(5,a=t.zoom),"extra_classes"in t&&n(0,l=t.extra_classes),"$$scope"in t&&n(6,o=t.$$scope)},t.$$.update=()=>{if(56&t.$$.dirty){let t=new URLSearchParams;s&&r&&(t.set("lat",s),t.set("lon",r),a&&t.set("zoom",a)),n(1,c=t)}if(2&t.$$.dirty){let t=c.toString();n(2,h="reverse.html"+(t?"?":"")+t)}},[l,c,h,s,r,a,o,i,()=>vt("reverse",c)]}class St extends lt{constructor(t){super(),at(this,t,Ct,Mt,r,{lat:3,lon:4,zoom:5,extra_classes:0})}}var At=["second","minute","hour","day","week","month","year"];var zt=["秒","分钟","小时","天","周","个月","年"];var Ot={},It=function(t,e){Ot[t]=e},Nt=[60,60,24,7,365/7/12,12];function Bt(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))}var Dt=function(t,e,n){var i=function(t,e){return(+(e?Bt(e):new Date)-+Bt(t))/1e3}(t,n&&n.relativeDate);return function(t,e){for(var n=t<0?1:0,i=t=Math.abs(t),o=0;t>=Nt[o]&&o(0==(o*=2)?9:1)&&(o+=1),e(t,o,i)[n].replace("%s",t.toString())}(i,function(t){return Ot[t]||Ot.en_US}(e))};function Zt(t){let e,n,i,o,s,r,a,l,c,h,u;return{c(){e=x("div"),n=$("Data from "),i=x("a"),o=$("API request"),s=T(),r=x("span"),a=$("("),l=x("a"),c=$("debug output"),u=$(")"),C(i,"href",t[1]),C(l,"href",h=t[1]+"&debug=1"),C(r,"id","api-request-debug"),C(e,"id","api-request")},m(t,h){y(t,e,h),v(e,n),v(e,i),v(i,o),v(e,s),v(e,r),v(r,a),v(r,l),v(l,c),v(r,u)},p(t,e){2&e&&C(i,"href",t[1]),2&e&&h!==(h=t[1]+"&debug=1")&&C(l,"href",h)},d(t){t&&b(e)}}}function Rt(t){let e,n,i,o,s=Dt(new Date(t[0]))+"";return{c(){e=$("Data last updated:\n "),n=x("abbr"),i=$(s),C(n,"id","data-date"),C(n,"title",o=t[0]+" (UTC timezone)")},m(t,o){y(t,e,o),y(t,n,o),v(n,i)},p(t,e){1&e&&s!==(s=Dt(new Date(t[0]))+"")&&S(i,s),1&e&&o!==(o=t[0]+" (UTC timezone)")&&C(n,"title",o)},d(t){t&&b(e),t&&b(n)}}}function jt(t){let e;return{c(){e=$("Details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ht(t){let e,n,i,o,s,r,a,l,c,h,u,d=t[1]&&Zt(t),p=t[0]&&Rt(t);return c=new kt({props:{page:"status",$$slots:{default:[jt]},$$scope:{ctx:t}}}),{c(){e=x("div"),n=x("div"),n.innerHTML='
\n Loading data from API ...',i=T(),o=x("div"),s=x("div"),d&&d.c(),r=T(),a=x("div"),p&&p.c(),l=$("\n ("),it(c.$$.fragment),h=$(")"),C(n,"id","loading"),C(n,"class","py-2 px-4 svelte-1i1228w"),C(s,"class","col-sm-6"),C(a,"class","col-sm-6 text-end"),C(o,"class","row"),C(e,"id","last-updated"),C(e,"class","container-fluid py-2 px-4 mb-3 svelte-1i1228w")},m(t,m){y(t,e,m),v(e,n),v(e,i),v(e,o),v(o,s),d&&d.m(s,null),v(o,r),v(o,a),p&&p.m(a,null),v(a,l),ot(c,a,null),v(a,h),u=!0},p(t,[e]){t[1]?d?d.p(t,e):(d=Zt(t),d.c(),d.m(s,null)):d&&(d.d(1),d=null),t[0]?p?p.p(t,e):(p=Rt(t),p.c(),p.m(a,l)):p&&(p.d(1),p=null);const n={};8&e&&(n.$$scope={dirty:e,ctx:t}),c.$set(n)},i(t){u||(tt(c.$$.fragment,t),u=!0)},o(t){et(c.$$.fragment,t),u=!1},d(t){t&&b(e),d&&d.d(),p&&p.d(),st(c)}}}function Wt(t,e,n){let i,o,s=!1;return pt.subscribe((t=>{n(1,o=t),o&&(n(1,o=new URL(o,window.location.origin)),o.searchParams.delete("polygon_geojson"),n(1,o=o.toString())),s||i||(s=!0,xt("status",{format:"json"},(function(t){n(0,i=t.data_updated),s=!1})))})),[i,o]}It("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=At[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),It("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var n=zt[~~(e/2)];return[t+" "+n+"前",t+" "+n+"后"]}));class Ft extends lt{constructor(t){super(),at(this,t,Wt,Ht,r,{})}}function qt(t){let e,n,i,o,s,r;return{c(){e=x("div"),n=$(t[0]),i=T(),o=x("button"),C(o,"type","button"),C(o,"class","btn-close float-end"),C(o,"aria-label","dismiss"),C(e,"id","error"),C(e,"class","container-fluid alert-danger py-3 px-4")},m(a,l){y(a,e,l),v(e,n),v(e,i),v(e,o),s||(r=E(o,"click",t[1]),s=!0)},p(t,e){1&e&&S(n,t[0])},d(t){t&&b(e),s=!1,r()}}}function Ut(e){let n,i=e[0]&&qt(e);return{c(){i&&i.c(),n=P()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){t[0]?i?i.p(t,e):(i=qt(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&b(n)}}}function Vt(t,e,n){let i;return mt.subscribe((t=>{n(0,i=t)})),[i,function(){mt.set(null)}]}class Kt extends lt{constructor(t){super(),at(this,t,Vt,Ut,r,{})}}function Gt(t){let e,n,i,o,s;return{c(){e=x("img"),i=T(),o=x("h1"),s=$(t[3]),C(e,"alt","logo"),C(e,"id","theme-logo"),c(e.src,n="theme/logo.png")||C(e,"src","theme/logo.png"),C(e,"class","svelte-1q88nx"),C(o,"class","svelte-1q88nx")},m(t,n){y(t,e,n),y(t,i,n),y(t,o,n),v(o,s)},p(t,e){8&e&&S(s,t[3])},d(t){t&&b(e),t&&b(i),t&&b(o)}}}function Yt(t){let e,n,i;return n=new kt({props:{page:"search",extra_classes:"nav-link "+("search"===t[4]?"active":""),$$slots:{default:[Xt]},$$scope:{ctx:t}}}),{c(){e=x("li"),it(n.$$.fragment),C(e,"class","nav-item svelte-1q88nx")},m(t,o){y(t,e,o),ot(n,e,null),i=!0},p(t,e){const i={};16&e&&(i.extra_classes="nav-link "+("search"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){t&&b(e),st(n)}}}function Xt(t){let e;return{c(){e=$("Search")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Jt(t){let e;return{c(){e=$("Reverse")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Qt(t){let e;return{c(){e=$("Search By ID")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function te(t){let e;return{c(){e=$("About & Help")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ee(t){let e,n,i,o,s,r,a,l,c,h,u,d,m,w,L,P,E,k,M,A,z,O,I,N,B,D,Z,R,j,H,W;s=new kt({props:{page:t[2]?"reverse":"search",$$slots:{default:[Gt]},$$scope:{ctx:t}}});let F=!t[2]&&Yt(t);m=new St({props:{lat:t[0],lon:t[1],extra_classes:"nav-link "+("reverse"===t[4]?"active":""),$$slots:{default:[Jt]},$$scope:{ctx:t}}}),P=new kt({props:{page:"details",extra_classes:"nav-link "+("details"===t[4]?"active":""),$$slots:{default:[Qt]},$$scope:{ctx:t}}}),A=new kt({props:{page:"about",extra_classes:"nav-link "+("about"===t[4]?"active":""),$$slots:{default:[te]},$$scope:{ctx:t}}});const q=t[6].default,U=p(q,t,t[7],null);return R=new Kt({}),H=new Ft({}),{c(){e=x("header"),n=x("nav"),i=x("div"),o=x("div"),it(s.$$.fragment),r=T(),a=x("button"),a.innerHTML='',l=T(),c=x("div"),h=x("ul"),F&&F.c(),u=T(),d=x("li"),it(m.$$.fragment),w=T(),L=x("li"),it(P.$$.fragment),E=T(),k=x("ul"),M=x("li"),it(A.$$.fragment),z=T(),O=x("section"),I=x("h2"),N=$(t[4]),B=T(),D=x("section"),U&&U.c(),Z=T(),it(R.$$.fragment),j=T(),it(H.$$.fragment),C(o,"class","navbar-brand svelte-1q88nx"),C(a,"class","navbar-toggler"),C(a,"type","button"),C(a,"data-bs-toggle","collapse"),C(a,"data-bs-target","#navbarSupportedContent"),C(a,"aria-controls","navbarSupportedContent"),C(a,"aria-expanded","false"),C(a,"aria-label","Toggle navigation"),C(d,"class","nav-item svelte-1q88nx"),C(L,"class","nav-item svelte-1q88nx"),C(h,"class","navbar-nav me-auto"),C(c,"class","collapse navbar-collapse"),C(c,"id","navbarSupportedContent"),C(M,"class","nav-item svelte-1q88nx"),C(k,"class","navbar-nav"),C(i,"class","container-fluid"),C(n,"class","navbar navbar-expand-sm navbar-light"),C(e,"class","container-fluid"),C(O,"class","page-title-section svelte-1q88nx"),C(D,"class","search-section svelte-1q88nx")},m(t,p){y(t,e,p),v(e,n),v(n,i),v(i,o),ot(s,o,null),v(i,r),v(i,a),v(i,l),v(i,c),v(c,h),F&&F.m(h,null),v(h,u),v(h,d),ot(m,d,null),v(h,w),v(h,L),ot(P,L,null),v(i,E),v(i,k),v(k,M),ot(A,M,null),y(t,z,p),y(t,O,p),v(O,I),v(I,N),y(t,B,p),y(t,D,p),U&&U.m(D,null),y(t,Z,p),ot(R,t,p),y(t,j,p),ot(H,t,p),W=!0},p(t,[e]){const n={};4&e&&(n.page=t[2]?"reverse":"search"),136&e&&(n.$$scope={dirty:e,ctx:t}),s.$set(n),t[2]?F&&(J(),et(F,1,1,(()=>{F=null})),Q()):F?(F.p(t,e),4&e&&tt(F,1)):(F=Yt(t),F.c(),tt(F,1),F.m(h,u));const i={};1&e&&(i.lat=t[0]),2&e&&(i.lon=t[1]),16&e&&(i.extra_classes="nav-link "+("reverse"===t[4]?"active":"")),128&e&&(i.$$scope={dirty:e,ctx:t}),m.$set(i);const o={};16&e&&(o.extra_classes="nav-link "+("details"===t[4]?"active":"")),128&e&&(o.$$scope={dirty:e,ctx:t}),P.$set(o);const r={};16&e&&(r.extra_classes="nav-link "+("about"===t[4]?"active":"")),128&e&&(r.$$scope={dirty:e,ctx:t}),A.$set(r),(!W||16&e)&&S(N,t[4]),U&&U.p&&(!W||128&e)&&_(U,q,t,t[7],W?f(q,t[7],e,null):g(t[7]),null)},i(t){W||(tt(s.$$.fragment,t),tt(F),tt(m.$$.fragment,t),tt(P.$$.fragment,t),tt(A.$$.fragment,t),tt(U,t),tt(R.$$.fragment,t),tt(H.$$.fragment,t),W=!0)},o(t){et(s.$$.fragment,t),et(F),et(m.$$.fragment,t),et(P.$$.fragment,t),et(A.$$.fragment,t),et(U,t),et(R.$$.fragment,t),et(H.$$.fragment,t),W=!1},d(t){t&&b(e),st(s),F&&F.d(),st(m),st(P),st(A),t&&b(z),t&&b(O),t&&b(B),t&&b(D),U&&U.d(t),t&&b(Z),st(R,t),t&&b(j),st(H,t)}}}function ne(t,e,n){let i,o,s,r;d(t,ft,(t=>n(5,r=t)));let a,l,{$$slots:c={},$$scope:h}=e;return ut.subscribe((t=>{t&&t.on("move",(function(){n(0,a=t.getCenter().lat),n(1,l=t.getCenter().lng)}))})),t.$$set=t=>{"$$scope"in t&&n(7,h=t.$$scope)},t.$$.update=()=>{32&t.$$.dirty&&n(4,i=r.tab)},n(3,o=Nominatim_Config.Page_Title),n(2,s=Nominatim_Config.Reverse_Only),[a,l,s,o,i,r,c,h]}class ie extends lt{constructor(t){super(),at(this,t,ne,ee,r,{})}}function oe(t){let e,n,i,o,s;const r=t[3].default,a=p(r,t,t[2],null);return{c(){e=x("form"),n=x("div"),a&&a.c(),C(n,"class","row g-2"),C(e,"class","form-inline"),C(e,"role","search"),C(e,"accept-charset","UTF-8"),C(e,"action","")},m(r,l){y(r,e,l),v(e,n),a&&a.m(n,null),i=!0,o||(s=E(e,"submit",k(t[0])),o=!0)},p(t,[e]){a&&a.p&&(!i||4&e)&&_(a,r,t,t[2],i?f(r,t[2],e,null):g(t[2]),null)},i(t){i||(tt(a,t),i=!0)},o(t){et(a,t),i=!1},d(t){t&&b(e),a&&a.d(t),o=!1,s()}}}function se(t,e,n){let{$$slots:i={},$$scope:o}=e,{page:s}=e;return t.$$set=t=>{"page"in t&&n(1,s=t.page),"$$scope"in t&&n(2,o=t.$$scope)},[function(t){let e=t.target,n=!0;Array.prototype.slice.call(e.elements).forEach((function(t){(function(t){return!("hidden"===t.type&&t.value.length&&t.pattern&&!t.value.match(t.pattern))&&t.checkValidity()})(t)||(alert("Invalid input in "+t.name),n=!1)})),n&&vt(s,function(t){var e=new URLSearchParams;return Array.prototype.slice.call(t.elements).forEach((function(t){!t.name||t.disabled||["submit","button"].indexOf(t.type)>-1||["checkbox","radio"].indexOf(t.type)>-1&&!t.checked||void 0!==t.value&&""!==t.value&&("dedupe"!==t.name||1!==t.value&&"1"!==t.value)&&e.set(t.name,t.value)})),e}(e))},s,o,i]}class re extends lt{constructor(t){super(),at(this,t,se,oe,r,{page:1})}}function ae(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,E,k,M,S,A,z;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("button"),r.textContent="Search",a=T(),l=x("input"),h=T(),u=x("input"),p=T(),m=x("input"),_=T(),g=x("input"),$=T(),L=x("input"),E=T(),k=x("input"),S=T(),A=x("input"),C(n,"id","q"),C(n,"name","q"),C(n,"type","text"),C(n,"class","form-control form-control-sm svelte-1u2ltgo"),C(n,"placeholder","Search"),n.value=i=t[1].q||"",C(e,"class","col-auto"),C(r,"type","submit"),C(r,"class","btn btn-primary btn-sm mx-1"),C(l,"type","hidden"),C(l,"name","viewbox"),l.value=c=t[2]||"",C(u,"type","hidden"),C(u,"name","dedupe"),u.value=d=0===t[1].dedupe?0:1,C(m,"type","hidden"),C(m,"name","bounded"),m.value=f=t[1].bounded?1:"",C(g,"type","hidden"),C(g,"name","accept-language"),g.value=w=t[1]["accept-language"]||"",C(L,"type","hidden"),C(L,"name","countrycodes"),L.value=P=t[1].countrycodes||"",C(L,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(k,"type","hidden"),C(k,"name","limit"),k.value=M=t[1].limit||"",C(A,"type","hidden"),C(A,"name","polygon_threshold"),A.value=z=t[1].polygon_threshold||"",C(s,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),v(s,a),v(s,l),v(s,h),v(s,u),v(s,p),v(s,m),v(s,_),v(s,g),v(s,$),v(s,L),v(s,E),v(s,k),v(s,S),v(s,A)},p(t,e){2&e&&i!==(i=t[1].q||"")&&n.value!==i&&(n.value=i),4&e&&c!==(c=t[2]||"")&&(l.value=c),2&e&&d!==(d=0===t[1].dedupe?0:1)&&(u.value=d),2&e&&f!==(f=t[1].bounded?1:"")&&(m.value=f),2&e&&w!==(w=t[1]["accept-language"]||"")&&(g.value=w),2&e&&P!==(P=t[1].countrycodes||"")&&(L.value=P),2&e&&M!==(M=t[1].limit||"")&&(k.value=M),2&e&&z!==(z=t[1].polygon_threshold||"")&&(A.value=z)},d(t){t&&b(e),t&&b(o),t&&b(s)}}}function le(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,E,k,M,S,A,z,O,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,J,Q;return{c(){e=x("div"),n=x("input"),o=T(),s=x("div"),r=x("input"),l=T(),c=x("div"),h=x("input"),d=T(),p=x("div"),m=x("input"),_=T(),g=x("div"),w=x("input"),L=T(),P=x("div"),E=x("input"),M=T(),S=x("div"),A=x("button"),A.textContent="Search",z=T(),O=x("input"),N=T(),B=x("input"),Z=T(),R=x("input"),H=T(),W=x("input"),q=T(),U=x("input"),K=T(),G=x("input"),X=T(),J=x("input"),C(n,"name","street"),C(n,"type","text"),C(n,"class","form-control form-control-sm me-1"),C(n,"placeholder","House number/Street"),n.value=i=t[1].street||"",C(e,"class","col-auto"),C(r,"name","city"),C(r,"type","text"),C(r,"class","form-control form-control-sm me-1"),C(r,"placeholder","City"),r.value=a=t[1].city||"",C(s,"class","col-auto"),C(h,"id","county"),C(h,"name","county"),C(h,"type","text"),C(h,"class","form-control form-control-sm me-1"),C(h,"placeholder","County"),h.value=u=t[1].county||"",C(c,"class","col-auto"),C(m,"name","state"),C(m,"type","text"),C(m,"class","form-control form-control-sm me-1"),C(m,"placeholder","State"),m.value=f=t[1].state||"",C(p,"class","col-auto"),C(w,"name","country"),C(w,"type","text"),C(w,"class","form-control form-control-sm me-1"),C(w,"placeholder","Country"),w.value=$=t[1].country||"",C(g,"class","col-auto"),C(E,"name","postalcode"),C(E,"type","text"),C(E,"class","form-control form-control-sm me-1"),C(E,"placeholder","Postal Code"),E.value=k=t[1].postalcode||"",C(P,"class","col-auto"),C(A,"type","submit"),C(A,"class","btn btn-primary btn-sm"),C(O,"type","hidden"),C(O,"name","viewbox"),O.value=I=t[2]||"",C(B,"type","hidden"),C(B,"name","dedupe"),B.value=D=0===t[1].dedupe?0:1,C(R,"type","hidden"),C(R,"name","bounded"),R.value=j=t[1].bounded?1:"",C(W,"type","hidden"),C(W,"name","accept-language"),W.value=F=t[1]["accept-language"]||"",C(U,"type","hidden"),C(U,"name","countrycodes"),U.value=V=t[1].countrycodes||"",C(U,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(G,"type","hidden"),C(G,"name","limit"),G.value=Y=t[1].limit||"",C(J,"type","hidden"),C(J,"name","polygon_threshold"),J.value=Q=t[1].polygon_threshold||"",C(S,"class","col-auto")},m(t,i){y(t,e,i),v(e,n),y(t,o,i),y(t,s,i),v(s,r),y(t,l,i),y(t,c,i),v(c,h),y(t,d,i),y(t,p,i),v(p,m),y(t,_,i),y(t,g,i),v(g,w),y(t,L,i),y(t,P,i),v(P,E),y(t,M,i),y(t,S,i),v(S,A),v(S,z),v(S,O),v(S,N),v(S,B),v(S,Z),v(S,R),v(S,H),v(S,W),v(S,q),v(S,U),v(S,K),v(S,G),v(S,X),v(S,J)},p(t,e){2&e&&i!==(i=t[1].street||"")&&n.value!==i&&(n.value=i),2&e&&a!==(a=t[1].city||"")&&r.value!==a&&(r.value=a),2&e&&u!==(u=t[1].county||"")&&h.value!==u&&(h.value=u),2&e&&f!==(f=t[1].state||"")&&m.value!==f&&(m.value=f),2&e&&$!==($=t[1].country||"")&&w.value!==$&&(w.value=$),2&e&&k!==(k=t[1].postalcode||"")&&E.value!==k&&(E.value=k),4&e&&I!==(I=t[2]||"")&&(O.value=I),2&e&&D!==(D=0===t[1].dedupe?0:1)&&(B.value=D),2&e&&j!==(j=t[1].bounded?1:"")&&(R.value=j),2&e&&F!==(F=t[1]["accept-language"]||"")&&(W.value=F),2&e&&V!==(V=t[1].countrycodes||"")&&(U.value=V),2&e&&Y!==(Y=t[1].limit||"")&&(G.value=Y),2&e&&Q!==(Q=t[1].polygon_threshold||"")&&(J.value=Q)},d(t){t&&b(e),t&&b(o),t&&b(s),t&&b(l),t&&b(c),t&&b(d),t&&b(p),t&&b(_),t&&b(g),t&&b(L),t&&b(P),t&&b(M),t&&b(S)}}}function ce(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,w,$,L,P,k,M,S,A,z,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,J,Q,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt,Tt;return u=new re({props:{page:"search",$$slots:{default:[ae]},$$scope:{ctx:t}}}),m=new re({props:{page:"search",$$slots:{default:[le]},$$scope:{ctx:t}}}),{c(){e=x("ul"),n=x("li"),i=x("a"),i.textContent="Simple",s=T(),r=x("li"),a=x("a"),a.textContent="Structured",l=T(),c=x("div"),h=x("div"),it(u.$$.fragment),d=T(),p=x("div"),it(m.$$.fragment),f=T(),_=x("details"),g=x("summary"),g.innerHTML="Advanced options",w=T(),$=x("ul"),L=x("li"),P=x("div"),k=x("label"),k.textContent="apply viewbox",M=T(),S=x("input"),z=T(),I=x("li"),N=x("div"),B=x("label"),B.textContent="bounded to viewbox",D=T(),Z=x("input"),j=T(),H=x("li"),W=x("div"),F=x("label"),F.textContent="deduplicate results",q=T(),U=x("input"),K=T(),G=x("li"),Y=x("label"),Y.textContent="Maximum number of results",X=T(),J=x("input"),nt=T(),rt=x("li"),at=x("label"),at.textContent="Polygon simplification",lt=T(),ct=x("input"),ut=T(),dt=x("li"),pt=x("label"),pt.textContent="Languages",mt=T(),ft=x("input"),gt=T(),vt=x("li"),yt=x("label"),yt.textContent="Country Codes",bt=T(),wt=x("input"),C(i,"class","nav-link svelte-1u2ltgo"),C(i,"data-bs-toggle","tab"),C(i,"href","#simple"),O(i,"active",!t[0]),C(n,"class","nav-item"),C(a,"class","nav-link svelte-1u2ltgo"),C(a,"data-bs-toggle","tab"),C(a,"href","#structured"),O(a,"active",t[0]),C(r,"class","nav-item"),C(e,"class","nav nav-tabs svelte-1u2ltgo"),C(h,"class","tab-pane"),C(h,"id","simple"),C(h,"role","tabpanel"),O(h,"active",!t[0]),C(p,"class","tab-pane"),C(p,"id","structured"),C(p,"role","tabpanel"),O(p,"active",t[0]),C(c,"class","tab-content py-2"),C(k,"class","form-check-label svelte-1u2ltgo"),C(k,"for","use_viewbox"),C(S,"type","checkbox"),C(S,"class","form-check-input api-param-setting"),C(S,"id","use_viewbox"),S.checked=A=t[1].viewbox,C(P,"class","form-check form-check-inline"),C(L,"class","svelte-1u2ltgo"),C(B,"class","form-check-label svelte-1u2ltgo"),C(B,"for","option_bounded"),C(Z,"type","checkbox"),C(Z,"class","form-check-input api-param-setting"),C(Z,"id","option_bounded"),Z.checked=R=!!t[1].bounded,C(N,"class","form-check form-check-inline"),C(I,"class","svelte-1u2ltgo"),C(F,"class","form-check-label svelte-1u2ltgo"),C(F,"for","option_dedupe"),C(U,"type","checkbox"),C(U,"class","form-check-input api-param-setting"),C(U,"id","option_dedupe"),U.checked=V=0===t[1].dedupe?0:1,C(W,"class","form-check form-check-inline"),C(H,"class","svelte-1u2ltgo"),C(Y,"for","option_limit"),C(Y,"class","svelte-1u2ltgo"),C(J,"type","number"),C(J,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(J,"data-api-param","limit"),C(J,"id","option_limit"),C(J,"min","1"),C(J,"max","50"),J.value=Q=t[1].limit||"",C(G,"class","svelte-1u2ltgo"),C(at,"for","option_polygon_threshold"),C(at,"class","svelte-1u2ltgo"),C(ct,"type","number"),C(ct,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(ct,"data-api-param","polygon_threshold"),C(ct,"id","option_polygon_threshold"),C(ct,"min","0.0"),C(ct,"max","1.0"),C(ct,"step","0.001"),ct.value=ht=t[1].polygon_threshold||"",C(rt,"class","svelte-1u2ltgo"),C(pt,"for","accept_lang"),C(pt,"class","svelte-1u2ltgo"),C(ft,"type","text"),C(ft,"placeholder","e.g. en,zh-Hant"),C(ft,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(ft,"data-api-param","accept-language"),C(ft,"id","accept_lang"),C(ft,"size","15"),ft.value=_t=t[1]["accept-language"]||"",C(dt,"class","svelte-1u2ltgo"),C(yt,"for","option_ccode"),C(yt,"class","svelte-1u2ltgo"),C(wt,"type","text"),C(wt,"placeholder","e.g. de,gb"),C(wt,"class","form-control form-control-sm d-inline w-auto api-param-setting"),C(wt,"data-api-param","countrycodes"),C(wt,"id","option_ccode"),C(wt,"size","15"),wt.value=xt=t[1].countrycodes||"",C(wt,"pattern","^[a-zA-Z]{2}(,[a-zA-Z]{2})*$"),C(vt,"class","svelte-1u2ltgo"),C($,"class","svelte-1u2ltgo"),C(_,"id","searchAdvancedOptions"),C(_,"class","svelte-1u2ltgo")},m(o,b){y(o,e,b),v(e,n),v(n,i),v(e,s),v(e,r),v(r,a),y(o,l,b),y(o,c,b),v(c,h),ot(u,h,null),v(c,d),v(c,p),ot(m,p,null),y(o,f,b),y(o,_,b),v(_,g),v(_,w),v(_,$),v($,L),v(L,P),v(P,k),v(P,M),v(P,S),v($,z),v($,I),v(I,N),v(N,B),v(N,D),v(N,Z),v($,j),v($,H),v(H,W),v(W,F),v(W,q),v(W,U),v($,K),v($,G),v(G,Y),v(G,X),v(G,J),v($,nt),v($,rt),v(rt,at),v(rt,lt),v(rt,ct),v($,ut),v($,dt),v(dt,pt),v(dt,mt),v(dt,ft),v($,gt),v($,vt),v(vt,yt),v(vt,bt),v(vt,wt),$t=!0,Lt||(Tt=[E(S,"change",t[3]),E(Z,"change",he),E(U,"change",ue),E(J,"change",de),E(ct,"change",de),E(ft,"change",de),E(wt,"change",de)],Lt=!0)},p(t,[e]){1&e&&O(i,"active",!t[0]),1&e&&O(a,"active",t[0]);const n={};262&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n),1&e&&O(h,"active",!t[0]);const o={};262&e&&(o.$$scope={dirty:e,ctx:t}),m.$set(o),1&e&&O(p,"active",t[0]),(!$t||2&e&&A!==(A=t[1].viewbox))&&(S.checked=A),(!$t||2&e&&R!==(R=!!t[1].bounded))&&(Z.checked=R),(!$t||2&e&&V!==(V=0===t[1].dedupe?0:1))&&(U.checked=V),(!$t||2&e&&Q!==(Q=t[1].limit||"")&&J.value!==Q)&&(J.value=Q),(!$t||2&e&&ht!==(ht=t[1].polygon_threshold||"")&&ct.value!==ht)&&(ct.value=ht),(!$t||2&e&&_t!==(_t=t[1]["accept-language"]||"")&&ft.value!==_t)&&(ft.value=_t),(!$t||2&e&&xt!==(xt=t[1].countrycodes||"")&&wt.value!==xt)&&(wt.value=xt)},i(t){$t||(tt(u.$$.fragment,t),tt(m.$$.fragment,t),$t=!0)},o(t){et(u.$$.fragment,t),et(m.$$.fragment,t),$t=!1},d(t){t&&b(e),t&&b(l),t&&b(c),st(u),st(m),t&&b(f),t&&b(_),Lt=!1,o(Tt)}}}function he(t){document.querySelector("input[name=bounded]").value=t.target.checked?1:""}function ue(t){document.querySelector("input[name=dedupe]").value=t.target.checked?1:0}function de(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value}function pe(t,e,n){let i,{bStructuredSearch:o=!1}=e,{api_request_params:s={}}=e;function r(t){let e=document.getElementById("use_viewbox");e&&e.checked?n(2,i=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)):n(2,i="")}function a(t){let e=t.wrapLatLng(t.getCenter());e.lat.toFixed(5),e.lng.toFixed(5)}return ut.subscribe((t=>{t&&(t.on("move",(function(){r(t),a(t)})),t.on("load",(function(){r(t),a(t)})))})),t.$$set=t=>{"bStructuredSearch"in t&&n(0,o=t.bStructuredSearch),"api_request_params"in t&&n(1,s=t.api_request_params)},[o,s,i,function(){let t=u(ut);t&&r(t)}]}class me extends lt{constructor(t){super(),at(this,t,pe,ce,r,{bStructuredSearch:0,api_request_params:1})}} /*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk @@ -9,5 +9,5 @@ /* @preserve * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof z?t:g(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,n)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=B(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>=e.x&&i.x<=n.x,r=o.y>=e.y&&i.y<=n.y;return s&&r},overlaps:function(t){t=B(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&i.lat<=n.lat,r=o.lng>=e.lng&&i.lng<=n.lng;return s&&r},overlaps:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&i.late.lng&&i.lng1,kt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(t){}return t}(),Mt=!!document.createElement("canvas").getContext,Ct=!(!document.createElementNS||!X("svg").createSVGRect),St=!Ct&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function At(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var zt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:st,androidStock:at,opera:lt,chrome:ct,gecko:ht,safari:ut,phantom:dt,opera12:pt,win:mt,ie3d:ft,webkit3d:_t,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:$t,touch:Lt,mobileOpera:Tt,mobileGecko:Pt,retina:Et,passiveEvents:kt,canvas:Mt,svg:Ct,vml:St},Ot=xt?"MSPointerDown":"pointerdown",It=xt?"MSPointerMove":"pointermove",Nt=xt?"MSPointerUp":"pointerup",Bt=xt?"MSPointerCancel":"pointercancel",Dt={},Zt=!1;function Rt(t,e,n,i){return"touchstart"===e?Ht(t,n,i):"touchmove"===e?Vt(t,n,i):"touchend"===e&&Kt(t,n,i),this}function jt(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(Ot,i,!1):"touchmove"===e?t.removeEventListener(It,i,!1):"touchend"===e&&(t.removeEventListener(Nt,i,!1),t.removeEventListener(Bt,i,!1)),this}function Ht(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Fe(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Ot,i,!1),Zt||(document.addEventListener(Ot,Wt,!0),document.addEventListener(It,Ft,!0),document.addEventListener(Nt,qt,!0),document.addEventListener(Bt,qt,!0),Zt=!0)}function Wt(t){Dt[t.pointerId]=t}function Ft(t){Dt[t.pointerId]&&(Dt[t.pointerId]=t)}function qt(t){delete Dt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],Dt)t.touches.push(Dt[n]);t.changedTouches=[t],e(t)}function Vt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(It,i,!1)}function Kt(t,e,n){var i=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Nt,i,!1),t.addEventListener(Bt,i,!1)}var Gt=xt?"MSPointerDown":$t?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":$t?"pointerup":"touchend",Xt="_leaflet_";function Jt(t,e,n){var i,o,s=!1,r=250;function a(t){if($t){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,s=n>0&&n<=r,i=e}function l(t){if(s&&!o.cancelBubble){if($t){if("mouse"===t.pointerType)return;var n,r,a={};for(r in o)n=o[r],a[r]=n&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Xt+Gt+n]=a,t[Xt+Yt+n]=l,t[Xt+"dblclick"+n]=e,t.addEventListener(Gt,a,!!kt&&{passive:!1}),t.addEventListener(Yt,l,!!kt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Qt(t,e){var n=t[Xt+Gt+e],i=t[Xt+Yt+e],o=t[Xt+"dblclick"+e];return t.removeEventListener(Gt,n,!!kt&&{passive:!1}),t.removeEventListener(Yt,i,!!kt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,se=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),re=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===re||"OTransition"===re?re+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function ce(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function he(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ue(t){var e=t.parentNode;e&&e.removeChild(t)}function de(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function pe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function me(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function fe(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function _e(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;ithis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,Z(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),c=B([a.min.add(n),a.max.subtract(i)]);if(!c.contains(r)){this._enforcingBounds=!0;var h=s.subtract(r),u=I(r.x+h.x,r.y+h.y);(r.xc.max.x)&&(u.x=s.x-h.x,h.x>0?u.x+=l.x-n.x:u.x-=l.x-i.x),(r.yc.max.y)&&(u.y=s.y-h.y,h.y>0?u.y+=l.y-n.y:u.y-=l.y-i.y),this.panTo(this.unproject(u),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=e.divideBy(2).round(),r=i.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new R(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ue(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ue(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=he("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new D(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Z(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=B(this.project(a,i),this.project(r,i)).getSize(),h=vt?this.options.zoomSnap:1,u=l.x/c.x,d=l.y/c.y,p=e?Math.max(u,d):Math.min(u,d);return i=this.getScaleZoom(p,i),h&&(i=Math.round(i/(h/100))*(h/100),i=e?Math.ceil(i/h)*h:Math.floor(i/h)*h),Math.max(o,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new N(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(j(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(j(t),j(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Ue(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Oe(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,_e(t,"leaflet-container"+(Lt?" leaflet-touch":"")+(Et?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ce(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Le(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Le(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Le(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Ne:Oe;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=P((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((n=this._targets[r(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Je(s,t))break;if(i.push(n),o)break}if(s===this._container)break;s=s.parentNode}return i.length||a||o||!Je(s,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Xe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Me(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&Fe(t);var r={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=s.getLatLng&&(!s._radius||s._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=vt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ge(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=he("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=se,n=this._proxy.style[e];$e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ue(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();$e(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(P((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ge(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),P((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=M.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return _e(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ue(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),sn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=he("div",e+"control-container",this._container);function i(i,o){var s=e+i+" "+e+o;t[i+o]=he("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ue(this._controlCorners[t]);ue(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+r(this),i),this._layerControlInputs.push(e),e.layerId=r(t.layer),Oe(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return n.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(s=0;s=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ie.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new rn(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=he("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var s=he("a",n,i);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),We(s),Oe(s,"click",qe),Oe(s,"click",o,this),Oe(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ge(this._zoomInButton,e),ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&_e(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var cn=function(t){return new ln(t)},hn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=he("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=he("div",e,n)),t.imperial&&(this._iScale=he("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),un=function(t){return new hn(t)},dn=on.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=he("div","leaflet-control-attribution"),We(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new dn).addTo(this)}));var pn=function(t){return new dn(t)};on.Layers=rn,on.Zoom=ln,on.Scale=hn,on.Attribution=dn,sn.layers=an,sn.zoom=cn,sn.scale=un,sn.attribution=pn;var mn=M.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});mn.addTo=function(t,e){return t.addHandler(e,this),this};var fn,_n={Events:S},gn=Lt?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Oe(this._dragStartTarget,gn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Ne(this._dragStartTarget,gn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!fe(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Me(this._element),Ee(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Se(this._element);this._startPoint=new z(e.clientX,e.clientY),this._parentScale=Ae(n),Oe(document,yn[t.type],this._onMove,this),Oe(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new z(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)l&&(s=r,l=a);l>n&&(e[s]=1,Tn(t,e,n,i,s),Tn(t,e,n,s,o))}function Pn(t,e){for(var n=[t[0]],i=1,o=0,s=t.length;ie&&(n.push(t[i]),o=i);return oe.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function Cn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Sn(t,e,n,i){var o,s=e.x,r=e.y,a=n.x-s,l=n.y-r,c=a*a+l*l;return c>0&&((o=((t.x-s)*a+(t.y-r)*l)/c)>1?(s=n.x,r=n.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,i?a*a+l*l:new z(s,r)}function An(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function zn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),An(t)}var On={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:$n,clipSegment:En,_getEdgeIntersection:kn,_getBitCode:Mn,_sqClosestPointOnSegment:Sn,isFlat:An,_flat:zn};function In(t,e,n){var i,o,s,r,a,l,c,h,u,d=[1,4,2,8];for(o=0,c=t.length;o1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=c=Math.PI/2-2*Math.atan(r*e)-a;return new R(a*n,t.x*n/i)}},Zn={LonLat:Bn,Mercator:Dn,SphericalMercator:U},Rn=n({},F,{code:"EPSG:3395",projection:Dn,transformation:function(){var t=.5/(Math.PI*Dn.R);return K(t,.5,-t,.5)}()}),jn=n({},F,{code:"EPSG:4326",projection:Bn,transformation:K(1/180,1,-1/180,.5)}),Hn=n({},W,{projection:Bn,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=F,W.EPSG3395=Rn,W.EPSG3857=G,W.EPSG900913=Y,W.EPSG4326=jn,W.Simple=Hn;var Wn=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()e)return r=(i-e)/n,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=j(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new D,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return An(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=An(t),i=0,o=t.length;i=2&&e[0]instanceof R&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){si.prototype._setLatLngs.call(this,t),An(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return An(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new z(e,e);if(t=new N(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,s=this._rings.length;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||si.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new ai(t,e)}var ci=Un.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=g(t)?t:t.features;if(o){for(e=0,n=o.length;e0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var r=0;ro?(e.height=o+"px",_e(t,s)):ge(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Le(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ce(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new z(this._containerLeft,-n-this._containerBottom);o._add(Te(this._container));var s=t.layerPointToContainerPoint(o),r=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||r),l=I(this.options.autoPanPaddingBottomRight||r),c=t.getSize(),h=0,u=0;s.x+i+l.x>c.x&&(h=s.x+i-c.x+l.x),s.x-h-a.x<0&&(h=s.x-a.x),s.y+n+l.y>c.y&&(u=s.y+n-c.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(h||u)&&t.fire("autopanstart").panBy([h,u])}},_onCloseButtonClick:function(t){this._close(),qe(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Mi=function(t,e){return new ki(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof ki||(t=new ki(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Wn.include({bindPopup:function(t,e){return t instanceof ki?(p(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new ki(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(qe(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ci=Ei.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ei.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ei.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ei.prototype.getEvents.call(this);return Lt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=he("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,s=i.latLngToContainerPoint(i.getCenter()),r=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,h=I(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):r.xthis.options.maxZoom||ni&&this._retainParent(o,s,r,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new z(o,s);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,n);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new z(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;dn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new D(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new z(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ue(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&P(o(this._tileReady,this,t,null,s)),Le(s,n),this._tiles[i]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),E(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(_e(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new N(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Ii(t){return new Oi(t)}var Ni=Oi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Et&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Oe(n,"load",o(this._tileOnLoad,this,e,n)),Oe(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Et?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,e.complete||(e.src=y,ue(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",y),Oi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Oi.prototype._tileReady.call(this,t,e,n)}});function Bi(t,e){return new Ni(t,e)}var Di=Ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var s=(e=p(this,e)).detectRetina&&Et?2:1,r=this.getTileSize();i.width=r.x*s,i.height=r.y*s,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Ni.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=B(n.project(e[0]),n.project(e[1])),o=i.min,s=i.max,r=(this._wmsVersion>=1.3&&this._crs===jn?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Ni.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Zi(t,e){return new Di(t,e)}Ni.WMS=Di,Bi.wms=Zi;var Ri=Wn.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=Te(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),r=this._map.project(t,e).subtract(s),a=o.multiplyBy(-n).add(i).add(o).subtract(r);vt?$e(this._container,a,n):Le(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new N(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ji=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ri.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Oe(t,"mousemove",this._onMouseMove,this),Oe(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Oe(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,ue(this._container),Ne(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ri.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Et?2:1;Le(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Et&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ri.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Fi={_initContainer:function(){this._container=he("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ri.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wi("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ue(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Wi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Wi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){pe(t._container)},_bringToBack:function(t){me(t._container)}},qi=St?Wi:X,Ui=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ue(this._container),Ne(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ri.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Le(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=qi("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ue(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){pe(t._path)},_bringToBack:function(t){me(t._path)}});function Vi(t){return Ct||St?new Ui(t):null}St&&Ui.include(Fi),en.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Hi(t)||Vi(t)}});var Ki=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Gi(t,e){return new Ki(t,e)}Ui.create=qi,Ui.pointsToPath=J,ci.geometryToLayer=hi,ci.coordsToLatLng=di,ci.coordsToLatLngs=pi,ci.latLngToCoords=mi,ci.latLngsToCoords=fi,ci.getFeature=_i,ci.asFeature=gi,en.mergeOptions({boxZoom:!0});var Yi=mn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ne(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ue(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),Ee(),this._startPoint=this._map.mouseEventToContainerPoint(t),Oe(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=he("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new N(this._point,this._startPoint),n=e.getSize();Le(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ue(this._box),ge(this._container,"leaflet-crosshair")),ee(),ke(),Ne(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Xi=mn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Xi),en.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ji=mn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ge(this._map._container,"leaflet-grab"),ge(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Z(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,s=(i+e+n)%t-e-n,r=Math.abs(o+n)0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=mn.extend({addHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ne(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Fe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new z(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ne(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Lt||$t&&!ut||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Lt&&!st,bounceAtZoomLimits:!0});var no=mn.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Oe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),Ne(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",this._onTouchEnd,this),Fe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=P(a,this,!0),Fe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Ne(document,"touchmove",this._onTouchMove,this),Ne(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Xi,en.Drag=Ji,en.Keyboard=Qi,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=sn,t.Browser=zt,t.Evented=A,t.Mixin=_n,t.Util=k,t.Class=M,t.Handler=mn,t.extend=n,t.bind=o,t.stamp=r,t.setOptions=p,t.DomEvent=Qe,t.DomUtil=ze,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=On,t.PolyUtil=Nn,t.Point=z,t.point=I,t.Bounds=N,t.bounds=B,t.Transformation=V,t.transformation=K,t.Projection=Zn,t.LatLng=R,t.latLng=j,t.LatLngBounds=D,t.latLngBounds=Z,t.CRS=W,t.GeoJSON=ci,t.geoJSON=yi,t.geoJson=bi,t.Layer=Wn,t.LayerGroup=Fn,t.layerGroup=qn,t.FeatureGroup=Un,t.featureGroup=Vn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=$i,t.videoOverlay=Li,t.SVGOverlay=Ti,t.svgOverlay=Pi,t.DivOverlay=Ei,t.Popup=ki,t.popup=Mi,t.Tooltip=Ci,t.tooltip=Si,t.Icon=Kn,t.icon=Gn,t.DivIcon=Ai,t.divIcon=zi,t.Marker=Jn,t.marker=Qn,t.TileLayer=Ni,t.tileLayer=Bi,t.GridLayer=Oi,t.gridLayer=Ii,t.SVG=Ui,t.svg=Vi,t.Renderer=Ri,t.Canvas=ji,t.canvas=Hi,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=si,t.polyline=ri,t.Polygon=ai,t.polygon=li,t.Rectangle=Ki,t.rectangle=Gi,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t})(Je.exports);function Qe(e){let n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,k,M,A,z,O,I,N,B,D;return{c(){n=x("div"),i=x("div"),o=$("map center: "),s=$(e[0]),r=T(),a=x("a"),l=$("view on osm.org"),c=T(),h=x("br"),u=$("\n map zoom: "),d=$(e[1]),p=T(),m=x("br"),f=$("\n viewbox: "),_=$(e[2]),g=T(),w=x("br"),L=$("\n last click: "),P=$(e[4]),k=T(),M=x("br"),A=$("\n mouse position: "),z=$(e[5]),O=T(),I=x("div"),N=x("a"),N.textContent="hide",C(a,"target","_blank"),C(a,"href",e[3]),C(i,"id","map-position-inner"),C(N,"href","#hide"),C(I,"id","map-position-close"),C(I,"class","svelte-1b30dq3"),C(n,"id","map-position"),C(n,"class","svelte-1b30dq3")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(i,s),v(i,r),v(i,a),v(a,l),v(i,c),v(i,h),v(i,u),v(i,d),v(i,p),v(i,m),v(i,f),v(i,_),v(i,g),v(i,w),v(i,L),v(i,P),v(i,k),v(i,M),v(i,A),v(i,z),v(n,O),v(n,I),v(I,N),B||(D=E(N,"click",tn),B=!0)},p(t,[e]){1&e&&S(s,t[0]),8&e&&C(a,"href",t[3]),2&e&&S(d,t[1]),4&e&&S(_,t[2]),16&e&&S(P,t[4]),32&e&&S(z,t[5])},i:t,o:t,d(t){t&&b(n),B=!1,D()}}}function tn(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function en(t,e,n){let i,o,s,r,a,l,c;function h(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,s=t.getZoom()),n(2,r=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,c="-"),e&&n(5,c=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return ut.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),[o,s,r,a,l,c]}!function(t,e){!function(e,n){t.exports=e(Je.exports),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,s,r){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}({exports:{}});class nn extends lt{constructor(t){super(),at(this,t,en,Qe,r,{})}}function on(e){let n,i,r,a,l,c,h,u;return n=new nn({}),{c(){it(n.$$.fragment),i=T(),r=x("div"),a=T(),l=x("div"),l.textContent="show map bounds",C(r,"id","map"),C(r,"class","svelte-1vbvdrk"),C(l,"id","show-map-position"),C(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(o,d){var p;ot(n,o,d),y(o,i,d),y(o,r,d),y(o,a,d),y(o,l,d),c=!0,h||(u=[(p=e[0].call(null,r),p&&s(p.destroy)?p.destroy:t),E(l,"click",M(sn))],h=!0)},p:t,i(t){c||(tt(n.$$.fragment,t),c=!0)},o(t){et(n.$$.fragment,t),c=!1},d(t){st(n,t),t&&b(i),t&&b(r),t&&b(a),t&&b(l),h=!1,o(u)}}}function sn(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function rn(t,e,n){let{display_minimap:i=!1}=e,{current_result:o=null}=e,{position_marker:s=null}=e,r=[];function a(t){let e=u(ut);if(!e)return;if(function(){let t=u(ut);t&&r.forEach((function(e){t.removeLayer(e)}))}(),s){let t=Je.exports.circleMarker(s,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.addTo(e),r.push(t)}var n=new URLSearchParams(window.location.search).get("viewbox");if(n){let t=n.split(","),i=Je.exports.latLngBounds([t[1],t[0]],[t[3],t[2]]);Je.exports.rectangle(i,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let i=t.centroid?t.centroid.coordinates[1]:t.lat,o=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(i&&o){let t=Je.exports.circleMarker([i,o],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});e.addLayer(t),r.push(t)}if(a){var l=Je.exports.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),r.push(l),e.fitBounds(l.getBounds())}else i&&o&&s?e.fitBounds([[i,o],s],{padding:[50,50]}):i&&o&&e.setView([i,o],10)}return t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap),"current_result"in t&&n(2,o=t.current_result),"position_marker"in t&&n(3,s=t.position_marker)},t.$$.update=()=>{4&t.$$.dirty&&a(o)},[function(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Je.exports.map(t,{attributionControl:e&&e.length,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(Je.exports.tileLayer(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i){let t=new Je.exports.TileLayer(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Je.exports.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Je.exports.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return ut.set(e),a(o),{destroy:()=>{ut.set(null),e.remove()}}},i,o,s]}class an extends lt{constructor(t){super(),at(this,t,rn,on,r,{display_minimap:1,current_result:2,position_marker:3})}}function ln(t){let e,n;return e=new me({props:{api_request_params:t[0],bStructuredSearch:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.api_request_params=t[0]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function cn(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new ie({props:{$$slots:{default:[ln]},$$scope:{ctx:t}}});let d={reverse_search:!1};return void 0!==t[1]&&(d.current_result=t[1]),s=new Xe({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new an({props:{current_result:t[1],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function hn(t,e,n){let i,o,s;return d(t,ft,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"search"===t.tab&&function(t){Tt(),n(0,o={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.get("dedupe"),"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=o.street||o.city||o.county||o.state||o.country||o.postalcode;o.q||e?xt("search",o,(function(t){dt.set(t),Tt("Result for "+o.q),e?(document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):document.querySelector("input[name=q]").focus()})):dt.set(void 0)}(t.params)}},[o,s,undefined,i,function(t){s=t,n(1,s)}]}class un extends lt{constructor(t){super(),at(this,t,hn,cn,r,{})}}function dn(t,e,n){const i=t.slice();return i[8]=e[n],i[10]=n,i}function pn(e){let n,i,o,s,r,a=e[8]+"";return{c(){n=x("option"),i=$(e[10]),o=$(" - "),s=$(a),n.__value=r=e[10],n.value=n.__value},m(t,e){y(t,n,e),v(n,i),v(n,o),v(n,s)},p:t,d(t){t&&b(n)}}}function mn(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,$,L,P,S,O,I,N=Ee(),B=[];for(let e=0;elat',n=T(),i=x("div"),s=x("input"),r=T(),a=x("div"),l=x("a"),l.textContent="<>",c=T(),h=x("div"),h.innerHTML='',u=T(),d=x("div"),p=x("input"),m=T(),f=x("div"),f.innerHTML='',_=T(),g=x("div"),$=x("select"),L=x("option"),L.textContent="---";for(let t=0;tSearch',C(e,"class","col-auto"),C(s,"id","reverse-lat"),C(s,"name","lat"),C(s,"type","text"),C(s,"class","form-control form-control-sm d-inline svelte-1pqxd6v"),C(s,"placeholder","latitude"),C(s,"pattern","^-?\\d+(\\.\\d+)?$"),C(i,"class","col-auto"),C(l,"id","switch-coords"),C(l,"class","btn btn-outline-secondary btn-sm svelte-1pqxd6v"),C(l,"title","switch lat and lon"),C(a,"class","col-auto"),C(h,"class","col-auto"),C(p,"id","reverse-lon"),C(p,"name","lon"),C(p,"type","text"),C(p,"class","form-control form-control-sm svelte-1pqxd6v"),C(p,"placeholder","longitude"),C(p,"pattern","^-?\\d+(\\.\\d+)?$"),C(d,"class","col-auto"),C(f,"class","col-auto"),L.__value="",L.value=L.__value,C($,"id","reverse-zoom"),C($,"name","zoom"),C($,"class","form-select form-select-sm svelte-1pqxd6v"),void 0===t[2]&&F((()=>t[7].call($))),C(g,"class","col-auto"),C(S,"class","col-auto")},m(o,b){y(o,e,b),y(o,n,b),y(o,i,b),v(i,s),A(s,t[0]),y(o,r,b),y(o,a,b),v(a,l),y(o,c,b),y(o,h,b),y(o,u,b),y(o,d,b),v(d,p),A(p,t[1]),y(o,m,b),y(o,f,b),y(o,_,b),y(o,g,b),v(g,$),v($,L);for(let t=0;t{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));return t.$$set=t=>{"lat"in t&&n(0,i=t.lat),"lon"in t&&n(1,o=t.lon),"zoom"in t&&n(2,s=t.zoom)},[i,o,s,r,function(){i=this.value,n(0,i)},()=>r(o,i),function(){o=this.value,n(1,o)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(2,s)}]}class vn extends lt{constructor(t){super(),at(this,t,gn,fn,r,{lat:0,lon:1,zoom:2})}}function yn(t){let n,i;const o=[t[0]];let s={};for(let t=0;tnt(s,"current_result",u))),c=new an({props:{current_result:t[1],position_marker:t[2],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),4&n&&(a.position_marker=t[2]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function wn(t,e,n){let i,o,s,r;return d(t,ft,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"reverse"===t.tab&&(e=t.params,Tt(),n(0,o={lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),format:"jsonv2"}),o.lat||o.lat?xt("reverse",o,(function(t){t&&!t.error?(n(2,r=[o.lat,o.lon]),dt.set([t])):dt.set([]),Tt("Reverse result for "+o.lat+","+o.lon),document.querySelector("input[name=lat]").focus()})):dt.set(void 0))}var e},[o,s,r,i,function(t){s=t,n(1,s)}]}class xn extends lt{constructor(t){super(),at(this,t,wn,bn,r,{})}}function $n(e){let n,i,o,s,r,a,l,c,h,u,d;return{c(){n=x("form"),i=x("div"),o=x("div"),s=x("input"),a=T(),l=x("div"),l.innerHTML='',c=T(),h=x("small"),h.innerHTML='OSM type+id (N123, n123, W123, w123, R123, r123),\n Place id (1234) or\n URL (https://openstreetmap.org/way/123)',C(s,"type","edit"),C(s,"class","form-control form-control-sm me-1 svelte-1kvo9ki"),C(s,"pattern","^[NWRnwr]?[0-9]+$|.*openstreetmap.*"),s.value=r=""+((e[0].osmtype||"")+(e[0].osmid||"")+(e[0].place_id||"")),C(o,"class","col-auto"),C(l,"class","col-auto"),C(i,"class","row g-1"),C(n,"class","form-inline svelte-1kvo9ki"),C(n,"action","details.html"),C(h,"class","form-text text-muted svelte-1kvo9ki")},m(t,r){y(t,n,r),v(n,i),v(i,o),v(o,s),v(i,a),v(i,l),y(t,c,r),y(t,h,r),u||(d=E(n,"submit",k(e[1])),u=!0)},p(t,[e]){1&e&&r!==(r=""+((t[0].osmtype||"")+(t[0].osmid||"")+(t[0].place_id||"")))&&s.value!==r&&(s.value=r)},i:t,o:t,d(t){t&&b(n),t&&b(c),t&&b(h),u=!1,d()}}}function Ln(t,e,n){let{api_request_params:i={}}=e;return t.$$set=t=>{"api_request_params"in t&&n(0,i=t.api_request_params)},[i,function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),n=e.match(/^\s*([NWR])(\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(\d+)\s*$/);var i=new URLSearchParams;if(n)i.set("osmtype",n[1].charAt(0).toUpperCase()),i.set("osmid",n[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");i.set("place_id",e)}vt("details",i)}]}class Tn extends lt{constructor(t){super(),at(this,t,Ln,$n,r,{api_request_params:0})}}function Pn(e){let n;return{c(){n=x("span"),n.textContent="No Name",C(n,"class","noname")},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function En(t){let e,n=t[0].localname+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&S(e,n)},d(t){t&&b(e)}}}function kn(t){let e,n;return e=new kt({props:{page:"search",params_hash:{postalcode:t[0].localname},$$slots:{default:[Sn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={postalcode:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Mn(t){let e,n;return e=new kt({props:{page:"search",params_hash:{country:t[0].localname},$$slots:{default:[An]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={country:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Cn(t){let e,n;return e=new Ae({props:{feature:t[0],$$slots:{default:[zn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.feature=t[0]),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Sn(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function An(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function zn(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function On(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k=$e(t[0])+"",M=ge(t[0])+"",A=t[0].rank_address+"",z=Le(t[0].admin_level)+"",I=Te(t[0].distance,t[1])+"";function N(t,e){return t[0].localname?En:Pn}let B=N(t),D=B(t);const Z=[Cn,Mn,kn],R=[];function j(t,e){return 9&e&&(w=null),t[0].osm_id?0:(null==w&&(w=!(t[3]||!t[0].type.match(/^country/))),w?1:t[3]||"postcode"!==t[0].type?-1:2)}return~(L=j(t,-1))&&(P=R[L]=Z[L](t)),{c(){e=x("tr"),n=x("td"),D.c(),i=T(),o=x("td"),s=$(k),r=T(),a=x("td"),l=T(),c=x("td"),h=$(A),u=T(),d=x("td"),p=$(z),m=T(),f=x("td"),_=T(),g=x("td"),P&&P.c(),C(n,"class","name fw-bold svelte-6a43i0"),C(o,"class","svelte-6a43i0"),C(a,"class","svelte-6a43i0"),C(c,"class","svelte-6a43i0"),C(d,"class","svelte-6a43i0"),C(f,"class","svelte-6a43i0"),C(g,"class","svelte-6a43i0"),C(e,"class","svelte-6a43i0"),O(e,"notused",t[2]&&!t[4])},m(t,b){y(t,e,b),v(e,n),D.m(n,null),v(e,i),v(e,o),v(o,s),v(e,r),v(e,a),a.innerHTML=M,v(e,l),v(e,c),v(c,h),v(e,u),v(e,d),v(d,p),v(e,m),v(e,f),f.innerHTML=I,v(e,_),v(e,g),~L&&R[L].m(g,null),E=!0},p(t,[i]){B===(B=N(t))&&D?D.p(t,i):(D.d(1),D=B(t),D&&(D.c(),D.m(n,null))),(!E||1&i)&&k!==(k=$e(t[0])+"")&&S(s,k),(!E||1&i)&&M!==(M=ge(t[0])+"")&&(a.innerHTML=M),(!E||1&i)&&A!==(A=t[0].rank_address+"")&&S(h,A),(!E||1&i)&&z!==(z=Le(t[0].admin_level)+"")&&S(p,z),(!E||3&i)&&I!==(I=Te(t[0].distance,t[1])+"")&&(f.innerHTML=I);let o=L;L=j(t,i),L===o?~L&&R[L].p(t,i):(P&&(J(),et(R[o],1,1,(()=>{R[o]=null})),Q()),~L?(P=R[L],P?P.p(t,i):(P=R[L]=Z[L](t),P.c()),tt(P,1),P.m(g,null)):P=null),20&i&&O(e,"notused",t[2]&&!t[4])},i(t){E||(tt(P),E=!0)},o(t){et(P),E=!1},d(t){t&&b(e),D.d(),~L&&R[L].d()}}}function In(t,e,n){let i,o,{addressLine:s}=e,{bDistanceInMeters:r}=e,{bMarkUnusedLines:a=!1}=e;return t.$$set=t=>{"addressLine"in t&&n(0,s=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters),"bMarkUnusedLines"in t&&n(2,a=t.bMarkUnusedLines)},t.$$.update=()=>{1&t.$$.dirty&&n(4,i=s.isaddress)},n(3,o=Nominatim_Config.Reverse_Only),[s,r,a,o,i]}class Nn extends lt{constructor(t){super(),at(this,t,In,On,r,{addressLine:0,bDistanceInMeters:1,bMarkUnusedLines:2})}}function Bn(e){let n,i,s,r,a,l,c,h,u,d,p,m,f;return{c(){n=$("("),i=x("a"),i.textContent="how?",s=$(")\n\n"),r=x("div"),a=x("button"),a.innerHTML='',l=$("\n\n Nightly calculated from nearby places having this postcode.\n "),c=x("a"),c.textContent="Documentation",h=$(".\n You can search for those with an "),u=x("a"),d=$("Overpass Turbo query"),p=$("."),C(i,"href","#openHint"),C(a,"type","button"),C(a,"class","close svelte-yw4tm0"),C(a,"aria-label","Close"),C(c,"href","https://nominatim.org/release-docs/latest/develop/Postcodes/"),C(u,"href",e[0]),C(u,"target","_blank"),C(r,"id","postcode-hint"),C(r,"class","my-2 p-2 svelte-yw4tm0")},m(t,e){y(t,n,e),y(t,i,e),y(t,s,e),y(t,r,e),v(r,a),v(r,l),v(r,c),v(r,h),v(r,u),v(u,d),v(r,p),m||(f=[E(i,"click",M(k(Dn))),E(a,"click",M(Zn))],m=!0)},p:t,i:t,o:t,d(t){t&&b(n),t&&b(i),t&&b(s),t&&b(r),m=!1,o(f)}}}function Dn(){document.getElementById("postcode-hint").style.display="block"}function Zn(){document.getElementById("postcode-hint").style.display="none"}function Rn(t,e,n){let{postcode:i}=e,{lat:o}=e,{lon:s}=e,r=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),a="https://overpass-turbo.eu/?Q="+encodeURIComponent(r)+"&C="+encodeURIComponent([o,s,15].join(";"))+"&R";return t.$$set=t=>{"postcode"in t&&n(1,i=t.postcode),"lat"in t&&n(2,o=t.lat),"lon"in t&&n(3,s=t.lon)},[a,i,o,s]}class jn extends lt{constructor(t){super(),at(this,t,Rn,Bn,r,{postcode:1,lat:2,lon:3})}}function Hn(t){let e,n,i,o,s,r;const a=t[2].default,l=p(a,t,t[1],null);return{c(){e=x("tr"),n=x("td"),i=$(t[0]),o=T(),s=x("td"),l&&l.c(),C(n,"class","svelte-1184nr4"),C(s,"class","svelte-1184nr4")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),l&&l.m(s,null),r=!0},p(t,[e]){(!r||1&e)&&S(i,t[0]),l&&l.p&&(!r||2&e)&&_(l,a,t,t[1],r?f(a,t[1],e,null):g(t[1]),null)},i(t){r||(tt(l,t),r=!0)},o(t){et(l,t),r=!1},d(t){t&&b(e),l&&l.d(t)}}}function Wn(t,e,n){let{$$slots:i={},$$scope:o}=e,{title:s}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[s,o,i]}class Fn extends lt{constructor(t){super(),at(this,t,Wn,Hn,r,{title:0})}}function qn(t,e,n){const i=t.slice();return i[1]=e[n],i}function Un(t){let e,n,i,o,s,r,a=t[0][t[1]]+"",l=t[1]+"";return{c(){e=x("div"),n=x("span"),i=$(a),o=$(" ("),s=$(l),r=$(")\n "),C(n,"class","name svelte-ndknvb"),C(e,"class","line")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),v(e,r)},p(t,e){1&e&&a!==(a=t[0][t[1]]+"")&&S(i,a),1&e&&l!==(l=t[1]+"")&&S(s,l)},d(t){t&&b(e)}}}function Vn(e){let n,i=Object.keys(e[0]),o=[];for(let t=0;t{"items"in t&&n(0,i=t.items)},[i]}class Gn extends lt{constructor(t){super(),at(this,t,Kn,Vn,r,{items:0})}}function Yn(t,e,n){const i=t.slice();return i[7]=e[n],i}function Xn(t,e,n){const i=t.slice();return i[10]=e[n],i}function Jn(t,e,n){const i=t.slice();return i[13]=e[n],i}function Qn(t,e,n){const i=t.slice();return i[13]=e[n],i}function ti(t,e,n){const i=t.slice();return i[18]=e[n],i}function ei(t,e,n){const i=t.slice();return i[18]=e[n],i}function ni(t){let e,n;return e=new Tn({props:{api_request_params:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};4&n&&(i.api_request_params=t[2]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ii(e){let n;return{c(){n=$("No such place found.")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function oi(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M,A,z,O,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt=(t[0].localname||`${_e(t[0].osm_type)} ${t[0].osm_id}`)+"",Tt=we(t[0]);a=new Ae({props:{feature:t[0],$$slots:{default:[si]},$$scope:{ctx:t}}}),h=new Ze({props:{aPlace:t[0]}}),_=new Fn({props:{title:"Name",$$slots:{default:[li]},$$scope:{ctx:t}}}),w=new Fn({props:{title:"Type",$$slots:{default:[ci]},$$scope:{ctx:t}}}),P=new Fn({props:{title:"Last Updated",$$slots:{default:[hi]},$$scope:{ctx:t}}});let Pt=Tt&&ui(t);M=new Fn({props:{title:"Search Rank",$$slots:{default:[pi]},$$scope:{ctx:t}}}),z=new Fn({props:{title:"Address Rank",$$slots:{default:[mi]},$$scope:{ctx:t}}});let Et=t[0].calculated_importance&&fi(t);N=new Fn({props:{title:"Coverage",$$slots:{default:[vi]},$$scope:{ctx:t}}}),D=new Fn({props:{title:"Centre Point (lat,lon)",$$slots:{default:[yi]},$$scope:{ctx:t}}}),R=new Fn({props:{title:"OSM",$$slots:{default:[bi]},$$scope:{ctx:t}}}),H=new Fn({props:{title:"Place Id",$$slots:{default:[wi]},$$scope:{ctx:t}}});let kt=t[0].calculated_wikipedia&&xi(t);q=new Fn({props:{title:"Computed Postcode",$$slots:{default:[Ti]},$$scope:{ctx:t}}}),V=new Fn({props:{title:"Address Tags",$$slots:{default:[Pi]},$$scope:{ctx:t}}}),G=new Fn({props:{title:"Extra Tags",$$slots:{default:[Ei]},$$scope:{ctx:t}}}),rt=new an({props:{current_result:t[0]}});let Mt=t[0].address&&ki(t),Ct=t[0].linked_places&&Ci(t),St=!t[4]&&Ai(t);const At=[Wi,Hi],zt=[];function Ot(t,e){return t[2].hierarchy?0:1}return wt=Ot(t),xt=zt[wt]=At[wt](t),{c(){e=x("div"),n=x("div"),i=x("h1"),o=$(Lt),s=T(),r=x("small"),it(a.$$.fragment),l=T(),c=x("div"),it(h.$$.fragment),u=T(),d=x("div"),p=x("div"),m=x("table"),f=x("tbody"),it(_.$$.fragment),g=T(),it(w.$$.fragment),L=T(),it(P.$$.fragment),E=T(),Pt&&Pt.c(),k=T(),it(M.$$.fragment),A=T(),it(z.$$.fragment),O=T(),Et&&Et.c(),I=T(),it(N.$$.fragment),B=T(),it(D.$$.fragment),Z=T(),it(R.$$.fragment),j=T(),it(H.$$.fragment),W=T(),kt&&kt.c(),F=T(),it(q.$$.fragment),U=T(),it(V.$$.fragment),K=T(),it(G.$$.fragment),Y=T(),X=x("div"),nt=x("div"),it(rt.$$.fragment),at=T(),lt=x("div"),ct=x("div"),ht=x("h2"),ht.textContent="Address",ut=T(),dt=x("table"),pt=x("thead"),pt.innerHTML="Local name \n Type \n OSM \n Address rank \n Admin level \n Distance \n ",mt=T(),ft=x("tbody"),Mt&&Mt.c(),_t=T(),Ct&&Ct.c(),gt=T(),St&&St.c(),vt=T(),yt=x("tr"),yt.innerHTML='

Parent Of

',bt=T(),xt.c(),C(r,"class","svelte-dl2ttu"),C(i,"class","svelte-dl2ttu"),C(n,"class","col-sm-10"),C(c,"class","col-sm-2 text-end"),C(e,"class","row"),C(m,"id","locationdetails"),C(m,"class","table table-striped table-responsive"),C(p,"class","col-md-6"),C(nt,"id","map-wrapper"),C(nt,"class","svelte-dl2ttu"),C(X,"class","col-md-6"),C(d,"class","row"),C(ht,"class","svelte-dl2ttu"),C(yt,"class","all-columns svelte-dl2ttu"),C(dt,"id","address"),C(dt,"class","table table-striped table-small"),C(ct,"class","col-md-12"),C(lt,"class","row")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(i,o),v(i,s),v(i,r),ot(a,r,null),v(e,l),v(e,c),ot(h,c,null),y(t,u,b),y(t,d,b),v(d,p),v(p,m),v(m,f),ot(_,f,null),v(f,g),ot(w,f,null),v(f,L),ot(P,f,null),v(f,E),Pt&&Pt.m(f,null),v(f,k),ot(M,f,null),v(f,A),ot(z,f,null),v(f,O),Et&&Et.m(f,null),v(f,I),ot(N,f,null),v(f,B),ot(D,f,null),v(f,Z),ot(R,f,null),v(f,j),ot(H,f,null),v(f,W),kt&&kt.m(f,null),v(f,F),ot(q,f,null),v(f,U),ot(V,f,null),v(f,K),ot(G,f,null),v(d,Y),v(d,X),v(X,nt),ot(rt,nt,null),y(t,at,b),y(t,lt,b),v(lt,ct),v(ct,ht),v(ct,ut),v(ct,dt),v(dt,pt),v(dt,mt),v(dt,ft),Mt&&Mt.m(ft,null),v(ft,_t),Ct&&Ct.m(ft,null),v(ft,gt),St&&St.m(ft,null),v(ft,vt),v(ft,yt),v(ft,bt),zt[wt].m(ft,null),$t=!0},p(t,e){(!$t||1&e)&&Lt!==(Lt=(t[0].localname||`${_e(t[0].osm_type)} ${t[0].osm_id}`)+"")&&S(o,Lt);const n={};1&e&&(n.feature=t[0]),8388608&e&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e&&(i.aPlace=t[0]),h.$set(i);const s={};8388609&e&&(s.$$scope={dirty:e,ctx:t}),_.$set(s);const r={};8388609&e&&(r.$$scope={dirty:e,ctx:t}),w.$set(r);const l={};8388609&e&&(l.$$scope={dirty:e,ctx:t}),P.$set(l),1&e&&(Tt=we(t[0])),Tt?Pt?(Pt.p(t,e),1&e&&tt(Pt,1)):(Pt=ui(t),Pt.c(),tt(Pt,1),Pt.m(f,k)):Pt&&(J(),et(Pt,1,1,(()=>{Pt=null})),Q());const c={};8388609&e&&(c.$$scope={dirty:e,ctx:t}),M.$set(c);const u={};8388609&e&&(u.$$scope={dirty:e,ctx:t}),z.$set(u),t[0].calculated_importance?Et?(Et.p(t,e),1&e&&tt(Et,1)):(Et=fi(t),Et.c(),tt(Et,1),Et.m(f,I)):Et&&(J(),et(Et,1,1,(()=>{Et=null})),Q());const d={};8388609&e&&(d.$$scope={dirty:e,ctx:t}),N.$set(d);const p={};8388609&e&&(p.$$scope={dirty:e,ctx:t}),D.$set(p);const m={};8388609&e&&(m.$$scope={dirty:e,ctx:t}),R.$set(m);const g={};8388609&e&&(g.$$scope={dirty:e,ctx:t}),H.$set(g),t[0].calculated_wikipedia?kt?(kt.p(t,e),1&e&&tt(kt,1)):(kt=xi(t),kt.c(),tt(kt,1),kt.m(f,F)):kt&&(J(),et(kt,1,1,(()=>{kt=null})),Q());const v={};8388609&e&&(v.$$scope={dirty:e,ctx:t}),q.$set(v);const y={};8388609&e&&(y.$$scope={dirty:e,ctx:t}),V.$set(y);const b={};8388609&e&&(b.$$scope={dirty:e,ctx:t}),G.$set(b);const x={};1&e&&(x.current_result=t[0]),rt.$set(x),t[0].address?Mt?(Mt.p(t,e),1&e&&tt(Mt,1)):(Mt=ki(t),Mt.c(),tt(Mt,1),Mt.m(ft,_t)):Mt&&(J(),et(Mt,1,1,(()=>{Mt=null})),Q()),t[0].linked_places?Ct?(Ct.p(t,e),1&e&&tt(Ct,1)):(Ct=Ci(t),Ct.c(),tt(Ct,1),Ct.m(ft,gt)):Ct&&(J(),et(Ct,1,1,(()=>{Ct=null})),Q()),t[4]?St&&(St.d(1),St=null):St?St.p(t,e):(St=Ai(t),St.c(),St.m(ft,vt));let $=wt;wt=Ot(t),wt===$?zt[wt].p(t,e):(J(),et(zt[$],1,1,(()=>{zt[$]=null})),Q(),xt=zt[wt],xt?xt.p(t,e):(xt=zt[wt]=At[wt](t),xt.c()),tt(xt,1),xt.m(ft,null))},i(t){$t||(tt(a.$$.fragment,t),tt(h.$$.fragment,t),tt(_.$$.fragment,t),tt(w.$$.fragment,t),tt(P.$$.fragment,t),tt(Pt),tt(M.$$.fragment,t),tt(z.$$.fragment,t),tt(Et),tt(N.$$.fragment,t),tt(D.$$.fragment,t),tt(R.$$.fragment,t),tt(H.$$.fragment,t),tt(kt),tt(q.$$.fragment,t),tt(V.$$.fragment,t),tt(G.$$.fragment,t),tt(rt.$$.fragment,t),tt(Mt),tt(Ct),tt(xt),$t=!0)},o(t){et(a.$$.fragment,t),et(h.$$.fragment,t),et(_.$$.fragment,t),et(w.$$.fragment,t),et(P.$$.fragment,t),et(Pt),et(M.$$.fragment,t),et(z.$$.fragment,t),et(Et),et(N.$$.fragment,t),et(D.$$.fragment,t),et(R.$$.fragment,t),et(H.$$.fragment,t),et(kt),et(q.$$.fragment,t),et(V.$$.fragment,t),et(G.$$.fragment,t),et(rt.$$.fragment,t),et(Mt),et(Ct),et(xt),$t=!1},d(t){t&&b(e),st(a),st(h),t&&b(u),t&&b(d),st(_),st(w),st(P),Pt&&Pt.d(),st(M),st(z),Et&&Et.d(),st(N),st(D),st(R),st(H),kt&&kt.d(),st(q),st(V),st(G),st(rt),t&&b(at),t&&b(lt),Mt&&Mt.d(),Ct&&Ct.d(),St&&St.d(),zt[wt].d()}}}function si(t){let e;return{c(){e=$("link to this page")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ri(t){let e,n;return e=new Gn({props:{items:t[0].names}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].names),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ai(e){let n;return{c(){n=x("span"),n.textContent="No Name",C(n,"class","noname fw-bold")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function li(t){let e,n,i,o,s;const r=[ai,ri],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!!Array.isArray(t[0].names)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function ci(t){let e,n,i,o=t[0].category+"",s=t[0].type+"";return{c(){e=$(o),n=$(":"),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].category+"")&&S(e,o),1&n&&s!==(s=t[0].type+"")&&S(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function hi(t){let e,n=t[0].indexed_date+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].indexed_date+"")&&S(e,n)},d(t){t&&b(e)}}}function ui(t){let e,n;return e=new Fn({props:{title:"Admin Level",$$slots:{default:[di]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function di(t){let e,n=t[0].admin_level+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].admin_level+"")&&S(e,n)},d(t){t&&b(e)}}}function pi(t){let e,n=t[0].rank_search+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].rank_search+"")&&S(e,n)},d(t){t&&b(e)}}}function mi(t){let e,n,i,o,s=t[0].rank_address+"",r=xe(t[0].rank_address)+"";return{c(){e=$(s),n=$(" ("),i=$(r),o=$(")")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].rank_address+"")&&S(e,s),1&n&&r!==(r=xe(t[0].rank_address)+"")&&S(i,r)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function fi(t){let e,n;return e=new Fn({props:{title:"Importance",$$slots:{default:[gi]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function _i(t){let e;return{c(){e=$("(estimated)")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function gi(t){let e,n,i,o=t[0].calculated_importance+"",s=!t[0].importance&&_i();return{c(){e=$(o),n=T(),s&&s.c(),i=P()},m(t,o){y(t,e,o),y(t,n,o),s&&s.m(t,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].calculated_importance+"")&&S(e,o),t[0].importance?s&&(s.d(1),s=null):s||(s=_i(),s.c(),s.m(i.parentNode,i))},d(t){t&&b(e),t&&b(n),s&&s.d(t),t&&b(i)}}}function vi(t){let e,n=be(t[0])+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=be(t[0])+"")&&S(e,n)},d(t){t&&b(e)}}}function yi(t){let e,n,i,o=t[0].centroid.coordinates[1]+"",s=t[0].centroid.coordinates[0]+"";return{c(){e=$(o),n=$(","),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].centroid.coordinates[1]+"")&&S(e,o),1&n&&s!==(s=t[0].centroid.coordinates[0]+"")&&S(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function bi(t){let e,n,i=ge(t[0])+"";return{c(){e=new I,n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=ge(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function wi(t){let e,n,i,o,s=t[0].place_id+"";return{c(){e=$(s),n=$("\n ("),i=x("a"),i.textContent="on this server",o=$(")"),C(i,"href","https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].place_id+"")&&S(e,s)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function xi(t){let e,n;return e=new Fn({props:{title:"Wikipedia Calculated",$$slots:{default:[$i]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function $i(t){let e,n,i=ye(t[0])+"";return{c(){e=new I,n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=ye(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function Li(t){let e,n,i,o,s=t[0].calculated_postcode+"";return i=new jn({props:{postcode:t[0].calculated_postcode,lat:t[0].centroid.coordinates[1],lon:t[0].centroid.coordinates[0]}}),{c(){e=$(s),n=T(),it(i.$$.fragment)},m(t,s){y(t,e,s),y(t,n,s),ot(i,t,s),o=!0},p(t,n){(!o||1&n)&&s!==(s=t[0].calculated_postcode+"")&&S(e,s);const r={};1&n&&(r.postcode=t[0].calculated_postcode),1&n&&(r.lat=t[0].centroid.coordinates[1]),1&n&&(r.lon=t[0].centroid.coordinates[0]),i.$set(r)},i(t){o||(tt(i.$$.fragment,t),o=!0)},o(t){et(i.$$.fragment,t),o=!1},d(t){t&&b(e),t&&b(n),st(i,t)}}}function Ti(t){let e,n,i=t[0].calculated_postcode&&Li(t);return{c(){i&&i.c(),e=P()},m(t,o){i&&i.m(t,o),y(t,e,o),n=!0},p(t,n){t[0].calculated_postcode?i?(i.p(t,n),1&n&&tt(i,1)):(i=Li(t),i.c(),tt(i,1),i.m(e.parentNode,e)):i&&(J(),et(i,1,1,(()=>{i=null})),Q())},i(t){n||(tt(i),n=!0)},o(t){et(i),n=!1},d(t){i&&i.d(t),t&&b(e)}}}function Pi(t){let e,n;return e=new Gn({props:{items:t[0].addresstags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].addresstags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ei(t){let e,n;return e=new Gn({props:{items:t[0].extratags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].extratags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ki(t){let e,n,i=t[0].address,o=[];for(let e=0;eet(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;tet(r[t],1,1,(()=>{r[t]=null}));return{c(){e=x("tr"),e.innerHTML='

Linked Places

',n=T();for(let t=0;t

Keywords

',n=T(),r.c(),i=P(),C(e,"class","all-columns svelte-dl2ttu")},m(t,o){y(t,e,o),y(t,n,o),r.m(t,o),y(t,i,o)},p(t,e){s===(s=o(t))&&r?r.p(t,e):(r.d(1),r=s(t),r&&(r.c(),r.m(i.parentNode,i)))},d(t){t&&b(e),t&&b(n),r.d(t),t&&b(i)}}}function zi(t){let e,n,i,o,s;return{c(){e=x("tr"),n=x("td"),i=x("a"),o=$("display keywords"),C(i,"class","btn btn-outline-secondary btn-sm"),C(i,"href",s=t[1]+"&keywords=1")},m(t,s){y(t,e,s),v(e,n),v(n,i),v(i,o)},p(t,e){2&e&&s!==(s=t[1]+"&keywords=1")&&C(i,"href",s)},d(t){t&&b(e)}}}function Oi(t){let e,n;function i(t,n){var i;return 1&n&&(e=null),null==e&&(i=t[0],e=!!(i.keywords&&i.keywords.name&&i.keywords.address&&(i.keywords.name.length>0||i.keywords.address.length>0))),e?Ni:Ii}let o=i(t,-1),s=o(t);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o===(o=i(t,e))&&s?s.p(t,e):(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},d(t){s.d(t),t&&b(n)}}}function Ii(e){let n;return{c(){n=x("tr"),n.innerHTML="Place has no keywords"},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function Ni(t){let e,n,i,o,s=t[0].keywords.name,r=[];for(let e=0;e

Name Keywords

',n=T();for(let t=0;t

Address Keywords

',n=T();for(let t=0;t{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function Fi(e){let n;return{c(){n=x("tr"),n.innerHTML="Place is not parent of other places"},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function qi(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,s=Object.keys(t[0].hierarchy),r=[];for(let e=0;eet(r[t],1,1,(()=>{r[t]=null}));let l=o&&Ki();return{c(){for(let t=0;t500),o?l||(l=Ki(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;tet(h[t],1,1,(()=>{h[t]=null}));return{c(){e=x("tr"),n=x("td"),i=x("h3"),o=$(l),s=T();for(let t=0;t{l[h]=null})),Q()),~o?(s=l[o],s?s.p(t,n):(s=l[o]=a[o](t),s.c()),tt(s,1),s.m(i,null)):s=null)},i(t){r||(tt(e.$$.fragment,t),tt(s),r=!0)},o(t){et(e.$$.fragment,t),et(s),r=!1},d(t){st(e,t),t&&b(n),t&&b(i),~o&&l[o].d()}}}function Yi(t,e,n){let i,o,s,r,a;d(t,ft,(t=>n(5,o=t)));let l=!1;return t.$$.update=()=>{if(32&t.$$.dirty){let t=o;"details"===t.tab&&(e=t.params,n(2,a={place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),n(3,l=!1),a.place_id||a.osmtype&&a.osmid?(a.place_id?Tt("Details for "+a.place_id):Tt("Details for "+a.osmtype+a.osmid),xt("details",a,(function(t){window.scrollTo(0,0),n(3,l=!0),n(0,s=t&&!t.error?t:void 0)}))):n(0,s=void 0),n(1,r=window.location.search))}var e},n(4,i=Nominatim_Config.Reverse_Only),[s,r,a,l,i,o]}class Xi extends lt{constructor(t){super(),at(this,t,Yi,Gi,r,{})}}function Ji(t,e,n){const i=t.slice();return i[2]=e[n],i}function Qi(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M,A,z,O,I,N,B,D=t[2].osm_type+"",Z=ge(t[2])+"",R=t[2].class+"",j=t[2].type+"",H=t[2].name+"",W=(t[2].country_code||"")+"",F=t[2].errormessage+"",q=t[2].updated+"";return{c(){e=x("tr"),n=x("td"),i=$(D),o=T(),s=x("td"),r=T(),a=x("td"),l=$(R),c=T(),h=x("td"),u=$(j),d=T(),p=x("td"),m=$(H),f=T(),_=x("td"),g=$(W),w=T(),L=x("td"),P=$(F),E=T(),k=x("td"),M=$(q),A=T(),z=x("td"),O=x("a"),I=$("josm"),B=T(),C(O,"href",N="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+_e(t[2].osm_type)+"/"+t[2].osm_id+"/full"),C(O,"target","josm")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(e,o),v(e,s),s.innerHTML=Z,v(e,r),v(e,a),v(a,l),v(e,c),v(e,h),v(h,u),v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,E),v(e,k),v(k,M),v(e,A),v(e,z),v(z,O),v(O,I),v(e,B)},p(t,e){1&e&&D!==(D=t[2].osm_type+"")&&S(i,D),1&e&&Z!==(Z=ge(t[2])+"")&&(s.innerHTML=Z),1&e&&R!==(R=t[2].class+"")&&S(l,R),1&e&&j!==(j=t[2].type+"")&&S(u,j),1&e&&H!==(H=t[2].name+"")&&S(m,H),1&e&&W!==(W=(t[2].country_code||"")+"")&&S(g,W),1&e&&F!==(F=t[2].errormessage+"")&&S(P,F),1&e&&q!==(q=t[2].updated+"")&&S(M,q),1&e&&N!==(N="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+_e(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&C(O,"href",N)},d(t){t&&b(e)}}}function to(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,L=t[0].length+"";e=new ie({});let P=t[0],E=[];for(let e=0;eOSM type \n OSM id \n Class \n Type \n Name \n Country Code \n Error message \n Updated \n ",f=T(),_=x("tbody");for(let t=0;tet(P[t],1,1,(()=>{P[t]=null}));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Deletable",a=T(),l=x("p"),c=$(g),h=$(" objects have been deleted in OSM but are still in the Nominatim database."),u=T(),d=x("table"),p=x("thead"),p.innerHTML="Place id \n Country Code \n Name \n OSM id \n OSM type \n Class \n Type",m=T(),f=x("tbody");for(let t=0;t{Lt("theme/about-help.html",document.getElementById("about-help"))})),[]}class fo extends lt{constructor(t){super(),at(this,t,mo,po,r,{})}}function _o(t){let e,n;return e=new fo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function go(t){let e,n;return e=new uo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function vo(t){let e,n;return e=new no({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function yo(t){let e,n;return e=new lo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function bo(t){let e,n;return e=new Xi({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function wo(t){let e,n;return e=new xn({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xo(t){let e,n;return e=new un({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function $o(t){let e,n,i,o,s,r,a;const l=[xo,wo,bo,yo,vo,go,_o],c=[];function h(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:"status"===t[0]?5:"about"===t[0]?6:-1}return~(e=h(t))&&(n=c[e]=l[e](t)),o=new bt({}),{c(){n&&n.c(),i=T(),it(o.$$.fragment)},m(n,l){~e&&c[e].m(n,l),y(n,i,l),ot(o,n,l),s=!0,r||(a=E(window,"popstate",t[2]),r=!0)},p(t,[o]){let s=e;e=h(t),e!==s&&(n&&(J(),et(c[s],1,1,(()=>{c[s]=null})),Q()),~e?(n=c[e],n||(n=c[e]=l[e](t),n.c()),tt(n,1),n.m(i.parentNode,i)):n=null)},i(t){s||(tt(n),tt(o.$$.fragment,t),s=!0)},o(t){et(n),et(o.$$.fragment,t),s=!1},d(t){~e&&c[e].d(t),t&&b(i),st(o,t),r=!1,a()}}}function Lo(t,e,n){let i,o;d(t,ft,(t=>n(1,o=t))),vt();return t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o,()=>vt()]}new class extends lt{constructor(t){super(),at(this,t,Lo,$o,r,{})}}({target:document.body})}(); + */(function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof z?t:g(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,n)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=B(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>=e.x&&i.x<=n.x,r=o.y>=e.y&&i.y<=n.y;return s&&r},overlaps:function(t){t=B(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&i.lat<=n.lat,r=o.lng>=e.lng&&i.lng<=n.lng;return s&&r},overlaps:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&i.late.lng&&i.lng1,kt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(t){}return t}(),Mt=!!document.createElement("canvas").getContext,Ct=!(!document.createElementNS||!X("svg").createSVGRect),St=!Ct&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function At(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var zt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:st,androidStock:at,opera:lt,chrome:ct,gecko:ht,safari:ut,phantom:dt,opera12:pt,win:mt,ie3d:ft,webkit3d:_t,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:$t,touch:Lt,mobileOpera:Tt,mobileGecko:Pt,retina:Et,passiveEvents:kt,canvas:Mt,svg:Ct,vml:St},Ot=xt?"MSPointerDown":"pointerdown",It=xt?"MSPointerMove":"pointermove",Nt=xt?"MSPointerUp":"pointerup",Bt=xt?"MSPointerCancel":"pointercancel",Dt={},Zt=!1;function Rt(t,e,n,i){return"touchstart"===e?Ht(t,n,i):"touchmove"===e?Vt(t,n,i):"touchend"===e&&Kt(t,n,i),this}function jt(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(Ot,i,!1):"touchmove"===e?t.removeEventListener(It,i,!1):"touchend"===e&&(t.removeEventListener(Nt,i,!1),t.removeEventListener(Bt,i,!1)),this}function Ht(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Fe(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Ot,i,!1),Zt||(document.addEventListener(Ot,Wt,!0),document.addEventListener(It,Ft,!0),document.addEventListener(Nt,qt,!0),document.addEventListener(Bt,qt,!0),Zt=!0)}function Wt(t){Dt[t.pointerId]=t}function Ft(t){Dt[t.pointerId]&&(Dt[t.pointerId]=t)}function qt(t){delete Dt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],Dt)t.touches.push(Dt[n]);t.changedTouches=[t],e(t)}function Vt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(It,i,!1)}function Kt(t,e,n){var i=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Nt,i,!1),t.addEventListener(Bt,i,!1)}var Gt=xt?"MSPointerDown":$t?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":$t?"pointerup":"touchend",Xt="_leaflet_";function Jt(t,e,n){var i,o,s=!1,r=250;function a(t){if($t){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,s=n>0&&n<=r,i=e}function l(t){if(s&&!o.cancelBubble){if($t){if("mouse"===t.pointerType)return;var n,r,a={};for(r in o)n=o[r],a[r]=n&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Xt+Gt+n]=a,t[Xt+Yt+n]=l,t[Xt+"dblclick"+n]=e,t.addEventListener(Gt,a,!!kt&&{passive:!1}),t.addEventListener(Yt,l,!!kt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Qt(t,e){var n=t[Xt+Gt+e],i=t[Xt+Yt+e],o=t[Xt+"dblclick"+e];return t.removeEventListener(Gt,n,!!kt&&{passive:!1}),t.removeEventListener(Yt,i,!!kt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,se=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),re=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===re||"OTransition"===re?re+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function ce(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function he(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ue(t){var e=t.parentNode;e&&e.removeChild(t)}function de(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function pe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function me(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function fe(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function _e(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;ithis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,Z(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),c=B([a.min.add(n),a.max.subtract(i)]);if(!c.contains(r)){this._enforcingBounds=!0;var h=s.subtract(r),u=I(r.x+h.x,r.y+h.y);(r.xc.max.x)&&(u.x=s.x-h.x,h.x>0?u.x+=l.x-n.x:u.x-=l.x-i.x),(r.yc.max.y)&&(u.y=s.y-h.y,h.y>0?u.y+=l.y-n.y:u.y-=l.y-i.y),this.panTo(this.unproject(u),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=e.divideBy(2).round(),r=i.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new R(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ue(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ue(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=he("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new D(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Z(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=B(this.project(a,i),this.project(r,i)).getSize(),h=vt?this.options.zoomSnap:1,u=l.x/c.x,d=l.y/c.y,p=e?Math.max(u,d):Math.min(u,d);return i=this.getScaleZoom(p,i),h&&(i=Math.round(i/(h/100))*(h/100),i=e?Math.ceil(i/h)*h:Math.floor(i/h)*h),Math.max(o,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new N(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(j(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(j(t),j(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Ue(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Oe(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,_e(t,"leaflet-container"+(Lt?" leaflet-touch":"")+(Et?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ce(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Le(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(_e(t.markerPane,"leaflet-zoom-hide"),_e(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Le(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Le(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Ne:Oe;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=P((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((n=this._targets[r(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Je(s,t))break;if(i.push(n),o)break}if(s===this._container)break;s=s.parentNode}return i.length||a||o||!Je(s,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Xe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Me(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&Fe(t);var r={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=s.getLatLng&&(!s._radius||s._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=vt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ge(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=he("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=se,n=this._proxy.style[e];$e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ue(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();$e(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(P((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,_e(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ge(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),P((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=M.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return _e(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ue(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),sn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=he("div",e+"control-container",this._container);function i(i,o){var s=e+i+" "+e+o;t[i+o]=he("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ue(this._controlCorners[t]);ue(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+r(this),i),this._layerControlInputs.push(e),e.layerId=r(t.layer),Oe(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return n.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(s=0;s=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ie.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new rn(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=he("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var s=he("a",n,i);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),We(s),Oe(s,"click",qe),Oe(s,"click",o,this),Oe(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ge(this._zoomInButton,e),ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&_e(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var cn=function(t){return new ln(t)},hn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=he("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=he("div",e,n)),t.imperial&&(this._iScale=he("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),un=function(t){return new hn(t)},dn=on.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=he("div","leaflet-control-attribution"),We(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new dn).addTo(this)}));var pn=function(t){return new dn(t)};on.Layers=rn,on.Zoom=ln,on.Scale=hn,on.Attribution=dn,sn.layers=an,sn.zoom=cn,sn.scale=un,sn.attribution=pn;var mn=M.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});mn.addTo=function(t,e){return t.addHandler(e,this),this};var fn,_n={Events:S},gn=Lt?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Oe(this._dragStartTarget,gn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Ne(this._dragStartTarget,gn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!fe(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Me(this._element),Ee(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Se(this._element);this._startPoint=new z(e.clientX,e.clientY),this._parentScale=Ae(n),Oe(document,yn[t.type],this._onMove,this),Oe(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new z(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)l&&(s=r,l=a);l>n&&(e[s]=1,Tn(t,e,n,i,s),Tn(t,e,n,s,o))}function Pn(t,e){for(var n=[t[0]],i=1,o=0,s=t.length;ie&&(n.push(t[i]),o=i);return oe.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function Cn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Sn(t,e,n,i){var o,s=e.x,r=e.y,a=n.x-s,l=n.y-r,c=a*a+l*l;return c>0&&((o=((t.x-s)*a+(t.y-r)*l)/c)>1?(s=n.x,r=n.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,i?a*a+l*l:new z(s,r)}function An(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function zn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),An(t)}var On={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:$n,clipSegment:En,_getEdgeIntersection:kn,_getBitCode:Mn,_sqClosestPointOnSegment:Sn,isFlat:An,_flat:zn};function In(t,e,n){var i,o,s,r,a,l,c,h,u,d=[1,4,2,8];for(o=0,c=t.length;o1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=c=Math.PI/2-2*Math.atan(r*e)-a;return new R(a*n,t.x*n/i)}},Zn={LonLat:Bn,Mercator:Dn,SphericalMercator:U},Rn=n({},F,{code:"EPSG:3395",projection:Dn,transformation:function(){var t=.5/(Math.PI*Dn.R);return K(t,.5,-t,.5)}()}),jn=n({},F,{code:"EPSG:4326",projection:Bn,transformation:K(1/180,1,-1/180,.5)}),Hn=n({},W,{projection:Bn,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});W.Earth=F,W.EPSG3395=Rn,W.EPSG3857=G,W.EPSG900913=Y,W.EPSG4326=jn,W.Simple=Hn;var Wn=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()e)return r=(i-e)/n,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=j(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new D,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return An(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=An(t),i=0,o=t.length;i=2&&e[0]instanceof R&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){si.prototype._setLatLngs.call(this,t),An(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return An(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new z(e,e);if(t=new N(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,s=this._rings.length;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||si.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new ai(t,e)}var ci=Un.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=g(t)?t:t.features;if(o){for(e=0,n=o.length;e0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var r=0;ro?(e.height=o+"px",_e(t,s)):ge(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Le(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ce(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new z(this._containerLeft,-n-this._containerBottom);o._add(Te(this._container));var s=t.layerPointToContainerPoint(o),r=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||r),l=I(this.options.autoPanPaddingBottomRight||r),c=t.getSize(),h=0,u=0;s.x+i+l.x>c.x&&(h=s.x+i-c.x+l.x),s.x-h-a.x<0&&(h=s.x-a.x),s.y+n+l.y>c.y&&(u=s.y+n-c.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(h||u)&&t.fire("autopanstart").panBy([h,u])}},_onCloseButtonClick:function(t){this._close(),qe(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Mi=function(t,e){return new ki(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof ki||(t=new ki(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Wn.include({bindPopup:function(t,e){return t instanceof ki?(p(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new ki(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(qe(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ci=Ei.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ei.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ei.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ei.prototype.getEvents.call(this);return Lt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=he("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,s=i.latLngToContainerPoint(i.getCenter()),r=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,h=I(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):r.xthis.options.maxZoom||ni&&this._retainParent(o,s,r,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new z(o,s);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,n);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new z(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;dn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new D(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new z(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ue(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){_e(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&P(o(this._tileReady,this,t,null,s)),Le(s,n),this._tiles[i]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),E(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(_e(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new N(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Ii(t){return new Oi(t)}var Ni=Oi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Et&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Oe(n,"load",o(this._tileOnLoad,this,e,n)),Oe(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Et?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,e.complete||(e.src=y,ue(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",y),Oi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Oi.prototype._tileReady.call(this,t,e,n)}});function Bi(t,e){return new Ni(t,e)}var Di=Ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var s=(e=p(this,e)).detectRetina&&Et?2:1,r=this.getTileSize();i.width=r.x*s,i.height=r.y*s,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Ni.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=B(n.project(e[0]),n.project(e[1])),o=i.min,s=i.max,r=(this._wmsVersion>=1.3&&this._crs===jn?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Ni.prototype.getTileUrl.call(this,t);return a+m(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Zi(t,e){return new Di(t,e)}Ni.WMS=Di,Bi.wms=Zi;var Ri=Wn.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&_e(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=Te(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),r=this._map.project(t,e).subtract(s),a=o.multiplyBy(-n).add(i).add(o).subtract(r);vt?$e(this._container,a,n):Le(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new N(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ji=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ri.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Oe(t,"mousemove",this._onMouseMove,this),Oe(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Oe(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,ue(this._container),Ne(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ri.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Et?2:1;Le(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Et&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ri.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Fi={_initContainer:function(){this._container=he("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ri.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wi("shape");_e(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ue(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Wi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Wi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){pe(t._container)},_bringToBack:function(t){me(t._container)}},qi=St?Wi:X,Ui=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ue(this._container),Ne(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ri.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Le(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=qi("path");t.options.className&&_e(e,t.options.className),t.options.interactive&&_e(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ue(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){pe(t._path)},_bringToBack:function(t){me(t._path)}});function Vi(t){return Ct||St?new Ui(t):null}St&&Ui.include(Fi),en.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Hi(t)||Vi(t)}});var Ki=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Gi(t,e){return new Ki(t,e)}Ui.create=qi,Ui.pointsToPath=J,ci.geometryToLayer=hi,ci.coordsToLatLng=di,ci.coordsToLatLngs=pi,ci.latLngToCoords=mi,ci.latLngsToCoords=fi,ci.getFeature=_i,ci.asFeature=gi,en.mergeOptions({boxZoom:!0});var Yi=mn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ne(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ue(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),Ee(),this._startPoint=this._map.mouseEventToContainerPoint(t),Oe(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=he("div","leaflet-zoom-box",this._container),_e(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new N(this._point,this._startPoint),n=e.getSize();Le(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ue(this._box),ge(this._container,"leaflet-crosshair")),ee(),ke(),Ne(document,{contextmenu:qe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Xi=mn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Xi),en.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ji=mn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}_e(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ge(this._map._container,"leaflet-grab"),ge(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Z(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,s=(i+e+n)%t-e-n,r=Math.abs(o+n)0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=mn.extend({addHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ne(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Fe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new z(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ne(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Lt||$t&&!ut||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Lt&&!st,bounceAtZoomLimits:!0});var no=mn.extend({addHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Oe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),Ne(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",this._onTouchEnd,this),Fe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=P(a,this,!0),Fe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Ne(document,"touchmove",this._onTouchMove,this),Ne(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Xi,en.Drag=Ji,en.Keyboard=Qi,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=sn,t.Browser=zt,t.Evented=A,t.Mixin=_n,t.Util=k,t.Class=M,t.Handler=mn,t.extend=n,t.bind=o,t.stamp=r,t.setOptions=p,t.DomEvent=Qe,t.DomUtil=ze,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=On,t.PolyUtil=Nn,t.Point=z,t.point=I,t.Bounds=N,t.bounds=B,t.Transformation=V,t.transformation=K,t.Projection=Zn,t.LatLng=R,t.latLng=j,t.LatLngBounds=D,t.latLngBounds=Z,t.CRS=W,t.GeoJSON=ci,t.geoJSON=yi,t.geoJson=bi,t.Layer=Wn,t.LayerGroup=Fn,t.layerGroup=qn,t.FeatureGroup=Un,t.featureGroup=Vn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=$i,t.videoOverlay=Li,t.SVGOverlay=Ti,t.svgOverlay=Pi,t.DivOverlay=Ei,t.Popup=ki,t.popup=Mi,t.Tooltip=Ci,t.tooltip=Si,t.Icon=Kn,t.icon=Gn,t.DivIcon=Ai,t.divIcon=zi,t.Marker=Jn,t.marker=Qn,t.TileLayer=Ni,t.tileLayer=Bi,t.GridLayer=Oi,t.gridLayer=Ii,t.SVG=Ui,t.svg=Vi,t.Renderer=Ri,t.Canvas=ji,t.canvas=Hi,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=si,t.polyline=ri,t.Polygon=ai,t.polygon=li,t.Rectangle=Ki,t.rectangle=Gi,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t})(Je.exports);function Qe(e){let n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,k,M,A,z,O,I,N,B,D;return{c(){n=x("div"),i=x("div"),o=$("map center: "),s=$(e[0]),r=T(),a=x("a"),l=$("view on osm.org"),c=T(),h=x("br"),u=$("\n map zoom: "),d=$(e[1]),p=T(),m=x("br"),f=$("\n viewbox: "),_=$(e[2]),g=T(),w=x("br"),L=$("\n last click: "),P=$(e[4]),k=T(),M=x("br"),A=$("\n mouse position: "),z=$(e[5]),O=T(),I=x("div"),N=x("a"),N.textContent="hide",C(a,"target","_blank"),C(a,"href",e[3]),C(i,"id","map-position-inner"),C(N,"href","#hide"),C(I,"id","map-position-close"),C(I,"class","svelte-1b30dq3"),C(n,"id","map-position"),C(n,"class","svelte-1b30dq3")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(i,s),v(i,r),v(i,a),v(a,l),v(i,c),v(i,h),v(i,u),v(i,d),v(i,p),v(i,m),v(i,f),v(i,_),v(i,g),v(i,w),v(i,L),v(i,P),v(i,k),v(i,M),v(i,A),v(i,z),v(n,O),v(n,I),v(I,N),B||(D=E(N,"click",tn),B=!0)},p(t,[e]){1&e&&S(s,t[0]),8&e&&C(a,"href",t[3]),2&e&&S(d,t[1]),4&e&&S(_,t[2]),16&e&&S(P,t[4]),32&e&&S(z,t[5])},i:t,o:t,d(t){t&&b(n),B=!1,D()}}}function tn(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function en(t,e,n){let i,o,s,r,a,l,c;function h(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,s=t.getZoom()),n(2,r=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,c="-"),e&&n(5,c=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return ut.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),[o,s,r,a,l,c]}!function(t,e){!function(e,n){t.exports=e(Je.exports),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,s,r){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}({exports:{}});class nn extends lt{constructor(t){super(),at(this,t,en,Qe,r,{})}}function on(e){let n,i,r,a,l,c,h,u;return n=new nn({}),{c(){it(n.$$.fragment),i=T(),r=x("div"),a=T(),l=x("div"),l.textContent="show map bounds",C(r,"id","map"),C(r,"class","svelte-1vbvdrk"),C(l,"id","show-map-position"),C(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(o,d){var p;ot(n,o,d),y(o,i,d),y(o,r,d),y(o,a,d),y(o,l,d),c=!0,h||(u=[(p=e[0].call(null,r),p&&s(p.destroy)?p.destroy:t),E(l,"click",M(sn))],h=!0)},p:t,i(t){c||(tt(n.$$.fragment,t),c=!0)},o(t){et(n.$$.fragment,t),c=!1},d(t){st(n,t),t&&b(i),t&&b(r),t&&b(a),t&&b(l),h=!1,o(u)}}}function sn(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function rn(t,e,n){let{display_minimap:i=!1}=e,{current_result:o=null}=e,{position_marker:s=null}=e,r=[];function a(t){let e=u(ut);if(!e)return;if(function(){let t=u(ut);t&&r.forEach((function(e){t.removeLayer(e)}))}(),s){let t=Je.exports.circleMarker(s,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.addTo(e),r.push(t)}var n=new URLSearchParams(window.location.search).get("viewbox");if(n){let t=n.split(","),i=Je.exports.latLngBounds([t[1],t[0]],[t[3],t[2]]);Je.exports.rectangle(i,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let i=t.centroid?t.centroid.coordinates[1]:t.lat,o=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(i&&o){let t=Je.exports.circleMarker([i,o],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});e.addLayer(t),r.push(t)}if(a){var l=Je.exports.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),r.push(l),e.fitBounds(l.getBounds())}else i&&o&&s?e.fitBounds([[i,o],s],{padding:[50,50]}):i&&o&&e.setView([i,o],10)}return t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap),"current_result"in t&&n(2,o=t.current_result),"position_marker"in t&&n(3,s=t.position_marker)},t.$$.update=()=>{4&t.$$.dirty&&a(o)},[function(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Je.exports.map(t,{attributionControl:e&&e.length,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(Je.exports.tileLayer(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i){let t=new Je.exports.TileLayer(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Je.exports.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Je.exports.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return ut.set(e),a(o),{destroy:()=>{ut.set(null),e.remove()}}},i,o,s]}class an extends lt{constructor(t){super(),at(this,t,rn,on,r,{display_minimap:1,current_result:2,position_marker:3})}}function ln(t){let e,n;return e=new me({props:{api_request_params:t[0],bStructuredSearch:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.api_request_params=t[0]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function cn(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new ie({props:{$$slots:{default:[ln]},$$scope:{ctx:t}}});let d={reverse_search:!1};return void 0!==t[1]&&(d.current_result=t[1]),s=new Xe({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new an({props:{current_result:t[1],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function hn(t,e,n){let i,o,s;return d(t,ft,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"search"===t.tab&&function(t){Tt(),n(0,o={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.has("dedupe")&&"1"!==t.get("dedupe")?0:1,"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=o.street||o.city||o.county||o.state||o.country||o.postalcode;o.q||e?xt("search",o,(function(t){dt.set(t),Tt("Result for "+o.q),e?(document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):document.querySelector("input[name=q]").focus()})):dt.set(void 0)}(t.params)}},[o,s,undefined,i,function(t){s=t,n(1,s)}]}class un extends lt{constructor(t){super(),at(this,t,hn,cn,r,{})}}function dn(t,e,n){const i=t.slice();return i[8]=e[n],i[10]=n,i}function pn(e){let n,i,o,s,r,a=e[8]+"";return{c(){n=x("option"),i=$(e[10]),o=$(" - "),s=$(a),n.__value=r=e[10],n.value=n.__value},m(t,e){y(t,n,e),v(n,i),v(n,o),v(n,s)},p:t,d(t){t&&b(n)}}}function mn(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,$,L,P,S,O,I,N=Ee(),B=[];for(let e=0;elat',n=T(),i=x("div"),s=x("input"),r=T(),a=x("div"),l=x("a"),l.textContent="<>",c=T(),h=x("div"),h.innerHTML='',u=T(),d=x("div"),p=x("input"),m=T(),f=x("div"),f.innerHTML='',_=T(),g=x("div"),$=x("select"),L=x("option"),L.textContent="---";for(let t=0;tSearch',C(e,"class","col-auto"),C(s,"id","reverse-lat"),C(s,"name","lat"),C(s,"type","text"),C(s,"class","form-control form-control-sm d-inline svelte-1pqxd6v"),C(s,"placeholder","latitude"),C(s,"pattern","^-?\\d+(\\.\\d+)?$"),C(i,"class","col-auto"),C(l,"id","switch-coords"),C(l,"class","btn btn-outline-secondary btn-sm svelte-1pqxd6v"),C(l,"title","switch lat and lon"),C(a,"class","col-auto"),C(h,"class","col-auto"),C(p,"id","reverse-lon"),C(p,"name","lon"),C(p,"type","text"),C(p,"class","form-control form-control-sm svelte-1pqxd6v"),C(p,"placeholder","longitude"),C(p,"pattern","^-?\\d+(\\.\\d+)?$"),C(d,"class","col-auto"),C(f,"class","col-auto"),L.__value="",L.value=L.__value,C($,"id","reverse-zoom"),C($,"name","zoom"),C($,"class","form-select form-select-sm svelte-1pqxd6v"),void 0===t[2]&&F((()=>t[7].call($))),C(g,"class","col-auto"),C(S,"class","col-auto")},m(o,b){y(o,e,b),y(o,n,b),y(o,i,b),v(i,s),A(s,t[0]),y(o,r,b),y(o,a,b),v(a,l),y(o,c,b),y(o,h,b),y(o,u,b),y(o,d,b),v(d,p),A(p,t[1]),y(o,m,b),y(o,f,b),y(o,_,b),y(o,g,b),v(g,$),v($,L);for(let t=0;t{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));return t.$$set=t=>{"lat"in t&&n(0,i=t.lat),"lon"in t&&n(1,o=t.lon),"zoom"in t&&n(2,s=t.zoom)},[i,o,s,r,function(){i=this.value,n(0,i)},()=>r(o,i),function(){o=this.value,n(1,o)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(2,s)}]}class vn extends lt{constructor(t){super(),at(this,t,gn,fn,r,{lat:0,lon:1,zoom:2})}}function yn(t){let n,i;const o=[t[0]];let s={};for(let t=0;tnt(s,"current_result",u))),c=new an({props:{current_result:t[1],position_marker:t[2],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),4&n&&(a.position_marker=t[2]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function wn(t,e,n){let i,o,s,r;return d(t,ft,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"reverse"===t.tab&&(e=t.params,Tt(),n(0,o={lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),format:"jsonv2"}),o.lat||o.lat?xt("reverse",o,(function(t){t&&!t.error?(n(2,r=[o.lat,o.lon]),dt.set([t])):dt.set([]),Tt("Reverse result for "+o.lat+","+o.lon),document.querySelector("input[name=lat]").focus()})):dt.set(void 0))}var e},[o,s,r,i,function(t){s=t,n(1,s)}]}class xn extends lt{constructor(t){super(),at(this,t,wn,bn,r,{})}}function $n(e){let n,i,o,s,r,a,l,c,h,u,d;return{c(){n=x("form"),i=x("div"),o=x("div"),s=x("input"),a=T(),l=x("div"),l.innerHTML='',c=T(),h=x("small"),h.innerHTML='OSM type+id (N123, n123, W123, w123, R123, r123),\n Place id (1234) or\n URL (https://openstreetmap.org/way/123)',C(s,"type","edit"),C(s,"class","form-control form-control-sm me-1 svelte-1kvo9ki"),C(s,"pattern","^[NWRnwr]?[0-9]+$|.*openstreetmap.*"),s.value=r=""+((e[0].osmtype||"")+(e[0].osmid||"")+(e[0].place_id||"")),C(o,"class","col-auto"),C(l,"class","col-auto"),C(i,"class","row g-1"),C(n,"class","form-inline svelte-1kvo9ki"),C(n,"action","details.html"),C(h,"class","form-text text-muted svelte-1kvo9ki")},m(t,r){y(t,n,r),v(n,i),v(i,o),v(o,s),v(i,a),v(i,l),y(t,c,r),y(t,h,r),u||(d=E(n,"submit",k(e[1])),u=!0)},p(t,[e]){1&e&&r!==(r=""+((t[0].osmtype||"")+(t[0].osmid||"")+(t[0].place_id||"")))&&s.value!==r&&(s.value=r)},i:t,o:t,d(t){t&&b(n),t&&b(c),t&&b(h),u=!1,d()}}}function Ln(t,e,n){let{api_request_params:i={}}=e;return t.$$set=t=>{"api_request_params"in t&&n(0,i=t.api_request_params)},[i,function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),n=e.match(/^\s*([NWR])(\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(\d+)\s*$/);var i=new URLSearchParams;if(n)i.set("osmtype",n[1].charAt(0).toUpperCase()),i.set("osmid",n[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");i.set("place_id",e)}vt("details",i)}]}class Tn extends lt{constructor(t){super(),at(this,t,Ln,$n,r,{api_request_params:0})}}function Pn(e){let n;return{c(){n=x("span"),n.textContent="No Name",C(n,"class","noname")},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function En(t){let e,n=t[0].localname+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&S(e,n)},d(t){t&&b(e)}}}function kn(t){let e,n;return e=new kt({props:{page:"search",params_hash:{postalcode:t[0].localname},$$slots:{default:[Sn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={postalcode:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Mn(t){let e,n;return e=new kt({props:{page:"search",params_hash:{country:t[0].localname},$$slots:{default:[An]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={country:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Cn(t){let e,n;return e=new Ae({props:{feature:t[0],$$slots:{default:[zn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.feature=t[0]),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Sn(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function An(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function zn(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function On(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k=$e(t[0])+"",M=ge(t[0])+"",A=t[0].rank_address+"",z=Le(t[0].admin_level)+"",I=Te(t[0].distance,t[1])+"";function N(t,e){return t[0].localname?En:Pn}let B=N(t),D=B(t);const Z=[Cn,Mn,kn],R=[];function j(t,e){return 9&e&&(w=null),t[0].osm_id?0:(null==w&&(w=!(t[3]||!t[0].type.match(/^country/))),w?1:t[3]||"postcode"!==t[0].type?-1:2)}return~(L=j(t,-1))&&(P=R[L]=Z[L](t)),{c(){e=x("tr"),n=x("td"),D.c(),i=T(),o=x("td"),s=$(k),r=T(),a=x("td"),l=T(),c=x("td"),h=$(A),u=T(),d=x("td"),p=$(z),m=T(),f=x("td"),_=T(),g=x("td"),P&&P.c(),C(n,"class","name fw-bold svelte-6a43i0"),C(o,"class","svelte-6a43i0"),C(a,"class","svelte-6a43i0"),C(c,"class","svelte-6a43i0"),C(d,"class","svelte-6a43i0"),C(f,"class","svelte-6a43i0"),C(g,"class","svelte-6a43i0"),C(e,"class","svelte-6a43i0"),O(e,"notused",t[2]&&!t[4])},m(t,b){y(t,e,b),v(e,n),D.m(n,null),v(e,i),v(e,o),v(o,s),v(e,r),v(e,a),a.innerHTML=M,v(e,l),v(e,c),v(c,h),v(e,u),v(e,d),v(d,p),v(e,m),v(e,f),f.innerHTML=I,v(e,_),v(e,g),~L&&R[L].m(g,null),E=!0},p(t,[i]){B===(B=N(t))&&D?D.p(t,i):(D.d(1),D=B(t),D&&(D.c(),D.m(n,null))),(!E||1&i)&&k!==(k=$e(t[0])+"")&&S(s,k),(!E||1&i)&&M!==(M=ge(t[0])+"")&&(a.innerHTML=M),(!E||1&i)&&A!==(A=t[0].rank_address+"")&&S(h,A),(!E||1&i)&&z!==(z=Le(t[0].admin_level)+"")&&S(p,z),(!E||3&i)&&I!==(I=Te(t[0].distance,t[1])+"")&&(f.innerHTML=I);let o=L;L=j(t,i),L===o?~L&&R[L].p(t,i):(P&&(J(),et(R[o],1,1,(()=>{R[o]=null})),Q()),~L?(P=R[L],P?P.p(t,i):(P=R[L]=Z[L](t),P.c()),tt(P,1),P.m(g,null)):P=null),20&i&&O(e,"notused",t[2]&&!t[4])},i(t){E||(tt(P),E=!0)},o(t){et(P),E=!1},d(t){t&&b(e),D.d(),~L&&R[L].d()}}}function In(t,e,n){let i,o,{addressLine:s}=e,{bDistanceInMeters:r}=e,{bMarkUnusedLines:a=!1}=e;return t.$$set=t=>{"addressLine"in t&&n(0,s=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters),"bMarkUnusedLines"in t&&n(2,a=t.bMarkUnusedLines)},t.$$.update=()=>{1&t.$$.dirty&&n(4,i=s.isaddress)},n(3,o=Nominatim_Config.Reverse_Only),[s,r,a,o,i]}class Nn extends lt{constructor(t){super(),at(this,t,In,On,r,{addressLine:0,bDistanceInMeters:1,bMarkUnusedLines:2})}}function Bn(e){let n,i,s,r,a,l,c,h,u,d,p,m,f;return{c(){n=$("("),i=x("a"),i.textContent="how?",s=$(")\n\n"),r=x("div"),a=x("button"),a.innerHTML='',l=$("\n\n Nightly calculated from nearby places having this postcode.\n "),c=x("a"),c.textContent="Documentation",h=$(".\n You can search for those with an "),u=x("a"),d=$("Overpass Turbo query"),p=$("."),C(i,"href","#openHint"),C(a,"type","button"),C(a,"class","close svelte-yw4tm0"),C(a,"aria-label","Close"),C(c,"href","https://nominatim.org/release-docs/latest/develop/Postcodes/"),C(u,"href",e[0]),C(u,"target","_blank"),C(r,"id","postcode-hint"),C(r,"class","my-2 p-2 svelte-yw4tm0")},m(t,e){y(t,n,e),y(t,i,e),y(t,s,e),y(t,r,e),v(r,a),v(r,l),v(r,c),v(r,h),v(r,u),v(u,d),v(r,p),m||(f=[E(i,"click",M(k(Dn))),E(a,"click",M(Zn))],m=!0)},p:t,i:t,o:t,d(t){t&&b(n),t&&b(i),t&&b(s),t&&b(r),m=!1,o(f)}}}function Dn(){document.getElementById("postcode-hint").style.display="block"}function Zn(){document.getElementById("postcode-hint").style.display="none"}function Rn(t,e,n){let{postcode:i}=e,{lat:o}=e,{lon:s}=e,r=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),a="https://overpass-turbo.eu/?Q="+encodeURIComponent(r)+"&C="+encodeURIComponent([o,s,15].join(";"))+"&R";return t.$$set=t=>{"postcode"in t&&n(1,i=t.postcode),"lat"in t&&n(2,o=t.lat),"lon"in t&&n(3,s=t.lon)},[a,i,o,s]}class jn extends lt{constructor(t){super(),at(this,t,Rn,Bn,r,{postcode:1,lat:2,lon:3})}}function Hn(t){let e,n,i,o,s,r;const a=t[2].default,l=p(a,t,t[1],null);return{c(){e=x("tr"),n=x("td"),i=$(t[0]),o=T(),s=x("td"),l&&l.c(),C(n,"class","svelte-1184nr4"),C(s,"class","svelte-1184nr4")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),l&&l.m(s,null),r=!0},p(t,[e]){(!r||1&e)&&S(i,t[0]),l&&l.p&&(!r||2&e)&&_(l,a,t,t[1],r?f(a,t[1],e,null):g(t[1]),null)},i(t){r||(tt(l,t),r=!0)},o(t){et(l,t),r=!1},d(t){t&&b(e),l&&l.d(t)}}}function Wn(t,e,n){let{$$slots:i={},$$scope:o}=e,{title:s}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[s,o,i]}class Fn extends lt{constructor(t){super(),at(this,t,Wn,Hn,r,{title:0})}}function qn(t,e,n){const i=t.slice();return i[1]=e[n],i}function Un(t){let e,n,i,o,s,r,a=t[0][t[1]]+"",l=t[1]+"";return{c(){e=x("div"),n=x("span"),i=$(a),o=$(" ("),s=$(l),r=$(")\n "),C(n,"class","name svelte-ndknvb"),C(e,"class","line")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),v(e,r)},p(t,e){1&e&&a!==(a=t[0][t[1]]+"")&&S(i,a),1&e&&l!==(l=t[1]+"")&&S(s,l)},d(t){t&&b(e)}}}function Vn(e){let n,i=Object.keys(e[0]),o=[];for(let t=0;t{"items"in t&&n(0,i=t.items)},[i]}class Gn extends lt{constructor(t){super(),at(this,t,Kn,Vn,r,{items:0})}}function Yn(t,e,n){const i=t.slice();return i[7]=e[n],i}function Xn(t,e,n){const i=t.slice();return i[10]=e[n],i}function Jn(t,e,n){const i=t.slice();return i[13]=e[n],i}function Qn(t,e,n){const i=t.slice();return i[13]=e[n],i}function ti(t,e,n){const i=t.slice();return i[18]=e[n],i}function ei(t,e,n){const i=t.slice();return i[18]=e[n],i}function ni(t){let e,n;return e=new Tn({props:{api_request_params:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};4&n&&(i.api_request_params=t[2]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ii(e){let n;return{c(){n=$("No such place found.")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function oi(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M,A,z,O,I,N,B,D,Z,R,j,H,W,F,q,U,V,K,G,Y,X,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt=(t[0].localname||`${_e(t[0].osm_type)} ${t[0].osm_id}`)+"",Tt=we(t[0]);a=new Ae({props:{feature:t[0],$$slots:{default:[si]},$$scope:{ctx:t}}}),h=new Ze({props:{aPlace:t[0]}}),_=new Fn({props:{title:"Name",$$slots:{default:[li]},$$scope:{ctx:t}}}),w=new Fn({props:{title:"Type",$$slots:{default:[ci]},$$scope:{ctx:t}}}),P=new Fn({props:{title:"Last Updated",$$slots:{default:[hi]},$$scope:{ctx:t}}});let Pt=Tt&&ui(t);M=new Fn({props:{title:"Search Rank",$$slots:{default:[pi]},$$scope:{ctx:t}}}),z=new Fn({props:{title:"Address Rank",$$slots:{default:[mi]},$$scope:{ctx:t}}});let Et=t[0].calculated_importance&&fi(t);N=new Fn({props:{title:"Coverage",$$slots:{default:[vi]},$$scope:{ctx:t}}}),D=new Fn({props:{title:"Centre Point (lat,lon)",$$slots:{default:[yi]},$$scope:{ctx:t}}}),R=new Fn({props:{title:"OSM",$$slots:{default:[bi]},$$scope:{ctx:t}}}),H=new Fn({props:{title:"Place Id",$$slots:{default:[wi]},$$scope:{ctx:t}}});let kt=t[0].calculated_wikipedia&&xi(t);q=new Fn({props:{title:"Computed Postcode",$$slots:{default:[Ti]},$$scope:{ctx:t}}}),V=new Fn({props:{title:"Address Tags",$$slots:{default:[Pi]},$$scope:{ctx:t}}}),G=new Fn({props:{title:"Extra Tags",$$slots:{default:[Ei]},$$scope:{ctx:t}}}),rt=new an({props:{current_result:t[0]}});let Mt=t[0].address&&ki(t),Ct=t[0].linked_places&&Ci(t),St=!t[4]&&Ai(t);const At=[Wi,Hi],zt=[];function Ot(t,e){return t[2].hierarchy?0:1}return wt=Ot(t),xt=zt[wt]=At[wt](t),{c(){e=x("div"),n=x("div"),i=x("h1"),o=$(Lt),s=T(),r=x("small"),it(a.$$.fragment),l=T(),c=x("div"),it(h.$$.fragment),u=T(),d=x("div"),p=x("div"),m=x("table"),f=x("tbody"),it(_.$$.fragment),g=T(),it(w.$$.fragment),L=T(),it(P.$$.fragment),E=T(),Pt&&Pt.c(),k=T(),it(M.$$.fragment),A=T(),it(z.$$.fragment),O=T(),Et&&Et.c(),I=T(),it(N.$$.fragment),B=T(),it(D.$$.fragment),Z=T(),it(R.$$.fragment),j=T(),it(H.$$.fragment),W=T(),kt&&kt.c(),F=T(),it(q.$$.fragment),U=T(),it(V.$$.fragment),K=T(),it(G.$$.fragment),Y=T(),X=x("div"),nt=x("div"),it(rt.$$.fragment),at=T(),lt=x("div"),ct=x("div"),ht=x("h2"),ht.textContent="Address",ut=T(),dt=x("table"),pt=x("thead"),pt.innerHTML="Local name \n Type \n OSM \n Address rank \n Admin level \n Distance \n ",mt=T(),ft=x("tbody"),Mt&&Mt.c(),_t=T(),Ct&&Ct.c(),gt=T(),St&&St.c(),vt=T(),yt=x("tr"),yt.innerHTML='

Parent Of

',bt=T(),xt.c(),C(r,"class","svelte-dl2ttu"),C(i,"class","svelte-dl2ttu"),C(n,"class","col-sm-10"),C(c,"class","col-sm-2 text-end"),C(e,"class","row"),C(m,"id","locationdetails"),C(m,"class","table table-striped table-responsive"),C(p,"class","col-md-6"),C(nt,"id","map-wrapper"),C(nt,"class","svelte-dl2ttu"),C(X,"class","col-md-6"),C(d,"class","row"),C(ht,"class","svelte-dl2ttu"),C(yt,"class","all-columns svelte-dl2ttu"),C(dt,"id","address"),C(dt,"class","table table-striped table-small"),C(ct,"class","col-md-12"),C(lt,"class","row")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(i,o),v(i,s),v(i,r),ot(a,r,null),v(e,l),v(e,c),ot(h,c,null),y(t,u,b),y(t,d,b),v(d,p),v(p,m),v(m,f),ot(_,f,null),v(f,g),ot(w,f,null),v(f,L),ot(P,f,null),v(f,E),Pt&&Pt.m(f,null),v(f,k),ot(M,f,null),v(f,A),ot(z,f,null),v(f,O),Et&&Et.m(f,null),v(f,I),ot(N,f,null),v(f,B),ot(D,f,null),v(f,Z),ot(R,f,null),v(f,j),ot(H,f,null),v(f,W),kt&&kt.m(f,null),v(f,F),ot(q,f,null),v(f,U),ot(V,f,null),v(f,K),ot(G,f,null),v(d,Y),v(d,X),v(X,nt),ot(rt,nt,null),y(t,at,b),y(t,lt,b),v(lt,ct),v(ct,ht),v(ct,ut),v(ct,dt),v(dt,pt),v(dt,mt),v(dt,ft),Mt&&Mt.m(ft,null),v(ft,_t),Ct&&Ct.m(ft,null),v(ft,gt),St&&St.m(ft,null),v(ft,vt),v(ft,yt),v(ft,bt),zt[wt].m(ft,null),$t=!0},p(t,e){(!$t||1&e)&&Lt!==(Lt=(t[0].localname||`${_e(t[0].osm_type)} ${t[0].osm_id}`)+"")&&S(o,Lt);const n={};1&e&&(n.feature=t[0]),8388608&e&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e&&(i.aPlace=t[0]),h.$set(i);const s={};8388609&e&&(s.$$scope={dirty:e,ctx:t}),_.$set(s);const r={};8388609&e&&(r.$$scope={dirty:e,ctx:t}),w.$set(r);const l={};8388609&e&&(l.$$scope={dirty:e,ctx:t}),P.$set(l),1&e&&(Tt=we(t[0])),Tt?Pt?(Pt.p(t,e),1&e&&tt(Pt,1)):(Pt=ui(t),Pt.c(),tt(Pt,1),Pt.m(f,k)):Pt&&(J(),et(Pt,1,1,(()=>{Pt=null})),Q());const c={};8388609&e&&(c.$$scope={dirty:e,ctx:t}),M.$set(c);const u={};8388609&e&&(u.$$scope={dirty:e,ctx:t}),z.$set(u),t[0].calculated_importance?Et?(Et.p(t,e),1&e&&tt(Et,1)):(Et=fi(t),Et.c(),tt(Et,1),Et.m(f,I)):Et&&(J(),et(Et,1,1,(()=>{Et=null})),Q());const d={};8388609&e&&(d.$$scope={dirty:e,ctx:t}),N.$set(d);const p={};8388609&e&&(p.$$scope={dirty:e,ctx:t}),D.$set(p);const m={};8388609&e&&(m.$$scope={dirty:e,ctx:t}),R.$set(m);const g={};8388609&e&&(g.$$scope={dirty:e,ctx:t}),H.$set(g),t[0].calculated_wikipedia?kt?(kt.p(t,e),1&e&&tt(kt,1)):(kt=xi(t),kt.c(),tt(kt,1),kt.m(f,F)):kt&&(J(),et(kt,1,1,(()=>{kt=null})),Q());const v={};8388609&e&&(v.$$scope={dirty:e,ctx:t}),q.$set(v);const y={};8388609&e&&(y.$$scope={dirty:e,ctx:t}),V.$set(y);const b={};8388609&e&&(b.$$scope={dirty:e,ctx:t}),G.$set(b);const x={};1&e&&(x.current_result=t[0]),rt.$set(x),t[0].address?Mt?(Mt.p(t,e),1&e&&tt(Mt,1)):(Mt=ki(t),Mt.c(),tt(Mt,1),Mt.m(ft,_t)):Mt&&(J(),et(Mt,1,1,(()=>{Mt=null})),Q()),t[0].linked_places?Ct?(Ct.p(t,e),1&e&&tt(Ct,1)):(Ct=Ci(t),Ct.c(),tt(Ct,1),Ct.m(ft,gt)):Ct&&(J(),et(Ct,1,1,(()=>{Ct=null})),Q()),t[4]?St&&(St.d(1),St=null):St?St.p(t,e):(St=Ai(t),St.c(),St.m(ft,vt));let $=wt;wt=Ot(t),wt===$?zt[wt].p(t,e):(J(),et(zt[$],1,1,(()=>{zt[$]=null})),Q(),xt=zt[wt],xt?xt.p(t,e):(xt=zt[wt]=At[wt](t),xt.c()),tt(xt,1),xt.m(ft,null))},i(t){$t||(tt(a.$$.fragment,t),tt(h.$$.fragment,t),tt(_.$$.fragment,t),tt(w.$$.fragment,t),tt(P.$$.fragment,t),tt(Pt),tt(M.$$.fragment,t),tt(z.$$.fragment,t),tt(Et),tt(N.$$.fragment,t),tt(D.$$.fragment,t),tt(R.$$.fragment,t),tt(H.$$.fragment,t),tt(kt),tt(q.$$.fragment,t),tt(V.$$.fragment,t),tt(G.$$.fragment,t),tt(rt.$$.fragment,t),tt(Mt),tt(Ct),tt(xt),$t=!0)},o(t){et(a.$$.fragment,t),et(h.$$.fragment,t),et(_.$$.fragment,t),et(w.$$.fragment,t),et(P.$$.fragment,t),et(Pt),et(M.$$.fragment,t),et(z.$$.fragment,t),et(Et),et(N.$$.fragment,t),et(D.$$.fragment,t),et(R.$$.fragment,t),et(H.$$.fragment,t),et(kt),et(q.$$.fragment,t),et(V.$$.fragment,t),et(G.$$.fragment,t),et(rt.$$.fragment,t),et(Mt),et(Ct),et(xt),$t=!1},d(t){t&&b(e),st(a),st(h),t&&b(u),t&&b(d),st(_),st(w),st(P),Pt&&Pt.d(),st(M),st(z),Et&&Et.d(),st(N),st(D),st(R),st(H),kt&&kt.d(),st(q),st(V),st(G),st(rt),t&&b(at),t&&b(lt),Mt&&Mt.d(),Ct&&Ct.d(),St&&St.d(),zt[wt].d()}}}function si(t){let e;return{c(){e=$("link to this page")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function ri(t){let e,n;return e=new Gn({props:{items:t[0].names}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].names),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ai(e){let n;return{c(){n=x("span"),n.textContent="No Name",C(n,"class","noname fw-bold")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function li(t){let e,n,i,o,s;const r=[ai,ri],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!!Array.isArray(t[0].names)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function ci(t){let e,n,i,o=t[0].category+"",s=t[0].type+"";return{c(){e=$(o),n=$(":"),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].category+"")&&S(e,o),1&n&&s!==(s=t[0].type+"")&&S(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function hi(t){let e,n=t[0].indexed_date+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].indexed_date+"")&&S(e,n)},d(t){t&&b(e)}}}function ui(t){let e,n;return e=new Fn({props:{title:"Admin Level",$$slots:{default:[di]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function di(t){let e,n=t[0].admin_level+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].admin_level+"")&&S(e,n)},d(t){t&&b(e)}}}function pi(t){let e,n=t[0].rank_search+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].rank_search+"")&&S(e,n)},d(t){t&&b(e)}}}function mi(t){let e,n,i,o,s=t[0].rank_address+"",r=xe(t[0].rank_address)+"";return{c(){e=$(s),n=$(" ("),i=$(r),o=$(")")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].rank_address+"")&&S(e,s),1&n&&r!==(r=xe(t[0].rank_address)+"")&&S(i,r)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function fi(t){let e,n;return e=new Fn({props:{title:"Importance",$$slots:{default:[gi]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function _i(t){let e;return{c(){e=$("(estimated)")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function gi(t){let e,n,i,o=t[0].calculated_importance+"",s=!t[0].importance&&_i();return{c(){e=$(o),n=T(),s&&s.c(),i=P()},m(t,o){y(t,e,o),y(t,n,o),s&&s.m(t,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].calculated_importance+"")&&S(e,o),t[0].importance?s&&(s.d(1),s=null):s||(s=_i(),s.c(),s.m(i.parentNode,i))},d(t){t&&b(e),t&&b(n),s&&s.d(t),t&&b(i)}}}function vi(t){let e,n=be(t[0])+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=be(t[0])+"")&&S(e,n)},d(t){t&&b(e)}}}function yi(t){let e,n,i,o=t[0].centroid.coordinates[1]+"",s=t[0].centroid.coordinates[0]+"";return{c(){e=$(o),n=$(","),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].centroid.coordinates[1]+"")&&S(e,o),1&n&&s!==(s=t[0].centroid.coordinates[0]+"")&&S(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function bi(t){let e,n,i=ge(t[0])+"";return{c(){e=new I,n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=ge(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function wi(t){let e,n,i,o,s=t[0].place_id+"";return{c(){e=$(s),n=$("\n ("),i=x("a"),i.textContent="on this server",o=$(")"),C(i,"href","https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].place_id+"")&&S(e,s)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function xi(t){let e,n;return e=new Fn({props:{title:"Wikipedia Calculated",$$slots:{default:[$i]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function $i(t){let e,n,i=ye(t[0])+"";return{c(){e=new I,n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=ye(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function Li(t){let e,n,i,o,s=t[0].calculated_postcode+"";return i=new jn({props:{postcode:t[0].calculated_postcode,lat:t[0].centroid.coordinates[1],lon:t[0].centroid.coordinates[0]}}),{c(){e=$(s),n=T(),it(i.$$.fragment)},m(t,s){y(t,e,s),y(t,n,s),ot(i,t,s),o=!0},p(t,n){(!o||1&n)&&s!==(s=t[0].calculated_postcode+"")&&S(e,s);const r={};1&n&&(r.postcode=t[0].calculated_postcode),1&n&&(r.lat=t[0].centroid.coordinates[1]),1&n&&(r.lon=t[0].centroid.coordinates[0]),i.$set(r)},i(t){o||(tt(i.$$.fragment,t),o=!0)},o(t){et(i.$$.fragment,t),o=!1},d(t){t&&b(e),t&&b(n),st(i,t)}}}function Ti(t){let e,n,i=t[0].calculated_postcode&&Li(t);return{c(){i&&i.c(),e=P()},m(t,o){i&&i.m(t,o),y(t,e,o),n=!0},p(t,n){t[0].calculated_postcode?i?(i.p(t,n),1&n&&tt(i,1)):(i=Li(t),i.c(),tt(i,1),i.m(e.parentNode,e)):i&&(J(),et(i,1,1,(()=>{i=null})),Q())},i(t){n||(tt(i),n=!0)},o(t){et(i),n=!1},d(t){i&&i.d(t),t&&b(e)}}}function Pi(t){let e,n;return e=new Gn({props:{items:t[0].addresstags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].addresstags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ei(t){let e,n;return e=new Gn({props:{items:t[0].extratags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].extratags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ki(t){let e,n,i=t[0].address,o=[];for(let e=0;eet(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;tet(r[t],1,1,(()=>{r[t]=null}));return{c(){e=x("tr"),e.innerHTML='

Linked Places

',n=T();for(let t=0;t

Keywords

',n=T(),r.c(),i=P(),C(e,"class","all-columns svelte-dl2ttu")},m(t,o){y(t,e,o),y(t,n,o),r.m(t,o),y(t,i,o)},p(t,e){s===(s=o(t))&&r?r.p(t,e):(r.d(1),r=s(t),r&&(r.c(),r.m(i.parentNode,i)))},d(t){t&&b(e),t&&b(n),r.d(t),t&&b(i)}}}function zi(t){let e,n,i,o,s;return{c(){e=x("tr"),n=x("td"),i=x("a"),o=$("display keywords"),C(i,"class","btn btn-outline-secondary btn-sm"),C(i,"href",s=t[1]+"&keywords=1")},m(t,s){y(t,e,s),v(e,n),v(n,i),v(i,o)},p(t,e){2&e&&s!==(s=t[1]+"&keywords=1")&&C(i,"href",s)},d(t){t&&b(e)}}}function Oi(t){let e,n;function i(t,n){var i;return 1&n&&(e=null),null==e&&(i=t[0],e=!!(i.keywords&&i.keywords.name&&i.keywords.address&&(i.keywords.name.length>0||i.keywords.address.length>0))),e?Ni:Ii}let o=i(t,-1),s=o(t);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o===(o=i(t,e))&&s?s.p(t,e):(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},d(t){s.d(t),t&&b(n)}}}function Ii(e){let n;return{c(){n=x("tr"),n.innerHTML="Place has no keywords"},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function Ni(t){let e,n,i,o,s=t[0].keywords.name,r=[];for(let e=0;e

Name Keywords

',n=T();for(let t=0;t

Address Keywords

',n=T();for(let t=0;t{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function Fi(e){let n;return{c(){n=x("tr"),n.innerHTML="Place is not parent of other places"},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function qi(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,s=Object.keys(t[0].hierarchy),r=[];for(let e=0;eet(r[t],1,1,(()=>{r[t]=null}));let l=o&&Ki();return{c(){for(let t=0;t500),o?l||(l=Ki(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;tet(h[t],1,1,(()=>{h[t]=null}));return{c(){e=x("tr"),n=x("td"),i=x("h3"),o=$(l),s=T();for(let t=0;t{l[h]=null})),Q()),~o?(s=l[o],s?s.p(t,n):(s=l[o]=a[o](t),s.c()),tt(s,1),s.m(i,null)):s=null)},i(t){r||(tt(e.$$.fragment,t),tt(s),r=!0)},o(t){et(e.$$.fragment,t),et(s),r=!1},d(t){st(e,t),t&&b(n),t&&b(i),~o&&l[o].d()}}}function Yi(t,e,n){let i,o,s,r,a;d(t,ft,(t=>n(5,o=t)));let l=!1;return t.$$.update=()=>{if(32&t.$$.dirty){let t=o;"details"===t.tab&&(e=t.params,n(2,a={place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),n(3,l=!1),a.place_id||a.osmtype&&a.osmid?(a.place_id?Tt("Details for "+a.place_id):Tt("Details for "+a.osmtype+a.osmid),xt("details",a,(function(t){window.scrollTo(0,0),n(3,l=!0),n(0,s=t&&!t.error?t:void 0)}))):n(0,s=void 0),n(1,r=window.location.search))}var e},n(4,i=Nominatim_Config.Reverse_Only),[s,r,a,l,i,o]}class Xi extends lt{constructor(t){super(),at(this,t,Yi,Gi,r,{})}}function Ji(t,e,n){const i=t.slice();return i[2]=e[n],i}function Qi(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,E,k,M,A,z,O,I,N,B,D=t[2].osm_type+"",Z=ge(t[2])+"",R=t[2].class+"",j=t[2].type+"",H=t[2].name+"",W=(t[2].country_code||"")+"",F=t[2].errormessage+"",q=t[2].updated+"";return{c(){e=x("tr"),n=x("td"),i=$(D),o=T(),s=x("td"),r=T(),a=x("td"),l=$(R),c=T(),h=x("td"),u=$(j),d=T(),p=x("td"),m=$(H),f=T(),_=x("td"),g=$(W),w=T(),L=x("td"),P=$(F),E=T(),k=x("td"),M=$(q),A=T(),z=x("td"),O=x("a"),I=$("josm"),B=T(),C(O,"href",N="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+_e(t[2].osm_type)+"/"+t[2].osm_id+"/full"),C(O,"target","josm")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(e,o),v(e,s),s.innerHTML=Z,v(e,r),v(e,a),v(a,l),v(e,c),v(e,h),v(h,u),v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,E),v(e,k),v(k,M),v(e,A),v(e,z),v(z,O),v(O,I),v(e,B)},p(t,e){1&e&&D!==(D=t[2].osm_type+"")&&S(i,D),1&e&&Z!==(Z=ge(t[2])+"")&&(s.innerHTML=Z),1&e&&R!==(R=t[2].class+"")&&S(l,R),1&e&&j!==(j=t[2].type+"")&&S(u,j),1&e&&H!==(H=t[2].name+"")&&S(m,H),1&e&&W!==(W=(t[2].country_code||"")+"")&&S(g,W),1&e&&F!==(F=t[2].errormessage+"")&&S(P,F),1&e&&q!==(q=t[2].updated+"")&&S(M,q),1&e&&N!==(N="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+_e(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&C(O,"href",N)},d(t){t&&b(e)}}}function to(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,L=t[0].length+"";e=new ie({});let P=t[0],E=[];for(let e=0;eOSM type \n OSM id \n Class \n Type \n Name \n Country Code \n Error message \n Updated \n ",f=T(),_=x("tbody");for(let t=0;tet(P[t],1,1,(()=>{P[t]=null}));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Deletable",a=T(),l=x("p"),c=$(g),h=$(" objects have been deleted in OSM but are still in the Nominatim database."),u=T(),d=x("table"),p=x("thead"),p.innerHTML="Place id \n Country Code \n Name \n OSM id \n OSM type \n Class \n Type",m=T(),f=x("tbody");for(let t=0;t{Lt("theme/about-help.html",document.getElementById("about-help"))})),[]}class fo extends lt{constructor(t){super(),at(this,t,mo,po,r,{})}}function _o(t){let e,n;return e=new fo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function go(t){let e,n;return e=new uo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function vo(t){let e,n;return e=new no({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function yo(t){let e,n;return e=new lo({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function bo(t){let e,n;return e=new Xi({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function wo(t){let e,n;return e=new xn({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xo(t){let e,n;return e=new un({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function $o(t){let e,n,i,o,s,r,a;const l=[xo,wo,bo,yo,vo,go,_o],c=[];function h(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:"status"===t[0]?5:"about"===t[0]?6:-1}return~(e=h(t))&&(n=c[e]=l[e](t)),o=new bt({}),{c(){n&&n.c(),i=T(),it(o.$$.fragment)},m(n,l){~e&&c[e].m(n,l),y(n,i,l),ot(o,n,l),s=!0,r||(a=E(window,"popstate",t[2]),r=!0)},p(t,[o]){let s=e;e=h(t),e!==s&&(n&&(J(),et(c[s],1,1,(()=>{c[s]=null})),Q()),~e?(n=c[e],n||(n=c[e]=l[e](t),n.c()),tt(n,1),n.m(i.parentNode,i)):n=null)},i(t){s||(tt(n),tt(o.$$.fragment,t),s=!0)},o(t){et(n),et(o.$$.fragment,t),s=!1},d(t){~e&&c[e].d(t),t&&b(i),st(o,t),r=!1,a()}}}function Lo(t,e,n){let i,o;d(t,ft,(t=>n(1,o=t))),vt();return t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o,()=>vt()]}new class extends lt{constructor(t){super(),at(this,t,Lo,$o,r,{})}}({target:document.body})}(); //# sourceMappingURL=bundle.js.map diff --git a/dist/build/bundle.js.map b/dist/build/bundle.js.map index be58f08..e13b402 100644 --- a/dist/build/bundle.js.map +++ b/dist/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../.yarn/cache/svelte-npm-3.46.4-01ad7797d1-a702b4216e.zip/node_modules/svelte/internal/index.mjs","../../.yarn/$$virtual/bootstrap-virtual-92acbd27a6/0/cache/bootstrap-npm-5.1.3-691fdc19a6-7d5d67897c.zip/node_modules/bootstrap/dist/js/bootstrap.bundle.js","../../.yarn/cache/svelte-npm-3.46.4-01ad7797d1-a702b4216e.zip/node_modules/svelte/store/index.mjs","../../src/lib/stores.js","../../src/components/Footer.svelte","../../src/lib/api_utils.js","../../src/components/PageLink.svelte","../../src/components/ReverseLink.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/en_US.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/zh_CN.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/register.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/utils/date.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/format.js","../../src/components/LastUpdated.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/index.js","../../src/components/Error.svelte","../../src/components/Header.svelte","../../src/components/UrlSubmitForm.svelte","../../src/components/SearchSection.svelte","../../.yarn/cache/escape-html-npm-1.0.3-376c22ee74-900a7f2b80.zip/node_modules/escape-html/index.js","../../src/lib/helpers.js","../../src/components/DetailsLink.svelte","../../src/components/Welcome.svelte","../../src/components/MapIcon.svelte","../../src/components/ResultsList.svelte","../../.yarn/cache/leaflet-npm-1.7.1-dc40ced5a1-7a841174dc.zip/node_modules/leaflet/dist/leaflet-src.js","../../src/components/MapPosition.svelte","../../.yarn/cache/leaflet-minimap-npm-3.6.1-945fa818a3-ac48b72b86.zip/node_modules/leaflet-minimap/dist/Control.MiniMap.min.js","../../src/components/Map.svelte","../../src/pages/SearchPage.svelte","../../src/components/SearchSectionReverse.svelte","../../src/pages/ReversePage.svelte","../../src/components/SearchSectionDetails.svelte","../../src/components/DetailsOneRow.svelte","../../src/components/DetailsPostcodeHint.svelte","../../src/components/DetailsInfoRow.svelte","../../src/components/DetailsInfoRowList.svelte","../../src/pages/DetailsPage.svelte","../../src/pages/PolygonsPage.svelte","../../src/pages/DeletablePage.svelte","../../src/pages/StatusPage.svelte","../../src/pages/AboutPage.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration();\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, bubbles = false) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor() {\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes) {\n super();\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { stylesheet } = info;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n info.rules = {};\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true && boolean_attributes.has(name) ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.46.4' }, detail), true));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","/*!\n * Bootstrap v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());\n})(this, (function () { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const MAX_UID = 1000000;\n const MILLISECONDS_MULTIPLIER = 1000;\n const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n\n const toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`;\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase();\n };\n /**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n\n const getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n };\n\n const getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`;\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;\n }\n\n return selector;\n };\n\n const getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n };\n\n const getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n };\n\n const getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n };\n\n const triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n };\n\n const isElement$1 = obj => {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0];\n }\n\n return typeof obj.nodeType !== 'undefined';\n };\n\n const getElement = obj => {\n if (isElement$1(obj)) {\n // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj;\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return document.querySelector(obj);\n }\n\n return null;\n };\n\n const typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = value && isElement$1(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n });\n };\n\n const isVisible = element => {\n if (!isElement$1(element) || element.getClientRects().length === 0) {\n return false;\n }\n\n return getComputedStyle(element).getPropertyValue('visibility') === 'visible';\n };\n\n const isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n };\n\n const findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n };\n\n const noop = () => {};\n /**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\n\n\n const reflow = element => {\n // eslint-disable-next-line no-unused-expressions\n element.offsetHeight;\n };\n\n const getjQuery = () => {\n const {\n jQuery\n } = window;\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery;\n }\n\n return null;\n };\n\n const DOMContentLoadedCallbacks = [];\n\n const onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n DOMContentLoadedCallbacks.forEach(callback => callback());\n });\n }\n\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n };\n\n const isRTL = () => document.documentElement.dir === 'rtl';\n\n const defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n };\n\n const execute = callback => {\n if (typeof callback === 'function') {\n callback();\n }\n };\n\n const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n };\n /**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\n\n\n const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed\n\n if (index === -1) {\n return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];\n }\n\n const listLength = list.length;\n index += shouldGetNext ? 1 : -1;\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))];\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\n const stripNameRegex = /\\..*/;\n const stripUidRegex = /::\\d+$/;\n const eventRegistry = {}; // Events storage\n\n let uidEvent = 1;\n const customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n };\n const customEventsRegex = /^(mouseenter|mouseleave)/i;\n const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n /**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\n function getUidEvent(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n }\n\n function getEvent(element) {\n const uid = getUidEvent(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n }\n\n function bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element;\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n }\n\n function bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target;\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n } // To please ESLint\n\n\n return null;\n };\n }\n\n function findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events);\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]];\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event;\n }\n }\n\n return null;\n }\n\n function normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string';\n const originalHandler = delegation ? delegationFn : handler;\n let typeEvent = getTypeEvent(originalTypeEvent);\n const isNative = nativeEvents.has(typeEvent);\n\n if (!isNative) {\n typeEvent = originalTypeEvent;\n }\n\n return [delegation, originalHandler, typeEvent];\n }\n\n function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n if (!handler) {\n handler = delegationFn;\n delegationFn = null;\n } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n\n\n if (customEventsRegex.test(originalTypeEvent)) {\n const wrapFn = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n\n if (delegationFn) {\n delegationFn = wrapFn(delegationFn);\n } else {\n handler = wrapFn(handler);\n }\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);\n const events = getEvent(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff;\n return;\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);\n fn.delegationSelector = delegation ? handler : null;\n fn.originalHandler = originalHandler;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, delegation);\n }\n\n function removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n }\n\n function removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(handlerKey => {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n }\n\n function getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n }\n\n const EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false);\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getEvent(element);\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return;\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);\n return;\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(elementEvent => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n });\n }\n\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(keyHandlers => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n const isNative = nativeEvents.has(typeEvent);\n let jQueryEvent;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n let evt = null;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents');\n evt.initEvent(typeEvent, bubbles, true);\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true\n });\n } // merge custom information in our event\n\n\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(key => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key];\n }\n\n });\n });\n }\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n const elementMap = new Map();\n const Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const VERSION = '5.1.3';\n\n class BaseComponent {\n constructor(element) {\n element = getElement(element);\n\n if (!element) {\n return;\n }\n\n this._element = element;\n Data.set(this._element, this.constructor.DATA_KEY, this);\n }\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n Object.getOwnPropertyNames(this).forEach(propertyName => {\n this[propertyName] = null;\n });\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated);\n }\n /** Static */\n\n\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY);\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n const enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n\n instance[method]();\n });\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$d = 'alert';\n const DATA_KEY$c = 'bs.alert';\n const EVENT_KEY$c = `.${DATA_KEY$c}`;\n const EVENT_CLOSE = `close${EVENT_KEY$c}`;\n const EVENT_CLOSED = `closed${EVENT_KEY$c}`;\n const CLASS_NAME_FADE$5 = 'fade';\n const CLASS_NAME_SHOW$8 = 'show';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$d;\n } // Public\n\n\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);\n\n if (closeEvent.defaultPrevented) {\n return;\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW$8);\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);\n\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated);\n } // Private\n\n\n _destroyElement() {\n this._element.remove();\n\n EventHandler.trigger(this._element, EVENT_CLOSED);\n this.dispose();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n enableDismissTrigger(Alert, 'close');\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Alert);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$c = 'button';\n const DATA_KEY$b = 'bs.button';\n const EVENT_KEY$b = `.${DATA_KEY$b}`;\n const DATA_API_KEY$7 = '.data-api';\n const CLASS_NAME_ACTIVE$3 = 'active';\n const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\n const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`;\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$c;\n } // Public\n\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this);\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n const data = Button.getOrCreateInstance(button);\n data.toggle();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Button);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n function normalizeData(val) {\n if (val === 'true') {\n return true;\n }\n\n if (val === 'false') {\n return false;\n }\n\n if (val === Number(val).toString()) {\n return Number(val);\n }\n\n if (val === '' || val === 'null') {\n return null;\n }\n\n return val;\n }\n\n function normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n }\n\n const Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n });\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect();\n return {\n top: rect.top + window.pageYOffset,\n left: rect.left + window.pageXOffset\n };\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n };\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const NODE_TEXT = 3;\n const SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode;\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (ancestor.matches(selector)) {\n parents.push(ancestor);\n }\n\n ancestor = ancestor.parentNode;\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(', ');\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$b = 'carousel';\n const DATA_KEY$a = 'bs.carousel';\n const EVENT_KEY$a = `.${DATA_KEY$a}`;\n const DATA_API_KEY$6 = '.data-api';\n const ARROW_LEFT_KEY = 'ArrowLeft';\n const ARROW_RIGHT_KEY = 'ArrowRight';\n const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n const SWIPE_THRESHOLD = 40;\n const Default$a = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n };\n const DefaultType$a = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n };\n const ORDER_NEXT = 'next';\n const ORDER_PREV = 'prev';\n const DIRECTION_LEFT = 'left';\n const DIRECTION_RIGHT = 'right';\n const KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY]: DIRECTION_LEFT\n };\n const EVENT_SLIDE = `slide${EVENT_KEY$a}`;\n const EVENT_SLID = `slid${EVENT_KEY$a}`;\n const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`;\n const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`;\n const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`;\n const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`;\n const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`;\n const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`;\n const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`;\n const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`;\n const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`;\n const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`;\n const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;\n const CLASS_NAME_CAROUSEL = 'carousel';\n const CLASS_NAME_ACTIVE$2 = 'active';\n const CLASS_NAME_SLIDE = 'slide';\n const CLASS_NAME_END = 'carousel-item-end';\n const CLASS_NAME_START = 'carousel-item-start';\n const CLASS_NAME_NEXT = 'carousel-item-next';\n const CLASS_NAME_PREV = 'carousel-item-prev';\n const CLASS_NAME_POINTER_EVENT = 'pointer-event';\n const SELECTOR_ACTIVE$1 = '.active';\n const SELECTOR_ACTIVE_ITEM = '.active.carousel-item';\n const SELECTOR_ITEM = '.carousel-item';\n const SELECTOR_ITEM_IMG = '.carousel-item img';\n const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';\n const SELECTOR_INDICATORS = '.carousel-indicators';\n const SELECTOR_INDICATOR = '[data-bs-target]';\n const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\n const SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\n const POINTER_TYPE_TOUCH = 'touch';\n const POINTER_TYPE_PEN = 'pen';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Carousel extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._items = null;\n this._interval = null;\n this._activeElement = null;\n this._isPaused = false;\n this._isSliding = false;\n this.touchTimeout = null;\n this.touchStartX = 0;\n this.touchDeltaX = 0;\n this._config = this._getConfig(config);\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n this._pointerEvent = Boolean(window.PointerEvent);\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$a;\n }\n\n static get NAME() {\n return NAME$b;\n } // Public\n\n\n next() {\n this._slide(ORDER_NEXT);\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n\n prev() {\n this._slide(ORDER_PREV);\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true;\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element);\n this.cycle(true);\n }\n\n clearInterval(this._interval);\n this._interval = null;\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false;\n }\n\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval();\n\n this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n const activeIndex = this._getItemIndex(this._activeElement);\n\n if (index > this._items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n\n if (activeIndex === index) {\n this.pause();\n this.cycle();\n return;\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n\n this._slide(order, this._items[index]);\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$a,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$b, config, DefaultType$a);\n return config;\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX);\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return;\n }\n\n const direction = absDeltax / this.touchDeltaX;\n this.touchDeltaX = 0;\n\n if (!direction) {\n return;\n }\n\n this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event));\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners();\n }\n }\n\n _addTouchEventListeners() {\n const hasPointerPenTouch = event => {\n return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);\n };\n\n const start = event => {\n if (hasPointerPenTouch(event)) {\n this.touchStartX = event.clientX;\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX;\n }\n };\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;\n };\n\n const end = event => {\n if (hasPointerPenTouch(event)) {\n this.touchDeltaX = event.clientX - this.touchStartX;\n }\n\n this._handleSwipe();\n\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n this.pause();\n\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n }\n };\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {\n EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault());\n });\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => end(event));\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event));\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n const direction = KEY_TO_DIRECTION[event.key];\n\n if (direction) {\n event.preventDefault();\n\n this._slide(direction);\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];\n return this._items.indexOf(element);\n }\n\n _getItemByOrder(order, activeElement) {\n const isNext = order === ORDER_NEXT;\n return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap);\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget);\n\n const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n });\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);\n\n for (let i = 0; i < indicators.length; i++) {\n if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {\n indicators[i].classList.add(CLASS_NAME_ACTIVE$2);\n indicators[i].setAttribute('aria-current', 'true');\n break;\n }\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n if (!element) {\n return;\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval;\n this._config.interval = elementInterval;\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval;\n }\n }\n\n _slide(directionOrOrder, element) {\n const order = this._directionToOrder(directionOrOrder);\n\n const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n const activeElementIndex = this._getItemIndex(activeElement);\n\n const nextElement = element || this._getItemByOrder(order, activeElement);\n\n const nextElementIndex = this._getItemIndex(nextElement);\n\n const isCycling = Boolean(this._interval);\n const isNext = order === ORDER_NEXT;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n\n const eventDirectionName = this._orderToDirection(order);\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) {\n this._isSliding = false;\n return;\n }\n\n if (this._isSliding) {\n return;\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return;\n }\n\n this._isSliding = true;\n\n if (isCycling) {\n this.pause();\n }\n\n this._setActiveIndicatorElement(nextElement);\n\n this._activeElement = nextElement;\n\n const triggerSlidEvent = () => {\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n });\n };\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n setTimeout(triggerSlidEvent, 0);\n };\n\n this._queueCallback(completeCallBack, activeElement, true);\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n this._isSliding = false;\n triggerSlidEvent();\n }\n\n if (isCycling) {\n this.cycle();\n }\n }\n\n _directionToOrder(direction) {\n if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {\n return direction;\n }\n\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;\n }\n\n _orderToDirection(order) {\n if (![ORDER_NEXT, ORDER_PREV].includes(order)) {\n return order;\n }\n\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;\n } // Static\n\n\n static carouselInterface(element, config) {\n const data = Carousel.getOrCreateInstance(element, config);\n let {\n _config\n } = data;\n\n if (typeof config === 'object') {\n _config = { ..._config,\n ...config\n };\n }\n\n const action = typeof config === 'string' ? config : _config.slide;\n\n if (typeof config === 'number') {\n data.to(config);\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`);\n }\n\n data[action]();\n } else if (_config.interval && _config.ride) {\n data.pause();\n data.cycle();\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config);\n });\n }\n\n static dataApiClickHandler(event) {\n const target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n const config = { ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n };\n const slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n config.interval = false;\n }\n\n Carousel.carouselInterface(target, config);\n\n if (slideIndex) {\n Carousel.getInstance(target).to(slideIndex);\n }\n\n event.preventDefault();\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);\n EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (let i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i]));\n }\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Carousel);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$a = 'collapse';\n const DATA_KEY$9 = 'bs.collapse';\n const EVENT_KEY$9 = `.${DATA_KEY$9}`;\n const DATA_API_KEY$5 = '.data-api';\n const Default$9 = {\n toggle: true,\n parent: null\n };\n const DefaultType$9 = {\n toggle: 'boolean',\n parent: '(null|element)'\n };\n const EVENT_SHOW$5 = `show${EVENT_KEY$9}`;\n const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`;\n const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`;\n const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`;\n const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`;\n const CLASS_NAME_SHOW$7 = 'show';\n const CLASS_NAME_COLLAPSE = 'collapse';\n const CLASS_NAME_COLLAPSING = 'collapsing';\n const CLASS_NAME_COLLAPSED = 'collapsed';\n const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\n const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\n const WIDTH = 'width';\n const HEIGHT = 'height';\n const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\n const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._isTransitioning = false;\n this._config = this._getConfig(config);\n this._triggerArray = [];\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i];\n const selector = getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element);\n\n if (selector !== null && filterElement.length) {\n this._selector = selector;\n\n this._triggerArray.push(elem);\n }\n }\n\n this._initializeChildren();\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$9;\n }\n\n static get NAME() {\n return NAME$a;\n } // Public\n\n\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n\n let actives = [];\n let activesData;\n\n if (this._config.parent) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth\n }\n\n const container = SelectorEngine.findOne(this._selector);\n\n if (actives.length) {\n const tempActiveData = actives.find(elem => container !== elem);\n activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;\n\n if (activesData && activesData._isTransitioning) {\n return;\n }\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n actives.forEach(elemActive => {\n if (container !== elemActive) {\n Collapse.getOrCreateInstance(elemActive, {\n toggle: false\n }).hide();\n }\n\n if (!activesData) {\n Data.set(elemActive, DATA_KEY$9, null);\n }\n });\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n this._element.style[dimension] = '';\n EventHandler.trigger(this._element, EVENT_SHOWN$5);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n\n this._queueCallback(complete, this._element, true);\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n const triggerArrayLength = this._triggerArray.length;\n\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i];\n const elem = getElementFromSelector(trigger);\n\n if (elem && !this._isShown(elem)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$5);\n };\n\n this._element.style[dimension] = '';\n\n this._queueCallback(complete, this._element, true);\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$7);\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$9,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n };\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n config.parent = getElement(config.parent);\n typeCheckConfig(NAME$a, config, DefaultType$9);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);\n SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {\n const selected = getElementFromSelector(element);\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n });\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n\n triggerArray.forEach(elem => {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED);\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED);\n }\n\n elem.setAttribute('aria-expanded', isOpen);\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const _config = {};\n\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n const data = Collapse.getOrCreateInstance(this, _config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const selector = getSelectorFromElement(this);\n const selectorElements = SelectorEngine.find(selector);\n selectorElements.forEach(element => {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n });\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Collapse);\n\n var top = 'top';\n var bottom = 'bottom';\n var right = 'right';\n var left = 'left';\n var auto = 'auto';\n var basePlacements = [top, bottom, right, left];\n var start = 'start';\n var end = 'end';\n var clippingParents = 'clippingParents';\n var viewport = 'viewport';\n var popper = 'popper';\n var reference = 'reference';\n var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n }, []);\n var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n }, []); // modifiers that need to read the DOM\n\n var beforeRead = 'beforeRead';\n var read = 'read';\n var afterRead = 'afterRead'; // pure-logic modifiers\n\n var beforeMain = 'beforeMain';\n var main = 'main';\n var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\n var beforeWrite = 'beforeWrite';\n var write = 'write';\n var afterWrite = 'afterWrite';\n var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];\n\n function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n }\n\n function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n }\n\n function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }\n\n function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }\n\n function isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n }\n\n // and applies them to the HTMLElements such as popper and arrow\n\n function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }\n\n function effect$2(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const applyStyles$1 = {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect$2,\n requires: ['computeStyles']\n };\n\n function getBasePlacement(placement) {\n return placement.split('-')[0];\n }\n\n // import { isHTMLElement } from './instanceOf';\n function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars\n includeScale) {\n\n var rect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1; // FIXME:\n // `offsetWidth` returns an integer while `getBoundingClientRect`\n // returns a float. This results in `scaleX` or `scaleY` being\n // non-1 when it should be for elements that aren't a full pixel in\n // width or height.\n // if (isHTMLElement(element) && includeScale) {\n // const offsetHeight = element.offsetHeight;\n // const offsetWidth = element.offsetWidth;\n // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale\n // // Fallback to 1 in case both values are `0`\n // if (offsetWidth > 0) {\n // scaleX = rect.width / offsetWidth || 1;\n // }\n // if (offsetHeight > 0) {\n // scaleY = rect.height / offsetHeight || 1;\n // }\n // }\n\n return {\n width: rect.width / scaleX,\n height: rect.height / scaleY,\n top: rect.top / scaleY,\n right: rect.right / scaleX,\n bottom: rect.bottom / scaleY,\n left: rect.left / scaleX,\n x: rect.left / scaleX,\n y: rect.top / scaleY\n };\n }\n\n // means it doesn't take into account transforms.\n\n function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }\n\n function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n }\n\n function getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n }\n\n function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n }\n\n function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n }\n\n function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n }\n\n function getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n } // `.offsetParent` reports `null` for fixed elements, while absolute elements\n // return the containing block\n\n\n function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,\n // such as table ancestors and cross browser bugs.\n\n\n function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n }\n\n function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n }\n\n var max = Math.max;\n var min = Math.min;\n var round = Math.round;\n\n function within(min$1, value, max$1) {\n return max(min$1, min(value, max$1));\n }\n\n function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n }\n\n function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n }\n\n function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n }\n\n var toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n };\n\n function arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n }\n\n function effect$1(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const arrow$1 = {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect$1,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n };\n\n function getVariation(placement) {\n return placement.split('-')[1];\n }\n\n var unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n }; // Round the offsets to the nearest suitable subpixel based on the DPR.\n // Zooming can change the DPR, but it seems to report a value that will\n // cleanly divide the values into the appropriate subpixels.\n\n function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n }\n\n function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom; // $FlowFixMe[prop-missing]\n\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right; // $FlowFixMe[prop-missing]\n\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n }\n\n function computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const computeStyles$1 = {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n };\n\n var passive = {\n passive: true\n };\n\n function effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const eventListeners = {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n };\n\n var hash$1 = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash$1[matched];\n });\n }\n\n var hash = {\n start: 'end',\n end: 'start'\n };\n function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n }\n\n function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n\n function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n }\n\n function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n }\n\n // of the `` and `` rect bounds if horizontally scrollable\n\n function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n\n function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle$1(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n }\n\n function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n }\n\n /*\n given a DOM element, return the list of all scroll parents, up the list of ancesors\n until we get to the top window object. This list is what we attach scroll listeners\n to, because if any of these parent elements scroll, we'll need to re-calculate the\n reference element's position.\n */\n\n function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }\n\n function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n }\n\n function getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n }\n\n function getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n } // A \"clipping parent\" is an overflowable container with the characteristic of\n // clipping (or hiding) overflowing elements with a position different from\n // `initial`\n\n\n function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of\n // clipping parents\n\n\n function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n }\n\n function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n }\n }\n\n return offsets;\n }\n\n function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n }\n\n function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements$1.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements$1;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n }\n\n function getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n }\n\n function flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const flip$1 = {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n };\n\n function getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n }\n\n function isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n }\n\n function hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const hide$1 = {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n };\n\n function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n }\n\n function offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const offset$1 = {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n };\n\n function popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const popperOffsets$1 = {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n };\n\n function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n }\n\n function preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min$1 = popperOffsets[mainAxis] + overflow[mainSide];\n var max$1 = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const preventOverflow$1 = {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n };\n\n function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n\n function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n }\n\n function isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = rect.width / element.offsetWidth || 1;\n var scaleY = rect.height / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n } // Returns the composite rect of an element relative to its offsetParent.\n // Composite means it takes into account transforms as well as layout.\n\n\n function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }\n\n function order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n }\n\n function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n }\n\n function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n }\n\n function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n }\n\n var DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n };\n\n function areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n }\n\n function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n }\n var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];\n var createPopper$1 = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers$1\n }); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];\n var createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n }); // eslint-disable-next-line import/no-unused-modules\n\n const Popper = /*#__PURE__*/Object.freeze({\n __proto__: null,\n popperGenerator,\n detectOverflow,\n createPopperBase: createPopper$2,\n createPopper,\n createPopperLite: createPopper$1,\n top,\n bottom,\n right,\n left,\n auto,\n basePlacements,\n start,\n end,\n clippingParents,\n viewport,\n popper,\n reference,\n variationPlacements,\n placements,\n beforeRead,\n read,\n afterRead,\n beforeMain,\n main,\n afterMain,\n beforeWrite,\n write,\n afterWrite,\n modifierPhases,\n applyStyles: applyStyles$1,\n arrow: arrow$1,\n computeStyles: computeStyles$1,\n eventListeners,\n flip: flip$1,\n hide: hide$1,\n offset: offset$1,\n popperOffsets: popperOffsets$1,\n preventOverflow: preventOverflow$1\n });\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$9 = 'dropdown';\n const DATA_KEY$8 = 'bs.dropdown';\n const EVENT_KEY$8 = `.${DATA_KEY$8}`;\n const DATA_API_KEY$4 = '.data-api';\n const ESCAPE_KEY$2 = 'Escape';\n const SPACE_KEY = 'Space';\n const TAB_KEY$1 = 'Tab';\n const ARROW_UP_KEY = 'ArrowUp';\n const ARROW_DOWN_KEY = 'ArrowDown';\n const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\n const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);\n const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`;\n const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`;\n const EVENT_SHOW$4 = `show${EVENT_KEY$8}`;\n const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`;\n const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`;\n const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`;\n const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`;\n const CLASS_NAME_SHOW$6 = 'show';\n const CLASS_NAME_DROPUP = 'dropup';\n const CLASS_NAME_DROPEND = 'dropend';\n const CLASS_NAME_DROPSTART = 'dropstart';\n const CLASS_NAME_NAVBAR = 'navbar';\n const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]';\n const SELECTOR_MENU = '.dropdown-menu';\n const SELECTOR_NAVBAR_NAV = '.navbar-nav';\n const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\n const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\n const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\n const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\n const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\n const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\n const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\n const Default$8 = {\n offset: [0, 2],\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null,\n autoClose: true\n };\n const DefaultType$8 = {\n offset: '(array|string|function)',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)',\n autoClose: '(boolean|string)'\n };\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._popper = null;\n this._config = this._getConfig(config);\n this._menu = this._getMenuElement();\n this._inNavbar = this._detectNavbar();\n } // Getters\n\n\n static get Default() {\n return Default$8;\n }\n\n static get DefaultType() {\n return DefaultType$8;\n }\n\n static get NAME() {\n return NAME$9;\n } // Public\n\n\n toggle() {\n return this._isShown() ? this.hide() : this.show();\n }\n\n show() {\n if (isDisabled(this._element) || this._isShown(this._menu)) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar\n\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none');\n } else {\n this._createPopper(parent);\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop));\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.add(CLASS_NAME_SHOW$6);\n\n this._element.classList.add(CLASS_NAME_SHOW$6);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);\n }\n\n hide() {\n if (isDisabled(this._element) || !this._isShown(this._menu)) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n\n this._completeHide(relatedTarget);\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy();\n }\n\n super.dispose();\n }\n\n update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop));\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.setAttribute('aria-expanded', 'false');\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);\n }\n\n _getConfig(config) {\n config = { ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n };\n typeCheckConfig(NAME$9, config, this.constructor.DefaultType);\n\n if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$9.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n\n return config;\n }\n\n _createPopper(parent) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n let referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = parent;\n } else if (isElement$1(this._config.reference)) {\n referenceElement = getElement(this._config.reference);\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n const popperConfig = this._getPopperConfig();\n\n const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);\n this._popper = createPopper(referenceElement, this._menu, popperConfig);\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static');\n }\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$6);\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0];\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n } // We need to trim the value because custom properties can also include spaces\n\n\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display\n\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _selectMenuItem({\n key,\n target\n }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);\n\n if (!items.length) {\n return;\n } // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n\n\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n static clearMenus(event) {\n if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) {\n return;\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const context = Dropdown.getInstance(toggles[i]);\n\n if (!context || context._config.autoClose === false) {\n continue;\n }\n\n if (!context._isShown()) {\n continue;\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n };\n\n if (event) {\n const composedPath = event.composedPath();\n const isMenuTarget = composedPath.includes(context._menu);\n\n if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {\n continue;\n } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n\n\n if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue;\n }\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n }\n\n context._completeHide(relatedTarget);\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode;\n }\n\n static dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {\n return;\n }\n\n const isActive = this.classList.contains(CLASS_NAME_SHOW$6);\n\n if (!isActive && event.key === ESCAPE_KEY$2) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (isDisabled(this)) {\n return;\n }\n\n const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];\n const instance = Dropdown.getOrCreateInstance(getToggleButton);\n\n if (event.key === ESCAPE_KEY$2) {\n instance.hide();\n return;\n }\n\n if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {\n if (!isActive) {\n instance.show();\n }\n\n instance._selectMenuItem(event);\n\n return;\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus();\n }\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.getOrCreateInstance(this).toggle();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Dropdown);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\n const SELECTOR_STICKY_CONTENT = '.sticky-top';\n\n class ScrollBarHelper {\n constructor() {\n this._element = document.body;\n }\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n\n hide() {\n const width = this.getWidth();\n\n this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width\n\n\n this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n\n\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);\n }\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n\n this._element.style.overflow = 'hidden';\n }\n\n _setElementAttributes(selector, styleProp, callback) {\n const scrollbarWidth = this.getWidth();\n\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n this._saveInitialAttribute(element, styleProp);\n\n const calculatedValue = window.getComputedStyle(element)[styleProp];\n element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n\n this._resetElementAttributes(this._element, 'paddingRight');\n\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');\n }\n\n _saveInitialAttribute(element, styleProp) {\n const actualValue = element.style[styleProp];\n\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProp, actualValue);\n }\n }\n\n _resetElementAttributes(selector, styleProp) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProp);\n\n if (typeof value === 'undefined') {\n element.style.removeProperty(styleProp);\n } else {\n Manipulator.removeDataAttribute(element, styleProp);\n element.style[styleProp] = value;\n }\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement$1(selector)) {\n callBack(selector);\n } else {\n SelectorEngine.find(selector, this._element).forEach(callBack);\n }\n }\n\n isOverflowing() {\n return this.getWidth() > 0;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const Default$7 = {\n className: 'modal-backdrop',\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n isAnimated: false,\n rootElement: 'body',\n // give the choice to place backdrop under different elements\n clickCallback: null\n };\n const DefaultType$7 = {\n className: 'string',\n isVisible: 'boolean',\n isAnimated: 'boolean',\n rootElement: '(element|string)',\n clickCallback: '(function|null)'\n };\n const NAME$8 = 'backdrop';\n const CLASS_NAME_FADE$4 = 'fade';\n const CLASS_NAME_SHOW$5 = 'show';\n const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`;\n\n class Backdrop {\n constructor(config) {\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n }\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._append();\n\n if (this._config.isAnimated) {\n reflow(this._getElement());\n }\n\n this._getElement().classList.add(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n execute(callback);\n });\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n this.dispose();\n execute(callback);\n });\n } // Private\n\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n\n this._element = backdrop;\n }\n\n return this._element;\n }\n\n _getConfig(config) {\n config = { ...Default$7,\n ...(typeof config === 'object' ? config : {})\n }; // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n\n config.rootElement = getElement(config.rootElement);\n typeCheckConfig(NAME$8, config, DefaultType$7);\n return config;\n }\n\n _append() {\n if (this._isAppended) {\n return;\n }\n\n this._config.rootElement.append(this._getElement());\n\n EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n\n dispose() {\n if (!this._isAppended) {\n return;\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN);\n\n this._element.remove();\n\n this._isAppended = false;\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const Default$6 = {\n trapElement: null,\n // The element to trap focus inside of\n autofocus: true\n };\n const DefaultType$6 = {\n trapElement: 'element',\n autofocus: 'boolean'\n };\n const NAME$7 = 'focustrap';\n const DATA_KEY$7 = 'bs.focustrap';\n const EVENT_KEY$7 = `.${DATA_KEY$7}`;\n const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`;\n const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`;\n const TAB_KEY = 'Tab';\n const TAB_NAV_FORWARD = 'forward';\n const TAB_NAV_BACKWARD = 'backward';\n\n class FocusTrap {\n constructor(config) {\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n }\n\n activate() {\n const {\n trapElement,\n autofocus\n } = this._config;\n\n if (this._isActive) {\n return;\n }\n\n if (autofocus) {\n trapElement.focus();\n }\n\n EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event));\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n\n deactivate() {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n EventHandler.off(document, EVENT_KEY$7);\n } // Private\n\n\n _handleFocusin(event) {\n const {\n target\n } = event;\n const {\n trapElement\n } = this._config;\n\n if (target === document || target === trapElement || trapElement.contains(target)) {\n return;\n }\n\n const elements = SelectorEngine.focusableChildren(trapElement);\n\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n\n _getConfig(config) {\n config = { ...Default$6,\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$7, config, DefaultType$6);\n return config;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$6 = 'modal';\n const DATA_KEY$6 = 'bs.modal';\n const EVENT_KEY$6 = `.${DATA_KEY$6}`;\n const DATA_API_KEY$3 = '.data-api';\n const ESCAPE_KEY$1 = 'Escape';\n const Default$5 = {\n backdrop: true,\n keyboard: true,\n focus: true\n };\n const DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n };\n const EVENT_HIDE$3 = `hide${EVENT_KEY$6}`;\n const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;\n const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;\n const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;\n const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;\n const EVENT_RESIZE = `resize${EVENT_KEY$6}`;\n const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`;\n const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;\n const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;\n const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;\n const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const CLASS_NAME_OPEN = 'modal-open';\n const CLASS_NAME_FADE$3 = 'fade';\n const CLASS_NAME_SHOW$4 = 'show';\n const CLASS_NAME_STATIC = 'modal-static';\n const OPEN_SELECTOR$1 = '.modal.show';\n const SELECTOR_DIALOG = '.modal-dialog';\n const SELECTOR_MODAL_BODY = '.modal-body';\n const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._config = this._getConfig(config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._ignoreBackdropClick = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper();\n } // Getters\n\n\n static get Default() {\n return Default$5;\n }\n\n static get NAME() {\n return NAME$6;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n if (this._isAnimated()) {\n this._isTransitioning = true;\n }\n\n this._scrollBar.hide();\n\n document.body.classList.add(CLASS_NAME_OPEN);\n\n this._adjustDialog();\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {\n EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {\n if (event.target === this._element) {\n this._ignoreBackdropClick = true;\n }\n });\n });\n\n this._showBackdrop(() => this._showElement(relatedTarget));\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n\n const isAnimated = this._isAnimated();\n\n if (isAnimated) {\n this._isTransitioning = true;\n }\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n this._focustrap.deactivate();\n\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS);\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);\n\n this._queueCallback(() => this._hideModal(), this._element, isAnimated);\n }\n\n dispose() {\n [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));\n\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value\n isAnimated: this._isAnimated()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _getConfig(config) {\n config = { ...Default$5,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$6, config, DefaultType$5);\n return config;\n }\n\n _showElement(relatedTarget) {\n const isAnimated = this._isAnimated();\n\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.append(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n if (isAnimated) {\n reflow(this._element);\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$4);\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n\n this._queueCallback(transitionComplete, this._dialog, isAnimated);\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY$1) {\n event.preventDefault();\n this.hide();\n } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) {\n this._triggerBackdropTransition();\n }\n });\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog());\n } else {\n EventHandler.off(window, EVENT_RESIZE);\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._scrollBar.reset();\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n });\n }\n\n _showBackdrop(callback) {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false;\n return;\n }\n\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (this._config.backdrop === true) {\n this.hide();\n } else if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n }\n });\n\n this._backdrop.show(callback);\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$3);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const {\n classList,\n scrollHeight,\n style\n } = this._element;\n const isModalOverflowing = scrollHeight > document.documentElement.clientHeight; // return if the following background transition hasn't yet completed\n\n if (!isModalOverflowing && style.overflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n\n if (!isModalOverflowing) {\n style.overflowY = 'hidden';\n }\n\n classList.add(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n classList.remove(CLASS_NAME_STATIC);\n\n if (!isModalOverflowing) {\n this._queueCallback(() => {\n style.overflowY = '';\n }, this._dialog);\n }\n }, this._dialog);\n\n this._element.focus();\n } // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n const scrollbarWidth = this._scrollBar.getWidth();\n\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {\n this._element.style.paddingLeft = `${scrollbarWidth}px`;\n }\n\n if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {\n this._element.style.paddingRight = `${scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$3, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n }); // avoid conflict when clicking moddal toggler while another one is open\n\n const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);\n\n if (allReadyOpen) {\n Modal.getInstance(allReadyOpen).hide();\n }\n\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n });\n enableDismissTrigger(Modal);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Modal);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$5 = 'offcanvas';\n const DATA_KEY$5 = 'bs.offcanvas';\n const EVENT_KEY$5 = `.${DATA_KEY$5}`;\n const DATA_API_KEY$2 = '.data-api';\n const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`;\n const ESCAPE_KEY = 'Escape';\n const Default$4 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n };\n const DefaultType$4 = {\n backdrop: 'boolean',\n keyboard: 'boolean',\n scroll: 'boolean'\n };\n const CLASS_NAME_SHOW$3 = 'show';\n const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\n const OPEN_SELECTOR = '.offcanvas.show';\n const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;\n const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;\n const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;\n const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;\n const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;\n const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;\n const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._config = this._getConfig(config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n\n this._addEventListeners();\n } // Getters\n\n\n static get NAME() {\n return NAME$5;\n }\n\n static get Default() {\n return Default$4;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._element.style.visibility = 'visible';\n\n this._backdrop.show();\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide();\n }\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOW$3);\n\n const completeCallBack = () => {\n if (!this._config.scroll) {\n this._focustrap.activate();\n }\n\n EventHandler.trigger(this._element, EVENT_SHOWN$2, {\n relatedTarget\n });\n };\n\n this._queueCallback(completeCallBack, this._element, true);\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._focustrap.deactivate();\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.remove(CLASS_NAME_SHOW$3);\n\n this._backdrop.hide();\n\n const completeCallback = () => {\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._element.style.visibility = 'hidden';\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset();\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$2);\n };\n\n this._queueCallback(completeCallback, this._element, true);\n }\n\n dispose() {\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$4,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$5, config, DefaultType$4);\n return config;\n }\n\n _initializeBackDrop() {\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible: this._config.backdrop,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: () => this.hide()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n this.hide();\n }\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$2, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);\n\n if (allReadyOpen && allReadyOpen !== target) {\n Offcanvas.getInstance(allReadyOpen).hide();\n }\n\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));\n enableDismissTrigger(Offcanvas);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n defineJQueryPlugin(Offcanvas);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\n const ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n /**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;\n /**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\n const allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));\n }\n\n return true;\n }\n\n const regExp = allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp); // Check if a regular expression validates the attribute.\n\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (regExp[i].test(attributeName)) {\n return true;\n }\n }\n\n return false;\n };\n\n const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n };\n function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml);\n }\n\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const element = elements[i];\n const elementName = element.nodeName.toLowerCase();\n\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove();\n continue;\n }\n\n const attributeList = [].concat(...element.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);\n attributeList.forEach(attribute => {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName);\n }\n });\n }\n\n return createdDocument.body.innerHTML;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$4 = 'tooltip';\n const DATA_KEY$4 = 'bs.tooltip';\n const EVENT_KEY$4 = `.${DATA_KEY$4}`;\n const CLASS_PREFIX$1 = 'bs-tooltip';\n const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\n const DefaultType$3 = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n };\n const AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n };\n const Default$3 = {\n animation: true,\n template: '
' + '
' + '
' + '
',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n };\n const Event$2 = {\n HIDE: `hide${EVENT_KEY$4}`,\n HIDDEN: `hidden${EVENT_KEY$4}`,\n SHOW: `show${EVENT_KEY$4}`,\n SHOWN: `shown${EVENT_KEY$4}`,\n INSERTED: `inserted${EVENT_KEY$4}`,\n CLICK: `click${EVENT_KEY$4}`,\n FOCUSIN: `focusin${EVENT_KEY$4}`,\n FOCUSOUT: `focusout${EVENT_KEY$4}`,\n MOUSEENTER: `mouseenter${EVENT_KEY$4}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY$4}`\n };\n const CLASS_NAME_FADE$2 = 'fade';\n const CLASS_NAME_MODAL = 'modal';\n const CLASS_NAME_SHOW$2 = 'show';\n const HOVER_STATE_SHOW = 'show';\n const HOVER_STATE_OUT = 'out';\n const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\n const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;\n const EVENT_MODAL_HIDE = 'hide.bs.modal';\n const TRIGGER_HOVER = 'hover';\n const TRIGGER_FOCUS = 'focus';\n const TRIGGER_CLICK = 'click';\n const TRIGGER_MANUAL = 'manual';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n super(element); // private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._hoverState = '';\n this._activeTrigger = {};\n this._popper = null; // Protected\n\n this._config = this._getConfig(config);\n this.tip = null;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default$3;\n }\n\n static get NAME() {\n return NAME$4;\n }\n\n static get Event() {\n return Event$2;\n }\n\n static get DefaultType() {\n return DefaultType$3;\n } // Public\n\n\n enable() {\n this._isEnabled = true;\n }\n\n disable() {\n this._isEnabled = false;\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger.click = !context._activeTrigger.click;\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context);\n } else {\n context._leave(null, context);\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) {\n this._leave(null, this);\n\n return;\n }\n\n this._enter(null, this);\n }\n }\n\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this.tip) {\n this.tip.remove();\n }\n\n this._disposePopper();\n\n super.dispose();\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this.isWithContent() && this._isEnabled)) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);\n const shadowRoot = findShadowRoot(this._element);\n const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n } // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title`\n // This will be removed later in favor of a `setContent` method\n\n\n if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) {\n this._disposePopper();\n\n this.tip.remove();\n this.tip = null;\n }\n\n const tip = this.getTipElement();\n const tipId = getUID(this.constructor.NAME);\n tip.setAttribute('id', tipId);\n\n this._element.setAttribute('aria-describedby', tipId);\n\n if (this._config.animation) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n\n const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;\n\n const attachment = this._getAttachment(placement);\n\n this._addAttachmentClass(attachment);\n\n const {\n container\n } = this._config;\n Data.set(tip, this.constructor.DATA_KEY, this);\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip);\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED);\n }\n\n if (this._popper) {\n this._popper.update();\n } else {\n this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n\n tip.classList.add(CLASS_NAME_SHOW$2);\n\n const customClass = this._resolvePossibleFunction(this._config.customClass);\n\n if (customClass) {\n tip.classList.add(...customClass.split(' '));\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => {\n EventHandler.on(element, 'mouseover', noop);\n });\n }\n\n const complete = () => {\n const prevHoverState = this._hoverState;\n this._hoverState = null;\n EventHandler.trigger(this._element, this.constructor.Event.SHOWN);\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this);\n }\n };\n\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);\n\n this._queueCallback(complete, this.tip, isAnimated);\n }\n\n hide() {\n if (!this._popper) {\n return;\n }\n\n const tip = this.getTipElement();\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n if (this._hoverState !== HOVER_STATE_SHOW) {\n tip.remove();\n }\n\n this._cleanTipClass();\n\n this._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);\n\n this._disposePopper();\n };\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop));\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);\n\n this._queueCallback(complete, this.tip, isAnimated);\n\n this._hoverState = '';\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.update();\n }\n } // Protected\n\n\n isWithContent() {\n return Boolean(this.getTitle());\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip;\n }\n\n const element = document.createElement('div');\n element.innerHTML = this._config.template;\n const tip = element.children[0];\n this.setContent(tip);\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);\n this.tip = tip;\n return this.tip;\n }\n\n setContent(tip) {\n this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);\n }\n\n _sanitizeAndSetContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template);\n\n if (!content && templateElement) {\n templateElement.remove();\n return;\n } // we use append for html objects to maintain js events\n\n\n this.setElementContent(templateElement, content);\n }\n\n setElementContent(element, content) {\n if (element === null) {\n return;\n }\n\n if (isElement$1(content)) {\n content = getElement(content); // content is a DOM node or a jQuery\n\n if (this._config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = '';\n element.append(content);\n }\n } else {\n element.textContent = content.textContent;\n }\n\n return;\n }\n\n if (this._config.html) {\n if (this._config.sanitize) {\n content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);\n }\n\n element.innerHTML = content;\n } else {\n element.textContent = content;\n }\n }\n\n getTitle() {\n const title = this._element.getAttribute('data-bs-original-title') || this._config.title;\n\n return this._resolvePossibleFunction(title);\n }\n\n updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end';\n }\n\n if (attachment === 'left') {\n return 'start';\n }\n\n return attachment;\n } // Private\n\n\n _initializeOnDelegatedTarget(event, context) {\n return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _resolvePossibleFunction(content) {\n return typeof content === 'function' ? content.call(this._element) : content;\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: data => this._handlePopperPlacementChange(data)\n }],\n onFirstUpdate: data => {\n if (data.options.placement !== data.placement) {\n this._handlePopperPlacementChange(data);\n }\n }\n };\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()];\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ');\n\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;\n EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));\n EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));\n }\n });\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this._config.selector) {\n this._config = { ...this._config,\n trigger: 'manual',\n selector: ''\n };\n } else {\n this._fixTitle();\n }\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title');\n\n const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '');\n\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.setAttribute('title', '');\n }\n }\n\n _enter(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW;\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_SHOW;\n\n if (!context._config.delay || !context._config.delay.show) {\n context.show();\n return;\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show();\n }\n }, context._config.delay.show);\n }\n\n _leave(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n }\n\n if (context._isWithActiveTrigger()) {\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_OUT;\n\n if (!context._config.delay || !context._config.delay.hide) {\n context.hide();\n return;\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide();\n }\n }, context._config.delay.hide);\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true;\n }\n }\n\n return false;\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n Object.keys(dataAttributes).forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr];\n }\n });\n config = { ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n config.container = config.container === false ? document.body : getElement(config.container);\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n typeCheckConfig(NAME$4, config, this.constructor.DefaultType);\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);\n }\n\n return config;\n }\n\n _getDelegateConfig() {\n const config = {};\n\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key];\n }\n } // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n\n\n return config;\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement();\n const basicClassPrefixRegex = new RegExp(`(^|\\\\s)${this._getBasicClassPrefix()}\\\\S+`, 'g');\n const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);\n\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));\n }\n }\n\n _getBasicClassPrefix() {\n return CLASS_PREFIX$1;\n }\n\n _handlePopperPlacementChange(popperData) {\n const {\n state\n } = popperData;\n\n if (!state) {\n return;\n }\n\n this.tip = state.elements.popper;\n\n this._cleanTipClass();\n\n this._addAttachmentClass(this._getAttachment(state.placement));\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\n\n defineJQueryPlugin(Tooltip);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$3 = 'popover';\n const DATA_KEY$3 = 'bs.popover';\n const EVENT_KEY$3 = `.${DATA_KEY$3}`;\n const CLASS_PREFIX = 'bs-popover';\n const Default$2 = { ...Tooltip.Default,\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: '
' + '
' + '

' + '
' + '
'\n };\n const DefaultType$2 = { ...Tooltip.DefaultType,\n content: '(string|element|function)'\n };\n const Event$1 = {\n HIDE: `hide${EVENT_KEY$3}`,\n HIDDEN: `hidden${EVENT_KEY$3}`,\n SHOW: `show${EVENT_KEY$3}`,\n SHOWN: `shown${EVENT_KEY$3}`,\n INSERTED: `inserted${EVENT_KEY$3}`,\n CLICK: `click${EVENT_KEY$3}`,\n FOCUSIN: `focusin${EVENT_KEY$3}`,\n FOCUSOUT: `focusout${EVENT_KEY$3}`,\n MOUSEENTER: `mouseenter${EVENT_KEY$3}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY$3}`\n };\n const SELECTOR_TITLE = '.popover-header';\n const SELECTOR_CONTENT = '.popover-body';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n\n static get NAME() {\n return NAME$3;\n }\n\n static get Event() {\n return Event$1;\n }\n\n static get DefaultType() {\n return DefaultType$2;\n } // Overrides\n\n\n isWithContent() {\n return this.getTitle() || this._getContent();\n }\n\n setContent(tip) {\n this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);\n\n this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);\n } // Private\n\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content);\n }\n\n _getBasicClassPrefix() {\n return CLASS_PREFIX;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\n\n defineJQueryPlugin(Popover);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$2 = 'scrollspy';\n const DATA_KEY$2 = 'bs.scrollspy';\n const EVENT_KEY$2 = `.${DATA_KEY$2}`;\n const DATA_API_KEY$1 = '.data-api';\n const Default$1 = {\n offset: 10,\n method: 'auto',\n target: ''\n };\n const DefaultType$1 = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n };\n const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\n const EVENT_SCROLL = `scroll${EVENT_KEY$2}`;\n const EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`;\n const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\n const CLASS_NAME_ACTIVE$1 = 'active';\n const SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\n const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';\n const SELECTOR_NAV_LINKS = '.nav-link';\n const SELECTOR_NAV_ITEMS = '.nav-item';\n const SELECTOR_LIST_ITEMS = '.list-group-item';\n const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;\n const SELECTOR_DROPDOWN$1 = '.dropdown';\n const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\n const METHOD_OFFSET = 'offset';\n const METHOD_POSITION = 'position';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;\n this._config = this._getConfig(config);\n this._offsets = [];\n this._targets = [];\n this._activeTarget = null;\n this._scrollHeight = 0;\n EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process());\n this.refresh();\n\n this._process();\n } // Getters\n\n\n static get Default() {\n return Default$1;\n }\n\n static get NAME() {\n return NAME$2;\n } // Public\n\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;\n const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;\n const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;\n this._offsets = [];\n this._targets = [];\n this._scrollHeight = this._getScrollHeight();\n const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target);\n targets.map(element => {\n const targetSelector = getSelectorFromElement(element);\n const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;\n\n if (target) {\n const targetBCR = target.getBoundingClientRect();\n\n if (targetBCR.width || targetBCR.height) {\n return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];\n }\n }\n\n return null;\n }).filter(item => item).sort((a, b) => a[0] - b[0]).forEach(item => {\n this._offsets.push(item[0]);\n\n this._targets.push(item[1]);\n });\n }\n\n dispose() {\n EventHandler.off(this._scrollElement, EVENT_KEY$2);\n super.dispose();\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$1,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n };\n config.target = getElement(config.target) || document.documentElement;\n typeCheckConfig(NAME$2, config, DefaultType$1);\n return config;\n }\n\n _getScrollTop() {\n return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset;\n\n const scrollHeight = this._getScrollHeight();\n\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh();\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1];\n\n if (this._activeTarget !== target) {\n this._activate(target);\n }\n\n return;\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null;\n\n this._clear();\n\n return;\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);\n\n if (isActiveTarget) {\n this._activate(this._targets[i]);\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target;\n\n this._clear();\n\n const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target=\"${target}\"],${selector}[href=\"${target}\"]`);\n const link = SelectorEngine.findOne(queries.join(','), this._config.target);\n link.classList.add(CLASS_NAME_ACTIVE$1);\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);\n } else {\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {\n // Set triggered links parents as active\n // With both
    and