PageSourceSearch

https://finescience.com/theme/edfa9a406d564c22f1b7cf55bf130d43/js/…/moorl-foundation.js?1789648759

js finescience.com collected 2026-09-24 11:24:50 UTC 323,620 bytes, 7 lines download raw bytes

1(()=>{var t={998:t=>{"use strict";var e="%[a-f0-9]{2}",i=RegExp("("+e+")|([^%]+?)","gi"),n=RegExp("("+e+")+","gi");t.exports=function(t){if("string"!=typeof t)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},o=n.exec(t);o;){try{e[o[0]]=decodeURIComponent(o[0])}catch(t){var s=function(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(i)||[],n=1;n<e.length;n++)e=(t=(function t(e,i){try{return[decodeURIComponent(e.join(""))]}catch(t){}if(1===e.length)return e;i=i||1;var n=e.slice(0,i),o=e.slice(i);return Array.prototype.concat.call([],t(n),t(o))})(e,n).join("")).match(i)||[];return t}}(o[0]);s!==o[0]&&(e[o[0]]=s)}o=n.exec(t)}e["%C2"]="�";for(var r=Object.keys(e),a=0;a<r.length;a++){var l=r[a];t=t.replace(RegExp(l,"g"),e[l])}return t}(t)}}},857:t=>{"use strict";var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function o(t,e,i){return t.concat(e).map(function(t){return n(t,i)})}function s(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function r(t,e){try{return e in t}catch(t){return!1}}function a(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||o,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=n;var h,c,u=Array.isArray(i);return u!==Array.isArray(t)?n(i,l):u?l.arrayMerge(t,i,l):(c={},(h=l).isMergeableObject(t)&&s(t).forEach(function(e){c[e]=n(t[e],h)}),s(i).forEach(function(e){(!r(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(r(t,e)&&h.isMergeableObject(i[e])?c[e]=(function(t,e){if(!e.customMerge)return a;var i=e.customMerge(t);return"function"==typeof i?i:a})(e,h)(t[e],i[e],h):c[e]=n(i[e],h))}),c)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return a(t,i,e)},{})},t.exports=a},728:t=>{"use strict";t.exports=function(t,e){for(var i={},n=Object.keys(t),o=Array.isArray(e),s=0;s<n.length;s++){var r=n[s],a=t[r];(o?-1!==e.indexOf(r):e(r,a,t))&&(i[r]=a)}return i}},742:t=>{"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)},940:(t,e,i)=>{"use strict";let n=i(742),o=i(998),s=i(231),r=i(728),a=t=>null==t,l=Symbol("encodeFragmentIdentifier");function h(t){if("string"!=typeof t||1!==t.length)throw TypeError("arrayFormatSeparator must be single character string")}function c(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function u(t,e){return e.decode?o(t):t}function d(t){let e=t.indexOf("#");return -1!==e&&(t=t.slice(0,e)),t}function p(t){let e=(t=d(t)).indexOf("?");return -1===e?"":t.slice(e+1)}function m(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):e.parseBooleans&&null!==t&&("true"===t.toLowerCase()||"false"===t.toLowerCase())&&(t="true"===t.toLowerCase()),t}function f(t,e){h((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);let i=function(t){let e;switch(t.arrayFormat){case"index":return(t,i,n)=>{if(e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),!e){n[t]=i;return}void 0===n[t]&&(n[t]={}),n[t][e[1]]=i};case"bracket":return(t,i,n)=>{if(e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),!e){n[t]=i;return}if(void 0===n[t]){n[t]=[i];return}n[t]=[].concat(n[t],i)};case"colon-list-separator":return(t,i,n)=>{if(e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!e){n[t]=i;return}if(void 0===n[t]){n[t]=[i];return}n[t]=[].concat(n[t],i)};case"comma":case"separator":return(e,i,n)=>{let o="string"==typeof i&&i.includes(t.arrayFormatSeparator),s="string"==typeof i&&!o&&u(i,t).includes(t.arrayFormatSeparator);i=s?u(i,t):i;let r=o||s?i.split(t.arrayFormatSeparator).map(e=>u(e,t)):null===i?i:u(i,t);n[e]=r};case"bracket-separator":return(e,i,n)=>{let o=/(\[\])$/.test(e);
1if(e=e.replace(/\[\]$/,""),!o){n[e]=i?u(i,t):i;return}let s=null===i?[]:i.split(t.arrayFormatSeparator).map(e=>u(e,t));if(void 0===n[e]){n[e]=s;return}n[e]=[].concat(n[e],s)};default:return(t,e,i)=>{if(void 0===i[t]){i[t]=e;return}i[t]=[].concat(i[t],e)}}}(e),n=Object.create(null);if("string"!=typeof t||!(t=t.trim().replace(/^[?#&]/,"")))return n;for(let o of t.split("&")){if(""===o)continue;let[t,r]=s(e.decode?o.replace(/\+/g," "):o,"=");r=void 0===r?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?r:u(r,e),i(u(t,e),r,n)}for(let t of Object.keys(n)){let i=n[t];if("object"==typeof i&&null!==i)for(let t of Object.keys(i))i[t]=m(i[t],e);else n[t]=m(i,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((t,e)=>{let i=n[e];return i&&"object"==typeof i&&!Array.isArray(i)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(i):t[e]=i,t},Object.create(null))}e.extract=p,e.parse=f,e.stringify=(t,e)=>{if(!t)return"";h((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);let i=i=>e.skipNull&&a(t[i])||e.skipEmptyString&&""===t[i],n=function(t){switch(t.arrayFormat){case"index":return e=>(i,n)=>{let o=i.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?i:null===n?[...i,[c(e,t),"[",o,"]"].join("")]:[...i,[c(e,t),"[",c(o,t),"]=",c(n,t)].join("")]};case"bracket":return e=>(i,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?i:null===n?[...i,[c(e,t),"[]"].join("")]:[...i,[c(e,t),"[]=",c(n,t)].join("")];case"colon-list-separator":return e=>(i,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?i:null===n?[...i,[c(e,t),":list="].join("")]:[...i,[c(e,t),":list=",c(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e="bracket-separator"===t.arrayFormat?"[]=":"=";return i=>(n,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length)?[[c(i,t),e,c(o,t)].join("")]:[[n,c(o,t)].join(t.arrayFormatSeparator)]}default:return e=>(i,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?i:null===n?[...i,c(e,t)]:[...i,[c(e,t),"=",c(n,t)].join("")]}}(e),o={};for(let e of Object.keys(t))i(e)||(o[e]=t[e]);let s=Object.keys(o);return!1!==e.sort&&s.sort(e.sort),s.map(i=>{let o=t[i];return void 0===o?"":null===o?c(i,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?c(i,e)+"[]":o.reduce(n(i),[]).join("&"):c(i,e)+"="+c(o,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[i,n]=s(t,"#");return Object.assign({url:i.split("?")[0]||"",query:f(p(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,e)}:{})},e.stringifyUrl=(t,i)=>{i=Object.assign({encode:!0,strict:!0,[l]:!0},i);let n=d(t.url).split("?")[0]||"",o=e.extract(t.url),s=Object.assign(e.parse(o,{sort:!1}),t.query),r=e.stringify(s,i);r&&(r="?".concat(r));let a=function(t){let e="",i=t.indexOf("#");return -1!==i&&(e=t.slice(i)),e}(t.url);return t.fragmentIdentifier&&(a="#".concat(i[l]?c(t.fragmentIdentifier,i):t.fragmentIdentifier)),"".concat(n).concat(r).concat(a)},e.pick=(t,i,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[l]:!1},n);let{url:o,query:s,fragmentIdentifier:a}=e.parseUrl(t,n);return e.stringifyUrl({url:o,query:r(s,i),fragmentIdentifier:a},n)},e.exclude=(t,i,n)=>{let o=Array.isArray(i)?t=>!i.includes(t):(t,e)=>!i(t,e);return e.pick(t,o,n)}},231:t=>{"use strict";t.exports=(t,e)=>{if(!("string"==typeof t&&"string"==typeof e))throw TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];let i=t.indexOf(e);return -1===i?[t]:[t.slice(0,i),t.slice(i+e.length)]}},427:function(t,e){var i,n,o;i={ar:{touch:"استخدم إصبعين لتحريك الخريطة",scroll:"‏استخدم ctrl + scroll لتصغير/تكبير الخريطة",scrollMac:"يمكنك استخدام ⌘ + التمرير لتكبير/تصغير الخريطة"},bg:{touch:"Използвайте два пръста, за да преместите картата",scroll:"Задръжте бутона Ctrl натиснат, доÐ
1ºÐ°Ñ‚о превъртате, за да промените мащаба на картата",scrollMac:"Задръжте бутона ⌘ натиснат, докато превъртате, за да промените мащаба на картата"},bn:{touch:"মানচিত্রটিকে সরাতে দুটি আঙ্গুল ব্যবহার করুন",scroll:"ম্যাপ জুম করতে ctrl + scroll ব্যবহার করুন",scrollMac:"ম্যাপে জুম করতে ⌘ বোতাম টিপে স্ক্রল করুন"},ca:{touch:"Fes servir dos dits per moure el mapa",scroll:"Prem la tecla Control mentre et desplaces per apropar i allunyar el mapa",scrollMac:"Prem la tecla ⌘ mentre et desplaces per apropar i allunyar el mapa"},cs:{touch:"K posunutí mapy použijte dva prsty",scroll:"Velikost zobrazení mapy změňte podržením klávesy Ctrl a posouváním kolečka myÅ¡i",scrollMac:"Velikost zobrazení mapy změníte podržením klávesy ⌘ a posunutím kolečka myÅ¡i / touchpadu"},da:{touch:"Brug to fingre til at flytte kortet",scroll:"Brug ctrl + rullefunktionen til at zoome ind og ud pÃ¥ kortet",scrollMac:"Brug ⌘ + rullefunktionen til at zoome ind og ud pÃ¥ kortet"},de:{touch:"Verschieben der Karte mit zwei Fingern",scroll:"Verwende Strg+Scrollen zum Zoomen der Karte",scrollMac:"⌘"},el:{touch:"Χρησιμοποιήστε δύο δάχτυλα για μετακίνηση στον χάρτη",scroll:"Χρησιμοποιήστε το πλήκτρο Ctrl και κύλιση, για να μεγεθύνετε τον χάρτη",scrollMac:"Χρησιμοποιήστε το πλήκτρο ⌘ + κύλιση για εστίαση στον χάρτη"},en:{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-AU":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-GB":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},es:{touch:"Para mover el mapa, utiliza dos dedos",scroll:"Mantén pulsada la tecla Ctrl mientras te desplazas para acercar o alejar el mapa",scrollMac:"Mantén pulsada la tecla ⌘ mientras te desplazas para acercar o alejar el mapa"},eu:{touch:"Erabili bi hatz mapa mugitzeko",scroll:"Mapan zooma aplikatzeko, sakatu Ktrl eta egin gora edo behera",scrollMac:"Eduki sakatuta ⌘ eta egin gora eta behera mapa handitu eta txikitzeko"},fa:{touch:"برای حرکت دادن نقشه از دو انگشت استفاده کنید.",scroll:"‏برای بزرگ‌نمایی نقشه از ctrl + scroll استفاده کنید",scrollMac:"برای بزرگ‌نمایی نقشه، از ⌘ + پیمایش استفاده کنید."},fi:{touch:"Siirrä karttaa kahdella sormella.",scroll:"Zoomaa karttaa painamalla Ctrl-painiketta ja vierittämällä.",scrollMac:"Zoomaa karttaa pitämällä painike ⌘ painettuna ja vierittämällä."},fil:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},fr:{touch:"Utilisez deux doigts pour déplacer la carte",scroll:"Vous pouvez zoomer sur la carte à l'aide de CTRL+Molette de défilement",scrollMac:"Vous pouvez zoomer sur la carte à l'aide de ⌘+Molette de défilement"},gl:{touch:"Utiliza dous dedos para mover o mapa",scroll:"Preme Ctrl mentres te desprazas para ampliar o mapa",scrollMac:"Preme ⌘ e desprázate para ampliar o mapa"},gu:{touch:"નકશો ખસેડવા બે આંગળીઓનો ઉપયોગ કરો",scroll:"નકશાને ઝૂમ કરવા માટે ctrl + સ્ક્રોલનો ઉપયોગ કરો",scrollMac:"નકશાને ઝૂમ કરવા ⌘ + સ્ક્રોલનો ઉપયોગ કરો"},hi:{touch:"मैप एक जगह से दूसरी जगह ले जाने के लिए दो उंगलियों का इस्तेमाल करें",scroll:"मैप à
1¤•ो ज़ूम करने के लिए ctrl + स्क्रोल का उपयोग करें",scrollMac:"मैप को ज़ूम करने के लिए ⌘ + स्क्रोल का उपयोग करें"},hr:{touch:"Pomičite kartu pomoću dva prsta",scroll:"Upotrijebite Ctrl i klizač miÅ¡a da biste zumirali kartu",scrollMac:"Upotrijebite gumb ⌘ dok se pomičete za zumiranje karte"},hu:{touch:"Két ujjal mozgassa a térképet",scroll:"A térkép a ctrl + görgetés használatával nagyítható",scrollMac:"A térkép a ⌘ + görgetés használatával nagyítható"},id:{touch:"Gunakan dua jari untuk menggerakkan peta",scroll:"Gunakan ctrl + scroll untuk memperbesar atau memperkecil peta",scrollMac:"Gunakan ⌘ + scroll untuk memperbesar atau memperkecil peta"},it:{touch:"Utilizza due dita per spostare la mappa",scroll:"Utilizza CTRL + scorrimento per eseguire lo zoom della mappa",scrollMac:"Utilizza ⌘ + scorrimento per eseguire lo zoom della mappa"},iw:{touch:"הזז את המפה באמצעות שתי אצבעות",scroll:"‏אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ctrl וגלילה",scrollMac:"אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ⌘ וגלילה"},ja:{touch:"地図を移動させるには指 2 本で操作します",scroll:"地図をズームするには、Ctrl キーを押しながらスクロールしてください",scrollMac:"地図をズームするには、⌘ キーを押しながらスクロールしてください"},kn:{touch:"Use two fingers to move the map",scroll:"Use Ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},ko:{touch:"지도를 움직이려면 두 손가락을 사용하세요.",scroll:"지도를 확대/축소하려면 Ctrl을 누른 채 스크롤하세요.",scrollMac:"지도를 확대하려면 ⌘ + 스크롤 사용"},lt:{touch:"Perkelkite žemėlapį dviem pirÅ¡tais",scroll:"Slinkite nuspaudę klavišą „Ctrl“, kad pakeistumėte žemėlapio mastelį",scrollMac:"Paspauskite klavišą ⌘ ir slinkite, kad priartintumėte žemėlapį"},lv:{touch:"Lai pārvietotu karti, bÄ«diet to ar diviem pirkstiem",scroll:"Kartes tālummaiņai izmantojiet ctrl + ritināšanu",scrollMac:"Lai veiktu kartes tālummaiņu, izmantojiet ⌘ + ritināšanu"},ml:{touch:"മാപ്പ് നീക്കാൻ രണ്ട് വിരലുകൾ ഉപയോഗിക്കുക",scroll:"കൺട്രോൾ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക",scrollMac:"⌘ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക"},mr:{touch:"नकाशा हलविण्यासाठी दोन बोटे वापरा",scroll:"नकाशा झूम करण्यासाठी ctrl + scroll वापरा",scrollMac:"नकाशावर झूम करण्यासाठी ⌘ + स्क्रोल वापरा"},nl:{touch:"Gebruik twee vingers om de kaart te verplaatsen",scroll:"Gebruik Ctrl + scrollen om in- en uit te zoomen op de kaart",scrollMac:"Gebruik ⌘ + scrollen om in en uit te zoomen op de kaart"},no:{touch:"Bruk to fingre for Ã¥ flytte kartet",scroll:"Hold ctrl-tasten inne og rull for Ã¥ zoome pÃ¥ kartet",scrollMac:"Hold inne ⌘-tasten og rull for Ã¥ zoome pÃ¥ kartet"},pl:{touch:"Przesuń mapę dwoma palcami",scroll:"Naciśnij CTRL i przewiń, by przybliżyć mapę",scrollMac:"Naciśnij ⌘ i przewiń, by przybliżyć mapę"},pt:{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-BR":{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-PT":{touch:"Utilize dois dedos para mover o mapa",scroll:"Utilizar ctrl + deslocar para aumentar/diminuir zoom do mapa",scrollMac:"Utilize ⌘ + deslocar para aumentar/diminuir o zoom do mapa"},ro:{touch:"Folosiți două degete pentru a deplasa harta",scroll:"Apăsați tasta ctrl și derulați simultan pentru a mări harta",scrollMac:"Folosiți ⌘ și derulați pentru a mări/micșora harta"},ru:{touch:"Чтобы переместить карту, проведите по ней двумя пальцами",scroll:"Чтобы изменить масштаб, прокручивайте карту, удерживая клавишу Ctrl.",scrollMac:"Чтобы изменить масштаб, нажмите ⌘ + прокрутка"},sk:{touch:"Mapu môžete posunúť dvoma prstami",scroll:"Ak chcete priblížiÅ¥ mapu, stlačte kláves ctrl a posúvajte",scrollMac:"Ak chcete priblížiÅ¥ mapu, stlačte kláves ⌘ a posúvajte kolieskom myÅ¡i"},sl:{touch:"Premaknite zemljevid z dvema prstoma",scroll:"Zemljevid povečate tako, da držite tipko Ctrl in vrtite 
1kolesce na miški",scrollMac:"Uporabite ⌘ + funkcijo pomika, da povečate ali pomanjšate zemljevid"},sr:{touch:"Мапу померајте помоћу два прста",scroll:"Притисните ctrl тастер док померате да бисте зумирали мапу",scrollMac:"Притисните тастер ⌘ док померате да бисте зумирали мапу"},sv:{touch:"Använd två fingrar för att flytta kartan",scroll:"Använd ctrl + rulla för att zooma kartan",scrollMac:"Använd ⌘ + rulla för att zooma på kartan"},ta:{touch:"மேப்பை நகர்த்த இரண்டு விரல்களைப் பயன்படுத்தவும்",scroll:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ctrl பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்",scrollMac:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ⌘ பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்"},te:{touch:"మ్యాప్‌ని తరలించడం కోసం రెండు వేళ్లను ఉపయోగించండి",scroll:"మ్యాప్‌ని జూమ్ చేయడానికి ctrl బటన్‌ను నొక్కి ఉంచి, స్క్రోల్ చేయండి",scrollMac:"మ్యాప్ జూమ్ చేయాలంటే ⌘ + స్క్రోల్ ఉపయోగించండి"},th:{touch:"ใช้ 2 นิ้วเพื่อเลื่อนแผนที่",scroll:"กด Ctrl ค้างไว้ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่",scrollMac:"กด ⌘ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่"},tl:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},tr:{touch:"Haritada gezinmek için iki parmağınızı kullanın",scroll:"Haritayı yakınlaştırmak için ctrl + kaydırma kombinasyonunu kullanın",scrollMac:"Haritayı yakınlaştırmak için ⌘ tuşuna basıp ekranı kaydırın"},uk:{touch:"Переміщуйте карту двома пальцями",scroll:"Щоб змінювати масштаб карти, прокручуйте коліщатко миші, утримуючи клавішу Ctrl",scrollMac:"Щоб змінити масштаб карти, використовуйте ⌘ + прокручування"},vi:{touch:"Sử dụng hai ngón tay để di chuyển bản đồ",scroll:"Sử dụng ctrl + cuộn để thu phóng bản đồ",scrollMac:"Sử dụng ⌘ + cuộn để thu phóng bản đồ"},"zh-CN":{touch:"使用双指移动地图",scroll:"按住 Ctrl 并滚动鼠标滚轮才可缩放地图",scrollMac:"按住 ⌘ 并滚动鼠标滚轮才可缩放地图"},"zh-TW":{touch:"同時以兩指移動地圖",scroll:"按住 ctrl 鍵加上捲動滑鼠可以縮放地圖",scrollMac:"按 ⌘ 加上滾動捲軸可以縮放地圖"}},L.Map.mergeOptions({gestureHandlingOptions:{text:{},duration:1e3}}),n=!1,o=L.Handler.extend({addHooks:function(){this._handleTouch=this._handleTouch.bind(this),this._setupPluginOptions(),this._setLanguageContent(),this._disableInteractions(),this._map._container.addEventListener("touchstart",this._handleTouch),this._map._container.addEventListener("touchmove",this._handleTouch),this._map._container.addEventListener("touchend",this._handleTouch),this._map._container.addEventListener("touchcancel",this._handleTouch),this._map._container.addEventListener("click",this._handleTouch),L.DomEvent.on(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.on(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.on(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.on(this._map,"movestart",this._handleDragging,this),L.DomEvent.on(this._map,"move",this._handleDragging,this),L.DomEvent.on(this._map,"moveend",this._handleDragging,this)},removeHooks:function(){this._enableInteractions(),this._map._container.removeEventListener("touchstart",this._handleTouch),this._map._container.removeEventListener("touchmove",this._handleTouch),this._map._container.removeEventListener("touchend",this._handleTouch),this._map._container.removeEventListener("touchcancel",this._handleTouch),this._map._container.removeEventListener("click",this._handleTouch),L.DomEvent.off(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.off(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.off(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.off(this._map,"movestart",this._handleDragging,this),L.DomEvent.off(this._map,"move",this._handleDragging,this),L.DomEvent.off(this._map,"moveend",this._handleDragging,this)},_handleDragging:function(t){"movestart"==t.type||"move"==t.type?n=!0:"moveend"==t.type&&(n=!1)},_disableInteractions:function(){this._map.dragging.disable(),this._map.scrollWheelZoom.disable(),this._map.tap&&this._map.tap.disable()},_enableInteractions:function(){this._map.dragging.enable(),this._map.scrollWheelZoom.enable(),this._map.tap&&this._map.tap.enable()},_setupPluginOptions:function(){this._map.options.gestureHandlingText&&(this._map.options.gestureHandlingOptions.text=this._map.options.gestureHandlingText)},_setLanguageContent:function(){if(this._map.options.gestureHandlingOptions&&this._map.options.gestureHandlingOptions.text&&this._map.options.gestureHandlingOptions.text.touch&&this._map.options.gestureHandlingOptions.text.scroll&&this._map.options.gestureHandlingOptions.text.scrollMac)t=this._map.options.gestureHandlingOptions.text;else{var t,e=this._getUserLanguage();e||(e="en"),i[e]&&(t=i[e]),t||-1===e.indexOf("-")||(t=i[e=e.split("-")[0]]),t||(t=i[e="en"])}var n=!1;0<=navigator.platform.toUpperCase().indexOf("MAC")&&(n=!0);var o=t.scroll;n&&(o=t.scrollMac),this._map._container.setAttribute("data-gesture-handling-touch-content",t.touch),this._map._container.setAttribute("data-gesture-handling-scroll-content",o)},_getUserLanguage:function(){return navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage},_handleTouch:function(t){for(var e=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],i=!1,n=0;n<e.length;n++)L.DomUtil.hasClass(t.target,e[n])&&(i=!0);i?L.DomUtil.hasClass(t.target,"leaflet-interactive")&&"touchmove"===t.type&&1===t.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):L.Dom
1Util.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning"):"touchmove"===t.type||"touchstart"===t.type?1===t.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):(t.preventDefault(),this._enableInteractions(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")):L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")},_isScrolling:!1,_handleScroll:function(t){t.metaKey||t.ctrlKey?(t.preventDefault(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.enable()):(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.disable(),clearTimeout(this._isScrolling),this._isScrolling=setTimeout(function(){for(var t=document.getElementsByClassName("leaflet-gesture-handling-scroll-warning"),e=0;e<t.length;e++)L.DomUtil.removeClass(t[e],"leaflet-gesture-handling-scroll-warning")},this._map.options.gestureHandlingOptions.duration))},_handleMouseOver:function(t){this._enableInteractions()},_handleMouseOut:function(t){n||this._disableInteractions()}}),L.Map.addInitHook("addHandler","gestureHandling",o),e.GestureHandling=o,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})},872:function(t,e){/* @preserve
2 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
3 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4 */(function(t,i){i(e)})(this,function(t){"use strict";function e(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}var i,n,o,s,r,a,l,h,c=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function u(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var d=0;function p(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function m(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}}function f(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function _(){return!1}function g(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function v(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function y(t){return v(t).split(/\s+/)}function b(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?c(t.options):{}),e)t.options[i]=e[i];return t.options}function w(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(!e||-1===e.indexOf("?")?"?":"&")+n.join("&")}var x=/\{ *([\w_ -]+) *\}/g;function E(t,e){return t.replace(x,function(t,i){var n=e[i];if(void 0===n)throw Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var P=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function C(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return -1}var T="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function k(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var S=0;function M(t){var e=+new Date,i=Math.max(0,16-(e-S));return S=e+i,window.setTimeout(t,i)}var O=window.requestAnimationFrame||k("RequestAnimationFrame")||M,A=window.cancelAnimationFrame||k("CancelAnimationFrame")||k("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function z(t,e,i){if(!i||O!==M)return O.call(window,u(t,e));t.call(e)}function I(t){t&&A.call(window,t)}function F(){}F.extend=function(t){var i=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=i.__super__=this.prototype,o=c(n);for(var s in o.constructor=i,i.prototype=o,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(i[s]=this[s]);return t.statics&&e(i,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=P(t)?t:[t];for(var e=0;e<t.length;
4e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",Error().stack)}}(t.includes),e.apply(null,[o].concat(t.includes))),e(o,t),delete o.statics,delete o.includes,o.options&&(o.options=n.options?c(n.options):{},e(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},i},F.include=function(t){var i=this.prototype.options;return e(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},F.mergeOptions=function(t){return e(this.prototype.options,t),this},F.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var D={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=y(t);for(var o=0,s=t.length;o<s;o++)this._on(t[o],e,i)}return this},off:function(t,e,i){if(arguments.length){if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=y(t);for(var o=1==arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}}else delete this._events;return this},_on:function(t,e,i,n){if("function"!=typeof e){console.warn("wrong listener type: "+typeof e);return}if(!1===this._listens(t,e,i)){i===this&&(i=void 0);var o={fn:e,ctx:i};n&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}},_off:function(t,e,i){if(this._events&&(n=this._events[t])){if(1==arguments.length){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=_;delete this._events[t];return}if("function"!=typeof e){console.warn("wrong listener type: "+typeof e);return}var n,o,s,r=this._listens(t,e,i);if(!1!==r){var a=n[r];this._firingCount&&(a.fn=_,this._events[t]=n=n.slice()),n.splice(r,1)}}},fire:function(t,i,n){if(!this.listens(t,n))return this;var o=e({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var l=s[r],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e,i,n){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(n=!!e,o=void 0,i=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,o,i))return!0;if(n){for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,n))return!0}return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var o=0,s=n.length;o<s;o++)if(n[o].fn===e&&n[o].ctx===i)return o;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else{t=y(t);for(var o=0,s=t.length;o<s;o++)this._on(t[o],e,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};D.addEventListener=D.on,D.removeEventListener=D.clearAllEventListeners=D.off,D.addOneTimeEventListener=D.once,D.fireEvent=D.fire,D.hasEventListeners=D.listens;var B=F.extend(D);function N(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var R=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function Z(t,e,i){return t instanceof N?t:P(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,e,i)}function j(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function H(t,e){return!t||t instanceof j?t:new j(t,e)}function U(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}
4function q(t,e){return t instanceof U?t:new U(t,e)}function W(t,e,i){if(isNaN(t)||isNaN(e))throw Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function V(t,e,i){return t instanceof W?t:P(t)&&"object"!=typeof t[0]?3===t.length?new W(t[0],t[1],t[2]):2===t.length?new W(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new W(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new W(t,e,i)}N.prototype={clone:function(){return new N(this.x,this.y)},add:function(t){return this.clone()._add(Z(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(Z(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new N(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new N(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=R(this.x),this.y=R(this.y),this},distanceTo:function(t){var e=(t=Z(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=Z(t)).x===this.x&&t.y===this.y},contains:function(t){return Math.abs((t=Z(t)).x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}},j.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof N||"number"==typeof t[0]||"x"in t)e=i=Z(t);else if(e=(t=H(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return Z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return Z(this.min.x,this.max.y)},getTopRight:function(){return Z(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof N?Z(t):H(t))instanceof j?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=H(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=H(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.x<i.x,r=o.y>e.y&&n.y<i.y;return s&&r},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,o=Math.abs(e.y-i.y)*t;return H(Z(e.x-n,e.y-o),Z(i.x+n,i.y+o))},equals:function(t){return!!t&&(t=H(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},U.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof W)e=t,i=t;else if(!(t instanceof U))return t?this.extend(V(t)||q(t)):this;else if(e=t._southWest,i=t._northEast,!e||!i)return this;return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new W(e.lat,e.lng),this._northEast=new W(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new U(new W(e.lat-n,e.lng-o),new W(i.lat+n,i.lng+o))},getCenter:function(){return new W((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new W(this.getNorth(),this.getWest())},getSouthEast:function(){return new W(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
4,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof W||"lat"in t?V(t):q(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof U?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.lat<i.lat,r=o.lng>e.lng&&n.lng<i.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=q(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!!(this._southWest&&this._northEast)}},W.prototype={equals:function(t,e){return!!t&&(t=V(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+g(this.lat,t)+", "+g(this.lng,t)+")"},distanceTo:function(t){return G.distance(this,V(t))},wrap:function(){return G.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return q([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new W(this.lat,this.lng,this.alt)}};var $={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new j(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?f(t.lng,this.wrapLng,!0):t.lng;return new W(this.wrapLat?f(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0===n&&0===o)return t;
4var s=t.getSouthWest(),r=t.getNorthEast();return new U(new W(s.lat-n,s.lng-o),new W(r.lat-n,r.lng-o))}},G=e({},$,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r;return this.R*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}),K={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.sin(Math.max(Math.min(i,t.lat),-i)*e);return new N(this.R*t.lng*e,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(t){var e=180/Math.PI;return new W((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new j([-t,-t],[t,t])}()};function Y(t,e,i,n){if(P(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=i,this._d=n}function X(t,e,i,n){return new Y(t,e,i,n)}Y.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new N((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Q=e({},G,{code:"EPSG:3857",projection:K,transformation:X(l=.5/(Math.PI*K.R),.5,-l,.5)}),J=e({},Q,{code:"EPSG:900913"});function tt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function te(t,e){var i,n,o,s,r,a,l="";for(i=0,o=t.length;i<o;i++){for(n=0,s=(r=t[i]).length;n<s;n++)a=r[n],l+=(n?"L":"M")+a.x+" "+a.y;l+=e?tI.svg?"z":"x":""}return l||"M0 0"}var ti=document.documentElement.style,tn="ActiveXObject"in window,to=tn&&!document.addEventListener,ts="msLaunchUri"in navigator&&!("documentMode"in document),tr=tz("webkit"),ta=tz("android"),tl=tz("android 2")||tz("android 3"),th=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),tc=ta&&tz("Google")&&th<537&&!("AudioNode"in window),tu=!!window.opera,td=!ts&&tz("chrome"),tp=tz("gecko")&&!tr&&!tu&&!tn,tm=!td&&tz("safari"),tf=tz("phantom"),t_="OTransition"in ti,tg=0===navigator.platform.indexOf("Win"),tv=tn&&"transition"in ti,ty="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!tl,tb="MozPerspective"in ti,tw=!window.L_DISABLE_3D&&(tv||ty||tb)&&!t_&&!tf,tx="undefined"!=typeof orientation||tz("mobile"),tL=!window.PointerEvent&&window.MSPointerEvent,tE=!!(window.PointerEvent||tL),tP="ontouchstart"in window||!!window.TouchEvent,tC=!window.L_NO_TOUCH&&(tP||tE),tT=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,tk=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",_,e),window.removeEventListener("testPassiveEventSupport",_,e)}catch(t){}return t}(),tS=!!document.createElement("canvas").getContext,tM=!!(document.createElementNS&&tt("svg").createSVGRect),tO=!!tM&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),tA=!tM&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function tz(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var tI={ie:tn,ielt9:to,edge:ts,webkit:tr,android:ta,android23:tl,androidStock:tc,opera:tu,chrome:td,gecko:tp,safari:tm,phantom:tf,opera12:t_,win:tg,ie3d:tv,webkit3d:ty,gecko3d:tb,any3d:tw,mobile:tx,mobileWebkit:tx&&tr,mobileWebkit3d:tx&&ty,msPointer:tL,pointer:tE,touch:tC,touchNative:tP,mobileOpera:tx&&tu,mobileGecko:tx&&tp,retina:tT,passiveEvents:tk,canvas:tS,svg:tM,vml:tA,inlineSvg:tO,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},tF=tI.msPointer?"MSPointerDown":"pointerdown",tD=tI.msPointer?"MSPointerMove":"pointermove",tB=tI.msPointer?"MSPointerUp":"pointerup",tN=tI.msPointer?"MSPointerCancel":"pointercancel",tR={touchstart:tF,touchmove:tD,touchend:tB,touchcancel:tN},tZ={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&eb(e),tV(t,e)},touchmove:tV,touchend:tV,touchcancel:tV},tj={},tH=!1;function tU(t){tj[t.pointerId]=t}function tq(t){tj[t.pointerId]&&(tj[t.pointerId]=t)}function tW(t){delete tj[t.pointerId]}function tV(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],tj)e.touches.push(tj[i]);e.changedTouches=[e],t(e)}}var t$=t5(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),tG=t5(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tK="webkitTransition"===tG||"OTransition"===tG?tG+"End":"transitionend";function tY(t){return"string"==typeof t?document.getElementById(t):t}function tX(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function tQ(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function tJ(t){var e=t.parentNode;e&&e.removeChild(t)}function t0(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function t1(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function t2(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function t3(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=t7(t);return i.length>0&&RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function t6(t,e){if(void 0!==t.classList)for(var i=y(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!t3(t,e)){var s=t7(t);t9(t,(s?s+" ":"")+e)}}function t4(t,e){void 0!==t.classList?t.classList.remove(e):t9(t,v((" "+t7(t)+" ").replace(" "+e+" "," ")))}function t9(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function t7(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function t8(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function t5(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function et(t,e,i){var n=e||new N(0,0);t.style[t$]=(tI.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function ee(t,e){t._leaflet_pos=e,tI.any3d?et(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ei(t){return t._leaflet_pos||new N(0,0)}if("onselectstart"in document)i=function(){ec(window,"selectstart",eb)},n=function(){ed(window,"selectstart",eb)};else{var en=t5(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);i=function(){if(en){var t=document.documentElement.style;o=t[en],t[en]="none"}},n=function(){en&&(document.documentElement.style[en]=o,o=void 0)}}function eo(){ec(window,"dragstart",eb)}function es(){ed(window,"dragstart",eb)}function er(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(ea(),s=t,r=t.style.outlineStyle,t.style.outlineStyle="none",ec(window,"keydown",ea))}function ea(){s&&(s.style.outlineStyle=r,s=void 0,r=void 0,ed(window,"keydown",ea))}function el(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body)return t}function eh(t){var e=t.getBoundingClientRect();
4return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}function ec(t,e,i,n){if(e&&"object"==typeof e)for(var o in e)ef(t,o,e[o],i);else{e=y(e);for(var s=0,r=e.length;s<r;s++)ef(t,e[s],i,n)}return this}var eu="_leaflet_events";function ed(t,e,i,n){if(1==arguments.length)ep(t),delete t[eu];else if(e&&"object"==typeof e)for(var o in e)e_(t,o,e[o],i);else if(e=y(e),2==arguments.length)ep(t,function(t){return -1!==C(e,t)});else for(var s=0,r=e.length;s<r;s++)e_(t,e[s],i,n);return this}function ep(t,e){for(var i in t[eu]){var n=i.split(/\d/)[0];(!e||e(n))&&e_(t,n,null,null,i)}}var em={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function ef(t,e,i,n){var o=e+p(i)+(n?"_"+p(n):"");if(t[eu]&&t[eu][o])return this;var s=function(e){return i.call(n||t,e||window.event)},r=s;!tI.touchNative&&tI.pointer&&0===e.indexOf("touch")?s=function(t,e,i){return("touchstart"===e&&(tH||(document.addEventListener(tF,tU,!0),document.addEventListener(tD,tq,!0),document.addEventListener(tB,tW,!0),document.addEventListener(tN,tW,!0),tH=!0)),tZ[e])?(i=tZ[e].bind(this,i),t.addEventListener(tR[e],i,!1),i):(console.warn("wrong event specified:",e),_)}(t,e,s):tI.touch&&"dblclick"===e?s=function(t,e){t.addEventListener("dblclick",e);var i,n=0;function o(t){if(1!==t.detail){i=t.detail;return}if(!("mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents)){var o=ex(t);if(!o.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||o.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var s=Date.now();s-n<=200?2==++i&&e(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):i=1,n=s}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(em[e]||e,s,!!tI.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){eC(t,e=e||window.event)&&r(e)},t.addEventListener(em[e],s,!1)):t.addEventListener(e,r,!1):t.attachEvent("on"+e,s),t[eu]=t[eu]||{},t[eu][o]=s}function e_(t,e,i,n,o){o=o||e+p(i)+(n?"_"+p(n):"");var s=t[eu]&&t[eu][o];if(!s)return this;!tI.touchNative&&tI.pointer&&0===e.indexOf("touch")?function(t,e,i){if(!tR[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(tR[e],i,!1)}(t,e,s):tI.touch&&"dblclick"===e?(t.removeEventListener("dblclick",s.dblclick),t.removeEventListener("click",s.simDblclick)):"removeEventListener"in t?t.removeEventListener(em[e]||e,s,!1):t.detachEvent("on"+e,s),t[eu][o]=null}function eg(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function ev(t){return ef(t,"wheel",eg),this}function ey(t){return ec(t,"mousedown touchstart dblclick contextmenu",eg),t._leaflet_disable_click=!0,this}function eb(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function ew(t){return eb(t),eg(t),this}function ex(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function eL(t,e){if(!e)return new N(t.clientX,t.clientY);var i=eh(e),n=i.boundingClientRect;return new N((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var eE=tI.linux&&tI.chrome?window.devicePixelRatio:tI.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function eP(t){return tI.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/eE:t.deltaY&&1===t.deltaMode?-(20*t.deltaY):t.deltaY&&2===t.deltaMode?-(60*t.deltaY):t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&32765>Math.abs(t.detail)?-(20*t.detail):t.detail?-(t.detail/32765*60):0}function eC(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var eT=B.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ei(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=z(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),ee(this._el,i),this.fire("step")},_complete:function(){I(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ek=B.extend({options:{crs:Q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=b(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=u(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(V(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=tG&&tI.any3d&&!tI.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ec(this._proxy,tK,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
4,setView:function(t,i,n){return(i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(V(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan)))?clearTimeout(this._sizeTimer):this._resetView(t,i,n.pan&&n.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(tI.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(tI.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof N?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():q(t);var i=Z(e.paddingTopLeft||e.padding||[0,0]),n=Z(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};
4var s=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=q(t)).isValid())throw Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=Z(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new eT,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){t6(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!tI.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=V(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),h=o.distanceTo(n)||1;function c(t){var e=(l*l-a*a+(t?-1:1)*4.0658689599999995*h*h)/(2*(t?l:a)*2.0164*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function u(t){return(Math.exp(t)-Math.exp(-t))/2}function d(t){return(Math.exp(t)+Math.exp(-t))/2}var p=c(0),m=Date.now(),f=(c(1)-p)/1.42,_=i.duration?1e3*i.duration:1e3*f*.8;return this._moveStart(!0,i.noMoveStart),(function i(){var s,l=(Date.now()-m)/_,c=(1-Math.pow(1-l,1.5))*f;l<=1?(this._flyToFrame=z(i,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(a*(d(p)*(u(s=p+1.42*c)/d(s))-u(p))/2.0164/h)),r),this.getScaleZoom(a/(a*(d(p)/d(p+1.42*c))),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}).call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=q(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid())?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return(this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom))?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return(this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom))?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,q(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=Z((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=Z(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=H([r.min.add(i),r.max.subtract(n)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var h=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(l);o.x+=h.x<0?-c.x:c.x,o.y+=h.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),o=i.divideBy(2).round(),s=n.divideBy(2).round(),r=o.subtract(s);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(u(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}
4,locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=u(this._handleGeolocationResponse,this),n=u(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new W(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){var t;if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw 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}for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),tJ(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(I(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)tJ(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=tQ("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return(this._checkIfLoaded(),this._lastCenter&&!this._moved())?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new U(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=q(t),i=Z(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=H(this.project(a,n),this.project(r,n)).getSize(),c=tI.any3d?this.options.zoomSnap:1,u=l.x/h.x,d=l.y/h.y;return n=this.getScaleZoom(e?Math.max(u,d):Math.min(u,d),n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new N(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new j(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(V(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(Z(t),e)},layerPointToLatLng:function(t){var e=Z(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(V(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(V(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(q(t))},distance:function(t,e){return this.options.crs.distance(V(t),V(e))},containerPointToLayerPoint:function(t){return Z(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return Z(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(Z(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(V(t)))},mouseEventToContainerPoint:function(t){return eL(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=tY(t);if(e){if(e._leaflet_id)throw Error("Map container is already initialized.")}else throw Error("Map container not found.");ec(e,"scroll",this._onScroll,this),this._containerId=p(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&tI.any3d,t6(t,"leaflet-container"+(tI.touch?" leaflet-touch":"")+(tI.retina?" leaflet-retina":"")+(tI.ielt9?" leaflet-oldie":"")+(tI.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=tX(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==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),ee(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t6(t.markerPane,"leaflet-zoom-hide"),t6(t.shadowPane,"leaflet-zoom-hide"))}
4,_resetView:function(t,e,i){ee(this._mapPane,new N(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),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,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return I(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ee(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 Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[p(this._container)]=this;var e=t?ed:ec;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),tI.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){I(this._resizeRequest),this._resizeRequest=z(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[p(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)&&(o&&!eC(s,t)||(n.push(i),o))||s===this._container)break;s=s.parentNode}return!n.length&&!r&&!o&&this.listens(e,!0)&&(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&er(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){if("click"===t.type){var o=e({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var s=this._findEventTargets(t,i);if(n){for(var r=[],a=0;a<n.length;a++)n[a].listens(i,!0)&&r.push(n[a]);s=r.concat(s)}if(s.length){"contextmenu"===i&&eb(t);var l=s[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=c?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(i,h,!0),h.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==C(this._mouseEvents,i))return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ei(this._mapPane)||new N(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()}
4,_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return H([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),s=new j(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,i,e);return 1>=Math.abs(r.x)&&1>=Math.abs(r.y)?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new j(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=H(this.project(e.getNorthEast(),i),this.project(e.getSouthWest
4(),i)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new N(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=tI.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){t4(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!!((e&&e.animate)===!0||this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=tQ("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=this._proxy.style[t$];et(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[t$]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){tJ(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();et(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!!(!0===i.animate||this.getSize().contains(o))&&(z(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,t6(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(u(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&t4(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),eS=F.extend({options:{position:"topright"},initialize:function(t){b(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return t6(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(tJ(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),eM=function(t){return new eS(t)};ek.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=tQ("div",e+"control-container",this._container);function n(n,o){t[n+o]=tQ("div",e+n+" "+e+o,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)tJ(this._controlCorners[t]);tJ(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}
4);var eO=eS.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in b(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return eS.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(p(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){t6(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(t6(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):t4(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return t4(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=tQ("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),ey(e),ev(e);var n=this._section=tQ("section",t+"-list");i&&(this._map.on("click",this.collapse,this),ec(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=tQ("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),ec(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){eb(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=tQ("div",t+"-base",n),this._separator=tQ("div",t+"-separator",n),this._overlaysList=tQ("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&p(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(u(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;t0(this._baseLayersList),t0(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,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(p(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i=document.createElement("div");return i.innerHTML='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+p(this),n),this._layerControlInputs.push(e),e.layerId=p(t.layer),ec(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return i.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ec(t,"click",eb),this.expand();var e=this;setTimeout(function(){ed(t,"click",eb),e._preventClick=!1})}}),eA=eS.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=tQ("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}
4,_createButton:function(t,e,i,n,o){var s=tQ("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),ey(s),ec(s,"click",ew),ec(s,"click",o,this),ec(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";t4(this._zoomInButton,e),t4(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(t6(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(t6(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});ek.mergeOptions({zoomControl:!0}),ek.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new eA,this.addControl(this.zoomControl))});var ez=eS.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=tQ("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=tQ("div",e,i)),t.imperial&&(this._iScale=tQ("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),eI=eS.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(tI.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){b(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=tQ("div","leaflet-control-attribution"),ey(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});ek.mergeOptions({attributionControl:!0}),ek.addInitHook(function(){this.options.attributionControl&&new eI().addTo(this)}),eS.Layers=eO,eS.Zoom=eA,eS.Scale=ez,eS.Attribution=eI,eM.layers=function(t,e,i){return new eO(t,e,i)},eM.zoom=function(t){return new eA(t)},eM.scale=function(t){return new ez(t)},eM.attribution=function(t){return new eI(t)};var eF=F.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},enabled:function(){return!!this._enabled}});eF.addTo=function(t,e){return t.addHandler(e,this),this};var eD=tI.touch?"touchstart mousedown":"mousedown",eB=B.extend({options:{clickTolerance:3}
4,initialize:function(t,e,i,n){b(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(ec(this._dragStartTarget,eD,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(eB._dragging===this&&this.finishDrag(!0),ed(this._dragStartTarget,eD,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!(!this._enabled||(this._moved=!1,t3(this._element,"leaflet-zoom-anim")))){if(t.touches&&1!==t.touches.length){eB._dragging===this&&this.finishDrag();return}if(!(eB._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches)&&(eB._dragging=this,this._preventOutline&&er(this._element),eo(),i(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,n=el(this._element);this._startPoint=new N(e.clientX,e.clientY),this._startPos=ei(this._element),this._parentScale=eh(n);var o="mousedown"===t.type;ec(document,o?"mousemove":"touchmove",this._onMove,this),ec(document,o?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new N(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,eb(t),this._moved||(this.fire("dragstart"),this._moved=!0,t6(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),t6(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ee(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){t4(document.body,"leaflet-dragging"),this._lastTarget&&(t4(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ed(document,"mousemove touchmove",this._onMove,this),ed(document,"mouseup touchend touchcancel",this._onUp,this),es(),n();var e=this._moved&&this._moving;this._moving=!1,eB._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function eN(t,e,i){var n,o,s,r,a,l,h,c,u,d=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=eW(t[o],e);for(r=0;r<4;r++){for(o=0,c=d[r],n=[],s=(h=t.length)-1;o<h;s=o++)a=t[o],l=t[s],a._code&c?l._code&c||((u=eq(l,a,c,e,i))._code=eW(u,e),n.push(u)):(l._code&c&&((u=eq(l,a,c,e,i))._code=eW(u,e),n.push(u)),n.push(a));t=n}return t}function eR(t,e){if(!t||0===t.length)throw Error("latlngs not passed");e$(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var i,n,o,s,r,a,l,h,c,u=V([0,0]),d=q(t);
4d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=eZ(t));var p=t.length,m=[];for(i=0;i<p;i++){var f=V(t[i]);m.push(e.project(V([f.lat-u.lat,f.lng-u.lng])))}for(i=0,a=l=h=0,n=p-1;i<p;n=i++)o=m[i],s=m[n],r=o.y*s.x-s.y*o.x,l+=(o.x+s.x)*r,h+=(o.y+s.y)*r,a+=3*r;c=0===a?m[0]:[l/a,h/a];var _=e.unproject(Z(c));return V([_.lat+u.lat,_.lng+u.lng])}function eZ(t){for(var e=0,i=0,n=0,o=0;o<t.length;o++){var s=V(t[o]);e+=s.lat,i+=s.lng,n++}return V([e/n,i/n])}function ej(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=function(t,e){var i=t.length,n=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,s){var r,a,l,h=0;for(a=o+1;a<=s-1;a++)(l=eV(e[a],e[o],e[s],!0))>h&&(r=a,h=l);h>n&&(i[r]=1,t(e,i,n,o,r),t(e,i,n,r,s))}(t,n,e,0,i-1);var o,s=[];for(o=0;o<i;o++)n[o]&&s.push(t[o]);return s}(t=function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)(function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n})(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<s-1&&i.push(t[s-1]),i}(t,i),i)}function eH(t,e,i){return Math.sqrt(eV(t,e,i,!0))}function eU(t,e,i,n,o){var s,r,l,h=n?a:eW(t,i),c=eW(e,i);for(a=c;;){if(!(h|c))return[t,e];if(h&c)return!1;l=eW(r=eq(t,e,s=h||c,i,o),i),s===h?(t=r,h=l):(e=r,c=l)}}function eq(t,e,i,n,o){var s,r,a=e.x-t.x,l=e.y-t.y,h=n.min,c=n.max;return 8&i?(s=t.x+a*(c.y-t.y)/l,r=c.y):4&i?(s=t.x+a*(h.y-t.y)/l,r=h.y):2&i?(s=c.x,r=t.y+l*(c.x-t.x)/a):1&i&&(s=h.x,r=t.y+l*(h.x-t.x)/a),new N(s,r,o)}function eW(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function eV(t,e,i,n){var o,s=e.x,r=e.y,a=i.x-s,l=i.y-r,h=a*a+l*l;return h>0&&((o=((t.x-s)*a+(t.y-r)*l)/h)>1?(s=i.x,r=i.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,n?a*a+l*l:new N(s,r)}function e$(t){return!P(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function eG(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),e$(t)}function eK(t,e){if(!t||0===t.length)throw Error("latlngs not passed");e$(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var i,n,o,s,r,a,l,h,c=V([0,0]),u=q(t);
4u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=eZ(t));var d=t.length,p=[];for(i=0;i<d;i++){var m=V(t[i]);p.push(e.project(V([m.lat-c.lat,m.lng-c.lng])))}for(i=0,n=0;i<d-1;i++)n+=p[i].distanceTo(p[i+1])/2;if(0===n)h=p[0];else for(i=0,s=0;i<d-1;i++)if(r=p[i],a=p[i+1],(s+=o=r.distanceTo(a))>n){l=(s-n)/o,h=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}var f=e.unproject(Z(h));return V([f.lat+c.lat,f.lng+c.lng])}var eY={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new W(t.y,t.x)},bounds:new j([-180,-90],[180,90])},eX={R:6378137,R_MINOR:6356752.314245179,bounds:new j([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n);return n=-i*Math.log(Math.max(Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2),1e-10)),new N(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)h=Math.PI/2-2*Math.atan(r*(e=Math.pow((1-(e=s*Math.sin(a)))/(1+e),s/2)))-a,a+=h;return new W(a*i,t.x*i/n)}},eQ=e({},G,{code:"EPSG:3395",projection:eX,transformation:X(h=.5/(Math.PI*eX.R),.5,-h,.5)}),eJ=e({},G,{code:"EPSG:4326",projection:eY,transformation:X(1/180,1,-1/180,.5)}),e0=e({},$,{projection:eY,transformation:X(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});$.Earth=G,$.EPSG3395=eQ,$.EPSG3857=Q,$.EPSG900913=J,$.EPSG4326=eJ,$.Simple=e0;var e1=B.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[p(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});ek.include({addLayer:function(t){if(!t._layerAdd)throw Error("The provided object is not a Layer.");var e=p(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=p(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return p(t) in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?P(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=p(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var e2=e1.extend({initialize:function(t,e){var i,n;if(b(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1
4);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return p(t)}}),e3=e2.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),e2.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),e2.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new U;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),e6=F.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){b(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=Z(n),s=Z("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return tI.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),e4=e6.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof e4.imagePath&&(e4.imagePath=this._detectIconPath()),(this.options.imagePath||e4.imagePath)+e6.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=tQ("div","leaflet-default-icon-path",document.body),e=tX(t,"background-image")||tX(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),e9=eF.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new eB(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),t6(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&t4(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=ei(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),l=H(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!l.contains(s)){var h=Z((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),ee(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=z(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(I(this._panRequest),this._panRequest=z(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=ei(e._icon),o=e._map.layerPointToLatLng(n);i&&ee(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){I(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),e7=e1.extend({options:{icon:new e4,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){b(this,e),this._latlng=V(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=V(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),t6(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ec(i,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(t6(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}
4),this.options.autoPanOnFocus&&ed(this._icon,"focus",this._panOnFocus,this),tJ(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&tJ(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ee(this._icon,t),this._shadow&&ee(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(t6(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),e9)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new e9(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&t8(this._icon,t),this._shadow&&t8(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?Z(e.iconSize):Z(0,0),n=e.iconAnchor?Z(e.iconAnchor):Z(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),e8=e1.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return b(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),e5=e8.extend({options:{fill:!0,radius:10},initialize:function(t,e){b(this,e),this._latlng=V(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=V(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}
4,setStyle:function(t){var e=t&&t.radius||this._radius;return e8.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new j(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),it=e5.extend({initialize:function(t,i,n){if("number"==typeof i&&(i=e({},n,{radius:i})),b(this,i),this._latlng=V(t),isNaN(this.options.radius))throw Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new U(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:e8.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===G.distance){var o=Math.PI/180,s=this._mRadius/G.R/o,r=i.project([e+s,t]),a=i.project([e-s,t]),l=r.add(a).divideBy(2),h=i.unproject(l).lat,c=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(c)||0===c)&&(c=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([h,t-c]).x,this._radiusY=l.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}}),ie=e8.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){b(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,s=eV,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,c=l.length;h<c;h++){var u=s(t,e=l[h-1],i=l[h],!0);u<n&&(n=u,o=s(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw Error("Must add layer to map before using getCenter()");return eK(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=V(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new U,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return e$(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=e$(t),n=0,o=t.length;n<o;n++)i?(e[n]=V(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new j;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new N(t,t);this._rawPxBounds&&(this._pxBounds=new j([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof W,r=t.length;if(s){for(n=0,o=[];n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip){this._parts=this._rings;return}var e,i,n,o,s,r,a,l=this._parts;for(e=0,n=0,o=this._rings.length;e<o;e++)for(i=0,s=(a=this._rings[e]).length;i<s-1;i++)(r=eU(a[i],a[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(r[0]),(r[1]!==a[i+1]||i===s-2)&&(l[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=ej(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||!(0===n))&&eH(t,a[o],a[n])<=l)return!0;return!1}});ie._flat=eG;var ii=ie.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
4,getCenter:function(){if(!this._map)throw Error("Must add layer to map before using getCenter()");return eR(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ie.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof W&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){ie.prototype._setLatLngs.call(this,t),e$(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return e$(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new N(e,e);if(t=new j(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip){this._parts=this._rings;return}for(var n,o=0,s=this._rings.length;o<s;o++)(n=eN(this._rings[o],t,!0)).length&&this._parts.push(n)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(l=(e=this._parts[o]).length)-1;s<l;r=s++)(i=e[s]).y>t.y!==(n=e[r]).y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||ie.prototype._containsPoint.call(this,t,!0)}}),io=e3.extend({initialize:function(t,e){b(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=P(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=is(t,s);return r?(r.feature=id(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function is(t,e){var i,n,o,s="Feature"===t.type?t.geometry:t,r=s?s.coordinates:null,a=[],l=e&&e.pointToLayer,h=e&&e.coordsToLatLng||ia;if(!r&&!s)return null;switch(s.type){case"Point":return ir(l,t,i=h(r),e);case"MultiPoint":for(n=0,o=r.length;n<o;n++)i=h(r[n]),a.push(ir(l,t,i,e));return new e3(a);case"LineString":case"MultiLineString":return new ie(il(r,"LineString"===s.type?0:1,h),e);case"Polygon":case"MultiPolygon":return new ii(il(r,"Polygon"===s.type?1:2,h),e);case"GeometryCollection":for(n=0,o=s.geometries.length;n<o;n++){var c=is({geometry:s.geometries[n],type:"Feature",properties:t.properties},e);c&&a.push(c)}return new e3(a);case"FeatureCollection":for(n=0,o=s.features.length;n<o;n++){var u=is(s.features[n],e);u&&a.push(u)}return new e3(a);default:throw Error("Invalid GeoJSON object.")}}function ir(t,e,i,n){return t?t(e,i):new e7(i,n&&n.markersInheritOptions&&n)}function ia(t){return new W(t[1],t[0],t[2])}function il(t,e,i){for(var n=[],o=0,s=t.length;o<s;o++)n.push(e?il(t[o],e-1,i):(i||ia)(t[o]));return n}function ih(t,e){return void 0!==(t=V(t)).alt?[g(t.lng,e),g(t.lat,e),g(t.alt,e)]:[g(t.lng,e),g(t.lat,e)]}function ic(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?ic(t[s],e$(t[s])?0:e-1,i,n):ih(t[s],n));return!e&&i&&o.length>0&&o.push(o[0].slice()),o}function iu(t,i){return t.feature?e({},t.feature,{geometry:i}):id(i)}function id(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ip={toGeoJSON:function(t){return iu(this,{type:"Point",coordinates:ih(this.getLatLng(),t)})}};function im(t,e){return new io(t,e)}e7.include(ip),it.include(ip),e5.include(ip),ie.include({toGeoJSON:function(t){var e=!e$(this._latlngs),i=ic(this._latlngs,e?1:0,!1,t);return iu(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),ii.include({toGeoJSON:function(t){var e=!e$(this._latlngs),i=e&&!e$(this._latlngs[0]),n=ic(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),iu(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),e2.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),iu(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return(this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var s=id(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}}),i)?iu(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var i_=e1.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""}
4,initialize:function(t,e,i){this._url=t,this._bounds=q(e),b(this,i)},onAdd:function(){!this._image&&(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(t6(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){tJ(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&t1(this._image),this},bringToBack:function(){return this._map&&t2(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=q(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:tQ("img");if(t6(e,"leaflet-image-layer"),this._zoomAnimated&&t6(e,"leaflet-zoom-animated"),this.options.className&&t6(e,this.options.className),e.onselectstart=_,e.onmousemove=_,e.onload=u(this.fire,this,"load"),e.onerror=u(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;et(this._image,i,e)},_reset:function(){var t=this._image,e=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ee(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){t8(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ig=i_.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:tQ("video");if(t6(e,"leaflet-image-layer"),this._zoomAnimated&&t6(e,"leaflet-zoom-animated"),this.options.className&&t6(e,this.options.className),e.onselectstart=_,e.onmousemove=_,e.onloadeddata=u(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=i.length>0?n:[e.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var r=tQ("source");r.src=this._url[s],e.appendChild(r)}}}),iv=i_.extend({_initImage:function(){var t=this._image=this._url;t6(t,"leaflet-image-layer"),this._zoomAnimated&&t6(t,"leaflet-zoom-animated"),this.options.className&&t6(t,this.options.className),t.onselectstart=_,t.onmousemove=_}}),iy=e1.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof W||P(t))?(this._latlng=V(t),b(this,e)):(b(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&t8(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&t8(this._container,1),this.bringToFront(),this.options.interactive&&(t6(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(t8(this._container,0),this._removeTimeout=setTimeout(u(tJ,void 0,this._container),200)):tJ(this._container),this.options.interactive&&(t4(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=V(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&t1(this._container),this},bringToBack:function(){return this._map&&t2(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof e3){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t){if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw Error("Unable to get source layer LatLng.")}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=Z(this.options.offset),i=this._getAnchor();this._zoomAnimated?ee(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});
4ek.include({_initOverlay:function(t,e,i,n){var o=e;return o instanceof t||(o=new t(n).setContent(e)),i&&o.setLatLng(i),o}}),e1.include({_initOverlay:function(t,e,i,n){var o=i;return o instanceof t?(b(o,n),o._source=this):(o=e&&!n?e:new t(n,this)).setContent(i),o}});var ib=iy.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,iy.prototype.openOn.call(this,t)},onAdd:function(t){iy.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof e8||this._source.on("preclick",eg))},onRemove:function(t){iy.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof e8||this._source.off("preclick",eg))},getEvents:function(){var t=iy.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=tQ("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=tQ("div",t+"-content-wrapper",e);if(this._contentNode=tQ("div",t+"-content",i),ey(e),ev(this._contentNode),ec(e,"contextmenu",eg),this._tipContainer=tQ("div",t+"-tip-container",e),this._tip=tQ("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=tQ("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',ec(n,"click",function(t){eb(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.max(i=Math.min(i,this.options.maxWidth),this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&n>o?(e.height=o+"px",t6(t,s)):t4(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ee(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(tX(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new N(this._containerLeft,-i-this._containerBottom);o._add(ei(this._container));var s=t.layerPointToContainerPoint(o),r=Z(this.options.autoPanPadding),a=Z(this.options.autoPanPaddingTopLeft||r),l=Z(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),c=0,u=0;s.x+n+l.x>h.x&&(c=s.x+n-h.x+l.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+l.y>h.y&&(u=s.y+i-h.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return Z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ek.mergeOptions({closePopupOnClick:!0}),ek.include({openPopup:function(t,e,i){return this._initOverlay(ib,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),e1.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ib,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof e3||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){ew(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof e8)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}
4},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var iw=iy.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){iy.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){iy.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=iy.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=tQ("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+p(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,h=o.offsetHeight,c=Z(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):("center"===a?e=l/2:"right"===a?e=0:"left"===a?e=l:r.x<s.x?(a="right",e=0):(a="left",e=l+(c.x+u.x)*2),i=h/2),t=t.subtract(Z(e,i,!0)).add(c).add(u),t4(o,"leaflet-tooltip-right"),t4(o,"leaflet-tooltip-left"),t4(o,"leaflet-tooltip-top"),t4(o,"leaflet-tooltip-bottom"),t6(o,"leaflet-tooltip-"+a),ee(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&t8(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return Z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});ek.include({openTooltip:function(t,e,i){return this._initOverlay(iw,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),e1.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(iw,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,e.click=this._openTooltip,this._map?this._addFocusListeners():e.add=this._addFocusListeners),this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),this[t?"off":"on"](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof e3||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(ec(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),ec(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var ix=e6.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(t0(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=Z(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});e6.Default=e4;var iL=e1.extend({options:{tileSize:256,opacity:1,updateWhenIdle:tI.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){b(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),tJ(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(t1(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(t2(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=m(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof N?t:new N(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!tI.ielt9){t8(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);t8(o.el,s),s<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(I(this._fadeFrame),this._fadeFrame=z(this._updateOpacity,this))}},_onOpaqueTile:_,_initContainer:function(){this._container||(this._container=tQ("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(tJ(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=tQ("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),_(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:_,_onRemoveLevel:_,_onCreateLevel:_,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)tJ(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}
4,_retainParent:function(t,e,i,n){var o=Math.floor(t/2),s=Math.floor(e/2),r=i-1,a=new N(+o,+s);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>n&&this._retainParent(o,s,r,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new N(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];if(l&&l.active){l.retain=!0;continue}l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var s=this.options.updateWhenZooming&&o!==this._tileZoom;(!n||s)&&(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();tI.any3d?et(t.el,o,n):ee(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*n);return new j(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,l=new j(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new N(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}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 N(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;d<r.length;d++)this._addTile(r[d],f);this._level.el.appendChild(f)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return q(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new U(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new N(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(tJ(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){t6(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=_,t.onmousemove=_,tI.ielt9&&this.options.opacity<1&&t8(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),u(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&z(u(this._tileReady,this,t,null,o)),ee(o,i),this._tiles[n]={el:o,c
4oords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(t8(i.el,0),I(this._fadeFrame),this._fadeFrame=z(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(t6(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),tI.ielt9||!this._map._fadeAnimated?z(this._pruneTiles,this):setTimeout(u(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new N(this._wrapX?f(t.x,this._wrapX):t.x,this._wrapY?f(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new j(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}}),iE=iL.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=b(this,e)).detectRetina&&tI.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return ec(i,"load",u(this._tileOnLoad,this,e,i)),ec(i,"error",u(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var i={r:tI.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=n),i["-y"]=n}return E(this._url,e(i,this.options))},_tileOnLoad:function(t,e){tI.ielt9?setTimeout(u(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=_,e.onerror=_,!e.complete)){e.src=T;var i=this._tiles[t].coords;tJ(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",T),iL.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===T))return iL.prototype._tileReady.call(this,t,e,i)}});function iP(t,e){return new iE(t,e)}var iC=iE.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,i){this._url=t;var n=e({},this.defaultWmsParams);for(var o in i)o in this.options||(n[o]=i[o]);var s=(i=b(this,i)).detectRetina&&tI.retina?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},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,iE.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=H(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===eJ?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=iE.prototype.getTileUrl.call(this,t);return a+w(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});iE.WMS=iC,iP.wms=function(t,e){return new iC(t,e)};var iT=e1.extend({options:{padding:.1},initialize:function(t){b(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),t6(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));tI.any3d?et(this._container,s,i):ee(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).roun
4d();this._bounds=new j(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ik=iT.extend({options:{tolerance:0},getEvents:function(){var t=iT.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){iT.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ec(t,"mousemove",this._onMouseMove,this),ec(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ec(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){I(this._redrawRequest),delete this._ctx,tJ(this._container),ed(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){iT.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=tI.retina?2:1;ee(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",tI.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){iT.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[p(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[p(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(isNaN(e=Number(n[i])))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||z(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new j,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],l[n?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&(!("click"===t.type||"preclick"===t.type)||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving())&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(t4(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(t6(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(u(function(){this._mouseHoverThrottled=!1},this),32)}}
4,_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function iS(t){return tI.canvas?new ik(t):null}var iM=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),iO=tI.vml?iM:tt,iA=iT.extend({_initContainer:function(){this._container=iO("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=iO("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){tJ(this._container),ed(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){iT.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),ee(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=iO("path");t.options.className&&t6(e,t.options.className),t.options.interactive&&t6(e,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){tJ(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,te(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+-(2*i)+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){t1(t._path)},_bringToBack:function(t){t2(t._path)}});function iz(t){return tI.svg||tI.vml?new iA(t):null}tI.vml&&iA.include({_initContainer:function(){this._container=tQ("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(iT.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=iM("shape");t6(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=iM("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[p(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;tJ(e),t.removeInteractiveTarget(e),delete this._layers[p(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=iM("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=P(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=iM("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){t1(t._container)},_bringToBack:function(t){t2(t._container)}}),ek.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&&iS(t)||iz(t)}});var iI=ii.extend({initialize:function(t,e){ii.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))}
4,_boundsToLatLngs:function(t){return[(t=q(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});iA.create=iO,iA.pointsToPath=te,io.geometryToLayer=is,io.coordsToLatLng=ia,io.coordsToLatLngs=il,io.latLngToCoords=ih,io.latLngsToCoords=ic,io.getFeature=iu,io.asFeature=id,ek.mergeOptions({boxZoom:!0});var iF=eF.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(){ec(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ed(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){tJ(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(),i(),eo(),this._startPoint=this._map.mouseEventToContainerPoint(t),ec(document,{contextmenu:ew,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=tQ("div","leaflet-zoom-box",this._container),t6(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new j(this._point,this._startPoint),i=e.getSize();ee(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(tJ(this._box),t4(this._container,"leaflet-crosshair")),n(),es(),ed(document,{contextmenu:ew,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(u(this._resetState,this),0);var e=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ek.addInitHook("addHandler","boxZoom",iF),ek.mergeOptions({doubleClickZoom:!0});var iD=eF.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});ek.addInitHook("addHandler","doubleClickZoom",iD),ek.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var iB=eF.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new eB(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))}t6(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){t4(this._map._container,"leaflet-grab"),t4(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=q(this._map.options.maxBounds);this._offsetLimit=H(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Math.abs(o+i)<Math.abs(s+i)?o:s},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=o.multiplyBy(r/s),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),c=a.multiplyBy(h/l),u=h/(i.inertiaDeceleration*r),d=c.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),z(function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}
4)):e.fire("moveend")}}});ek.addInitHook("addHandler","dragging",iB),ek.mergeOptions({keyboard:!0,keyboardPanDelta:80});var iN=eF.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ec(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),ed(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){ec(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){ed(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!t.altKey&&!t.ctrlKey&&!t.metaKey){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress){if(e=this._panKeys[i],t.shiftKey&&(e=Z(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(Z(e),n.options.maxBounds)),n.options.worldCopyJump){var o=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(o)}else n.panBy(e)}}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}ew(t)}}});ek.addInitHook("addHandler","keyboard",iN),ek.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var iR=eF.extend({addHooks:function(){ec(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){ed(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=eP(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(u(this._performZoom,this),n),ew(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/M
4ath.LN2,o=i?Math.ceil(n/i)*i:n,s=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});ek.addInitHook("addHandler","scrollWheelZoom",iR),ek.mergeOptions({tapHold:tI.touchNative&&tI.safari&&tI.mobile,tapTolerance:15});var iZ=eF.extend({addHooks:function(){ec(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ed(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new N(e.clientX,e.clientY),this._holdTimeout=setTimeout(u(function(){this._cancel(),this._isTapValid()&&(ec(document,"touchend",eb),ec(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),600),ec(document,"touchend touchcancel contextmenu",this._cancel,this),ec(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){ed(document,"touchend",eb),ed(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),ed(document,"touchend touchcancel contextmenu",this._cancel,this),ed(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new N(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});ek.addInitHook("addHandler","tapHold",iZ),ek.mergeOptions({touchZoom:tI.touch,bounceAtZoomLimits:!0});var ij=eF.extend({addHooks:function(){t6(this._map._container,"leaflet-touch-zoom"),ec(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){t4(this._map._container,"leaflet-touch-zoom"),ed(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ec(document,"touchmove",this._onTouchMove,this),ec(document,"touchend touchcancel",this._onTouchEnd,this),eb(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),I(this._animRequest);var r=u(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=z(r,this,!0),eb(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,I(this._animRequest),ed(document,"touchmove",this._onTouchMove,this),ed(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ek.addInitHook("addHandler","touchZoom",ij),ek.BoxZoom=iF,ek.DoubleClickZoom=iD,ek.Drag=iB,ek.Keyboard=iN,ek.ScrollWheelZoom=iR,ek.TapHold=iZ,ek.TouchZoom=ij,t.Bounds=j,t.Browser=tI,t.CRS=$,t.Canvas=ik,t.Circle=it,t.CircleMarker=e5,t.Class=F,t.Control=eS,t.DivIcon=ix,t.DivOverlay=iy,t.DomEvent={__proto__:null,on:ec,off:ed,stopPropagation:eg,disableScrollPropagation:ev,disableClickPropagation:ey,preventDefault:eb,stop:ew,getPropagationPath:ex,getMousePosition:eL,getWheelDelta:eP,isExternalTarget:eC,addListener:ec,removeListener:ed},t.DomUtil={__proto__:null,TRANSFORM:t$,TRANSITION:tG,TRANSITION_END:tK,get:tY,getStyle:tX,create:tQ,remove:tJ,empty:t0,toFront:t1,toBack:t2,hasClass:t3,addClass:t6,removeClass:t4,setClass:t9,getClass:t7,setOpacity:t8,testProp:t5,setTransform:et,setPosition:ee,getPosition:ei,get disableTextSelection(){return i},get enableTextSelection(){return n},disableImageDrag:eo,enableImageDrag:es,preventOutline:er,restoreOutline:ea,getSizedParentNode:el,getScale:eh},t.Draggable=eB,t.Evented=B,t.FeatureGroup=e3,t.GeoJSON=io,t.GridLayer=iL,t.Handler=eF,t.Icon=e6,t.ImageOverlay=i_,t.LatLng=W,t.LatLngBounds=U,t.Layer=e1,t.LayerGroup=e2,t.LineUtil={__proto__:null,simplify:ej,pointToSegmentDistance:eH,closestPointOnSegment:function(t,e,
4i){return eV(t,e,i)},clipSegment:eU,_getEdgeIntersection:eq,_getBitCode:eW,_sqClosestPointOnSegment:eV,isFlat:e$,_flat:eG,polylineCenter:eK},t.Map=ek,t.Marker=e7,t.Mixin={Events:D},t.Path=e8,t.Point=N,t.PolyUtil={__proto__:null,clipPolygon:eN,polygonCenter:eR,centroid:eZ},t.Polygon=ii,t.Polyline=ie,t.Popup=ib,t.PosAnimation=eT,t.Projection={__proto__:null,LonLat:eY,Mercator:eX,SphericalMercator:K},t.Rectangle=iI,t.Renderer=iT,t.SVG=iA,t.SVGOverlay=iv,t.TileLayer=iE,t.Tooltip=iw,t.Transformation=Y,t.Util={__proto__:null,extend:e,create:c,bind:u,get lastId(){return d},stamp:p,throttle:m,wrapNum:f,falseFn:_,formatNum:g,trim:v,splitWords:y,setOptions:b,getParamString:w,template:E,isArray:P,indexOf:C,emptyImageUrl:T,requestFn:O,cancelFn:A,requestAnimFrame:z,cancelAnimFrame:I},t.VideoOverlay=ig,t.bind=u,t.bounds=H,t.canvas=iS,t.circle=function(t,e,i){return new it(t,e,i)},t.circleMarker=function(t,e){return new e5(t,e)},t.control=eM,t.divIcon=function(t){return new ix(t)},t.extend=e,t.featureGroup=function(t,e){return new e3(t,e)},t.geoJSON=im,t.geoJson=im,t.gridLayer=function(t){return new iL(t)},t.icon=function(t){return new e6(t)},t.imageOverlay=function(t,e,i){return new i_(t,e,i)},t.latLng=V,t.latLngBounds=q,t.layerGroup=function(t,e){return new e2(t,e)},t.map=function(t,e){return new ek(t,e)},t.marker=function(t,e){return new e7(t,e)},t.point=Z,t.polygon=function(t,e){return new ii(t,e)},t.polyline=function(t,e){return new ie(t,e)},t.popup=function(t,e){return new ib(t,e)},t.rectangle=function(t,e){return new iI(t,e)},t.setOptions=b,t.stamp=p,t.svg=iz,t.svgOverlay=function(t,e,i){return new iv(t,e,i)},t.tileLayer=iP,t.tooltip=function(t,e){return new iw(t,e)},t.transformation=X,t.version="1.9.4",t.videoOverlay=function(t,e,i){return new ig(t,e,i)};var iH=window.L;t.noConflict=function(){return window.L=iH,this},window.L=t})}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,i),s.exports}(()=>{i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e}})(),(()=>{i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}})(),(()=>{i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})(),(()=>{"use strict";let t,e;var n=i(857),o=i.n(n);class s{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=s.toUpperCamelCase(t,e);return s.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>s.ucFirst(t.toLowerCase())).join(""):s.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class r{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!r.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===r.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=e.replace(/^data(|-)/,""),o=s.toLowerCamelCase(n,"-");if(!r.isNode(t)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[o];if(void 0===a){if(i)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return s.parsePrimitive(a)}static querySelector(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!r.isNode(t))throw Error("The parent node is not a valid HTML Node!");let n=t.querySelector(e)||!1;if(i&&!1===n)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return n}static querySelectorAll(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!r.isNode(t))throw Error("The parent node is not a valid HTML Node!");let n=t.querySelectorAll(e);if(0===n.length&&(n=!1),i&&!1===n)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return n}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not
4([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}class a{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(n),n}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this,o=t.split("."),s=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=s;s=function(i){n.unsubscribe(t),e(i)}}return this.el.addEventListener(o[0],s),this.listeners.push({splitEventName:o,opts:i,cb:s}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class l{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=s.toDashCase(this._pluginName),i=r.getDataAttribute(this.el,"data-".concat(e,"-config"),!1),n=r.getAttribute(this.el,"data-".concat(e,"-options"),!1),a=[this.constructor.options,this.options,t];i&&a.push(window.PluginConfigManager.get(this._pluginName,i));try{n&&a.push(JSON.parse(n))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(e,'-options" could not be parsed to json: ').concat(t.message))}return o().all(a.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},i=!1){if(!r.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}class h{get(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",t,i);return this._sendRequest(n,null,e)}post(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(e,n);let o=this._createPreparedRequest("POST",t,n);return this._sendRequest(o,e,i)}delete(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(e,n);let o=this._createPreparedRequest("DELETE",t,n);return this._sendRequest(o,e,i)}patch(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(e,n);let o=this._createPreparedRequest("PATCH",t,n);return this._sendRequest(o,e,i)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn("the request to ".concat(t.responseURL," was aborted"))}),t.addEventListener("error",()=>{console.warn("the request to ".concat(t.responseURL," failed with status ").concat(t.status))}),t.addEventListener("timeout",()=>{console.warn("the request to ".concat(t.responseURL," timed out"))})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,i){return this._registerOnLoaded(t,i),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,i){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}class c{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var i of t.entries())e(i[1],i[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(i=>
4{e(t[i],i)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}class u{static serialize(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if("FORM"!==t.nodeName){if(e)throw Error("The passed element is not a form!");return{}}return new FormData(t)}static serializeJson(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=u.serialize(t,e);if(0===Object.keys(i).length)return{};let n={};return c.iterate(i,(t,e)=>n[e]=t),n}}class d extends l{init(){this._form=this.el,this._form&&(this._client=new h(window.accessKey,window.contextToken),this._reponse=null,this.el.addEventListener("submit",this._formSubmit.bind(this)))}_formSubmit(t){void 0!==t&&t.preventDefault();let e=r.getAttribute(this._form,"action").toLowerCase(),i=u.serialize(this._form);this._client.post(e,i,this._onLoaded.bind(this))}_onLoaded(t){this._reponse=JSON.parse(t),this._reponse.reload&&location.reload()}}d.options={};class p extends l{init(){this.el.dataset.moorlAnimation?this.config=JSON.parse(this.el.dataset.moorlAnimation):this.config=this.options,this.activeAnimation=null,this.animateInit(),this.animate(),this._registerEvents()}_registerEvents(){let t=this;window.addEventListener("scroll",function(){t.animate()},!1),this.el.addEventListener("mouseenter",()=>{!t.activeAnimation&&t.config.hover&&t.config.hover.active&&t.animateHover()}),this.el.addEventListener("animationstart",()=>{"in"===t.activeAnimation&&t.el.classList.remove("moorl-animation-hidden")}),this.el.addEventListener("animationend",()=>{"out"===t.activeAnimation&&t.el.classList.add("moorl-animation-hidden"),t.el.style={},t.activeAnimation=null,t.animate()})}_ms(t){return t.toString()+"ms"}_visible(t){return"isLoaded"===t||("isOverBottom"===t?this._isOverBottom():"isInViewport"===t?this._isInViewport():void 0)}_isInViewport(){return this.el.getBoundingClientRect().bottom<=(window.innerHeight||document.documentElement.clientHeight)}_isOverBottom(){return this.el.getBoundingClientRect().top<=(window.innerHeight||document.documentElement.clientHeight)}animateHover(){let t=this.config.hover;!this.el.classList.contains("moorl-animation-hidden")&&this._visible(t.condition)&&(this.activeAnimation="hover",this.el.style.animation=t.name,this.el.style.zIndex=9e3,this.el.style.animationDelay=this._ms(t.delay),this.el.style.animationDuration=this._ms(t.duration))}animateIn(){let t=this.config.in;this.el.classList.contains("moorl-animation-hidden")&&this._visible(t.condition)&&(this.activeAnimation="in",this.el.style.animation=t.name,this.el.style.zIndex=9e3,this.el.style.animationDelay=this._ms(t.delay),this.el.style.animationDuration=this._ms(t.duration))}animateOut(){let t=this.config.out;!this.el.classList.contains("moorl-animation-hidden")&&(this._visible(t.condition)||(this.activeAnimation="out",this.el.style.animation=t.name,this.el.style.animationDelay=this._ms(t.delay),this.el.style.animationDuration=this._ms(t.duration)))}animateInit(){let t=this.config;t.in&&t.in.active&&(this._visible(t.in.condition)?"isLoaded"===t.in.condition&&this.el.classList.add("moorl-animation-hidden"):this.el.classList.add("moorl-animation-hidden"))}animate(){!this.activeAnimation&&(this.config.in&&this.config.in.active&&this.animateIn(),this.config.out&&this.config.out.active&&this.animateOut())}}class m extends l{init(){this.options.actionUrl;let t=this.options.actionUrl,e=new Intl.RelativeTimeFormat(this.options.locale),i=new Date(this.options.from),n=this.el,o=new h(window.accessKey,window.contextToken);n.dataset.bsToggle||(n.innerText="---");let s="",r=setInterval(function(){let a=Math.floor((i.getTime()-new Date().getTime())/1e3);a<1&&t&&(clearInterval(r),setTimeout(()=>{o.get(t,t=>{(t=JSON.parse(t)).url?window.location.href=t.url:window.location.reload()})},5e3),a=0);let l=Math.trunc(a/86400),h=Math.trunc(a%86400/3600),c=Math.trunc(a%3600/60),u=Math.trunc(a%60);0!==l?s=e.format(l,"day"):0!==h?s=e.format(h,"hour"):0!==c?s=e.format(c,"minute"):0!==u&&(s=e.format(u,"second")),n.dataset.bsToggle?n.dataset.bsOriginalTitle=s:n.innerText=s},this.options.intervalTimeout)}}m.options={locale:document.documentElement.lang,intervalTimeout:1e3,from:"now",actionUrl:null};class f extends l{init(){this.options.actionUrl;let t=this.options.actionUrl;this.options.debug;let e=this.buildContainer(),i=new Date(this.options.from),n=(t,e)=>String(t).padStart(e,"0"),o=new h(window.accessKey,window.contextToken),s=setInterval(function(){let r=Math.floor((i.getTime()-new Date().getTime())/1e3);r<1&&(clearInterval(s),setTimeout(()=>{t?o.get(t,t=>{(t=JSON.parse(t)).url?window.location.href=t.url:window.location.reload()}):window.location.reload()},5e3),r=0);let a=Math.trunc(r/86400),l=Math.trunc(r%86400/3600),h=Math.trunc(r%3600/60),c=Math.trunc(r%60);e[0].innerText=n(a,2),e[1].innerText=n(l,2),e[2].innerText=n(h,2),e[3].innerText=n(c,2)},this.options.intervalTimeout)}buildContainer(){let t=[];for(let e of["days","hours","minutes","seconds"]){let i=document.createElement("div"),n=document.createElement("div"),o=document.createElement("div");n.classList.add("moorl-countdown-label"),n.innerText=this.options.label[e],o.classList.add("moorl-countdown-time"),o.innerText="--",i.appendChild(n),i.appendChild(o),t.push(o),this.el.appendChild(i)}return t}}f.options={locale:document.documentElement.lang,label:{days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},intervalTimeout:1e3,from:"now",actionUrl:null,debug:!1};var _=i(940);class g extends l{init(){this._priceElements=this.el.querySelectorAll("[data-price]"),this._productListItems=this.el.querySelectorAll("[data-moorl-product-buy-list-item]"),this._buyButton=this.el.querySelector("[data-moorl-product-buy-list-button]"),this._totalPriceElement=this.el.querySelector(".total-price"),this._discountPriceElement=this.el.querySelector(".discount-price"),this._selectedItemsElement=this.el.querySelector(".selected-items"),this._formValuesElement=this.el.querySelector(".form-values"),this._productIds=[],this._client=new h(window.accessKey,window.contextToken),this._updateTotalPrice(),this._registerEvents()}_registerEvents(){let t=this;this.el.addEventListener("change",e=>
4{if(t.el.querySelectorAll("[data-price]").forEach(i=>{e.target===i&&t._updateTotalPrice()}),"SELECT"===e.target.nodeName){var i;let n=e.target.closest("[data-moorl-product-buy-list-item]"),o=e.target.form;if(!n||!o)return;let s=o.action,r=new FormData(o),a={};r.forEach(function(t,e){a[e]=t});let l={};for(let[e,i]of Object.entries(t.options))l[e]=i;let h={switched:e.target.name,options:JSON.stringify(a),quantity:(i=n.dataset.quantity)!==null&&void 0!==i?i:1,templateOptions:JSON.stringify(l),enablePrices:t.options.enablePrices,enableAddToCartSingle:t.options.enableAddToCartSingle,enableAddToCartAll:t.options.enableAddToCartAll};t._client.get(s+"?"+_.stringify(h),e=>{n.innerHTML=e,t._updateTotalPrice(),window.PluginManager.initializePlugins()})}})}_updateTotalPrice(){if(!this.options.enableAddToCartAll)return;let t=this,e=new Intl.NumberFormat(this.options.locale,{style:"currency",currency:this.options.currencyIso}),i=0,n=0,o=!0;this._formValuesElement.innerHTML=null,0===this._productIds.length&&this.el.querySelectorAll("[data-price]").forEach(t=>{this._productIds.push(t.value)}),this.el.querySelectorAll("[data-price]").forEach(e=>{if(!e.checked){o=!1;return}this._productIds.includes(e.value)||(o=!1),i+=parseFloat(e.dataset.price)*parseInt(e.dataset.quantity),n++,t._createFormValues(e.value,e.dataset.quantity)}),this._totalPriceElement.innerText=e.format(i)+this.options.star,this.options.discountValue>0&&(o?(this._totalPriceElement.classList.add("striked"),this._discountPriceElement.classList.remove("d-none")):(this._totalPriceElement.classList.remove("striked"),this._discountPriceElement.classList.add("d-none")),this._discountPriceElement.innerText=e.format(i-this.options.discountValue/100*i)+this.options.star),this._selectedItemsElement&&(this._selectedItemsElement.innerText=n),this._buyButton.disabled=0===n}_createFormValues(t,e){this._formValuesElement.appendChild(this._createFormValue("lineItems[".concat(t,"][id]"),t)),this._formValuesElement.appendChild(this._createFormValue("lineItems[".concat(t,"][type]"),"product")),this._formValuesElement.appendChild(this._createFormValue("lineItems[".concat(t,"][referencedId]"),t)),this._formValuesElement.appendChild(this._createFormValue("lineItems[".concat(t,"][stackable]"),1)),this._formValuesElement.appendChild(this._createFormValue("lineItems[".concat(t,"][removable]"),1)),this._formValuesElement.appendChild(this._createFormValue("lineItems[".concat(t,"][quantity]"),e))}_createFormValue(t,e){let i=document.createElement("input");return i.type="hidden",i.value=e,i.name=t,i}}g.options={locale:document.documentElement.lang,currencyIso:"EUR",enablePrices:!0,enableAddToCartSingle:!0,enableAddToCartAll:!0,productQuantities:{},discountValue:0,star:"*"};class v extends l{init(){}_registerEvents(){}}v.options={};class y extends l{init(){this._cmsPageElement=document.querySelector(".cms-page"),this._headingElements=this._cmsPageElement.querySelectorAll("h2,h3,h5,h5,h6"),this._selectedTocLink=window.location.hash,this._selectedHeadline=null,this._registerEvents()}_registerEvents(){let t=this;window.addEventListener("scroll",e=>{t._onScroll()})}_onScroll(){let t=this._currentSection();t!==this._selectedTocLink&&(this._selectedTocLink=t,this._selectTocLink(this._selectedTocLink))}_currentSection(){return(this._headingElements.forEach(t=>{""!==t.id&&(""===this._selectedTocLink&&(this._selectedHeadline=t,this._selectedTocLink=" "),t.getBoundingClientRect().top<=50&&(this._selectedHeadline=t))}),null!==this._selectedHeadline)?this._selectedHeadline.id:this._selectedTocLink}_selectTocLink(t){""!==t.trim()&&(this.el.querySelectorAll(".active").forEach(t=>{t.classList.remove("active")}),this._getParents(this.el.querySelector('a[href="#'+t+'"]'),"li").forEach(t=>{t.classList.add("active")}))}_getParents(t,e){let i=[];for(;t&&t!==document;t=t.parentNode){if(e){t.matches(e)&&i.push(t);continue}i.push(t)}return i}}y.options={};class b extends l{init(){this.options.isSticky&&this._registerEvents()}_registerEvents(){let t=this;window.addEventListener("scroll",e=>{t._onScroll()})}_onScroll(){(document.documentElement.scrollTop||document.body.scrollTop||0)<this.el.getBoundingClientRect().top+this.el.ownerDocument.defaultView.pageYOffset?this.el.style.paddingTop="0":this.el.style.paddingTop=this.options.offsetTop}}b.options={offsetTop:0,isSticky:!1};
4class w extends l{init(){"paintWorklet"in CSS&&(CSS.paintWorklet.addModule("".concat(this.options.assetPath,"dots.js")),CSS.paintWorklet.addModule("".concat(this.options.assetPath,"generateddots.js"))),this.el.addEventListener("mousemove",t=>{let e=this.el.getBoundingClientRect();this.el.style.setProperty("--mouse-x",t.clientX-e.left),this.el.style.setProperty("--mouse-y",t.clientY-e.top)})}}w.options={assetPath:"/bundles/moorlfoundation/storefront/js/paint/"};class x extends l{_init(){super._init(),this._validateMethods();let t=r.querySelector(document,this.options.parentFilterPanelSelector);this.listing=window.PluginManager.getPluginInstanceFromElement(t,"Listing"),this.listing.registerFilter(this),this._preventDropdownClose()}_preventDropdownClose(){let t=r.querySelector(this.el,this.options.dropdownSelector,!1);t&&t.addEventListener("click",t=>{t.stopPropagation()})}_validateMethods(){if("function"!=typeof this.getValues)throw Error("[".concat(this._pluginName,'] Needs the method "getValues"\''));if("function"!=typeof this.getLabels)throw Error("[".concat(this._pluginName,'] Needs the method "getLabels"\''));if("function"!=typeof this.reset)throw Error("[".concat(this._pluginName,'] Needs the method "reset"\''));if("function"!=typeof this.resetAll)throw Error("[".concat(this._pluginName,'] Needs the method "resetAll"\''))}}x.options={parentFilterPanelSelector:".cms-element-product-listing-wrapper",dropdownSelector:".filter-panel-item-dropdown"};class E{static isSupported(){return"undefined"!==document.cookie}static setItem(t,e,i){if(null==t)throw Error("You must specify a key to set a cookie");let n=new Date;n.setTime(n.getTime()+864e5*i);let o="";"https:"===location.protocol&&(o="secure"),document.cookie="".concat(t,"=").concat(e,";expires=").concat(n.toUTCString(),";path=/;sameSite=lax;").concat(o)}static getItem(t){if(!t)return!1;let e=t+"=",i=document.cookie.split(";");for(let t=0;t<i.length;t++){let n=i[t];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(e))return n.substring(e.length,n.length)}return!1}static removeItem(t){document.cookie="".concat(t,"= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/")}static key(){return""}static clear(){}}class P extends x{init(){this._container=r.querySelector(this.el,this.options.containerSelector),this._inputLocation=r.querySelector(this.el,this.options.inputLocationSelector),this._inputDistance=r.querySelector(this.el,this.options.inputDistanceSelector),this.options.filterRadiusPersist&&(this._inputPersist=r.querySelector(this.el,this.options.inputPersistSelector)),this._timeout=null,this._hasError=!1,this.options.defaultValue&&(this._inputDistance.value=this.options.defaultValue),this._registerEvents(),this._setValuesFromCookie()}_registerEvents(){this._inputLocation.addEventListener("input",this._onChangeInput.bind(this)),this._inputDistance.addEventListener("input",this._onChangeInput.bind(this)),this.options.filterRadiusPersist&&this._inputPersist.addEventListener("change",this._onChangeInput.bind(this))}_onChangeInput(){clearTimeout(this._timeout),this._timeout=setTimeout(()=>{this._isInputInvalid()?this._setError():(this._removeError(),this.listing.changeListing())},this.options.inputTimeout)}getValues(){let t={};return t[this.options.locationKey]=this._inputLocation.value,t[this.options.distanceKey]=this._inputDistance.value,this.options.filterRadiusPersist&&(t[this.options.persistKey]=!!this._inputPersist.checked),t}_isInputInvalid(){let t=this._inputLocation.value.length<3,e=0===this._inputDistance.value.length;return t||e}_getErrorMessageTemplate(){return'<div class="'.concat(this.options.errorContainerClass,'">').concat(this.options.snippets.filterRadiusErrorMessage,"</div>")}_setError(){this._hasError||(this._inputLocation.classList.add(this.options.inputInvalidCLass),this._inputDistance.classList.add(this.options.inputInvalidCLass),this._container.insertAdjacentHTML("afterend",this._getErrorMessageTemplate()),this._hasError=!0)}_removeError(){this._inputLocation.classList.remove(this.options.inputInvalidCLass),this._inputDistance.classList.remove(this.options.inputInvalidCLass);let t=r.querySelector(this.el,".".concat(this.options.errorContainerClass),!1);t&&t.remove(),this._hasError=!1}_setValuesFromCookie(){try{let t=E.getItem(this.options.persistKey);if(this.options.filterRadiusPersist&&t){let e=JSON.parse(decodeURIComponent(t));this._inputLocation.value=e[this.options.locationKey],this._inputDistance.value=e[this.options.distanceKey],this._inputPersist.checked=!0,this._onChangeInput()}}catch(t){}}setValuesFromUrl(t){let e=!1;return Object.keys(t).forEach(i=>
4{i===this.options.locationKey&&(this._inputLocation.value=t[i],e=!0),i===this.options.distanceKey&&(this._inputDistance.value=t[i],e=!0),this.options.filterRadiusPersist&&i===this.options.persistKey&&(this._inputPersist.checked=t[i],e=!0)}),e}getLabels(){let t=[];return this._inputLocation.value.length&&this._inputDistance.value.length?this._inputLocation.value.length&&t.push({label:"".concat(this._inputDistance.value).concat(this.options.snippets.filterRadiusActiveDistanceLabel," ").concat(this.options.snippets.filterRadiusActiveLocationLabel,' "').concat(this._inputLocation.value,'"'),id:this.options.locationKey}):t=[],t}reset(t){t===this.options.locationKey&&(this._inputLocation.value=""),t===this.options.distanceKey&&(this._inputDistance.value=""),this.options.filterRadiusPersist&&t===this.options.persistKey&&(this._inputPersist.checked=!1),this._removeError()}resetAll(){this._inputLocation.value="",this._inputDistance.value="",this.options.filterRadiusPersist&&(this._inputPersist.checked=!1),this._removeError()}}P.options=o()(x.options,{inputLocationSelector:".location",inputDistanceSelector:".distance",inputPersistSelector:".radius-persist",inputInvalidCLass:"is-invalid",inputTimeout:1e3,locationKey:"location",distanceKey:"distance",persistKey:"radius-persist",errorContainerClass:"filter-radius-error",containerSelector:".filter-radius-container",defaultValue:null,filterRadiusPersist:!1,snippets:{filterRadiusActiveLocationLabel:"",filterRadiusActiveDistanceLabel:"",filterRadiusErrorMessage:""}});class C extends x{init(){this._container=r.querySelector(this.el,this.options.containerSelector),this._inputSearch=r.querySelector(this.el,this.options.inputSearchSelector),this._timeout=null,this._hasError=!1,this._registerEvents()}_registerEvents(){this._inputSearch.addEventListener("input",this._onChangeInput.bind(this))}_onChangeInput(){clearTimeout(this._timeout),this._timeout=setTimeout(()=>{this._isInputInvalid()?this._setError():this._removeError(),this.listing.changeListing()},this.options.inputTimeout)}getValues(){let t={};return t[this.options.searchKey]=this._inputSearch.value,t}_isInputInvalid(){return this._inputSearch.value.length<4}_getErrorMessageTemplate(){return'<div class="'.concat(this.options.errorContainerClass,'">').concat(this.options.snippets.filterSearchErrorMessage,"</div>")}_setError(){this._hasError||(this._inputSearch.classList.add(this.options.inputInvalidCLass),this._inputDistance.classList.add(this.options.inputInvalidCLass),this._container.insertAdjacentHTML("afterend",this._getErrorMessageTemplate()),this._hasError=!0)}_removeError(){this._inputSearch.classList.remove(this.options.inputInvalidCLass);let t=r.querySelector(this.el,".".concat(this.options.errorContainerClass),!1);t&&t.remove(),this._hasError=!1}setValuesFromUrl(t){let e=!1;return Object.keys(t).forEach(i=>{i===this.options.searchKey&&(this._inputSearch.value=t[i],e=!0)}),e}getLabels(){let t=[];return this._inputSearch.value.length?this._inputSearch.value.length&&t.push({label:"".concat(this._inputSearch.value),id:this.options.searchKey}):t=[],t}reset(t){t===this.options.searchKey&&(this._inputSearch.value=""),this._removeError()}resetAll(){this._inputSearch.value="",this._removeError()}}C.options=o()(x.options,{inputSearchSelector:".search",inputInvalidCLass:"is-invalid",inputTimeout:1e3,searchKey:"search",containerSelector:".filter-search-container"});var T=function t(){var e=[].slice.call(arguments),i=!1;"boolean"==typeof e[0]&&(i=e.shift());var n=e[0];if(k(n))throw Error("extendee must be an object");for(var o=e.slice(1),s=o.length,r=0;r<s;r++){var a=o[r];for(var l in a)if(Object.prototype.hasOwnProperty.call(a,l)){var h=a[l];if(i&&(Array.isArray(h)||"[object Object]"==({}).toString.call(h))){var c=Array.isArray(h)?[]:{};n[l]=t(!0,Object.prototype.hasOwnProperty.call(n,l)&&!k(n[l])?n[l]:c,h)}else n[l]=h}}return n};function k(t){return!t||"object"!=typeof t&&"function"!=typeof t}class S{on(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}emit(t,...e){this._callbacks=this._callbacks||{};let i=this._callbacks[t];if(i)for(let t of i)t.apply(this,e);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+t,{args:e})),this}makeEvent(t,e){let i={bubbles:!0,cancelable:!0,detail:e};if("function"==typeof window.CustomEvent)return new CustomEvent(t,i);var n=document.createEvent("CustomEvent");
4return n.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),n}off(t,e){if(!this._callbacks||0==arguments.length)return this._callbacks={},this;let i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(let t=0;t<i.length;t++)if(i[t]===e){i.splice(t,1);break}return this}}let M={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(t,e,i){if(i)return{dzuuid:i.file.upload.uuid,dzchunkindex:i.index,dztotalfilesize:i.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:i.file.upload.totalChunkCount,dzchunkbyteoffset:i.index*this.options.chunkSize}},accept:(t,e)=>e(),chunksUploaded:function(t,e){e()},binaryBody:!1,fallback(){let t;for(let e of(this.element.className=`${this.element.className} dz-browser-not-supported`,this.element.getElementsByTagName("div")))if(/(^| )dz-message($| )/.test(e.className)){t=e,e.className="dz-message";break}t||(t=O.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t));let e=t.getElementsByTagName("span")[0];return e&&(null!=e.textContent?e.textContent=this.options.dictFallbackMessage:null!=e.innerText&&(e.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(t,e,i,n){let o={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},s=t.width/t.height;null==e&&null==i?(e=o.srcWidth,i=o.srcHeight):null==e?e=i*s:null==i&&(i=e/s),e=Math.min(e,o.srcWidth),i=Math.min(i,o.srcHeight);let r=e/i;if(o.srcWidth>e||o.srcHeight>i){if("crop"===n)s>r?(o.srcHeight=t.height,o.srcWidth=o.srcHeight*r):(o.srcWidth=t.width,o.srcHeight=o.srcWidth/r);else if("contain"===n)s>r?i=e/s:e=i*s;else throw Error(`Unknown resizeMethod '${n}'`)}return o.srcX=(t.width-o.srcWidth)/2,o.srcY=(t.height-o.srcHeight)/2,o.trgWidth=e,o.trgHeight=i,o},transformFile(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:function(t){return t&&t.__esModule?t.default:t}('<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail=""></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size=""></span></div>\n    <div class="dz-filename"><span data-dz-name=""></span></div>\n  </div>\n  <div class="dz-progress">\n    <span class="dz-upload" data-dz-uploadprogress=""></span>\n  </div>\n  <div class="dz-error-message"><span data-dz-errormessage=""></span></div>\n  <div class="dz-success-mark">\n    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n      <path d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"></path>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n      <path d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"></path>\n    </svg>\n  </div>\n</div>\n'),drop(t){return this.element.classList.remove("dz-drag-hover")},dragstart(t){},dragend(t){return this.element.classList.remove("dz-drag-hover")},dragenter(t){return this.element.classList.add("dz-drag-hover")},dragover(t){return this.element.classList.add("dz-drag-hover")},dragleave(t){return this.element.classList.remove("dz-drag-hover")},paste(t){},reset(){return this.element.classList.remove("dz-started")},addedfile(t){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){for(var e of(t.previewElement=O.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),t.previewElement.querySelectorAll("[data-dz-name]")))e.textContent=t.name;for(e of t.previewElement.querySelectorAll("[data-dz-size]"))e.innerHTML=this.filesize(t.size);this.options.addRemoveLinks&&(t._removeLink=O.createElement(`<a class="dz-remove" href="javascript:undefined;" data-dz-remove>${this.options.dictRemoveFile}</a>`),t.previewElement.appendChild(t._removeLink));let i=e=>(e.preventDefault(),e.stopPropagation(),t.status===O.UPLOADING)?O.confirm(this.options.dictCancelUploadConfirmation,()=>this.removeFile(t)):this.options.dictRemoveFileConfirmation?O.confirm(this.options.dictRemoveFileConfirmation,()=>this.removeFile(t)):this.removeFile(t);for(let e of t.previewElement.querySelectorAll("[data-dz-remove]"))e.addEventListener("click",i)}},removedfile(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail(t,e){if(t.previewElement){for(let i of(t.previewElement.classList.remove("dz-file-preview"),t.previewElement.querySelectorAll("[data-dz-thumbnail]")))i.alt=t.name,i.src=e;return setTimeout(()=>t.previewElement.classList.add("dz-image-preview"),1)}},error(t,e){if(t.previewElement)for(let i of(t.previewElement.classList.add("dz-error"),"string"!=typeof e&&e.error&&(e=e.error),t.previewElement.querySelectorAll("[data-dz-errormessage]")))i.textContent=e},errormultiple(){},processing(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(t,e,i){if(t.previewElement)for(let i of t.previewElement.querySelectorAll("[data-dz-uploadprogress]"))"PROGRESS"===i.nodeName?i.value=e:i.style.width=`${e}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple(){}
4,canceled(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple(){},complete(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};class O extends S{static initClass(){this.prototype.Emitter=S,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter(t=>t.accepted).map(t=>t)}getRejectedFiles(){return this.files.filter(t=>!t.accepted).map(t=>t)}getFilesWithStatus(t){return this.files.filter(e=>e.status===t).map(t=>t)}getQueuedFiles(){return this.getFilesWithStatus(O.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(O.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(O.ADDED)}getActiveFiles(){return this.files.filter(t=>t.status===O.UPLOADING||t.status===O.QUEUED).map(t=>t)}init(){if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(O.createElement(`<div class="dz-default dz-message"><button class="dz-button" type="button">${this.options.dictDefaultMessage}</button></div>`)),this.clickableElements.length){let t=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(null===this.options.maxFiles||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",null!==this.options.acceptedFiles&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),null!==this.options.capture&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",O.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",()=>{let{files:e}=this.hiddenFileInput;if(e.length)for(let t of e)this.addFile(t);this.emit("addedfiles",e),t()})};t()}for(let t of(this.URL=null!==window.URL?window.URL:window.webkitURL,this.events))this.on(t,this.options[t]);this.on("uploadprogress",()=>this.updateTotalUploadProgress()),this.on("removedfile",()=>this.updateTotalUploadProgress()),this.on("canceled",t=>this.emit("complete",t)),this.on("complete",t=>{if(0===this.getAddedFiles().length&&0===this.getUploadingFiles().length&&0===this.getQueuedFiles().length)return setTimeout(()=>
4this.emit("queuecomplete"),0)});let t=function(t){if(t.dataTransfer.types){for(var e=0;e<t.dataTransfer.types.length;e++)if("Files"===t.dataTransfer.types[e])return!0}return!1},e=function(e){if(t(e))return(e.stopPropagation(),e.preventDefault)?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:t=>this.emit("dragstart",t),dragenter:t=>(e(t),this.emit("dragenter",t)),dragover:t=>{let i;try{i=t.dataTransfer.effectAllowed}catch(t){}return t.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",e(t),this.emit("dragover",t)},dragleave:t=>this.emit("dragleave",t),drop:t=>(e(t),this.drop(t)),dragend:t=>this.emit("dragend",t)}}],this.clickableElements.forEach(t=>this.listeners.push({element:t,events:{click:e=>((t!==this.element||e.target===this.element||O.elementInside(e.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}})),this.enable(),this.options.init.call(this)}destroy(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,O.instances.splice(O.instances.indexOf(this),1)}updateTotalUploadProgress(){let t;let e=0,i=0;if(this.getActiveFiles().length){for(let t of this.getActiveFiles())e+=t.upload.bytesSent,i+=t.upload.total;t=100*e/i}else t=100;return this.emit("totaluploadprogress",t,i,e)}_getParamName(t){return"function"==typeof this.options.paramName?this.options.paramName(t):`${this.options.paramName}${this.options.uploadMultiple?`[${t}]`:""}`}_renameFile(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}getFallbackForm(){let t,e;if(t=this.getExistingFallback())return t;let i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+=`<p>${this.options.dictFallbackText}</p>`),i+=`<input type="file" name="${this._getParamName(0)}" ${this.options.uploadMultiple?'multiple="multiple"':void 0} /><input type="submit" value="Upload!"></div>`;let n=O.createElement(i);return"FORM"!==this.element.tagName?(e=O.createElement(`<form action="${this.options.url}" enctype="multipart/form-data" method="${this.options.method}"></form>`)).appendChild(n):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:n}getExistingFallback(){for(let e of["div","form"]){var t;if(t=function(t){for(let e of t)if(/(^| )fallback($| )/.test(e.className))return e}(this.element.getElementsByTagName(e)))return t}}setupEventListeners(){return this.listeners.map(t=>(()=>{let e=[];for(let i in t.events){let n=t.events[i];e.push(t.element.addEventListener(i,n,!1))}return e})())}removeEventListeners(){return this.listeners.map(t=>(()=>{let e=[];for(let i in t.events){let n=t.events[i];e.push(t.element.removeEventListener(i,n,!1))}return e})())}disable(){return this.clickableElements.forEach(t=>t.classList.remove("dz-clickable")),this.removeEventListeners(),this.disabled=!0,this.files.map(t=>this.cancelUpload(t))}enable(){return delete this.disabled,this.clickableElements.forEach(t=>t.classList.add("dz-clickable")),this.setupEventListeners()}filesize(t){let e=0,i="b";if(t>0){let n=["tb","gb","mb","kb","b"];for(let o=0;o<n.length;o++){let s=n[o];if(t>=Math.pow(this.options.filesizeBase,4-o)/10){e=t/Math.pow(this.options.filesizeBase,4-o),i=s;break}}e=Math.round(10*e)/10}return`<strong>${e}</strong> ${this.options.dictFileSizeUnits[i]}`}_updateMaxFilesReachedClass(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}drop(t){if(!t.dataTransfer)return;this.emit("drop",t);let e=[];for(let i=0;i<t.dataTransfer.files.length;i++)e[i]=t.dataTransfer.files[i];if(e.length){let{items:i}=t.dataTransfer;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)}
4this.emit("addedfiles",e)}paste(t){var e;if(null==(e=null!=t?t.clipboardData:void 0,null!=e?e.items:void 0))return;this.emit("paste",t);let{items:i}=t.clipboardData;if(i.length)return this._addFilesFromItems(i)}handleFiles(t){for(let e of t)this.addFile(e)}_addFilesFromItems(t){return(()=>{let e=[];for(let n of t){var i;null!=n.webkitGetAsEntry&&(i=n.webkitGetAsEntry())?i.isFile?e.push(this.addFile(n.getAsFile())):i.isDirectory?e.push(this._addFilesFromDirectory(i,i.name)):e.push(void 0):null!=n.getAsFile&&(null==n.kind||"file"===n.kind)?e.push(this.addFile(n.getAsFile())):e.push(void 0)}return e})()}_addFilesFromDirectory(t,e){let i=t.createReader(),n=t=>{var e;return null!=(e=console)&&"function"==typeof e.log?e.log(t):void 0};var o=()=>i.readEntries(t=>{if(t.length>0){for(let i of t)i.isFile?i.file(t=>{if(!this.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath=`${e}/${t.name}`,this.addFile(t)}):i.isDirectory&&this._addFilesFromDirectory(i,`${e}/${i.name}`);o()}return null},n);return o()}accept(t,e){this.options.maxFilesize&&t.size>1048576*this.options.maxFilesize?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):O.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)}addFile(t){t.upload={uuid:O.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=O.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,e=>{e?(t.accepted=!1,this._errorProcessing([t],e)):(t.accepted=!0,this.options.autoQueue&&this.enqueueFile(t)),this._updateMaxFilesReachedClass()})}enqueueFiles(t){for(let e of t)this.enqueueFile(e);return null}enqueueFile(t){if(t.status===O.ADDED&&!0===t.accepted){if(t.status=O.QUEUED,this.options.autoProcessQueue)return setTimeout(()=>this.processQueue(),0)}else throw Error("This file can't be queued because it has already been processed or was rejected.")}_enqueueThumbnail(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1048576*this.options.maxThumbnailFilesize)return this._thumbnailQueue.push(t),setTimeout(()=>this._processThumbnailQueue(),0)}_processThumbnailQueue(){if(this._processingThumbnail||0===this._thumbnailQueue.length)return;this._processingThumbnail=!0;let t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,e=>(this.emit("thumbnail",t,e),this._processingThumbnail=!1,this._processThumbnailQueue()))}removeFile(t){if(t.status===O.UPLOADING&&this.cancelUpload(t),this.files=A(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}removeAllFiles(t){for(let e of(null==t&&(t=!1),this.files.slice()))(e.status!==O.UPLOADING||t)&&this.removeFile(e);return null}resizeImage(t,e,i,n,o){return this.createThumbnail(t,e,i,n,!0,(e,i)=>{if(null==i)return o(t);{let{resizeMimeType:e}=this.options;null==e&&(e=t.type);let n=i.toDataURL(e,this.options.resizeQuality);return("image/jpeg"===e||"image/jpg"===e)&&(n=D.restore(t.dataURL,n)),o(O.dataURItoBlob(n))}})}createThumbnail(t,e,i,n,o,s){let r=new FileReader;r.onload=()=>{if(t.dataURL=r.result,"image/svg+xml"===t.type){null!=s&&s(r.result);return}this.createThumbnailFromUrl(t,e,i,n,o,s)},r.readAsDataURL(t)}displayExistingFile(t,e,i,n,o=!0){this.emit("addedfile",t),this.emit("complete",t),o?(t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,e=>{this.emit("thumbnail",t,e),i&&i()},n)):(this.emit("thumbnail",t,e),i&&i())}createThumbnailFromUrl(t,e,i,n,o,s,r){let a=document.createElement("img");return r&&(a.crossOrigin=r),o="from-image"!=getComputedStyle(document.body).imageOrientation&&o,a.onload=()=>{let r=t=>t(1);return"undefined"!=typeof EXIF&&null!==EXIF&&o&&(r=t=>EXIF.getData(a,function(){return t(EXIF.getTag(this,"Orientation"))})),r(o=>{t.width=a.width,t.height=a.height;let r=this.options.resize.call(this,t,e,i,n),l=document.createElement("canvas"),h=l.getContext("2d");switch(l.width=r.trgWidth,l.height=r.trgHeight,o>4&&(l.width=r.trgHeight,l.height=r.trgWidth),o){case 2:h.translate(l.width,0),h.scale(-1,1);break;case 3:h.translate(l.width,l.height),h.rotate(Math.PI);break;case 4:h.translate(0,l.height),h.scale(1,-1);break;case 5:h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:h.rotate(.5*Math.PI),h.translate(0,-l.width);break;case 7:h.rotate(.5*Math.PI),h.translate(l.height,-l.width),h.scale(-1,1);break;case 8:h.rotate(-.5*Math.PI),h.translate(-l.height,0)}F(h,a,null!=r.srcX?r.srcX:0,null!=r.srcY?r.srcY:0,r.srcWidth,r.srcHeight,null!=r.trgX?r.trgX:0,null!=r.trgY?r.trgY:0,r.trgWidth,r.trgHeight);let c=l.toDataURL("image/png");if(null!=s)return s(c,l)})},null!=s&&(a.onerror=s),a.src=t.dataURL}processQueue(){let{parallelUploads:t}=this.options,e=this.getUploadingFiles().length,i=e;if(e>=t)return;let n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,t-e));for(;i<t;){if(!n.length)return;this.processFile(n.shift()),i++}}}processFile(t){return this.processFiles([t])}processFiles(t){for(let e of t)e.processing=!0,e.status=O.UPLOADING,this.emit
4("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}_getFilesWithXhr(t){return this.files.filter(e=>e.xhr===t).map(t=>t)}cancelUpload(t){if(t.status===O.UPLOADING){let e=this._getFilesWithXhr(t.xhr);for(let t of e)t.status=O.CANCELED;for(let i of(void 0!==t.xhr&&t.xhr.abort(),e))this.emit("canceled",i);this.options.uploadMultiple&&this.emit("canceledmultiple",e)}else(t.status===O.ADDED||t.status===O.QUEUED)&&(t.status=O.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(t,...e){return"function"==typeof t?t.apply(this,e):t}uploadFile(t){return this.uploadFiles([t])}uploadFiles(t){this._transformFiles(t,e=>{if(this.options.chunking){let i=e[0];t[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||i.size>this.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(i.size/this.options.chunkSize)}if(t[0].upload.chunked){let i=t[0],n=e[0],o=0;i.upload.chunks=[];let s=()=>{let e=0;for(;void 0!==i.upload.chunks[e];)e++;if(e>=i.upload.totalChunkCount)return;o++;let s=e*this.options.chunkSize,r=Math.min(s+this.options.chunkSize,n.size),a={name:this._getParamName(0),data:n.webkitSlice?n.webkitSlice(s,r):n.slice(s,r),filename:i.upload.filename,chunkIndex:e};i.upload.chunks[e]={file:i,index:e,dataBlock:a,status:O.UPLOADING,progress:0,retries:0},this._uploadData(t,[a])};if(i.upload.finishedChunkUpload=(e,n)=>{let o=!0;e.status=O.SUCCESS,e.dataBlock=null,e.response=e.xhr.responseText,e.responseHeaders=e.xhr.getAllResponseHeaders(),e.xhr=null;for(let t=0;t<i.upload.totalChunkCount;t++){if(void 0===i.upload.chunks[t])return s();i.upload.chunks[t].status!==O.SUCCESS&&(o=!1)}o&&this.options.chunksUploaded(i,()=>{this._finished(t,n,null)})},this.options.parallelChunkUploads)for(let t=0;t<i.upload.totalChunkCount;t++)s();else s()}else{let i=[];for(let n=0;n<t.length;n++)i[n]={name:this._getParamName(n),data:e[n],filename:t[n].upload.filename};this._uploadData(t,i)}})}_getChunk(t,e){for(let i=0;i<t.upload.totalChunkCount;i++)if(void 0!==t.upload.chunks[i]&&t.upload.chunks[i].xhr===e)return t.upload.chunks[i]}_uploadData(t,e){let i=new XMLHttpRequest;for(let e of t)e.xhr=i;t[0].upload.chunked&&(t[0].upload.chunks[e[0].chunkIndex].xhr=i);let n=this.resolveOption(this.options.method,t,e),o=this.resolveOption(this.options.url,t,e);i.open(n,o,!0),this.resolveOption(this.options.timeout,t)&&(i.timeout=this.resolveOption(this.options.timeout,t)),i.withCredentials=!!this.options.withCredentials,i.onload=e=>{this._finishedUploading(t,i,e)},i.ontimeout=()=>{this._handleUploadError(t,i,`Request timedout after ${this.options.timeout/1e3} seconds`)},i.onerror=()=>{this._handleUploadError(t,i)},(null!=i.upload?i.upload:i).onprogress=e=>this._updateFilesUploadProgress(t,i,e);let s=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};for(let e in this.options.binaryBody&&(s["Content-Type"]=t[0].type),this.options.headers&&T(s,this.options.headers),s){let t=s[e];t&&i.setRequestHeader(e,t)}if(this.options.binaryBody){for(let e of t)this.emit("sending",e,i);this.options.uploadMultiple&&this.emit("sendingmultiple",t,i),this.submitRequest(i,null,t)}else{let n=new FormData;if(this.options.params){let e=this.options.params;for(let o in"function"==typeof e&&(e=e.call(this,t,i,t[0].upload.chunked?this._getChunk(t[0],i):null)),e){let t=e[o];if(Array.isArray(t))for(let e=0;e<t.length;e++)n.append(o,t[e]);else n.append(o,t)}}for(let e of t)this.emit("sending",e,i,n);this.options.uploadMultiple&&this.emit("sendingmultiple",t,i,n),this._addFormElementData(n);for(let t=0;t<e.length;t++){let i=e[t];n.append(i.name,i.data,i.filename)}this.submitRequest(i,n,t)}}_transformFiles(t,e){let i=[],n=0;for(let o=0;o<t.length;o++)this.options.transformFile.call(this,t[o],s=>{i[o]=s,++n===t.length&&e(i)})}_addFormElementData(t){if("FORM"===this.element.tagName)for(let e of this.element.querySelectorAll("input, textarea, select, button")){let i=e.getAttribute("name"),n=e.getAttribute("type");if(n&&(n=n.toLowerCase()),null!=i){if("SELECT"===e.tagName&&e.hasAttribute("multiple"))for(let n of e.o
4ptions)n.selected&&t.append(i,n.value);else(!n||"checkbox"!==n&&"radio"!==n||e.checked)&&t.append(i,e.value)}}}_updateFilesUploadProgress(t,e,i){if(t[0].upload.chunked){let n=t[0],o=this._getChunk(n,e);i?(o.progress=100*i.loaded/i.total,o.total=i.total,o.bytesSent=i.loaded):(o.progress=100,o.bytesSent=o.total),n.upload.progress=0,n.upload.total=0,n.upload.bytesSent=0;for(let t=0;t<n.upload.totalChunkCount;t++)n.upload.chunks[t]&&void 0!==n.upload.chunks[t].progress&&(n.upload.progress+=n.upload.chunks[t].progress,n.upload.total+=n.upload.chunks[t].total,n.upload.bytesSent+=n.upload.chunks[t].bytesSent);n.upload.progress=n.upload.progress/n.upload.totalChunkCount,this.emit("uploadprogress",n,n.upload.progress,n.upload.bytesSent)}else for(let e of t)e.upload.total&&e.upload.bytesSent&&e.upload.bytesSent==e.upload.total||(i?(e.upload.progress=100*i.loaded/i.total,e.upload.total=i.total,e.upload.bytesSent=i.loaded):(e.upload.progress=100,e.upload.bytesSent=e.upload.total),this.emit("uploadprogress",e,e.upload.progress,e.upload.bytesSent))}_finishedUploading(t,e,i){let n;if(t[0].status!==O.CANCELED&&4===e.readyState){if("arraybuffer"!==e.responseType&&"blob"!==e.responseType&&(n=e.responseText,e.getResponseHeader("content-type")&&~e.getResponseHeader("content-type").indexOf("application/json")))try{n=JSON.parse(n)}catch(t){i=t,n="Invalid JSON response from server."}this._updateFilesUploadProgress(t,e),200<=e.status&&e.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],e),n):this._finished(t,n,i):this._handleUploadError(t,e,n)}}_handleUploadError(t,e,i){if(t[0].status!==O.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){let i=this._getChunk(t[0],e);if(i.retries++<this.options.retryChunksLimit){this._uploadData(t,[i.dataBlock]);return}console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(t,i||this.options.dictResponseError.replace("{{statusCode}}",e.status),e)}}submitRequest(t,e,i){if(1!=t.readyState){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}if(this.options.binaryBody){if(i[0].upload.chunked){let e=this._getChunk(i[0],t);t.send(e.dataBlock.data)}else t.send(i[0])}else t.send(e)}_finished(t,e,i){for(let n of t)n.status=O.SUCCESS,this.emit("success",n,e,i),this.emit("complete",n);
4if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}_errorProcessing(t,e,i){for(let n of t)n.status=O.ERROR,this.emit("error",n,e,i),this.emit("complete",n);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}static uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}constructor(t,e){let i,n;if(super(),this.element=t,this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw Error("Invalid dropzone element.");if(this.element.dropzone)throw Error("Dropzone already attached.");O.instances.push(this),this.element.dropzone=this;let o=(n=O.optionsForElement(this.element))!=null?n:{};if(this.options=T(!0,{},M,o,null!=e?e:{}),this.options.previewTemplate=this.options.previewTemplate.replace(/\n*/g,""),this.options.forceFallback||!O.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(this.options.uploadMultiple&&this.options.chunking)throw Error("You cannot set both: uploadMultiple and chunking.");if(this.options.binaryBody&&this.options.uploadMultiple)throw Error("You cannot set both: binaryBody and uploadMultiple.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),null!=this.options.renameFilename&&(this.options.renameFile=t=>this.options.renameFilename.call(this,t.name,t)),"string"==typeof this.options.method&&(this.options.method=this.options.method.toUpperCase()),(i=this.getExistingFallback())&&i.parentNode&&i.parentNode.removeChild(i),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=O.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=O.getElements(this.options.clickable,"clickable")),this.init()}}O.initClass(),O.options={},O.optionsForElement=function(t){return t.getAttribute("id")?O.options[z(t.getAttribute("id"))]:void 0},O.instances=[],O.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),(null!=t?t.dropzone:void 0)==null)throw Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},O.discover=function(){let t;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];let e=e=>(()=>{let i=[];for(let n of e)/(^| )dropzone($| )/.test(n.className)?i.push(t.push(n)):i.push(void 0);return i})();e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return(()=>{let e=[];for(let i of t)!1!==O.optionsForElement(i)?e.push(new O(i)):e.push(void 0);return e})()},O.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],O.isBrowserSupported=function(){let t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector){if("classList"in document.createElement("a")){for(let e of(void 0!==O.blacklistedBrowsers&&(O.blockedBrowsers=O.blacklistedBrowsers),O.blockedBrowsers))if(e.test(navigator.userAgent)){t=!1;continue}}else t=!1}else t=!1;return t},O.dataURItoBlob=function(t){let e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),o=new Uint8Array(n);for(let t=0,i=e.length,n=0<=i;
4n?t<=i:t>=i;n?t++:t--)o[t]=e.charCodeAt(t);return new Blob([n],{type:i})};let A=(t,e)=>t.filter(t=>t!==e).map(t=>t),z=t=>t.replace(/[\-_](\w)/g,t=>t.charAt(1).toUpperCase());O.createElement=function(t){let e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},O.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},O.getElement=function(t,e){let i;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw Error(`Invalid \`${e}\` option provided. Please provide a CSS selector or a plain HTML element.`);return i},O.getElements=function(t,e){let i,n;if(t instanceof Array){n=[];try{for(i of t)n.push(this.getElement(i,e))}catch(t){n=null}}else if("string"==typeof t)for(i of(n=[],document.querySelectorAll(t)))n.push(i);else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw Error(`Invalid \`${e}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return n},O.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},O.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");let i=t.type,n=i.replace(/\/.*$/,"");for(let o of e)if("."===(o=o.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(o.toLowerCase(),t.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(n===o.replace(/\/.*$/,""))return!0}else if(i===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new O(this,t)})}),O.ADDED="added",O.QUEUED="queued",O.ACCEPTED=O.QUEUED,O.UPLOADING="uploading",O.PROCESSING=O.UPLOADING,O.CANCELED="canceled",O.ERROR="error",O.SUCCESS="success";let I=function(t){t.naturalWidth;let e=t.naturalHeight,i=document.createElement("canvas");i.width=1,i.height=e;let n=i.getContext("2d");n.drawImage(t,0,0);let{data:o}=n.getImageData(1,0,1,e),s=0,r=e,a=e;for(;a>s;)0===o[(a-1)*4+3]?r=a:s=a,a=r+s>>1;let l=a/e;return 0===l?1:l};var F=function(t,e,i,n,o,s,r,a,l,h){let c=I(e);return t.drawImage(e,i,n,o,s,r,a,l,h/c)};class D{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(t){let e,i,n,o,s,r="",a="",l="",h=0;for(;e=t[h++],i=t[h++],a=t[h++],n=e>>2,o=(3&e)<<4|i>>4,s=(15&i)<<2|a>>6,l=63&a,isNaN(i)?s=l=64:isNaN(a)&&(l=64),r=r+this.KEY_STR.charAt(n)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(l),e=i=a="",n=o=s=l="",h<t.length;);return r}static restore(t,e){if(!t.match("data:image/jpeg;base64,"))return e;let i=this.decode64(t.replace("data:image/jpeg;base64,","")),n=this.slice2Segments(i),o=this.exifManipulation(e,n);return`data:image/jpeg;base64,${this.encode64(o)}`}static exifManipulation(t,e){let i=this.getExifArray(e),n=this.insertExif(t,i);return new Uint8Array(n)}static getExifArray(t){let e;let i=0;for(;i<t.length;){if(255===(e=t[i])[0]&225===e[1])return e;i++}return[]}static insertExif(t,e){let i=t.replace("data:image/jpeg;base64,",""),n=this.decode64(i),o=n.indexOf(255,3),s=n.slice(0,o),r=n.slice(o),a=s;return(a=a.concat(e)).concat(r)}static slice2Segments(t){let e=0,i=[];for(;;){var n;if(255===t[e]&218===t[e+1])break;if(255===t[e]&216===t[e+1])e+=2;else{n=256*t[e+2]+t[e+3];let o=e+n+2,s=t.slice(e,o);i.push(s),e=o}if(e>t.length)break}return i}static decode64(t){let e,i,n,o,s;let r="",a="",l=0,h=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");n=this.KEY_STR.indexOf(t.charAt(l++)),o=this.KEY_STR.indexOf(t.charAt(l++)),s=this.KEY_STR.indexOf(t.charAt(l++)),a=this.KEY_STR.indexOf(t.charAt(l++)),e=n<<2|o>>4,i=(15&o)<<4|s>>2,r=(3&s)<<6|a,h.push(e),64!==s&&h.push(i),64!==a&&h.push(r),e=i=r="",n=o=s=a="",l<t.length;);return h}}D.initClass();class B extends l{init(){let t=new O(this.el.querySelector(".dropzone"),{url:this.options.url,params:(t,e,i)=>Object.fromEntries(Object.entries(this.options.params).filter(t=>{let[e,i]=t;return null!=i})),disablePreviews:!0,dictDefaultMessage:this.options.dictDefaultMessage}),e=this.el.querySelector(".moorl-customer-upload-image"),i=this.el.querySelector(".moorl-customer-upload-files");t.on("success",(t,n,o)=>
4{if(e)e.innerHTML=n;else if(i){let t=O.createElement(n.trim());document.getElementById(t.id)||i.append(t)}else window.location.reload()})}}B.options={};var N=i(872),R=i.n(N),Z=i(427);class j extends l{init(){this.cookieEnabledName="moorl-location-map",this._mapElement=this.el.querySelector(this.options.mapSelector),this._legendElement=this.el.querySelector(this.options.legendSelector),this._initMap(),this._initLocations(this.options.locations),this._registerEvents()}_registerEvents(){let t=r.querySelector(document,".cms-element-product-listing-wrapper",!1);if(t){let e=window.PluginManager.getPluginInstanceFromElement(t,"Listing");if(!e)return;e.$emitter.subscribe("Listing/afterRenderResponse",()=>{this._initLocationsFromListing()}),this._initLocationsFromListing()}}_initMap(){if(this.options.cookieConsent&&!E.getItem(this.cookieEnabledName)||!this._mapElement)return;let t={scrollWheelZoom:!0,dragging:!0,tap:!0};if(this.options.options&&(t.scrollWheelZoom=this.options.options.includes("scrollWheelZoom"),t.dragging=this.options.options.includes("dragging"),t.tap=this.options.options.includes("tap"),t.gestureHandling=this.options.options.includes("gestureHandling")),R().Map.addInitHook("addHandler","gestureHandling",Z.GestureHandling),this._mapInstance={},this._mapInstance.layerGroup=R().layerGroup([]),this._mapInstance.map=R().map(this._mapElement,t),R().tileLayer(this.options.tileLayer,{attribution:this.options.attribution}).addTo(this._mapInstance.map),this._legendElement){let t=R().control({position:"bottomleft"});t.onAdd=t=>this._legendElement.cloneNode(!0),t.addTo(this._mapInstance.map),this._legendElement.remove()}}_initLocationsFromListing(){let t=document.querySelectorAll("ul.js-listing-wrapper > li"),e=[];t&&t.forEach(t=>{e.push(JSON.parse(t.dataset.entityLocation)),t.addEventListener("click",()=>{this._focusItem(t.dataset.entityId)})}),this._initLocations(e)}_initLocations(t){let e=[];for(let i of t){if(i.radius){let t=R().circle(i.latlng,i.radius);e.push(t);continue}let t={};i.entityId&&(t.entityId=i.entityId),i.icon&&(t.icon=this._getIcon(i.icon));let n=R().marker(i.latlng,t);if(i.popup){let t={autoPan:!1,autoClose:!0};this.options.options&&(t.autoPan=this.options.options.includes("autoPan"),t.autoClose=this.options.options.includes("autoClose")),n.bindPopup(i.popup,t).on("click",()=>{this._focusItem(i.entityId)}).on("popupclose",()=>{this.options.options&&this.options.options.includes("fitBounds")&&this._fitBounds()})}e.push(n)}this._mapInstance&&(this._mapInstance.layerGroup&&this._mapInstance.layerGroup.clearLayers(),this._mapInstance.layerGroup=R().featureGroup(e).addTo(this._mapInstance.map),this._fitBounds())}_fitBounds(){this._mapInstance.map.fitBounds(this._mapInstance.layerGroup.getBounds(),{padding:[this.options.padding,this.options.padding]}),this._updateListingElements(null)}_focusItem(t){this._mapInstance.layerGroup.eachLayer(e=>{e.options.entityId===t&&(e.getPopup().isOpen()||e.openPopup(),this.options.options&&this.options.options.includes("flyTo")&&this._mapInstance.map.flyTo(e.getLatLng(),this.options.zoom,{animate:!0,duration:1}))}),this._updateListingElements(t)}_updateListingElements(t){let e=document.querySelectorAll("ul.js-listing-wrapper > li");e&&e.forEach(e=>{if(e.classList.remove("is-active"),e.classList.remove("shadow"),e.dataset.entityId===t&&(e.classList.add("is-active"),e.classList.add("shadow"),this.options.options&&this.options.options.includes("scrollTo"))){let t=e.getBoundingClientRect().top+window.scrollY-this.options.offsetTop;window.scrollTo({top:t,behavior:"smooth"})}})}_getIcon(t){if(!t.svg)return R().icon(t);{let e={iconSize:[40,60],iconAnchor:[20,60],popupAnchor:[0,-40],className:t.className,html:'<div class="marker-pin"></div>'.concat(t.svg)};return R().divIcon(e)}}}j.options={locations:[],mapSelector:".moorl-location-map",legendSelector:".legend",tileLayer:"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',options:[],offsetTop:120,padding:5,zoom:14,cookieConsent:!1};class H extends l{init(){this._popover=new bootstrap.Popover(this.el,{html:!0,sanitize:!1,animation:this.options.animation,content:"",title:this.options.title,placement:this.options.placement}),this._loaded=!1,this._scheduled=null,this._isMouseOverPopover=!1,this._registerEvents()}_registerEvents(){if(this.options.toggle){this.el.addEventListener("click",t=>{t.preventDefault(),this._togglePopover()});return}this.el.addEventListener("mouseenter",()=>this._showPopover()),this.el.addEventListener("mouseleave",()=>this._scheduleHidePopover())}
4_togglePopover(){this._loaded?(this._popover.toggle(),window.PluginManager.initializePlugins()):fetch(this.options.url).then(t=>t.text()).then(t=>{this._popover.setContent({".popover-body":t}),this._popover.show(),window.PluginManager.initializePlugins(),this._loaded=!0})}_showPopover(){if(this._scheduled){clearTimeout(this._scheduled),this._scheduled=null;return}this._loaded?(this._popover.show(),this._attachPopoverEvents()):fetch(this.options.url).then(t=>t.text()).then(t=>{this._popover.setContent({".popover-body":t}),this._popover.show(),this._loaded=!0,this._attachPopoverEvents()})}_scheduleHidePopover(){this._scheduled||(this._scheduled=setTimeout(()=>{this._isMouseOverPopover||(this._popover.hide(),this._scheduled=null)},200))}_attachPopoverEvents(){window.PluginManager.initializePlugins(),setTimeout(()=>{let t=this._popover.tip;t&&(t.addEventListener("mouseenter",()=>{clearTimeout(this._scheduled),this._scheduled=null,this._isMouseOverPopover=!0}),t.addEventListener("mouseleave",()=>{this._isMouseOverPopover=!1,this._scheduleHidePopover()}))},50)}}H.options={url:null,toggle:!1,title:"",placement:"top",animation:!1};let U="js-offcanvas-singleton";class q{open(t,e,i,n,o,s,r){this._removeExistingOffCanvas();let a=this._createOffCanvas(i,s,r,n);this.setContent(t,o),this._openOffcanvas(a,e)}setContent(t,e){let i=this.getOffCanvas();i[0]&&(i[0].innerHTML=t,this._registerEvents(e),this._setAriaAttrs())}setAdditionalClassName(t){this.getOffCanvas()[0].classList.add(t)}getOffCanvas(){return document.querySelectorAll(".".concat(U))}close(t){let e=this.getOffCanvas();c.iterate(e,t=>{bootstrap.Offcanvas.getInstance(t).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(t,e){window.focusHandler.saveFocusState("offcanvas"),q.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof e&&e()}_registerEvents(t){let e=this.getOffCanvas();c.iterate(e,i=>{let n=()=>{setTimeout(()=>{i.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t),i.removeEventListener("hide.bs.offcanvas",n)};i.addEventListener("hide.bs.offcanvas",n)}),window.addEventListener("popstate",this.close.bind(this,t),{once:!0});let i=document.querySelectorAll(".".concat("js-offcanvas-close"));c.iterate(i,e=>e.addEventListener("click",this.close.bind(this,t)))}_setAriaAttrs(){let t=this.getOffCanvas()[0],e="off-canvas-headline",i=t.querySelector('[data-id="'.concat(e,'"]'));i&&!t.hasAttribute("aria-labelledby")&&(i.setAttribute("id",e),t.setAttribute("aria-labelledby",e))}_removeExistingOffCanvas(){q.bsOffcanvas=null;let t=this.getOffCanvas();return c.iterate(t,t=>t.remove())}_getPositionClass(t){return"left"===t?"offcanvas-start":"right"===t?"offcanvas-end":"offcanvas-".concat(t)}_createOffCanvas(t,e,i,n){let o=document.createElement("div");if(o.classList.add("offcanvas",U),o.classList.add(this._getPositionClass(t)),o.setAttribute("tabindex","-1"),!0===e&&o.classList.add("is-fullwidth"),i){let t=typeof i;if("string"===t)o.classList.add(i);else if(Array.isArray(i))i.forEach(t=>{o.classList.add(t)});else throw Error('The type "'.concat(t,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(o),q.bsOffcanvas=new bootstrap.Offcanvas(o,{backdrop:!1!==n||"static"}),o}constructor(){this.$emitter=new a}}let W=Object.freeze(new q);class V{static open(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",n=!(arguments.length>3)||void 0===arguments[3]||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";W.open(t,e,i,n,o,s,r)}static setContent(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;W.setContent(t,e,i)}static setAdditionalClassName(t){W.setAdditionalClassName(t)}static close(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;W.close(t)}static exists(){return W.exists()}static getOffCanvas(){return W.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}let $="loader",G={BEFORE:"before",INNER:"inner"};class K{create(){if(!this.exists()){if(this.position===G.INNER){this.parent.innerHTML=K.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),K.getTemplate())}}remove(){let t=this.parent.querySelectorAll(".".concat($));c.iterate(t,t=>t.remove())}exists(){return this.parent.querySelectorAll(".".concat($)).length>0}_getPosition(){return this.position===G.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat($,'" role="status">
4\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return $}constructor(t,e=G.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}}let Y=null;class X extends V{static open(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:V.REMOVE_OFF_CANVAS_DELAY(),r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!t)throw Error("A url must be given!");W._removeExistingOffCanvas();let l=W._createOffCanvas(n,r,a,o);this.setContent(t,e,i,o,s),W._openOffcanvas(l)}static setContent(t,e,i,n,o){let s=new h;super.setContent('<div class="offcanvas-body">'.concat(K.getTemplate(),"</div>"),n,o),Y&&Y.abort();let r=t=>{super.setContent(t,n,o),"function"==typeof i&&i(t)};Y=e?s.post(t,e,X.executeCallback.bind(this,r)):s.get(t,X.executeCallback.bind(this,r))}static executeCallback(t,e){"function"==typeof t&&t(e),window.PluginManager.initializePlugins()}}let Q="element-loader-backdrop";class J extends K{static create(t){t.classList.add("has-element-loader"),J.exists(t)||(J.appendLoader(t),setTimeout(()=>{let e=t.querySelector(".".concat(Q));e&&e.classList.add("element-loader-backdrop-open")},1))}static remove(t){t.classList.remove("has-element-loader");let e=t.querySelector(".".concat(Q));e&&e.remove()}static exists(t){return t.querySelectorAll(".".concat(Q)).length>0}static getTemplate(){return'\n        <div class="'.concat(Q,'">\n            <div class="loader" role="status">\n                <span class="').concat("visually-hidden",'">Loading...</span>\n            </div>\n        </div>\n        ')}static appendLoader(t){t.insertAdjacentHTML("beforeend",J.getTemplate())}}let tt="CookieConfiguration_Update";window.router["frontend.cookie.offcanvas"];class te extends l{init(){this._acceptButton=this.el.querySelector(".js-moorl-cookie-box-button button"),this._registerEvents(),this._toggle()}_registerEvents(){document.$emitter.subscribe(tt,t=>{this._toggle()}),this._acceptButton.addEventListener("click",t=>{if(E.setItem(this.options.cookieKey,"1","30"),this.options.reload){window.location.reload();return}document.$emitter.publish(tt,{"${this.options.cookieKey}":!0}),this.el.style.display="none"})}_toggle(){E.getItem(this.options.cookieKey)?this.options.content?(this.el.parentElement.innerHTML=this.options.content,window.PluginManager.initializePlugins()):this.el.style.display="none":this.el.style.display="flex"}}te.options={cookieKey:null,content:null,reload:!0};class ti extends l{init(){this.options.inputElId&&(this._inputEl=document.getElementById(this.options.inputElId),this._inputEl)&&(this._maxLength=parseInt(this._inputEl.maxLength),this._minLength=parseInt(this._inputEl.minLength),this._maxLength&&("progress-bar"===this.options.type&&(this._progressBarEl=this.el.querySelector(".progress-bar")),this._writeCurrent(),setTimeout(()=>{this._writeCurrent()},1e3),this._registerEvents()))}_registerEvents(){["oninput","keyup","change"].forEach(t=>{this._inputEl.addEventListener(t,()=>{this._writeCurrent()})})}_writeCurrent(){this._currentLength=parseInt(this._inputEl.value.length),"progress-bar"===this.options.type?(this._currentPercentage=Math.ceil(this._currentLength/this._maxLength*100),this._currentPercentage>=100?(this._progressBarEl.classList.remove("bg-success"),this._progressBarEl.classList.remove("bg-warning"),this._progressBarEl.classList.add("bg-danger")):this._currentPercentage>=90?(this._progressBarEl.classList.remove("bg-success"),this._progressBarEl.classList.remove("bg-danger"),this._progressBarEl.classList.add("bg-warning")):(this._progressBarEl.classList.remove("bg-danger"),this._progressBarEl.classList.remove("bg-warning"),this._progressBarEl.classList.add("bg-success")),this._progressBarEl.style.width="".concat(this._currentPercentage,"%"),this._progressBarEl.innerText="".concat(this._currentLength,"/").concat(this._maxLength)):this.el.
4innerText="".concat(this._currentLength,"/").concat(this._maxLength)}}ti.options={inputElId:null,type:null};class tn extends l{init(){this._registerEvents()}_registerEvents(){this.el.addEventListener("click",()=>{try{navigator.clipboard.writeText(this.el.innerText).then(()=>{this.el.classList.add("success"),setTimeout(()=>{this.el.classList.remove("success")},1e3)})}catch(t){console.error("Failed to copy: ",t)}})}}function to(t,e){t.split(/\s+/).forEach(t=>{e(t)})}tn.options={};class ts{constructor(){this._events={}}on(t,e){to(t,t=>{let i=this._events[t]||[];i.push(e),this._events[t]=i})}off(t,e){var i=arguments.length;if(0===i){this._events={};return}to(t,t=>{if(1===i){delete this._events[t];return}let n=this._events[t];void 0!==n&&(n.splice(n.indexOf(e),1),this._events[t]=n)})}trigger(t,...e){var i=this;to(t,t=>{let n=i._events[t];void 0!==n&&n.forEach(t=>{t.apply(i,e)})})}}function tr(t){return t.plugins={},class extends t{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,i){t.plugins[e]={name:e,fn:i}}initializePlugins(t){var e,i;let n=this,o=[];if(Array.isArray(t))t.forEach(t=>{"string"==typeof t?o.push(t):(n.plugins.settings[t.name]=t.options,o.push(t.name))});else if(t)for(e in t)t.hasOwnProperty(e)&&(n.plugins.settings[e]=t[e],o.push(e));for(;i=o.shift();)n.require(i)}loadPlugin(e){var i=this.plugins,n=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=n.fn.apply(this,[this.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this.plugins;if(!this.plugins.loaded.hasOwnProperty(t)){if(e.requested[t])throw Error('Plugin has circular dependency ("'+t+'")');this.loadPlugin(t)}return e.loaded[t]}}}let ta=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==td(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",tl=t=>{if(!tc(t))return t.join("");let e="",i=0,n=()=>{i>1&&(e+="{"+i+"}")};return t.forEach((o,s)=>{if(o===t[s-1]){i++;return}n(),e+=o,i=1}),n(),e},th=t=>ta(Array.from(t)),tc=t=>new Set(t).size!==t.length,tu=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),td=t=>t.reduce((t,e)=>Math.max(t,tp(e)),0),tp=t=>Array.from(t).length,tm=t=>{if(1===t.length)return[[t]];let e=[];return tm(t.substring(1)).forEach(function(i){let n=i.slice(0);n[0]=t.charAt(0)+n[0],e.push(n),(n=i.slice(0)).unshift(t.charAt(0)),e.push(n)}),e},tf=[[0,65535]],t_={},tg={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in tg){let e=tg[t]||"";for(let i=0;i<e.length;i++)t_[e.substring(i,i+1)]=t}let tv=RegExp(Object.keys(t_).join("|")+"|[̀-ͯ·ʾʼ]","gu"),ty=e=>{void 0===t&&(t=tE(e||tf))},tb=(t,e="NFKD")=>t.normalize(e),tw=t=>Array.from(t).reduce((t,e)=>t+tx(e),""),tx=t=>(t=tb(t).toLowerCase().replace(tv,t=>t_[t]||""),tb(t,"NFC")),tL=t=>{let e={},i=(t,i)=>{let n=e[t]||new Set,o=RegExp("^"+th(n)+"$","iu");i.match(o)||(n.add(tu(i)),e[t]=n)};for(let e of function*(t){for(let[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=tw(e);i==e.toLowerCase()||i.length>3||0==i.length||(yield{folded:i,composed:e,code_point:t})}}(t))i(e.folded,e.folded),i(e.folded,e.composed);return e},tE=t=>{let i=tL(t),n={},o=[];for(let t in i){let e=i[t];e&&(n[t]=th(e)),t.length>1&&o.push(tu(t))}return o.sort((t,e)=>e.length-t.length),e=RegExp("^"+ta(o),"u"),n},tP=(e,i=1)=>{let n=0;return(e=e.map(e=>(t[e]&&(n+=e.length),t[e]||e)),n>=i)?tl(e):""},tC=(t,e=1)=>(e=Math.max(e,t.length-1),ta(tm(t).map(t=>tP(t,e)))),tT=(t,e=!0)=>{let i=t.length>1?1:0;return ta(t.map(t=>{let n=[],o=e?t.length():t.length()-1;for(let e=0;e<o;e++)n.push(tC(t.substrs[e]||"",i));return tl(n)}))},tk=(t,e)=>{for(let i of e){if(i.start!=t.start||i.end!=t.end||i.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts,n=t=>{for(let i of e){if(i.start===t.start&&i.substr===t.substr)break;if(1!=t.length&&1!=i.length&&(t.start<i.start&&t.end>i.start||i.start<t.start&&i.end>t.start))return!0}return!1};if(!(i.parts.filter(n).length>0))return!0}return!1};class tS{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new tS,n=JSON.parse(JSON.stringify(this.parts)),o=n.pop();for(let t of n)i.add(t);let s=e.substr.substring(0,t-o.start),r=s.length;return i.add({start:o.start,end:o.start+r,length:r,substr:s}),i}}let tM=t=>{ty(),t=tw(t);let i="",n=[new tS];for(let o=0;o<t.length;o++){let s=t.substring(o).match(e),r=t.substring(o,o+1),a=s?s[0]:null,l=[],h=new Set;for(let t of n){let e=t.last();if(!e||1==e.length||e.end<=o){if(a){let e=a.length;t.add({start:o,end:o+e,length:e,substr:a}),h.add("1")}else t.add({start:o,end:o+1,length:1,substr:r}),h.add("2")}else if(a){let i=t.clone(o,e),n=a.length;i.add({start:o,end:o+n,length:n,substr:a}),l.push(i)}else h.add("3")}if(l.length>0){for(let t of l=l.sort((t,e)=>t.length()-e.length()))tk(t,n)||n.push(t);continue}if(o>0&&1==h.size&&!h.has("3")){i+=tT(n,!1);let t=new tS,e=n[0];e&&t.add(e.last()),n=[t]}}return i+tT(n,!0)},tO=(t,e)=>{if(t)return t[e]},tA=(t,e)=>{if(t){for(var i,n=e.split(".");(i=n.shift())&&(t=t[i]););return t}},tz=(t,e,i)=>{var n,o;return t?(t+="",null==e.regex||-1===(o=t.search(e.regex)))?0:(n=e.string.length/t.length,0===o&&(n+=.5),n*i):0},tI=(t,e)=>{var i=t[e];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(t[e]=[i])},tF=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},tD=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=tw(t+"").toLowerCase())>(e=tw(e+"").toLowerCase())?1:e>t?-1:0;class tB{items;settings;constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){var n;if(!t||!t.length)return[];let o=[],s=t.split(/\s+/);return i&&(n=RegExp("^("+Object.keys(i).map(tu).join("|")+"):(.*)$")),s.forEac
4h(t=>{let i;let s=null,r=null;n&&(i=t.match(n))&&(s=i[1],t=i[2]),t.length>0&&(r=this.settings.diacritics?tM(t)||null:tu(t))&&e&&(r="\\b"+r),o.push({string:t,regex:r?RegExp(r,"iu"):null,field:s})}),o}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){let e=t.tokens,i=e.length;if(!i)return function(){return 0};let n=t.options.fields,o=t.weights,s=n.length,r=t.getAttrFn;if(!s)return function(){return 1};let a=function(){return 1===s?function(t,e){let i=n[0].field;return tz(r(e,i),t,o[i]||1)}:function(t,e){var i=0;if(t.field){let n=r(e,t.field);!t.regex&&n?i+=1/s:i+=tz(n,t,1)}else tF(o,(n,o)=>{i+=tz(r(e,o),t,n)});return i/s}}();return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,o=0;for(let i of e){if((n=a(i,t))<=0)return 0;o+=n}return o/i}:function(t){var n=0;return tF(e,e=>{n+=a(e,t)}),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];let n=this,o=t.options,s=!t.query&&o.sort_empty?o.sort_empty:o.sort;if("function"==typeof s)return s.bind(this);let r=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(s)for(let e of s)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){for(let t of(e=!0,i))if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter(t=>"$score"!==t.field);return i.length?function(t,e){var n,o;for(let s of i)if(o=s.field,n=("desc"===s.direction?-1:1)*tD(r(o,t),r(o,e)))return n;return 0}:null}prepareSearch(t,e){let i={};var n=Object.assign({},e);if(tI(n,"sort"),tI(n,"sort_empty"),n.fields){tI(n,"fields");let t=[];n.fields.forEach(e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1}),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?tA:tO}}search(t,e){var i,n;e=(n=this.prepareSearch(t,e)).options,t=n.query;let o=e.score||this._getScoreFunction(n);t.length?tF(this.items,(t,s)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:s})}):tF(this.items,(t,e)=>{n.items.push({score:1,id:e})});let s=this._getSortFunction(n);return s&&n.items.sort(s),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}let tN=t=>null==t?null:tR(t),tR=t=>"boolean"==typeof t?t?"1":"0":t+"",tZ=t=>(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),tj=(t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null),tH=(t,e)=>{var i;return function(n,o){var s=this;i&&(s.loading=Math.max(s.loading-1,0),clearTimeout(i)),i=setTimeout(function(){i=null,s.loadedSearches[n]=!0,t.call(s,n,o)},e)}},tU=(t,e,i)=>{var n,o=t.trigger,s={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return o.apply(t,arguments);s[i]=arguments},i.apply(t,[]),t.trigger=o,e))n in s&&o.apply(t,s[n])},tq=t=>({start:t.selectionStart||0,length:(t.selectionEnd||0)-(t.selectionStart||0)}),tW=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},tV=(t,e,i,n)=>{t.addEventListener(e,i,n)},t$=(t,e)=>!!e&&!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),tG=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),tK=t=>t.replace(/[\\"']/g,"\\$&"),tY=(t,e)=>{e&&t.append(e)},tX=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},tQ=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(tJ(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},tJ=t=>!!("string"==typeof t&&t.indexOf("<")>-1),t0=t=>t.replace(/['"\\]/g,"\\$&"),t1=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},t2=(t,e)=>{Object.assign(t.style,e)},t3=(t,...e)=>{var i=t4(e);(t=t9(t)).map(t=>{i.map(e=>{t.classList.add(e)})})},t6=(t,...e)=>{var i=t4(e);(t=t9(t)).map(t=>{i.map(e=>{t.classList.remove(e)})})},t4=t=>{var e=[];return tX(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},t9=t=>(Array.isArray(t)||(t=[t]),t),t7=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},t8=(t,e=0)=>e>0?t[t.length-1]:t[0],t5=t=>0===Object.keys(t).length,et=(t,e)=>{if(!t)return -1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},ee=(t,e)=>{tX(e,(e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)})},ei=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},en=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=RegExp(e,"i")}let i=t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var o=t.splitText(i.index);o.splitText(i[0].length);var s=o.cloneNode(!0);return n.appendChild(s),ei(o,n),1}return 0},n=t=>{1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&("highlight"!==t.className||"SPAN"!==t.tagName)&&Array.from(t.childNodes).forEac
4h(t=>{o(t)})},o=t=>3===t.nodeType?i(t):(n(t),0);o(t)},eo=t=>{var e=t.querySelectorAll("span.highlight");Array.prototype.forEach.call(e,function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})},es="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey",er={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,clearAfterSelect:!1,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};function ea(t,e){var i,n,o,s,r,a,l,h=Object.assign({},er,e),c=h.dataAttr,u=h.labelField,d=h.valueField,p=h.disabledField,m=h.optgroupField,f=h.optgroupLabelField,_=h.optgroupValueField,g=t.tagName.toLowerCase(),v=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!v&&!h.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(v=e.textContent)}var y={placeholder:v,options:[],optgroups:[],items:[],maxItems:null};if("select"===g){let e;n=y.options,o={},s=1,e=0,r=t=>{var e=Object.assign({},t.dataset),i=c&&e[c];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},a=(t,i)=>{var s=tN(t.value);if(null!=s&&(s||h.allowEmptyOption)){if(o.hasOwnProperty(s)){if(i){var a=o[s][m];a?Array.isArray(a)?a.push(i):o[s][m]=[a,i]:o[s][m]=i}}else{var l=r(t);l[u]=l[u]||t.textContent,l[d]=l[d]||s,l[p]=l[p]||t.disabled,l[m]=l[m]||i,l.$option=t,l.$order=l.$order||++e,o[s]=l,n.push(l)}t.selected&&y.items.push(s)}},l=t=>{var i,n;(n=r(t))[f]=n[f]||t.getAttribute("label")||"",n[_]=n[_]||s++,n[p]=n[p]||t.disabled,n.$order=n.$order||++e,y.optgroups.push(n),i=n[_],tX(t.children,t=>{a(t,i)})},y.maxItems=t.hasAttribute("multiple")?null:1,tX(t.children,t=>{"optgroup"===(i=t.tagName.toLowerCase())?l(t):"option"===i&&a(t)})}else(()=>{var e,i;let n=t.getAttribute(c);if(n)y.options=JSON.parse(n),tX(y.options,t=>{y.items.push(t[d])});else{var o=(i=(e=null==t?void 0:t.value)===null||void 0===e?void 0:e.trim())!==null&&void 0!==i?i:"";if(!h.allowEmptyOption&&!o.length)return;let n=o.split(h.delimiter);tX(n,t=>{let e={};e[u]=t,e[d]=t,y.options.push(e)}),y.items=n}})();return Object.assign({},er,y,e)}var el=0;class eh extends tr(ts){constructor(t,e){super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.isDropdownContentStale=!0,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,el++;var i,n,o=tQ(t);if(o.tomselect)throw Error("Tom Select already initialized on this element");o.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(o,null)).getPropertyValue("direction");let s=ea(o,e);this.settings=s,this.input=o,this.tabIndex=o.tabIndex||0,this.is_select_tag="select"===o.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=tG(o,"tomselect-"+el),this.isRequired=o.required,this.sifter=new tB(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var r=s.createFilter;"function"!=typeof r&&("string"==typeof r&&(r=new RegExp(r)),r instanceof RegExp?s.createFilter=t=>r.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();let a=tQ("<div>"),l=tQ("<div>"),h=this._render("dropdown"),c=tQ('<div role="listbox" tabindex="-1">'),u=this.input.getAttribute("class")||"",d=s.mode;
4(t3(a,s.wrapperClass,u,d),t3(l,s.controlClass),tY(a,l),t3(h,s.dropdownClass,d),s.copyClassesToDropdown&&t3(h,u),t3(c,s.dropdownContentClass),tY(h,c),tQ(s.dropdownParent||a).appendChild(h),tJ(s.controlInput))?(n=tQ(s.controlInput),tX(["autocorrect","autocapitalize","autocomplete","spellcheck","aria-label"],t=>{o.getAttribute(t)&&ee(n,{[t]:o.getAttribute(t)})}),n.tabIndex=-1,l.appendChild(n),this.focus_node=n):s.controlInput?(n=tQ(s.controlInput),this.focus_node=n):(n=tQ("<input/>"),this.focus_node=l),this.wrapper=a,this.dropdown=h,this.dropdown_content=c,this.control=l,this.control_input=n,this.setup()}setup(){let t=this,e=t.settings,i=t.control_input,n=t.dropdown,o=t.dropdown_content,s=t.wrapper,r=t.control,a=t.input,l=t.focus_node,h={passive:!0},c=t.inputId+"-ts-dropdown";ee(o,{id:c}),ee(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":c});let u=tG(l,t.inputId+"-ts-control"),d="label[for='"+t0(t.inputId)+"']",p=document.querySelector(d),m=t.focus.bind(t);if(p){tV(p,"click",m),ee(p,{for:u});let e=tG(p,t.inputId+"-ts-label");ee(l,{"aria-labelledby":e}),ee(o,{"aria-labelledby":e})}s.style.width=a.style.width,s.style.minWidth=a.style.minWidth,s.style.maxWidth=a.style.maxWidth,t.plugins.names.length&&t3([s,n],"plugin-"+t.plugins.names.join(" plugin-")),(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&ee(a,{multiple:"multiple"}),e.placeholder&&ee(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=RegExp("\\s*"+tu(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=tH(e.load,e.loadThrottle)),tV(n,"mousemove",()=>{t.ignoreHover=!1}),tV(n,"mouseenter",e=>{var i=t7(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)},{capture:!0}),tV(n,"click",e=>{let i=t7(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),tW(e,!0))}),tV(r,"click",e=>{var n=t7(e.target,"[data-ts-item]",r);if(n&&t.onItemSelect(e,n)){tW(e,!0);return}""==i.value&&(t.onClick(),tW(e,!0))}),tV(l,"keydown",e=>t.onKeyDown(e)),tV(i,"keypress",e=>t.onKeyPress(e)),tV(i,"input",e=>t.onInput(e)),tV(l,"blur",e=>t.onBlur(e)),tV(l,"focus",e=>t.onFocus(e)),tV(i,"paste",e=>t.onPaste(e));let f=e=>{let o=e.composedPath()[0];if(!s.contains(o)&&!n.contains(o)){t.isFocused&&t.blur(),t.inputState();return}o==i&&t.isOpen?e.stopPropagation():tW(e,!0)},_=()=>{t.isOpen&&t.positionDropdown()},g=()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())};tV(a,"invalid",g),tV(document,"mousedown",f),tV(window,"scroll",_,h),tV(window,"resize",_,h),this._destroy=()=>{a.removeEventListener("invalid",g),document.removeEventListener("mousedown",f),window.removeEventListener("scroll",_),window.removeEventListener("resize",_),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,t.on("change",this.onChange),t3(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),tX(e,t=>{this.registerOptionGroup(t)})}setupTemplates(){var t=this.settings.labelField,e=this.settings.optgroupLabelField;this.settings.render=Object.assign({},{optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,i)=>'<div class="optgroup-header">'+i(t[e])+"</div>",option:(e,i)=>"<div>"+i(e[t])+"</div>",item:(e,i)=>"<div>"+i(e[t])+"</div>",option_create:(t,e)=>'<div class="create">Add <strong>'+e(t.input)+"</strong>&hellip;</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"},this.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){let e=t?ea(this.input,{delimiter:this.settings.delimiter,allowEmptyOption:this.settings.allowEmptyOption}):this.settings;this.setupOptions(e.options,e.optgroups),this.setValue(e.items||[],!0),this.input.disabled?this.disable():this.input.readOnly?this.setReadOnly(!0):this.enable(),this.lastQuery=null}
4onClick(){if(this.activeItems.length>0){this.clearActiveItems(),this.focus();return}this.isFocused&&this.isOpen?this.blur():this.focus()}onMouseDown(){}onChange(){t1(this.input,"input"),t1(this.input,"change")}onPaste(t){var e=this;if(e.isInputHidden||e.isLocked){tW(t);return}e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();t.match(e.settings.splitOn)&&tX(t.trim().split(e.settings.splitOn),t=>{tN(t)&&(this.options[t]?e.addItem(t):e.createItem(t))})},0)}onKeyPress(t){if(this.isLocked){tW(t);return}var e=String.fromCharCode(t.keyCode||t.which);if(this.settings.create&&"multi"===this.settings.mode&&e===this.settings.delimiter){this.createItem(),tW(t);return}}onKeyDown(t){if(this.ignoreHover=!0,this.isLocked){9!==t.keyCode&&tW(t);return}switch(t.keyCode){case 65:if(t$(es,t)&&""==this.control_input.value){tW(t),this.selectAll();return}break;case 27:this.isOpen&&(tW(t,!0),this.close()),this.clearActiveItems();return;case 40:if(!this.isOpen&&this.hasOptions)this.open();else if(this.activeOption){let t=this.getAdjacent(this.activeOption,1);t&&this.setActiveOption(t)}tW(t);return;case 38:if(this.activeOption){let t=this.getAdjacent(this.activeOption,-1);t&&this.setActiveOption(t)}tW(t);return;case 13:this.canSelect(this.activeOption)?(this.onOptionSelect(t,this.activeOption),tW(t)):this.settings.create&&this.createItem()?tW(t):document.activeElement==this.control_input&&this.isOpen&&tW(t);return;case 37:this.advanceSelection(-1,t);return;case 39:this.advanceSelection(1,t);return;case 9:this.settings.selectOnTab&&(this.canSelect(this.activeOption)?(this.onOptionSelect(t,this.activeOption),tW(t)):this.settings.create&&this.createItem()&&tW(t));return;case 8:case 46:this.deleteSelection(t);return}this.isInputHidden&&!t$(es,t)&&tW(t)}onInput(t){if(this.isLocked)return;let e=this.inputValue();if(this.lastValue!==e){if(this.lastValue=e,""==e){this._onInput();return}this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=tj(()=>{this.refreshTimeout=null,this._onInput()},this.settings.refreshThrottle)}}_onInput(){let t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this.isFocused;if(this.isDisabled||this.isReadOnly){this.blur(),tW(t);return}this.ignoreFocus||(this.isFocused=!0,"focus"===this.settings.preload&&this.preload(),e||this.trigger("focus"),this.activeItems.length||(this.inputState(),this.refreshOptions(!!this.settings.openOnFocus)),this.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;!(e.parentElement&&e.parentElement.matches("[data-disabled]"))&&(e.classList.contains("create")?n.createItem(null,()=>{n.settings.closeAfterSelect?n.close():n.settings.clearAfterSelect&&n.setTextboxValue()}):void 0!==(i=e.dataset.value)&&(n.isDropdownContentStale=n.settings.hideSelected,n.addItem(i),n.settings.closeAfterSelect?n.close():n.settings.clearAfterSelect&&n.setTextboxValue(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){return!this.isLocked&&"multi"===this.settings.mode&&(tW(t),this.setActiveItem(e,t),!0)}canLoad(t){return!(!this.settings.load||this.loadedSearches.hasOwnProperty(t))}load(t){if(!this.canLoad(t))return;t3(this.wrapper,this.settings.loadingClass),this.loading++;let e=this.loadCallback.bind(this);this.settings.load.call(this,t,e)}loadCallback(t,e){this.loading=Math.max(this.loading-1,0),this.isDropdownContentStale=!0,this.clearActiveOption(),this.setupOptions(t,e),this.refreshOptions(this.isFocused&&!this.isInputHidden),this.loading||t6(this.wrapper,this.settings.loadingClass),this.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,t1(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){tU(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,o,s,r,a;if("single"!==this.settings.mode){if(!t){this.clearActiveItems(),this.isFocused&&this.inputState();return}if("click"===(i=e&&e.type.toLowerCase())&&t$("shiftKey",e)&&this.activeItems.length){for(a=this.getLastActive(),(o=Array.prototype.indexOf.call(this.control.children,a))>(s=Array.prototype.indexOf.call(this.control.children,t))&&(r=o,o=s,s=r),n=o;n<=s;n++)t=this.control.children[n],-1===this.activeItems.indexOf(t)&&this.setActiveItem
4Class(t);tW(e)}else"click"===i&&t$(es,e)||"keydown"===i&&t$("shiftKey",e)?t.classList.contains("active")?this.removeActiveItem(t):this.setActiveItemClass(t):(this.clearActiveItems(),this.setActiveItemClass(t));this.inputState(),this.isFocused||this.focus()}}setActiveItemClass(t){let e=this.control.querySelector(".last-active");e&&t6(e,"last-active"),t3(t,"active last-active"),this.trigger("item_select",t),-1==this.activeItems.indexOf(t)&&this.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),t6(t,"active")}clearActiveItems(){t6(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,ee(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),ee(t,{"aria-selected":"true"}),t3(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;let i=this.dropdown_content,n=i.clientHeight,o=i.scrollTop||0,s=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+o;r+s>n+o?this.scroll(r-n+s,e):r<o&&this.scroll(r,e)}scroll(t,e){let i=this.dropdown_content;e&&(i.style.scrollBehavior=e),i.scrollTop=t,i.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(t6(this.activeOption,"active"),ee(this.activeOption,{"aria-selected":null})),this.activeOption=null,ee(this.focus_node,{"aria-activedescendant":null})}selectAll(){let t=this;if("single"===t.settings.mode)return;let e=t.controlChildren();e.length&&(t.inputState(),t.close(),t.activeItems=e,tX(e,e=>{t.setActiveItemClass(e)}))}inputState(){this.control.contains(this.control_input)&&(ee(this.control_input,{placeholder:this.settings.placeholder}),this.activeItems.length>0||!this.isFocused&&this.settings.hidePlaceholder&&this.items.length>0?(this.setTextboxValue(),this.isInputHidden=!0):(this.settings.hidePlaceholder&&this.items.length>0&&ee(this.control_input,{placeholder:""}),this.isInputHidden=!1),this.wrapper.classList.toggle("input-hidden",this.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;if(t.isDisabled||t.isReadOnly)return;t.ignoreFocus=!0;let e=this.control_input.offsetWidth?this.control_input:this.focus_node;e.focus(),setTimeout(()=>{t.ignoreFocus=!1,e.getRootNode().activeElement===e&&this.onFocus()},0)}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,o=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw Error('Tom Select "score" setting must be a function that returns a function');return n.isDropdownContentStale||t!==n.lastQuery?(n.lastQuery=t,/(.)\1{15,}/.test(t)&&(t=""),e=n.sifter.search(t,Object.assign(o,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter(t=>{let e=tN(t.id);return!(null!==e&&-1!==n.items.indexOf(e))})),e}refreshOptions(t=!0){let e={},i=[];var n,o,s,r,a,l,h,c,u,d,p,m=this,f=m.inputValue();let _=f===m.lastQuery||""==f&&null==m.lastQuery;var g=m.search(f),v=null,y=m.settings.shouldOpen||!1,b=m.dropdown_content;_&&(v=m.activeOption)&&(u=v.closest("[data-group]")),r=g.items.length,"number"==typeof m.settings.maxOptions&&(r=Math.min(r,m.settings.maxOptions)),r>0&&(y=!0);let w=(t,n)=>{let o=e[t];if(void 0!==o){let t=i[o];if(void 0!==t)return[o,t.fragment]}let s=document.createDocumentFragment();return o=i.length,i.push({fragment:s,order:n,optgroup:t}),[o,s]};for(n=0;n<r;n++){let t=g.items[n];if(!t)continue;let i=t.id,r=m.options[i];if(void 0===r)continue;let h=tR(i),c=m.getOption(h,!0);for(m.settings.hideSelected||c.classList.toggle("selected",m.items.includes(h)),o=0,s=(l=Array.isArray(a=r[m.settings.optgroupField]||"")?a:[a])&&l.length;o<s;o++){a=l[o];let t=r.$order,n=m.optgroups[a];void 0===n&&"function"==typeof m.settings.optionGroupRegister&&(p=m.settings.optionGroupRegister.apply(m,[a]))&&m.registerOptionGroup(p),void 0===(n=m.optgroups[a])?a="":t=n.$order;let[s,h]=w(a,t);o>0&&(ee(c=c.cloneNode(!0),{id:r.$id+"-clone-"+o,"aria-selected":null}),c.classList.add("ts-cloned"),t6(c,"active"),m.activeOption&&m.activeOption.dataset.value==i&&u&&u.dataset.group===a.toString()&&(v=c)),h.appendChild(c),""!=a&&(e[a]=s)}}m.settings.lockOptgroupOrder&&i.sort((t,e)=>t.order-e.order),h=document.createDocumentFragment(),tX(i,t=>{let e=t.fragment,i=t.optgroup;if(!e||!e.children.length)return;let n=m.optgroups[i];if(void 0!==n){let t=document.createDocumentFragment();tY(t,m.render("optgroup_header",n)),tY(t,e),tY(h,m.render("optgroup",{group:n,options:t}))}else tY(h,e)}),b.innerHTML="",tY(b,h),m.isDropdownContentStale=!1,m.settings.highlight&&(eo(b),g.query.length&&g.tokens.length&&tX(g.tokens,t=>{en(b,t.regex)}));var x=t=>{let e=m.render(t,{input:f});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(m.loading?x("loading"):m.settings.shouldLoad.call(m,f)?0===g.items.length&&x("no_results"):x("not_loading"),(c=m.canCreate(f))&&(d=x("option_create")),m.hasOptions=g.items.length>
40||c,y){if(g.items.length>0){if(v||"single"!==m.settings.mode||void 0==m.items[0]||(v=m.getOption(m.items[0])),!b.contains(v)){let t=0;d&&!m.settings.addPrecedence&&(t=1),v=m.selectable()[t]}}else d&&(v=d);t&&!m.isOpen&&(m.open(),m.scrollToOption(v,"auto")),m.setActiveOption(v)}else m.clearActiveOption(),t&&m.isOpen&&m.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){if(Array.isArray(t))return this.addOptions(t,e),!1;let i=tN(t[this.settings.valueField]);return null===i||this.options.hasOwnProperty(i)?(this.updateOption(t[this.settings.valueField],t),!1):(t.$order=t.$order||++this.order,t.$id=this.inputId+"-opt-"+t.$order,this.options[i]=t,this.isDropdownContentStale=!0,e&&(this.userOptions[i]=e,this.trigger("option_add",i,t)),i)}addOptions(t,e=!1){tX(t,t=>{this.addOption(t,e)})}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=tN(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){var i,n;let o=tN(t),s=tN(e[this.settings.valueField]);if(null===o)return;let r=this.options[o];if(void 0==r)return;if("string"!=typeof s)throw Error("Value must be set in option data");let a=this.getOption(o),l=this.getItem(o);if(e.$order=e.$order||r.$order,delete this.options[o],this.uncacheValue(s),this.options[s]=e,a){if(this.dropdown_content.contains(a)){let t=this._render("option",e);ei(a,t),this.activeOption===a&&this.setActiveOption(t)}a.remove()}l&&(-1!==(n=this.items.indexOf(o))&&this.items.splice(n,1,s),i=this._render("item",e),l.classList.contains("active")&&t3(i,"active"),ei(l,i)),this.isDropdownContentStale=!0}removeOption(t,e){t=tR(t),this.uncacheValue(t),delete this.userOptions[t],delete this.options[t],this.isDropdownContentStale=!0,this.trigger("option_remove",t),this.removeItem(t,e)}clearOptions(t){let e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();let i={};tX(this.options,(t,n)=>{e(t,n)&&(i[n]=t)}),this.options=this.sifter.items=i,this.isDropdownContentStale=!0,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){let i=tN(t);if(null===i)return null;let n=this.options[i];if(void 0!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n;if(!t)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i<n.length;i++)if(n[i]==t){if(e>0)return n[i+1];return n[i-1]}return null}getItem(t){if("object"==typeof t)return t;var e=tN(t);return null!==e?this.control.querySelector(`[data-value="${tK(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];let o=(n=n.filter(t=>-1===i.items.indexOf(t)))[n.length-1];n.forEach(t=>{i.isPending=t!==o,i.addItem(t,e)})}addItem(t,e){tU(this,e?[]:["change","dropdown_close"],()=>{var i,n;let o=this.settings.mode,s=tN(t);if((!s||-1===this.items.indexOf(s)||("single"===o&&this.close(),"single"!==o&&this.settings.duplicates))&&null!==s&&this.options.hasOwnProperty(s)&&("single"===o&&this.clear(e),!("multi"===o&&this.isFull()))){if(i=this._render("item",this.options[s]),this.control.contains(i)&&(i=i.cloneNode(!0)),n=this.isFull(),this.items.splice(this.caretPos,0,s),this.insertAtCaret(i),this.isSetup){if(!this.isPending&&this.settings.hideSelected){let t=this.getOption(s),e=this.getAdjacent(t,1);e&&this.setActiveOption(e)}this.settings.clearAfterSelect&&this.setTextboxValue(),this.isPending||this.settings.closeAfterSelect||this.refreshOptions(this.isFocused&&"single"!==o),!1!=this.settings.closeAfterSelect&&this.isFull()?this.close():this.isPending||this.positionDropdown(),this.trigger("item_add",s,i),this.isPending||this.updateOriginalInput({silent:e})}
4(!this.isPending||!n&&this.isFull())&&(this.inputState(),this.refreshState())}})}removeItem(t=null,e){var i,n;if(!(t=this.getItem(t)))return;let o=t.dataset.value;i=et(t),t.remove(),t.classList.contains("active")&&(n=this.activeItems.indexOf(t),this.activeItems.splice(n,1),t6(t,"active")),this.items.splice(i,1),this.isDropdownContentStale=!0,!this.settings.persist&&this.userOptions.hasOwnProperty(o)&&this.removeOption(o,e),i<this.caretPos&&this.setCaret(this.caretPos-1),this.updateOriginalInput({silent:e}),this.refreshState(),this.positionDropdown(),this.trigger("item_remove",o,t)}createItem(t=null,e=()=>{}){3==arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,o=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return tN(t)&&this.options[t]&&n.addItem(t),e(),!1;n.lock();var s=!1,r=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=tN(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(o),n.addItem(i),e(t),s=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,r):{[n.settings.labelField]:t,[n.settings.valueField]:t},s||r(i),!0}refreshItems(){this.isDropdownContentStale=!0,this.isSetup&&this.addItems(this.items),this.updateOriginalInput(),this.refreshState()}refreshState(){this.refreshValidityState();let t=this.isFull(),e=this.isLocked;this.wrapper.classList.toggle("rtl",this.rtl);let i=this.wrapper.classList;i.toggle("focus",this.isFocused),i.toggle("disabled",this.isDisabled),i.toggle("readonly",this.isReadOnly),i.toggle("required",this.isRequired),i.toggle("invalid",!this.isValid),i.toggle("locked",e),i.toggle("full",t),i.toggle("input-active",this.isFocused&&!this.isInputHidden),i.toggle("dropdown-active",this.isOpen),i.toggle("has-options",t5(this.options)),i.toggle("has-items",this.items.length>0)}refreshValidityState(){this.input.validity&&(this.isValid=this.input.validity.valid,this.isInvalid=!this.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){var e,i;let n=this,o=n.input.querySelector('option[value=""]');if(n.is_select_tag){let t=[],r=n.input.querySelectorAll("option:checked").length;function s(e,i,s){return e||(e=tQ('<option value="'+tZ(i)+'">'+tZ(s)+"</option>")),e!=o&&n.input.append(e),t.push(e),(e!=o||r>0||"multi"==n.settings.mode)&&(e.selected=!0),e}n.input.querySelectorAll("option:checked").forEach(t=>{t.selected=!1}),0==n.items.length&&"single"==n.settings.mode?s(o,"",""):n.items.forEach(o=>{i=(e=n.options[o])[n.settings.labelField]||"",t.includes(e.$option)?s(n.input.querySelector(`option[value="${tK(o)}"]:not(:checked)`),o,i):e.$option=s(e.$option,o,i)})}else n.input.value=n.getValue();n.isSetup&&!t.silent&&n.trigger("change",n.getValue())}open(){this.isLocked||this.isOpen||"multi"===this.settings.mode&&this.isFull()||(this.isOpen=!0,ee(this.focus_node,{"aria-expanded":"true"}),this.refreshState(),t2(this.dropdown,{visibility:"hidden",display:"block"}),this.positionDropdown(),t2(this.dropdown,{visibility:"visible",display:"block"}),this.focus(),this.trigger("dropdown_open",this.dropdown))}close(t=!0){var e=this.isOpen;t&&(this.setTextboxValue(),"single"===this.settings.mode&&this.items.length&&this.inputState()),this.isOpen=!1,ee(this.focus_node,{"aria-expanded":"false"}),t2(this.dropdown,{display:"none"}),this.settings.hideSelected&&this.clearActiveOption(),this.refreshState(),e&&this.trigger("dropdown_close",this.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;t2(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;e.items.length&&(tX(e.controlChildren(),t=>{e.removeItem(t,!0)}),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear"))}insertAtCaret(t){let e=this.caretPos,i=this.control;i.insertBefore(t,i.children[e]||null),this.setCaret(e+1)}deleteSelection(t){var e,i,n;e=t&&8===t.keyCode?-1:1,i=tq(this.control_input);let o=[];if(this.activeItems.length)n=et(t8(this.activeItems,e)),e>0&&n++,tX(this.activeItems,t=>o.push(t));else if((this.isFocused||"single"===this.settings.mode)&&this.items.length){let t;let n=this.controlChildren();e<0&&0===i.start&&0===i.length?t=n[this.caretPos-1]:e>0&&i.start===this.inputValue().length&&(t=n[this.caretPos]),void 0!==t&&o.push(t)}if(!this.shouldDelete(o,t))return!1;for(tW(t,!0),void 0!==n&&this.setCaret(n);o.length;)this.removeItem(o.pop());return this.inputState(),this.positionDropdown(),this.refreshOptions(!1),!0}shouldDelete(t,e){let i=t.map(t=>t.dataset.value);return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.call(this,i,e))}advanceSelection(t,e){var i,n;this.rtl&&(t*=-1),!this.inputValue().length&&(t$(es,e)||t$("shiftKey",e)?(n=(i=this.getLastActive(t))?i.classList.contains("active")?this.getAdjacent(i,t,"item"):i:t>0?this.control_input.nextElementSibling:this.control_input.previousElementSibling)&&(n.classList.contains("active")&&this.removeActiveItem(i),this.setActiveItem
4Class(n)):this.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");if(i)return t8(i,t)}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this.revertSettings;this.trigger("destroy"),this.off(),this.wrapper.remove(),this.dropdown.remove(),this.input.innerHTML=t.innerHTML,this.input.tabIndex=t.tabIndex,t6(this.input,"tomselected","ts-hidden-accessible"),this._destroy(),delete this.input.tomselect}render(t,e){var i;if("function"!=typeof this.settings.render[t]||!(i=this.settings.render[t].call(this,e,tZ)))return null;if(i=tQ(i),"option"===t||"option_create"===t?e[this.settings.disabledField]?ee(i,{"aria-disabled":"true"}):ee(i,{"data-selectable":""}):"optgroup"===t&&(ee(i,{"data-group":e.group[this.settings.optgroupValueField]}),e.group[this.settings.disabledField]&&ee(i,{"data-disabled":""})),"option"===t||"item"===t){let n=tR(e[this.settings.valueField]);ee(i,{"data-value":n}),"item"===t?(t3(i,this.settings.itemClass),ee(i,{"data-ts-item":""})):(t3(i,this.settings.optionClass),ee(i,{role:"option",id:e.$id}),e.$div=i,this.options[n]=e)}return i}_render(t,e){let i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){tX(this.options,t=>{t.$div&&(t.$div.remove(),delete t.$div)})}uncacheValue(t){let e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,o=n[e];n[e]=function(){var e,s;return("after"===t&&(e=o.apply(n,arguments)),s=i.apply(n,arguments),"instead"===t)?s:("before"===t&&(e=o.apply(n,arguments)),e)}}}let ec=(t,e,i,n)=>{t.addEventListener(e,i,n)},eu=t=>null==t?null:ed(t),ed=t=>"boolean"==typeof t?t?"1":"0":t+"",ep=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},em=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(ef(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},ef=t=>!!("string"==typeof t&&t.indexOf("<")>-1),e_=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(eg(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},eg=t=>!!("string"==typeof t&&t.indexOf("<")>-1),ev=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},ey=(t,e,i,n)=>{t.addEventListener(e,i,n)},eb=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},ew=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(ex(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},ex=t=>!!("string"==typeof t&&t.indexOf("<")>-1),eL=(t,e)=>{eb(e,(e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)})},eE=(t,e)=>{var i;(i=t.parentNode)==null||i.insertBefore(e,t.nextSibling)},eP=(t,e)=>{var i;(i=t.parentNode)==null||i.insertBefore(e,t)},eC=(t,e)=>{do{var i;if(t==(e=(i=e)==null?void 0:i.previousElementSibling))return!0}while(e&&e.previousElementSibling)return!1},eT=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},ek=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(eS(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},eS=t=>!!("string"==typeof t&&t.indexOf("<")>-1),eM=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},eO=(t,...e)=>{var i=eA(e);(t=ez(t)).map(t=>{i.map(e=>{t.classList.remove(e)})})},eA=t=>{var e=[];return eM(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},ez=t=>(Array.isArray(t)||(t=[t]),t),eI=(t,e)=>{if(!t)return -1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},eF=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},eD=(t,e,i,n)=>{t.addEventListener(e,i,n)},eB=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},eN=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(eR(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},eR=t=>!!("string"==typeof t&&t.indexOf("<")>-1),eZ=(t,...e)=>{var i=ej(e);(t=eH(t)).map(t=>{i.map(e=>{t.classList.add(e)})})},ej=t=>{var e=[];return eB(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},eH=t=>(Array.isArray(t)||(t=[t]),t),eU=(t,e,i,n)=>{t.addEventListener(e,i,n)},eq=(t,e,i)=>{for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},eW=(t,e)=>{if(!t)return -1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},eV=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},e$=(t,e,i,n)=>{t.addEventListener(e,i,n)},eG=t=>
4{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(eK(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},eK=t=>!!("string"==typeof t&&t.indexOf("<")>-1),eY=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},eX=(t,...e)=>{var i=eQ(e);(t=eJ(t)).map(t=>{i.map(e=>{t.classList.add(e)})})},eQ=t=>{var e=[];return eY(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},eJ=t=>(Array.isArray(t)||(t=[t]),t);eh.define("change_listener",function(){ec(this.input,"change",()=>{this.sync()})}),eh.define("checkbox_options",function(t){var e=this,i=e.onOptionSelect;e.settings.hideSelected=!1;let n=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var o=function(t,e){e?(t.checked=!0,n.uncheckedClassNames&&t.classList.remove(...n.uncheckedClassNames),n.checkedClassNames&&t.classList.add(...n.checkedClassNames)):(t.checked=!1,n.checkedClassNames&&t.classList.remove(...n.checkedClassNames),n.uncheckedClassNames&&t.classList.add(...n.uncheckedClassNames))},s=function(t){setTimeout(()=>{var e=t.querySelector("input."+n.className);e instanceof HTMLInputElement&&o(e,t.classList.contains("selected"))},1)};e.hook("after","setupTemplates",()=>{var t=e.settings.render.option;e.settings.render.option=(i,s)=>{var r=em(t.call(e,i,s)),a=document.createElement("input");n.className&&a.classList.add(n.className),a.addEventListener("click",function(t){ep(t)}),a.type="checkbox";let l=eu(i[e.settings.valueField]);return o(a,!!(l&&e.items.indexOf(l)>-1)),r.prepend(a),r}}),e.on("item_remove",t=>{var i=e.getOption(t);i&&(i.classList.remove("selected"),s(i))}),e.on("item_add",t=>{var i=e.getOption(t);i&&s(i)}),e.hook("instead","onOptionSelect",(t,n)=>{if(n.classList.contains("selected")){n.classList.remove("selected"),e.removeItem(n.dataset.value),e.refreshOptions(),ep(t,!0);return}i.call(e,t,n),s(n)})}),eh.define("clear_button",function(t){let e=this,i=Object.assign({className:"clear-button",title:"Clear All",role:"button",tabindex:0,html:t=>`<div class="${t.className}" title="${t.title}" role="${t.role}" tabindex="${t.tabindex}">&times;</div>`},t);e.on("initialize",()=>{var t=e_(i.html(i));t.addEventListener("click",t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),e.refreshOptions(!1),t.preventDefault(),t.stopPropagation())}),e.control.appendChild(t)})}),eh.define("drag_drop",function(){let t;var e=this;if("multi"!==e.settings.mode)return;var i=e.lock,n=e.unlock;let o=!0;e.hook("after","setupTemplates",()=>{var i=e.settings.render.item;e.settings.render.item=(n,s)=>{let r=ew(i.call(e,n,s));eL(r,{draggable:"true"});let a=e=>{e.preventDefault(),r.classList.add("ts-drag-over"),l(r,t)},l=(t,e)=>{void 0!==e&&(eC(e,r)?eE(t,e):eP(t,e))};return ey(r,"mousedown",t=>{o||ev(t),t.stopPropagation()}),ey(r,"dragstart",e=>{t=r,setTimeout(()=>{r.classList.add("ts-dragging")},0)}),ey(r,"dragenter",a),ey(r,"dragover",a),ey(r,"dragleave",()=>{r.classList.remove("ts-drag-over")}),ey(r,"dragend",()=>{document.querySelectorAll(".ts-drag-over").forEach(t=>t.classList.remove("ts-drag-over")),(i=t)==null||i.classList.remove("ts-dragging"),t=void 0;var i,n=[];e.control.querySelectorAll("[data-value]").forEach(t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}}),e.setValue(n)}),r}}),e.hook("instead","lock",()=>(o=!1,i.call(e))),e.hook("instead","unlock",()=>(o=!0,n.call(e)))}),eh.define("dropdown_header",function(t){let e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a class="'+t.closeClass+'">&times;</a></div></div>'},t);e.on("initialize",()=>{var t=ek(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",t=>{eT(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})}),eh.define("caret_position",function(){var t=this;t.hook("instead","setCaret",e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEac
4h((i,n)=>{n<e?t.control_input.insertAdjacentElement("beforebegin",i):t.control.appendChild(i)}):e=t.items.length,t.caretPos=e}),t.hook("instead","moveCaret",e=>{if(!t.isFocused)return;let i=t.getLastActive(e);if(i){let n=eI(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),eO(i,"last-active")}else t.setCaret(t.caretPos+e)})}),eh.define("dropdown_input",function(){let t=this;t.settings.shouldOpen=!0,t.hook("before","setup",()=>{var e;t.focus_node=t.control,eZ(t.control_input,"dropdown-input");let i=eN('<div class="dropdown-input-wrap">');i.append(t.control_input),t.dropdown.insertBefore(i,t.dropdown.firstChild);let n=eN('<input class="items-placeholder" tabindex="-1" />');n.placeholder=t.settings.placeholder||"",t.control.append(n);let o=(e=t.input)==null?void 0:e.getAttribute("aria-label");o&&n.setAttribute("aria-label",o)}),t.on("initialize",()=>{t.control_input.addEventListener("keydown",e=>{switch(e.keyCode){case 27:t.isOpen&&(eF(e,!0),t.close()),t.clearActiveItems();return;case 9:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)}),t.on("blur",()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex}),t.on("dropdown_open",()=>{t.control_input.focus()});let e=t.onBlur;t.hook("instead","onBlur",i=>{if(!i||i.relatedTarget!=t.control_input)return e.call(t)}),eD(t.control_input,"blur",()=>t.onBlur()),t.hook("before","close",()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})})})}),eh.define("input_autogrow",function(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),i=t.control_input;for(let n of(e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e),["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]))e.style[n]=i.style[n];var n=()=>{e.textContent=i.value,i.style.width=e.clientWidth+"px"};n(),t.on("update item_add item_remove",n),eU(i,"input",n),eU(i,"keyup",n),eU(i,"blur",n),eU(i,"update",n)})}),eh.define("no_backspace_delete",function(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",i=>!!t.activeItems.length&&e.call(t,i))}),eh.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),eh.define("optgroup_columns",function(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",i=>{var n,o,s,r;if(!t.isOpen||!(37===i.keyCode||39===i.keyCode))return e.call(t,i);t.ignoreHover=!0,r=eq(t.activeOption,"[data-group]"),n=eW(t.activeOption,"[data-selectable]"),r&&(r=37===i.keyCode?r.previousSibling:r.nextSibling)&&(o=(s=r.querySelectorAll("[data-selectable]"))[Math.min(s.length-1,n)])&&t.setActiveOption(o)})}),eh.define("remove_button",function(t){let e=this,i=Object.assign({label:"×",title:"Remove",className:"remove",tabindex:-1,role:"button",html:t=>{var e;let i=document.createElement("div");return i.className=t.className||"",i.title=t.title||"",i.setAttribute("role",t.role||"button"),i.tabIndex=(e=t.tabindex)!=null?e:-1,i.textContent=t.label||"",i}},t);e.hook("after","setupTemplates",()=>{var t=e.settings.render.item;e.settings.render.item=(n,o)=>{var s=eG(t.call(e,n,o)),r=eG(i.html(i));return s.appendChild(r),e$(r,"mousedown",t=>{eV(t,!0)}),e$(r,"click",t=>{!e.isLocked&&(eV(t,!0),!e.isLocked&&e.shouldDelete([s],t)&&(e.removeItem(s),e.refreshOptions(!1),e.inputState()))}),s}})}),eh.define("restore_on_backspace",function(t){let e=this,i=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",function(t){if(e.isFocused&&""===e.control_input.value.trim()){var n=e.options[t];n&&e.setTextboxValue(i.text.call(e,n))}})}),eh.define("virtual_scroll",function(){let t=this,e=t.canLoad,i=t.clearActiveOption,n=t.loadCallback;var o,s,r,a={},l=!1,h=[],c=!1,u=[],d=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(o.clientHeight/(o.scrollHeight-o.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];let p=e=>(null===t.settings.maxOptions||"number"!=typeof t.settings.maxOptions||!(o.children.length>=t.settings.maxOptions))&&e in a&&!!a[e],m=(e,i)=>!!(t.items.indexOf(i)>=0||h.indexOf(i)>=0);t.setNextUrl=(t,e)=>{a[t]=e},t.getUrl=e=>{if(e in a){let t=a[e];return a[e]=!1,t}return t.clearPagination(),t.settings.firstUrl.call(t,e)},t.clearPagination=()=>{a={}},t.hook("instead","clearActiveOption",()=>{if(!l)return i.call(t)}),t.hook("instead","canLoad",i=>i in a?p(i):e.call(t,i)),t.hook("instead","loadCallback",(e,i)=>{if(l){if(s){let i=e[0];void 0!==i&&(s.dataset.value=i[t.settings.valueField])}}else{let e=""!==t.lastValue?(e,i)=>t.items.indexOf(i)>=0||d.indexOf(i)>=0:m;t.clearOptions(e)}n.call(t,e,i),l||c||(c=!0,""===t.lastValue&&(h=Object.keys(t.options),r=a[""],u=Object.values(t.options))),l=!1}),t.hook("before","refreshOptions",()=>{t.activeOption&&"option"!==t.activeOption.getAttribute("role")&&t.setActiveOption(t.activeOption.previousElementSibling)}),t.hook("after","refreshOptions",()=>{var e;let i=t.lastValue;p(i)?(e=t.render("loading_more",{query:i}
4))&&(e.setAttribute("data-selectable",""),s=e):i in a&&!o.querySelector(".no-results")&&(e=t.render("no_more_results",{query:i})),e&&(eX(e,t.settings.optionClass),o.append(e))});let f=()=>{c&&(t.addOptions(u),t.clearOptions(m),r&&(a[""]=r))};t.on("type",e=>{""===e&&(f(),t.refreshOptions(!1))}),t.on("dropdown_close",f),t.on("initialize",()=>{d=Object.keys(t.options),h=Object.keys(t.options),o=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},t.settings.render),o.addEventListener("scroll",()=>{t.settings.shouldLoadMore.call(t)&&p(t.lastValue)&&(l||(l=!0,t.load.call(t,t.lastValue)))})})});let e0=eh;class e1 extends l{init(){new e0(this.el,{})}}e1.options={desktop:!0,mobile:!1};class e2 extends l{init(){fetch(this.options.src).then(t=>t.text()).then(t=>{this.el.innerHTML=t})}}e2.options={src:null,attributes:null};class e3 extends l{init(){this._inputLocation=r.querySelector(this.el,this.options.inputLocationSelector),this._buttonMyLocation=r.querySelector(this.el,this.options.buttonMyLocationSelector),this._registerEvents()}_registerEvents(){this._buttonMyLocation&&this._buttonMyLocation.addEventListener("click",this._onClickButton.bind(this))}_onClickButton(){this._inputLocation.value="0|0",navigator.geolocation&&navigator.geolocation.getCurrentPosition(t=>{this._inputLocation.value="".concat(t.coords.latitude,"|").concat(t.coords.longitude),this._inputLocation.dispatchEvent(new Event("input"))})}}e3.options={inputLocationSelector:".location",buttonMyLocationSelector:".my-location"};/*!
5 * Signature Pad v4.2.0 | https://github.com/szimek/signature_pad
6 * (c) 2024 Szymon Nowak | Released under the MIT license
7 */class e6{constructor(t,e,i,n){if(isNaN(t)||isNaN(e))throw Error(`Point is invalid: (${t}, ${e})`);this.x=+t,this.y=+e,this.pressure=i||0,this.time=n||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class e4{static fromPoints(t,e){let i=this.calculateControlPoints(t[0],t[1],t[2]).c2,n=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new e4(t[1],i,n,t[2],e.start,e.end)}static calculateControlPoints(t,e,i){let n=t.x-e.x,o=t.y-e.y,s=e.x-i.x,r=e.y-i.y,a={x:(t.x+e.x)/2,y:(t.y+e.y)/2},l={x:(e.x+i.x)/2,y:(e.y+i.y)/2},h=Math.sqrt(s*s+r*r),c=a.x-l.x,u=a.y-l.y,d=h/(Math.sqrt(n*n+o*o)+h),p={x:l.x+c*d,y:l.y+u*d},m=e.x-p.x,f=e.y-p.y;return{c1:new e6(a.x+m,a.y+f),c2:new e6(l.x+m,l.y+f)}}constructor(t,e,i,n,o,s){this.startPoint=t,this.control2=e,this.control1=i,this.endPoint=n,this.startWidth=o,this.endWidth=s}length(){let t,e;let i=0;for(let n=0;n<=10;n+=1){let o=n/10,s=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),r=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(n>0){let n=s-t,o=r-e;i+=Math.sqrt(n*n+o*o)}t=s,e=r}return i}point(t,e,i,n,o){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+o*t*t*t}}class e9{constructor(){try{this._et=new EventTarget}catch(t){this._et=document}}addEventListener(t,e,i){this._et.addEventListener(t,e,i)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,e,i){this._et.removeEventListener(t,e,i)}}class e7 extends e9{constructor(t,e={}){super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=t=>{1===t.buttons&&this._strokeBegin(t)},this._handleMouseMove=t=>{this._strokeMoveUpdate(t)},this._handleMouseUp=t=>{1===t.buttons&&this._strokeEnd(t)},this._handleTouchStart=t=>{if(t.cancelable&&t.preventDefault(),1===t.targetTouches.length){let e=t.changedTouches[0];this._strokeBegin(e)}},this._handleTouchMove=t=>{t.cancelable&&t.preventDefault();let e=t.targetTouches[0];this._strokeMoveUpdate(e)},this._handleTouchEnd=t=>{if(t.target===this.canvas){t.cancelable&&t.preventDefault();let e=t.changedTouches[0];this._strokeEnd(e)}},this._handlePointerStart=t=>{t.preventDefault(),this._strokeBegin(t)},this._handlePointerMove=t=>{this._strokeMoveUpdate(t)},this._handlePointerEnd=t=>{this._drawingStroke&&(t.preventDefault(),this._strokeEnd(t))},this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle="throttle"in e?e.throttle:16,this.minDistance="minDistance"in e?e.minDistance:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions="canvasContextOptions"in e?e.canvasContextOptions:{},this._strokeMoveUpdate=this.throttle?function(t,e=250){let i,n,o,s=0,r=null,a=()=>{s=Date.now(),r=null,i=t.apply(n,o),r||(n=null,o=[])};return function(...l){let h=Date.now(),c=e-(h-s);return n=this,o=l,c<=0||c>e?(r&&(clearTimeout(r),r=null),s=h,i=t.apply(n,o),r||(n=null,o=[])):r||(r=window.setTimeout(a,c)),i}}(e7.prototype._strokeUpdate,this.throttle):e7.prototype._strokeUpdate,this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){let{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(t,e={}){return new Promise((i,n)=>{let o=new Image,s=e.ratio||window.devicePixelRatio||1,r=e.width||this.canvas.width/s,a=e.height||this.canvas.height/s,l=e.xOffset||0,h=e.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,l,h,r,a),i()},o.onerror=t=>{n(t)},o.crossOrigin="anonymous",o.src=t,this._isEmpty=!1})}toDataURL(t="image/png",e){return"image/svg+xml"===t?("object"!=typeof e&&(e=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(e))}`):("number"!=typeof e&&(e=void 0),this.canvas.toDataURL(t,e))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";let t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerStart),this.canvas.removeEventListener("pointermove",this._handlePointerMove),this.canvas.ownerDocument.removeEventListener("pointerup",this._handlePointerEnd),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("mousemove",this._handleMouseMove),this.canvas.ownerDocument.removeEventListener("mouseup",this._handleMouseUp),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this.canvas.removeEventListener("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;this._drawingStroke=!0;let e=this._getPointGroupOptions(),i=Object.assign(Object.assign({},e),{points:[]});this._data.push(i),this._reset(e),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length){this._strokeBegin(t);return}this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));let e=t.clientX,i=t.clientY,n=void 0!==t.pressure?t.pressure:void 0!==t.force?t.force:0,o=this._createPoint(e,i,n),s=this._data[this._data.length-1],r=s.points,a=r.length>0&&r[r.length-1],l=!!a&&o.distanceTo(a)<=this.minDistance,h=this._getPointGroupOptions(s);if(!a||!(a&&l)){let t=this._addPoint(o,h);a?t&&this._drawCurve(t,h):this._drawDot(o,h),r.push({time:o.time,x:o.x,y:o.y,pressure:o.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t){this._drawingStroke&&(this._strokeUpdate(t),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerStart),this.canvas.addEventListener("pointermove",this._handlePointerMove),this.canvas.ownerDocument.addEventListener("pointerup",this._handlePointerEnd)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown),this.canvas.addEventListener("mousemove",this._handleMouseMove),this.canvas.ownerDocument.addEventListener("mouseup",this._handleMouseUp)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart),this.canvas.addEventListener("touchmove",this._handleTouchMove),this.canvas.addEventListener("touchend",this._handleTouchEnd)}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,e,i){let n=this.canvas.getBoundingClientRect();return new e6(t-n.left,e-n.top,i,new Date().getTime())}_addPoint(t,e){let{_lastPoints:i}=this;if(i.push(t),i.length>2){3===i.length&&i.unshift(i[0]);let t=this._calculateCurveWidths(i[1],i[2],e),n=e4.fromPoints(i,t);return i.shift(),n}return null}_calculateCurveWidths(t,e,i){let n=i.velocityFilterWeight*e.velocityFrom(t)+(1-i.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(n,i),s={end:o,start:this._lastWidth};return this._lastVelocity=n,this._lastWidth=o,s}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,i){let n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){let i=this._ctx,n=t.endWidth-t.startWidth,o=2*Math.ceil(t.length());i.beginPath(),i.fillStyle=e.penColor;for(let i=0;i<o;i+=1){let s=i/o,r=s*s,a=r*s,l=1-s,h=l*l,c=h*l,u=c*t.startPoint.x;u+=3*h*s*t.control1.x+3*l*r*t.control2.x+a*t.endPoint.x;let d=c*t.startPoint.y;d+=3*h*s*t.control1.y+3*l*r*t.control2.y+a*t.endPoint.y;let p=Math.min(t.startWidth+a*n,e.maxWidth);this._drawCurveSegment(u,d,p)}i.closePath(),i.fill()}_drawDot(t,e){let i=this._ctx,n=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;i.beginPath(),this._drawCurveSegment(t.x,t.y,n),i.closePath(),i.fillStyle=e.penColor,i.fill()}
7_fromData(t,e,i){for(let n of t){let{points:t}=n,o=this._getPointGroupOptions(n);if(t.length>1)for(let i=0;i<t.length;i+=1){let n=t[i],s=new e6(n.x,n.y,n.pressure,n.time);0===i&&this._reset(o);let r=this._addPoint(s,o);r&&e(r,o)}else this._reset(o),i(t[0],o)}}toSVG({includeBackgroundColor:t=!1}={}){let e=this._data,i=Math.max(window.devicePixelRatio||1,1),n=this.canvas.width/i,o=this.canvas.height/i,s=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),s.setAttribute("viewBox",`0 0 ${n} ${o}`),s.setAttribute("width",n.toString()),s.setAttribute("height",o.toString()),t&&this.backgroundColor){let t=document.createElement("rect");t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill",this.backgroundColor),s.appendChild(t)}return this._fromData(e,(t,{penColor:e})=>{let i=document.createElement("path");if(!isNaN(t.control1.x)&&!isNaN(t.control1.y)&&!isNaN(t.control2.x)&&!isNaN(t.control2.y)){let n=`M ${t.startPoint.x.toFixed(3)},${t.startPoint.y.toFixed(3)} C ${t.control1.x.toFixed(3)},${t.control1.y.toFixed(3)} ${t.control2.x.toFixed(3)},${t.control2.y.toFixed(3)} ${t.endPoint.x.toFixed(3)},${t.endPoint.y.toFixed(3)}`;i.setAttribute("d",n),i.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),i.setAttribute("stroke",e),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),s.appendChild(i)}},(t,{penColor:e,dotSize:i,minWidth:n,maxWidth:o})=>{let r=document.createElement("circle");r.setAttribute("r",(i>0?i:(n+o)/2).toString()),r.setAttribute("cx",t.x.toString()),r.setAttribute("cy",t.y.toString()),r.setAttribute("fill",e),s.appendChild(r)}),s.outerHTML}}class e8 extends l{init(){this._canvas=this.el.querySelector("canvas"),this._input=this.el.querySelector("input"),this._button=this.el.querySelector("[data-fb-refresh]"),this.signaturePad=new e7(this._canvas),this.signaturePad.addEventListener("endStroke",()=>{this._input.value=this.signaturePad.toDataURL()}),this._button.addEventListener("click",()=>{this.signaturePad.clear(),this._input.value=""}),this._input.value&&this.signaturePad.fromDataURL(this._input.value)}}e8.options={dotSize:null,minWidth:null,maxWidth:null,throttle:null,minDistance:null,backgroundColor:null,penColor:null,velocityFilterWeight:.7};let e5=window.PluginManager;if(e5.register("MoorlFoundation",class extends l{init(){this._client=new h(window.accessKey,window.contextToken),this._registerModalEvents(),this.callback=null}_registerModalEvents(){let t=this,e=document.querySelectorAll("[data-moorl-foundation-modal]"),i=document.getElementById("moorlFoundationModal");e.forEach(t=>{t.addEventListener("click",()=>{let e=t.dataset.moorlFoundationModal;this._client.get(e,t=>{this._openModal(t,null)})})}),i.addEventListener("hidden.bs.modal",()=>{i.innerHTML=""}),window.moorlFoundationModal=function(e,i){t._client.get(e,e=>{t._openModal(e,i)})}}_openModal(t,e){var i;let n=document.getElementById("moorlFoundationModal");n.innerHTML=t;let o=(i=bootstrap.Modal.getInstance(n))!==null&&void 0!==i?i:new bootstrap.Modal(n);o.show(),window.PluginManager.initializePlugins(),"function"==typeof e&&e(n,o)}}),e5.register("MoorlFoundationForm",d,"[data-moorl-foundation-form]"),e5.register("MoorlAnimation",p,"[data-moorl-animation]"),e5.register("MoorlLocation",j,"[data-moorl-location]"),e5.register("MoorlRelativeTime",m,"[data-moorl-relative-time]"),e5.register("MoorlCountdown",f,"[data-moorl-countdown]"),e5.register("MoorlProductBuyList",g,"[data-moorl-product-buy-list]"),e5.register("MoorlPartsList",v,"[data-moorl-parts-list]"),e5.register("MoorlToc",y,"[data-moorl-toc]"),e5.register("MoorlGrid",b,"[data-moorl-grid]"),e5.register("MoorlPaint",w,".moorl-paint"),e5.register("MoorlFoundationFilterRadius",P,"[data-moorl-foundation-filter-radius]"),e5.register("MoorlFoundationFilterSearch",C,"[data-moorl-foundation-filter-search]"),e5.register("MoorlCustomerUpload",B,"[data-moorl-customer-upload]"),e5.register("MoorlHoverCard",H,"[data-moorl-hover-card]"),e5.register("MoorlCookieBox",te,"[data-moorl-cookie-box]"),e5.register("MoorlModal",class extends l{init(){this._registerEvents()}_registerEvents(){this.el.addEventListener("click",()=>{let t=this.el.dataset.moorlModal;window.moorlFoundationModal(t)})}},"[data-moorl-modal]"),e5.register("MoorlCharCounter",ti,"[data-moorl-char-counter]"),e5.register("MoorlCopy",tn,"[data-moorl-copy]"),e5.register("MoorlSelectSearch",e1,"[data-moorl-select-search]"),e5.register("MoorlSvgLoader",e2,"[data-moorl-svg-loader]"),e5.register("MoorlInputLocation",e3,"[data-moorl-input-location]"),e5.register("MoorlFbSignature",e8,"[data-moorl-fb-signature]"),window.moorlAnimation)for(let t of window.moorlAnimation)e5.register("MoorlAnimation",p,t.cssSelector,t)})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.