@mappedin/mappedin-js 6.0.0-alpha.7 → 6.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/navigator/index.js +1 -1
- package/lib/esm/renderer/{Arrival-XW44Q4K6.js → Arrival-HFFQMV6K.js} +1 -1
- package/lib/esm/renderer/{Chalet-PYUAU36E.js → Chalet-4T7G2EOB.js} +1 -1
- package/lib/esm/renderer/{HelveticaNeue-JAB3QIZV.js → HelveticaNeue-SYBCLCMV.js} +1 -1
- package/lib/esm/renderer/{Helvetiker-M6VTD4J2.js → Helvetiker-YQQ7YLDG.js} +1 -1
- package/lib/esm/renderer/{Lato-QNUWWN44.js → Lato-VOB7DTFK.js} +1 -1
- package/lib/esm/renderer/{MyriadPro-FBYYQ2DG.js → MyriadPro-3UT6I6O6.js} +1 -1
- package/lib/esm/renderer/{ProximaNova-CDMPZHL7.js → ProximaNova-JID4Q6QR.js} +1 -1
- package/lib/esm/renderer/{SimonCircular-PGDIDVFO.js → SimonCircular-EOKJ3PHU.js} +1 -1
- package/lib/esm/renderer/{browser-VIWCI4DF.js → browser-IFEP2NKH.js} +1 -1
- package/lib/esm/renderer/chunk-6MFNIXKK.js +1 -0
- package/lib/esm/renderer/chunk-K7MHFVG3.js +1 -0
- package/lib/esm/renderer/index.js +1 -1
- package/lib/mappedin.js +1 -1
- package/lib/node/index.js +1 -1
- package/package.json +2 -2
- package/lib/esm/renderer/chunk-6EG7RNMF.js +0 -1
- package/lib/esm/renderer/chunk-7VAFZF7T.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var x,sc=Object.create,zn=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,lc=Object.getOwnPropertyNames,cc=Object.getPrototypeOf,dc=Object.prototype.hasOwnProperty,pc=(t,e,n)=>e in t?zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qo=(t,e)=>()=>(t&&(e=t(t=0)),e),R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hc=(t,e)=>{for(var n in e)zn(t,n,{get:e[n],enumerable:!0})},mc=(t,e,n,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of lc(e))!dc.call(t,i)&&i!==n&&zn(t,i,{get:()=>e[i],enumerable:!(r=uc(e,i))||r.enumerable});return t},Mr=(t,e,n)=>(n=null!=t?sc(cc(t)):{},mc(!e&&t&&t.__esModule?n:zn(n,"default",{value:t,enumerable:!0}),t)),h=(t,e,n)=>(pc(t,"symbol"!=typeof e?e+"":e,n),n),wr=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},p=(t,e,n)=>(wr(t,e,"read from private field"),n?n.call(t):e.get(t)),j=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},I=(t,e,n,r)=>(wr(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),xr=(t,e,n,r)=>({set _(r){I(t,e,r,n)},get _(){return p(t,e,r)}}),Ze=(t,e,n)=>(wr(t,e,"access private method"),n),f=Qo((()=>{x={env:{NODE_ENV:"production",npm_package_version:"6.0.0-alpha.7"}}})),es=R(((t,e)=>{f(),function(n){var r="object"==typeof t&&t,i="object"==typeof e&&e&&e.exports==r&&e,a="object"==typeof global&&global;(a.global===a||a.window===a)&&(n=a);var s=function(t){this.message=t};(s.prototype=new Error).name="InvalidCharacterError";var o=function(t){throw new s(t)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,h={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,r,i,a=t.length%3,s="",u=-1,h=t.length-a;++u<h;)e=t.charCodeAt(u)<<16,n=t.charCodeAt(++u)<<8,r=t.charCodeAt(++u),s+=l.charAt((i=e+n+r)>>18&63)+l.charAt(i>>12&63)+l.charAt(i>>6&63)+l.charAt(63&i);return 2==a?(e=t.charCodeAt(u)<<8,n=t.charCodeAt(++u),s+=l.charAt((i=e+n)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==a&&(i=t.charCodeAt(u),s+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),s},decode:function(t){var e=(t=String(t).replace(u,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,a="",s=-1;++s<e;)r=l.indexOf(t.charAt(s)),n=i%4?64*n+r:r,i++%4&&(a+=String.fromCharCode(255&n>>(-2*i&6)));return a},version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(r&&!r.nodeType)if(i)i.exports=h;else for(var c in h)h.hasOwnProperty(c)&&(r[c]=h[c]);else n.base64=h}(t)})),se=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.areaConversion=t.timeConversion=t.distanceConversion=t.altitudeKeys=t.latitudeKeys=t.longitudeKeys=t.MAXLON=t.MINLON=t.MAXLAT=t.MINLAT=t.earthRadius=t.sexagesimalPattern=void 0;t.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;t.earthRadius=6378137;t.MINLAT=-90;t.MAXLAT=90;t.MINLON=-180;t.MAXLON=180;t.longitudeKeys=["lng","lon","longitude",0];t.latitudeKeys=["lat","latitude",1];t.altitudeKeys=["alt","altitude","elevation","elev",2];t.distanceConversion={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144};t.timeConversion={m:60,h:3600,d:86400};var e={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};t.areaConversion=e,e.sqm=e.m2,e.sqkm=e.km2,e.sqft=e.ft2,e.sqyd=e.yd2,e.sqin=e.in2})),ka=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t,e){return e.reduce((function(e,n){if(typeof t>"u"||null===t)throw new Error("'".concat(t,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(t,n)&&typeof n<"u"&&typeof e>"u"?(e=n,n):e}),void 0)};t.default=e})),ba=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){var e=t.toString().trim();return!isNaN(parseFloat(e))&&parseFloat(e)===Number(e)};t.default=e})),Ma=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=se(),n=function(t){return e.sexagesimalPattern.test(t.toString().trim())};t.default=n})),wa=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=se(),n=function(t){var n=new RegExp(e.sexagesimalPattern).exec(t);if(typeof n>"u"||null===n)throw new Error("Given value is not in sexagesimal format");var r=Number(n[2])/60||0,i=Number(n[4])/3600||0,a=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-a:a};t.default=n})),Dn=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=se(),r=(e=ka())&&e.__esModule?e:{default:e};function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:n.longitudeKeys,latitude:n.latitudeKeys,altitude:n.altitudeKeys},i=(0,r.default)(t,e.longitude),s=(0,r.default)(t,e.latitude),o=(0,r.default)(t,e.altitude);return a({latitude:s,longitude:i},o?{altitude:o}:{})};t.default=o})),Ir=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(ba()),n=a(Ma()),r=a(wa()),i=se();function a(t){return t&&t.__esModule?t:{default:t}}var s=function t(a){return(0,e.default)(a)?!(parseFloat(a)>i.MAXLAT||a<i.MINLAT):!!(0,n.default)(a)&&t((0,r.default)(a))};t.default=s})),zr=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(ba()),n=a(Ma()),r=a(wa()),i=se();function a(t){return t&&t.__esModule?t:{default:t}}var s=function t(a){return(0,e.default)(a)?!(parseFloat(a)>i.MAXLON||a<i.MINLON):!!(0,n.default)(a)&&t((0,r.default)(a))};t.default=s})),Nr=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=i(Dn()),n=i(Ir()),r=i(zr());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){var i=(0,e.default)(t),a=i.latitude,s=i.longitude;if(Array.isArray(t)&&t.length>=2)return(0,r.default)(t[0])&&(0,n.default)(t[1]);if(typeof a>"u"||typeof s>"u")return!1;var o=t[s],l=t[a];return!(typeof l>"u"||typeof o>"u"||!1===(0,n.default)(l)||!1===(0,r.default)(o))};t.default=a})),qn=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(ba()),n=s(Ma()),r=s(wa()),i=s(Nr()),a=s(Dn());function s(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h=function t(s){if((0,e.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var o=(0,a.default)(s);return Array.isArray(s)?s.map((function(e,n){return[0,1].includes(n)?t(e):e})):l(l(l({},s),o.latitude&&u({},o.latitude,t(s[o.latitude]))),o.longitude&&u({},o.longitude,t(s[o.longitude])))}return Array.isArray(s)?s.map((function(e){return(0,i.default)(e)?t(e):e})):s};t.default=h})),Te=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=se(),n=i(ka()),r=i(qn());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t,i){var a=(0,n.default)(t,e.latitudeKeys);if(!(typeof a>"u"||null===a)){var s=t[a];return!0===i?s:(0,r.default)(s)}};t.default=a})),Ie=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=se(),n=i(ka()),r=i(qn());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t,i){var a=(0,n.default)(t,e.longitudeKeys);if(!(typeof a>"u"||null===a)){var s=t[a];return!0===i?s:(0,r.default)(s)}};t.default=a})),Be=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return t*Math.PI/180};t.default=e})),_t=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return 180*t/Math.PI};t.default=e})),ds=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(Te()),n=s(Ie()),r=s(Be()),i=s(_t()),a=se();function s(t){return t&&t.__esModule?t:{default:t}}var o=function(t,s,o){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,e.default)(t),h=(0,n.default)(t),c=s/l,d=(0,r.default)(o),f=(0,r.default)(u),p=(0,r.default)(h),g=Math.asin(Math.sin(f)*Math.cos(c)+Math.cos(f)*Math.sin(c)*Math.cos(d)),m=p+Math.atan2(Math.sin(d)*Math.sin(c)*Math.cos(f),Math.cos(c)-Math.sin(f)*Math.sin(g)),y=(0,i.default)(m);return(y<a.MINLON||y>a.MAXLON)&&(m=(m+3*Math.PI)%(2*Math.PI)-Math.PI,y=(0,i.default)(m)),{latitude:(0,i.default)(g),longitude:y}};t.default=o})),ps=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=se(),n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=e.areaConversion[n];if(r)return t*r;throw new Error("Invalid unit used for area conversion.")};t.default=n})),hs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=se(),n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=e.distanceConversion[n];if(r)return t*r;throw new Error("Invalid unit used for distance conversion.")};t.default=n})),ms=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=se(),n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return t*e.timeConversion.h*e.distanceConversion.km;case"mph":return t*e.timeConversion.h*e.distanceConversion.mi;default:return t}};t.default=n})),ys=R((t=>{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&null!=o.return&&o.return()}finally{if(i)throw a}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(t){var e=Math.pow(10,12);return Math.round(t*e)/e},i=function(t){var n=e(t.toString().split("."),2),i=n[0],a=n[1],s=Math.abs(Number(i)),o=r(60*Number("0."+(a||0))),l=Math.floor(o),u=r(60*(o%l||0));return s+"° "+Number(l.toFixed(6)).toString().split(".").map((function(t,e){return 0===e?t.padStart(2,"0"):t})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(t,e){return 0===e?t.padStart(2,"0"):t})).join(".")+'"'};t.default=i})),Dr=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return t>1?1:t<-1?-1:t};t.default=e})),dt=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(Te()),n=s(Ie()),r=s(Be()),i=s(Dr()),a=se();function s(t){return t&&t.__esModule?t:{default:t}}var o=function(t,s){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;o=typeof o<"u"&&!isNaN(o)?o:1;var l=(0,e.default)(t),u=(0,n.default)(t),h=(0,e.default)(s),c=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(h))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(h))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(c))))*a.earthRadius;return Math.round(d/o)*o};t.default=o})),Lr=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=dt())&&e.__esModule?e:{default:e};var r=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.default;return r="function"==typeof r?r:n.default,e.slice().sort((function(e,n){return r(t,e)-r(t,n)}))};t.default=r})),Ms=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=Lr())&&e.__esModule?e:{default:e};var r=function(t,e){return(0,n.default)(t,e)[0]};t.default=r})),_s=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(Be()),n=a(Te()),r=a(Ie()),i=se();function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){var a=0;if(t.length>2){for(var s,o,l,u=0;u<t.length;u++){u===t.length-2?(s=t.length-2,o=t.length-1,l=0):u===t.length-1?(s=t.length-1,o=0,l=1):(s=u,o=u+1,l=u+2);var h=(0,r.default)(t[s]),c=(0,n.default)(t[o]),d=(0,r.default)(t[l]);a+=((0,e.default)(d)-(0,e.default)(h))*Math.sin((0,e.default)(c))}a=a*i.earthRadius*i.earthRadius/2}return Math.abs(a)};t.default=s})),Br=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(Te()),n=r(Ie());function r(t){return t&&t.__esModule?t:{default:t}}var i=function(t){if(!1===Array.isArray(t)||0===t.length)throw new Error("No points were given.");return t.reduce((function(t,r){var i=(0,e.default)(r),a=(0,n.default)(r);return{maxLat:Math.max(i,t.maxLat),minLat:Math.min(i,t.minLat),maxLng:Math.max(a,t.maxLng),minLng:Math.min(a,t.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})};t.default=i})),Ts=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(Te()),n=s(Ie()),r=s(Be()),i=s(_t()),a=se();function s(t){return t&&t.__esModule?t:{default:t}}var o=function(t,s){var o,l,u=(0,e.default)(t),h=(0,n.default)(t),c=(0,r.default)(u),d=(0,r.default)(h),f=s/a.earthRadius,p=c-f,g=c+f,m=(0,r.default)(a.MAXLAT),y=(0,r.default)(a.MINLAT),v=(0,r.default)(a.MAXLON),_=(0,r.default)(a.MINLON);if(p>y&&g<m){var w=Math.asin(Math.sin(f)/Math.cos(c));(o=d-w)<_&&(o+=2*Math.PI),(l=d+w)>v&&(l-=2*Math.PI)}else p=Math.max(p,y),g=Math.min(g,m),o=_,l=v;return[{latitude:(0,i.default)(p),longitude:(0,i.default)(o)},{latitude:(0,i.default)(g),longitude:(0,i.default)(l)}]};t.default=o})),zs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(Te()),n=a(Ie()),r=a(Be()),i=a(_t());function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){if(!1===Array.isArray(t)||0===t.length)return!1;var a=t.length,s=t.reduce((function(t,i){var a=(0,r.default)((0,e.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:t.X+Math.cos(a)*Math.cos(s),Y:t.Y+Math.cos(a)*Math.sin(s),Z:t.Z+Math.sin(a)}}),{X:0,Y:0,Z:0}),o=s.X/a,l=s.Y/a,u=s.Z/a;return{longitude:(0,i.default)(Math.atan2(l,o)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(o*o+l*l)))}};t.default=s})),As=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=Br())&&e.__esModule?e:{default:e};var r=function(t){var e=(0,n.default)(t),r=e.minLat+(e.maxLat-e.minLat)/2,i=e.minLng+(e.maxLng-e.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}};t.default=r})),qr=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(Te()),n=a(Ie()),r=a(Be()),i=a(_t());function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t,a){var s=(0,r.default)((0,n.default)(a))-(0,r.default)((0,n.default)(t)),o=Math.log(Math.tan((0,r.default)((0,e.default)(a))/2+Math.PI/4)/Math.tan((0,r.default)((0,e.default)(t))/2+Math.PI/4));return Math.abs(s)>Math.PI&&(s=s>0?-1*(2*Math.PI-s):2*Math.PI+s),((0,i.default)(Math.atan2(s,o))+360)%360};t.default=s})),Ps=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=qr())&&e.__esModule?e:{default:e};var r=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.default,i="function"==typeof r?r(t,e):(0,n.default)(t,e);if(isNaN(i))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(i/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}};t.default=r})),Ur=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(dt()),n=r(Dr());function r(t){return t&&t.__esModule?t:{default:t}}var i=function(t,r,i){var a=(0,e.default)(r,t),s=(0,e.default)(t,i),o=(0,e.default)(r,i),l=Math.acos((0,n.default)((a*a+o*o-s*s)/(2*a*o))),u=Math.acos((0,n.default)((s*s+o*o-a*a)/(2*s*o)));return l>Math.PI/2?a:u>Math.PI/2?s:Math.sin(l)*a};t.default=i})),Rs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(Te()),n=a(Ie()),r=a(Be()),i=a(_t());function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t,a){var s=(0,e.default)(a),o=(0,n.default)(a),l=(0,e.default)(t),u=(0,n.default)(t);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(o)-(0,r.default)(u))*Math.cos((0,r.default)(s)),Math.cos((0,r.default)(l))*Math.sin((0,r.default)(s))-Math.sin((0,r.default)(l))*Math.cos((0,r.default)(s))*Math.cos((0,r.default)(o)-(0,r.default)(u))))+360)%360};t.default=s})),Bs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=dt())&&e.__esModule?e:{default:e};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default;return t.reduce((function(t,n){return"object"===r(t)&&null!==t.last&&(t.distance+=e(n,t.last)),t.last=n,t}),{last:null,distance:0}).distance};t.default=i})),Vs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(Te()),n=a(Ie()),r=a(Be()),i=se();function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t,a){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=typeof s<"u"&&!isNaN(s)?s:1;var o,l,u,h,c,d,f,p=(0,e.default)(t),g=(0,n.default)(t),m=(0,e.default)(a),y=(0,n.default)(a),v=6356752.314245,_=1/298.257223563,w=(0,r.default)(y-g),M=Math.atan((1-_)*Math.tan((0,r.default)(parseFloat(p)))),b=Math.atan((1-_)*Math.tan((0,r.default)(parseFloat(m)))),x=Math.sin(M),I=Math.cos(M),O=Math.sin(b),k=Math.cos(b),E=w,N=100;do{var F=Math.sin(E),S=Math.cos(E);if(0===(d=Math.sqrt(k*F*(k*F)+(I*O-x*k*S)*(I*O-x*k*S))))return 0;o=x*O+I*k*S,l=Math.atan2(d,o),c=o-2*x*O/(h=1-(u=I*k*F/d)*u),isNaN(c)&&(c=0);var A=_/16*h*(4+_*(4-3*h));f=E,E=w+(1-A)*_*u*(l+A*d*(c+A*o*(2*c*c-1)))}while(Math.abs(E-f)>1e-12&&--N>0);if(0===N)return NaN;var T=h*(i.earthRadius*i.earthRadius-v*v)/(v*v),j=1+T/16384*(4096+T*(T*(320-175*T)-768)),P=T/1024*(256+T*(T*(74-47*T)-128)),R=P*d*(c+P/4*(o*(2*c*c-1)-P/6*c*(4*d*d-3)*(4*c*c-3))),B=v*j*(l-R);return Math.round(B/s)*s};t.default=s})),$s=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return/^NNE|NE|NNW|N$/.test(t)?"N":/^ENE|E|ESE|SE$/.test(t)?"E":/^SSE|S|SSW|SW$/.test(t)?"S":/^WSW|W|WNW|NW$/.test(t)?"W":void 0};t.default=e})),Ws=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=dt())&&e.__esModule?e:{default:e};var r=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.default,i=r(t,e),a=Number(e.time)-Number(t.time),s=i/a*1e3;return s};t.default=r})),Hs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=dt())&&e.__esModule?e:{default:e};var r=function(t,e,r){return(0,n.default)(e,t)+(0,n.default)(t,r)===(0,n.default)(e,r)};t.default=r})),Xs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(Te()),n=r(Ie());function r(t){return t&&t.__esModule?t:{default:t}}var i=function(t,r){for(var i=!1,a=r.length,s=-1,o=a-1;++s<a;o=s)((0,n.default)(r[s])<=(0,n.default)(t)&&(0,n.default)(t)<(0,n.default)(r[o])||(0,n.default)(r[o])<=(0,n.default)(t)&&(0,n.default)(t)<(0,n.default)(r[s]))&&(0,e.default)(t)<((0,e.default)(r[o])-(0,e.default)(r[s]))*((0,n.default)(t)-(0,n.default)(r[s]))/((0,n.default)(r[o])-(0,n.default)(r[s]))+(0,e.default)(r[s])&&(i=!i);return i};t.default=i})),Js=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=Ur())&&e.__esModule?e:{default:e};var r=function(t,e,r,i){return(0,n.default)(t,e,r)<i};t.default=r})),Ks=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=dt())&&e.__esModule?e:{default:e};var r=function(t,e,r){return(0,n.default)(t,e)<r};t.default=r})),Qs=R((t=>{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&null!=o.return&&o.return()}finally{if(i)throw a}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(t){if(!t.startsWith("POLYGON"))throw new Error("Invalid wkt.");return t.slice(t.indexOf("(")+2,t.indexOf(")")).split(", ").map((function(t){var n=e(t.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))};t.default=r})),tu=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0});var e={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(t,"computeDestinationPoint",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"convertArea",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"convertDistance",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"convertSpeed",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"decimalToSexagesimal",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"findNearest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"getAreaOfPolygon",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"getBounds",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"getBoundsOfDistance",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"getCenter",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"getCenterOfBounds",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"getCompassDirection",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"getCoordinateKey",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"getCoordinateKeys",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"getDistance",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"getDistanceFromLine",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"getGreatCircleBearing",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"getLatitude",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"getLongitude",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"getPathLength",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"getPreciseDistance",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"getRhumbLineBearing",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"getRoughCompassDirection",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"getSpeed",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"isDecimal",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"isPointInLine",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"isPointInPolygon",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"isPointNearLine",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"isPointWithinRadius",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"isSexagesimal",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"isValidCoordinate",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"isValidLatitude",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"isValidLongitude",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"orderByDistance",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"sexagesimalToDecimal",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"toDecimal",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"toRad",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"toDeg",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(t,"wktToPolygon",{enumerable:!0,get:function(){return z.default}});var n=U(ds()),r=U(ps()),i=U(hs()),a=U(ms()),s=U(ys()),o=U(Ms()),l=U(_s()),u=U(Br()),h=U(Ts()),c=U(zs()),d=U(As()),p=U(Ps()),g=U(ka()),m=U(Dn()),y=U(dt()),v=U(Ur()),_=U(Rs()),w=U(Te()),M=U(Ie()),b=U(Bs()),x=U(Vs()),I=U(qr()),O=U($s()),k=U(Ws()),E=U(ba()),N=U(Hs()),F=U(Xs()),S=U(Js()),A=U(Ks()),T=U(Ma()),j=U(Nr()),P=U(Ir()),R=U(zr()),B=U(Lr()),L=U(wa()),C=U(qn()),D=U(Be()),W=U(_t()),z=U(Qs()),$=se();function U(t){return t&&t.__esModule?t:{default:t}}Object.keys($).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return $[n]}})}))})),Ru=R(((t,e)=>{"use strict";f(),e.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`))})),Vu=R(((t,e)=>{"use strict";f();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function a(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],a(n),a(r))}function s(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(r)||[],n=1;n<e.length;n++)e=(t=a(e,n).join("")).match(r)||[];return t}}e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch{var r=s(n[0]);r!==n[0]&&(e[n[0]]=r)}n=i.exec(t)}e["%C2"]="�";for(var a=Object.keys(e),o=0;o<a.length;o++){var l=a[o];t=t.replace(new RegExp(l,"g"),e[l])}return t}(t)}}})),Wu=R(((t,e)=>{"use strict";f(),e.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];let n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}})),Yu=R(((t,e)=>{"use strict";f(),e.exports=function(t,e){for(var n={},r=Object.keys(t),i=Array.isArray(e),a=0;a<r.length;a++){var s=r[a],o=t[s];(i?-1!==e.indexOf(s):e(s,o,t))&&(n[s]=o)}return n}})),al=R((t=>{"use strict";f();var e=Ru(),n=Vu(),r=Wu(),i=Yu(),a=Symbol("encodeFragmentIdentifier");function s(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(t,n){return n.encode?n.strict?e(t):encodeURIComponent(t):t}function l(t,e){return e.decode?n(t):t}function u(t){return Array.isArray(t)?t.sort():"object"==typeof t?u(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function h(t){let e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function c(t){let e=(t=h(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function d(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 p(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);let n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{let i="string"==typeof n&&n.includes(t.arrayFormatSeparator),a="string"==typeof n&&!i&&l(n,t).includes(t.arrayFormatSeparator);n=a?l(n,t):n;let s=i||a?n.split(t.arrayFormatSeparator).map((e=>l(e,t))):null===n?n:l(n,t);r[e]=s};case"bracket-separator":return(e,n,r)=>{let i=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!i)return void(r[e]=n&&l(n,t));let a=null===n?[]:n.split(t.arrayFormatSeparator).map((e=>l(e,t)));void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=a};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),i=Object.create(null);if("string"!=typeof t||!(t=t.trim().replace(/^[?#&]/,"")))return i;for(let a of t.split("&")){if(""===a)continue;let[t,s]=r(e.decode?a.replace(/\+/g," "):a,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?s:l(s,e),n(l(t,e),s,i)}for(let t of Object.keys(i)){let n=i[t];if("object"==typeof n&&null!==n)for(let t of Object.keys(n))n[t]=d(n[t],e);else i[t]=d(n,e)}return!1===e.sort?i:(!0===e.sort?Object.keys(i).sort():Object.keys(i).sort(e.sort)).reduce(((t,e)=>{let n=i[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=u(n):t[e]=n,t}),Object.create(null))}t.extract=c,t.parse=p,t.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);let n=n=>e.skipNull&&(t=>null==t)(t[n])||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{let i=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[o(e,t),"[",i,"]"].join("")]:[...n,[o(e,t),"[",o(i,t),"]=",o(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[o(e,t),"[]"].join("")]:[...n,[o(e,t),"[]=",o(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[o(n,t),e,o(i,t)].join("")]:[[r,o(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,o(e,t)]:[...n,[o(e,t),"=",o(r,t)].join("")]}}(e),i={};for(let e of Object.keys(t))n(e)||(i[e]=t[e]);let a=Object.keys(i);return!1!==e.sort&&a.sort(e.sort),a.map((n=>{let i=t[n];return void 0===i?"":null===i?o(n,e):Array.isArray(i)?0===i.length&&"bracket-separator"===e.arrayFormat?o(n,e)+"[]":i.reduce(r(n),[]).join("&"):o(n,e)+"="+o(i,e)})).filter((t=>t.length>0)).join("&")},t.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[n,i]=r(t,"#");return Object.assign({url:n.split("?")[0]||"",query:p(c(t),e)},e&&e.parseFragmentIdentifier&&i?{fragmentIdentifier:l(i,e)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);let r=h(e.url).split("?")[0]||"",i=t.extract(e.url),s=t.parse(i,{sort:!1}),l=Object.assign(s,e.query),u=t.stringify(l,n);u&&(u=`?${u}`);let c=function(t){let e="",n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(e.url);return e.fragmentIdentifier&&(c=`#${n[a]?o(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${u}${c}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);let{url:s,query:o,fragmentIdentifier:l}=t.parseUrl(e,r);return t.stringifyUrl({url:s,query:i(o,n),fragmentIdentifier:l},r)},t.exclude=(e,n,r)=>{let i=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return t.pick(e,i,r)}})),ac={};function Go(t,e){return!e&&"function"==typeof t&&(e=t,t={}),this.ondata=e,t}function Ul(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ma(t,e,[ha],(function(t){return xt(Tn(t.data[0],t.data[1]))}),0,n)}function Tn(t,e){return Et(t,e||{},0,0)}function Vo(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ma(t,e,[pa],(function(t){return xt(ga(t.data[0],Lo(t.data[1])))}),1,n)}function ga(t,e){return _n(t,e)}function tf(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ma(t,e,[ha,Dl,function(){return[No]}],(function(t){return xt(No(t.data[0],t.data[1]))}),2,n)}function No(t,e){e||(e={});var n=da(),r=t.length;n.p(t);var i=Et(t,e,Bo(e),8),a=i.length;return Co(i,e),J(i,a-8,n.d()),J(i,a-4,r),i}function $l(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ma(t,e,[pa,Ll,function(){return[gr]}],(function(t){return xt(gr(t.data[0]))}),3,n)}function gr(t,e){return _n(t.subarray(Ro(t),-8),e||new W(Bl(t)))}function nf(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ma(t,e,[ha,Cl,function(){return[So]}],(function(t){return xt(So(t.data[0],t.data[1]))}),4,n)}function So(t,e){e||(e={});var n=Do();n.p(t);var r=Et(t,e,2,4);return qo(r,e),J(r,r.length-4,n.d()),r}function Hl(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ma(t,e,[pa,Rl,function(){return[vr]}],(function(t){return xt(vr(t.data[0],Lo(t.data[1])))}),5,n)}function vr(t,e){return _n((ql(t),t.subarray(2,-4)),e)}function of(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),31==t[0]&&139==t[1]&&8==t[2]?$l(t,e,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?Vo(t,e,n):Hl(t,e,n)}function sf(t,e){return 31==t[0]&&139==t[1]&&8==t[2]?gr(t,e):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?ga(t,e):vr(t,e)}function wt(t,e){if(e){for(var n=new W(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}if(wl)return wl.encode(t);var i=t.length,a=new W(t.length+(t.length>>1)),s=0,o=function(t){a[s++]=t};for(r=0;r<i;++r){if(s+5>a.length){var l=new W(s+8+(i-r<<1));l.set(a),a=l}var u=t.charCodeAt(r);u<128||e?o(u):u<2048?(o(192|u>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&t.charCodeAt(++r))>>18),o(128|u>>12&63),o(128|u>>6&63),o(128|63&u)):(o(224|u>>12),o(128|u>>6&63),o(128|63&u))}return Se(a,0,s)}function Wo(t,e){if(e){for(var n="",r=0;r<t.length;r+=16384)n+=String.fromCharCode.apply(null,t.subarray(r,r+16384));return n}if(Po)return Po.decode(t);var i=Jl(t),a=i[0];return i[1].length&&F(8),a}function hf(t,e,n){n||(n=e,e={}),"function"!=typeof n&&F(7);var r={};$o(t,"",r,e);var i=Object.keys(r),a=i.length,s=0,o=0,l=a,u=new Array(a),h=[],c=function(){for(var t=0;t<h.length;++t)h[t]()},d=function(t,e){kr((function(){n(t,e)}))};kr((function(){d=n}));var f=function(){var t=new W(o+22),e=s,n=o-s;o=0;for(var r=0;r<l;++r){var i=u[r];try{var a=i.c.length;sa(t,o,i,i.f,i.u,a);var h=30+i.f.length+Mt(i.extra),c=o+h;t.set(i.c,c),sa(t,s,i,i.f,i.u,a,o,i.m),s+=16+h+(i.m?i.m.length:0),o=c+a}catch(t){return d(t,null)}}Ho(t,s,u.length,n,e),d(null,t)};a||f();for(var p=function(t){var e=i[t],n=r[e],l=n[0],p=n[1],g=da(),m=l.length;g.p(l);var y=wt(e),v=y.length,_=p.comment,w=_&&wt(_),M=w&&w.length,b=Mt(p.extra),x=0==p.level?0:8,I=function(n,r){if(n)c(),d(n,null);else{var i=r.length;u[t]=jn(p,{size:m,crc:g.d(),c:r,f:y,m:w,u:v!=e.length||w&&_.length!=M,compression:x}),s+=30+v+b+i,o+=76+2*(v+b)+(M||0)+i,--a||f()}};if(v>65535&&I(F(11,0,1),null),x)if(m<16e4)try{I(null,Tn(l,p))}catch(t){I(t,null)}else h.push(Ul(l,p,I));else I(null,l)},g=0;g<l;++g)p(g);return c}function mf(t,e){e||(e={});var n={},r=[];$o(t,"",n,e);var i=0,a=0;for(var s in n){var o=n[s],l=o[0],u=o[1],h=0==u.level?0:8,c=(x=wt(s)).length,d=u.comment,f=d&&wt(d),p=f&&f.length,g=Mt(u.extra);c>65535&&F(11);var m=h?Tn(l,u):l,y=m.length,v=da();v.p(l),r.push(jn(u,{size:l.length,crc:v.d(),c:m,f:x,m:f,u:c!=s.length||f&&d.length!=p,o:i,compression:h})),i+=30+c+g+y,a+=76+2*(c+g)+(p||0)+y}for(var _=new W(a+22),w=i,M=a-i,b=0;b<r.length;++b){var x=r[b];sa(_,x.o,x,x.f,x.u,x.c.length);var I=30+x.f.length+Mt(x.extra);_.set(x.c,x.o+I),sa(_,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+I+(x.m?x.m.length:0)}return Ho(_,i,r.length,M,w),_}function vf(t,e,n){n||(n=e,e={}),"function"!=typeof n&&F(7);var r=[],i=function(){for(var t=0;t<r.length;++t)r[t]()},a={},s=function(t,e){kr((function(){n(t,e)}))};kr((function(){s=n}));for(var o=t.length-22;101010256!=te(t,o);--o)if(!o||t.length-o>65558)return s(F(13,0,1),null),i;var l=ye(t,o+8);if(l){var u=l,h=te(t,o+16),c=4294967295==h;if(c){if(o=te(t,o-12),101075792!=te(t,o))return s(F(13,0,1),null),i;u=l=te(t,o+32),h=te(t,o+48)}for(var d=e&&e.filter,f=function(e){var n=Ql(t,h,c),o=n[0],u=n[1],f=n[2],p=n[3],g=n[4],m=n[5],y=Zl(t,m);h=g;var v=function(t,e){t?(i(),s(t,null)):(e&&(a[p]=e),--l||s(null,a))};if(!d||d({name:p,size:u,originalSize:f,compression:o}))if(o)if(8==o){var _=t.subarray(y,y+u);if(u<32e4)try{v(null,ga(_,new W(f)))}catch(t){v(t,null)}else r.push(Vo(_,{size:f},v))}else v(F(14,"unknown compression type "+o,1),null);else v(null,Se(t,y,y+u));else v(null,null)},p=0;p<u;++p)f()}else s(null,{});return i}function kf(t,e){for(var n={},r=t.length-22;101010256!=te(t,r);--r)(!r||t.length-r>65558)&&F(13);var i=ye(t,r+8);if(!i)return{};var a=te(t,r+16),s=4294967295==a;s&&(r=te(t,r-12),101075792!=te(t,r)&&F(13),i=te(t,r+32),a=te(t,r+48));for(var o=e&&e.filter,l=0;l<i;++l){var u=Ql(t,a,s),h=u[0],c=u[1],d=u[2],f=u[3],p=u[4],g=u[5],m=Zl(t,g);a=p,(!o||o({name:f,size:c,originalSize:d,compression:h}))&&(h?8==h?n[f]=ga(t.subarray(m,m+c),new W(d)):F(14,"unknown compression type "+h):n[f]=Se(t,m,m+c))}return n}hc(ac,{AsyncCompress:()=>ef,AsyncDecompress:()=>rf,AsyncDeflate:()=>Gl,AsyncGunzip:()=>Vl,AsyncGzip:()=>ef,AsyncInflate:()=>Uo,AsyncUnzipInflate:()=>gf,AsyncUnzlib:()=>Wl,AsyncZipDeflate:()=>df,AsyncZlib:()=>af,Compress:()=>Ao,DecodeUTF8:()=>uf,Decompress:()=>Yl,Deflate:()=>Ke,EncodeUTF8:()=>lf,FlateErrorCode:()=>Zm,Gunzip:()=>fr,Gzip:()=>Ao,Inflate:()=>we,Unzip:()=>yf,UnzipInflate:()=>ff,UnzipPassThrough:()=>tc,Unzlib:()=>yr,Zip:()=>pf,ZipDeflate:()=>cf,ZipPassThrough:()=>wn,Zlib:()=>Eo,compress:()=>tf,compressSync:()=>No,decompress:()=>of,decompressSync:()=>sf,deflate:()=>Ul,deflateSync:()=>Tn,gunzip:()=>$l,gunzipSync:()=>gr,gzip:()=>tf,gzipSync:()=>No,inflate:()=>Vo,inflateSync:()=>ga,strFromU8:()=>Wo,strToU8:()=>wt,unzip:()=>vf,unzipSync:()=>kf,unzlib:()=>Hl,unzlibSync:()=>vr,zip:()=>hf,zipSync:()=>mf,zlib:()=>nf,zlibSync:()=>So});var bl,Km,W,me,ua,la,ca,bn,xl,_l,Fo,pr,jl,Tl,Io,Mn,ut,Ee,ct,oa,X,Il,Ol,zl,Al,lr,Ne,cr,xn,Se,Zm,Nl,F,_n,Je,ia,dr,hr,Oo,ra,mr,zo,El,lt,Sl,Pl,da,Do,Et,jn,Ml,ur,Qm,Fl,pa,ha,Dl,Ll,Cl,Rl,xt,Lo,ma,Pe,fa,ye,te,To,J,Co,Ro,Bl,Bo,qo,ql,Ke,Gl,we,Uo,Ao,ef,fr,Vl,Eo,af,yr,Wl,Yl,rf,$o,wl,Po,Xl,Jl,uf,lf,Kl,Zl,Ql,ec,Mt,sa,Ho,wn,cf,df,pf,tc,ff,gf,yf,kr,nc=Qo((()=>{for(f(),bl={},Km=function(t,e,n,r,i){var a=new Worker(bl[e]||(bl[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(t){var e=t.data,n=e.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,e)},a.postMessage(n,r),a},W=Uint8Array,me=Uint16Array,ua=Uint32Array,la=new W([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ca=new W([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),bn=new W([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_l=(xl=function(t,e){for(var n=new me(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];var i=new ua(n[30]);for(r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return[n,i]})(la,2),Fo=_l[0],pr=_l[1],Fo[28]=258,pr[258]=28,jl=xl(ca,0),Tl=jl[0],Io=jl[1],Mn=new me(32768),X=0;X<32768;++X)ut=(61680&(ut=(52428&(ut=(43690&X)>>>1|(21845&X)<<1))>>>2|(13107&ut)<<2))>>>4|(3855&ut)<<4,Mn[X]=((65280&ut)>>>8|(255&ut)<<8)>>>1;for(Ee=function(t,e,n){for(var r=t.length,i=0,a=new me(e);i<r;++i)t[i]&&++a[t[i]-1];var s,o=new me(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;if(n){s=new me(1<<e);var l=15-e;for(i=0;i<r;++i)if(t[i])for(var u=i<<4|t[i],h=e-t[i],c=o[t[i]-1]++<<h,d=c|(1<<h)-1;c<=d;++c)s[Mn[c]>>>l]=u}else for(s=new me(r),i=0;i<r;++i)t[i]&&(s[i]=Mn[o[t[i]-1]++]>>>15-t[i]);return s},ct=new W(288),X=0;X<144;++X)ct[X]=8;for(X=144;X<256;++X)ct[X]=9;for(X=256;X<280;++X)ct[X]=7;for(X=280;X<288;++X)ct[X]=8;for(oa=new W(32),X=0;X<32;++X)oa[X]=5;Il=Ee(ct,9,0),Ol=Ee(ct,9,1),zl=Ee(oa,5,0),Al=Ee(oa,5,1),lr=function(t){for(var e=t[0],n=1;n<t.length;++n)t[n]>e&&(e=t[n]);return e},Ne=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(7&e)&n},cr=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(7&e)},xn=function(t){return(t+7)/8|0},Se=function(t,e,n){(null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);var r=new(2==t.BYTES_PER_ELEMENT?me:4==t.BYTES_PER_ELEMENT?ua:W)(n-e);return r.set(t.subarray(e,n)),r},Zm={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Nl=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],F=function(t,e,n){var r=new Error(e||Nl[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,F),!n)throw r;return r},_n=function(t,e,n){var r=t.length;if(!r||n&&n.f&&!n.l)return e||new W(0);var i=!e||n,a=!n||n.i;n||(n={}),e||(e=new W(3*r));var s=function(t){var n=e.length;if(t>n){var r=new W(Math.max(2*n,t));r.set(e),e=r}},o=n.f||0,l=n.p||0,u=n.b||0,h=n.l,c=n.d,d=n.m,f=n.n,p=8*r;do{if(!h){o=Ne(t,l,1);var g=Ne(t,l+1,3);if(l+=3,!g){var m=t[(E=xn(l)+4)-4]|t[E-3]<<8,y=E+m;if(y>r){a&&F(0);break}i&&s(u+m),e.set(t.subarray(E,y),u),n.b=u+=m,n.p=l=8*y,n.f=o;continue}if(1==g)h=Ol,c=Al,d=9,f=5;else if(2==g){var v=Ne(t,l,31)+257,_=Ne(t,l+10,15)+4,w=v+Ne(t,l+5,31)+1;l+=14;for(var M=new W(w),b=new W(19),x=0;x<_;++x)b[bn[x]]=Ne(t,l+3*x,7);l+=3*_;var I=lr(b),O=(1<<I)-1,k=Ee(b,I,1);for(x=0;x<w;){var E,N=k[Ne(t,l,O)];if(l+=15&N,(E=N>>>4)<16)M[x++]=E;else{var S=0,A=0;for(16==E?(A=3+Ne(t,l,3),l+=2,S=M[x-1]):17==E?(A=3+Ne(t,l,7),l+=3):18==E&&(A=11+Ne(t,l,127),l+=7);A--;)M[x++]=S}}var T=M.subarray(0,v),j=M.subarray(v);d=lr(T),f=lr(j),h=Ee(T,d,1),c=Ee(j,f,1)}else F(1);if(l>p){a&&F(0);break}}i&&s(u+131072);for(var P=(1<<d)-1,R=(1<<f)-1,B=l;;B=l){var L=(S=h[cr(t,l)&P])>>>4;if((l+=15&S)>p){a&&F(0);break}if(S||F(2),L<256)e[u++]=L;else{if(256==L){B=l,h=null;break}var C=L-254;if(L>264){var D=la[x=L-257];C=Ne(t,l,(1<<D)-1)+Fo[x],l+=D}var z=c[cr(t,l)&R],$=z>>>4;z||F(3),l+=15&z;j=Tl[$];if($>3){D=ca[$];j+=cr(t,l)&(1<<D)-1,l+=D}if(l>p){a&&F(0);break}i&&s(u+131072);for(var U=u+C;u<U;u+=4)e[u]=e[u-j],e[u+1]=e[u+1-j],e[u+2]=e[u+2-j],e[u+3]=e[u+3-j];u=U}}n.l=h,n.p=B,n.b=u,n.f=o,h&&(o=1,n.m=d,n.d=c,n.n=f)}while(!o);return u==e.length?e:Se(e,0,u)},Je=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8},ia=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},dr=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,a=n.slice();if(!i)return[lt,0];if(1==i){var s=new W(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(t,e){return t.f-e.f})),n.push({s:-1,f:25001});var o=n[0],l=n[1],u=0,h=1,c=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=i-1;)o=n[n[u].f<n[c].f?u++:c++],l=n[u!=h&&n[u].f<n[c].f?u++:c++],n[h++]={s:-1,f:o.f+l.f,l:o,r:l};var d=a[0].s;for(r=1;r<i;++r)a[r].s>d&&(d=a[r].s);var f=new me(d+1),p=hr(n[h-1],f,0);if(p>e){r=0;var g=0,m=p-e,y=1<<m;for(a.sort((function(t,e){return f[e.s]-f[t.s]||t.f-e.f}));r<i;++r){var v=a[r].s;if(!(f[v]>e))break;g+=y-(1<<p-f[v]),f[v]=e}for(g>>>=m;g>0;){var _=a[r].s;f[_]<e?g-=1<<e-f[_]++-1:++r}for(;r>=0&&g;--r){var w=a[r].s;f[w]==e&&(--f[w],++g)}p=e}return[new W(f),p]},hr=function(t,e,n){return-1==t.s?Math.max(hr(t.l,e,n+1),hr(t.r,e,n+1)):e[t.s]=n},Oo=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new me(++e),r=0,i=t[0],a=1,s=function(t){n[r++]=t},o=1;o<=e;++o)if(t[o]==i&&o!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=t[o]}return[n.subarray(0,r),e]},ra=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},mr=function(t,e,n){var r=n.length,i=xn(e+2);t[i]=255&r,t[i+1]=r>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<r;++a)t[i+a+4]=n[a];return 8*(i+4+r)},zo=function(t,e,n,r,i,a,s,o,l,u,h){Je(e,h++,n),++i[256];for(var c=dr(i,15),d=c[0],f=c[1],p=dr(a,15),g=p[0],m=p[1],y=Oo(d),v=y[0],_=y[1],w=Oo(g),M=w[0],b=w[1],x=new me(19),I=0;I<v.length;++I)x[31&v[I]]++;for(I=0;I<M.length;++I)x[31&M[I]]++;for(var O=dr(x,7),k=O[0],E=O[1],N=19;N>4&&!k[bn[N-1]];--N);var F,S,A,T,j=u+5<<3,P=ra(i,ct)+ra(a,oa)+s,R=ra(i,d)+ra(a,g)+s+14+3*N+ra(x,k)+(2*x[16]+3*x[17]+7*x[18]);if(j<=P&&j<=R)return mr(e,h,t.subarray(l,l+u));if(Je(e,h,1+(R<P)),h+=2,R<P){F=Ee(d,f,0),S=d,A=Ee(g,m,0),T=g;var B=Ee(k,E,0);Je(e,h,_-257),Je(e,h+5,b-1),Je(e,h+10,N-4),h+=14;for(I=0;I<N;++I)Je(e,h+3*I,k[bn[I]]);h+=3*N;for(var L=[v,M],C=0;C<2;++C){var D=L[C];for(I=0;I<D.length;++I){var W=31&D[I];Je(e,h,B[W]),h+=k[W],W>15&&(Je(e,h,D[I]>>>5&127),h+=D[I]>>>12)}}}else F=Il,S=ct,A=zl,T=oa;for(I=0;I<o;++I)if(r[I]>255){W=r[I]>>>18&31;ia(e,h,F[W+257]),h+=S[W+257],W>7&&(Je(e,h,r[I]>>>23&31),h+=la[W]);var z=31&r[I];ia(e,h,A[z]),h+=T[z],z>3&&(ia(e,h,r[I]>>>5&8191),h+=ca[z])}else ia(e,h,F[r[I]]),h+=S[r[I]];return ia(e,h,F[256]),h+S[256]},El=new ua([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),lt=new W(0),Sl=function(t,e,n,r,i,a){var s=t.length,o=new W(r+s+5*(1+Math.ceil(s/7e3))+i),l=o.subarray(r,o.length-i),u=0;if(!e||s<8)for(var h=0;h<=s;h+=65535){var c=h+65535;c>=s&&(l[u>>3]=a),u=mr(l,u+1,t.subarray(h,c))}else{for(var d=El[e-1],f=d>>>13,p=8191&d,g=(1<<n)-1,m=new me(32768),y=new me(g+1),v=Math.ceil(n/3),_=2*v,w=function(e){return(t[e]^t[e+1]<<v^t[e+2]<<_)&g},M=new ua(25e3),b=new me(288),x=new me(32),I=0,O=0,k=(h=0,0),E=0,N=0;h<s;++h){var F=w(h),S=32767&h,A=y[F];if(m[S]=A,y[F]=S,E<=h){var T=s-h;if((I>7e3||k>24576)&&T>423){u=zo(t,l,0,M,b,x,O,k,N,h-N,u),k=I=O=0,N=h;for(var j=0;j<286;++j)b[j]=0;for(j=0;j<30;++j)x[j]=0}var P=2,R=0,B=p,L=S-A&32767;if(T>2&&F==w(h-L))for(var C=Math.min(f,T)-1,D=Math.min(32767,h),z=Math.min(258,T);L<=D&&--B&&S!=A;){if(t[h+P]==t[h+P-L]){for(var $=0;$<z&&t[h+$]==t[h+$-L];++$);if($>P){if(P=$,R=L,$>C)break;var U=Math.min(L,$-2),G=0;for(j=0;j<U;++j){var J=h-L+j+32768&32767,Y=J-m[J]+32768&32767;Y>G&&(G=Y,A=J)}}}L+=(S=A)-(A=m[S])+32768&32767}if(R){M[k++]=268435456|pr[P]<<18|Io[R];var X=31&pr[P],q=31&Io[R];O+=la[X]+ca[q],++b[257+X],++x[q],E=h+P,++I}else M[k++]=t[h],++b[t[h]]}}u=zo(t,l,a,M,b,x,O,k,N,h-N,u),!a&&7&u&&(u=mr(l,u+1,lt))}return Se(o,0,r+xn(u)+i)},Pl=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(1&n&&-306674912)^n>>>1;t[e]=n}return t}(),da=function(){var t=-1;return{p:function(e){for(var n=t,r=0;r<e.length;++r)n=Pl[255&n^e[r]]^n>>>8;t=n},d:function(){return~t}}},Do=function(){var t=1,e=0;return{p:function(n){for(var r=t,i=e,a=0|n.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}t=r,e=i},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(e%=65521))<<8|e>>>8}}},Et=function(t,e,n,r,i){return Sl(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,r,!i)},jn=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n},Ml=function(t,e,n){for(var r=t(),i=t.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var o=r[s],l=a[s];if("function"==typeof o){e+=";"+l+"=";var u=o.toString();if(o.prototype)if(-1!=u.indexOf("[native code]")){var h=u.indexOf(" ",8)+1;e+=u.slice(h,u.indexOf("(",h))}else for(var c in e+=u,o.prototype)e+=";"+l+".prototype."+c+"="+o.prototype[c].toString();else e+=u}else n[l]=o}return[e,n]},ur=[],Qm=function(t){var e=[];for(var n in t)t[n].buffer&&e.push((t[n]=new t[n].constructor(t[n])).buffer);return e},Fl=function(t,e,n,r){var i;if(!ur[n]){for(var a="",s={},o=t.length-1,l=0;l<o;++l)a=(i=Ml(t[l],a,s))[0],s=i[1];ur[n]=Ml(t[o],a,s)}var u=jn({},ur[n][1]);return Km(ur[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",n,u,Qm(u),r)},pa=function(){return[W,me,ua,la,ca,bn,Fo,Tl,Ol,Al,Mn,Nl,Ee,lr,Ne,cr,xn,Se,F,_n,ga,xt,Lo]},ha=function(){return[W,me,ua,la,ca,bn,pr,Io,Il,ct,zl,oa,Mn,El,lt,Ee,Je,ia,dr,hr,Oo,ra,mr,zo,xn,Se,Sl,Et,Tn,xt]},Dl=function(){return[Co,Bo,J,da,Pl]},Ll=function(){return[Ro,Bl]},Cl=function(){return[qo,J,Do]},Rl=function(){return[ql]},xt=function(t){return postMessage(t,[t.buffer])},Lo=function(t){return t&&t.size&&new W(t.size)},ma=function(t,e,n,r,i,a){var s=Fl(n,r,i,(function(t,e){s.terminate(),a(t,e)}));return s.postMessage([t,e],e.consume?[t.buffer]:[]),function(){s.terminate()}},Pe=function(t){return t.ondata=function(t,e){return postMessage([t,e],[t.buffer])},function(e){return t.push(e.data[0],e.data[1])}},fa=function(t,e,n,r,i){var a,s=Fl(t,r,i,(function(t,n){t?(s.terminate(),e.ondata.call(e,t)):(n[1]&&s.terminate(),e.ondata.call(e,t,n[0],n[1]))}));s.postMessage(n),e.push=function(t,n){e.ondata||F(5),a&&e.ondata(F(4,0,1),null,!!n),s.postMessage([t,a=n],[t.buffer])},e.terminate=function(){s.terminate()}},ye=function(t,e){return t[e]|t[e+1]<<8},te=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},To=function(t,e){return te(t,e)+4294967296*te(t,e+4)},J=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},Co=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&J(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var r=0;r<=n.length;++r)t[r+10]=n.charCodeAt(r)}},Ro=function(t){(31!=t[0]||139!=t[1]||8!=t[2])&&F(6,"invalid gzip data");var e=t[3],n=10;4&e&&(n+=t[10]|2+(t[11]<<8));for(var r=(e>>3&1)+(e>>4&1);r>0;r-=!t[n++]);return n+(2&e)},Bl=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},Bo=function(t){return 10+(t.filename&&t.filename.length+1||0)},qo=function(t,e){var n=e.level,r=0==n?0:n<6?1:9==n?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)},ql=function(t){(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&F(6,"invalid zlib data"),32&t[1]&&F(6,"invalid zlib data: preset dictionaries not supported")},Ke=function(){function t(t,e){!e&&"function"==typeof t&&(e=t,t={}),this.ondata=e,this.o=t||{}}return t.prototype.p=function(t,e){this.ondata(Et(t,this.o,0,0,!e),e)},t.prototype.push=function(t,e){this.ondata||F(5),this.d&&F(4),this.d=e,this.p(t,e||!1)},t}(),Gl=function(t,e){fa([ha,function(){return[Pe,Ke]}],this,Go.call(this,t,e),(function(t){var e=new Ke(t.data);onmessage=Pe(e)}),6)},we=function(){function t(t){this.s={},this.p=new W(0),this.ondata=t}return t.prototype.e=function(t){this.ondata||F(5),this.d&&F(4);var e=this.p.length,n=new W(e+t.length);n.set(this.p),n.set(t,e),this.p=n},t.prototype.c=function(t){this.d=this.s.i=t||!1;var e=this.s.b,n=_n(this.p,this.o,this.s);this.ondata(Se(n,e,this.s.b),this.d),this.o=Se(n,this.s.b-32768),this.s.b=this.o.length,this.p=Se(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(t,e){this.e(t),this.c(e)},t}(),Uo=function(t){this.ondata=t,fa([pa,function(){return[Pe,we]}],this,0,(function(){var t=new we;onmessage=Pe(t)}),7)},Ao=function(){function t(t,e){this.c=da(),this.l=0,this.v=1,Ke.call(this,t,e)}return t.prototype.push=function(t,e){Ke.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t),this.l+=t.length;var n=Et(t,this.o,this.v&&Bo(this.o),e&&8,!e);this.v&&(Co(n,this.o),this.v=0),e&&(J(n,n.length-8,this.c.d()),J(n,n.length-4,this.l)),this.ondata(n,e)},t}(),ef=function(t,e){fa([ha,Dl,function(){return[Pe,Ke,Ao]}],this,Go.call(this,t,e),(function(t){var e=new Ao(t.data);onmessage=Pe(e)}),8)},fr=function(){function t(t){this.v=1,we.call(this,t)}return t.prototype.push=function(t,e){if(we.prototype.e.call(this,t),this.v){var n=this.p.length>3?Ro(this.p):4;if(n>=this.p.length&&!e)return;this.p=this.p.subarray(n),this.v=0}e&&(this.p.length<8&&F(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),we.prototype.c.call(this,e)},t}(),Vl=function(t){this.ondata=t,fa([pa,Ll,function(){return[Pe,we,fr]}],this,0,(function(){var t=new fr;onmessage=Pe(t)}),9)},Eo=function(){function t(t,e){this.c=Do(),this.v=1,Ke.call(this,t,e)}return t.prototype.push=function(t,e){Ke.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t);var n=Et(t,this.o,this.v&&2,e&&4,!e);this.v&&(qo(n,this.o),this.v=0),e&&J(n,n.length-4,this.c.d()),this.ondata(n,e)},t}(),af=function(t,e){fa([ha,Cl,function(){return[Pe,Ke,Eo]}],this,Go.call(this,t,e),(function(t){var e=new Eo(t.data);onmessage=Pe(e)}),10)},yr=function(){function t(t){this.v=1,we.call(this,t)}return t.prototype.push=function(t,e){if(we.prototype.e.call(this,t),this.v){if(this.p.length<2&&!e)return;this.p=this.p.subarray(2),this.v=0}e&&(this.p.length<4&&F(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),we.prototype.c.call(this,e)},t}(),Wl=function(t){this.ondata=t,fa([pa,Rl,function(){return[Pe,we,yr]}],this,0,(function(){var t=new yr;onmessage=Pe(t)}),11)},Yl=function(){function t(t){this.G=fr,this.I=we,this.Z=yr,this.ondata=t}return t.prototype.push=function(t,e){if(this.ondata||F(5),this.s)this.s.push(t,e);else{if(this.p&&this.p.length){var n=new W(this.p.length+t.length);n.set(this.p),n.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var r=this,i=function(){r.ondata.apply(r,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,e),this.p=null}}},t}(),rf=function(){function t(t){this.G=Vl,this.I=Uo,this.Z=Wl,this.ondata=t}return t.prototype.push=function(t,e){Yl.prototype.push.call(this,t,e)},t}(),$o=function(t,e,n,r){for(var i in t){var a=t[i],s=e+i,o=r;Array.isArray(a)&&(o=jn(r,a[1]),a=a[0]),a instanceof W?n[s]=[a,o]:(n[s+="/"]=[new W(0),o],$o(a,s,n,r))}},wl=typeof TextEncoder<"u"&&new TextEncoder,Po=typeof TextDecoder<"u"&&new TextDecoder,Xl=0;try{Po.decode(lt,{stream:!0}),Xl=1}catch{}Jl=function(t){for(var e="",n=0;;){var r=t[n++],i=(r>127)+(r>223)+(r>239);if(n+i>t.length)return[e,Se(t,n-1)];i?3==i?(r=((15&r)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,e+=String.fromCharCode(55296|r>>10,56320|1023&r)):e+=1&i?String.fromCharCode((31&r)<<6|63&t[n++]):String.fromCharCode((15&r)<<12|(63&t[n++])<<6|63&t[n++]):e+=String.fromCharCode(r)}},uf=function(){function t(t){this.ondata=t,Xl?this.t=new TextDecoder:this.p=lt}return t.prototype.push=function(t,e){if(this.ondata||F(5),e=!!e,this.t)return this.ondata(this.t.decode(t,{stream:!0}),e),void(e&&(this.t.decode().length&&F(8),this.t=null));this.p||F(4);var n=new W(this.p.length+t.length);n.set(this.p),n.set(t,this.p.length);var r=Jl(n),i=r[0],a=r[1];e?(a.length&&F(8),this.p=null):this.p=a,this.ondata(i,e)},t}(),lf=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,e){this.ondata||F(5),this.d&&F(4),this.ondata(wt(t),this.d=e||!1)},t}(),Kl=function(t){return 1==t?3:t<6?2:9==t?1:0},Zl=function(t,e){return e+30+ye(t,e+26)+ye(t,e+28)},Ql=function(t,e,n){var r=ye(t,e+28),i=Wo(t.subarray(e+46,e+46+r),!(2048&ye(t,e+8))),a=e+46+r,s=te(t,e+20),o=n&&4294967295==s?ec(t,a):[s,te(t,e+24),te(t,e+42)],l=o[0],u=o[1],h=o[2];return[ye(t,e+10),l,u,i,a+ye(t,e+30)+ye(t,e+32),h]},ec=function(t,e){for(;1!=ye(t,e);e+=4+ye(t,e+2));return[To(t,e+12),To(t,e+4),To(t,e+20)]},Mt=function(t){var e=0;if(t)for(var n in t){var r=t[n].length;r>65535&&F(9),e+=r+4}return e},sa=function(t,e,n,r,i,a,s,o){var l=r.length,u=n.extra,h=o&&o.length,c=Mt(u);J(t,e,null!=s?33639248:67324752),e+=4,null!=s&&(t[e++]=20,t[e++]=n.os),t[e]=20,e+=2,t[e++]=n.flag<<1|(null==a&&8),t[e++]=i&&8,t[e++]=255&n.compression,t[e++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),f=d.getFullYear()-1980;if((f<0||f>119)&&F(10),J(t,e,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),e+=4,null!=a&&(J(t,e,n.crc),J(t,e+4,a),J(t,e+8,n.size)),J(t,e+12,l),J(t,e+14,c),e+=16,null!=s&&(J(t,e,h),J(t,e+6,n.attrs),J(t,e+10,s),e+=14),t.set(r,e),e+=l,c)for(var p in u){var g=u[p],m=g.length;J(t,e,+p),J(t,e+2,m),t.set(g,e+4),e+=4+m}return h&&(t.set(o,e),e+=h),e},Ho=function(t,e,n,r,i){J(t,e,101010256),J(t,e+8,n),J(t,e+10,n),J(t,e+12,r),J(t,e+16,i)},wn=function(){function t(t){this.filename=t,this.c=da(),this.size=0,this.compression=0}return t.prototype.process=function(t,e){this.ondata(null,t,e)},t.prototype.push=function(t,e){this.ondata||F(5),this.c.p(t),this.size+=t.length,e&&(this.crc=this.c.d()),this.process(t,e||!1)},t}(),cf=function(){function t(t,e){var n=this;e||(e={}),wn.call(this,t),this.d=new Ke(e,(function(t,e){n.ondata(null,t,e)})),this.compression=8,this.flag=Kl(e.level)}return t.prototype.process=function(t,e){try{this.d.push(t,e)}catch(t){this.ondata(t,null,e)}},t.prototype.push=function(t,e){wn.prototype.push.call(this,t,e)},t}(),df=function(){function t(t,e){var n=this;e||(e={}),wn.call(this,t),this.d=new Gl(e,(function(t,e,r){n.ondata(t,e,r)})),this.compression=8,this.flag=Kl(e.level),this.terminate=this.d.terminate}return t.prototype.process=function(t,e){this.d.push(t,e)},t.prototype.push=function(t,e){wn.prototype.push.call(this,t,e)},t}(),pf=function(){function t(t){this.ondata=t,this.u=[],this.d=1}return t.prototype.add=function(t){var e=this;if(this.ondata||F(5),2&this.d)this.ondata(F(4+8*(1&this.d),0,1),null,!1);else{var n=wt(t.filename),r=n.length,i=t.comment,a=i&&wt(i),s=r!=t.filename.length||a&&i.length!=a.length,o=r+Mt(t.extra)+30;r>65535&&this.ondata(F(11,0,1),null,!1);var l=new W(o);sa(l,0,t,n,s);var u=[l],h=function(){for(var t=0,n=u;t<n.length;t++){var r=n[t];e.ondata(null,r,!1)}u=[]},c=this.d;this.d=0;var d=this.u.length,f=jn(t,{f:n,u:s,o:a,t:function(){t.terminate&&t.terminate()},r:function(){if(h(),c){var t=e.u[d+1];t?t.r():e.d=1}c=1}}),p=0;t.ondata=function(n,r,i){if(n)e.ondata(n,r,i),e.terminate();else if(p+=r.length,u.push(r),i){var a=new W(16);J(a,0,134695760),J(a,4,t.crc),J(a,8,p),J(a,12,t.size),u.push(a),f.c=p,f.b=o+p+16,f.crc=t.crc,f.size=t.size,c&&f.r(),c=1}else c&&h()},this.u.push(f)}},t.prototype.end=function(){var t=this;2&this.d?this.ondata(F(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&t.d&&(t.u.splice(-1,1),t.e())},t:function(){}}),this.d=3)},t.prototype.e=function(){for(var t=0,e=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+Mt(l.extra)+(l.o?l.o.length:0)}for(var a=new W(n+22),s=0,o=this.u;s<o.length;s++){var l=o[s];sa(a,t,l,l.f,l.u,l.c,e,l.o),t+=46+l.f.length+Mt(l.extra)+(l.o?l.o.length:0),e+=l.b}Ho(a,t,this.u.length,n,e),this.ondata(null,a,!0),this.d=2},t.prototype.terminate=function(){for(var t=0,e=this.u;t<e.length;t++){e[t].t()}this.d=2},t}(),tc=function(){function t(){}return t.prototype.push=function(t,e){this.ondata(null,t,e)},t.compression=0,t}(),ff=function(){function t(){var t=this;this.i=new we((function(e,n){t.ondata(null,e,n)}))}return t.prototype.push=function(t,e){try{this.i.push(t,e)}catch(t){this.ondata(t,null,e)}},t.compression=8,t}(),gf=function(){function t(t,e){var n=this;e<32e4?this.i=new we((function(t,e){n.ondata(null,t,e)})):(this.i=new Uo((function(t,e,r){n.ondata(t,e,r)})),this.terminate=this.i.terminate)}return t.prototype.push=function(t,e){this.i.terminate&&(t=Se(t,0)),this.i.push(t,e)},t.compression=8,t}(),yf=function(){function t(t){this.onfile=t,this.k=[],this.o={0:tc},this.p=lt}return t.prototype.push=function(t,e){var n=this;if(this.onfile||F(5),this.p||F(4),this.c>0){var r=Math.min(this.c,t.length),i=t.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(t=t.subarray(r)).length)return this.push(t,e)}else{var a=0,s=0,o=void 0,l=void 0;this.p.length?t.length?((l=new W(this.p.length+t.length)).set(this.p),l.set(t,this.p.length)):l=this.p:l=t;for(var u=l.length,h=this.c,c=h&&this.d,d=function(){var t,e=te(l,s);if(67324752==e){a=1,o=s,f.d=null,f.c=0;var r=ye(l,s+6),i=ye(l,s+8),c=2048&r,d=8&r,p=ye(l,s+26),g=ye(l,s+28);if(u>s+30+p+g){var m=[];f.k.unshift(m),a=2;var y=te(l,s+18),v=te(l,s+22),_=Wo(l.subarray(s+30,s+=30+p),!c);4294967295==y?(t=d?[-2]:ec(l,s),y=t[0],v=t[1]):d&&(y=-1),s+=g,f.c=y;var w,M={name:_,compression:i,start:function(){if(M.ondata||F(5),y){var t=n.o[i];t||M.ondata(F(14,"unknown compression type "+i,1),null,!1),(w=y<0?new t(_):new t(_,y,v)).ondata=function(t,e,n){M.ondata(t,e,n)};for(var e=0,r=m;e<r.length;e++){var a=r[e];w.push(a,!1)}n.k[0]==m&&n.c?n.d=w:w.push(lt,!0)}else M.ondata(null,lt,!0)},terminate:function(){w&&w.terminate&&w.terminate()}};y>=0&&(M.size=y,M.originalSize=v),f.onfile(M)}return"break"}if(h){if(134695760==e)return o=s+=12+(-2==h&&8),a=3,f.c=0,"break";if(33639248==e)return o=s-=4,a=3,f.c=0,"break"}},f=this;s<u-4;++s){if("break"===d())break}if(this.p=lt,h<0){var p=a?l.subarray(0,o-12-(-2==h&&8)-(134695760==te(l,o-16)&&4)):l.subarray(0,s);c?c.push(p,!!a):this.k[+(2==a)].push(p)}if(2&a)return this.push(l.subarray(s),e);this.p=l.subarray(s)}e&&(this.c&&F(13),this.p=null)},t.prototype.register=function(t){this.o[t.compression]=t},t}(),kr="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()}}));f();var rc=Mr(es(),1);f(),f(),f();var au=Mr(tu(),1);f();var Hr=class{constructor({origin:t,destination:e,vortex:n,elevationDelta:r=0,distance:i=0,angle:a=0}){let s,o;if(h(this,"origin"),h(this,"destination"),h(this,"vortex"),h(this,"distance"),h(this,"angle"),h(this,"weight"),this.origin=t,this.destination=e,this.vortex=n,this.distance=i,this.angle=a,n?(this.distance=0,this.angle=0,s=void 0!==n.weight&&n.weight>0?n.weight:"elevator"===n.type?2e3:1e3,o=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*o+s):(s=e.weight&&e.weight>=0?e.weight:0,o=e.multiplier&&e.multiplier>=1?e.multiplier:1,this.weight=this.distance*o+s),isNaN(this.angle))throw new Error("nan angle")}},Ai=Hr;f();var Yr="mi-debug",Hh={loggingEnabled:()=>"development"===x.env.NODE_ENV||"dev"===x.env.NODE_ENV||"test"===x.env.NODE_ENV||"true"===globalThis.sessionStorage?.getItem(Yr),log(...t){this.loggingEnabled()&&console.log("[MappedInJS]",...t)},warn(...t){this.loggingEnabled()&&console.warn("[MappedInJS]",...t)},error(...t){this.loggingEnabled()&&console.error("[MappedInJS]",...t)},assert(...t){this.loggingEnabled()&&console.assert(...t)},time(t){this.loggingEnabled()&&console.time(t)},timeEnd(t){this.loggingEnabled()&&console.timeEnd(t)}},S=Hh;function Yh(t){if(t.scale||t.x_scale)return 1/(t.scale||t.x_scale||1);try{if(!t.georeference)throw new Error(`map ${t.name||t.shortName||t.id} does not have a georeference field`);if(t.georeference.length<3)throw new Error(`map ${t.name||t.shortName||t.id} has less than 3 georeference points, we require at least 3 for proper map scaling`);let e=t.georeference[0],n=t.georeference[2],r=(0,au.getDistance)({latitude:e.target.x,longitude:e.target.y},{latitude:n.target.x,longitude:n.target.y}),i=e.control.x-n.control.x,a=e.control.y-n.control.y;return Math.sqrt(i*i+a*a)/r}catch(t){return S.error(t),1}}function Xh(t,e){let n=t.x-e.x,r=t.y-e.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}var Xr=class{constructor({nodes:t,vortexes:e,maps:n,showVortexNames:r=!1}){h(this,"edges"),h(this,"nodesById"),h(this,"mapsById"),this.edges={},this.mapsById=n.map((t=>({...t,_scale:Yh(t)}))).reduce(((t,e)=>(t[e.id]=e,t)),{});let i=t.filter((t=>!!this.mapsById[t.map])).map((t=>({...t,paths:t.paths?t.paths.filter((({map:e})=>e===t.map)):[]})));this.nodesById=i.reduce(((t,e)=>(t[e.id]=e,t)),{});for(let t in this.nodesById)this.nodesById.hasOwnProperty(t)&&(this.nodesById[t].paths=this.nodesById[t].paths.filter((({node:t})=>!!this.nodesById[t])));let a=e.map((t=>({...t,name:r?t.name:t.type,nodes:t.nodes?t.nodes.filter((t=>!!this.nodesById[t])):[]})));i.forEach((t=>{this.edges[t.id]=t.paths.map((({node:e})=>{let n=this.nodesById[e];return new Ai({angle:Xh(t,n),destination:n,distance:this.getDistance(t,n),origin:t})}))})),a.forEach((t=>{if(null==t.nodes||0===t.nodes.length)return;let e=0;for(;e<t.nodes.length-1;){let n=this.nodesById[t.nodes[e]];if(e++,null==n)continue;let r=e;for(;r<t.nodes.length;){let e=this.nodesById[t.nodes[r]];if(r++,null==e)continue;let i=this.mapsById[n.map].elevation||0,a=this.mapsById[e.map].elevation||0,s=Math.abs(i-a);this.edges[n.id].push(new Ai({destination:e,elevationDelta:s,origin:n,vortex:t})),this.edges[e.id].push(new Ai({destination:n,elevationDelta:s,origin:e,vortex:t}))}}}))}aStar(t,e,n){let r=t.map((t=>this.nodesById[t])).filter((t=>t)),i=e.map((t=>this.nodesById[t])).filter((t=>t));if(0===r.length||0===i.length)return[];let a=[],s={},o={};for(r.forEach((t=>{let e=this.getShortestEuclideanDistance(t,i);a.push({origin:t,priority:e}),s[t.id]=null,o[t.id]=0})),a.sort(((t,e)=>t.priority-e.priority));a.length>0;){let t=a[0];if(i.includes(t.origin)){let e=[],n=s[t.origin.id];for(;null!=n;){e.push(n);let t=s[n.origin.id];n=null!=t?t:null}return e.reverse()}for(let e of this.edges[t.origin.id]){let r=e.vortex&&!1===e.vortex.accessible;if(n&&(r||!1===e.origin.accessible||!1===e.destination.accessible))continue;let l=o[t.origin.id]+e.weight;if(null==o[e.destination.id]||l<o[e.destination.id]){o[e.destination.id]=l;let t=l+this.getShortestEuclideanDistance(e.destination,i);a.push({origin:e.destination,priority:t}),s[e.destination.id]=e}}a.splice(0,1),a.sort(((t,e)=>t.priority-e.priority))}return[]}getDistance(t,e){let n,r=t.x-e.x,i=t.y-e.y,a=r*r+i*i;return n=null==this.mapsById[t.map]?1:this.mapsById[t.map]._scale,Math.sqrt(a)/n}getShortestEuclideanDistance(t,e){return e.reduce(((e,n)=>{let r=this.getDistance(t,n);return Math.min(e,r)}),Number.MAX_VALUE)}},Jr=Xr;function Jh(t){switch(t){case"down":case"up":return`${t} `;default:return""}}f(),f();var Kr=class{constructor({origin:t,action:e,distance:n,atLocation:r,instruction:i}){h(this,"node"),h(this,"instruction"),h(this,"action"),h(this,"atLocation"),h(this,"type"),h(this,"distance",0),this.node=t,this.action=e,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=e&&"Departure"===e.type?this.instruction=null!=r?`Depart from ${r.name}`:"Depart from current location":null!=e&&"Arrival"===e.type?this.instruction=null!=r?`Arrive at ${r.name}`:"Arrive at destination":null!=e&&"TakeVortex"===e.type?this.instruction=`Take ${r&&r.name} ${Jh(e.direction)}to ${e.toMap.name}`:null!=e&&"ExitVortex"===e.type?this.instruction=`Exit ${r&&r.name} at ${e.toMap.name}`:null!=e&&"Right"===e.bearing?this.instruction="Turn right":null!=e&&"SlightRight"===e.bearing?this.instruction="Turn slightly right":null!=e&&"Straight"===e.bearing?this.instruction="Head straight":null!=e&&"SlightLeft"===e.bearing?this.instruction="Turn slightly left":null!=e&&"Left"===e.bearing&&(this.instruction="Turn left"),null!=e&&"Turn"===e.type&&r&&(this.instruction+=` at ${r.name}`))}},pt=Kr,Ni=.1*Math.PI;function Ei(t,e){return((e-t+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}var Zr=class{constructor({locations:t,nodes:e,vortexes:n,maps:r,showVortexNames:i}){h(this,"graph"),h(this,"locationsByNodeId"),this.graph=new Jr({maps:r,nodes:e,showVortexNames:i,vortexes:n}),this.locationsByNodeId=t.reduce(((t,e)=>(e.nodes&&e.nodes.forEach((n=>{t[n.node]=e})),e.polygons&&e.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{t[n]=e}))})),t)),{})}getClosestLocationInRay(t,e=.5*Math.PI,n=10){let r=0,i=0,a=t;for(;Math.abs(r)<e&&i<n;){let t=this.graph.edges[a.destination.id],s=null,o=0;for(let e of t)if(e.distance>0)if(null!=s){let t=-Ei(a.angle,e.angle);Math.abs(t)<Math.abs(o)&&(s=e,o=t)}else s=e,o=-Ei(a.angle,e.angle);if(null==s)return null;{if(Math.abs(o)>=e||(r+=o,i+=s.distance,Math.abs(r)>=e||i>n))return null;let t=this.locationsByNodeId[s.destination.id];if(null!=t)return t;a=s}}return null}getDirections({originIds:t,destinationNodeIds:e,accessible:n,departFrom:r,arriveAt:i}){let a=this.graph.aStar(t,e,n);if(0===a.length)return{distance:0,instructions:[new pt({distance:0,instruction:"No Valid Path Available"})],path:[]};let s=0,o=new Array(a.length+1);for(let t=0;t<a.length;t++)o[t]=a[t].origin;o[a.length]=a[a.length-1].destination;let l=[],u=null,h=null,c=0,d=0;for(let t=0;t<a.length;t++){let e=a[t],n=e.origin,o=e.destination;if(s+=e.distance,c+=h?.distance||0,0===t&&l.push(new pt({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=e.vortex){let t=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=t.elevation&&null!=r.elevation){let e=t.elevation-r.elevation;e>0?i="down":e<0&&(i="up")}l.push(new pt({action:{direction:i,fromMap:t,toMap:r,type:"TakeVortex"},atLocation:e.vortex,distance:c,origin:n})),d+=c,c=0}else if(null!=u&&null!=h)if(null!=h.vortex){let t=this.graph.mapsById[u.map],e=this.graph.mapsById[h.destination.map];l.push(new pt({action:{fromMap:t,toMap:e,type:"ExitVortex"},atLocation:h.vortex,distance:c,origin:n})),d+=c,c=0}else{let t=this.graph.edges[n.id].filter((t=>t.destination!==u&&t.destination!==e.destination));if(t.length>0){let r=-Ei(h.angle,e.angle),i=t.reduce(((t,n)=>{let r=-Ei(e.angle,n.angle);return Math.min(t,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Ni||Math.abs(i)<=Ni){let t;t=r<=-Math.PI/4?"Right":r<=-Ni?"SlightRight":r<=Ni?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let e=this.locationsByNodeId[n.id];if(e||(e=this.getClosestLocationInRay(h,.5*Math.PI,10)),null!=e){let r=new pt({action:{bearing:t,referencePosition:"At",type:"Turn"},atLocation:e,distance:c,origin:n});r.type=t,l.push(r)}else l.push(new pt({action:{bearing:t,referencePosition:"At",type:"Turn"},distance:c,origin:n}));d+=c,c=0}}}t===a.length-1&&(l.push(new pt({action:{type:"Arrival"},atLocation:i,distance:s-d<0?0:s-d,origin:e.destination})),d+=c,c=0),u=n,h=e}let f=[],p=null;for(let t=l.length-1;t>=0;t--){let e=l[t],{action:n}=e;n&&"TakeVortex"===n.type?(p=e.node,f.unshift(e)):n&&"Turn"===n.type&&null!=p?this.graph.getDistance(e.node,p)>5&&f.unshift(e):f.unshift(e)}return{distance:s,instructions:f,path:o}}},Qr=Zr;function iu(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return ru(this.cover(e,n),e,n,t)}function ru(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,s,o,l,u,h,c,d,f=t._root,p={data:r},g=t._x0,m=t._y0,y=t._x1,v=t._y1;if(!f)return t._root=p,t;for(;f.length;)if((u=e>=(a=(g+y)/2))?g=a:y=a,(h=n>=(s=(m+v)/2))?m=s:v=s,i=f,!(f=f[c=h<<1|u]))return i[c]=p,t;if(o=+t._x.call(null,f.data),l=+t._y.call(null,f.data),e===o&&n===l)return p.next=f,i?i[c]=p:t._root=p,t;do{i=i?i[c]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+y)/2))?g=a:y=a,(h=n>=(s=(m+v)/2))?m=s:v=s}while((c=h<<1|u)==(d=(l>=s)<<1|o>=a));return i[d]=f,i[c]=p,t}function ou(t){var e,n,r,i,a=t.length,s=new Array(a),o=new Array(a),l=1/0,u=1/0,h=-1/0,c=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(s[n]=r,o[n]=i,r<l&&(l=r),r>h&&(h=r),i<u&&(u=i),i>c&&(c=i));if(l>h||u>c)return this;for(this.cover(l,u).cover(h,c),n=0;n<a;++n)ru(this,s[n],o[n],t[n]);return this}function su(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var s,o,l=i-n||1,u=this._root;n>t||t>=i||r>e||e>=a;)switch(o=(e<r)<<1|t<n,s=new Array(4),s[o]=u,u=s,l*=2,o){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function uu(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t}function lu(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function re(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function cu(t,e,n){var r,i,a,s,o,l,u,h=this._x0,c=this._y0,d=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new re(g,h,c,d,f)),null==n?n=1/0:(h=t-n,c=e-n,d=t+n,f=e+n,n*=n);l=p.pop();)if(!(!(g=l.node)||(i=l.x0)>d||(a=l.y0)>f||(s=l.x1)<h||(o=l.y1)<c))if(g.length){var m=(i+s)/2,y=(a+o)/2;p.push(new re(g[3],m,y,s,o),new re(g[2],i,y,m,o),new re(g[1],m,a,s,y),new re(g[0],i,a,m,y)),(u=(e>=y)<<1|t>=m)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=l)}else{var v=t-+this._x.call(null,g.data),_=e-+this._y.call(null,g.data),w=v*v+_*_;if(w<n){var M=Math.sqrt(n=w);h=t-M,c=e-M,d=t+M,f=e+M,r=g.data}}return r}function du(t){if(isNaN(a=+this._x.call(null,t))||isNaN(s=+this._y.call(null,t)))return this;var e,n,r,i,a,s,o,l,u,h,c,d,f=this._root,p=this._x0,g=this._y0,m=this._x1,y=this._y1;if(!f)return this;if(f.length)for(;;){if((u=a>=(o=(p+m)/2))?p=o:m=o,(h=s>=(l=(g+y)/2))?g=l:y=l,e=f,!(f=f[c=h<<1|u]))return this;if(!f.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(n=e,d=c)}for(;f.data!==t;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):e?(i?e[c]=i:delete e[c],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)}function pu(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function hu(){return this._root}function mu(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t}function fu(t){var e,n,r,i,a,s,o=[],l=this._root;for(l&&o.push(new re(l,this._x0,this._y0,this._x1,this._y1));e=o.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,a=e.x1,s=e.y1)&&l.length){var u=(r+a)/2,h=(i+s)/2;(n=l[3])&&o.push(new re(n,u,h,a,s)),(n=l[2])&&o.push(new re(n,r,h,u,s)),(n=l[1])&&o.push(new re(n,u,i,a,h)),(n=l[0])&&o.push(new re(n,r,i,u,h))}return this}function gu(t){var e,n=[],r=[];for(this._root&&n.push(new re(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,s=e.x0,o=e.y0,l=e.x1,u=e.y1,h=(s+l)/2,c=(o+u)/2;(a=i[0])&&n.push(new re(a,s,o,h,c)),(a=i[1])&&n.push(new re(a,h,o,l,c)),(a=i[2])&&n.push(new re(a,s,c,h,u)),(a=i[3])&&n.push(new re(a,h,c,l,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this}function yu(t){return t[0]}function vu(t){return arguments.length?(this._x=t,this):this._x}function ku(t){return t[1]}function bu(t){return arguments.length?(this._y=t,this):this._y}function ja(t,e,n){var r=new eo(e??yu,n??ku,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function eo(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Mu(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f();var ge=ja.prototype=eo.prototype;ge.copy=function(){var t,e,n=new eo(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Mu(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Mu(e));return n},ge.add=iu,ge.addAll=ou,ge.cover=su,ge.data=uu,ge.extent=lu,ge.find=cu,ge.remove=du,ge.removeAll=pu,ge.root=hu,ge.size=mu,ge.visit=fu,ge.visitAfter=gu,ge.x=vu,ge.y=bu;var qe,ae,jt=class{constructor(t){j(this,qe,void 0),h(this,"categories"),h(this,"locations"),h(this,"vortexes"),h(this,"maps"),h(this,"nodes"),h(this,"polygons"),h(this,"events"),h(this,"mapGroups"),h(this,"locationStates"),h(this,"rankings"),j(this,ae,{}),I(this,qe,t)}get polygonsByMapId(){if(p(this,ae).polygonsByMapId)return p(this,ae).polygonsByMapId;let t,e={};for(let n=0,r=p(this,qe).polygons.length;n<r;++n)t=p(this,qe).polygons[n],e[t.map.id]||(e[t.map.id]=[]),e[t.map.id].push(t);let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return p(this,ae).polygonsByMapId=n,p(this,ae).polygonsByMapId}get nodesByMapId(){if(p(this,ae).nodesByMapId)return p(this,ae).nodesByMapId;let t,e={};for(let n=0,r=p(this,qe).nodes.length;n<r;++n)t=p(this,qe).nodes[n],e[t.map.id]||(e[t.map.id]=[]),e[t.map.id].push(t);let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return p(this,ae).nodesByMapId=n,p(this,ae).nodesByMapId}findNearestNodeOnMap(t,e){if(p(this,ae).nodeTreesByMap||(p(this,ae).nodeTreesByMap=new Map),!p(this,ae).nodeTreesByMap.has(t)){let e=this.nodesByMapId.get(t)??[],n=ja();n.x((t=>t.x)),n.y((t=>t.y)),n.addAll(e),p(this,ae).nodeTreesByMap.set(t,n)}return p(this,ae).nodeTreesByMap.get(t).find(e.x,e.y)}get locationsByMapId(){if(p(this,ae).locationsByMapId)return p(this,ae).locationsByMapId;let t,e={};for(let n=0,r=p(this,qe).locations.length;n<r;++n){t=p(this,qe).locations[n];for(let n=0,r=t.polygons.length;n<r;++n)e[t.polygons[n].map.id]||(e[t.polygons[n].map.id]=[]),e[t.polygons[n].map.id].push(t)}let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return p(this,ae).locationsByMapId=n,p(this,ae).locationsByMapId}static create(t){return jt.instances.has(t)||jt.instances.set(t,new jt(t)),jt.instances.get(t)}static clear(){jt.instances.clear()}},Si=jt;qe=new WeakMap,ae=new WeakMap,h(Si,"instances",new Map);var xe=Si;f(),f(),f(),f();var wu=" ",he=class{static get separator(){return wu}static set separator(t){wu=t}static parse(t){if(!isNaN(parseFloat(t))&&isFinite(t))return Number(t);let e=String(t).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==e[e.length-1]&&e.splice(e.length-1),""==e)return NaN;let n=null;switch(e.length){case 3:n=e[0]/1+e[1]/60+e[2]/3600;break;case 2:n=e[0]/1+e[1]/60;break;case 1:n=e[0];break;default:return NaN}return/^-|[WS]$/i.test(t.trim())&&(n=-n),Number(n)}static toDms(t,e="d",n){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===n)switch(e){case"d":case"deg":n=4;break;case"dm":case"deg+min":n=2;break;case"dms":case"deg+min+sec":n=0;break;default:e="d",n=4}t=Math.abs(t);let r=null,i=null,a=null,s=null;switch(e){default:case"d":case"deg":i=t.toFixed(n),i<100&&(i="0"+i),i<10&&(i="0"+i),r=i+"°";break;case"dm":case"deg+min":i=Math.floor(t),a=(60*t%60).toFixed(n),60==a&&(a=(0).toFixed(n),i++),i=("000"+i).slice(-3),a<10&&(a="0"+a),r=i+"°"+he.separator+a+"′";break;case"dms":case"deg+min+sec":i=Math.floor(t),a=Math.floor(3600*t/60)%60,s=(3600*t%60).toFixed(n),60==s&&(s=(0).toFixed(n),a++),60==a&&(a=0,i++),i=("000"+i).slice(-3),a=("00"+a).slice(-2),s<10&&(s="0"+s),r=i+"°"+he.separator+a+"′"+he.separator+s+"″"}return r}static toLat(t,e,n){let r=he.toDms(he.wrap90(t),e,n);return null===r?"–":r.slice(1)+he.separator+(t<0?"S":"N")}static toLon(t,e,n){let r=he.toDms(he.wrap180(t),e,n);return null===r?"–":r+he.separator+(t<0?"W":"E")}static toBrng(t,e,n){let r=he.toDms(he.wrap360(t),e,n);return null===r?"–":r.replace("360","0")}static fromLocale(t){let e=123456.789.toLocaleString(),n={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(t){let e=123456.789.toLocaleString(),n={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,e=3){if(![1,2,3].includes(Number(e)))throw new RangeError(`invalid precision ‘${e}’`);t=he.wrap360(t);let n=4*2**(e-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*n/360)%n*16/n]}static wrap360(t){return 0<=t&&t<360?t:(t%360+360)%360}static wrap180(t){return-180<t&&t<=180?t:(t+540)%360-180}static wrap90(t){return-90<=t&&t<=90?t:Math.abs((t%360+270)%360-180)-90}};Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var $=he,Z=Math.PI,P=class{constructor(t,e){if(isNaN(t))throw new TypeError(`invalid lat ‘${t}’`);if(isNaN(e))throw new TypeError(`invalid lon ‘${e}’`);this._lat=$.wrap90(Number(t)),this._lon=$.wrap180(Number(e))}get lat(){return this._lat}get latitude(){return this._lat}set lat(t){if(this._lat=isNaN(t)?$.wrap90($.parse(t)):$.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid lat ‘${t}’`)}set latitude(t){if(this._lat=isNaN(t)?$.wrap90($.parse(t)):$.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid latitude ‘${t}’`)}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(t){if(this._lon=isNaN(t)?$.wrap180($.parse(t)):$.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lon ‘${t}’`)}set lng(t){if(this._lon=isNaN(t)?$.wrap180($.parse(t)):$.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lng ‘${t}’`)}set longitude(t){if(this._lon=isNaN(t)?$.wrap180($.parse(t)):$.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid longitude ‘${t}’`)}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");if(null===t[0]||null===t[1])throw new TypeError("invalid (null) point");let e,n;if(2==t.length&&([e,n]=t,e=$.wrap90($.parse(e)),n=$.wrap180($.parse(n)),isNaN(e)||isNaN(n)))throw new TypeError(`invalid point ‘${t.toString()}’`);if(1==t.length&&"string"==typeof t[0]&&([e,n]=t[0].split(","),e=$.wrap90($.parse(e)),n=$.wrap180($.parse(n)),isNaN(e)||isNaN(n)))throw new TypeError(`invalid point ‘${t[0]}’`);if(1==t.length&&"object"==typeof t[0]){let r=t[0];if("Point"==r.type&&Array.isArray(r.coordinates)?[n,e]=r.coordinates:(null!=r.latitude&&(e=r.latitude),null!=r.lat&&(e=r.lat),null!=r.longitude&&(n=r.longitude),null!=r.lng&&(n=r.lng),null!=r.lon&&(n=r.lon),e=$.wrap90($.parse(e)),n=$.wrap180($.parse(n))),isNaN(e)||isNaN(n))throw new TypeError(`invalid point ‘${JSON.stringify(t[0])}’`)}if(isNaN(e)||isNaN(n))throw new TypeError(`invalid point ‘${t.toString()}’`);return new P(e,n)}distanceTo(t,e=6371e3){if(t instanceof P||(t=P.parse(t)),isNaN(e))throw new TypeError(`invalid radius ‘${e}’`);let n=e,r=this.lat.toRadians(),i=this.lon.toRadians(),a=t.lat.toRadians(),s=a-r,o=t.lon.toRadians()-i,l=Math.sin(s/2)*Math.sin(s/2)+Math.cos(r)*Math.cos(a)*Math.sin(o/2)*Math.sin(o/2);return n*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}initialBearingTo(t){if(t instanceof P||(t=P.parse(t)),this.equals(t))return NaN;let e=this.lat.toRadians(),n=t.lat.toRadians(),r=(t.lon-this.lon).toRadians(),i=Math.cos(e)*Math.sin(n)-Math.sin(e)*Math.cos(n)*Math.cos(r),a=Math.sin(r)*Math.cos(n),s=Math.atan2(a,i).toDegrees();return $.wrap360(s)}finalBearingTo(t){t instanceof P||(t=P.parse(t));let e=t.initialBearingTo(this)+180;return $.wrap360(e)}midpointTo(t){t instanceof P||(t=P.parse(t));let e=this.lat.toRadians(),n=this.lon.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),a=Math.cos(e),s=0,o=Math.sin(e),l={x:a+Math.cos(r)*Math.cos(i),y:s+Math.cos(r)*Math.sin(i),z:o+Math.sin(r)},u=Math.atan2(l.z,Math.sqrt(l.x*l.x+l.y*l.y)),h=n+Math.atan2(l.y,l.x),c=u.toDegrees(),d=h.toDegrees();return new P(c,d)}intermediatePointTo(t,e){if(t instanceof P||(t=P.parse(t)),this.equals(t))return new P(this.lat,this.lon);let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),a=t.lon.toRadians(),s=i-n,o=a-r,l=Math.sin(s/2)*Math.sin(s/2)+Math.cos(n)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2),u=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),h=Math.sin((1-e)*u)/Math.sin(u),c=Math.sin(e*u)/Math.sin(u),d=h*Math.cos(n)*Math.cos(r)+c*Math.cos(i)*Math.cos(a),f=h*Math.cos(n)*Math.sin(r)+c*Math.cos(i)*Math.sin(a),p=h*Math.sin(n)+c*Math.sin(i),g=Math.atan2(p,Math.sqrt(d*d+f*f)),m=Math.atan2(f,d),y=g.toDegrees(),v=m.toDegrees();return new P(y,v)}destinationPoint(t,e,n=6371e3){let r=t/n,i=Number(e).toRadians(),a=this.lat.toRadians(),s=this.lon.toRadians(),o=Math.sin(a)*Math.cos(r)+Math.cos(a)*Math.sin(r)*Math.cos(i),l=Math.asin(o),u=Math.sin(i)*Math.sin(r)*Math.cos(a),h=Math.cos(r)-Math.sin(a)*o,c=s+Math.atan2(u,h),d=l.toDegrees(),f=c.toDegrees();return new P(d,f)}static intersection(t,e,n,r){if(t instanceof P||(t=P.parse(t)),n instanceof P||(n=P.parse(n)),isNaN(e))throw new TypeError(`invalid brng1 ‘${e}’`);if(isNaN(r))throw new TypeError(`invalid brng2 ‘${r}’`);let i=t.lat.toRadians(),a=t.lon.toRadians(),s=n.lat.toRadians(),o=n.lon.toRadians(),l=Number(e).toRadians(),u=Number(r).toRadians(),h=s-i,c=o-a,d=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(i)*Math.cos(s)*Math.sin(c/2)*Math.sin(c/2)));if(Math.abs(d)<Number.EPSILON)return new P(t.lat,t.lon);let f=(Math.sin(s)-Math.sin(i)*Math.cos(d))/(Math.sin(d)*Math.cos(i)),p=(Math.sin(i)-Math.sin(s)*Math.cos(d))/(Math.sin(d)*Math.cos(s)),g=Math.acos(Math.min(Math.max(f,-1),1)),m=Math.acos(Math.min(Math.max(p,-1),1)),y=l-(Math.sin(o-a)>0?g:2*Z-g),v=(Math.sin(o-a)>0?2*Z-m:m)-u;if(0==Math.sin(y)&&0==Math.sin(v)||Math.sin(y)*Math.sin(v)<0)return null;let _=-Math.cos(y)*Math.cos(v)+Math.sin(y)*Math.sin(v)*Math.cos(d),w=Math.atan2(Math.sin(d)*Math.sin(y)*Math.sin(v),Math.cos(v)+Math.cos(y)*_),M=Math.asin(Math.min(Math.max(Math.sin(i)*Math.cos(w)+Math.cos(i)*Math.sin(w)*Math.cos(l),-1),1)),b=a+Math.atan2(Math.sin(l)*Math.sin(w)*Math.cos(i),Math.cos(w)-Math.sin(i)*Math.sin(M)),x=M.toDegrees(),I=b.toDegrees();return new P(x,I)}crossTrackDistanceTo(t,e,n=6371e3){t instanceof P||(t=P.parse(t)),e instanceof P||(e=P.parse(e));let r=n;if(this.equals(t))return 0;let i=t.distanceTo(this,r)/r,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(e).toRadians();return Math.asin(Math.sin(i)*Math.sin(a-s))*r}alongTrackDistanceTo(t,e,n=6371e3){t instanceof P||(t=P.parse(t)),e instanceof P||(e=P.parse(e));let r=n;if(this.equals(t))return 0;let i=t.distanceTo(this,r)/r,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(e).toRadians(),o=Math.asin(Math.sin(i)*Math.sin(a-s));return Math.acos(Math.cos(i)/Math.abs(Math.cos(o)))*Math.sign(Math.cos(s-a))*r}maxLatitude(t){let e=Number(t).toRadians(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(e)*Math.cos(n))).toDegrees()}static crossingParallels(t,e,n){if(t.equals(e))return null;let r=Number(n).toRadians(),i=t.lat.toRadians(),a=t.lon.toRadians(),s=e.lat.toRadians(),o=e.lon.toRadians()-a,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(o),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(o)-Math.cos(i)*Math.sin(s)*Math.cos(r),h=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(o);if(h*h>l*l+u*u)return null;let c=Math.atan2(-u,l),d=Math.acos(h/Math.sqrt(l*l+u*u)),f=a+c+d,p=(a+c-d).toDegrees(),g=f.toDegrees();return{lon1:$.wrap180(p),lon2:$.wrap180(g)}}rhumbDistanceTo(t,e=6371e3){t instanceof P||(t=P.parse(t));let n=e,r=this.lat.toRadians(),i=t.lat.toRadians(),a=i-r,s=Math.abs(t.lon-this.lon).toRadians();Math.abs(s)>Z&&(s=s>0?-(2*Z-s):2*Z+s);let o=Math.log(Math.tan(i/2+Z/4)/Math.tan(r/2+Z/4)),l=Math.abs(o)>1e-11?a/o:Math.cos(r);return Math.sqrt(a*a+l*l*s*s)*n}rhumbBearingTo(t){if(t instanceof P||(t=P.parse(t)),this.equals(t))return NaN;let e=this.lat.toRadians(),n=t.lat.toRadians(),r=(t.lon-this.lon).toRadians();Math.abs(r)>Z&&(r=r>0?-(2*Z-r):2*Z+r);let i=Math.log(Math.tan(n/2+Z/4)/Math.tan(e/2+Z/4)),a=Math.atan2(r,i).toDegrees();return $.wrap360(a)}rhumbDestinationPoint(t,e,n=6371e3){let r=this.lat.toRadians(),i=this.lon.toRadians(),a=Number(e).toRadians(),s=t/n,o=s*Math.cos(a),l=r+o;Math.abs(l)>Z/2&&(l=l>0?Z-l:-Z-l);let u=Math.log(Math.tan(l/2+Z/4)/Math.tan(r/2+Z/4)),h=Math.abs(u)>1e-11?o/u:Math.cos(r),c=i+s*Math.sin(a)/h,d=l.toDegrees(),f=c.toDegrees();return new P(d,f)}rhumbMidpointTo(t){t instanceof P||(t=P.parse(t));let e=this.lat.toRadians(),n=this.lon.toRadians(),r=t.lat.toRadians(),i=t.lon.toRadians();Math.abs(i-n)>Z&&(n+=2*Z);let a=(e+r)/2,s=Math.tan(Z/4+e/2),o=Math.tan(Z/4+r/2),l=Math.tan(Z/4+a/2),u=((i-n)*Math.log(l)+n*Math.log(o)-i*Math.log(s))/Math.log(o/s);isFinite(u)||(u=(n+i)/2);let h=a.toDegrees(),c=u.toDegrees();return new P(h,c)}static areaOf(t,e=6371e3){let n=e,r=t[0].equals(t[t.length-1]);r||t.push(t[0]);let i=t.length-1,a=0;for(let e=0;e<i;e++){let n=t[e].lat.toRadians(),r=t[e+1].lat.toRadians(),i=(t[e+1].lon-t[e].lon).toRadians();a+=2*Math.atan2(Math.tan(i/2)*(Math.tan(n/2)+Math.tan(r/2)),1+Math.tan(n/2)*Math.tan(r/2))}(function(t){let e=0,n=t[0].initialBearingTo(t[1]);for(let r=0;r<t.length-1;r++){let i=t[r].initialBearingTo(t[r+1]),a=t[r].finalBearingTo(t[r+1]);e+=(i-n+540)%360-180,e+=(a-i+540)%360-180,n=a}let r=t[0].initialBearingTo(t[1]);return e+=(r-n+540)%360-180,Math.abs(e)<90})(t)&&(a=Math.abs(a)-2*Z);let s=Math.abs(a*n*n);return r||t.pop(),s}equals(t){return t instanceof P||(t=P.parse(t)),!(Math.abs(this.lat-t.lat)>Number.EPSILON||Math.abs(this.lon-t.lon)>Number.EPSILON)}toGeoJSON(){return{type:"Point",coordinates:[this.lon,this.lat]}}toString(t="d",e){if(!["d","dm","dms","n"].includes(t))throw new RangeError(`invalid format ‘${t}’`);if("n"==t)return null==e&&(e=4),`${this.lat.toFixed(e)},${this.lon.toFixed(e)}`;return`${$.toLat(this.lat,t,e)}, ${$.toLon(this.lon,t,e)}`}};f(),f(),f();var Ta=class{constructor(t){h(this,"destinations",[]),this.destinations=t}};f();var Ia,et,Dt=class{constructor(t,e){j(this,Ia,void 0),j(this,et,void 0),h(this,"distance",0),h(this,"path",[]),h(this,"instructions",[]),I(this,et,t),I(this,Ia,e),this.distance=e.distance,this.instructions=e.instructions.map((t=>{let e={...t,action:{...t.action},atLocation:t.atLocation?.id?p(this,et)?._vortexesById?.[t.atLocation.id]:void 0,node:t.node?.id?p(this,et)?._nodesById?.[t.node.id]:void 0};return("TakeVortex"===e.action?.type||"ExitVortex"===e.action?.type)&&(e.action.fromMap=p(this,et)._mapsById?.[e.action?.fromMap.id],e.action.toMap=p(this,et)._mapsById?.[e.action?.toMap.id]),e})),this.path=e.path.map((t=>p(this,et)?._nodesById?.[t.id]))}toJSON(){return p(this,Ia)}};Ia=new WeakMap,et=new WeakMap;var ht,tt=class{constructor(t){j(this,ht,void 0),I(this,ht,t)}directionsTo(t,e){if(t instanceof Ta){let n=[],r=this;for(let i=0;i<t.destinations.length;i++){let a=t.destinations[i],s=Oa(r),o=Oa(a),l=p(this,ht).navigator.getDirections({originIds:s,destinationNodeIds:o,accessible:e?.accessible||!1}),u=new Dt(p(this,ht),l);n.push(u),r=a}return n}{let n=Oa(this),r=Oa(t),i=p(this,ht).navigator.getDirections({originIds:n,destinationNodeIds:r,accessible:e?.accessible||!1});return new Dt(p(this,ht),i)}}distanceTo(t,e){return this.directionsTo(t,e)?.distance||0}};ht=new WeakMap;var Zh=0,Qh="9999-12-31T00:00:00.000Z";function em(t,e,n=new Date){if(!t.states)return;let r=n||new Date,i=t.states.find((t=>{let e=new Date(t.start||Zh),n=new Date(t.end||Qh);return e<r&&n>r}));return i?e.find((t=>t.value===i.type)):void 0}var Ge,mt,_e,Aa,Na,Ea,za=class extends tt{constructor(t,e){super(t),j(this,Ge,void 0),j(this,mt,void 0),j(this,_e,{}),h(this,"states"),h(this,"id",""),h(this,"name",""),h(this,"type",""),h(this,"description"),h(this,"sortOrder"),h(this,"logo"),h(this,"phone"),h(this,"social"),h(this,"color"),h(this,"shortName"),h(this,"detailsUrl"),h(this,"tags"),h(this,"externalId"),h(this,"showLabelWhenImagePresent"),h(this,"picture"),h(this,"operationHours"),h(this,"siblingGroups"),h(this,"gallery"),j(this,Aa,void 0),j(this,Na,[]),j(this,Ea,void 0),I(this,Ge,t),I(this,mt,e);let n=Object.assign({},e);delete n.categories,Object.assign(this,n)}get polygons(){let t=p(this,_e).polygons;if(typeof t<"u")return t;let e=[],n=p(this,Aa),r=p(this,Ge)._polygonsById;if(Array.isArray(n))for(let t=0,i=n.length;t<i;++t){let i=r[n[t].id];null!=i&&i.geometry.visible&&e.push(i)}return p(this,_e).polygons=e,e}set polygons(t){I(this,Aa,t)}get nodes(){let t=p(this,_e).nodes;if(typeof t<"u")return t;let e=[],n=p(this,Na),r=p(this,Ge)._nodesById;if(n)for(let t=0,i=n.length;t<i;++t){let i=r[n[t].node];null!=i&&e.push(i)}return p(this,_e).nodes=e,e}set nodes(t){I(this,Na,t)}get parent(){let t=p(this,_e).parent;if(typeof t<"u")return t;let e,n=p(this,Ge)._locationsById,r=p(this,Ea);return void 0!==r&&(e=n[r]),p(this,_e).parent=e,e}set parent(t){I(this,Ea,t)}get categories(){let t=p(this,_e).categories;if(typeof t<"u")return t;let e=[];return p(this,mt).categories.forEach((t=>{let n=p(this,Ge).getCollectionItemById("categories",t);n&&e.push(n)})),p(this,_e).categories=e,e}get state(){return em(this,p(this,Ge).locationStates)}clone(){return new za(p(this,Ge),p(this,mt))}get nodeOperationHours(){let t=p(this,_e).nodeOperationHours;if(typeof t<"u")return t;if(null==this.nodes)return{};let e=p(this,mt).nodes.reduce(((t,e)=>(null!=e.operationHours&&(t[e.node]=e.operationHours),t)),{});return p(this,_e).nodeOperationHours=e,e}static hydrate(t,e){return t.map((t=>new za(e,t)))}static async fetch(t){let e=t.options.things.locations.slice();t.options.things.categories&&Q(e,"categories"),t.options.things.nodes&&Q(e,"nodes"),t.options.things.polygons&&Q(e,"polygons"),t.options.things.locationStates&&Q(e,"states");let n={fields:e,venue:t.options.venue};try{let e=await ee(t.options,"location",n);return t.options.includeHidden||(e=e.filter((t=>!t.hidden))),e.map((e=>new za(t,e)))}catch(t){return S.error("Fetch Locations:",t),[]}}toJSON(){let t=p(this,mt);return delete t.color,t}},at=za;Ge=new WeakMap,mt=new WeakMap,_e=new WeakMap,Aa=new WeakMap,Na=new WeakMap,Ea=new WeakMap,f();var ft,Lt,ze,Pa,Pi=class extends tt{constructor(t,e){super(t),j(this,ft,void 0),j(this,Lt,void 0),j(this,ze,{}),h(this,"geometry"),h(this,"perspectives"),h(this,"image"),h(this,"holes"),h(this,"textures"),h(this,"material"),h(this,"label"),h(this,"id",""),h(this,"layer"),h(this,"layerId"),h(this,"name"),h(this,"externalId"),h(this,"vertexes"),h(this,"canvasBounds"),j(this,Pa,void 0),I(this,ft,t),I(this,Lt,e);let n=Object.assign({},e);delete n.map,Object.assign(this,n)}get map(){let t=p(this,ze).map;if(typeof t<"u")return t;let e=p(this,ft).getCollectionItemById("maps",p(this,Lt).map);return p(this,ze).map=e,e}get locations(){let t=p(this,ze).locations;if(typeof t<"u")return t;let e=[],n=xe.instances.get(p(this,ft))?.locationsByMapId.get(this.map.id)??[],{id:r}=this;for(let t=0,i=n.length;t<i;++t){let i=n[t],a=i.polygons;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if(a[t].id===r){e.push(i);break}}return p(this,ze).locations=e,e}get entrances(){let t=p(this,ze).entrances;if(typeof t<"u")return t;let e=[],n=p(this,Pa),r=p(this,ft)._nodesById;if(Array.isArray(n)){for(let t=0,i=n.length;t<i;++t){let i=r[n[t].id];null!=i&&e.push(i)}return p(this,ze).entrances=e,e}return[]}set entrances(t){I(this,Pa,t)}get rank(){let t=p(this,ze).rank;if(typeof t<"u")return t;let{rankings:e}=p(this,ft);if(!e||!e.polygons)return null;let n=e.polygons.find((t=>t.polygonId===this.id));return n?(p(this,ze).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(p(this,ze).rank=null,null)}static hydrate(t,e){return t.map((t=>new Pi(e,t)))}static async fetch(t){let e=t.options.things.polygons.slice();t.options.things.maps&&Q(e,"map"),t.options.things.nodes&&Q(e,"entrances");let n={fields:e,venue:t.options.venue};try{return(await ee(t.options,"polygon",n)).filter((t=>t.geometry.visible)).map((e=>new Pi(t,e)))}catch(t){return S.error("Fetch Polygons:",t),[]}}toJSON(){return p(this,Lt)}},Tt=Pi;function _u(t){return/^[\da-f]{24}$/i.test(t)}function xu(t,e=!1){let n="";if(null!=t){let r="?",i=e?Object.keys(t).filter((t=>!["slug","venue"].includes(t))):Object.keys(t);for(let e=0,a=i.length;e<a;++e){let a=i[e],s=t[a];null!=s&&(n+=`${r+encodeURIComponent(a)}=${encodeURIComponent(s)}`,r="&")}}return n}function tm(t,e,n,r=!1){return r?`${t.supplementaryUrl}${e}?venue=${n.venue||n.slug}`:t.baseUrl?.includes("gateway")?`${t.baseUrl}${e}/${n.venue||n.slug}${xu(n,t.baseUrl?.includes("gateway"))}`:t.baseUrl+e+xu(n)}async function ee(t,e,n,r=!1){return to(t,e,n,r,!0)}async function to(t,e,n,r=!1,i=!1){let a=tm(t,e,n,r),s=await Fi(t,a,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}async function Fi(t,e,n=!1){let r={language:t.language,clientId:t.clientId,clientSecret:t.clientSecret};n&&delete r.language,r.language&&(e+=`&lang=${encodeURIComponent(r.language)}`);let{headers:i}=t;i["Content-Type"]="text/json",t.authorization&&(i.Authorization=t.authorization),r.language&&(i["Accept-Language"]=r.language);let a={method:"GET",headers:i},s=await gt()(e,a);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.json()}function Q(t,e){t.indexOf(e)<0&&t.push(e)}function ju([t,e],[n,r]){let i=new P(t,e),a=new P(n,r);return i.distanceTo(a)}function Tu(t){if(t.scale||t.x_scale)return 1/(t.scale||t.x_scale);let e;try{let n=t.georeference[0],r=t.georeference[2],i=new P(n.target.x,n.target.y),a=new P(r.target.x,r.target.y),s=i.distanceTo(a),o=n.control.x-r.control.x,l=n.control.y-r.control.y;e=Math.sqrt(o*o+l*l)/s}catch(n){e=1,S.warn(n),S.warn(`Couldn't georeference ${t.name||t.shortName||t.id}. Probably not enough geocoordinates.`)}return e}function Oa(t){return t instanceof Tt?t.entrances.map((t=>t.id)):t instanceof at?t.nodes?.map((t=>t.id))||[]:[t.id]}async function Iu(t){let e={},{maps:n,images:r,scenes:i,polygons:a}=t;if(null!=r)try{let t=Object.keys(r).map((t=>fetch(`data:image/png;base64,${r[t]}`).then((t=>t.blob())).then((n=>{e[t]=n})).catch((t=>{S.error(t)}))));await Promise.all(t)}catch(t){S.error(t)}return n.forEach((t=>{(t.scene?.polygons||i[t.id])&&(null!=i&&i[t.id]&&(t.scene||(t.scene={}),Object.defineProperty(t.scene,"polygons",{get:()=>i[t.id]})),null!=r&&(t.scene.images=t.scene.images.map((({filename:t})=>({filename:t,url:e[t]}))),t.scene.polygons.forEach((t=>{if(t?.image?.url&&t?.image?.url){let n=t.image.url.split("/"),r=e[n[n.length-1]];r&&(t.image.url=r)}}))))})),null!=r&&a.forEach((t=>{if(t?.image?.url){let n=t.image.url.split("/"),r=e[n[n.length-1]];r&&(t.image.url=r)}})),null!=t.images&&delete t.images,null!=t.scenes&&delete t.scenes,t}function ao(t,e,n){let r;return function(){let i=this,a=arguments,s=function(){r=null,n||t.apply(i,a)},o=n&&!r;clearTimeout(r),r=setTimeout(s,e),o&&t.apply(i,a)}}ft=new WeakMap,Lt=new WeakMap,ze=new WeakMap,Pa=new WeakMap;var Fa,Da,La,Di=class{constructor(t,e){j(this,Fa,void 0),j(this,Da,{}),j(this,La,void 0),h(this,"name"),h(this,"externalId"),h(this,"parents"),h(this,"id"),h(this,"icon"),this.id=e.id,I(this,La,e),I(this,Fa,t),Object.assign(this,e)}get locations(){let t=p(this,Da).locations;if(typeof t<"u")return t;let e=[],{locations:n}=p(this,Fa),{id:r}=this;for(let t=0,i=n.length;t<i;++t){let i=n[t],a=i.categories;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if(a[t]?.id===r){e.push(i);break}}return p(this,Da).locations=e,e}static hydrate(t,e){return t.map((t=>new Di(e,t)))}static async fetch(t){let e={fields:t.options.things.categories,venue:t.options.venue};try{return(await ee(t.options,"category",e)).map((e=>new Di(t,e)))}catch(t){return S.error("Fetch Categories:",t),[]}}toJSON(){return p(this,La)}},It=Di;Fa=new WeakMap,Da=new WeakMap,La=new WeakMap,f();var Ra,Ct,Ba,Li=class{constructor(t,e){j(this,Ra,void 0),j(this,Ct,void 0),j(this,Ba,{}),h(this,"id",""),h(this,"type",""),h(this,"name",""),h(this,"description"),h(this,"image"),h(this,"startDate"),h(this,"endDate"),h(this,"showDate"),I(this,Ct,e),I(this,Ra,t),Object.assign(this,e)}location(){let t=p(this,Ba).location;if(typeof t<"u")return t;let e,n=p(this,Ra)._locationsById,r=p(this,Ct).location;if(null!=r){let t=n[r];null!=t&&(e=t)}return p(this,Ba).location=e,e}static hydrate(t,e){return t.map((t=>new Li(e,t)))}static async fetch(t){let e=t.options.things.events.slice();t.options.things.locations&&Q(e,"location");let n={fields:e,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await ee(t.options,"event",n)).map((e=>new Li(t,e)))}catch(t){return S.error("Fetch Events:",t),[]}}toJSON(){return p(this,Ct)}},Ca=Li;Ra=new WeakMap,Ct=new WeakMap,Ba=new WeakMap,f();var qa,Ri=class{constructor(t){j(this,qa,void 0),h(this,"id",""),h(this,"name",""),h(this,"value",""),I(this,qa,t),Object.assign(this,t)}static hydrate(t){return t.map((t=>new Ri(t)))}static async fetch(t){let e={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await ee(t.options,"location-state",e)).map((t=>new Ri(t)))}catch(t){return S.error("Fetch Location States:",t),[]}}toJSON(){return p(this,qa)}},Ci=Ri;qa=new WeakMap,f(),f();var Ga,no,Ua,io,Va,$a,Bi,Ou,qi,zu,Ue,Ve,$e,We,Rt=class{constructor(t){j(this,Ga),j(this,Ua),j(this,Bi),j(this,qi),h(this,"map"),j(this,Va,{}),j(this,$a,void 0),j(this,Ue,void 0),j(this,Ve,void 0),j(this,$e,void 0),j(this,We,void 0);let{map:e,mappedin:n}=t;null!=t.lat&&null!=t.lon&&(I(this,Ue,t.lat),I(this,Ve,t.lon)),null!=t.x&&null!=t.y&&(I(this,$e,t.x),I(this,We,t.y)),this.map=e,I(this,$a,n)}get x(){return Ze(this,Ua,io).call(this,"x")}get y(){return Ze(this,Ua,io).call(this,"y")}get lat(){return Ze(this,Ga,no).call(this,"lat")}get lon(){return Ze(this,Ga,no).call(this,"lon")}absoluteDistanceTo(t){return ju([t.lat,t.lon],[this.lat,this.lon])}get nearestNode(){let t=p(this,Va).nearestNode;if(typeof t<"u")return t;let e=xe.instances.get(p(this,$a)).findNearestNodeOnMap(this.map.id,this);return p(this,Va).nearestNode=e,e}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Ga=new WeakSet,no=function(t){if(p(this,Ue)&&p(this,Ve))return p(this,"lat"===t?Ue:Ve);if(null!=p(this,$e)&&null!=p(this,We)){let[e,n]=Ze(this,qi,zu).call(this,p(this,$e),p(this,We));return I(this,Ue,e),I(this,Ve,n),p(this,"lat"===t?Ue:Ve)}throw Error("MappedinCoordinate is missing x and y")},Ua=new WeakSet,io=function(t){if(p(this,$e)&&p(this,We))return p(this,"x"===t?$e:We);if(null!=p(this,Ue)&&null!=p(this,Ve)){let[e,n]=Ze(this,Bi,Ou).call(this,p(this,Ue),p(this,Ve));return I(this,$e,e),I(this,We,n),p(this,"x"===t?$e:We)}throw Error("MappedinCoordinate is missing lat and lon")},Va=new WeakMap,$a=new WeakMap,Bi=new WeakSet,Ou=function(t,e){let n=this.map.georeference[0],r=new P(n.target.x,n.target.y),i=new P(t,e),a=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,o=a*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*o,h=Math.cos(l)*o;return[n.control.x+u,n.control.y-h]},qi=new WeakSet,zu=function(t,e){let n,r=this.map.georeference[0],i=new P(r.target.x,r.target.y),a=t-r.control.x,s=r.control.y-e,o=Math.atan2(a,s);n=0===a&&0===s?0:0===a?s:a/Math.sin(o);let l=o-this.map.getNorth(),u=n/this.map._scale,h=i.destinationPoint(u,180*l/Math.PI);return[h.lat,h.lon]},Ue=new WeakMap,Ve=new WeakMap,$e=new WeakMap,We=new WeakMap;var He,Ha,Ya,Gi=class{constructor(t,e){j(this,He,void 0),j(this,Ha,{}),j(this,Ya,void 0),h(this,"id",""),h(this,"group",""),h(this,"name",""),h(this,"shortName",""),h(this,"elevation",0),h(this,"scale",0),h(this,"layers"),h(this,"x_scale"),h(this,"perspectiveId"),h(this,"scene"),h(this,"width",0),h(this,"height",0),h(this,"georeference",[]),h(this,"_scale",0),I(this,He,t),I(this,Ya,e),Object.assign(this,e),this._scale=Tu(this),this.scale=this.x_scale||1/this._scale}get polygons(){return xe.instances.get(p(this,He))?.polygonsByMapId?.get(this.id)??[]}get locations(){return xe.instances.get(p(this,He))?.locationsByMapId?.get(this.id)??[]}get nodes(){return xe.instances.get(p(this,He))?.nodesByMapId?.get(this.id)??[]}get mapGroup(){let t=p(this,Ha).mapGroup;if(typeof t<"u")return t;let e=this.group,n=e&&p(this,He)._mapGroupsById[e]||null;return p(this,Ha).mapGroup=n,n}createCoordinateByXY(t,e){return new Rt({x:t,y:e,map:this,mappedin:p(this,He)})}createCoordinate(t,e){return new Rt({lat:t,lon:e,map:this,mappedin:p(this,He)})}getNorth(){let t;try{let e=this.georeference[0],n=this.georeference[2],r=new P(e.target.x,e.target.y),i=new P(n.target.x,n.target.y);t=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-e.control.y,n.control.x-e.control.x)-Math.PI/2)}catch(e){t=0,S.warn(e),S.warn(`Couldn't georeference ${this.name||this.shortName||this.id}. Probably not enough geocoordinates.`)}return t}static hydrate(t,e){return t.map((t=>new Gi(e,t)))}static async fetch(t){let e=t.options.things.maps.slice();t.options.perspective&&Q(e,"perspectives"),t.options.things.mapGroups&&Q(e,"group"),Q(e,"elevation"),Q(e,"x_scale"),Q(e,"scale"),Q(e,"georeference");let n={fields:e,perspective:t.options.perspective,venue:t.options.venue};try{let i=await ee(t.options,"map",n),a=t=>{let e=r.layers.find((e=>e.id===t));e?e.visible=!0:r.layers.push({id:t,visible:!0})};for(let n=0,s=i.length;n<s;++n){var r=i[n];if(r){let t=r.perspective;null!=t&&(r.perspectiveId=t.id,e.indexOf("scene")>-1&&(r.scene=t.scene),t.layers?(r.layers.forEach((t=>{t.visible=!1})),t.layers.forEach(a)):r.layers.forEach((t=>{t.visible=!0}))),delete r.perspective}i[n]=new Gi(t,r)}return i}catch(t){return S.error("Fetch Maps:",t),[]}}toJSON(){return p(this,Ya)}},Wa=Gi;He=new WeakMap,Ha=new WeakMap,Ya=new WeakMap,f();var Ja,Bt,Ka,Ui=class{constructor(t,e){j(this,Ja,void 0),j(this,Bt,void 0),j(this,Ka,{}),h(this,"id",""),h(this,"name",""),I(this,Bt,e),I(this,Ja,t),Object.assign(this,e)}get maps(){let t=p(this,Ka).maps;if(typeof t<"u")return t;let e=[],{maps:n}=p(this,Ja),{id:r}=p(this,Bt);for(let t=0,i=n.length;t<i;++t){let i=n[t];i.group===r&&e.push(i)}return p(this,Ka).maps=e,e}static hydrate(t,e){return t.map((t=>new Ui(e,t)))}static async fetch(t){let e={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await ee(t.options,"map-group",e)).map((e=>new Ui(t,e)))}catch(t){return S.error("Fetch Map Groups:",t),[]}}toJSON(){return p(this,Bt)}},Xa=Ui;Ja=new WeakMap,Bt=new WeakMap,Ka=new WeakMap,f();var Ye,qt,ue,Qa,Vi=class extends tt{constructor(t,e){super(t),j(this,Ye,void 0),j(this,qt,void 0),j(this,ue,{}),h(this,"id",""),h(this,"x",0),h(this,"y",0),h(this,"operationHours"),h(this,"externalId"),j(this,Qa,void 0),I(this,Ye,t),I(this,qt,e);let n=Object.assign({},e);delete n.map,Object.assign(this,n)}get map(){let t=p(this,ue).map;if(typeof t<"u")return t;let e=p(this,Ye).getCollectionItemById("maps",p(this,qt).map);return p(this,ue).map=e,e}get lat(){let t=p(this,ue).cachedLatLon;if(null!=t)return t.lat;let e=p(this,Ye)._mapsById?.[this.map.id];if(null==e)throw new Error("Map not found");return p(this,ue).cachedLatLon=e.createCoordinateByXY(this.x,this.y),p(this,ue).cachedLatLon.lat}get lon(){let t=p(this,ue).cachedLatLon;if(null!=t)return t.lon;let e=p(this,Ye)._mapsById?.[this.map.id];if(null==e)throw new Error("Map not found");return p(this,ue).cachedLatLon=e.createCoordinateByXY(this.x,this.y),p(this,ue).cachedLatLon.lon}get paths(){let t=p(this,ue).paths;if(typeof t<"u")return t;let e=[],n=p(this,Ye)._nodesById,r=p(this,Qa);if(Array.isArray(r))for(let t=0,i=r.length;t<i;++t){let i=n[r[t].node];null!=i&&e.push(i)}return p(this,ue).paths=e,e}set paths(t){I(this,Qa,t)}get locations(){let t=p(this,ue).locations;if(typeof t<"u")return t;let e=[],n=xe.instances.get(p(this,Ye))?.locationsByMapId?.get(this.map.id)??[],r=this.id;for(let t=0,i=n.length;t<i;++t){let i=n[t],a=i.nodes;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if(a[t].id===r){e.push(i);break}}return p(this,ue).locations=e,e}get polygon(){let t=p(this,ue).polygon;if(typeof t<"u")return t;let e,n=xe.instances.get(p(this,Ye))?.polygonsByMapId?.get(this.map.id)??[],r=this.id;for(let t=0,i=n.length;t<i;++t){let i=n[t];i.entrances.map((t=>t.id)).includes(r)&&(e=i)}return p(this,ue).polygon=e,e}static hydrate(t,e){return t.map((t=>new Vi(e,t)))}static async fetch(t){let e=t.options.things.nodes.slice();t.options.things.maps&&Q(e,"map"),["weight","multiplier","accessible"].forEach((function(t){Q(e,t)}));let n={fields:e,venue:t.options.venue};try{return(await ee(t.options,"node",n)).map((e=>new Vi(t,e)))}catch(t){return S.error("Fetch Nodes:",t),[]}}toJSON(){return p(this,qt)}},Za=Vi;Ye=new WeakMap,qt=new WeakMap,ue=new WeakMap,Qa=new WeakMap,f();var tn,$i=class{constructor(t){j(this,tn,void 0),h(this,"polygons",[]),I(this,tn,t),Object.assign(this,t)}static hydrate(t){return new $i(t)}static async fetch(t){try{let e=await to(t.options,"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new $i(e)}catch(t){return S.error("Fetch Rankings:",t),null}}toJSON(){return p(this,tn)}},en=$i;tn=new WeakMap,f();var an,Hi=class{constructor(t){h(this,"id",""),j(this,an,void 0),I(this,an,t),Object.assign(this,t)}static hydrate(t){return t.map((t=>new Hi(t)))}static async fetch(t){let e={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await ee(t.options,"apollo-theme",e)).map((t=>new Hi(t)))}catch(t){return S.error("Fetch Theme:",t),[]}}toJSON(){return p(this,an)}},Wi=Hi;an=new WeakMap,f();var rn,on,Gt,Yi=class{constructor(t,e){j(this,rn,void 0),j(this,on,void 0),j(this,Gt,{}),h(this,"defaultMap",""),h(this,"address",""),h(this,"city",""),h(this,"countrycode",""),h(this,"externalId",""),h(this,"id",""),h(this,"latitude"),h(this,"logo"),h(this,"longitude"),h(this,"metadata"),h(this,"name",""),h(this,"operationHours"),h(this,"postal",""),h(this,"slug",""),h(this,"state",""),h(this,"telephone",""),h(this,"tzid",""),h(this,"tzidOverride",""),h(this,"utcOffset",""),h(this,"website",""),I(this,on,t),I(this,rn,e),Object.assign(this,e)}static hydrate(t,e){return new Yi(e,t)}static async fetch(t){let e={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let n=await ee(t.options,"venue",e);return new Yi(t,n[0])}catch(t){return S.error("Fetch Venue:",t),{}}}get isMultiBuilding(){if(null==p(this,Gt).isMultiBuilding){let t=p(this,on).maps,e=t.reduce(((t,e)=>t.add(e.elevation)),new Set),n=t.length!==e.size;p(this,Gt).isMultiBuilding=n}return p(this,Gt).isMultiBuilding}toJSON(){return p(this,rn)}},nn=Yi;rn=new WeakMap,on=new WeakMap,Gt=new WeakMap,f();var un,Xi=class{constructor(t){h(this,"id",""),j(this,un,void 0),h(this,"name"),h(this,"type"),h(this,"weight"),h(this,"multiplier"),I(this,un,t),Object.assign(this,t)}static hydrate(t){return t.map((t=>new Xi(t)))}static async fetch(t){let e=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(t){Q(e,t)}));let n={fields:e,venue:t.options.venue};try{return(await ee(t.options,"vortex",n)).map((t=>new Xi(t)))}catch(t){return S.error("Fetch Vortexes:",t),[]}}toJSON(){return p(this,un)}},sn=Xi;function am(t,e){let n=[];return t.features.forEach((t=>{let r=[];t.properties.spaces?.forEach((t=>{if("id"in t){let n;n=e.get(t.id),n&&r.push(...n)}else r?.push({id:t.node,level:""})}));let i=r.map((t=>({node:"n_"+t.id,map:t.level}))),a=t.properties.spaces?.filter((t=>"id"in t)),s=(t.properties.hours||[]).map((t=>({...t,"@type":"OpeningHoursSpecification",dayOfWeek:[t.dayOfWeek.replace("http://schema.org/","")]}))),o={...t.properties,polygons:a||[],nodes:i||[],description:t.properties.description||"",logo:t.properties.logo||{},picture:t.properties.picture||{},phone:t.properties.phone||{},social:t.properties.social||{},externalId:t.properties.externalId||"",states:t.properties.states||[],siblingGroups:t.properties.siblingGroups||[],operationHours:s};delete o.spaces,n.push(o)})),n}function nm(t){let e=new Set;return t.features.forEach((t=>{t.properties.states?.forEach((t=>{e.add(t.type)}))})),Array.from(e).map((t=>({id:t,name:t,value:t})))}function im(t){let e=[];return t.features.forEach((t=>{let n={...t.properties,icon:t.properties.picture};delete n.picture,e.push(n)})),e}function rm(t){let e=1/0,n=1/0,r=-1/0,i=-1/0;return t.features.forEach((t=>{let a;a="MultiPolygon"===t.geometry.type?t.geometry.coordinates[0].flat():t.geometry.coordinates[0],a.forEach((t=>{e=Math.min(e,t[1]),r=Math.max(r,t[1]),n=Math.min(n,t[0]),i=Math.max(i,t[0])}))})),{id:t.features[0].properties.id,minLat:e,minLong:n,maxLat:r,maxLong:i}}function om(t,e,n){let r=n.createGeoreferences(),i=[];return t.features.forEach((t=>{let a=new Set;e.forEach((t=>{t.layer&&a.add(t.layer)}));let s=[...a].map((t=>({id:t,visible:!0}))),o=1/n.mapScale,l={...t.properties,georeference:r,shortName:t.properties.abbreviation||"",scene:{polygons:e},scale:o,x_scale:o,group:t.properties.building,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits};i.push(l)})),i}un=new WeakMap,f();var ro=class{constructor(t){h(this,"mapExtent"),h(this,"stretchRatio"),h(this,"midLat"),h(this,"midLong"),h(this,"mapUnitRatio",1e6),h(this,"latDistance"),h(this,"longDistance"),h(this,"mapScale"),h(this,"widthInMapUnits"),h(this,"heightInMapUnits"),this.mapExtent=t;let{minLat:e,minLong:n,maxLat:r,maxLong:i}=t,a=(e+r)/2,s=(n+i)/2,o=new P(a,i),l=new P(a,n),u=new P(e,s),c=new P(r,s);this.latDistance=u.distanceTo(c),this.longDistance=o.distanceTo(l);let d=this.latDistance/this.longDistance,f=(r-e)/(i-n);this.stretchRatio=d/f,this.midLat=a,this.midLong=s,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-e)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(t){let e=t[1];return{x:(t[0]-this.midLong)*this.mapUnitRatio,y:(this.midLat-e)*this.mapUnitRatio*this.stretchRatio}}createGeoreferences(){let{minLat:t,minLong:e,maxLat:n,maxLong:r}=this.mapExtent;return[[t,e],[t,r],[n,r],[n,e]].map((t=>({target:{x:t[0],y:t[1]},control:this.convert([t[1],t[0]])})))}};function sm(t,e){let n=[];return t.features.forEach((t=>{let r=e.convert(t.geometry.coordinates),i=(t.properties.neighbors||[]).map((e=>({node:e,map:t.properties.level}))),a=t.properties.level,s={...t.properties,x:r.x,y:r.y,paths:i,map:a,externalId:t.properties.externalId||""};n.push(s)})),n}var Au=(t,e,n,r,i)=>{let a=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let s=[];"entrances"in t.properties&&(s=t.properties.entrances.map((t=>({id:"n_"+t.id,node:"n_"+t.id,map:t.level}))));let o,l=n[t.properties.id],u=e.find((t=>t.id===l)),h=t.geometry.coordinates[0].map((t=>i.convert(t))),c=r.find((e=>e.polygonId===t.properties.id)),d=Math.max(i.widthInMapUnits,i.heightInMapUnits)/1e3;if(c){let t=i.convert([c.position[0],c.position[1]]),e=c.size.x,n=c.size.y,r=i.mapScale,a=n*r,s=e*r/d/c.viewBox.width,l=a/d/c.viewBox.height;o={url:u?.image,visible:!!u?.image,viewBox:c.viewBox,scale:{x:s,y:l},position:{x:t.x,y:t.y},rotation:c.rotation,useLocalScaling:!1,_isAbsolutelyPositioned:!0}}let f={...t.properties,entrances:s,map:t.properties.level,externalId:t.properties.externalId||"",geometry:{visible:!0,position:{x:0,y:0,z:(u?.altitude||0)*i.mapScale/d},scale:{x:1,y:1,z:(u?.height||1)*i.mapScale/d}},material:{color:u?.color||"#000000"},image:o,vertexes:h};a.push(f)})),a};function um(t,e,n,r,i,a){let s=Au(t,n,r,i,a),o=Au(e,n,r,i,a);return s.concat(o)}function lm(t){let e=new Map;return t.forEach((t=>{t.features.forEach((t=>{let{destinations:n}=t.properties;if(0===n.length)return;let r=n[0].split("-")[0],i=e.get(r),a=n.map((t=>t.split("-")[1])).map((t=>"n_"+t));if(i)i.nodes.push(...a);else{let{name:n,type:i,weight:s,multiplier:o,accessible:l}=t.properties,u={id:r,nodes:a,name:n,type:i,weight:s,multiplier:o,accessible:l};e.set(r,u)}}))})),Array.from(e.values())}function cm(t){let e=[];return t.features.forEach((t=>{let n={...t.properties};e.push(n)})),e}function Nu(t){let e=Object.keys(t),n=new Map,r=new Map,i=new Map,a=new Map,s=new Map,o=new Map,l=new Map,u=new Map;e.filter((t=>t.indexOf("/")>-1)).forEach((e=>{let h=e.split(/[\/\.]/),c=h[0],d=h[1];switch(c){case"connection":n.set(d,t[e]);break;case"level":r.set(d,t[e]);break;case"node":i.set(d,t[e]);break;case"obstruction":a.set(d,t[e]);break;case"space":s.set(d,t[e]);break;case"style":case"polygon-style":o.set(d,t[e]);break;case"image":l.set(d,t[e]);break;case"image-instance":u.set(d,t[e])}}));let h=t["building.geojson"]||t["building.json"],c=t["category.geojson"]||t["category.json"],d=t["location.geojson"]||t["location.json"],f=t["manifest.geojson"]||t["manifest.json"],p=t["style.json"]||[];return{connection:n,level:r,node:i,obstruction:a,space:s,building:h,category:c,location:d,manifest:f,style:p,polygonStyle:o,imageInstance:u,imageBinaries:l}}function Eu(t){let e=Array.from(t.connection.values()),n=Array.from(t.level.values()),r=t.building,i=t.category,a=t.style,s=t.location,o=t.imageInstance,l=t.polygonStyle,u={},h=[],c=new Map;n.forEach((e=>{let n=e.features[0].properties.id,r=rm(e),i=new ro(r);c.set(n,i);let s=t.obstruction.get(n),d=t.space.get(n),f=o.get(n),p=l.get(n);u[n]=um(d,s,a,p,f,i);let g=t.node.get(n);h.push(...sm(g,i))}));let d=Object.values(u).flat(),f=lm(e),p=n.map((t=>{let e=t.features[0].properties.id,n=c.get(e);return om(t,u[e],n)})).flat(),g=new Map;Array.from(t.space.values()).forEach((t=>{t.features.forEach((t=>{g.set(t.properties.id,t.properties.entrances)}))}));let m=cm(r),y=am(s,g),v=im(i),_=nm(s),w=t.manifest.features[0].properties.name,M=t.manifest.features[0].geometry.coordinates[0],b=t.manifest.features[0].geometry.coordinates[1],x=t.imageBinaries;return{locations:y,categories:v,nodes:h,maps:p,polygons:d,vortexes:f,mapGroups:m,locationStates:_,themes:[],venue:{name:w,latitude:b,longitude:M},imageBinaries:x}}f(),f(),f(),f();var Ot,Le,Ce,oo=[0,4,6,8,10],nt=()=>{let t=new Array(16).fill(0),e=4294967296*Math.random();for(let n=0;n<t.length;n++)n>0&&!(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;let n=t.map((t=>t.toString(16).padStart(2,"0")));return n[6]="4"+n[6][1],n[8]=["8","9","a","b"].includes(n[7][0])?n[7]:"a"+n[7][1],oo.map(((t,e)=>n.slice(t,e===oo.length-1?void 0:oo[e+1]).join(""))).join("-")},Su="mi-session-data",Pu="mi-local-data",so=class{constructor(){j(this,Le,void 0),j(this,Ce,void 0);try{let t=sessionStorage.getItem(Su);I(this,Le,t?JSON.parse(t):{id:nt()})}catch{I(this,Le,{id:nt()})}try{let t=localStorage.getItem(Pu);I(this,Ce,t?JSON.parse(t):{deviceId:nt()})}catch{I(this,Ce,{deviceId:nt()})}p(this,Le).id||(p(this,Le).id=nt()),p(this,Ce).deviceId||(p(this,Ce).deviceId=nt())}static getInstance(){return p(this,Ot)||I(this,Ot,new so),p(this,Ot)}static ___clearInstance(){I(this,Ot,void 0)}saveSessionData(t,e){p(this,Le)[t]=e;try{return sessionStorage.setItem(Su,JSON.stringify(p(this,Le))),!0}catch{return!1}}loadSessionData(t){let e=p(this,Le)[t];if(null!=e)return e}saveLocalData(t,e){p(this,Ce)[t]=e;try{return localStorage.setItem(Pu,JSON.stringify(p(this,Ce))),!0}catch{return!1}}loadLocalData(t){let e=p(this,Ce)[t];if(null!=e)return e}},Ut=so;function Fu(t){return/^[\da-f]{24}$/i.test(t)}function Du(){return Ut.getInstance().loadLocalData("deviceId")}function Lu(){return Ut.getInstance().loadSessionData("id")}Ot=new WeakMap,Le=new WeakMap,Ce=new WeakMap,j(Ut,Ot,void 0);var ln,Vt,$t,cn,Wt,Ht,Yt,zt,dn,Xt,Jt,pn,nl=Mr(al(),1),bm=x?.env?.npm_package_version,co=["websdk","web","webv2"],po="websdk",ho=class{constructor(t){j(this,ln,void 0),j(this,Vt,void 0),j(this,$t,void 0),j(this,cn,void 0),j(this,Wt,void 0),j(this,Ht,void 0),j(this,Yt,void 0),j(this,zt,void 0),j(this,dn,void 0),j(this,Xt,void 0),j(this,Jt,void 0),j(this,pn,void 0),I(this,zt,t.clientId),I(this,dn,t.clientSecret),I(this,Xt,t.accessToken),I(this,Yt,t.noAuth||!1);let e="https://api-gateway.mappedin.com/track-analytics/a/";!p(this,Yt)&&p(this,zt)&&!Fu(p(this,zt))&&(e="https://web-proxy.mappedin.com/a/"),I(this,$t,e),I(this,$t,p(this,$t)+(t.venue+"/")),I(this,Vt,!1),I(this,ln,"boolean"==typeof t.testMode?t.testMode:"true"===t.testMode?.toLowerCase()),I(this,cn,co.find((e=>e===t.context))||co[0]),I(this,Wt,Du()),I(this,Ht,Lu()),I(this,Jt,new Set),I(this,pn,t.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=this.getDirections.bind(this)}track(t,e){if(p(this,ln))return;let n={...e,g:p(this,Vt)},r=p(this,$t)+t+"?"+nl.default.stringify(n),i={"mi-context":po||p(this,cn),"mi-session":p(this,Ht),"mi-device":p(this,Wt),"mappedin-sdk-version":bm,"mappedin-platform-version":p(this,pn)};p(this,Xt)?i.Authorization=`Bearer ${p(this,Xt)}`:p(this,Yt)||(i.Authorization=`Basic ${btoa(`${p(this,zt)}:${p(this,dn)}`)}`),gt()(r,{method:"GET",mode:"cors",headers:i})}locationSelected(t){let e=t.id||t;this.track("select-location",{id:e})}categorySelected(t){let e=t.id||t;this.track("select-category",{id:e})}mapViewLoaded(t,e,n,r){this.track("load-mapview",{type:t,force:e,benchmark:n||-1,reason:r||"success"})}getDirections(t,e){let n={start:t.id,end:e.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return p(this,Ht)}getDeviceID(){return p(this,Wt)}setGeolocationMode(t){I(this,Vt,t)}trackBlueDotEvent(t){t&&Object.values(ho.BLUEDOT_EVENT).includes(t)&&!p(this,Jt).has(t)?(this.track(t),p(this,Jt).add(t)):S.warn(`Ignored unsupported blue dot event: "${t}".`)}trackSearch(t){null!=t&&this.track("query-search",t)}trackSearchSuggest(t){null!=t&&this.track("query-suggest",t)}static setContext(t){let e=co.find((e=>e===t));e&&(po=e)}static clearContext(){po=void 0}},Ji=ho;ln=new WeakMap,Vt=new WeakMap,$t=new WeakMap,cn=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Yt=new WeakMap,zt=new WeakMap,dn=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,pn=new WeakMap,h(Ji,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var yt,Zt,Ki=Ji,mo={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",things:{},venue:""},Sa=(t=>(t.CATEGORY="categories",t.EVENT="events",t.LOCATION="locations",t.MAPGROUP="mapGroups",t.MAP="maps",t.NODE="nodes",t.POLYGON="polygons",t.VORTEX="vortexes",t))(Sa||{}),Kt={categories:It,locations:at,vortexes:sn,maps:Wa,nodes:Za,polygons:Tt,venue:nn,events:Ca,mapGroups:Xa,themes:Wi,locationStates:Ci,rankings:en},vt=class{constructor(t){h(this,"perspective"),h(this,"things"),h(this,"options"),j(this,yt,void 0),j(this,Zt,""),h(this,"updatedAt"),h(this,"categories",[]),h(this,"locations",[]),h(this,"vortexes",[]),h(this,"maps",[]),h(this,"nodes",[]),h(this,"polygons",[]),h(this,"venue",{}),h(this,"events",[]),h(this,"mapGroups",[]),h(this,"themes",[]),h(this,"locationStates",[]),h(this,"rankings"),h(this,"_categoriesById"),h(this,"_locationsById"),h(this,"_vortexesById"),h(this,"_mapsById"),h(this,"_nodesById"),h(this,"_polygonsById"),h(this,"_eventsById"),h(this,"_mapGroupsById"),h(this,"_locationStatesById"),h(this,"_locationRankingsById"),h(this,"_rankingsById"),h(this,"_categoriesByExternalId"),h(this,"_locationsByExternalId"),h(this,"_vortexesByExternalId"),h(this,"_mapsByExternalId"),h(this,"_nodesByExternalId"),h(this,"_polygonsByExternalId"),h(this,"_eventsByExternalId"),h(this,"_mapGroupsByExternalId"),h(this,"_locationStatesByExternalId"),h(this,"_locationRankingsByExternalId"),h(this,"_rankingsByExternalId"),h(this,"images"),h(this,"imageBinaries"),h(this,"scenes"),h(this,"analytics"),h(this,"navigator"),this.options=t,I(this,yt,xe.create(this));let e=new Ki({...t,testMode:!t?.emitAnalyticsEvents});this.analytics={locationSelected:e.locationSelected,categorySelected:e.categorySelected,getDirections:e.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Yr,"true")}})}generateGetters(t){try{for(let e=0,n=t.length;e<n;++e){let n=t[e];Array.isArray(this[n])&&(Object.defineProperty(this,`_${n}ByExternalId`,{get(){let t=p(this,yt)[n];if(null!=t)return t;let e={};return this[n].forEach((t=>e[t.externalId]=t)),p(this,yt)[n]=e,e}}),Object.defineProperty(this,`_${n}ById`,{get(){let t=p(this,yt)[n];if(null!=t)return t;let e={};return this[n].forEach((t=>e[t.id]=t)),p(this,yt)[n]=e,e}}))}return this}catch(t){throw new Error("Unable to generate getters, "+t)}}getCollectionItemById(t,e){let n=`_${t}ByExternalId`,r=this[`_${t}ById`];return null!=r&&null!=r[e]||(r=this[n],null!=r&&null!=r[e])?r[e]:null}async hydrateFromMVF(t){let e=Eu(t);return this.hydrate(e)}async hydrate(t,e){let n;if("string"==typeof t)try{I(this,Zt,t),n=JSON.parse(t)}catch(t){return void S.error("Unable to parse JSON",t)}else n=t,I(this,Zt,JSON.stringify(n));let r=Object.keys(n);for(let t=0,e=r.length;t<e;++t){let e=r[t],i=n[e];null!=Kt[e]&&"function"==typeof Kt[e].hydrate&&(this[e]=Kt[e].hydrate(i,this))}e&&await Iu(n);let{images:i,scenes:a,imageBinaries:s}=n;this.images=i,this.scenes=a,this.imageBinaries=s,this.generateGetters(r),this.initNavigator()}async fetch(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),_u(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,e=[],n=Object.keys(t);for(let t=0,r=n.length;t<r;++t){let r=n[t];Kt[r]&&e.push(Kt[r].fetch(this).then((t=>(this[r]=t,Promise.resolve()))))}return this.generateGetters(n),Promise.all(e).then((()=>{this.initNavigator()}))}initNavigator(){this.navigator=new Qr({locations:this.locations.map((t=>t.toJSON())),nodes:this.nodes.map((t=>t.toJSON())),vortexes:this.vortexes.map((t=>t.toJSON())),maps:this.maps.map((t=>t.toJSON()))})}toJSON(){let t={};for(let e in Kt)Array.isArray(this[e])&&(t[e]=this[e].map((t=>t.toJSON())));let e={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(e.rankings=this.rankings?.toJSON()),delete e.locationRankings,e}toString(){return p(this,Zt)||JSON.stringify(this.toJSON())}};yt=new WeakMap,Zt=new WeakMap,f();var il={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery"],categories:["name","color","sortOrder","parents"],maps:["name","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};f(),f();var ne=function(){return ne=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ne.apply(this,arguments)};function Y(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function le(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}var hn,Mm="ENTRIES",dl="KEYS",pl="VALUES",ce="",fo=function(){function t(t,e){var n=t._tree,r=Array.from(n.keys());this.set=t,this._type=e,this._path=r.length>0?[{node:n,keys:r}]:[]}return t.prototype.next=function(){var t=this.dive();return this.backtrack(),t},t.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var t=Qt(this._path),e=t.node,n=t.keys;if(Qt(n)===ce)return{done:!1,value:this.result()};var r=e.get(Qt(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},t.prototype.backtrack=function(){if(0!==this._path.length){var t=Qt(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}},t.prototype.key=function(){return this.set._prefix+this._path.map((function(t){var e=t.keys;return Qt(e)})).filter((function(t){return t!==ce})).join("")},t.prototype.value=function(){return Qt(this._path).node.get(ce)},t.prototype.result=function(){switch(this._type){case pl:return this.value();case dl:return this.key();default:return[this.key(),this.value()]}},t.prototype[Symbol.iterator]=function(){return this},t}(),Qt=function(t){return t[t.length-1]},wm=function(t,e,n){var r=new Map;if(void 0===e)return r;for(var i=e.length+1,a=i+n,s=new Uint8Array(a*i).fill(n+1),o=0;o<i;++o)s[o]=o;for(var l=1;l<a;++l)s[l*i]=l;return hl(t,e,n,r,s,1,i,""),r},hl=function(t,e,n,r,i,a,s,o){var l,u,h=a*s;try{t:for(var c=Y(t.keys()),d=c.next();!d.done;d=c.next()){var f=d.value;if(f===ce){var p=i[h-1];p<=n&&r.set(o,[t.get(f),p])}else{for(var g=a,m=0;m<f.length;++m,++g){for(var y=f[m],v=s*g,_=v-s,w=i[v],M=Math.max(0,g-n-1),b=Math.min(s-1,g+n),x=M;x<b;++x){var I=y!==e[x],O=i[_+x]+ +I,k=i[_+x+1]+1,E=i[v+x]+1,N=i[v+x+1]=Math.min(O,k,E);N<w&&(w=N)}if(w>n)continue t}hl(t.get(f),e,n,r,i,g,s,o+f)}}}catch(t){l={error:t}}finally{try{d&&!d.done&&(u=c.return)&&u.call(c)}finally{if(l)throw l.error}}},go=function(){function t(t,e){void 0===t&&(t=new Map),void 0===e&&(e=""),this._size=void 0,this._tree=t,this._prefix=e}return t.prototype.atPrefix=function(e){var n,r;if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=le(Qi(this._tree,e.slice(this._prefix.length)),2),a=i[0],s=i[1];if(void 0===a){var o=le(Mo(s),2),l=o[0],u=o[1];try{for(var h=Y(l.keys()),c=h.next();!c.done;c=h.next()){var d=c.value;if(d!==ce&&d.startsWith(u)){var f=new Map;return f.set(d.slice(u.length),l.get(d)),new t(f,e)}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}return new t(a,e)},t.prototype.clear=function(){this._size=void 0,this._tree.clear()},t.prototype.delete=function(t){return this._size=void 0,xm(this._tree,t)},t.prototype.entries=function(){return new fo(this,Mm)},t.prototype.forEach=function(t){var e,n;try{for(var r=Y(this),i=r.next();!i.done;i=r.next()){var a=le(i.value,2);t(a[0],a[1],this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.fuzzyGet=function(t,e){return wm(this._tree,t,e)},t.prototype.get=function(t){var e=bo(this._tree,t);return void 0!==e?e.get(ce):void 0},t.prototype.has=function(t){var e=bo(this._tree,t);return void 0!==e&&e.has(ce)},t.prototype.keys=function(){return new fo(this,dl)},t.prototype.set=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");return this._size=void 0,yo(this._tree,t).set(ce,e),this},Object.defineProperty(t.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var t=this.entries();!t.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var n=yo(this._tree,t);return n.set(ce,e(n.get(ce))),this},t.prototype.fetch=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var n=yo(this._tree,t),r=n.get(ce);return void 0===r&&n.set(ce,r=e()),r},t.prototype.values=function(){return new fo(this,pl)},t.prototype[Symbol.iterator]=function(){return this.entries()},t.from=function(e){var n,r,i=new t;try{for(var a=Y(e),s=a.next();!s.done;s=a.next()){var o=le(s.value,2),l=o[0],u=o[1];i.set(l,u)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},t.fromObject=function(e){return t.from(Object.entries(e))},t}(),Qi=function(t,e,n){var r,i;if(void 0===n&&(n=[]),0===e.length||null==t)return[t,n];try{for(var a=Y(t.keys()),s=a.next();!s.done;s=a.next()){var o=s.value;if(o!==ce&&e.startsWith(o))return n.push([t,o]),Qi(t.get(o),e.slice(o.length),n)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n.push([t,e]),Qi(void 0,"",n)},bo=function(t,e){var n,r;if(0===e.length||null==t)return t;try{for(var i=Y(t.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;if(s!==ce&&e.startsWith(s))return bo(t.get(s),e.slice(s.length))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},yo=function(t,e){var n,r,i=e.length;t:for(var a=0;t&&a<i;){try{for(var s=(n=void 0,Y(t.keys())),o=s.next();!o.done;o=s.next()){var l=o.value;if(l!==ce&&e[a]===l[0]){for(var u=Math.min(i-a,l.length),h=1;h<u&&e[a+h]===l[h];)++h;var c=t.get(l);if(h===l.length)t=c;else{var d=new Map;d.set(l.slice(h),c),t.set(e.slice(a,a+h),d),t.delete(l),t=d}a+=h;continue t}}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var f=new Map;return t.set(e.slice(a),f),f}return t},xm=function(t,e){var n=le(Qi(t,e),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete(ce),0===r.size)ml(i);else if(1===r.size){var a=le(r.entries().next().value,2),s=a[0],o=a[1];fl(i,s,o)}},ml=function(t){if(0!==t.length){var e=le(Mo(t),2),n=e[0],r=e[1];if(n.delete(r),0===n.size)ml(t.slice(0,-1));else if(1===n.size){var i=le(n.entries().next().value,2),a=i[0],s=i[1];a!==ce&&fl(t.slice(0,-1),a,s)}}},fl=function(t,e,n){if(0!==t.length){var r=le(Mo(t),2),i=r[0],a=r[1];i.set(a+e,n),i.delete(a)}},Mo=function(t){return t[t.length-1]},wo="or",_m="and",jm="and_not",At=function(){function t(t){if(null==t?.fields)throw new Error('MiniSearch: option "fields" must be provided');this._options=ne(ne(ne({},ko),t),{searchOptions:ne(ne({},sl),t.searchOptions||{})}),this._index=new go,this._documentCount=0,this._documentIds=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this.addFields(this._options.fields)}return t.prototype.add=function(t){var e,n,r,i,a=this._options,s=a.extractField,o=a.tokenize,l=a.processTerm,u=a.fields,h=a.idField,c=s(t,h);if(null==c)throw new Error('MiniSearch: document does not have ID field "'.concat(h,'"'));var d=this.addDocumentId(c);this.saveStoredFields(d,t);try{for(var f=Y(u),p=f.next();!p.done;p=f.next()){var g=p.value,m=s(t,g);if(null!=m){var y=o(m.toString(),g),v=this._fieldIds[g],_=new Set(y).size;this.addFieldLength(d,v,this._documentCount-1,_);try{for(var w=(r=void 0,Y(y)),M=w.next();!M.done;M=w.next()){var b=l(M.value,g);b&&this.addTerm(v,d,b)}}catch(t){r={error:t}}finally{try{M&&!M.done&&(i=w.return)&&i.call(w)}finally{if(r)throw r.error}}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}},t.prototype.addAll=function(t){var e,n;try{for(var r=Y(t),i=r.next();!i.done;i=r.next()){var a=i.value;this.add(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.addAllAsync=function(t,e){var n=this;void 0===e&&(e={});var r=e.chunkSize,i=void 0===r?10:r,a={chunk:[],promise:Promise.resolve()},s=t.reduce((function(t,e,r){var a=t.chunk,s=t.promise;return a.push(e),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(t){return setTimeout(t,0)}))})).then((function(){return n.addAll(a)}))}:{chunk:a,promise:s}}),a),o=s.chunk;return s.promise.then((function(){return n.addAll(o)}))},t.prototype.remove=function(t){var e,n,r,i,a,s,o=this._options,l=o.tokenize,u=o.processTerm,h=o.extractField,c=o.fields,d=o.idField,f=h(t,d);if(null==f)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var p=Y(this._documentIds),g=p.next();!g.done;g=p.next()){var m=le(g.value,2),y=m[0];if(f===m[1]){try{for(var v=(r=void 0,Y(c)),_=v.next();!_.done;_=v.next()){var w=_.value,M=h(t,w);if(null!=M){var b=l(M.toString(),w),x=this._fieldIds[w],I=new Set(b).size;this.removeFieldLength(y,x,this._documentCount,I);try{for(var O=(a=void 0,Y(b)),k=O.next();!k.done;k=O.next()){var E=u(k.value,w);E&&this.removeTerm(x,y,E)}}catch(t){a={error:t}}finally{try{k&&!k.done&&(s=O.return)&&s.call(O)}finally{if(a)throw a.error}}}}}catch(t){r={error:t}}finally{try{_&&!_.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}return this._storedFields.delete(y),this._documentIds.delete(y),this._fieldLength.delete(y),void(this._documentCount-=1)}}}catch(t){e={error:t}}finally{try{g&&!g.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(f,": it is not in the index"))},t.prototype.removeAll=function(t){var e,n;if(t)try{for(var r=Y(t),i=r.next();!i.done;i=r.next()){var a=i.value;this.remove(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new go,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},t.prototype.search=function(t,e){var n,r;void 0===e&&(e={});var i=this.executeQuery(t,e),a=[];try{for(var s=Y(i),o=s.next();!o.done;o=s.next()){var l=le(o.value,2),u=l[0],h=l[1],c=h.score,d=h.terms,f=h.match,p=d.length,g={id:this._documentIds.get(u),score:c*p,terms:Object.keys(f),match:f};Object.assign(g,this._storedFields.get(u)),(null==e.filter||e.filter(g))&&a.push(g)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a.sort(ll),a},t.prototype.autoSuggest=function(t,e){var n,r,i,a;void 0===e&&(e={}),e=ne(ne({},Am),e);var s=new Map;try{for(var o=Y(this.search(t,e)),l=o.next();!l.done;l=o.next()){var u=l.value,h=u.score,c=(v=u.terms).join(" ");null!=(m=s.get(c))?(m.score+=h,m.count+=1):s.set(c,{score:h,terms:v,count:1})}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}var d=[];try{for(var f=Y(s),p=f.next();!p.done;p=f.next()){var g=le(p.value,2),m=g[0],y=g[1],v=(h=y.score,y.terms),_=y.count;d.push({suggestion:m,terms:v,score:h/_})}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return d.sort(ll),d},Object.defineProperty(t.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),t.loadJSON=function(e,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return t.loadJS(JSON.parse(e),n)},t.getDefault=function(t){if(ko.hasOwnProperty(t))return vo(ko,t);throw new Error('MiniSearch: unknown option "'.concat(t,'"'))},t.loadJS=function(e,n){var r,i,a,s,o=e.index,l=e.documentCount,u=e.nextId,h=e.documentIds,c=e.fieldIds,d=e.fieldLength,f=e.averageFieldLength,p=e.storedFields,g=e.serializationVersion;if(1!==g&&2!==g)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var m=new t(n);m._documentCount=l,m._nextId=u,m._documentIds=Zi(h),m._fieldIds=c,m._fieldLength=Zi(d),m._avgFieldLength=f,m._storedFields=Zi(p),m._index=new go;try{for(var y=Y(o),v=y.next();!v.done;v=y.next()){var _=le(v.value,2),w=_[0],M=_[1],b=new Map;try{for(var x=(a=void 0,Y(Object.keys(M))),I=x.next();!I.done;I=x.next()){var O=I.value,k=M[O];1===g&&(k=k.ds),b.set(parseInt(O,10),Zi(k))}}catch(t){a={error:t}}finally{try{I&&!I.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}m._index.set(w,b)}}catch(t){r={error:t}}finally{try{v&&!v.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return m},t.prototype.executeQuery=function(t,e){var n=this;if(void 0===e&&(e={}),"string"!=typeof t){var r=ne(ne(ne({},e),t),{queries:void 0}),i=t.queries.map((function(t){return n.executeQuery(t,r)}));return this.combineResults(i,t.combineWith)}var a=this._options,s=a.tokenize,o=a.processTerm,l=a.searchOptions,u=ne(ne({tokenize:s,processTerm:o},l),e),h=u.tokenize,c=u.processTerm,d=h(t).map((function(t){return c(t)})).filter((function(t){return!!t})).map(zm(u)).map((function(t){return n.executeQuerySpec(t,u)}));return this.combineResults(d,u.combineWith)},t.prototype.executeQuerySpec=function(t,e){var n,r,i,a,s,o,l=ne(ne({},this._options.searchOptions),e),u=(l.fields||this._options.fields).reduce((function(t,e){var n;return ne(ne({},t),((n={})[e]=vo(t,e)||1,n))}),l.boost||{}),h=l.boostDocument,c=l.weights,d=l.maxFuzzy,f=ne(ne({},sl.weights),c),p=f.fuzzy,g=f.prefix,m=this._index.get(t.term),y=this.termResults(t.term,t.term,1,m,u,h);if(t.prefix&&(s=this._index.atPrefix(t.term)),t.fuzzy){var v=!0===t.fuzzy?.2:t.fuzzy,_=v<1?Math.min(d,Math.round(t.term.length*v)):v;_&&(o=this._index.fuzzyGet(t.term,_))}if(s)try{for(var w=Y(s),M=w.next();!M.done;M=w.next()){var b=le(M.value,2),x=b[0],I=b[1];if(N=x.length-t.term.length){o?.delete(x);var O=g*x.length/(x.length+.3*N);this.termResults(t.term,x,O,I,u,h,y)}}}catch(t){n={error:t}}finally{try{M&&!M.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}if(o)try{for(var k=Y(o.keys()),E=k.next();!E.done;E=k.next()){x=E.value;var N,F=le(o.get(x),2),S=F[0];if(N=F[1]){O=p*x.length/(x.length+N);this.termResults(t.term,x,O,S,u,h,y)}}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=k.return)&&a.call(k)}finally{if(i)throw i.error}}return y},t.prototype.combineResults=function(t,e){if(void 0===e&&(e=wo),0===t.length)return new Map;var n=e.toLowerCase();return t.reduce(Tm[n])||new Map},t.prototype.toJSON=function(){var t,e,n,r,i=[];try{for(var a=Y(this._index),s=a.next();!s.done;s=a.next()){var o=le(s.value,2),l=o[0],u=o[1],h={};try{for(var c=(n=void 0,Y(u)),d=c.next();!d.done;d=c.next()){var f=le(d.value,2),p=f[0],g=f[1];h[p]=Object.fromEntries(g)}}catch(t){n={error:t}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}i.push([l,h])}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),index:i,serializationVersion:2}},t.prototype.termResults=function(t,e,n,r,i,a,s){var o,l,u,h,c;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=Y(Object.keys(i)),f=d.next();!f.done;f=d.next()){var p=f.value,g=i[p],m=this._fieldIds[p],y=r.get(m);if(null!=y){var v=y.size,_=this._avgFieldLength[m];try{for(var w=(u=void 0,Y(y.keys())),M=w.next();!M.done;M=w.next()){var b=M.value,x=a?a(this._documentIds.get(b),e):1;if(x){var I=y.get(b),O=this._fieldLength.get(b)[m],k=n*g*x*Om(I,v,this._documentCount,O,_),E=s.get(b);if(E){E.score+=k,Nm(E.terms,t);var N=vo(E.match,e);N?N.push(p):E.match[e]=[p]}else s.set(b,{score:k,terms:[t],match:(c={},c[e]=[p],c)})}}}catch(t){u={error:t}}finally{try{M&&!M.done&&(h=w.return)&&h.call(w)}finally{if(u)throw u.error}}}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(l=d.return)&&l.call(d)}finally{if(o)throw o.error}}return s},t.prototype.addTerm=function(t,e,n){var r=this._index.fetch(n,cl),i=r.get(t);if(null==i)(i=new Map).set(e,1),r.set(t,i);else{var a=i.get(e);i.set(e,(a||0)+1)}},t.prototype.removeTerm=function(t,e,n){if(this._index.has(n)){var r=this._index.fetch(n,cl),i=r.get(t);null==i||null==i.get(e)?this.warnDocumentChanged(e,t,n):i.get(e)<=1?i.size<=1?r.delete(t):i.delete(e):i.set(e,i.get(e)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(e,t,n)},t.prototype.warnDocumentChanged=function(t,e,n){var r,i;if(null!=console&&null!=console.warn)try{for(var a=Y(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var o=s.value;if(this._fieldIds[o]===e)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(t),' has changed before removal: term "').concat(n,'" was not present in field "').concat(o,'". Removing a document after it has changed can corrupt the index!'))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},t.prototype.addDocumentId=function(t){var e=this._nextId;return this._documentIds.set(e,t),this._documentCount+=1,this._nextId+=1,e},t.prototype.addFields=function(t){for(var e=0;e<t.length;e++)this._fieldIds[t[e]]=e},t.prototype.addFieldLength=function(t,e,n,r){var i=this._fieldLength.get(t);null==i&&this._fieldLength.set(t,i=[]),i[e]=r;var a=(this._avgFieldLength[e]||0)*n+r;this._avgFieldLength[e]=a/(n+1)},t.prototype.removeFieldLength=function(t,e,n,r){var i=this._avgFieldLength[e]*n-r;this._avgFieldLength[e]=i/(n-1)},t.prototype.saveStoredFields=function(t,e){var n,r,i=this._options,a=i.storeFields,s=i.extractField;if(null!=a&&0!==a.length){var o=this._storedFields.get(t);null==o&&this._storedFields.set(t,o={});try{for(var l=Y(a),u=l.next();!u.done;u=l.next()){var h=u.value,c=s(e,h);void 0!==c&&(o[h]=c)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},t}(),vo=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0},Tm=((hn={})[wo]=function(t,e){var n,r;try{for(var i=Y(e.keys()),a=i.next();!a.done;a=i.next()){var s=a.value,o=t.get(s);if(null==o)t.set(s,e.get(s));else{var l=e.get(s),u=l.score,h=l.terms,c=l.match;o.score=o.score+u,o.match=Object.assign(o.match,c),ul(o.terms,h)}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t},hn[_m]=function(t,e){var n,r,i=new Map;try{for(var a=Y(e.keys()),s=a.next();!s.done;s=a.next()){var o=s.value,l=t.get(o);if(null!=l){var u=e.get(o),h=u.score,c=u.terms,d=u.match;ul(l.terms,c),i.set(o,{score:l.score+h,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},hn[jm]=function(t,e){var n,r;try{for(var i=Y(e.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;t.delete(s)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t},hn),rl=1.2,ol=.7,Im=.5,Om=function(t,e,n,r,i){return Math.log(1+(n-e+.5)/(e+.5))*(Im+t*(rl+1)/(t+rl*(1-ol+ol*r/i)))},zm=function(t){return function(e,n,r){return{term:e,fuzzy:"function"==typeof t.fuzzy?t.fuzzy(e,n,r):t.fuzzy||!1,prefix:"function"==typeof t.prefix?t.prefix(e,n,r):!0===t.prefix}}},ko={idField:"id",extractField:function(t,e){return t[e]},tokenize:function(t,e){return t.split(Em)},processTerm:function(t,e){return t.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},sl={combineWith:wo,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},Am={prefix:function(t,e,n){return e===n.length-1}},Nm=function(t,e){t.includes(e)||t.push(e)},ul=function(t,e){var n,r;try{for(var i=Y(e),a=i.next();!a.done;a=i.next()){var s=a.value;t.includes(s)||t.push(s)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},ll=function(t,e){var n=t.score;return e.score-n},cl=function(){return new Map},Zi=function(t){var e,n,r=new Map;try{for(var i=Y(Object.keys(t)),a=i.next();!a.done;a=i.next()){var s=a.value;r.set(parseInt(s,10),t[s])}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},Em=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;f();var Sm=["0","1","2","3","4","5","6","7","8","9"],Pm=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],Fm=["0","1","2","3","4","5","6","7","8","9"],Dm=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],O0=[...Sm,...Pm,...Fm,...Dm],gl=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"];f();var Nt,Ae,kt,Xe,de,mn,fn,aa,gn,na,st,nr,ir,bt,yn,rr,or,sr,vl,vn,kn,Lm=32,Me=!1,Cm=120,xo=0,er=class{constructor(t){h(this,"_callback"),h(this,"_frameCount"),h(this,"_ordering"),h(this,"_supersededBy"),h(this,"name"),h(this,"_remainingFrameCount"),h(this,"_lastFrameTime"),h(this,"userdata"),this._callback=t.callback,this._frameCount=null!=t.frameCount?t.frameCount:1,this._ordering=null!=t.ordering?t.ordering:0,this._supersededBy=null!=t.supersededBy?new Set(t.supersededBy):new Set,this.name=t.name,this.userdata=t.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,Me&&S.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}},rt=class{constructor(t){if(h(this,"_postponed"),h(this,"userdata"),h(this,"_priority"),h(this,"_group"),h(this,"name"),h(this,"_lastFrameTime"),h(this,"_callback"),h(this,"_complete"),h(this,"_scheduled"),h(this,"_cancelled"),null!=t.group&&null!=t.priority)throw new Error("cannot specify task priority individually within group");if(null!=t.group&&null!=t.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=t.callback,this._group=null!=t.group?t.group:null,this._priority=null!=t.priority?t.priority:0,this._postponed=null!=t.postponeOnAdd&&t.postponeOnAdd,this.name=t.name,this.userdata=t.userdata,this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,Me&&S.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}},tr=class{constructor(t){h(this,"_postponed"),h(this,"_onComplete"),h(this,"_priority"),h(this,"userdata"),h(this,"name"),h(this,"_tasks"),h(this,"_scheduledTasks"),h(this,"_scheduled"),h(this,"_cancelled"),this._onComplete=null!=t.onComplete?t.onComplete:()=>{},this._priority=null!=t.priority?t.priority:0,this._postponed=null!=t.postponeOnAdd&&t.postponeOnAdd,this.name=t.name,this.userdata=t.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,Me&&S.log("task group instantiated",this.name)}isComplete(){return 0===this._scheduledTasks.size}getTasks(){return Array.from(this._tasks.values())}clear(){this._tasks.clear(),this._scheduledTasks.clear()}_popTask(){for(let t of this._scheduledTasks)return this._scheduledTasks.delete(t),t}},_o=class{constructor(t){h(this,"_maxMillisecondsPerFrame"),h(this,"_time"),this._maxMillisecondsPerFrame=null!=t?.maxMillisecondsPerFrame?t.maxMillisecondsPerFrame:Lm,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}},ar=class{constructor(t){h(this,"_raf"),h(this,"_timer"),h(this,"_performance"),h(this,"_scheduledUpdatesByOrdering"),h(this,"_scheduledTasksByPriority"),h(this,"_postponedTasks"),h(this,"_requestAnimationFrameHandle"),h(this,"_updatesToRunThisFrame"),h(this,"_lastFrameTime",0),h(this,"_updatesRunLastFrame"),this._timer=null!=t?.timer?t.timer:new _o,this._performance=null!=t?.performance&&t.performance,this._scheduledUpdatesByOrdering=new ea,this._scheduledTasksByPriority=new ea,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),Me&&S.log("task scheduler instantiated"),globalThis.MappedinDebug?.TEST_IOS&&(this._raf=t=>setTimeout(t,16))}clear(){for(let t of this._scheduledTasksByPriority.values())t._cancelled=!0;for(let t of this._postponedTasks.values())t._cancelled=!0;this._scheduledUpdatesByOrdering=new ea,this._scheduledTasksByPriority=new ea,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),Me&&S.log("task scheduler cleared")}destroy(){this.clear()}requestAnimationFrame(){null==this._requestAnimationFrameHandle&&(this._requestAnimationFrameHandle="function"==typeof this._raf?this._raf(this.update):requestAnimationFrame(this.update))}update(t){let e;this._timer.beginFrame(),this._performance&&(e=performance.now());let n=!1;Me&&(0===xo&&(n=!0),++xo,xo%=Cm);let r=this._scheduledUpdatesByOrdering.keys();for(let t=r.length-1;t>=0;--t){let e=r[t];for(let t of this._scheduledUpdatesByOrdering.get(e).values())this._updatesToRunThisFrame.push(t),n&&S.log("update scheduled to run this frame",t.name)}for(let t of this._updatesToRunThisFrame){--t._remainingFrameCount,t._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(t._ordering,t),t._superseded=!1;for(let e of this._updatesToRunThisFrame)t._supersededBy.has(e)&&(t._superseded=!0,n&&S.log("update superseded",t.name,e.name))}for(let t=0;t<this._updatesToRunThisFrame.length;++t)this._updatesToRunThisFrame[t]._superseded&&(this._updatesToRunThisFrame.splice(t,1),--t);for(let e of this._updatesToRunThisFrame){let r;this._performance&&(r=performance.now()),e._callback(t),this._performance&&(e._lastFrameTime=performance.now()-r),n&&S.log("update completed",e.name)}this._updatesRunLastFrame.clear();for(let t of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(t);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(t)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-e),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(t){let e,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;S.assert(void 0!==n),Object.getPrototypeOf(n)===tr.prototype&&(r=n,n=r._popTask()),S.assert(void 0!==n),S.assert(Object.getPrototypeOf(n)===rt.prototype),this._performance&&(e=performance.now()),n._callback(t),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-e),Me&&S.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),Me&&S.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(t){t._remainingFrameCount=t._frameCount,this._scheduledUpdatesByOrdering.insert(t._ordering,t),this.requestAnimationFrame()}scheduleTask(t){if(Object.getPrototypeOf(t)===tr)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+t.name);if(t._scheduled)throw new Error("cannot schedule already scheduled task: "+t.name);if(t._cancelled)throw new Error("cannot schedule cancelled task: "+t.name);let e=t;"_group"in t&&null!=t._group&&(t._group._tasks.add(t),t._group._scheduledTasks.add(t),e=t._group),e._postponed?this._postponedTasks.add(e):this._scheduledTasksByPriority.insert(e._priority,e),t._scheduled=!0,e._scheduled=!0,Me&&S.log("task scheduled",t.name),this.requestAnimationFrame()}cancelUpdate(t){this._scheduledUpdatesByOrdering.delete(t._ordering,t),Me&&S.log("update cancelled",t.name)}cancelTask(t){if(!t._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+t.name);if(t._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+t.name);if("_group"in t&&null!=t._group){let e=t._group.isComplete();t._group._tasks.delete(t),t._group._scheduledTasks.delete(t),t._group.isComplete()&&(this._scheduledTasksByPriority.delete(t._group._priority,t._group),e||t._group._onComplete())}else this._scheduledTasksByPriority.delete(t._priority,t),this._postponedTasks.delete(t);Object.getPrototypeOf(t)===rt.prototype?t._cancelled=!0:"clear"in t&&t.clear(),Me&&S.log("task cancelled",t.name)}postponeTask(t){if("_group"in t&&null!=t._group)throw new Error("cannot postpone individual tasks in group: "+t.name);if(t._cancelled)throw new Error("cannot postpone cancelled task: "+t.name);if(!t._postponed){if(Object.getPrototypeOf(t)===rt.prototype){if("_complete"in t)return;if(!t._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+t.name)}this._scheduledTasksByPriority.delete(t._priority,t),(Object.getPrototypeOf(t)===rt.prototype||!t.isComplete())&&this._postponedTasks.add(t),t._postponed=!0,Me&&S.log("task postponed",t.name)}}resumeTask(t){if("_group"in t&&null!=t._group)throw new Error("cannot resume individual tasks in groups");if(t._cancelled)throw new Error("cannot resume cancelled task");if(t._postponed){if(Object.getPrototypeOf(t)===rt.prototype){if("_complete"in t&&t._complete)return;if(!t._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(t),(Object.getPrototypeOf(t)===rt.prototype||!t.isComplete())&&this._scheduledTasksByPriority.insert(t._priority,t),t._postponed=!1,this.requestAnimationFrame(),Me&&S.log("task resumed",t.name)}}setTaskPriority(t,e){if(Object.getPrototypeOf(t)===rt.prototype&&!t._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(t._priority,t)&&(this._scheduledTasksByPriority.delete(t._priority,t),this._scheduledTasksByPriority.insert(e,t)),t._priority=e,Me&&S.log("task priority changed",t.name,e)}},ea=class{constructor(){h(this,"_map"),h(this,"_size"),h(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(t,e){return null!=this._map.get(t)&&this._map.get(t).has(e)}get(t){return this._map.get(t)}insert(t,e){if(S.assert("number"==typeof t&&Number.isFinite(t)),null==this._map.get(t)){this._map.set(t,new Set);for(let e=0;e<=this._sortedKeys.length;++e)if(e===this._sortedKeys.length||t<this._sortedKeys[e]){this._sortedKeys.splice(e,0,t);break}}this._map.get(t).has(e)||(this._map.get(t).add(e),++this._size)}delete(t,e){null!=this._map.get(t)&&this._map.get(t).has(e)&&(this._map.get(t).delete(e),--this._size,0===this._map.get(t).size&&(this._map.delete(t),this._sortedKeys.splice(this._sortedKeys.indexOf(t),1)))}pop(t){if(null!=this._map.get(t)){let e;for(e of this._map.get(t).values()){this._map.get(t).delete(e),--this._size;break}return 0===this._map.get(t).size&&(this._map.delete(t),this._sortedKeys.splice(this._sortedKeys.indexOf(t),1)),e}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let t=this._map.keys(),e=null,n={[Symbol.iterator]:()=>n,next:()=>{if(null==e){let n=t.next();if(n.done)return n;e=this._map.get(n.value).values()}let n=e.next();for(;n.done;){let r=t.next();if(r.done)return r;e=this._map.get(r.value).values(),n=e.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let t=0;for(let e of this._map.values())t+=e.size;return S.assert(t===this._size),t}},ot=t=>t.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase(),ta="",Rm=.09,Bm=1,qm=.025,Gm=.5,Um=5e-4,Vm=5e-4,$m=.01,Wm=.05,yl=1,Hm=.01,Ym=.2,Xm={MappedinCategory:"categories",MappedinLocation:"locations"},Jm={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:gl,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===x.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:Rm,PRIMARY_INDEX_WEIGHT:Bm,SECONDARY_INDEX_WEIGHT:qm,CATEGORY_NAME_WEIGHT:Gm,LOCATION_NAME_WEIGHT:yl,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:Um,CATEGORY_LOCATION_TAGS_WEIGHT:Vm,CATEGORY_LOCATION_NAME_WEIGHT:$m,PRIMARY_INDEX_TAGS_NAME_WEIGHT:Wm,LOCATION_DEFAULT_RANK:yl,RATIO_OF_FUZZY_TO_EXACT:Hm,RATIO_OF_PREFIX_TO_EXACT:Ym}},jo=class{constructor(t,e){j(this,sr),j(this,Nt,void 0),j(this,Ae,void 0),j(this,kt,void 0),j(this,Xe,void 0),j(this,de,void 0),j(this,mn,new ar({performance:!0})),j(this,fn,void 0),j(this,aa,void 0),j(this,gn,new Map),j(this,na,0),j(this,st,(t=>{xr(this,na)._++,p(this,mn).scheduleUpdate(new er({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{t(),xr(this,na)._--,0===p(this,na)&&p(this,yn).call(this)}}))})),j(this,nr,(t=>{let{SECONDARY_INDEX_WEIGHT:e,LOCATION_DEFAULT_RANK:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r}=p(this,de).constants,i=n;p(this,de)?.useLocationRank&&(i=Array.isArray(t.polygons)?Math.max(...t.polygons.map((t=>t.rank?.score?t.rank?.score:n)),n):n),p(this,st).call(this,(()=>{p(this,Ae).add({name:ot(t.name),tags:"",id:"MappedinLocation_"+t.id,weight:n,rank:i})})),p(this,de)?.searchTags&&Array.isArray(t.tags)&&t.tags.forEach((e=>{p(this,Ae).add({name:"",tag:ot(e),id:"MappedinLocation_"+t.id,weight:r,rank:i})})),p(this,de)?.searchDescriptions&&p(this,st).call(this,(()=>p(this,kt).add({description:ot(t.description||""),id:"MappedinLocation_"+t.id,weight:e,rank:i})))})),j(this,ir,(t=>{let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:e,CATEGORY_LOCATION_TAGS_WEIGHT:n,CATEGORY_LOCATION_NAME_WEIGHT:r,CATEGORY_NAME_WEIGHT:i}=p(this,de).constants;p(this,st).call(this,(()=>p(this,Ae).add({name:ot(t.name||""),description:"",id:"MappedinCategory_"+t.id,weight:i})));let a=t.locations.reduce(((t,e)=>t+` ${ta} `+e.name),"")+` ${ta}`;if(p(this,de)?.searchDescriptionsInCategories&&t.locations.forEach((n=>{null!=n.description&&p(this,st).call(this,(()=>p(this,Xe).add({id:"MappedinCategory_"+t.id,"category.locations.description":ot(n.description),ref:n.name,weight:e})))})),p(this,de)?.searchTagsInCategories){let e=t.locations.reduce(((t,e)=>t+e.tags?.reduce(((t,e)=>t+` ${ta} `+e),"")+` ${ta}`),"");p(this,st).call(this,(()=>p(this,Xe).add({"category.locations.tags":ot(e),id:"MappedinCategory_"+t.id,weight:n})))}p(this,st).call(this,(()=>p(this,Xe).add({"category.locations.name":ot(a),id:"MappedinCategory_"+t.id,weight:r})))})),j(this,bt,void 0),j(this,yn,void 0),j(this,rr,(t=>{let e=t.score,{object:n,id:r,weight:i,rank:a}=t,[s,o]=r.split("_"),l=n||p(this,Nt).getCollectionItemById(Xm[s],o);return a&&p(this,de)?.useLocationRank&&(e+=a),i&&(e*=i),{score:e,type:s,object:l}})),j(this,or,((t,e)=>{for(let n in t.match)t.match[n].forEach((r=>{let i=t.ref||t[r]||e.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let e=new RegExp(`[^${ta}]* `+n+` [^${ta}]*`,"ig").exec(t[r]);null!=e&&(i=e[0].slice(1,-1))}e.matches.push({term:n,weight:t.weight,matchesOn:r,value:i})}))})),j(this,vn,void 0),j(this,kn,void 0),I(this,aa,new Ki({...t.options,testMode:!1===e?.emitAnalyticsEvents})),I(this,de,{...Jm,...e}),I(this,Nt,t),I(this,fn,new Set(p(this,de)?.stopWords));let{PRIMARY_INDEX_FUZZYNESS:n,PRIMARY_INDEX_WEIGHT:r,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:a,RATIO_OF_PREFIX_TO_EXACT:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:o}=p(this,de).constants,l=["object","query","weight","tag","rank"],u={fields:["query","name","tag"],storeFields:l,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:n},boost:{name:r,query:r,tag:o},weights:{fuzzy:a,prefix:s},boostDocument:t=>t.includes("MappedinLocation")?r:t.includes("MappedinCategory")?i:r},h={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(t,e)=>p(this,fn)?.has(t.toLowerCase())?null:t.toLowerCase()},c={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...l,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(I(this,bt,new Promise((t=>{I(this,yn,t)}))),p(this,de)?.jsonIndex){let{primary:t,secondary:e,extra:n}=JSON.parse(p(this,de)?.jsonIndex);I(this,Ae,At.loadJS(t,u)),I(this,kt,At.loadJS(e,h)),I(this,Xe,At.loadJS(n,c))}else I(this,Ae,new At(u)),I(this,kt,new At(h)),I(this,Xe,new At(c)),p(this,Nt).locations.forEach(p(this,nr)),p(this,Nt).categories.forEach(p(this,ir));p(this,mn).update(performance.now()),I(this,vn,ao(((t,e)=>{p(this,aa).trackSearchSuggest({query:t,hits:e})}),300)),I(this,kn,ao(((t,e)=>{p(this,aa).trackSearch({query:t,hits:e})}),300))}async suggest(t){await p(this,bt);let{PRIMARY_INDEX_FUZZYNESS:e,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:a}=p(this,de).constants,s=p(this,Ae).autoSuggest(t,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:e,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:a}});return p(this,vn).call(this,t,s.length),{total:s.length,hits:s.map((t=>({text:t.suggestion})))}}async search(t){await p(this,bt);let e=Ze(this,sr,vl).call(this,t);return p(this,kn).call(this,t,e.length),e}async toJSON(){return await p(this,bt),JSON.stringify({primary:p(this,Ae),secondary:p(this,kt),extra:p(this,Xe)})}async addQuery(t){let e,n,{query:r,object:i,weight:a=1}=t;await p(this,bt),e=i instanceof at?"MappedinLocation":i instanceof It?"MappedinCategory":"Custom","MappedinLocation"===e||"MappedinCategory"===e?n=e+"_"+i.id:"string"==typeof i.id?n="Custom_"+i.id:(n=p(this,gn).get(i),n||(n="Custom_"+nt(),p(this,gn).set(i,n))),p(this,Ae).add({id:n,weight:a,object:i,query:ot(r)})}};Nt=new WeakMap,Ae=new WeakMap,kt=new WeakMap,Xe=new WeakMap,de=new WeakMap,mn=new WeakMap,fn=new WeakMap,aa=new WeakMap,gn=new WeakMap,na=new WeakMap,st=new WeakMap,nr=new WeakMap,ir=new WeakMap,bt=new WeakMap,yn=new WeakMap,rr=new WeakMap,or=new WeakMap,sr=new WeakSet,vl=function(t){let e=[],n=ot(t);e=[...p(this,Ae).search(n),...p(this,kt).search(n),...p(this,Xe).search(n)].sort(((t,e)=>e.score-t.score));let r={};for(let t of e){let e=p(this,rr).call(this,t);r[t.id]?r[t.id].score+=e.score:r[t.id]={...e,matches:[]},p(this,or).call(this,t,r[t.id])}return Object.keys(r).map((t=>({...r[t],matches:r[t].matches.sort(((t,e)=>e.weight-t.weight))}))).sort(((t,e)=>e.score-t.score))},vn=new WeakMap,kn=new WeakMap,f();var kl=(t=>(t.MULTI_GEOMETRY="MULTI_GEOMETRY",t.SINGLE_GEOMETRY="SINGLE_GEOMETRY",t))(kl||{}),Yo=globalThis.fetch;function gt(){if(null==Yo)throw new Error("fetch is not available in your environment. Pass your own function into `setFetch` (node-fetch, etc)");return Yo}function tM(t){Yo=t}var bf=x?.env?.npm_package_version;globalThis.btoa||(globalThis.btoa=rc.encode);var Mf=["ar"];function In(t){let e={...mo,things:il,...t};return e.headers={...e.headers,"mappedin-sdk-version":bf},t.platformString&&(e.headers={...e.headers,"mappedin-platform-version":t.platformString}),e.noAuth||(e.accessToken?e.authorization=`Bearer ${e.accessToken}`:e.clientId&&e.clientSecret&&(e.authorization=`Basic ${globalThis.btoa(`${e.clientId}:${e.clientSecret}`)}`)),e}async function nM(t){let{venue:e,clientId:n,clientSecret:r,bundleBaseUri:i}=t,a=new vt({venue:e}),s=Nu(await _f({clientId:n,clientSecret:r,venue:e,bundleBaseUri:i},!1));return a.hydrateFromMVF(s),a}async function wf(t){let e=In({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,...t}}),n="public/1/"+(e.useDraftData?"draft/":""),r=new vt({...e,baseUrl:e.baseUrl+n});return await r.fetch(),r}function iM(t){wf=t}var Xo={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function rM(t){let e=In({baseUrl:"https://api-gateway.mappedin.com/",...Xo,...t}),{url:n,updated_at:r}=await xf(t),i=await gt()(n,{mode:"cors"}),{data:a,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error(`Unrecognized format ${s}`);let o=new vt(e);return await o.hydrate(a,e.shouldPopulateBundledImagesAsBlobs),o.updatedAt=r,o}async function xf(t){let e=In({baseUrl:"https://api-gateway.mappedin.com/",...Xo,...t}),{version:n,venue:r}=t,i=`${t.bundleBaseUri||e.baseUrl+`exports/legacy${null!=e.language&&Mf.includes(e.language)?"-"+e.language:""}/1/bundle`}?venue=${r}&version=1.0.0`;return e.language=void 0,await Fi(e,i)}async function oM(t,{url:e,updated_at:n}){let r=In({baseUrl:"https://api-gateway.mappedin.com/",...Xo,...t}),i=await gt()(e,{mode:"cors"}),{data:a,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error(`Unrecognized format${s}`);let o=new vt(r);return await o.hydrate(a,r.shouldPopulateBundledImagesAsBlobs),o.updatedAt=n,o}async function ic(t){let e=In({baseUrl:"https://api-gateway.mappedin.com/",...mo,...t}),{version:n,venue:r}=t,i=`${t.bundleBaseUri||e.baseUrl+"exports/mvf/1/bundle"}?venue=${r}&version=1.0.0`;return e.language=void 0,await Fi(e,i)}async function _f(t,e=!1){return new Promise((async(n,r)=>{try{let i=new TextDecoder,a=i.decode.bind(i),s=await Promise.resolve().then((()=>(nc(),ac)));if(e){let e=new Blob(['var enc = new TextDecoder();\n\t\t\t\tvar currentTaskName;\n\t\t\t\tself.onmessage = async function({ data }) {\n\t\t\t\t\tif (data[0] === "task") {\n\t\t\t\t\t\tcurrentTaskName = data[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tpostMessage([\n\t\t\t\t\t\t\t "finished",\n\t\t\t\t\t\t [currentTaskName, JSON.parse(enc.decode(data))]\n\t\t\t\t\t\t]);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t postMessage(["error", e.toString()]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t currentTaskName = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t'],{type:"text/javascript"}),{url:i}=await ic(t),o=new Uint8Array(await gt()(i).then((t=>t.arrayBuffer()))),l=s.unzipSync(o),u=Object.keys(l),h=Math.min(u.length,Math.min(4,navigator.hardwareConcurrency)||4),c=[],d=u.map((t=>[t,l[t].buffer])),f=1e6,p=[],g=[];for(let t=0;t<d.length;t++){let[,e]=d[t];e.byteLength>=f?p.push(d[t]):e.byteLength<f&&g.push(d[t])}let m={};if(0===g.length)d.forEach((([t])=>{m[t]=JSON.parse(a(l[t]))})),n(m);else{let t=function({data:t}){let e=this;if("finished"===t[0]){let n=g[s];if(null!=n){let[t,r]=n;e.postMessage(["task",t]),e.postMessage(r,[r]),s++}let[r,i]=t[1];m[r]=i,o++}else if("error"===t[0]){let[,e]=t;c.forEach((t=>t.terminate())),r(e)}o===u.length&&(n(m),c.forEach((t=>t.terminate())))};let i=URL.createObjectURL(e);for(let t=0;t<Math.min(h,g.length);t++)c.push(new Worker(i));let s=0,o=0;c.forEach((e=>{if(e.onmessage=t,null!=g[s]){let[t,n]=g[s];e.postMessage(["task",t]),e.postMessage(n,[n]),s++}})),p.forEach((([t])=>{m[t]=JSON.parse(a(l[t])),o++}))}}else{let{url:e}=await ic(t),r=new Uint8Array(await gt()(e).then((t=>t.arrayBuffer()))),i=s.unzipSync(r),o=Object.keys(i),l={};for(let t=0;t<o.length;t++){let e=o[t];if(0===e.indexOf("image/")&&-1===e.indexOf("__MACOSX"))l[e]=i[e].buffer;else if("/"!==e.slice(-1))try{l[e]=JSON.parse(a(i[e]))}catch{S.warn("bad file",e)}}n(l)}}catch(t){r(t)}}))}export{kl as MAP_RENDER_MODE,vt as Mappedin,It as MappedinCategory,Sa as MappedinCollectionType,Rt as MappedinCoordinate,Ta as MappedinDestinationSet,Dt as MappedinDirections,Ca as MappedinEvent,at as MappedinLocation,Wa as MappedinMap,Xa as MappedinMapGroup,tt as MappedinNavigatable,Za as MappedinNode,Tt as MappedinPolygon,en as MappedinRankings,nn as MappedinVenue,sn as MappedinVortex,jo as OfflineSearch,iM as __setGetVenueMock,oM as downloadBundle,_f as downloadVenueBundleMVF,wf as getVenue,rM as getVenueBundle,xf as getVenueBundleURL,nM as getVenueMVF,ic as getVenueMVFURL,gt as isomorphicFetch,tM as setFetchFn};
|
|
1
|
+
var x,gc=Object.create,En=Object.defineProperty,yc=Object.defineProperties,vc=Object.getOwnPropertyDescriptor,kc=Object.getOwnPropertyDescriptors,bc=Object.getOwnPropertyNames,rs=Object.getOwnPropertySymbols,Mc=Object.getPrototypeOf,is=Object.prototype.hasOwnProperty,wc=Object.prototype.propertyIsEnumerable,ji=Math.pow,_i=(t,e,n)=>e in t?En(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G=(t,e)=>{for(var n in e||(e={}))is.call(e,n)&&_i(t,n,e[n]);if(rs)for(var n of rs(e))wc.call(e,n)&&_i(t,n,e[n]);return t},Q=(t,e)=>yc(t,kc(e)),os=(t,e)=>()=>(t&&(e=t(t=0)),e),R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),xc=(t,e)=>{for(var n in e)En(t,n,{get:e[n],enumerable:!0})},_c=(t,e,n,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of bc(e))!is.call(t,i)&&i!==n&&En(t,i,{get:()=>e[i],enumerable:!(r=vc(e,i))||r.enumerable});return t},Ti=(t,e,n)=>(n=null!=t?gc(Mc(t)):{},_c(!e&&t&&t.__esModule?n:En(n,"default",{value:t,enumerable:!0}),t)),m=(t,e,n)=>(_i(t,"symbol"!=typeof e?e+"":e,n),n),Ii=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},p=(t,e,n)=>(Ii(t,e,"read from private field"),n?n.call(t):e.get(t)),j=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},I=(t,e,n,r)=>(Ii(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Oi=(t,e,n,r)=>({set _(r){I(t,e,r,n)},get _(){return p(t,e,r)}}),tt=(t,e,n)=>(Ii(t,e,"access private method"),n),B=(t,e,n)=>new Promise(((r,i)=>{var a=t=>{try{o(n.next(t))}catch(t){i(t)}},s=t=>{try{o(n.throw(t))}catch(t){i(t)}},o=t=>t.done?r(t.value):Promise.resolve(t.value).then(a,s);o((n=n.apply(t,e)).next())})),f=os((()=>{x={env:{NODE_ENV:"production",npm_package_version:"6.0.0-alpha.8"}}})),ss=R(((t,e)=>{f(),function(n){var r="object"==typeof t&&t,i="object"==typeof e&&e&&e.exports==r&&e,a="object"==typeof global&&global;(a.global===a||a.window===a)&&(n=a);var s=function(t){this.message=t};(s.prototype=new Error).name="InvalidCharacterError";var o=function(t){throw new s(t)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,h={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var e,n,r,i,a=t.length%3,s="",u=-1,h=t.length-a;++u<h;)e=t.charCodeAt(u)<<16,n=t.charCodeAt(++u)<<8,r=t.charCodeAt(++u),s+=l.charAt((i=e+n+r)>>18&63)+l.charAt(i>>12&63)+l.charAt(i>>6&63)+l.charAt(63&i);return 2==a?(e=t.charCodeAt(u)<<8,n=t.charCodeAt(++u),s+=l.charAt((i=e+n)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==a&&(i=t.charCodeAt(u),s+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),s},decode:function(t){var e=(t=String(t).replace(u,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,a="",s=-1;++s<e;)r=l.indexOf(t.charAt(s)),n=i%4?64*n+r:r,i++%4&&(a+=String.fromCharCode(255&n>>(-2*i&6)));return a},version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(r&&!r.nodeType)if(i)i.exports=h;else for(var c in h)h.hasOwnProperty(c)&&(r[c]=h[c]);else n.base64=h}(t)})),ce=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.areaConversion=t.timeConversion=t.distanceConversion=t.altitudeKeys=t.latitudeKeys=t.longitudeKeys=t.MAXLON=t.MINLON=t.MAXLAT=t.MINLAT=t.earthRadius=t.sexagesimalPattern=void 0;t.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;t.earthRadius=6378137;t.MINLAT=-90;t.MAXLAT=90;t.MINLON=-180;t.MAXLON=180;t.longitudeKeys=["lng","lon","longitude",0];t.latitudeKeys=["lat","latitude",1];t.altitudeKeys=["alt","altitude","elevation","elev",2];t.distanceConversion={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144};t.timeConversion={m:60,h:3600,d:86400};var e={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};t.areaConversion=e,e.sqm=e.m2,e.sqkm=e.km2,e.sqft=e.ft2,e.sqyd=e.yd2,e.sqin=e.in2})),wa=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t,e){return e.reduce((function(e,n){if(null==t)throw new Error("'".concat(t,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(t,n)&&void 0!==n&&void 0===e?(e=n,n):e}),void 0)};t.default=e})),xa=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){var e=t.toString().trim();return!isNaN(parseFloat(e))&&parseFloat(e)===Number(e)};t.default=e})),_a=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ce(),n=function(t){return e.sexagesimalPattern.test(t.toString().trim())};t.default=n})),ja=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ce(),n=function(t){var n=new RegExp(e.sexagesimalPattern).exec(t);if(null==n)throw new Error("Given value is not in sexagesimal format");var r=Number(n[2])/60||0,i=Number(n[4])/3600||0,a=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-a:a};t.default=n})),Rn=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=ce(),r=(e=wa())&&e.__esModule?e:{default:e};function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:n.longitudeKeys,latitude:n.latitudeKeys,altitude:n.altitudeKeys},i=(0,r.default)(t,e.longitude),s=(0,r.default)(t,e.latitude),o=(0,r.default)(t,e.altitude);return a({latitude:s,longitude:i},o?{altitude:o}:{})};t.default=o})),Ei=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(xa()),n=a(_a()),r=a(ja()),i=ce();function a(t){return t&&t.__esModule?t:{default:t}}var s=function t(a){return(0,e.default)(a)?!(parseFloat(a)>i.MAXLAT||a<i.MINLAT):!!(0,n.default)(a)&&t((0,r.default)(a))};t.default=s})),Pi=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(xa()),n=a(_a()),r=a(ja()),i=ce();function a(t){return t&&t.__esModule?t:{default:t}}var s=function t(a){return(0,e.default)(a)?!(parseFloat(a)>i.MAXLON||a<i.MINLON):!!(0,n.default)(a)&&t((0,r.default)(a))};t.default=s})),Di=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=i(Rn()),n=i(Ei()),r=i(Pi());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){var i=(0,e.default)(t),a=i.latitude,s=i.longitude;if(Array.isArray(t)&&t.length>=2)return(0,r.default)(t[0])&&(0,n.default)(t[1]);if(void 0===a||void 0===s)return!1;var o=t[s],l=t[a];return!(void 0===l||void 0===o||!1===(0,n.default)(l)||!1===(0,r.default)(o))};t.default=a})),Vn=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(xa()),n=s(_a()),r=s(ja()),i=s(Di()),a=s(Rn());function s(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h=function t(s){if((0,e.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var o=(0,a.default)(s);return Array.isArray(s)?s.map((function(e,n){return[0,1].includes(n)?t(e):e})):l(l(l({},s),o.latitude&&u({},o.latitude,t(s[o.latitude]))),o.longitude&&u({},o.longitude,t(s[o.longitude])))}return Array.isArray(s)?s.map((function(e){return(0,i.default)(e)?t(e):e})):s};t.default=h})),ze=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ce(),n=i(wa()),r=i(Vn());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t,i){var a=(0,n.default)(t,e.latitudeKeys);if(null!=a){var s=t[a];return!0===i?s:(0,r.default)(s)}};t.default=a})),Ae=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ce(),n=i(wa()),r=i(Vn());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t,i){var a=(0,n.default)(t,e.longitudeKeys);if(null!=a){var s=t[a];return!0===i?s:(0,r.default)(s)}};t.default=a})),Ue=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return t*Math.PI/180};t.default=e})),It=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return 180*t/Math.PI};t.default=e})),vs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(ze()),n=s(Ae()),r=s(Ue()),i=s(It()),a=ce();function s(t){return t&&t.__esModule?t:{default:t}}var o=function(t,s,o){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,e.default)(t),h=(0,n.default)(t),c=s/l,d=(0,r.default)(o),f=(0,r.default)(u),p=(0,r.default)(h),m=Math.asin(Math.sin(f)*Math.cos(c)+Math.cos(f)*Math.sin(c)*Math.cos(d)),g=p+Math.atan2(Math.sin(d)*Math.sin(c)*Math.cos(f),Math.cos(c)-Math.sin(f)*Math.sin(m)),y=(0,i.default)(g);return(y<a.MINLON||y>a.MAXLON)&&(g=(g+3*Math.PI)%(2*Math.PI)-Math.PI,y=(0,i.default)(g)),{latitude:(0,i.default)(m),longitude:y}};t.default=o})),ks=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ce(),n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=e.areaConversion[n];if(r)return t*r;throw new Error("Invalid unit used for area conversion.")};t.default=n})),bs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ce(),n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=e.distanceConversion[n];if(r)return t*r;throw new Error("Invalid unit used for distance conversion.")};t.default=n})),Ms=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ce(),n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return t*e.timeConversion.h*e.distanceConversion.km;case"mph":return t*e.timeConversion.h*e.distanceConversion.mi;default:return t}};t.default=n})),_s=R((t=>{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&null!=o.return&&o.return()}finally{if(i)throw a}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(t){var e=Math.pow(10,12);return Math.round(t*e)/e},i=function(t){var n=e(t.toString().split("."),2),i=n[0],a=n[1],s=Math.abs(Number(i)),o=r(60*Number("0."+(a||0))),l=Math.floor(o),u=r(60*(o%l||0));return s+"° "+Number(l.toFixed(6)).toString().split(".").map((function(t,e){return 0===e?t.padStart(2,"0"):t})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(t,e){return 0===e?t.padStart(2,"0"):t})).join(".")+'"'};t.default=i})),qi=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return t>1?1:t<-1?-1:t};t.default=e})),mt=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(ze()),n=s(Ae()),r=s(Ue()),i=s(qi()),a=ce();function s(t){return t&&t.__esModule?t:{default:t}}var o=function(t,s){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;o=void 0===o||isNaN(o)?1:o;var l=(0,e.default)(t),u=(0,n.default)(t),h=(0,e.default)(s),c=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(h))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(h))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(c))))*a.earthRadius;return Math.round(d/o)*o};t.default=o})),Gi=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=mt())&&e.__esModule?e:{default:e};var r=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.default;return r="function"==typeof r?r:n.default,e.slice().sort((function(e,n){return r(t,e)-r(t,n)}))};t.default=r})),Os=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=Gi())&&e.__esModule?e:{default:e};var r=function(t,e){return(0,n.default)(t,e)[0]};t.default=r})),Ns=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(Ue()),n=a(ze()),r=a(Ae()),i=ce();function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){var a=0;if(t.length>2){for(var s,o,l,u=0;u<t.length;u++){u===t.length-2?(s=t.length-2,o=t.length-1,l=0):u===t.length-1?(s=t.length-1,o=0,l=1):(s=u,o=u+1,l=u+2);var h=(0,r.default)(t[s]),c=(0,n.default)(t[o]),d=(0,r.default)(t[l]);a+=((0,e.default)(d)-(0,e.default)(h))*Math.sin((0,e.default)(c))}a=a*i.earthRadius*i.earthRadius/2}return Math.abs(a)};t.default=s})),$i=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(ze()),n=r(Ae());function r(t){return t&&t.__esModule?t:{default:t}}var i=function(t){if(!1===Array.isArray(t)||0===t.length)throw new Error("No points were given.");return t.reduce((function(t,r){var i=(0,e.default)(r),a=(0,n.default)(r);return{maxLat:Math.max(i,t.maxLat),minLat:Math.min(i,t.minLat),maxLng:Math.max(a,t.maxLng),minLng:Math.min(a,t.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})};t.default=i})),Ss=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=s(ze()),n=s(Ae()),r=s(Ue()),i=s(It()),a=ce();function s(t){return t&&t.__esModule?t:{default:t}}var o=function(t,s){var o,l,u=(0,e.default)(t),h=(0,n.default)(t),c=(0,r.default)(u),d=(0,r.default)(h),f=s/a.earthRadius,p=c-f,m=c+f,g=(0,r.default)(a.MAXLAT),y=(0,r.default)(a.MINLAT),v=(0,r.default)(a.MAXLON),_=(0,r.default)(a.MINLON);if(p>y&&m<g){var M=Math.asin(Math.sin(f)/Math.cos(c));(o=d-M)<_&&(o+=2*Math.PI),(l=d+M)>v&&(l-=2*Math.PI)}else p=Math.max(p,y),m=Math.min(m,g),o=_,l=v;return[{latitude:(0,i.default)(p),longitude:(0,i.default)(o)},{latitude:(0,i.default)(m),longitude:(0,i.default)(l)}]};t.default=o})),Ds=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(ze()),n=a(Ae()),r=a(Ue()),i=a(It());function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){if(!1===Array.isArray(t)||0===t.length)return!1;var a=t.length,s=t.reduce((function(t,i){var a=(0,r.default)((0,e.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:t.X+Math.cos(a)*Math.cos(s),Y:t.Y+Math.cos(a)*Math.sin(s),Z:t.Z+Math.sin(a)}}),{X:0,Y:0,Z:0}),o=s.X/a,l=s.Y/a,u=s.Z/a;return{longitude:(0,i.default)(Math.atan2(l,o)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(o*o+l*l)))}};t.default=s})),Ls=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=$i())&&e.__esModule?e:{default:e};var r=function(t){var e=(0,n.default)(t),r=e.minLat+(e.maxLat-e.minLat)/2,i=e.minLng+(e.maxLng-e.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}};t.default=r})),Wi=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(ze()),n=a(Ae()),r=a(Ue()),i=a(It());function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t,a){var s=(0,r.default)((0,n.default)(a))-(0,r.default)((0,n.default)(t)),o=Math.log(Math.tan((0,r.default)((0,e.default)(a))/2+Math.PI/4)/Math.tan((0,r.default)((0,e.default)(t))/2+Math.PI/4));return Math.abs(s)>Math.PI&&(s=s>0?-1*(2*Math.PI-s):2*Math.PI+s),((0,i.default)(Math.atan2(s,o))+360)%360};t.default=s})),qs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=Wi())&&e.__esModule?e:{default:e};var r=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.default,i="function"==typeof r?r(t,e):(0,n.default)(t,e);if(isNaN(i))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(i/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}};t.default=r})),Yi=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(mt()),n=r(qi());function r(t){return t&&t.__esModule?t:{default:t}}var i=function(t,r,i){var a=(0,e.default)(r,t),s=(0,e.default)(t,i),o=(0,e.default)(r,i),l=Math.acos((0,n.default)((a*a+o*o-s*s)/(2*a*o))),u=Math.acos((0,n.default)((s*s+o*o-a*a)/(2*s*o)));return l>Math.PI/2?a:u>Math.PI/2?s:Math.sin(l)*a};t.default=i})),Ws=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(ze()),n=a(Ae()),r=a(Ue()),i=a(It());function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t,a){var s=(0,e.default)(a),o=(0,n.default)(a),l=(0,e.default)(t),u=(0,n.default)(t);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(o)-(0,r.default)(u))*Math.cos((0,r.default)(s)),Math.cos((0,r.default)(l))*Math.sin((0,r.default)(s))-Math.sin((0,r.default)(l))*Math.cos((0,r.default)(s))*Math.cos((0,r.default)(o)-(0,r.default)(u))))+360)%360};t.default=s})),Hs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=mt())&&e.__esModule?e:{default:e};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default;return t.reduce((function(t,n){return"object"===r(t)&&null!==t.last&&(t.distance+=e(n,t.last)),t.last=n,t}),{last:null,distance:0}).distance};t.default=i})),Ks=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(ze()),n=a(Ae()),r=a(Ue()),i=ce();function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t,a){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=void 0===s||isNaN(s)?1:s;var o,l,u,h,c,d,f,p=(0,e.default)(t),m=(0,n.default)(t),g=(0,e.default)(a),y=(0,n.default)(a),v=6356752.314245,_=1/298.257223563,M=(0,r.default)(y-m),w=Math.atan((1-_)*Math.tan((0,r.default)(parseFloat(p)))),b=Math.atan((1-_)*Math.tan((0,r.default)(parseFloat(g)))),x=Math.sin(w),I=Math.cos(w),O=Math.sin(b),k=Math.cos(b),E=M,F=100;do{var S=Math.sin(E),j=Math.cos(E);if(0===(d=Math.sqrt(k*S*(k*S)+(I*O-x*k*j)*(I*O-x*k*j))))return 0;o=x*O+I*k*j,l=Math.atan2(d,o),c=o-2*x*O/(h=1-(u=I*k*S/d)*u),isNaN(c)&&(c=0);var N=_/16*h*(4+_*(4-3*h));f=E,E=M+(1-N)*_*u*(l+N*d*(c+N*o*(2*c*c-1)))}while(Math.abs(E-f)>1e-12&&--F>0);if(0===F)return NaN;var T=h*(i.earthRadius*i.earthRadius-v*v)/(v*v),P=1+T/16384*(4096+T*(T*(320-175*T)-768)),A=T/1024*(256+T*(T*(74-47*T)-128)),B=A*d*(c+A/4*(o*(2*c*c-1)-A/6*c*(4*d*d-3)*(4*c*c-3))),R=v*P*(l-B);return Math.round(R/s)*s};t.default=s})),Zs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(t){return/^NNE|NE|NNW|N$/.test(t)?"N":/^ENE|E|ESE|SE$/.test(t)?"E":/^SSE|S|SSW|SW$/.test(t)?"S":/^WSW|W|WNW|NW$/.test(t)?"W":void 0};t.default=e})),Qs=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=mt())&&e.__esModule?e:{default:e};var r=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.default,i=r(t,e),a=Number(e.time)-Number(t.time),s=i/a*1e3;return s};t.default=r})),eu=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=mt())&&e.__esModule?e:{default:e};var r=function(t,e,r){return(0,n.default)(e,t)+(0,n.default)(t,r)===(0,n.default)(e,r)};t.default=r})),au=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(ze()),n=r(Ae());function r(t){return t&&t.__esModule?t:{default:t}}var i=function(t,r){for(var i=!1,a=r.length,s=-1,o=a-1;++s<a;o=s)((0,n.default)(r[s])<=(0,n.default)(t)&&(0,n.default)(t)<(0,n.default)(r[o])||(0,n.default)(r[o])<=(0,n.default)(t)&&(0,n.default)(t)<(0,n.default)(r[s]))&&(0,e.default)(t)<((0,e.default)(r[o])-(0,e.default)(r[s]))*((0,n.default)(t)-(0,n.default)(r[s]))/((0,n.default)(r[o])-(0,n.default)(r[s]))+(0,e.default)(r[s])&&(i=!i);return i};t.default=i})),nu=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=Yi())&&e.__esModule?e:{default:e};var r=function(t,e,r,i){return(0,n.default)(t,e,r)<i};t.default=r})),ru=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=mt())&&e.__esModule?e:{default:e};var r=function(t,e,r){return(0,n.default)(t,e)<r};t.default=r})),ou=R((t=>{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&null!=o.return&&o.return()}finally{if(i)throw a}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}f(),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(t){if(!t.startsWith("POLYGON"))throw new Error("Invalid wkt.");return t.slice(t.indexOf("(")+2,t.indexOf(")")).split(", ").map((function(t){var n=e(t.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))};t.default=r})),uu=R((t=>{"use strict";f(),Object.defineProperty(t,"__esModule",{value:!0});var e={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(t,"computeDestinationPoint",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"convertArea",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"convertDistance",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"convertSpeed",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"decimalToSexagesimal",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"findNearest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"getAreaOfPolygon",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"getBounds",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"getBoundsOfDistance",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"getCenter",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"getCenterOfBounds",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"getCompassDirection",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"getCoordinateKey",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"getCoordinateKeys",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"getDistance",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"getDistanceFromLine",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"getGreatCircleBearing",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"getLatitude",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"getLongitude",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"getPathLength",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"getPreciseDistance",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"getRhumbLineBearing",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"getRoughCompassDirection",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"getSpeed",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"isDecimal",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"isPointInLine",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"isPointInPolygon",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"isPointNearLine",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"isPointWithinRadius",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"isSexagesimal",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"isValidCoordinate",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"isValidLatitude",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"isValidLongitude",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"orderByDistance",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"sexagesimalToDecimal",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"toDecimal",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"toRad",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"toDeg",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(t,"wktToPolygon",{enumerable:!0,get:function(){return z.default}});var n=U(vs()),r=U(ks()),i=U(bs()),a=U(Ms()),s=U(_s()),o=U(Os()),l=U(Ns()),u=U($i()),h=U(Ss()),c=U(Ds()),d=U(Ls()),p=U(qs()),m=U(wa()),g=U(Rn()),y=U(mt()),v=U(Yi()),_=U(Ws()),M=U(ze()),w=U(Ae()),b=U(Hs()),x=U(Ks()),I=U(Wi()),O=U(Zs()),k=U(Qs()),E=U(xa()),F=U(eu()),S=U(au()),j=U(nu()),N=U(ru()),T=U(_a()),P=U(Di()),A=U(Ei()),B=U(Pi()),R=U(Gi()),D=U(ja()),L=U(Vn()),C=U(Ue()),W=U(It()),z=U(ou()),G=ce();function U(t){return t&&t.__esModule?t:{default:t}}Object.keys(G).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return G[n]}})}))})),Wu=R(((t,e)=>{"use strict";f(),e.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`))})),Ku=R(((t,e)=>{"use strict";f();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function a(t,e){try{return[decodeURIComponent(t.join(""))]}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],a(n),a(r))}function s(t){try{return decodeURIComponent(t)}catch(i){for(var e=t.match(r)||[],n=1;n<e.length;n++)e=(t=a(e,n).join("")).match(r)||[];return t}}e.exports=function(t){if("string"!=typeof t)throw new 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":"��"},n=i.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=s(n[0]);r!==n[0]&&(e[n[0]]=r)}n=i.exec(t)}e["%C2"]="�";for(var a=Object.keys(e),o=0;o<a.length;o++){var l=a[o];t=t.replace(new RegExp(l,"g"),e[l])}return t}(t)}}})),Qu=R(((t,e)=>{"use strict";f(),e.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];let n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}})),tl=R(((t,e)=>{"use strict";f(),e.exports=function(t,e){for(var n={},r=Object.keys(t),i=Array.isArray(e),a=0;a<r.length;a++){var s=r[a],o=t[s];(i?-1!==e.indexOf(s):e(s,o,t))&&(n[s]=o)}return n}})),ll=R((t=>{"use strict";f();var e=Wu(),n=Ku(),r=Qu(),i=tl(),a=Symbol("encodeFragmentIdentifier");function s(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(t,n){return n.encode?n.strict?e(t):encodeURIComponent(t):t}function l(t,e){return e.decode?n(t):t}function u(t){return Array.isArray(t)?t.sort():"object"==typeof t?u(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function h(t){let e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function c(t){let e=(t=h(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function d(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 p(t,e){s((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);let n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{let i="string"==typeof n&&n.includes(t.arrayFormatSeparator),a="string"==typeof n&&!i&&l(n,t).includes(t.arrayFormatSeparator);n=a?l(n,t):n;let s=i||a?n.split(t.arrayFormatSeparator).map((e=>l(e,t))):null===n?n:l(n,t);r[e]=s};case"bracket-separator":return(e,n,r)=>{let i=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!i)return void(r[e]=n&&l(n,t));let a=null===n?[]:n.split(t.arrayFormatSeparator).map((e=>l(e,t)));void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=a};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),i=Object.create(null);if("string"!=typeof t||!(t=t.trim().replace(/^[?#&]/,"")))return i;for(let a of t.split("&")){if(""===a)continue;let[t,s]=r(e.decode?a.replace(/\+/g," "):a,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?s:l(s,e),n(l(t,e),s,i)}for(let t of Object.keys(i)){let n=i[t];if("object"==typeof n&&null!==n)for(let t of Object.keys(n))n[t]=d(n[t],e);else i[t]=d(n,e)}return!1===e.sort?i:(!0===e.sort?Object.keys(i).sort():Object.keys(i).sort(e.sort)).reduce(((t,e)=>{let n=i[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=u(n):t[e]=n,t}),Object.create(null))}t.extract=c,t.parse=p,t.stringify=(t,e)=>{if(!t)return"";s((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);let n=n=>e.skipNull&&(t=>null==t)(t[n])||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{let i=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[o(e,t),"[",i,"]"].join("")]:[...n,[o(e,t),"[",o(i,t),"]=",o(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[o(e,t),"[]"].join("")]:[...n,[o(e,t),"[]=",o(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[o(n,t),e,o(i,t)].join("")]:[[r,o(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,o(e,t)]:[...n,[o(e,t),"=",o(r,t)].join("")]}}(e),i={};for(let e of Object.keys(t))n(e)||(i[e]=t[e]);let a=Object.keys(i);return!1!==e.sort&&a.sort(e.sort),a.map((n=>{let i=t[n];return void 0===i?"":null===i?o(n,e):Array.isArray(i)?0===i.length&&"bracket-separator"===e.arrayFormat?o(n,e)+"[]":i.reduce(r(n),[]).join("&"):o(n,e)+"="+o(i,e)})).filter((t=>t.length>0)).join("&")},t.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[n,i]=r(t,"#");return Object.assign({url:n.split("?")[0]||"",query:p(c(t),e)},e&&e.parseFragmentIdentifier&&i?{fragmentIdentifier:l(i,e)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);let r=h(e.url).split("?")[0]||"",i=t.extract(e.url),s=t.parse(i,{sort:!1}),l=Object.assign(s,e.query),u=t.stringify(l,n);u&&(u=`?${u}`);let c=function(t){let e="",n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(e.url);return e.fragmentIdentifier&&(c=`#${n[a]?o(e.fragmentIdentifier,n):e.fragmentIdentifier}`),`${r}${u}${c}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);let{url:s,query:o,fragmentIdentifier:l}=t.parseUrl(e,r);return t.stringifyUrl({url:s,query:i(o,n),fragmentIdentifier:l},r)},t.exclude=(e,n,r)=>{let i=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return t.pick(e,i,r)}})),cc={};function Ho(t,e){return!e&&"function"==typeof t&&(e=t,t={}),this.ondata=e,t}function Kl(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ya(t,e,[ga],(function(t){return Tt(zn(t.data[0],t.data[1]))}),0,n)}function zn(t,e){return Ft(t,e||{},0,0)}function Xo(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ya(t,e,[fa],(function(t){return Tt(ka(t.data[0],Go(t.data[1])))}),1,n)}function ka(t,e){return In(t,e)}function pf(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ya(t,e,[ga,Vl,function(){return[Do]}],(function(t){return Tt(Do(t.data[0],t.data[1]))}),2,n)}function Do(t,e){e||(e={});var n=ma(),r=t.length;n.p(t);var i=Ft(t,e,$o(e),8),a=i.length;return Uo(i,e),Z(i,a-8,n.d()),Z(i,a-4,r),i}function Ql(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ya(t,e,[fa,$l,function(){return[ki]}],(function(t){return Tt(ki(t.data[0]))}),3,n)}function ki(t,e){return In(t.subarray(Vo(t),-8),e||new Y(Yl(t)))}function mf(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ya(t,e,[ga,Wl,function(){return[Co]}],(function(t){return Tt(Co(t.data[0],t.data[1]))}),4,n)}function Co(t,e){e||(e={});var n=qo();n.p(t);var r=Ft(t,e,2,4);return Wo(r,e),Z(r,r.length-4,n.d()),r}function tc(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),ya(t,e,[fa,Hl,function(){return[Mi]}],(function(t){return Tt(Mi(t.data[0],Go(t.data[1])))}),5,n)}function Mi(t,e){return In((Xl(t),t.subarray(2,-4)),e)}function gf(t,e,n){return n||(n=e,e={}),"function"!=typeof n&&F(7),31==t[0]&&139==t[1]&&8==t[2]?Ql(t,e,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?Xo(t,e,n):tc(t,e,n)}function yf(t,e){return 31==t[0]&&139==t[1]&&8==t[2]?ki(t,e):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?ka(t,e):Mi(t,e)}function jt(t,e){if(e){for(var n=new Y(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}if(Al)return Al.encode(t);var i=t.length,a=new Y(t.length+(t.length>>1)),s=0,o=function(t){a[s++]=t};for(r=0;r<i;++r){if(s+5>a.length){var l=new Y(s+8+(i-r<<1));l.set(a),a=l}var u=t.charCodeAt(r);u<128||e?o(u):u<2048?(o(192|u>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&t.charCodeAt(++r))>>18),o(128|u>>12&63),o(128|u>>6&63),o(128|63&u)):(o(224|u>>12),o(128|u>>6&63),o(128|63&u))}return De(a,0,s)}function Ko(t,e){if(e){for(var n="",r=0;r<t.length;r+=16384)n+=String.fromCharCode.apply(null,t.subarray(r,r+16384));return n}if(Ro)return Ro.decode(t);var i=rc(t),a=i[0];return i[1].length&&F(8),a}function xf(t,e,n){n||(n=e,e={}),"function"!=typeof n&&F(7);var r={};Jo(t,"",r,e);var i=Object.keys(r),a=i.length,s=0,o=0,l=a,u=new Array(a),h=[],c=function(){for(var t=0;t<h.length;++t)h[t]()},d=function(t,e){wi((function(){n(t,e)}))};wi((function(){d=n}));var f=function(){var t=new Y(o+22),e=s,n=o-s;o=0;for(var r=0;r<l;++r){var i=u[r];try{var a=i.c.length;ca(t,o,i,i.f,i.u,a);var h=30+i.f.length+_t(i.extra),c=o+h;t.set(i.c,c),ca(t,s,i,i.f,i.u,a,o,i.m),s+=16+h+(i.m?i.m.length:0),o=c+a}catch(t){return d(t,null)}}Zo(t,s,u.length,n,e),d(null,t)};a||f();for(var p=function(t){var e=i[t],n=r[e],l=n[0],p=n[1],m=ma(),g=l.length;m.p(l);var y=jt(e),v=y.length,_=p.comment,M=_&&jt(_),w=M&&M.length,b=_t(p.extra),x=0==p.level?0:8,I=function(n,r){if(n)c(),d(n,null);else{var i=r.length;u[t]=On(p,{size:g,crc:m.d(),c:r,f:y,m:M,u:v!=e.length||M&&_.length!=w,compression:x}),s+=30+v+b+i,o+=76+2*(v+b)+(w||0)+i,--a||f()}};if(v>65535&&I(F(11,0,1),null),x)if(g<16e4)try{I(null,zn(l,p))}catch(t){I(t,null)}else h.push(Kl(l,p,I));else I(null,l)},m=0;m<l;++m)p(m);return c}function _f(t,e){e||(e={});var n={},r=[];Jo(t,"",n,e);var i=0,a=0;for(var s in n){var o=n[s],l=o[0],u=o[1],h=0==u.level?0:8,c=(x=jt(s)).length,d=u.comment,f=d&&jt(d),p=f&&f.length,m=_t(u.extra);c>65535&&F(11);var g=h?zn(l,u):l,y=g.length,v=ma();v.p(l),r.push(On(u,{size:l.length,crc:v.d(),c:g,f:x,m:f,u:c!=s.length||f&&d.length!=p,o:i,compression:h})),i+=30+c+m+y,a+=76+2*(c+m)+(p||0)+y}for(var _=new Y(a+22),M=i,w=a-i,b=0;b<r.length;++b){var x=r[b];ca(_,x.o,x,x.f,x.u,x.c.length);var I=30+x.f.length+_t(x.extra);_.set(x.c,x.o+I),ca(_,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+I+(x.m?x.m.length:0)}return Zo(_,i,r.length,w,M),_}function Of(t,e,n){n||(n=e,e={}),"function"!=typeof n&&F(7);var r=[],i=function(){for(var t=0;t<r.length;++t)r[t]()},a={},s=function(t,e){wi((function(){n(t,e)}))};wi((function(){s=n}));for(var o=t.length-22;101010256!=re(t,o);--o)if(!o||t.length-o>65558)return s(F(13,0,1),null),i;var l=be(t,o+8);if(l){var u=l,h=re(t,o+16),c=4294967295==h;if(c){if(o=re(t,o-12),101075792!=re(t,o))return s(F(13,0,1),null),i;u=l=re(t,o+32),h=re(t,o+48)}for(var d=e&&e.filter,f=function(e){var n=sc(t,h,c),o=n[0],u=n[1],f=n[2],p=n[3],m=n[4],g=n[5],y=oc(t,g);h=m;var v=function(t,e){t?(i(),s(t,null)):(e&&(a[p]=e),--l||s(null,a))};if(!d||d({name:p,size:u,originalSize:f,compression:o}))if(o)if(8==o){var _=t.subarray(y,y+u);if(u<32e4)try{v(null,ka(_,new Y(f)))}catch(t){v(t,null)}else r.push(Xo(_,{size:f},v))}else v(F(14,"unknown compression type "+o,1),null);else v(null,De(t,y,y+u));else v(null,null)},p=0;p<u;++p)f()}else s(null,{});return i}function zf(t,e){for(var n={},r=t.length-22;101010256!=re(t,r);--r)(!r||t.length-r>65558)&&F(13);var i=be(t,r+8);if(!i)return{};var a=re(t,r+16),s=4294967295==a;s&&(r=re(t,r-12),101075792!=re(t,r)&&F(13),i=re(t,r+32),a=re(t,r+48));for(var o=e&&e.filter,l=0;l<i;++l){var u=sc(t,a,s),h=u[0],c=u[1],d=u[2],f=u[3],p=u[4],m=u[5],g=oc(t,m);a=p,(!o||o({name:f,size:c,originalSize:d,compression:h}))&&(h?8==h?n[f]=ka(t.subarray(g,g+c),new Y(d)):F(14,"unknown compression type "+h):n[f]=De(t,g,g+c))}return n}xc(cc,{AsyncCompress:()=>df,AsyncDecompress:()=>ff,AsyncDeflate:()=>Jl,AsyncGunzip:()=>Zl,AsyncGzip:()=>df,AsyncInflate:()=>Yo,AsyncUnzipInflate:()=>Tf,AsyncUnzlib:()=>ec,AsyncZipDeflate:()=>Mf,AsyncZlib:()=>hf,Compress:()=>Fo,DecodeUTF8:()=>vf,Decompress:()=>ac,Deflate:()=>et,EncodeUTF8:()=>kf,FlateErrorCode:()=>lf,Gunzip:()=>vi,Gzip:()=>Fo,Inflate:()=>je,Unzip:()=>If,UnzipInflate:()=>jf,UnzipPassThrough:()=>lc,Unzlib:()=>bi,Zip:()=>wf,ZipDeflate:()=>bf,ZipPassThrough:()=>jn,Zlib:()=>Lo,compress:()=>pf,compressSync:()=>Do,decompress:()=>gf,decompressSync:()=>yf,deflate:()=>Kl,deflateSync:()=>zn,gunzip:()=>Ql,gunzipSync:()=>ki,gzip:()=>pf,gzipSync:()=>Do,inflate:()=>Xo,inflateSync:()=>ka,strFromU8:()=>Ko,strToU8:()=>jt,unzip:()=>Of,unzipSync:()=>zf,unzlib:()=>tc,unzlibSync:()=>Mi,zip:()=>xf,zipSync:()=>_f,zlib:()=>mf,zlibSync:()=>Co});var Ol,uf,Y,ye,da,pa,ha,xn,Nl,El,Bo,fi,Sl,Pl,Eo,_n,dt,Fe,ht,la,K,Fl,Dl,Ll,Cl,pi,Pe,hi,Tn,De,lf,Rl,F,In,Qe,sa,mi,gi,So,ua,yi,Po,Bl,pt,ql,Gl,ma,qo,Ft,On,zl,di,cf,Ul,fa,ga,Vl,$l,Wl,Hl,Tt,Go,ya,Le,va,be,re,No,Z,Uo,Vo,Yl,$o,Wo,Xl,et,Jl,je,Yo,Fo,df,vi,Zl,Lo,hf,bi,ec,ac,ff,Jo,Al,Ro,nc,rc,vf,kf,ic,oc,sc,uc,_t,ca,Zo,jn,bf,Mf,wf,lc,jf,Tf,If,wi,dc=os((()=>{for(f(),Ol={},uf=function(t,e,n,r,i){var a=new Worker(Ol[e]||(Ol[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(t){var e=t.data,n=e.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,e)},a.postMessage(n,r),a},Y=Uint8Array,ye=Uint16Array,da=Uint32Array,pa=new Y([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ha=new Y([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),xn=new Y([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),El=(Nl=function(t,e){for(var n=new ye(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];var i=new da(n[30]);for(r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return[n,i]})(pa,2),Bo=El[0],fi=El[1],Bo[28]=258,fi[258]=28,Sl=Nl(ha,0),Pl=Sl[0],Eo=Sl[1],_n=new ye(32768),K=0;K<32768;++K)dt=(61680&(dt=(52428&(dt=(43690&K)>>>1|(21845&K)<<1))>>>2|(13107&dt)<<2))>>>4|(3855&dt)<<4,_n[K]=((65280&dt)>>>8|(255&dt)<<8)>>>1;for(Fe=function(t,e,n){for(var r=t.length,i=0,a=new ye(e);i<r;++i)t[i]&&++a[t[i]-1];var s,o=new ye(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;if(n){s=new ye(1<<e);var l=15-e;for(i=0;i<r;++i)if(t[i])for(var u=i<<4|t[i],h=e-t[i],c=o[t[i]-1]++<<h,d=c|(1<<h)-1;c<=d;++c)s[_n[c]>>>l]=u}else for(s=new ye(r),i=0;i<r;++i)t[i]&&(s[i]=_n[o[t[i]-1]++]>>>15-t[i]);return s},ht=new Y(288),K=0;K<144;++K)ht[K]=8;for(K=144;K<256;++K)ht[K]=9;for(K=256;K<280;++K)ht[K]=7;for(K=280;K<288;++K)ht[K]=8;for(la=new Y(32),K=0;K<32;++K)la[K]=5;Fl=Fe(ht,9,0),Dl=Fe(ht,9,1),Ll=Fe(la,5,0),Cl=Fe(la,5,1),pi=function(t){for(var e=t[0],n=1;n<t.length;++n)t[n]>e&&(e=t[n]);return e},Pe=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(7&e)&n},hi=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(7&e)},Tn=function(t){return(t+7)/8|0},De=function(t,e,n){(null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);var r=new(2==t.BYTES_PER_ELEMENT?ye:4==t.BYTES_PER_ELEMENT?da:Y)(n-e);return r.set(t.subarray(e,n)),r},lf={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Rl=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],F=function(t,e,n){var r=new Error(e||Rl[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,F),!n)throw r;return r},In=function(t,e,n){var r=t.length;if(!r||n&&n.f&&!n.l)return e||new Y(0);var i=!e||n,a=!n||n.i;n||(n={}),e||(e=new Y(3*r));var s=function(t){var n=e.length;if(t>n){var r=new Y(Math.max(2*n,t));r.set(e),e=r}},o=n.f||0,l=n.p||0,u=n.b||0,h=n.l,c=n.d,d=n.m,f=n.n,p=8*r;do{if(!h){o=Pe(t,l,1);var m=Pe(t,l+1,3);if(l+=3,!m){var g=t[(E=Tn(l)+4)-4]|t[E-3]<<8,y=E+g;if(y>r){a&&F(0);break}i&&s(u+g),e.set(t.subarray(E,y),u),n.b=u+=g,n.p=l=8*y,n.f=o;continue}if(1==m)h=Dl,c=Cl,d=9,f=5;else if(2==m){var v=Pe(t,l,31)+257,_=Pe(t,l+10,15)+4,M=v+Pe(t,l+5,31)+1;l+=14;for(var w=new Y(M),b=new Y(19),x=0;x<_;++x)b[xn[x]]=Pe(t,l+3*x,7);l+=3*_;var I=pi(b),O=(1<<I)-1,k=Fe(b,I,1);for(x=0;x<M;){var E,S=k[Pe(t,l,O)];if(l+=15&S,(E=S>>>4)<16)w[x++]=E;else{var j=0,N=0;for(16==E?(N=3+Pe(t,l,3),l+=2,j=w[x-1]):17==E?(N=3+Pe(t,l,7),l+=3):18==E&&(N=11+Pe(t,l,127),l+=7);N--;)w[x++]=j}}var T=w.subarray(0,v),P=w.subarray(v);d=pi(T),f=pi(P),h=Fe(T,d,1),c=Fe(P,f,1)}else F(1);if(l>p){a&&F(0);break}}i&&s(u+131072);for(var A=(1<<d)-1,B=(1<<f)-1,R=l;;R=l){var D=(j=h[hi(t,l)&A])>>>4;if((l+=15&j)>p){a&&F(0);break}if(j||F(2),D<256)e[u++]=D;else{if(256==D){R=l,h=null;break}var L=D-254;if(D>264){var C=pa[x=D-257];L=Pe(t,l,(1<<C)-1)+Bo[x],l+=C}var W=c[hi(t,l)&B],z=W>>>4;W||F(3),l+=15&W;P=Pl[z];if(z>3){C=ha[z];P+=hi(t,l)&(1<<C)-1,l+=C}if(l>p){a&&F(0);break}i&&s(u+131072);for(var G=u+L;u<G;u+=4)e[u]=e[u-P],e[u+1]=e[u+1-P],e[u+2]=e[u+2-P],e[u+3]=e[u+3-P];u=G}}n.l=h,n.p=R,n.b=u,n.f=o,h&&(o=1,n.m=d,n.d=c,n.n=f)}while(!o);return u==e.length?e:De(e,0,u)},Qe=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8},sa=function(t,e,n){n<<=7&e;var r=e/8|0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},mi=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,a=n.slice();if(!i)return[pt,0];if(1==i){var s=new Y(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(t,e){return t.f-e.f})),n.push({s:-1,f:25001});var o=n[0],l=n[1],u=0,h=1,c=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=i-1;)o=n[n[u].f<n[c].f?u++:c++],l=n[u!=h&&n[u].f<n[c].f?u++:c++],n[h++]={s:-1,f:o.f+l.f,l:o,r:l};var d=a[0].s;for(r=1;r<i;++r)a[r].s>d&&(d=a[r].s);var f=new ye(d+1),p=gi(n[h-1],f,0);if(p>e){r=0;var m=0,g=p-e,y=1<<g;for(a.sort((function(t,e){return f[e.s]-f[t.s]||t.f-e.f}));r<i;++r){var v=a[r].s;if(!(f[v]>e))break;m+=y-(1<<p-f[v]),f[v]=e}for(m>>>=g;m>0;){var _=a[r].s;f[_]<e?m-=1<<e-f[_]++-1:++r}for(;r>=0&&m;--r){var M=a[r].s;f[M]==e&&(--f[M],++m)}p=e}return[new Y(f),p]},gi=function(t,e,n){return-1==t.s?Math.max(gi(t.l,e,n+1),gi(t.r,e,n+1)):e[t.s]=n},So=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new ye(++e),r=0,i=t[0],a=1,s=function(t){n[r++]=t},o=1;o<=e;++o)if(t[o]==i&&o!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=t[o]}return[n.subarray(0,r),e]},ua=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},yi=function(t,e,n){var r=n.length,i=Tn(e+2);t[i]=255&r,t[i+1]=r>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<r;++a)t[i+a+4]=n[a];return 8*(i+4+r)},Po=function(t,e,n,r,i,a,s,o,l,u,h){Qe(e,h++,n),++i[256];for(var c=mi(i,15),d=c[0],f=c[1],p=mi(a,15),m=p[0],g=p[1],y=So(d),v=y[0],_=y[1],M=So(m),w=M[0],b=M[1],x=new ye(19),I=0;I<v.length;++I)x[31&v[I]]++;for(I=0;I<w.length;++I)x[31&w[I]]++;for(var O=mi(x,7),k=O[0],E=O[1],F=19;F>4&&!k[xn[F-1]];--F);var S,j,N,T,P=u+5<<3,A=ua(i,ht)+ua(a,la)+s,B=ua(i,d)+ua(a,m)+s+14+3*F+ua(x,k)+(2*x[16]+3*x[17]+7*x[18]);if(P<=A&&P<=B)return yi(e,h,t.subarray(l,l+u));if(Qe(e,h,1+(B<A)),h+=2,B<A){S=Fe(d,f,0),j=d,N=Fe(m,g,0),T=m;var R=Fe(k,E,0);Qe(e,h,_-257),Qe(e,h+5,b-1),Qe(e,h+10,F-4),h+=14;for(I=0;I<F;++I)Qe(e,h+3*I,k[xn[I]]);h+=3*F;for(var D=[v,w],L=0;L<2;++L){var C=D[L];for(I=0;I<C.length;++I){var W=31&C[I];Qe(e,h,R[W]),h+=k[W],W>15&&(Qe(e,h,C[I]>>>5&127),h+=C[I]>>>12)}}}else S=Fl,j=ht,N=Ll,T=la;for(I=0;I<o;++I)if(r[I]>255){W=r[I]>>>18&31;sa(e,h,S[W+257]),h+=j[W+257],W>7&&(Qe(e,h,r[I]>>>23&31),h+=pa[W]);var z=31&r[I];sa(e,h,N[z]),h+=T[z],z>3&&(sa(e,h,r[I]>>>5&8191),h+=ha[z])}else sa(e,h,S[r[I]]),h+=j[r[I]];return sa(e,h,S[256]),h+j[256]},Bl=new da([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),pt=new Y(0),ql=function(t,e,n,r,i,a){var s=t.length,o=new Y(r+s+5*(1+Math.ceil(s/7e3))+i),l=o.subarray(r,o.length-i),u=0;if(!e||s<8)for(var h=0;h<=s;h+=65535){var c=h+65535;c>=s&&(l[u>>3]=a),u=yi(l,u+1,t.subarray(h,c))}else{for(var d=Bl[e-1],f=d>>>13,p=8191&d,m=(1<<n)-1,g=new ye(32768),y=new ye(m+1),v=Math.ceil(n/3),_=2*v,M=function(e){return(t[e]^t[e+1]<<v^t[e+2]<<_)&m},w=new da(25e3),b=new ye(288),x=new ye(32),I=0,O=0,k=(h=0,0),E=0,F=0;h<s;++h){var S=M(h),j=32767&h,N=y[S];if(g[j]=N,y[S]=j,E<=h){var T=s-h;if((I>7e3||k>24576)&&T>423){u=Po(t,l,0,w,b,x,O,k,F,h-F,u),k=I=O=0,F=h;for(var P=0;P<286;++P)b[P]=0;for(P=0;P<30;++P)x[P]=0}var A=2,B=0,R=p,D=j-N&32767;if(T>2&&S==M(h-D))for(var L=Math.min(f,T)-1,C=Math.min(32767,h),W=Math.min(258,T);D<=C&&--R&&j!=N;){if(t[h+A]==t[h+A-D]){for(var z=0;z<W&&t[h+z]==t[h+z-D];++z);if(z>A){if(A=z,B=D,z>L)break;var G=Math.min(D,z-2),U=0;for(P=0;P<G;++P){var $=h-D+P+32768&32767,J=$-g[$]+32768&32767;J>U&&(U=J,N=$)}}}D+=(j=N)-(N=g[j])+32768&32767}if(B){w[k++]=268435456|fi[A]<<18|Eo[B];var H=31&fi[A],q=31&Eo[B];O+=pa[H]+ha[q],++b[257+H],++x[q],E=h+A,++I}else w[k++]=t[h],++b[t[h]]}}u=Po(t,l,a,w,b,x,O,k,F,h-F,u),!a&&7&u&&(u=yi(l,u+1,pt))}return De(o,0,r+Tn(u)+i)},Gl=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(1&n&&-306674912)^n>>>1;t[e]=n}return t}(),ma=function(){var t=-1;return{p:function(e){for(var n=t,r=0;r<e.length;++r)n=Gl[255&n^e[r]]^n>>>8;t=n},d:function(){return~t}}},qo=function(){var t=1,e=0;return{p:function(n){for(var r=t,i=e,a=0|n.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}t=r,e=i},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(e%=65521))<<8|e>>>8}}},Ft=function(t,e,n,r,i){return ql(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,r,!i)},On=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n},zl=function(t,e,n){for(var r=t(),i=t.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var o=r[s],l=a[s];if("function"==typeof o){e+=";"+l+"=";var u=o.toString();if(o.prototype)if(-1!=u.indexOf("[native code]")){var h=u.indexOf(" ",8)+1;e+=u.slice(h,u.indexOf("(",h))}else for(var c in e+=u,o.prototype)e+=";"+l+".prototype."+c+"="+o.prototype[c].toString();else e+=u}else n[l]=o}return[e,n]},di=[],cf=function(t){var e=[];for(var n in t)t[n].buffer&&e.push((t[n]=new t[n].constructor(t[n])).buffer);return e},Ul=function(t,e,n,r){var i;if(!di[n]){for(var a="",s={},o=t.length-1,l=0;l<o;++l)a=(i=zl(t[l],a,s))[0],s=i[1];di[n]=zl(t[o],a,s)}var u=On({},di[n][1]);return uf(di[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",n,u,cf(u),r)},fa=function(){return[Y,ye,da,pa,ha,xn,Bo,Pl,Dl,Cl,_n,Rl,Fe,pi,Pe,hi,Tn,De,F,In,ka,Tt,Go]},ga=function(){return[Y,ye,da,pa,ha,xn,fi,Eo,Fl,ht,Ll,la,_n,Bl,pt,Fe,Qe,sa,mi,gi,So,ua,yi,Po,Tn,De,ql,Ft,zn,Tt]},Vl=function(){return[Uo,$o,Z,ma,Gl]},$l=function(){return[Vo,Yl]},Wl=function(){return[Wo,Z,qo]},Hl=function(){return[Xl]},Tt=function(t){return postMessage(t,[t.buffer])},Go=function(t){return t&&t.size&&new Y(t.size)},ya=function(t,e,n,r,i,a){var s=Ul(n,r,i,(function(t,e){s.terminate(),a(t,e)}));return s.postMessage([t,e],e.consume?[t.buffer]:[]),function(){s.terminate()}},Le=function(t){return t.ondata=function(t,e){return postMessage([t,e],[t.buffer])},function(e){return t.push(e.data[0],e.data[1])}},va=function(t,e,n,r,i){var a,s=Ul(t,r,i,(function(t,n){t?(s.terminate(),e.ondata.call(e,t)):(n[1]&&s.terminate(),e.ondata.call(e,t,n[0],n[1]))}));s.postMessage(n),e.push=function(t,n){e.ondata||F(5),a&&e.ondata(F(4,0,1),null,!!n),s.postMessage([t,a=n],[t.buffer])},e.terminate=function(){s.terminate()}},be=function(t,e){return t[e]|t[e+1]<<8},re=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},No=function(t,e){return re(t,e)+4294967296*re(t,e+4)},Z=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},Uo=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&Z(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var r=0;r<=n.length;++r)t[r+10]=n.charCodeAt(r)}},Vo=function(t){(31!=t[0]||139!=t[1]||8!=t[2])&&F(6,"invalid gzip data");var e=t[3],n=10;4&e&&(n+=t[10]|2+(t[11]<<8));for(var r=(e>>3&1)+(e>>4&1);r>0;r-=!t[n++]);return n+(2&e)},Yl=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},$o=function(t){return 10+(t.filename&&t.filename.length+1||0)},Wo=function(t,e){var n=e.level,r=0==n?0:n<6?1:9==n?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)},Xl=function(t){(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&F(6,"invalid zlib data"),32&t[1]&&F(6,"invalid zlib data: preset dictionaries not supported")},et=function(){function t(t,e){!e&&"function"==typeof t&&(e=t,t={}),this.ondata=e,this.o=t||{}}return t.prototype.p=function(t,e){this.ondata(Ft(t,this.o,0,0,!e),e)},t.prototype.push=function(t,e){this.ondata||F(5),this.d&&F(4),this.d=e,this.p(t,e||!1)},t}(),Jl=function(t,e){va([ga,function(){return[Le,et]}],this,Ho.call(this,t,e),(function(t){var e=new et(t.data);onmessage=Le(e)}),6)},je=function(){function t(t){this.s={},this.p=new Y(0),this.ondata=t}return t.prototype.e=function(t){this.ondata||F(5),this.d&&F(4);var e=this.p.length,n=new Y(e+t.length);n.set(this.p),n.set(t,e),this.p=n},t.prototype.c=function(t){this.d=this.s.i=t||!1;var e=this.s.b,n=In(this.p,this.o,this.s);this.ondata(De(n,e,this.s.b),this.d),this.o=De(n,this.s.b-32768),this.s.b=this.o.length,this.p=De(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(t,e){this.e(t),this.c(e)},t}(),Yo=function(t){this.ondata=t,va([fa,function(){return[Le,je]}],this,0,(function(){var t=new je;onmessage=Le(t)}),7)},Fo=function(){function t(t,e){this.c=ma(),this.l=0,this.v=1,et.call(this,t,e)}return t.prototype.push=function(t,e){et.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t),this.l+=t.length;var n=Ft(t,this.o,this.v&&$o(this.o),e&&8,!e);this.v&&(Uo(n,this.o),this.v=0),e&&(Z(n,n.length-8,this.c.d()),Z(n,n.length-4,this.l)),this.ondata(n,e)},t}(),df=function(t,e){va([ga,Vl,function(){return[Le,et,Fo]}],this,Ho.call(this,t,e),(function(t){var e=new Fo(t.data);onmessage=Le(e)}),8)},vi=function(){function t(t){this.v=1,je.call(this,t)}return t.prototype.push=function(t,e){if(je.prototype.e.call(this,t),this.v){var n=this.p.length>3?Vo(this.p):4;if(n>=this.p.length&&!e)return;this.p=this.p.subarray(n),this.v=0}e&&(this.p.length<8&&F(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),je.prototype.c.call(this,e)},t}(),Zl=function(t){this.ondata=t,va([fa,$l,function(){return[Le,je,vi]}],this,0,(function(){var t=new vi;onmessage=Le(t)}),9)},Lo=function(){function t(t,e){this.c=qo(),this.v=1,et.call(this,t,e)}return t.prototype.push=function(t,e){et.prototype.push.call(this,t,e)},t.prototype.p=function(t,e){this.c.p(t);var n=Ft(t,this.o,this.v&&2,e&&4,!e);this.v&&(Wo(n,this.o),this.v=0),e&&Z(n,n.length-4,this.c.d()),this.ondata(n,e)},t}(),hf=function(t,e){va([ga,Wl,function(){return[Le,et,Lo]}],this,Ho.call(this,t,e),(function(t){var e=new Lo(t.data);onmessage=Le(e)}),10)},bi=function(){function t(t){this.v=1,je.call(this,t)}return t.prototype.push=function(t,e){if(je.prototype.e.call(this,t),this.v){if(this.p.length<2&&!e)return;this.p=this.p.subarray(2),this.v=0}e&&(this.p.length<4&&F(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),je.prototype.c.call(this,e)},t}(),ec=function(t){this.ondata=t,va([fa,Hl,function(){return[Le,je,bi]}],this,0,(function(){var t=new bi;onmessage=Le(t)}),11)},ac=function(){function t(t){this.G=vi,this.I=je,this.Z=bi,this.ondata=t}return t.prototype.push=function(t,e){if(this.ondata||F(5),this.s)this.s.push(t,e);else{if(this.p&&this.p.length){var n=new Y(this.p.length+t.length);n.set(this.p),n.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var r=this,i=function(){r.ondata.apply(r,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,e),this.p=null}}},t}(),ff=function(){function t(t){this.G=Zl,this.I=Yo,this.Z=ec,this.ondata=t}return t.prototype.push=function(t,e){ac.prototype.push.call(this,t,e)},t}(),Jo=function(t,e,n,r){for(var i in t){var a=t[i],s=e+i,o=r;Array.isArray(a)&&(o=On(r,a[1]),a=a[0]),a instanceof Y?n[s]=[a,o]:(n[s+="/"]=[new Y(0),o],Jo(a,s,n,r))}},Al="undefined"!=typeof TextEncoder&&new TextEncoder,Ro="undefined"!=typeof TextDecoder&&new TextDecoder,nc=0;try{Ro.decode(pt,{stream:!0}),nc=1}catch(t){}rc=function(t){for(var e="",n=0;;){var r=t[n++],i=(r>127)+(r>223)+(r>239);if(n+i>t.length)return[e,De(t,n-1)];i?3==i?(r=((15&r)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,e+=String.fromCharCode(55296|r>>10,56320|1023&r)):e+=1&i?String.fromCharCode((31&r)<<6|63&t[n++]):String.fromCharCode((15&r)<<12|(63&t[n++])<<6|63&t[n++]):e+=String.fromCharCode(r)}},vf=function(){function t(t){this.ondata=t,nc?this.t=new TextDecoder:this.p=pt}return t.prototype.push=function(t,e){if(this.ondata||F(5),e=!!e,this.t)return this.ondata(this.t.decode(t,{stream:!0}),e),void(e&&(this.t.decode().length&&F(8),this.t=null));this.p||F(4);var n=new Y(this.p.length+t.length);n.set(this.p),n.set(t,this.p.length);var r=rc(n),i=r[0],a=r[1];e?(a.length&&F(8),this.p=null):this.p=a,this.ondata(i,e)},t}(),kf=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,e){this.ondata||F(5),this.d&&F(4),this.ondata(jt(t),this.d=e||!1)},t}(),ic=function(t){return 1==t?3:t<6?2:9==t?1:0},oc=function(t,e){return e+30+be(t,e+26)+be(t,e+28)},sc=function(t,e,n){var r=be(t,e+28),i=Ko(t.subarray(e+46,e+46+r),!(2048&be(t,e+8))),a=e+46+r,s=re(t,e+20),o=n&&4294967295==s?uc(t,a):[s,re(t,e+24),re(t,e+42)],l=o[0],u=o[1],h=o[2];return[be(t,e+10),l,u,i,a+be(t,e+30)+be(t,e+32),h]},uc=function(t,e){for(;1!=be(t,e);e+=4+be(t,e+2));return[No(t,e+12),No(t,e+4),No(t,e+20)]},_t=function(t){var e=0;if(t)for(var n in t){var r=t[n].length;r>65535&&F(9),e+=r+4}return e},ca=function(t,e,n,r,i,a,s,o){var l=r.length,u=n.extra,h=o&&o.length,c=_t(u);Z(t,e,null!=s?33639248:67324752),e+=4,null!=s&&(t[e++]=20,t[e++]=n.os),t[e]=20,e+=2,t[e++]=n.flag<<1|(null==a&&8),t[e++]=i&&8,t[e++]=255&n.compression,t[e++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),f=d.getFullYear()-1980;if((f<0||f>119)&&F(10),Z(t,e,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),e+=4,null!=a&&(Z(t,e,n.crc),Z(t,e+4,a),Z(t,e+8,n.size)),Z(t,e+12,l),Z(t,e+14,c),e+=16,null!=s&&(Z(t,e,h),Z(t,e+6,n.attrs),Z(t,e+10,s),e+=14),t.set(r,e),e+=l,c)for(var p in u){var m=u[p],g=m.length;Z(t,e,+p),Z(t,e+2,g),t.set(m,e+4),e+=4+g}return h&&(t.set(o,e),e+=h),e},Zo=function(t,e,n,r,i){Z(t,e,101010256),Z(t,e+8,n),Z(t,e+10,n),Z(t,e+12,r),Z(t,e+16,i)},jn=function(){function t(t){this.filename=t,this.c=ma(),this.size=0,this.compression=0}return t.prototype.process=function(t,e){this.ondata(null,t,e)},t.prototype.push=function(t,e){this.ondata||F(5),this.c.p(t),this.size+=t.length,e&&(this.crc=this.c.d()),this.process(t,e||!1)},t}(),bf=function(){function t(t,e){var n=this;e||(e={}),jn.call(this,t),this.d=new et(e,(function(t,e){n.ondata(null,t,e)})),this.compression=8,this.flag=ic(e.level)}return t.prototype.process=function(t,e){try{this.d.push(t,e)}catch(t){this.ondata(t,null,e)}},t.prototype.push=function(t,e){jn.prototype.push.call(this,t,e)},t}(),Mf=function(){function t(t,e){var n=this;e||(e={}),jn.call(this,t),this.d=new Jl(e,(function(t,e,r){n.ondata(t,e,r)})),this.compression=8,this.flag=ic(e.level),this.terminate=this.d.terminate}return t.prototype.process=function(t,e){this.d.push(t,e)},t.prototype.push=function(t,e){jn.prototype.push.call(this,t,e)},t}(),wf=function(){function t(t){this.ondata=t,this.u=[],this.d=1}return t.prototype.add=function(t){var e=this;if(this.ondata||F(5),2&this.d)this.ondata(F(4+8*(1&this.d),0,1),null,!1);else{var n=jt(t.filename),r=n.length,i=t.comment,a=i&&jt(i),s=r!=t.filename.length||a&&i.length!=a.length,o=r+_t(t.extra)+30;r>65535&&this.ondata(F(11,0,1),null,!1);var l=new Y(o);ca(l,0,t,n,s);var u=[l],h=function(){for(var t=0,n=u;t<n.length;t++){var r=n[t];e.ondata(null,r,!1)}u=[]},c=this.d;this.d=0;var d=this.u.length,f=On(t,{f:n,u:s,o:a,t:function(){t.terminate&&t.terminate()},r:function(){if(h(),c){var t=e.u[d+1];t?t.r():e.d=1}c=1}}),p=0;t.ondata=function(n,r,i){if(n)e.ondata(n,r,i),e.terminate();else if(p+=r.length,u.push(r),i){var a=new Y(16);Z(a,0,134695760),Z(a,4,t.crc),Z(a,8,p),Z(a,12,t.size),u.push(a),f.c=p,f.b=o+p+16,f.crc=t.crc,f.size=t.size,c&&f.r(),c=1}else c&&h()},this.u.push(f)}},t.prototype.end=function(){var t=this;2&this.d?this.ondata(F(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&t.d&&(t.u.splice(-1,1),t.e())},t:function(){}}),this.d=3)},t.prototype.e=function(){for(var t=0,e=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+_t(l.extra)+(l.o?l.o.length:0)}for(var a=new Y(n+22),s=0,o=this.u;s<o.length;s++){var l=o[s];ca(a,t,l,l.f,l.u,l.c,e,l.o),t+=46+l.f.length+_t(l.extra)+(l.o?l.o.length:0),e+=l.b}Zo(a,t,this.u.length,n,e),this.ondata(null,a,!0),this.d=2},t.prototype.terminate=function(){for(var t=0,e=this.u;t<e.length;t++){e[t].t()}this.d=2},t}(),lc=function(){function t(){}return t.prototype.push=function(t,e){this.ondata(null,t,e)},t.compression=0,t}(),jf=function(){function t(){var t=this;this.i=new je((function(e,n){t.ondata(null,e,n)}))}return t.prototype.push=function(t,e){try{this.i.push(t,e)}catch(t){this.ondata(t,null,e)}},t.compression=8,t}(),Tf=function(){function t(t,e){var n=this;e<32e4?this.i=new je((function(t,e){n.ondata(null,t,e)})):(this.i=new Yo((function(t,e,r){n.ondata(t,e,r)})),this.terminate=this.i.terminate)}return t.prototype.push=function(t,e){this.i.terminate&&(t=De(t,0)),this.i.push(t,e)},t.compression=8,t}(),If=function(){function t(t){this.onfile=t,this.k=[],this.o={0:lc},this.p=pt}return t.prototype.push=function(t,e){var n=this;if(this.onfile||F(5),this.p||F(4),this.c>0){var r=Math.min(this.c,t.length),i=t.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(t=t.subarray(r)).length)return this.push(t,e)}else{var a=0,s=0,o=void 0,l=void 0;this.p.length?t.length?((l=new Y(this.p.length+t.length)).set(this.p),l.set(t,this.p.length)):l=this.p:l=t;for(var u=l.length,h=this.c,c=h&&this.d,d=function(){var t,e=re(l,s);if(67324752==e){a=1,o=s,f.d=null,f.c=0;var r=be(l,s+6),i=be(l,s+8),c=2048&r,d=8&r,p=be(l,s+26),m=be(l,s+28);if(u>s+30+p+m){var g=[];f.k.unshift(g),a=2;var y=re(l,s+18),v=re(l,s+22),_=Ko(l.subarray(s+30,s+=30+p),!c);4294967295==y?(t=d?[-2]:uc(l,s),y=t[0],v=t[1]):d&&(y=-1),s+=m,f.c=y;var M,w={name:_,compression:i,start:function(){if(w.ondata||F(5),y){var t=n.o[i];t||w.ondata(F(14,"unknown compression type "+i,1),null,!1),(M=y<0?new t(_):new t(_,y,v)).ondata=function(t,e,n){w.ondata(t,e,n)};for(var e=0,r=g;e<r.length;e++){var a=r[e];M.push(a,!1)}n.k[0]==g&&n.c?n.d=M:M.push(pt,!0)}else w.ondata(null,pt,!0)},terminate:function(){M&&M.terminate&&M.terminate()}};y>=0&&(w.size=y,w.originalSize=v),f.onfile(w)}return"break"}if(h){if(134695760==e)return o=s+=12+(-2==h&&8),a=3,f.c=0,"break";if(33639248==e)return o=s-=4,a=3,f.c=0,"break"}},f=this;s<u-4;++s){if("break"===d())break}if(this.p=pt,h<0){var p=a?l.subarray(0,o-12-(-2==h&&8)-(134695760==re(l,o-16)&&4)):l.subarray(0,s);c?c.push(p,!!a):this.k[+(2==a)].push(p)}if(2&a)return this.push(l.subarray(s),e);this.p=l.subarray(s)}e&&(this.c&&F(13),this.p=null)},t.prototype.register=function(t){this.o[t.compression]=t},t}(),wi="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()}}));f();var mc=Ti(ss(),1);f(),f(),f();var lu=Ti(uu(),1);f();var Zi=class{constructor({origin:t,destination:e,vortex:n,elevationDelta:r=0,distance:i=0,angle:a=0}){let s,o;if(m(this,"origin"),m(this,"destination"),m(this,"vortex"),m(this,"distance"),m(this,"angle"),m(this,"weight"),this.origin=t,this.destination=e,this.vortex=n,this.distance=i,this.angle=a,n?(this.distance=0,this.angle=0,s=void 0!==n.weight&&n.weight>0?n.weight:"elevator"===n.type?2e3:1e3,o=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*o+s):(s=e.weight&&e.weight>=0?e.weight:0,o=e.multiplier&&e.multiplier>=1?e.multiplier:1,this.weight=this.distance*o+s),isNaN(this.angle))throw new Error("nan angle")}},Sr=Zi;f();var Qi="mi-debug",nm={loggingEnabled(){var t;return"development"===x.env.NODE_ENV||"dev"===x.env.NODE_ENV||"test"===x.env.NODE_ENV||"true"===(null==(t=globalThis.sessionStorage)?void 0:t.getItem(Qi))},log(...t){this.loggingEnabled()&&console.log("[MappedInJS]",...t)},warn(...t){this.loggingEnabled()&&console.warn("[MappedInJS]",...t)},error(...t){this.loggingEnabled()&&console.error("[MappedInJS]",...t)},assert(...t){this.loggingEnabled()&&console.assert(...t)},time(t){this.loggingEnabled()&&console.time(t)},timeEnd(t){this.loggingEnabled()&&console.timeEnd(t)}},S=nm;function rm(t){if(t.scale||t.x_scale)return 1/(t.scale||t.x_scale||1);try{if(!t.georeference)throw new Error(`map ${t.name||t.shortName||t.id} does not have a georeference field`);if(t.georeference.length<3)throw new Error(`map ${t.name||t.shortName||t.id} has less than 3 georeference points, we require at least 3 for proper map scaling`);let e=t.georeference[0],n=t.georeference[2],r=(0,lu.getDistance)({latitude:e.target.x,longitude:e.target.y},{latitude:n.target.x,longitude:n.target.y}),i=e.control.x-n.control.x,a=e.control.y-n.control.y;return Math.sqrt(i*i+a*a)/r}catch(t){return S.error(t),1}}function im(t,e){let n=t.x-e.x,r=t.y-e.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}var eo=class{constructor({nodes:t,vortexes:e,maps:n,showVortexNames:r=!1}){m(this,"edges"),m(this,"nodesById"),m(this,"mapsById"),this.edges={},this.mapsById=n.map((t=>Q(G({},t),{_scale:rm(t)}))).reduce(((t,e)=>(t[e.id]=e,t)),{});let i=t.filter((t=>!!this.mapsById[t.map])).map((t=>Q(G({},t),{paths:t.paths?t.paths.filter((({map:e})=>e===t.map)):[]})));this.nodesById=i.reduce(((t,e)=>(t[e.id]=e,t)),{});for(let t in this.nodesById)this.nodesById.hasOwnProperty(t)&&(this.nodesById[t].paths=this.nodesById[t].paths.filter((({node:t})=>!!this.nodesById[t])));let a=e.map((t=>Q(G({},t),{name:r?t.name:t.type,nodes:t.nodes?t.nodes.filter((t=>!!this.nodesById[t])):[]})));i.forEach((t=>{this.edges[t.id]=t.paths.map((({node:e})=>{let n=this.nodesById[e];return new Sr({angle:im(t,n),destination:n,distance:this.getDistance(t,n),origin:t})}))})),a.forEach((t=>{if(null==t.nodes||0===t.nodes.length)return;let e=0;for(;e<t.nodes.length-1;){let n=this.nodesById[t.nodes[e]];if(e++,null==n)continue;let r=e;for(;r<t.nodes.length;){let e=this.nodesById[t.nodes[r]];if(r++,null==e)continue;let i=this.mapsById[n.map].elevation||0,a=this.mapsById[e.map].elevation||0,s=Math.abs(i-a);this.edges[n.id].push(new Sr({destination:e,elevationDelta:s,origin:n,vortex:t})),this.edges[e.id].push(new Sr({destination:n,elevationDelta:s,origin:e,vortex:t}))}}}))}aStar(t,e,n){let r=t.map((t=>this.nodesById[t])).filter((t=>t)),i=e.map((t=>this.nodesById[t])).filter((t=>t));if(0===r.length||0===i.length)return[];let a=[],s={},o={};for(r.forEach((t=>{let e=this.getShortestEuclideanDistance(t,i);a.push({origin:t,priority:e}),s[t.id]=null,o[t.id]=0})),a.sort(((t,e)=>t.priority-e.priority));a.length>0;){let t=a[0];if(i.includes(t.origin)){let e=[],n=s[t.origin.id];for(;null!=n;){e.push(n);let t=s[n.origin.id];n=null!=t?t:null}return e.reverse()}for(let e of this.edges[t.origin.id]){let r=e.vortex&&!1===e.vortex.accessible;if(n&&(r||!1===e.origin.accessible||!1===e.destination.accessible))continue;let l=o[t.origin.id]+e.weight;if(null==o[e.destination.id]||l<o[e.destination.id]){o[e.destination.id]=l;let t=l+this.getShortestEuclideanDistance(e.destination,i);a.push({origin:e.destination,priority:t}),s[e.destination.id]=e}}a.splice(0,1),a.sort(((t,e)=>t.priority-e.priority))}return[]}getDistance(t,e){let n,r=t.x-e.x,i=t.y-e.y,a=r*r+i*i;return n=null==this.mapsById[t.map]?1:this.mapsById[t.map]._scale,Math.sqrt(a)/n}getShortestEuclideanDistance(t,e){return e.reduce(((e,n)=>{let r=this.getDistance(t,n);return Math.min(e,r)}),Number.MAX_VALUE)}},to=eo;function om(t){switch(t){case"down":case"up":return`${t} `;default:return""}}f(),f();var ao=class{constructor({origin:t,action:e,distance:n,atLocation:r,instruction:i}){m(this,"node"),m(this,"instruction"),m(this,"action"),m(this,"atLocation"),m(this,"type"),m(this,"distance",0),this.node=t,this.action=e,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=e&&"Departure"===e.type?this.instruction=null!=r?`Depart from ${r.name}`:"Depart from current location":null!=e&&"Arrival"===e.type?this.instruction=null!=r?`Arrive at ${r.name}`:"Arrive at destination":null!=e&&"TakeVortex"===e.type?this.instruction=`Take ${r&&r.name} ${om(e.direction)}to ${e.toMap.name}`:null!=e&&"ExitVortex"===e.type?this.instruction=`Exit ${r&&r.name} at ${e.toMap.name}`:null!=e&&"Right"===e.bearing?this.instruction="Turn right":null!=e&&"SlightRight"===e.bearing?this.instruction="Turn slightly right":null!=e&&"Straight"===e.bearing?this.instruction="Head straight":null!=e&&"SlightLeft"===e.bearing?this.instruction="Turn slightly left":null!=e&&"Left"===e.bearing&&(this.instruction="Turn left"),null!=e&&"Turn"===e.type&&r&&(this.instruction+=` at ${r.name}`))}},ft=ao,Pr=.1*Math.PI;function Fr(t,e){return((e-t+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}var no=class{constructor({locations:t,nodes:e,vortexes:n,maps:r,showVortexNames:i}){m(this,"graph"),m(this,"locationsByNodeId"),this.graph=new to({maps:r,nodes:e,showVortexNames:i,vortexes:n}),this.locationsByNodeId=t.reduce(((t,e)=>(e.nodes&&e.nodes.forEach((n=>{t[n.node]=e})),e.polygons&&e.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{t[n]=e}))})),t)),{})}getClosestLocationInRay(t,e=.5*Math.PI,n=10){let r=0,i=0,a=t;for(;Math.abs(r)<e&&i<n;){let t=this.graph.edges[a.destination.id],s=null,o=0;for(let e of t)if(e.distance>0)if(null!=s){let t=-Fr(a.angle,e.angle);Math.abs(t)<Math.abs(o)&&(s=e,o=t)}else s=e,o=-Fr(a.angle,e.angle);if(null==s)return null;{if(Math.abs(o)>=e||(r+=o,i+=s.distance,Math.abs(r)>=e||i>n))return null;let t=this.locationsByNodeId[s.destination.id];if(null!=t)return t;a=s}}return null}getDirections({originIds:t,destinationNodeIds:e,accessible:n,departFrom:r,arriveAt:i}){let a=this.graph.aStar(t,e,n);if(0===a.length)return{distance:0,instructions:[new ft({distance:0,instruction:"No Valid Path Available"})],path:[]};let s=0,o=new Array(a.length+1);for(let t=0;t<a.length;t++)o[t]=a[t].origin;o[a.length]=a[a.length-1].destination;let l=[],u=null,h=null,c=0,d=0;for(let t=0;t<a.length;t++){let e=a[t],n=e.origin,o=e.destination;if(s+=e.distance,c+=(null==h?void 0:h.distance)||0,0===t&&l.push(new ft({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=e.vortex){let t=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=t.elevation&&null!=r.elevation){let e=t.elevation-r.elevation;e>0?i="down":e<0&&(i="up")}l.push(new ft({action:{direction:i,fromMap:t,toMap:r,type:"TakeVortex"},atLocation:e.vortex,distance:c,origin:n})),d+=c,c=0}else if(null!=u&&null!=h)if(null!=h.vortex){let t=this.graph.mapsById[u.map],e=this.graph.mapsById[h.destination.map];l.push(new ft({action:{fromMap:t,toMap:e,type:"ExitVortex"},atLocation:h.vortex,distance:c,origin:n})),d+=c,c=0}else{let t=this.graph.edges[n.id].filter((t=>t.destination!==u&&t.destination!==e.destination));if(t.length>0){let r=-Fr(h.angle,e.angle),i=t.reduce(((t,n)=>{let r=-Fr(e.angle,n.angle);return Math.min(t,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Pr||Math.abs(i)<=Pr){let t;t=r<=-Math.PI/4?"Right":r<=-Pr?"SlightRight":r<=Pr?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let e=this.locationsByNodeId[n.id];if(e||(e=this.getClosestLocationInRay(h,.5*Math.PI,10)),null!=e){let r=new ft({action:{bearing:t,referencePosition:"At",type:"Turn"},atLocation:e,distance:c,origin:n});r.type=t,l.push(r)}else l.push(new ft({action:{bearing:t,referencePosition:"At",type:"Turn"},distance:c,origin:n}));d+=c,c=0}}}t===a.length-1&&(l.push(new ft({action:{type:"Arrival"},atLocation:i,distance:s-d<0?0:s-d,origin:e.destination})),d+=c,c=0),u=n,h=e}let f=[],p=null;for(let t=l.length-1;t>=0;t--){let e=l[t],{action:n}=e;n&&"TakeVortex"===n.type?(p=e.node,f.unshift(e)):n&&"Turn"===n.type&&null!=p?this.graph.getDistance(e.node,p)>5&&f.unshift(e):f.unshift(e)}return{distance:s,instructions:f,path:o}}},ro=no;function du(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return pu(this.cover(e,n),e,n,t)}function pu(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,s,o,l,u,h,c,d,f=t._root,p={data:r},m=t._x0,g=t._y0,y=t._x1,v=t._y1;if(!f)return t._root=p,t;for(;f.length;)if((u=e>=(a=(m+y)/2))?m=a:y=a,(h=n>=(s=(g+v)/2))?g=s:v=s,i=f,!(f=f[c=h<<1|u]))return i[c]=p,t;if(o=+t._x.call(null,f.data),l=+t._y.call(null,f.data),e===o&&n===l)return p.next=f,i?i[c]=p:t._root=p,t;do{i=i?i[c]=new Array(4):t._root=new Array(4),(u=e>=(a=(m+y)/2))?m=a:y=a,(h=n>=(s=(g+v)/2))?g=s:v=s}while((c=h<<1|u)==(d=(l>=s)<<1|o>=a));return i[d]=f,i[c]=p,t}function hu(t){var e,n,r,i,a=t.length,s=new Array(a),o=new Array(a),l=1/0,u=1/0,h=-1/0,c=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(s[n]=r,o[n]=i,r<l&&(l=r),r>h&&(h=r),i<u&&(u=i),i>c&&(c=i));if(l>h||u>c)return this;for(this.cover(l,u).cover(h,c),n=0;n<a;++n)pu(this,s[n],o[n],t[n]);return this}function mu(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var s,o,l=i-n||1,u=this._root;n>t||t>=i||r>e||e>=a;)switch(o=(e<r)<<1|t<n,s=new Array(4),s[o]=u,u=s,l*=2,o){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function fu(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t}function gu(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ue(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function yu(t,e,n){var r,i,a,s,o,l,u,h=this._x0,c=this._y0,d=this._x1,f=this._y1,p=[],m=this._root;for(m&&p.push(new ue(m,h,c,d,f)),null==n?n=1/0:(h=t-n,c=e-n,d=t+n,f=e+n,n*=n);l=p.pop();)if(!(!(m=l.node)||(i=l.x0)>d||(a=l.y0)>f||(s=l.x1)<h||(o=l.y1)<c))if(m.length){var g=(i+s)/2,y=(a+o)/2;p.push(new ue(m[3],g,y,s,o),new ue(m[2],i,y,g,o),new ue(m[1],g,a,s,y),new ue(m[0],i,a,g,y)),(u=(e>=y)<<1|t>=g)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=l)}else{var v=t-+this._x.call(null,m.data),_=e-+this._y.call(null,m.data),M=v*v+_*_;if(M<n){var w=Math.sqrt(n=M);h=t-w,c=e-w,d=t+w,f=e+w,r=m.data}}return r}function vu(t){if(isNaN(a=+this._x.call(null,t))||isNaN(s=+this._y.call(null,t)))return this;var e,n,r,i,a,s,o,l,u,h,c,d,f=this._root,p=this._x0,m=this._y0,g=this._x1,y=this._y1;if(!f)return this;if(f.length)for(;;){if((u=a>=(o=(p+g)/2))?p=o:g=o,(h=s>=(l=(m+y)/2))?m=l:y=l,e=f,!(f=f[c=h<<1|u]))return this;if(!f.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(n=e,d=c)}for(;f.data!==t;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):e?(i?e[c]=i:delete e[c],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)}function ku(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function bu(){return this._root}function Mu(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t}function wu(t){var e,n,r,i,a,s,o=[],l=this._root;for(l&&o.push(new ue(l,this._x0,this._y0,this._x1,this._y1));e=o.pop();)if(!t(l=e.node,r=e.x0,i=e.y0,a=e.x1,s=e.y1)&&l.length){var u=(r+a)/2,h=(i+s)/2;(n=l[3])&&o.push(new ue(n,u,h,a,s)),(n=l[2])&&o.push(new ue(n,r,h,u,s)),(n=l[1])&&o.push(new ue(n,u,i,a,h)),(n=l[0])&&o.push(new ue(n,r,i,u,h))}return this}function xu(t){var e,n=[],r=[];for(this._root&&n.push(new ue(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,s=e.x0,o=e.y0,l=e.x1,u=e.y1,h=(s+l)/2,c=(o+u)/2;(a=i[0])&&n.push(new ue(a,s,o,h,c)),(a=i[1])&&n.push(new ue(a,h,o,l,c)),(a=i[2])&&n.push(new ue(a,s,c,h,u)),(a=i[3])&&n.push(new ue(a,h,c,l,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this}function _u(t){return t[0]}function ju(t){return arguments.length?(this._x=t,this):this._x}function Tu(t){return t[1]}function Iu(t){return arguments.length?(this._y=t,this):this._y}function Oa(t,e,n){var r=new io(null==e?_u:e,null==n?Tu:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function io(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ou(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f(),f();var ke=Oa.prototype=io.prototype;ke.copy=function(){var t,e,n=new io(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Ou(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Ou(e));return n},ke.add=du,ke.addAll=hu,ke.cover=mu,ke.data=fu,ke.extent=gu,ke.find=yu,ke.remove=vu,ke.removeAll=ku,ke.root=bu,ke.size=Mu,ke.visit=wu,ke.visitAfter=xu,ke.x=ju,ke.y=Iu;var Ve,ie,Ot=class{constructor(t){j(this,Ve,void 0),m(this,"categories"),m(this,"locations"),m(this,"vortexes"),m(this,"maps"),m(this,"nodes"),m(this,"polygons"),m(this,"events"),m(this,"mapGroups"),m(this,"locationStates"),m(this,"rankings"),j(this,ie,{}),I(this,Ve,t)}get polygonsByMapId(){if(p(this,ie).polygonsByMapId)return p(this,ie).polygonsByMapId;let t,e={};for(let n=0,r=p(this,Ve).polygons.length;n<r;++n)t=p(this,Ve).polygons[n],e[t.map.id]||(e[t.map.id]=[]),e[t.map.id].push(t);let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return p(this,ie).polygonsByMapId=n,p(this,ie).polygonsByMapId}get nodesByMapId(){if(p(this,ie).nodesByMapId)return p(this,ie).nodesByMapId;let t,e={};for(let n=0,r=p(this,Ve).nodes.length;n<r;++n)t=p(this,Ve).nodes[n],e[t.map.id]||(e[t.map.id]=[]),e[t.map.id].push(t);let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return p(this,ie).nodesByMapId=n,p(this,ie).nodesByMapId}findNearestNodeOnMap(t,e){var n;if(p(this,ie).nodeTreesByMap||(p(this,ie).nodeTreesByMap=new Map),!p(this,ie).nodeTreesByMap.has(t)){let e=null!=(n=this.nodesByMapId.get(t))?n:[],r=Oa();r.x((t=>t.x)),r.y((t=>t.y)),r.addAll(e),p(this,ie).nodeTreesByMap.set(t,r)}return p(this,ie).nodeTreesByMap.get(t).find(e.x,e.y)}get locationsByMapId(){if(p(this,ie).locationsByMapId)return p(this,ie).locationsByMapId;let t,e={};for(let n=0,r=p(this,Ve).locations.length;n<r;++n){t=p(this,Ve).locations[n];for(let n=0,r=t.polygons.length;n<r;++n)e[t.polygons[n].map.id]||(e[t.polygons[n].map.id]=[]),e[t.polygons[n].map.id].push(t)}let n=Object.entries(e).reduce(((t,[e,n])=>(t.set(e,n),t)),new Map);return p(this,ie).locationsByMapId=n,p(this,ie).locationsByMapId}static create(t){return Ot.instances.has(t)||Ot.instances.set(t,new Ot(t)),Ot.instances.get(t)}static clear(){Ot.instances.clear()}},Dr=Ot;Ve=new WeakMap,ie=new WeakMap,m(Dr,"instances",new Map);var Te=Dr;f(),f(),f(),f();var zu=" ",ge=class{static get separator(){return zu}static set separator(t){zu=t}static parse(t){if(!isNaN(parseFloat(t))&&isFinite(t))return Number(t);let e=String(t).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==e[e.length-1]&&e.splice(e.length-1),""==e)return NaN;let n=null;switch(e.length){case 3:n=e[0]/1+e[1]/60+e[2]/3600;break;case 2:n=e[0]/1+e[1]/60;break;case 1:n=e[0];break;default:return NaN}return/^-|[WS]$/i.test(t.trim())&&(n=-n),Number(n)}static toDms(t,e="d",n){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===n)switch(e){case"d":case"deg":n=4;break;case"dm":case"deg+min":n=2;break;case"dms":case"deg+min+sec":n=0;break;default:e="d",n=4}t=Math.abs(t);let r=null,i=null,a=null,s=null;switch(e){default:case"d":case"deg":i=t.toFixed(n),i<100&&(i="0"+i),i<10&&(i="0"+i),r=i+"°";break;case"dm":case"deg+min":i=Math.floor(t),a=(60*t%60).toFixed(n),60==a&&(a=(0).toFixed(n),i++),i=("000"+i).slice(-3),a<10&&(a="0"+a),r=i+"°"+ge.separator+a+"′";break;case"dms":case"deg+min+sec":i=Math.floor(t),a=Math.floor(3600*t/60)%60,s=(3600*t%60).toFixed(n),60==s&&(s=(0).toFixed(n),a++),60==a&&(a=0,i++),i=("000"+i).slice(-3),a=("00"+a).slice(-2),s<10&&(s="0"+s),r=i+"°"+ge.separator+a+"′"+ge.separator+s+"″"}return r}static toLat(t,e,n){let r=ge.toDms(ge.wrap90(t),e,n);return null===r?"–":r.slice(1)+ge.separator+(t<0?"S":"N")}static toLon(t,e,n){let r=ge.toDms(ge.wrap180(t),e,n);return null===r?"–":r+ge.separator+(t<0?"W":"E")}static toBrng(t,e,n){let r=ge.toDms(ge.wrap360(t),e,n);return null===r?"–":r.replace("360","0")}static fromLocale(t){let e=123456.789.toLocaleString(),n={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(t){let e=123456.789.toLocaleString(),n={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,e=3){if(![1,2,3].includes(Number(e)))throw new RangeError(`invalid precision ‘${e}’`);t=ge.wrap360(t);let n=4*ji(2,e-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*n/360)%n*16/n]}static wrap360(t){return 0<=t&&t<360?t:(t%360+360)%360}static wrap180(t){return-180<t&&t<=180?t:(t+540)%360-180}static wrap90(t){return-90<=t&&t<=90?t:Math.abs((t%360+270)%360-180)-90}};Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var H=ge,te=Math.PI,P=class{constructor(t,e){if(isNaN(t))throw new TypeError(`invalid lat ‘${t}’`);if(isNaN(e))throw new TypeError(`invalid lon ‘${e}’`);this._lat=H.wrap90(Number(t)),this._lon=H.wrap180(Number(e))}get lat(){return this._lat}get latitude(){return this._lat}set lat(t){if(this._lat=isNaN(t)?H.wrap90(H.parse(t)):H.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid lat ‘${t}’`)}set latitude(t){if(this._lat=isNaN(t)?H.wrap90(H.parse(t)):H.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid latitude ‘${t}’`)}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(t){if(this._lon=isNaN(t)?H.wrap180(H.parse(t)):H.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lon ‘${t}’`)}set lng(t){if(this._lon=isNaN(t)?H.wrap180(H.parse(t)):H.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lng ‘${t}’`)}set longitude(t){if(this._lon=isNaN(t)?H.wrap180(H.parse(t)):H.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid longitude ‘${t}’`)}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");if(null===t[0]||null===t[1])throw new TypeError("invalid (null) point");let e,n;if(2==t.length&&([e,n]=t,e=H.wrap90(H.parse(e)),n=H.wrap180(H.parse(n)),isNaN(e)||isNaN(n)))throw new TypeError(`invalid point ‘${t.toString()}’`);if(1==t.length&&"string"==typeof t[0]&&([e,n]=t[0].split(","),e=H.wrap90(H.parse(e)),n=H.wrap180(H.parse(n)),isNaN(e)||isNaN(n)))throw new TypeError(`invalid point ‘${t[0]}’`);if(1==t.length&&"object"==typeof t[0]){let r=t[0];if("Point"==r.type&&Array.isArray(r.coordinates)?[n,e]=r.coordinates:(null!=r.latitude&&(e=r.latitude),null!=r.lat&&(e=r.lat),null!=r.longitude&&(n=r.longitude),null!=r.lng&&(n=r.lng),null!=r.lon&&(n=r.lon),e=H.wrap90(H.parse(e)),n=H.wrap180(H.parse(n))),isNaN(e)||isNaN(n))throw new TypeError(`invalid point ‘${JSON.stringify(t[0])}’`)}if(isNaN(e)||isNaN(n))throw new TypeError(`invalid point ‘${t.toString()}’`);return new P(e,n)}distanceTo(t,e=6371e3){if(t instanceof P||(t=P.parse(t)),isNaN(e))throw new TypeError(`invalid radius ‘${e}’`);let n=e,r=this.lat.toRadians(),i=this.lon.toRadians(),a=t.lat.toRadians(),s=a-r,o=t.lon.toRadians()-i,l=Math.sin(s/2)*Math.sin(s/2)+Math.cos(r)*Math.cos(a)*Math.sin(o/2)*Math.sin(o/2);return n*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}initialBearingTo(t){if(t instanceof P||(t=P.parse(t)),this.equals(t))return NaN;let e=this.lat.toRadians(),n=t.lat.toRadians(),r=(t.lon-this.lon).toRadians(),i=Math.cos(e)*Math.sin(n)-Math.sin(e)*Math.cos(n)*Math.cos(r),a=Math.sin(r)*Math.cos(n),s=Math.atan2(a,i).toDegrees();return H.wrap360(s)}finalBearingTo(t){t instanceof P||(t=P.parse(t));let e=t.initialBearingTo(this)+180;return H.wrap360(e)}midpointTo(t){t instanceof P||(t=P.parse(t));let e=this.lat.toRadians(),n=this.lon.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),a=Math.cos(e),s=0,o=Math.sin(e),l={x:a+Math.cos(r)*Math.cos(i),y:s+Math.cos(r)*Math.sin(i),z:o+Math.sin(r)},u=Math.atan2(l.z,Math.sqrt(l.x*l.x+l.y*l.y)),h=n+Math.atan2(l.y,l.x),c=u.toDegrees(),d=h.toDegrees();return new P(c,d)}intermediatePointTo(t,e){if(t instanceof P||(t=P.parse(t)),this.equals(t))return new P(this.lat,this.lon);let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),a=t.lon.toRadians(),s=i-n,o=a-r,l=Math.sin(s/2)*Math.sin(s/2)+Math.cos(n)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2),u=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),h=Math.sin((1-e)*u)/Math.sin(u),c=Math.sin(e*u)/Math.sin(u),d=h*Math.cos(n)*Math.cos(r)+c*Math.cos(i)*Math.cos(a),f=h*Math.cos(n)*Math.sin(r)+c*Math.cos(i)*Math.sin(a),p=h*Math.sin(n)+c*Math.sin(i),m=Math.atan2(p,Math.sqrt(d*d+f*f)),g=Math.atan2(f,d),y=m.toDegrees(),v=g.toDegrees();return new P(y,v)}destinationPoint(t,e,n=6371e3){let r=t/n,i=Number(e).toRadians(),a=this.lat.toRadians(),s=this.lon.toRadians(),o=Math.sin(a)*Math.cos(r)+Math.cos(a)*Math.sin(r)*Math.cos(i),l=Math.asin(o),u=Math.sin(i)*Math.sin(r)*Math.cos(a),h=Math.cos(r)-Math.sin(a)*o,c=s+Math.atan2(u,h),d=l.toDegrees(),f=c.toDegrees();return new P(d,f)}static intersection(t,e,n,r){if(t instanceof P||(t=P.parse(t)),n instanceof P||(n=P.parse(n)),isNaN(e))throw new TypeError(`invalid brng1 ‘${e}’`);if(isNaN(r))throw new TypeError(`invalid brng2 ‘${r}’`);let i=t.lat.toRadians(),a=t.lon.toRadians(),s=n.lat.toRadians(),o=n.lon.toRadians(),l=Number(e).toRadians(),u=Number(r).toRadians(),h=s-i,c=o-a,d=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(i)*Math.cos(s)*Math.sin(c/2)*Math.sin(c/2)));if(Math.abs(d)<Number.EPSILON)return new P(t.lat,t.lon);let f=(Math.sin(s)-Math.sin(i)*Math.cos(d))/(Math.sin(d)*Math.cos(i)),p=(Math.sin(i)-Math.sin(s)*Math.cos(d))/(Math.sin(d)*Math.cos(s)),m=Math.acos(Math.min(Math.max(f,-1),1)),g=Math.acos(Math.min(Math.max(p,-1),1)),y=l-(Math.sin(o-a)>0?m:2*te-m),v=(Math.sin(o-a)>0?2*te-g:g)-u;if(0==Math.sin(y)&&0==Math.sin(v)||Math.sin(y)*Math.sin(v)<0)return null;let _=-Math.cos(y)*Math.cos(v)+Math.sin(y)*Math.sin(v)*Math.cos(d),M=Math.atan2(Math.sin(d)*Math.sin(y)*Math.sin(v),Math.cos(v)+Math.cos(y)*_),w=Math.asin(Math.min(Math.max(Math.sin(i)*Math.cos(M)+Math.cos(i)*Math.sin(M)*Math.cos(l),-1),1)),b=a+Math.atan2(Math.sin(l)*Math.sin(M)*Math.cos(i),Math.cos(M)-Math.sin(i)*Math.sin(w)),x=w.toDegrees(),I=b.toDegrees();return new P(x,I)}crossTrackDistanceTo(t,e,n=6371e3){t instanceof P||(t=P.parse(t)),e instanceof P||(e=P.parse(e));let r=n;if(this.equals(t))return 0;let i=t.distanceTo(this,r)/r,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(e).toRadians();return Math.asin(Math.sin(i)*Math.sin(a-s))*r}alongTrackDistanceTo(t,e,n=6371e3){t instanceof P||(t=P.parse(t)),e instanceof P||(e=P.parse(e));let r=n;if(this.equals(t))return 0;let i=t.distanceTo(this,r)/r,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(e).toRadians(),o=Math.asin(Math.sin(i)*Math.sin(a-s));return Math.acos(Math.cos(i)/Math.abs(Math.cos(o)))*Math.sign(Math.cos(s-a))*r}maxLatitude(t){let e=Number(t).toRadians(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(e)*Math.cos(n))).toDegrees()}static crossingParallels(t,e,n){if(t.equals(e))return null;let r=Number(n).toRadians(),i=t.lat.toRadians(),a=t.lon.toRadians(),s=e.lat.toRadians(),o=e.lon.toRadians()-a,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(o),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(o)-Math.cos(i)*Math.sin(s)*Math.cos(r),h=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(o);if(h*h>l*l+u*u)return null;let c=Math.atan2(-u,l),d=Math.acos(h/Math.sqrt(l*l+u*u)),f=a+c+d,p=(a+c-d).toDegrees(),m=f.toDegrees();return{lon1:H.wrap180(p),lon2:H.wrap180(m)}}rhumbDistanceTo(t,e=6371e3){t instanceof P||(t=P.parse(t));let n=e,r=this.lat.toRadians(),i=t.lat.toRadians(),a=i-r,s=Math.abs(t.lon-this.lon).toRadians();Math.abs(s)>te&&(s=s>0?-(2*te-s):2*te+s);let o=Math.log(Math.tan(i/2+te/4)/Math.tan(r/2+te/4)),l=Math.abs(o)>1e-11?a/o:Math.cos(r);return Math.sqrt(a*a+l*l*s*s)*n}rhumbBearingTo(t){if(t instanceof P||(t=P.parse(t)),this.equals(t))return NaN;let e=this.lat.toRadians(),n=t.lat.toRadians(),r=(t.lon-this.lon).toRadians();Math.abs(r)>te&&(r=r>0?-(2*te-r):2*te+r);let i=Math.log(Math.tan(n/2+te/4)/Math.tan(e/2+te/4)),a=Math.atan2(r,i).toDegrees();return H.wrap360(a)}rhumbDestinationPoint(t,e,n=6371e3){let r=this.lat.toRadians(),i=this.lon.toRadians(),a=Number(e).toRadians(),s=t/n,o=s*Math.cos(a),l=r+o;Math.abs(l)>te/2&&(l=l>0?te-l:-te-l);let u=Math.log(Math.tan(l/2+te/4)/Math.tan(r/2+te/4)),h=Math.abs(u)>1e-11?o/u:Math.cos(r),c=i+s*Math.sin(a)/h,d=l.toDegrees(),f=c.toDegrees();return new P(d,f)}rhumbMidpointTo(t){t instanceof P||(t=P.parse(t));let e=this.lat.toRadians(),n=this.lon.toRadians(),r=t.lat.toRadians(),i=t.lon.toRadians();Math.abs(i-n)>te&&(n+=2*te);let a=(e+r)/2,s=Math.tan(te/4+e/2),o=Math.tan(te/4+r/2),l=Math.tan(te/4+a/2),u=((i-n)*Math.log(l)+n*Math.log(o)-i*Math.log(s))/Math.log(o/s);isFinite(u)||(u=(n+i)/2);let h=a.toDegrees(),c=u.toDegrees();return new P(h,c)}static areaOf(t,e=6371e3){let n=e,r=t[0].equals(t[t.length-1]);r||t.push(t[0]);let i=t.length-1,a=0;for(let e=0;e<i;e++){let n=t[e].lat.toRadians(),r=t[e+1].lat.toRadians(),i=(t[e+1].lon-t[e].lon).toRadians();a+=2*Math.atan2(Math.tan(i/2)*(Math.tan(n/2)+Math.tan(r/2)),1+Math.tan(n/2)*Math.tan(r/2))}(function(t){let e=0,n=t[0].initialBearingTo(t[1]);for(let r=0;r<t.length-1;r++){let i=t[r].initialBearingTo(t[r+1]),a=t[r].finalBearingTo(t[r+1]);e+=(i-n+540)%360-180,e+=(a-i+540)%360-180,n=a}let r=t[0].initialBearingTo(t[1]);return e+=(r-n+540)%360-180,Math.abs(e)<90})(t)&&(a=Math.abs(a)-2*te);let s=Math.abs(a*n*n);return r||t.pop(),s}equals(t){return t instanceof P||(t=P.parse(t)),!(Math.abs(this.lat-t.lat)>Number.EPSILON||Math.abs(this.lon-t.lon)>Number.EPSILON)}toGeoJSON(){return{type:"Point",coordinates:[this.lon,this.lat]}}toString(t="d",e){if(!["d","dm","dms","n"].includes(t))throw new RangeError(`invalid format ‘${t}’`);if("n"==t)return null==e&&(e=4),`${this.lat.toFixed(e)},${this.lon.toFixed(e)}`;return`${H.toLat(this.lat,t,e)}, ${H.toLon(this.lon,t,e)}`}};f(),f(),f();var za=class{constructor(t){m(this,"destinations",[]),this.destinations=t}};f();var Aa,nt,Rt=class{constructor(t,e){j(this,Aa,void 0),j(this,nt,void 0),m(this,"distance",0),m(this,"path",[]),m(this,"instructions",[]),I(this,nt,t),I(this,Aa,e),this.distance=e.distance,this.instructions=e.instructions.map((t=>{var e,n,r,i,a,s,o,l,u,h,c,d;let f=Q(G({},t),{action:G({},t.action),atLocation:null!=(e=t.atLocation)&&e.id?null==(r=null==(n=p(this,nt))?void 0:n._vortexesById)?void 0:r[t.atLocation.id]:void 0,node:null!=(i=t.node)&&i.id?null==(s=null==(a=p(this,nt))?void 0:a._nodesById)?void 0:s[t.node.id]:void 0});return("TakeVortex"===(null==(o=f.action)?void 0:o.type)||"ExitVortex"===(null==(l=f.action)?void 0:l.type))&&(f.action.fromMap=null==(h=p(this,nt)._mapsById)?void 0:h[null==(u=f.action)?void 0:u.fromMap.id],f.action.toMap=null==(d=p(this,nt)._mapsById)?void 0:d[null==(c=f.action)?void 0:c.toMap.id]),f})),this.path=e.path.map((t=>{var e,n;return null==(n=null==(e=p(this,nt))?void 0:e._nodesById)?void 0:n[t.id]}))}toJSON(){return p(this,Aa)}};Aa=new WeakMap,nt=new WeakMap;var gt,rt=class{constructor(t){j(this,gt,void 0),I(this,gt,t)}directionsTo(t,e){if(t instanceof za){let n=[],r=this;for(let i=0;i<t.destinations.length;i++){let a=t.destinations[i],s=Na(r),o=Na(a),l=p(this,gt).navigator.getDirections({originIds:s,destinationNodeIds:o,accessible:(null==e?void 0:e.accessible)||!1}),u=new Rt(p(this,gt),l);n.push(u),r=a}return n}{let n=Na(this),r=Na(t),i=p(this,gt).navigator.getDirections({originIds:n,destinationNodeIds:r,accessible:(null==e?void 0:e.accessible)||!1});return new Rt(p(this,gt),i)}}distanceTo(t,e){let n=this.directionsTo(t,e);return(null==n?void 0:n.distance)||0}};gt=new WeakMap;var um=0,lm="9999-12-31T00:00:00.000Z";function cm(t,e,n=new Date){if(!t.states)return;let r=n||new Date,i=t.states.find((t=>{let e=new Date(t.start||um),n=new Date(t.end||lm);return e<r&&n>r}));return i?e.find((t=>t.value===i.type)):void 0}var $e,yt,Ie,Sa,Pa,Fa,Ea=class extends rt{constructor(t,e){super(t),j(this,$e,void 0),j(this,yt,void 0),j(this,Ie,{}),m(this,"states"),m(this,"id",""),m(this,"name",""),m(this,"type",""),m(this,"description"),m(this,"sortOrder"),m(this,"logo"),m(this,"phone"),m(this,"social"),m(this,"color"),m(this,"shortName"),m(this,"detailsUrl"),m(this,"tags"),m(this,"externalId"),m(this,"showLabelWhenImagePresent"),m(this,"picture"),m(this,"operationHours"),m(this,"siblingGroups"),m(this,"gallery"),j(this,Sa,void 0),j(this,Pa,[]),j(this,Fa,void 0),I(this,$e,t),I(this,yt,e);let n=Object.assign({},e);delete n.categories,Object.assign(this,n)}get polygons(){let t=p(this,Ie).polygons;if(void 0!==t)return t;let e=[],n=p(this,Sa),r=p(this,$e)._polygonsById;if(Array.isArray(n))for(let t=0,i=n.length;t<i;++t){let i=r[n[t].id];null!=i&&i.geometry.visible&&e.push(i)}return p(this,Ie).polygons=e,e}set polygons(t){I(this,Sa,t)}get nodes(){let t=p(this,Ie).nodes;if(void 0!==t)return t;let e=[],n=p(this,Pa),r=p(this,$e)._nodesById;if(n)for(let t=0,i=n.length;t<i;++t){let i=r[n[t].node];null!=i&&e.push(i)}return p(this,Ie).nodes=e,e}set nodes(t){I(this,Pa,t)}get parent(){let t=p(this,Ie).parent;if(void 0!==t)return t;let e,n=p(this,$e)._locationsById,r=p(this,Fa);return void 0!==r&&(e=n[r]),p(this,Ie).parent=e,e}set parent(t){I(this,Fa,t)}get categories(){let t=p(this,Ie).categories;if(void 0!==t)return t;let e=[];return p(this,yt).categories.forEach((t=>{let n=p(this,$e).getCollectionItemById("categories",t);n&&e.push(n)})),p(this,Ie).categories=e,e}get state(){return cm(this,p(this,$e).locationStates)}clone(){return new Ea(p(this,$e),p(this,yt))}get nodeOperationHours(){let t=p(this,Ie).nodeOperationHours;if(void 0!==t)return t;if(null==this.nodes)return{};let e=p(this,yt).nodes.reduce(((t,e)=>(null!=e.operationHours&&(t[e.node]=e.operationHours),t)),{});return p(this,Ie).nodeOperationHours=e,e}static hydrate(t,e){return t.map((t=>new Ea(e,t)))}static fetch(t){return B(this,null,(function*(){let e=t.options.things.locations.slice();t.options.things.categories&&ae(e,"categories"),t.options.things.nodes&&ae(e,"nodes"),t.options.things.polygons&&ae(e,"polygons"),t.options.things.locationStates&&ae(e,"states");let n={fields:e,venue:t.options.venue};try{let e=yield ne(t.options,"location",n);return t.options.includeHidden||(e=e.filter((t=>!t.hidden))),e.map((e=>new Ea(t,e)))}catch(t){return S.error("Fetch Locations:",t),[]}}))}toJSON(){let t=p(this,yt);return delete t.color,t}},it=Ea;$e=new WeakMap,yt=new WeakMap,Ie=new WeakMap,Sa=new WeakMap,Pa=new WeakMap,Fa=new WeakMap,f();var vt,Bt,Ee,La,Lr=class extends rt{constructor(t,e){super(t),j(this,vt,void 0),j(this,Bt,void 0),j(this,Ee,{}),m(this,"geometry"),m(this,"perspectives"),m(this,"image"),m(this,"holes"),m(this,"textures"),m(this,"material"),m(this,"label"),m(this,"id",""),m(this,"layer"),m(this,"layerId"),m(this,"name"),m(this,"externalId"),m(this,"vertexes"),m(this,"canvasBounds"),j(this,La,void 0),I(this,vt,t),I(this,Bt,e);let n=Object.assign({},e);delete n.map,Object.assign(this,n)}get map(){let t=p(this,Ee).map;if(void 0!==t)return t;let e=p(this,vt).getCollectionItemById("maps",p(this,Bt).map);return p(this,Ee).map=e,e}get locations(){var t,e;let n=p(this,Ee).locations;if(void 0!==n)return n;let r=[],i=null!=(e=null==(t=Te.instances.get(p(this,vt)))?void 0:t.locationsByMapId.get(this.map.id))?e:[],{id:a}=this;for(let t=0,e=i.length;t<e;++t){let e=i[t],n=e.polygons;if(Array.isArray(n))for(let t=0,i=n.length;t<i;++t)if(n[t].id===a){r.push(e);break}}return p(this,Ee).locations=r,r}get entrances(){let t=p(this,Ee).entrances;if(void 0!==t)return t;let e=[],n=p(this,La),r=p(this,vt)._nodesById;if(Array.isArray(n)){for(let t=0,i=n.length;t<i;++t){let i=r[n[t].id];null!=i&&e.push(i)}return p(this,Ee).entrances=e,e}return[]}set entrances(t){I(this,La,t)}get rank(){let t=p(this,Ee).rank;if(void 0!==t)return t;let{rankings:e}=p(this,vt);if(!e||!e.polygons)return null;let n=e.polygons.find((t=>t.polygonId===this.id));return n?(p(this,Ee).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(p(this,Ee).rank=null,null)}static hydrate(t,e){return t.map((t=>new Lr(e,t)))}static fetch(t){return B(this,null,(function*(){let e=t.options.things.polygons.slice();t.options.things.maps&&ae(e,"map"),t.options.things.nodes&&ae(e,"entrances");let n={fields:e,venue:t.options.venue};try{return(yield ne(t.options,"polygon",n)).filter((t=>t.geometry.visible)).map((e=>new Lr(t,e)))}catch(t){return S.error("Fetch Polygons:",t),[]}}))}toJSON(){return p(this,Bt)}},zt=Lr;function Nu(t){return/^[\da-f]{24}$/i.test(t)}function Au(t,e=!1){let n="";if(null!=t){let r="?",i=e?Object.keys(t).filter((t=>!["slug","venue"].includes(t))):Object.keys(t);for(let e=0,a=i.length;e<a;++e){let a=i[e],s=t[a];null!=s&&(n+=`${r+encodeURIComponent(a)}=${encodeURIComponent(s)}`,r="&")}}return n}function dm(t,e,n,r=!1){var i,a;return r?`${t.supplementaryUrl}${e}?venue=${n.venue||n.slug}`:null!=(i=t.baseUrl)&&i.includes("gateway")?`${t.baseUrl}${e}/${n.venue||n.slug}${Au(n,null==(a=t.baseUrl)?void 0:a.includes("gateway"))}`:t.baseUrl+e+Au(n)}function ne(t,e,n,r=!1){return B(this,null,(function*(){return oo(t,e,n,r,!0)}))}function oo(t,e,n,r=!1,i=!1){return B(this,null,(function*(){let a=dm(t,e,n,r),s=yield Cr(t,a,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}))}function Cr(t,e,n=!1){return B(this,null,(function*(){let r={language:t.language,clientId:t.clientId,clientSecret:t.clientSecret};n&&delete r.language,r.language&&(e+=`&lang=${encodeURIComponent(r.language)}`);let{headers:i}=t;i["Content-Type"]="text/json",t.authorization&&(i.Authorization=t.authorization),r.language&&(i["Accept-Language"]=r.language);let a={method:"GET",headers:i},s=yield kt()(e,a);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.json()}))}function ae(t,e){t.indexOf(e)<0&&t.push(e)}function Eu([t,e],[n,r]){let i=new P(t,e),a=new P(n,r);return i.distanceTo(a)}function Su(t){if(t.scale||t.x_scale)return 1/(t.scale||t.x_scale);let e;try{let n=t.georeference[0],r=t.georeference[2],i=new P(n.target.x,n.target.y),a=new P(r.target.x,r.target.y),s=i.distanceTo(a),o=n.control.x-r.control.x,l=n.control.y-r.control.y;e=Math.sqrt(o*o+l*l)/s}catch(n){e=1,S.warn(n),S.warn(`Couldn't georeference ${t.name||t.shortName||t.id}. Probably not enough geocoordinates.`)}return e}function Na(t){var e;return t instanceof zt?t.entrances.map((t=>t.id)):t instanceof it?(null==(e=t.nodes)?void 0:e.map((t=>t.id)))||[]:[t.id]}function Pu(t){return B(this,null,(function*(){let e={},{maps:n,images:r,scenes:i,polygons:a}=t;if(null!=r)try{let t=Object.keys(r).map((t=>fetch(`data:image/png;base64,${r[t]}`).then((t=>t.blob())).then((n=>{e[t]=n})).catch((t=>{S.error(t)}))));yield Promise.all(t)}catch(t){S.error(t)}return n.forEach((t=>{var n;(null!=(n=t.scene)&&n.polygons||i[t.id])&&(null!=i&&i[t.id]&&(t.scene||(t.scene={}),Object.defineProperty(t.scene,"polygons",{get:()=>i[t.id]})),null!=r&&(t.scene.images=t.scene.images.map((({filename:t})=>({filename:t,url:e[t]}))),t.scene.polygons.forEach((t=>{var n,r;if(null!=(n=null==t?void 0:t.image)&&n.url&&null!=(r=null==t?void 0:t.image)&&r.url){let n=t.image.url.split("/"),r=e[n[n.length-1]];r&&(t.image.url=r)}}))))})),null!=r&&a.forEach((t=>{var n;if(null!=(n=null==t?void 0:t.image)&&n.url){let n=t.image.url.split("/"),r=e[n[n.length-1]];r&&(t.image.url=r)}})),null!=t.images&&delete t.images,null!=t.scenes&&delete t.scenes,t}))}function so(t,e,n){let r;return function(){let i=this,a=arguments,s=function(){r=null,n||t.apply(i,a)},o=n&&!r;clearTimeout(r),r=setTimeout(s,e),o&&t.apply(i,a)}}vt=new WeakMap,Bt=new WeakMap,Ee=new WeakMap,La=new WeakMap;var Ca,Ra,Ba,Rr=class{constructor(t,e){j(this,Ca,void 0),j(this,Ra,{}),j(this,Ba,void 0),m(this,"name"),m(this,"externalId"),m(this,"parents"),m(this,"id"),m(this,"icon"),this.id=e.id,I(this,Ba,e),I(this,Ca,t),Object.assign(this,e)}get locations(){var t;let e=p(this,Ra).locations;if(void 0!==e)return e;let n=[],{locations:r}=p(this,Ca),{id:i}=this;for(let e=0,a=r.length;e<a;++e){let a=r[e],s=a.categories;if(Array.isArray(s))for(let e=0,r=s.length;e<r;++e)if((null==(t=s[e])?void 0:t.id)===i){n.push(a);break}}return p(this,Ra).locations=n,n}static hydrate(t,e){return t.map((t=>new Rr(e,t)))}static fetch(t){return B(this,null,(function*(){let e={fields:t.options.things.categories,venue:t.options.venue};try{return(yield ne(t.options,"category",e)).map((e=>new Rr(t,e)))}catch(t){return S.error("Fetch Categories:",t),[]}}))}toJSON(){return p(this,Ba)}},At=Rr;Ca=new WeakMap,Ra=new WeakMap,Ba=new WeakMap,f();var Ga,qt,Ua,Br=class{constructor(t,e){j(this,Ga,void 0),j(this,qt,void 0),j(this,Ua,{}),m(this,"id",""),m(this,"type",""),m(this,"name",""),m(this,"description"),m(this,"image"),m(this,"startDate"),m(this,"endDate"),m(this,"showDate"),I(this,qt,e),I(this,Ga,t),Object.assign(this,e)}location(){let t=p(this,Ua).location;if(void 0!==t)return t;let e,n=p(this,Ga)._locationsById,r=p(this,qt).location;if(null!=r){let t=n[r];null!=t&&(e=t)}return p(this,Ua).location=e,e}static hydrate(t,e){return t.map((t=>new Br(e,t)))}static fetch(t){return B(this,null,(function*(){let e=t.options.things.events.slice();t.options.things.locations&&ae(e,"location");let n={fields:e,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(yield ne(t.options,"event",n)).map((e=>new Br(t,e)))}catch(t){return S.error("Fetch Events:",t),[]}}))}toJSON(){return p(this,qt)}},qa=Br;Ga=new WeakMap,qt=new WeakMap,Ua=new WeakMap,f();var Va,Gr=class{constructor(t){j(this,Va,void 0),m(this,"id",""),m(this,"name",""),m(this,"value",""),I(this,Va,t),Object.assign(this,t)}static hydrate(t){return t.map((t=>new Gr(t)))}static fetch(t){return B(this,null,(function*(){let e={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(yield ne(t.options,"location-state",e)).map((t=>new Gr(t)))}catch(t){return S.error("Fetch Location States:",t),[]}}))}toJSON(){return p(this,Va)}},qr=Gr;Va=new WeakMap,f(),f();var $a,uo,Wa,lo,Ha,Ya,Ur,Fu,Vr,Du,We,He,Ye,Xe,Gt=class{constructor(t){j(this,$a),j(this,Wa),j(this,Ur),j(this,Vr),m(this,"map"),j(this,Ha,{}),j(this,Ya,void 0),j(this,We,void 0),j(this,He,void 0),j(this,Ye,void 0),j(this,Xe,void 0);let{map:e,mappedin:n}=t;null!=t.lat&&null!=t.lon&&(I(this,We,t.lat),I(this,He,t.lon)),null!=t.x&&null!=t.y&&(I(this,Ye,t.x),I(this,Xe,t.y)),this.map=e,I(this,Ya,n)}get x(){return tt(this,Wa,lo).call(this,"x")}get y(){return tt(this,Wa,lo).call(this,"y")}get lat(){return tt(this,$a,uo).call(this,"lat")}get lon(){return tt(this,$a,uo).call(this,"lon")}absoluteDistanceTo(t){return Eu([t.lat,t.lon],[this.lat,this.lon])}get nearestNode(){let t=p(this,Ha).nearestNode;if(void 0!==t)return t;let e=Te.instances.get(p(this,Ya)).findNearestNodeOnMap(this.map.id,this);return p(this,Ha).nearestNode=e,e}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};$a=new WeakSet,uo=function(t){if(p(this,We)&&p(this,He))return p(this,"lat"===t?We:He);if(null!=p(this,Ye)&&null!=p(this,Xe)){let[e,n]=tt(this,Vr,Du).call(this,p(this,Ye),p(this,Xe));return I(this,We,e),I(this,He,n),p(this,"lat"===t?We:He)}throw Error("MappedinCoordinate is missing x and y")},Wa=new WeakSet,lo=function(t){if(p(this,Ye)&&p(this,Xe))return p(this,"x"===t?Ye:Xe);if(null!=p(this,We)&&null!=p(this,He)){let[e,n]=tt(this,Ur,Fu).call(this,p(this,We),p(this,He));return I(this,Ye,e),I(this,Xe,n),p(this,"x"===t?Ye:Xe)}throw Error("MappedinCoordinate is missing lat and lon")},Ha=new WeakMap,Ya=new WeakMap,Ur=new WeakSet,Fu=function(t,e){let n=this.map.georeference[0],r=new P(n.target.x,n.target.y),i=new P(t,e),a=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,o=a*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*o,h=Math.cos(l)*o;return[n.control.x+u,n.control.y-h]},Vr=new WeakSet,Du=function(t,e){let n,r=this.map.georeference[0],i=new P(r.target.x,r.target.y),a=t-r.control.x,s=r.control.y-e,o=Math.atan2(a,s);n=0===a&&0===s?0:0===a?s:a/Math.sin(o);let l=o-this.map.getNorth(),u=n/this.map._scale,h=i.destinationPoint(u,180*l/Math.PI);return[h.lat,h.lon]},We=new WeakMap,He=new WeakMap,Ye=new WeakMap,Xe=new WeakMap;var Je,Ja,Ka,$r=class{constructor(t,e){j(this,Je,void 0),j(this,Ja,{}),j(this,Ka,void 0),m(this,"id",""),m(this,"group",""),m(this,"name",""),m(this,"shortName",""),m(this,"elevation",0),m(this,"scale",0),m(this,"layers"),m(this,"x_scale"),m(this,"perspectiveId"),m(this,"scene"),m(this,"width",0),m(this,"height",0),m(this,"georeference",[]),m(this,"_scale",0),I(this,Je,t),I(this,Ka,e),Object.assign(this,e),this._scale=Su(this),this.scale=this.x_scale||1/this._scale}get polygons(){var t,e,n;return null!=(n=null==(e=null==(t=Te.instances.get(p(this,Je)))?void 0:t.polygonsByMapId)?void 0:e.get(this.id))?n:[]}get locations(){var t,e,n;return null!=(n=null==(e=null==(t=Te.instances.get(p(this,Je)))?void 0:t.locationsByMapId)?void 0:e.get(this.id))?n:[]}get nodes(){var t,e,n;return null!=(n=null==(e=null==(t=Te.instances.get(p(this,Je)))?void 0:t.nodesByMapId)?void 0:e.get(this.id))?n:[]}get mapGroup(){let t=p(this,Ja).mapGroup;if(void 0!==t)return t;let e=this.group,n=e&&p(this,Je)._mapGroupsById[e]||null;return p(this,Ja).mapGroup=n,n}createCoordinateByXY(t,e){return new Gt({x:t,y:e,map:this,mappedin:p(this,Je)})}createCoordinate(t,e){return new Gt({lat:t,lon:e,map:this,mappedin:p(this,Je)})}getNorth(){let t;try{let e=this.georeference[0],n=this.georeference[2],r=new P(e.target.x,e.target.y),i=new P(n.target.x,n.target.y);t=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-e.control.y,n.control.x-e.control.x)-Math.PI/2)}catch(e){t=0,S.warn(e),S.warn(`Couldn't georeference ${this.name||this.shortName||this.id}. Probably not enough geocoordinates.`)}return t}static hydrate(t,e){return t.map((t=>new $r(e,t)))}static fetch(t){return B(this,null,(function*(){let e=t.options.things.maps.slice();t.options.perspective&&ae(e,"perspectives"),t.options.things.mapGroups&&ae(e,"group"),ae(e,"elevation"),ae(e,"x_scale"),ae(e,"scale"),ae(e,"georeference");let n={fields:e,perspective:t.options.perspective,venue:t.options.venue};try{let i=yield ne(t.options,"map",n),a=t=>{let e=r.layers.find((e=>e.id===t));e?e.visible=!0:r.layers.push({id:t,visible:!0})};for(let n=0,s=i.length;n<s;++n){var r=i[n];if(r){let t=r.perspective;null!=t&&(r.perspectiveId=t.id,e.indexOf("scene")>-1&&(r.scene=t.scene),t.layers?(r.layers.forEach((t=>{t.visible=!1})),t.layers.forEach(a)):r.layers.forEach((t=>{t.visible=!0}))),delete r.perspective}i[n]=new $r(t,r)}return i}catch(t){return S.error("Fetch Maps:",t),[]}}))}toJSON(){return p(this,Ka)}},Xa=$r;Je=new WeakMap,Ja=new WeakMap,Ka=new WeakMap,f();var Qa,Ut,en,Wr=class{constructor(t,e){j(this,Qa,void 0),j(this,Ut,void 0),j(this,en,{}),m(this,"id",""),m(this,"name",""),I(this,Ut,e),I(this,Qa,t),Object.assign(this,e)}get maps(){let t=p(this,en).maps;if(void 0!==t)return t;let e=[],{maps:n}=p(this,Qa),{id:r}=p(this,Ut);for(let t=0,i=n.length;t<i;++t){let i=n[t];i.group===r&&e.push(i)}return p(this,en).maps=e,e}static hydrate(t,e){return t.map((t=>new Wr(e,t)))}static fetch(t){return B(this,null,(function*(){let e={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(yield ne(t.options,"map-group",e)).map((e=>new Wr(t,e)))}catch(t){return S.error("Fetch Map Groups:",t),[]}}))}toJSON(){return p(this,Ut)}},Za=Wr;Qa=new WeakMap,Ut=new WeakMap,en=new WeakMap,f();var Ke,Vt,de,an,Hr=class extends rt{constructor(t,e){super(t),j(this,Ke,void 0),j(this,Vt,void 0),j(this,de,{}),m(this,"id",""),m(this,"x",0),m(this,"y",0),m(this,"operationHours"),m(this,"externalId"),j(this,an,void 0),I(this,Ke,t),I(this,Vt,e);let n=Object.assign({},e);delete n.map,Object.assign(this,n)}get map(){let t=p(this,de).map;if(void 0!==t)return t;let e=p(this,Ke).getCollectionItemById("maps",p(this,Vt).map);return p(this,de).map=e,e}get lat(){var t;let e=p(this,de).cachedLatLon;if(null!=e)return e.lat;let n=null==(t=p(this,Ke)._mapsById)?void 0:t[this.map.id];if(null==n)throw new Error("Map not found");return p(this,de).cachedLatLon=n.createCoordinateByXY(this.x,this.y),p(this,de).cachedLatLon.lat}get lon(){var t;let e=p(this,de).cachedLatLon;if(null!=e)return e.lon;let n=null==(t=p(this,Ke)._mapsById)?void 0:t[this.map.id];if(null==n)throw new Error("Map not found");return p(this,de).cachedLatLon=n.createCoordinateByXY(this.x,this.y),p(this,de).cachedLatLon.lon}get paths(){let t=p(this,de).paths;if(void 0!==t)return t;let e=[],n=p(this,Ke)._nodesById,r=p(this,an);if(Array.isArray(r))for(let t=0,i=r.length;t<i;++t){let i=n[r[t].node];null!=i&&e.push(i)}return p(this,de).paths=e,e}set paths(t){I(this,an,t)}get locations(){var t,e,n;let r=p(this,de).locations;if(void 0!==r)return r;let i=[],a=null!=(n=null==(e=null==(t=Te.instances.get(p(this,Ke)))?void 0:t.locationsByMapId)?void 0:e.get(this.map.id))?n:[],s=this.id;for(let t=0,e=a.length;t<e;++t){let e=a[t],n=e.nodes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t)if(n[t].id===s){i.push(e);break}}return p(this,de).locations=i,i}get polygon(){var t,e,n;let r=p(this,de).polygon;if(void 0!==r)return r;let i,a=null!=(n=null==(e=null==(t=Te.instances.get(p(this,Ke)))?void 0:t.polygonsByMapId)?void 0:e.get(this.map.id))?n:[],s=this.id;for(let t=0,e=a.length;t<e;++t){let e=a[t];e.entrances.map((t=>t.id)).includes(s)&&(i=e)}return p(this,de).polygon=i,i}static hydrate(t,e){return t.map((t=>new Hr(e,t)))}static fetch(t){return B(this,null,(function*(){let e=t.options.things.nodes.slice();t.options.things.maps&&ae(e,"map"),["weight","multiplier","accessible"].forEach((function(t){ae(e,t)}));let n={fields:e,venue:t.options.venue};try{return(yield ne(t.options,"node",n)).map((e=>new Hr(t,e)))}catch(t){return S.error("Fetch Nodes:",t),[]}}))}toJSON(){return p(this,Vt)}},tn=Hr;Ke=new WeakMap,Vt=new WeakMap,de=new WeakMap,an=new WeakMap,f();var rn,Yr=class{constructor(t){j(this,rn,void 0),m(this,"polygons",[]),I(this,rn,t),Object.assign(this,t)}static hydrate(t){return new Yr(t)}static fetch(t){return B(this,null,(function*(){try{let e=yield oo(t.options,"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new Yr(e)}catch(t){return S.error("Fetch Rankings:",t),null}}))}toJSON(){return p(this,rn)}},nn=Yr;rn=new WeakMap,f();var on,Jr=class{constructor(t){m(this,"id",""),j(this,on,void 0),I(this,on,t),Object.assign(this,t)}static hydrate(t){return t.map((t=>new Jr(t)))}static fetch(t){return B(this,null,(function*(){let e={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(yield ne(t.options,"apollo-theme",e)).map((t=>new Jr(t)))}catch(t){return S.error("Fetch Theme:",t),[]}}))}toJSON(){return p(this,on)}},Xr=Jr;on=new WeakMap,f();var un,ln,$t,Kr=class{constructor(t,e){j(this,un,void 0),j(this,ln,void 0),j(this,$t,{}),m(this,"defaultMap",""),m(this,"address",""),m(this,"city",""),m(this,"countrycode",""),m(this,"externalId",""),m(this,"id",""),m(this,"latitude"),m(this,"logo"),m(this,"longitude"),m(this,"metadata"),m(this,"name",""),m(this,"operationHours"),m(this,"postal",""),m(this,"slug",""),m(this,"state",""),m(this,"telephone",""),m(this,"tzid",""),m(this,"tzidOverride",""),m(this,"utcOffset",""),m(this,"website",""),I(this,ln,t),I(this,un,e),Object.assign(this,e)}static hydrate(t,e){return new Kr(e,t)}static fetch(t){return B(this,null,(function*(){let e={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let n=yield ne(t.options,"venue",e);return new Kr(t,n[0])}catch(t){return S.error("Fetch Venue:",t),{}}}))}get isMultiBuilding(){if(null==p(this,$t).isMultiBuilding){let t=p(this,ln).maps,e=t.reduce(((t,e)=>t.add(e.elevation)),new Set),n=t.length!==e.size;p(this,$t).isMultiBuilding=n}return p(this,$t).isMultiBuilding}toJSON(){return p(this,un)}},sn=Kr;un=new WeakMap,ln=new WeakMap,$t=new WeakMap,f();var dn,Zr=class{constructor(t){m(this,"id",""),j(this,dn,void 0),m(this,"name"),m(this,"type"),m(this,"weight"),m(this,"multiplier"),I(this,dn,t),Object.assign(this,t)}static hydrate(t){return t.map((t=>new Zr(t)))}static fetch(t){return B(this,null,(function*(){let e=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(t){ae(e,t)}));let n={fields:e,venue:t.options.venue};try{return(yield ne(t.options,"vortex",n)).map((t=>new Zr(t)))}catch(t){return S.error("Fetch Vortexes:",t),[]}}))}toJSON(){return p(this,dn)}},cn=Zr;function pm(t,e){let n=[];return t.features.forEach((t=>{var r,i;let a=[];null==(r=t.properties.spaces)||r.forEach((t=>{if("id"in t){let n;n=e.get(t.id),n&&a.push(...n)}else null==a||a.push({id:t.node,level:""})}));let s=a.map((t=>({node:"n_"+t.id,map:t.level}))),o=null==(i=t.properties.spaces)?void 0:i.filter((t=>"id"in t)),l=(t.properties.hours||[]).map((t=>Q(G({},t),{"@type":"OpeningHoursSpecification",dayOfWeek:[t.dayOfWeek.replace("http://schema.org/","")]}))),u=Q(G({},t.properties),{polygons:o||[],nodes:s||[],description:t.properties.description||"",logo:t.properties.logo||{},picture:t.properties.picture||{},phone:t.properties.phone||{},social:t.properties.social||{},externalId:t.properties.externalId||"",states:t.properties.states||[],siblingGroups:t.properties.siblingGroups||[],operationHours:l});delete u.spaces,n.push(u)})),n}function hm(t){let e=new Set;return t.features.forEach((t=>{var n;null==(n=t.properties.states)||n.forEach((t=>{e.add(t.type)}))})),Array.from(e).map((t=>({id:t,name:t,value:t})))}function mm(t){let e=[];return t.features.forEach((t=>{let n=Q(G({},t.properties),{icon:t.properties.picture});delete n.picture,e.push(n)})),e}function fm(t){let e=1/0,n=1/0,r=-1/0,i=-1/0;return t.features.forEach((t=>{let a;a="MultiPolygon"===t.geometry.type?t.geometry.coordinates[0].flat():t.geometry.coordinates[0],a.forEach((t=>{e=Math.min(e,t[1]),r=Math.max(r,t[1]),n=Math.min(n,t[0]),i=Math.max(i,t[0])}))})),{id:t.features[0].properties.id,minLat:e,minLong:n,maxLat:r,maxLong:i}}function gm(t,e,n){let r=n.createGeoreferences(),i=[];return t.features.forEach((t=>{let a=new Set;e.forEach((t=>{t.layer&&a.add(t.layer)}));let s=[...a].map((t=>({id:t,visible:!0}))),o=1/n.mapScale,l=Q(G({},t.properties),{georeference:r,shortName:t.properties.abbreviation||"",scene:{polygons:e},scale:o,x_scale:o,group:t.properties.building,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits});i.push(l)})),i}dn=new WeakMap,f();var co=class{constructor(t){m(this,"mapExtent"),m(this,"stretchRatio"),m(this,"midLat"),m(this,"midLong"),m(this,"mapUnitRatio",1e6),m(this,"latDistance"),m(this,"longDistance"),m(this,"mapScale"),m(this,"widthInMapUnits"),m(this,"heightInMapUnits"),this.mapExtent=t;let{minLat:e,minLong:n,maxLat:r,maxLong:i}=t,a=(e+r)/2,s=(n+i)/2,o=new P(a,i),l=new P(a,n),u=new P(e,s),h=new P(r,s);this.latDistance=u.distanceTo(h),this.longDistance=o.distanceTo(l);let c=this.latDistance/this.longDistance,d=(r-e)/(i-n);this.stretchRatio=c/d,this.midLat=a,this.midLong=s,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-e)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(t){let e=t[1];return{x:(t[0]-this.midLong)*this.mapUnitRatio,y:(this.midLat-e)*this.mapUnitRatio*this.stretchRatio}}createGeoreferences(){let{minLat:t,minLong:e,maxLat:n,maxLong:r}=this.mapExtent;return[[t,e],[t,r],[n,r],[n,e]].map((t=>({target:{x:t[0],y:t[1]},control:this.convert([t[1],t[0]])})))}};function ym(t,e){let n=[];return t.features.forEach((t=>{let r=e.convert(t.geometry.coordinates),i=(t.properties.neighbors||[]).map((e=>({node:e,map:t.properties.level}))),a=t.properties.level,s=Q(G({},t.properties),{x:r.x,y:r.y,paths:i,map:a,externalId:t.properties.externalId||""});n.push(s)})),n}var Lu=(t,e,n,r,i)=>{let a=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let s=[];"entrances"in t.properties&&(s=t.properties.entrances.map((t=>({id:"n_"+t.id,node:"n_"+t.id,map:t.level}))));let o,l=n[t.properties.id],u=e.find((t=>t.id===l)),h=t.geometry.coordinates[0].map((t=>i.convert(t))),c=r.find((e=>e.polygonId===t.properties.id)),d=Math.max(i.widthInMapUnits,i.heightInMapUnits)/1e3;if(c){let t=i.convert([c.position[0],c.position[1]]),e=c.size.x,n=c.size.y,r=i.mapScale,a=n*r,s=e*r/d/c.viewBox.width,l=a/d/c.viewBox.height;o={url:null==u?void 0:u.image,visible:!(null==u||!u.image),viewBox:c.viewBox,scale:{x:s,y:l},position:{x:t.x,y:t.y},rotation:c.rotation,useLocalScaling:!1,_isAbsolutelyPositioned:!0}}let f=Q(G({},t.properties),{entrances:s,map:t.properties.level,externalId:t.properties.externalId||"",geometry:{visible:!0,position:{x:0,y:0,z:((null==u?void 0:u.altitude)||0)*i.mapScale/d},scale:{x:1,y:1,z:((null==u?void 0:u.height)||1)*i.mapScale/d}},material:{color:(null==u?void 0:u.color)||"#000000"},image:o,vertexes:h});a.push(f)})),a};function vm(t,e,n,r,i,a){let s=Lu(t,n,r,i,a),o=Lu(e,n,r,i,a);return s.concat(o)}function km(t){let e=new Map;return t.forEach((t=>{t.features.forEach((t=>{let{destinations:n}=t.properties;if(0===n.length)return;let r=n[0].split("-")[0],i=e.get(r),a=n.map((t=>t.split("-")[1])).map((t=>"n_"+t));if(i)i.nodes.push(...a);else{let{name:n,type:i,weight:s,multiplier:o,accessible:l}=t.properties,u={id:r,nodes:a,name:n,type:i,weight:s,multiplier:o,accessible:l};e.set(r,u)}}))})),Array.from(e.values())}function bm(t){let e=[];return t.features.forEach((t=>{let n=G({},t.properties);e.push(n)})),e}function Cu(t){let e=Object.keys(t),n=new Map,r=new Map,i=new Map,a=new Map,s=new Map,o=new Map,l=new Map,u=new Map;e.filter((t=>t.indexOf("/")>-1)).forEach((e=>{let h=e.split(/[\/\.]/),c=h[0],d=h[1];switch(c){case"connection":n.set(d,t[e]);break;case"level":r.set(d,t[e]);break;case"node":i.set(d,t[e]);break;case"obstruction":a.set(d,t[e]);break;case"space":s.set(d,t[e]);break;case"style":case"polygon-style":o.set(d,t[e]);break;case"image":l.set(d,t[e]);break;case"image-instance":u.set(d,t[e])}}));let h=t["building.geojson"]||t["building.json"],c=t["category.geojson"]||t["category.json"],d=t["location.geojson"]||t["location.json"],f=t["manifest.geojson"]||t["manifest.json"],p=t["style.json"]||[];return{connection:n,level:r,node:i,obstruction:a,space:s,building:h,category:c,location:d,manifest:f,style:p,polygonStyle:o,imageInstance:u,imageBinaries:l}}function Ru(t){let e=Array.from(t.connection.values()),n=Array.from(t.level.values()),r=t.building,i=t.category,a=t.style,s=t.location,o=t.imageInstance,l=t.polygonStyle,u={},h=[],c=new Map;n.forEach((e=>{let n=e.features[0].properties.id,r=fm(e),i=new co(r);c.set(n,i);let s=t.obstruction.get(n),d=t.space.get(n),f=o.get(n),p=l.get(n);u[n]=vm(d,s,a,p,f,i);let m=t.node.get(n);h.push(...ym(m,i))}));let d=Object.values(u).flat(),f=km(e),p=n.map((t=>{let e=t.features[0].properties.id,n=c.get(e);return gm(t,u[e],n)})).flat(),m=new Map;Array.from(t.space.values()).forEach((t=>{t.features.forEach((t=>{m.set(t.properties.id,t.properties.entrances)}))}));let g=bm(r),y=pm(s,m),v=mm(i),_=hm(s),M=t.manifest.features[0].properties.name,w=t.manifest.features[0].geometry.coordinates[0],b=t.manifest.features[0].geometry.coordinates[1],x=t.imageBinaries;return{locations:y,categories:v,nodes:h,maps:p,polygons:d,vortexes:f,mapGroups:g,locationStates:_,themes:[],venue:{name:M,latitude:b,longitude:w},imageBinaries:x}}f(),f(),f(),f();var Nt,Be,qe,po=[0,4,6,8,10],ot=()=>{let t=new Array(16).fill(0),e=4294967296*Math.random();for(let n=0;n<t.length;n++)n>0&&!(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;let n=t.map((t=>t.toString(16).padStart(2,"0")));return n[6]="4"+n[6][1],n[8]=["8","9","a","b"].includes(n[7][0])?n[7]:"a"+n[7][1],po.map(((t,e)=>n.slice(t,e===po.length-1?void 0:po[e+1]).join(""))).join("-")},Bu="mi-session-data",qu="mi-local-data",ho=class{constructor(){j(this,Be,void 0),j(this,qe,void 0);try{let t=sessionStorage.getItem(Bu);I(this,Be,t?JSON.parse(t):{id:ot()})}catch(t){I(this,Be,{id:ot()})}try{let t=localStorage.getItem(qu);I(this,qe,t?JSON.parse(t):{deviceId:ot()})}catch(t){I(this,qe,{deviceId:ot()})}p(this,Be).id||(p(this,Be).id=ot()),p(this,qe).deviceId||(p(this,qe).deviceId=ot())}static getInstance(){return p(this,Nt)||I(this,Nt,new ho),p(this,Nt)}static ___clearInstance(){I(this,Nt,void 0)}saveSessionData(t,e){p(this,Be)[t]=e;try{return sessionStorage.setItem(Bu,JSON.stringify(p(this,Be))),!0}catch(t){return!1}}loadSessionData(t){let e=p(this,Be)[t];if(null!=e)return e}saveLocalData(t,e){p(this,qe)[t]=e;try{return localStorage.setItem(qu,JSON.stringify(p(this,qe))),!0}catch(t){return!1}}loadLocalData(t){let e=p(this,qe)[t];if(null!=e)return e}},Wt=ho;function Gu(t){return/^[\da-f]{24}$/i.test(t)}function Uu(){return Wt.getInstance().loadLocalData("deviceId")}function Vu(){return Wt.getInstance().loadSessionData("id")}Nt=new WeakMap,Be=new WeakMap,qe=new WeakMap,j(Wt,Nt,void 0);var cl,pn,Ht,Yt,hn,Xt,Jt,Kt,Et,mn,Zt,Qt,fn,dl=Ti(ll(),1),Am=null==(cl=null==x?void 0:x.env)?void 0:cl.npm_package_version,go=["websdk","web","webv2"],yo="websdk",vo=class{constructor(t){var e;j(this,pn,void 0),j(this,Ht,void 0),j(this,Yt,void 0),j(this,hn,void 0),j(this,Xt,void 0),j(this,Jt,void 0),j(this,Kt,void 0),j(this,Et,void 0),j(this,mn,void 0),j(this,Zt,void 0),j(this,Qt,void 0),j(this,fn,void 0),I(this,Et,t.clientId),I(this,mn,t.clientSecret),I(this,Zt,t.accessToken),I(this,Kt,t.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!p(this,Kt)&&p(this,Et)&&!Gu(p(this,Et))&&(n="https://web-proxy.mappedin.com/a/"),I(this,Yt,n),I(this,Yt,p(this,Yt)+(t.venue+"/")),I(this,Ht,!1),I(this,pn,"boolean"==typeof t.testMode?t.testMode:"true"===(null==(e=t.testMode)?void 0:e.toLowerCase())),I(this,hn,go.find((e=>e===t.context))||go[0]),I(this,Xt,Uu()),I(this,Jt,Vu()),I(this,Qt,new Set),I(this,fn,t.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=this.getDirections.bind(this)}track(t,e){if(p(this,pn))return;let n=Q(G({},e),{g:p(this,Ht)}),r=p(this,Yt)+t+"?"+dl.default.stringify(n),i={"mi-context":yo||p(this,hn),"mi-session":p(this,Jt),"mi-device":p(this,Xt),"mappedin-sdk-version":Am,"mappedin-platform-version":p(this,fn)};p(this,Zt)?i.Authorization=`Bearer ${p(this,Zt)}`:p(this,Kt)||(i.Authorization=`Basic ${btoa(`${p(this,Et)}:${p(this,mn)}`)}`),kt()(r,{method:"GET",mode:"cors",headers:i})}locationSelected(t){let e=t.id||t;this.track("select-location",{id:e})}categorySelected(t){let e=t.id||t;this.track("select-category",{id:e})}mapViewLoaded(t,e,n,r){this.track("load-mapview",{type:t,force:e,benchmark:n||-1,reason:r||"success"})}getDirections(t,e){let n={start:t.id,end:e.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return p(this,Jt)}getDeviceID(){return p(this,Xt)}setGeolocationMode(t){I(this,Ht,t)}trackBlueDotEvent(t){t&&Object.values(vo.BLUEDOT_EVENT).includes(t)&&!p(this,Qt).has(t)?(this.track(t),p(this,Qt).add(t)):S.warn(`Ignored unsupported blue dot event: "${t}".`)}trackSearch(t){null!=t&&this.track("query-search",t)}trackSearchSuggest(t){null!=t&&this.track("query-suggest",t)}static setContext(t){let e=go.find((e=>e===t));e&&(yo=e)}static clearContext(){yo=void 0}},Qr=vo;pn=new WeakMap,Ht=new WeakMap,Yt=new WeakMap,hn=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,Kt=new WeakMap,Et=new WeakMap,mn=new WeakMap,Zt=new WeakMap,Qt=new WeakMap,fn=new WeakMap,m(Qr,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var bt,ta,ei=Qr,ko={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",things:{},venue:""},Da=(t=>(t.CATEGORY="categories",t.EVENT="events",t.LOCATION="locations",t.MAPGROUP="mapGroups",t.MAP="maps",t.NODE="nodes",t.POLYGON="polygons",t.VORTEX="vortexes",t))(Da||{}),ea={categories:At,locations:it,vortexes:cn,maps:Xa,nodes:tn,polygons:zt,venue:sn,events:qa,mapGroups:Za,themes:Xr,locationStates:qr,rankings:nn},Mt=class{constructor(t){m(this,"perspective"),m(this,"things"),m(this,"options"),j(this,bt,void 0),j(this,ta,""),m(this,"updatedAt"),m(this,"categories",[]),m(this,"locations",[]),m(this,"vortexes",[]),m(this,"maps",[]),m(this,"nodes",[]),m(this,"polygons",[]),m(this,"venue",{}),m(this,"events",[]),m(this,"mapGroups",[]),m(this,"themes",[]),m(this,"locationStates",[]),m(this,"rankings"),m(this,"_categoriesById"),m(this,"_locationsById"),m(this,"_vortexesById"),m(this,"_mapsById"),m(this,"_nodesById"),m(this,"_polygonsById"),m(this,"_eventsById"),m(this,"_mapGroupsById"),m(this,"_locationStatesById"),m(this,"_locationRankingsById"),m(this,"_rankingsById"),m(this,"_categoriesByExternalId"),m(this,"_locationsByExternalId"),m(this,"_vortexesByExternalId"),m(this,"_mapsByExternalId"),m(this,"_nodesByExternalId"),m(this,"_polygonsByExternalId"),m(this,"_eventsByExternalId"),m(this,"_mapGroupsByExternalId"),m(this,"_locationStatesByExternalId"),m(this,"_locationRankingsByExternalId"),m(this,"_rankingsByExternalId"),m(this,"images"),m(this,"imageBinaries"),m(this,"scenes"),m(this,"analytics"),m(this,"navigator"),this.options=t,I(this,bt,Te.create(this));let e=new ei(Q(G({},t),{testMode:!(null!=t&&t.emitAnalyticsEvents)}));this.analytics={locationSelected:e.locationSelected,categorySelected:e.categorySelected,getDirections:e.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Qi,"true")}})}generateGetters(t){try{for(let e=0,n=t.length;e<n;++e){let n=t[e];Array.isArray(this[n])&&(Object.defineProperty(this,`_${n}ByExternalId`,{get(){let t=p(this,bt)[n];if(null!=t)return t;let e={};return this[n].forEach((t=>e[t.externalId]=t)),p(this,bt)[n]=e,e}}),Object.defineProperty(this,`_${n}ById`,{get(){let t=p(this,bt)[n];if(null!=t)return t;let e={};return this[n].forEach((t=>e[t.id]=t)),p(this,bt)[n]=e,e}}))}return this}catch(t){throw new Error(t)}}getCollectionItemById(t,e){let n=`_${t}ByExternalId`,r=this[`_${t}ById`];return null!=r&&null!=r[e]||(r=this[n],null!=r&&null!=r[e])?r[e]:null}hydrateFromMVF(t){return B(this,null,(function*(){let e=Ru(t);return this.hydrate(e)}))}hydrate(t,e){return B(this,null,(function*(){let n;if("string"==typeof t)try{I(this,ta,t),n=JSON.parse(t)}catch(t){return void S.error("Unable to parse JSON",t)}else n=t,I(this,ta,JSON.stringify(n));let r=Object.keys(n);for(let t=0,e=r.length;t<e;++t){let e=r[t],i=n[e];null!=ea[e]&&"function"==typeof ea[e].hydrate&&(this[e]=ea[e].hydrate(i,this))}e&&(yield Pu(n));let{images:i,scenes:a,imageBinaries:s}=n;this.images=i,this.scenes=a,this.imageBinaries=s,this.generateGetters(r),this.initNavigator()}))}fetch(){return B(this,null,(function*(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),Nu(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,e=[],n=Object.keys(t);for(let t=0,r=n.length;t<r;++t){let r=n[t];ea[r]&&e.push(ea[r].fetch(this).then((t=>(this[r]=t,Promise.resolve()))))}return this.generateGetters(n),Promise.all(e).then((()=>{this.initNavigator()}))}))}initNavigator(){this.navigator=new ro({locations:this.locations.map((t=>t.toJSON())),nodes:this.nodes.map((t=>t.toJSON())),vortexes:this.vortexes.map((t=>t.toJSON())),maps:this.maps.map((t=>t.toJSON()))})}toJSON(){var t;let e={};for(let t in ea)Array.isArray(this[t])&&(e[t]=this[t].map((t=>t.toJSON())));let n=Q(G({},e),{venue:this.venue.toJSON()});return null!=this.rankings&&(n.rankings=null==(t=this.rankings)?void 0:t.toJSON()),delete n.locationRankings,n}toString(){return p(this,ta)||JSON.stringify(this.toJSON())}};bt=new WeakMap,ta=new WeakMap,f();var pl={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery"],categories:["name","color","sortOrder","parents"],maps:["name","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};f(),f();var oe=function(){return oe=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},oe.apply(this,arguments)};function J(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pe(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}var gn,Nm="ENTRIES",kl="KEYS",bl="VALUES",he="",bo=function(){function t(t,e){var n=t._tree,r=Array.from(n.keys());this.set=t,this._type=e,this._path=r.length>0?[{node:n,keys:r}]:[]}return t.prototype.next=function(){var t=this.dive();return this.backtrack(),t},t.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var t=aa(this._path),e=t.node,n=t.keys;if(aa(n)===he)return{done:!1,value:this.result()};var r=e.get(aa(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},t.prototype.backtrack=function(){if(0!==this._path.length){var t=aa(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}},t.prototype.key=function(){return this.set._prefix+this._path.map((function(t){var e=t.keys;return aa(e)})).filter((function(t){return t!==he})).join("")},t.prototype.value=function(){return aa(this._path).node.get(he)},t.prototype.result=function(){switch(this._type){case bl:return this.value();case kl:return this.key();default:return[this.key(),this.value()]}},t.prototype[Symbol.iterator]=function(){return this},t}(),aa=function(t){return t[t.length-1]},Em=function(t,e,n){var r=new Map;if(void 0===e)return r;for(var i=e.length+1,a=i+n,s=new Uint8Array(a*i).fill(n+1),o=0;o<i;++o)s[o]=o;for(var l=1;l<a;++l)s[l*i]=l;return Ml(t,e,n,r,s,1,i,""),r},Ml=function(t,e,n,r,i,a,s,o){var l,u,h=a*s;try{t:for(var c=J(t.keys()),d=c.next();!d.done;d=c.next()){var f=d.value;if(f===he){var p=i[h-1];p<=n&&r.set(o,[t.get(f),p])}else{for(var m=a,g=0;g<f.length;++g,++m){for(var y=f[g],v=s*m,_=v-s,M=i[v],w=Math.max(0,m-n-1),b=Math.min(s-1,m+n),x=w;x<b;++x){var I=y!==e[x],O=i[_+x]+ +I,k=i[_+x+1]+1,E=i[v+x]+1,F=i[v+x+1]=Math.min(O,k,E);F<M&&(M=F)}if(M>n)continue t}Ml(t.get(f),e,n,r,i,m,s,o+f)}}}catch(t){l={error:t}}finally{try{d&&!d.done&&(u=c.return)&&u.call(c)}finally{if(l)throw l.error}}},Mo=function(){function t(t,e){void 0===t&&(t=new Map),void 0===e&&(e=""),this._size=void 0,this._tree=t,this._prefix=e}return t.prototype.atPrefix=function(e){var n,r;if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=pe(ai(this._tree,e.slice(this._prefix.length)),2),a=i[0],s=i[1];if(void 0===a){var o=pe(To(s),2),l=o[0],u=o[1];try{for(var h=J(l.keys()),c=h.next();!c.done;c=h.next()){var d=c.value;if(d!==he&&d.startsWith(u)){var f=new Map;return f.set(d.slice(u.length),l.get(d)),new t(f,e)}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}return new t(a,e)},t.prototype.clear=function(){this._size=void 0,this._tree.clear()},t.prototype.delete=function(t){return this._size=void 0,Sm(this._tree,t)},t.prototype.entries=function(){return new bo(this,Nm)},t.prototype.forEach=function(t){var e,n;try{for(var r=J(this),i=r.next();!i.done;i=r.next()){var a=pe(i.value,2);t(a[0],a[1],this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.fuzzyGet=function(t,e){return Em(this._tree,t,e)},t.prototype.get=function(t){var e=jo(this._tree,t);return void 0!==e?e.get(he):void 0},t.prototype.has=function(t){var e=jo(this._tree,t);return void 0!==e&&e.has(he)},t.prototype.keys=function(){return new bo(this,kl)},t.prototype.set=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");return this._size=void 0,wo(this._tree,t).set(he,e),this},Object.defineProperty(t.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var t=this.entries();!t.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var n=wo(this._tree,t);return n.set(he,e(n.get(he))),this},t.prototype.fetch=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var n=wo(this._tree,t),r=n.get(he);return void 0===r&&n.set(he,r=e()),r},t.prototype.values=function(){return new bo(this,bl)},t.prototype[Symbol.iterator]=function(){return this.entries()},t.from=function(e){var n,r,i=new t;try{for(var a=J(e),s=a.next();!s.done;s=a.next()){var o=pe(s.value,2),l=o[0],u=o[1];i.set(l,u)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},t.fromObject=function(e){return t.from(Object.entries(e))},t}(),ai=function(t,e,n){var r,i;if(void 0===n&&(n=[]),0===e.length||null==t)return[t,n];try{for(var a=J(t.keys()),s=a.next();!s.done;s=a.next()){var o=s.value;if(o!==he&&e.startsWith(o))return n.push([t,o]),ai(t.get(o),e.slice(o.length),n)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n.push([t,e]),ai(void 0,"",n)},jo=function(t,e){var n,r;if(0===e.length||null==t)return t;try{for(var i=J(t.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;if(s!==he&&e.startsWith(s))return jo(t.get(s),e.slice(s.length))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},wo=function(t,e){var n,r,i=e.length;t:for(var a=0;t&&a<i;){try{for(var s=(n=void 0,J(t.keys())),o=s.next();!o.done;o=s.next()){var l=o.value;if(l!==he&&e[a]===l[0]){for(var u=Math.min(i-a,l.length),h=1;h<u&&e[a+h]===l[h];)++h;var c=t.get(l);if(h===l.length)t=c;else{var d=new Map;d.set(l.slice(h),c),t.set(e.slice(a,a+h),d),t.delete(l),t=d}a+=h;continue t}}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var f=new Map;return t.set(e.slice(a),f),f}return t},Sm=function(t,e){var n=pe(ai(t,e),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete(he),0===r.size)wl(i);else if(1===r.size){var a=pe(r.entries().next().value,2),s=a[0],o=a[1];xl(i,s,o)}},wl=function(t){if(0!==t.length){var e=pe(To(t),2),n=e[0],r=e[1];if(n.delete(r),0===n.size)wl(t.slice(0,-1));else if(1===n.size){var i=pe(n.entries().next().value,2),a=i[0],s=i[1];a!==he&&xl(t.slice(0,-1),a,s)}}},xl=function(t,e,n){if(0!==t.length){var r=pe(To(t),2),i=r[0],a=r[1];i.set(a+e,n),i.delete(a)}},To=function(t){return t[t.length-1]},Io="or",Pm="and",Fm="and_not",St=function(){function t(t){if(null==(null==t?void 0:t.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=oe(oe(oe({},_o),t),{searchOptions:oe(oe({},fl),t.searchOptions||{})}),this._index=new Mo,this._documentCount=0,this._documentIds=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this.addFields(this._options.fields)}return t.prototype.add=function(t){var e,n,r,i,a=this._options,s=a.extractField,o=a.tokenize,l=a.processTerm,u=a.fields,h=a.idField,c=s(t,h);if(null==c)throw new Error('MiniSearch: document does not have ID field "'.concat(h,'"'));var d=this.addDocumentId(c);this.saveStoredFields(d,t);try{for(var f=J(u),p=f.next();!p.done;p=f.next()){var m=p.value,g=s(t,m);if(null!=g){var y=o(g.toString(),m),v=this._fieldIds[m],_=new Set(y).size;this.addFieldLength(d,v,this._documentCount-1,_);try{for(var M=(r=void 0,J(y)),w=M.next();!w.done;w=M.next()){var b=l(w.value,m);b&&this.addTerm(v,d,b)}}catch(t){r={error:t}}finally{try{w&&!w.done&&(i=M.return)&&i.call(M)}finally{if(r)throw r.error}}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}},t.prototype.addAll=function(t){var e,n;try{for(var r=J(t),i=r.next();!i.done;i=r.next()){var a=i.value;this.add(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.addAllAsync=function(t,e){var n=this;void 0===e&&(e={});var r=e.chunkSize,i=void 0===r?10:r,a={chunk:[],promise:Promise.resolve()},s=t.reduce((function(t,e,r){var a=t.chunk,s=t.promise;return a.push(e),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(t){return setTimeout(t,0)}))})).then((function(){return n.addAll(a)}))}:{chunk:a,promise:s}}),a),o=s.chunk;return s.promise.then((function(){return n.addAll(o)}))},t.prototype.remove=function(t){var e,n,r,i,a,s,o=this._options,l=o.tokenize,u=o.processTerm,h=o.extractField,c=o.fields,d=o.idField,f=h(t,d);if(null==f)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var p=J(this._documentIds),m=p.next();!m.done;m=p.next()){var g=pe(m.value,2),y=g[0];if(f===g[1]){try{for(var v=(r=void 0,J(c)),_=v.next();!_.done;_=v.next()){var M=_.value,w=h(t,M);if(null!=w){var b=l(w.toString(),M),x=this._fieldIds[M],I=new Set(b).size;this.removeFieldLength(y,x,this._documentCount,I);try{for(var O=(a=void 0,J(b)),k=O.next();!k.done;k=O.next()){var E=u(k.value,M);E&&this.removeTerm(x,y,E)}}catch(t){a={error:t}}finally{try{k&&!k.done&&(s=O.return)&&s.call(O)}finally{if(a)throw a.error}}}}}catch(t){r={error:t}}finally{try{_&&!_.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}return this._storedFields.delete(y),this._documentIds.delete(y),this._fieldLength.delete(y),void(this._documentCount-=1)}}}catch(t){e={error:t}}finally{try{m&&!m.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(f,": it is not in the index"))},t.prototype.removeAll=function(t){var e,n;if(t)try{for(var r=J(t),i=r.next();!i.done;i=r.next()){var a=i.value;this.remove(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Mo,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},t.prototype.search=function(t,e){var n,r;void 0===e&&(e={});var i=this.executeQuery(t,e),a=[];try{for(var s=J(i),o=s.next();!o.done;o=s.next()){var l=pe(o.value,2),u=l[0],h=l[1],c=h.score,d=h.terms,f=h.match,p=d.length,m={id:this._documentIds.get(u),score:c*p,terms:Object.keys(f),match:f};Object.assign(m,this._storedFields.get(u)),(null==e.filter||e.filter(m))&&a.push(m)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a.sort(yl),a},t.prototype.autoSuggest=function(t,e){var n,r,i,a;void 0===e&&(e={}),e=oe(oe({},Bm),e);var s=new Map;try{for(var o=J(this.search(t,e)),l=o.next();!l.done;l=o.next()){var u=l.value,h=u.score,c=(v=u.terms).join(" ");null!=(g=s.get(c))?(g.score+=h,g.count+=1):s.set(c,{score:h,terms:v,count:1})}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}var d=[];try{for(var f=J(s),p=f.next();!p.done;p=f.next()){var m=pe(p.value,2),g=m[0],y=m[1],v=(h=y.score,y.terms),_=y.count;d.push({suggestion:g,terms:v,score:h/_})}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return d.sort(yl),d},Object.defineProperty(t.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),t.loadJSON=function(e,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return t.loadJS(JSON.parse(e),n)},t.getDefault=function(t){if(_o.hasOwnProperty(t))return xo(_o,t);throw new Error('MiniSearch: unknown option "'.concat(t,'"'))},t.loadJS=function(e,n){var r,i,a,s,o=e.index,l=e.documentCount,u=e.nextId,h=e.documentIds,c=e.fieldIds,d=e.fieldLength,f=e.averageFieldLength,p=e.storedFields,m=e.serializationVersion;if(1!==m&&2!==m)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var g=new t(n);g._documentCount=l,g._nextId=u,g._documentIds=ti(h),g._fieldIds=c,g._fieldLength=ti(d),g._avgFieldLength=f,g._storedFields=ti(p),g._index=new Mo;try{for(var y=J(o),v=y.next();!v.done;v=y.next()){var _=pe(v.value,2),M=_[0],w=_[1],b=new Map;try{for(var x=(a=void 0,J(Object.keys(w))),I=x.next();!I.done;I=x.next()){var O=I.value,k=w[O];1===m&&(k=k.ds),b.set(parseInt(O,10),ti(k))}}catch(t){a={error:t}}finally{try{I&&!I.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}g._index.set(M,b)}}catch(t){r={error:t}}finally{try{v&&!v.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return g},t.prototype.executeQuery=function(t,e){var n=this;if(void 0===e&&(e={}),"string"!=typeof t){var r=oe(oe(oe({},e),t),{queries:void 0}),i=t.queries.map((function(t){return n.executeQuery(t,r)}));return this.combineResults(i,t.combineWith)}var a=this._options,s=a.tokenize,o=a.processTerm,l=a.searchOptions,u=oe(oe({tokenize:s,processTerm:o},l),e),h=u.tokenize,c=u.processTerm,d=h(t).map((function(t){return c(t)})).filter((function(t){return!!t})).map(Rm(u)).map((function(t){return n.executeQuerySpec(t,u)}));return this.combineResults(d,u.combineWith)},t.prototype.executeQuerySpec=function(t,e){var n,r,i,a,s,o,l=oe(oe({},this._options.searchOptions),e),u=(l.fields||this._options.fields).reduce((function(t,e){var n;return oe(oe({},t),((n={})[e]=xo(t,e)||1,n))}),l.boost||{}),h=l.boostDocument,c=l.weights,d=l.maxFuzzy,f=oe(oe({},fl.weights),c),p=f.fuzzy,m=f.prefix,g=this._index.get(t.term),y=this.termResults(t.term,t.term,1,g,u,h);if(t.prefix&&(s=this._index.atPrefix(t.term)),t.fuzzy){var v=!0===t.fuzzy?.2:t.fuzzy,_=v<1?Math.min(d,Math.round(t.term.length*v)):v;_&&(o=this._index.fuzzyGet(t.term,_))}if(s)try{for(var M=J(s),w=M.next();!w.done;w=M.next()){var b=pe(w.value,2),x=b[0],I=b[1];if(F=x.length-t.term.length){null==o||o.delete(x);var O=m*x.length/(x.length+.3*F);this.termResults(t.term,x,O,I,u,h,y)}}}catch(t){n={error:t}}finally{try{w&&!w.done&&(r=M.return)&&r.call(M)}finally{if(n)throw n.error}}if(o)try{for(var k=J(o.keys()),E=k.next();!E.done;E=k.next()){x=E.value;var F,S=pe(o.get(x),2),j=S[0];if(F=S[1]){O=p*x.length/(x.length+F);this.termResults(t.term,x,O,j,u,h,y)}}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=k.return)&&a.call(k)}finally{if(i)throw i.error}}return y},t.prototype.combineResults=function(t,e){if(void 0===e&&(e=Io),0===t.length)return new Map;var n=e.toLowerCase();return t.reduce(Dm[n])||new Map},t.prototype.toJSON=function(){var t,e,n,r,i=[];try{for(var a=J(this._index),s=a.next();!s.done;s=a.next()){var o=pe(s.value,2),l=o[0],u=o[1],h={};try{for(var c=(n=void 0,J(u)),d=c.next();!d.done;d=c.next()){var f=pe(d.value,2),p=f[0],m=f[1];h[p]=Object.fromEntries(m)}}catch(t){n={error:t}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}i.push([l,h])}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),index:i,serializationVersion:2}},t.prototype.termResults=function(t,e,n,r,i,a,s){var o,l,u,h,c;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=J(Object.keys(i)),f=d.next();!f.done;f=d.next()){var p=f.value,m=i[p],g=this._fieldIds[p],y=r.get(g);if(null!=y){var v=y.size,_=this._avgFieldLength[g];try{for(var M=(u=void 0,J(y.keys())),w=M.next();!w.done;w=M.next()){var b=w.value,x=a?a(this._documentIds.get(b),e):1;if(x){var I=y.get(b),O=this._fieldLength.get(b)[g],k=n*m*x*Cm(I,v,this._documentCount,O,_),E=s.get(b);if(E){E.score+=k,qm(E.terms,t);var F=xo(E.match,e);F?F.push(p):E.match[e]=[p]}else s.set(b,{score:k,terms:[t],match:(c={},c[e]=[p],c)})}}}catch(t){u={error:t}}finally{try{w&&!w.done&&(h=M.return)&&h.call(M)}finally{if(u)throw u.error}}}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(l=d.return)&&l.call(d)}finally{if(o)throw o.error}}return s},t.prototype.addTerm=function(t,e,n){var r=this._index.fetch(n,vl),i=r.get(t);if(null==i)(i=new Map).set(e,1),r.set(t,i);else{var a=i.get(e);i.set(e,(a||0)+1)}},t.prototype.removeTerm=function(t,e,n){if(this._index.has(n)){var r=this._index.fetch(n,vl),i=r.get(t);null==i||null==i.get(e)?this.warnDocumentChanged(e,t,n):i.get(e)<=1?i.size<=1?r.delete(t):i.delete(e):i.set(e,i.get(e)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(e,t,n)},t.prototype.warnDocumentChanged=function(t,e,n){var r,i;if(null!=console&&null!=console.warn)try{for(var a=J(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var o=s.value;if(this._fieldIds[o]===e)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(t),' has changed before removal: term "').concat(n,'" was not present in field "').concat(o,'". Removing a document after it has changed can corrupt the index!'))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},t.prototype.addDocumentId=function(t){var e=this._nextId;return this._documentIds.set(e,t),this._documentCount+=1,this._nextId+=1,e},t.prototype.addFields=function(t){for(var e=0;e<t.length;e++)this._fieldIds[t[e]]=e},t.prototype.addFieldLength=function(t,e,n,r){var i=this._fieldLength.get(t);null==i&&this._fieldLength.set(t,i=[]),i[e]=r;var a=(this._avgFieldLength[e]||0)*n+r;this._avgFieldLength[e]=a/(n+1)},t.prototype.removeFieldLength=function(t,e,n,r){var i=this._avgFieldLength[e]*n-r;this._avgFieldLength[e]=i/(n-1)},t.prototype.saveStoredFields=function(t,e){var n,r,i=this._options,a=i.storeFields,s=i.extractField;if(null!=a&&0!==a.length){var o=this._storedFields.get(t);null==o&&this._storedFields.set(t,o={});try{for(var l=J(a),u=l.next();!u.done;u=l.next()){var h=u.value,c=s(e,h);void 0!==c&&(o[h]=c)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},t}(),xo=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0},Dm=((gn={})[Io]=function(t,e){var n,r;try{for(var i=J(e.keys()),a=i.next();!a.done;a=i.next()){var s=a.value,o=t.get(s);if(null==o)t.set(s,e.get(s));else{var l=e.get(s),u=l.score,h=l.terms,c=l.match;o.score=o.score+u,o.match=Object.assign(o.match,c),gl(o.terms,h)}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t},gn[Pm]=function(t,e){var n,r,i=new Map;try{for(var a=J(e.keys()),s=a.next();!s.done;s=a.next()){var o=s.value,l=t.get(o);if(null!=l){var u=e.get(o),h=u.score,c=u.terms,d=u.match;gl(l.terms,c),i.set(o,{score:l.score+h,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},gn[Fm]=function(t,e){var n,r;try{for(var i=J(e.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;t.delete(s)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t},gn),hl=1.2,ml=.7,Lm=.5,Cm=function(t,e,n,r,i){return Math.log(1+(n-e+.5)/(e+.5))*(Lm+t*(hl+1)/(t+hl*(1-ml+ml*r/i)))},Rm=function(t){return function(e,n,r){return{term:e,fuzzy:"function"==typeof t.fuzzy?t.fuzzy(e,n,r):t.fuzzy||!1,prefix:"function"==typeof t.prefix?t.prefix(e,n,r):!0===t.prefix}}},_o={idField:"id",extractField:function(t,e){return t[e]},tokenize:function(t,e){return t.split(Gm)},processTerm:function(t,e){return t.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},fl={combineWith:Io,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},Bm={prefix:function(t,e,n){return e===n.length-1}},qm=function(t,e){t.includes(e)||t.push(e)},gl=function(t,e){var n,r;try{for(var i=J(e),a=i.next();!a.done;a=i.next()){var s=a.value;t.includes(s)||t.push(s)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},yl=function(t,e){var n=t.score;return e.score-n},vl=function(){return new Map},ti=function(t){var e,n,r=new Map;try{for(var i=J(Object.keys(t)),a=i.next();!a.done;a=i.next()){var s=a.value;r.set(parseInt(s,10),t[s])}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},Gm=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;f();var Um=["0","1","2","3","4","5","6","7","8","9"],Vm=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],$m=["0","1","2","3","4","5","6","7","8","9"],Wm=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],B0=[...Um,...Vm,...$m,...Wm],_l=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"];f();var Pt,Se,wt,Ze,me,yn,vn,ia,kn,oa,ct,oi,si,xt,bn,ui,li,ci,Tl,Mn,wn,Hm=32,_e=!1,Ym=120,Oo=0,ni=class{constructor(t){m(this,"_callback"),m(this,"_frameCount"),m(this,"_ordering"),m(this,"_supersededBy"),m(this,"name"),m(this,"_remainingFrameCount"),m(this,"_lastFrameTime"),m(this,"userdata"),this._callback=t.callback,this._frameCount=null!=t.frameCount?t.frameCount:1,this._ordering=null!=t.ordering?t.ordering:0,this._supersededBy=null!=t.supersededBy?new Set(t.supersededBy):new Set,this.name=t.name,this.userdata=t.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,_e&&S.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}},ut=class{constructor(t){if(m(this,"_postponed"),m(this,"userdata"),m(this,"_priority"),m(this,"_group"),m(this,"name"),m(this,"_lastFrameTime"),m(this,"_callback"),m(this,"_complete"),m(this,"_scheduled"),m(this,"_cancelled"),null!=t.group&&null!=t.priority)throw new Error("cannot specify task priority individually within group");if(null!=t.group&&null!=t.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=t.callback,this._group=null!=t.group?t.group:null,this._priority=null!=t.priority?t.priority:0,this._postponed=null!=t.postponeOnAdd&&t.postponeOnAdd,this.name=t.name,this.userdata=t.userdata,this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,_e&&S.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}},ri=class{constructor(t){m(this,"_postponed"),m(this,"_onComplete"),m(this,"_priority"),m(this,"userdata"),m(this,"name"),m(this,"_tasks"),m(this,"_scheduledTasks"),m(this,"_scheduled"),m(this,"_cancelled"),this._onComplete=null!=t.onComplete?t.onComplete:()=>{},this._priority=null!=t.priority?t.priority:0,this._postponed=null!=t.postponeOnAdd&&t.postponeOnAdd,this.name=t.name,this.userdata=t.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,_e&&S.log("task group instantiated",this.name)}isComplete(){return 0===this._scheduledTasks.size}getTasks(){return Array.from(this._tasks.values())}clear(){this._tasks.clear(),this._scheduledTasks.clear()}_popTask(){for(let t of this._scheduledTasks)return this._scheduledTasks.delete(t),t}},zo=class{constructor(t){m(this,"_maxMillisecondsPerFrame"),m(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==t?void 0:t.maxMillisecondsPerFrame)?t.maxMillisecondsPerFrame:Hm,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}},ii=class{constructor(t){var e;m(this,"_raf"),m(this,"_timer"),m(this,"_performance"),m(this,"_scheduledUpdatesByOrdering"),m(this,"_scheduledTasksByPriority"),m(this,"_postponedTasks"),m(this,"_requestAnimationFrameHandle"),m(this,"_updatesToRunThisFrame"),m(this,"_lastFrameTime",0),m(this,"_updatesRunLastFrame"),this._timer=null!=(null==t?void 0:t.timer)?t.timer:new zo,this._performance=null!=(null==t?void 0:t.performance)&&t.performance,this._scheduledUpdatesByOrdering=new na,this._scheduledTasksByPriority=new na,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),_e&&S.log("task scheduler instantiated"),null!=(e=globalThis.MappedinDebug)&&e.TEST_IOS&&(this._raf=t=>setTimeout(t,16))}clear(){for(let t of this._scheduledTasksByPriority.values())t._cancelled=!0;for(let t of this._postponedTasks.values())t._cancelled=!0;this._scheduledUpdatesByOrdering=new na,this._scheduledTasksByPriority=new na,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),_e&&S.log("task scheduler cleared")}destroy(){this.clear()}requestAnimationFrame(){null==this._requestAnimationFrameHandle&&(this._requestAnimationFrameHandle="function"==typeof this._raf?this._raf(this.update):requestAnimationFrame(this.update))}update(t){let e;this._timer.beginFrame(),this._performance&&(e=performance.now());let n=!1;_e&&(0===Oo&&(n=!0),++Oo,Oo%=Ym);let r=this._scheduledUpdatesByOrdering.keys();for(let t=r.length-1;t>=0;--t){let e=r[t];for(let t of this._scheduledUpdatesByOrdering.get(e).values())this._updatesToRunThisFrame.push(t),n&&S.log("update scheduled to run this frame",t.name)}for(let t of this._updatesToRunThisFrame){--t._remainingFrameCount,t._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(t._ordering,t),t._superseded=!1;for(let e of this._updatesToRunThisFrame)t._supersededBy.has(e)&&(t._superseded=!0,n&&S.log("update superseded",t.name,e.name))}for(let t=0;t<this._updatesToRunThisFrame.length;++t)this._updatesToRunThisFrame[t]._superseded&&(this._updatesToRunThisFrame.splice(t,1),--t);for(let e of this._updatesToRunThisFrame){let r;this._performance&&(r=performance.now()),e._callback(t),this._performance&&(e._lastFrameTime=performance.now()-r),n&&S.log("update completed",e.name)}this._updatesRunLastFrame.clear();for(let t of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(t);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(t)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-e),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(t){let e,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;S.assert(void 0!==n),Object.getPrototypeOf(n)===ri.prototype&&(r=n,n=r._popTask()),S.assert(void 0!==n),S.assert(Object.getPrototypeOf(n)===ut.prototype),this._performance&&(e=performance.now()),n._callback(t),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-e),_e&&S.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),_e&&S.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(t){t._remainingFrameCount=t._frameCount,this._scheduledUpdatesByOrdering.insert(t._ordering,t),this.requestAnimationFrame()}scheduleTask(t){if(Object.getPrototypeOf(t)===ri)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+t.name);if(t._scheduled)throw new Error("cannot schedule already scheduled task: "+t.name);if(t._cancelled)throw new Error("cannot schedule cancelled task: "+t.name);let e=t;"_group"in t&&null!=t._group&&(t._group._tasks.add(t),t._group._scheduledTasks.add(t),e=t._group),e._postponed?this._postponedTasks.add(e):this._scheduledTasksByPriority.insert(e._priority,e),t._scheduled=!0,e._scheduled=!0,_e&&S.log("task scheduled",t.name),this.requestAnimationFrame()}cancelUpdate(t){this._scheduledUpdatesByOrdering.delete(t._ordering,t),_e&&S.log("update cancelled",t.name)}cancelTask(t){if(!t._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+t.name);if(t._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+t.name);if("_group"in t&&null!=t._group){let e=t._group.isComplete();t._group._tasks.delete(t),t._group._scheduledTasks.delete(t),t._group.isComplete()&&(this._scheduledTasksByPriority.delete(t._group._priority,t._group),e||t._group._onComplete())}else this._scheduledTasksByPriority.delete(t._priority,t),this._postponedTasks.delete(t);Object.getPrototypeOf(t)===ut.prototype?t._cancelled=!0:"clear"in t&&t.clear(),_e&&S.log("task cancelled",t.name)}postponeTask(t){if("_group"in t&&null!=t._group)throw new Error("cannot postpone individual tasks in group: "+t.name);if(t._cancelled)throw new Error("cannot postpone cancelled task: "+t.name);if(!t._postponed){if(Object.getPrototypeOf(t)===ut.prototype){if("_complete"in t)return;if(!t._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+t.name)}this._scheduledTasksByPriority.delete(t._priority,t),(Object.getPrototypeOf(t)===ut.prototype||!t.isComplete())&&this._postponedTasks.add(t),t._postponed=!0,_e&&S.log("task postponed",t.name)}}resumeTask(t){if("_group"in t&&null!=t._group)throw new Error("cannot resume individual tasks in groups");if(t._cancelled)throw new Error("cannot resume cancelled task");if(t._postponed){if(Object.getPrototypeOf(t)===ut.prototype){if("_complete"in t&&t._complete)return;if(!t._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(t),(Object.getPrototypeOf(t)===ut.prototype||!t.isComplete())&&this._scheduledTasksByPriority.insert(t._priority,t),t._postponed=!1,this.requestAnimationFrame(),_e&&S.log("task resumed",t.name)}}setTaskPriority(t,e){if(Object.getPrototypeOf(t)===ut.prototype&&!t._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(t._priority,t)&&(this._scheduledTasksByPriority.delete(t._priority,t),this._scheduledTasksByPriority.insert(e,t)),t._priority=e,_e&&S.log("task priority changed",t.name,e)}},na=class{constructor(){m(this,"_map"),m(this,"_size"),m(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(t,e){return null!=this._map.get(t)&&this._map.get(t).has(e)}get(t){return this._map.get(t)}insert(t,e){if(S.assert("number"==typeof t&&Number.isFinite(t)),null==this._map.get(t)){this._map.set(t,new Set);for(let e=0;e<=this._sortedKeys.length;++e)if(e===this._sortedKeys.length||t<this._sortedKeys[e]){this._sortedKeys.splice(e,0,t);break}}this._map.get(t).has(e)||(this._map.get(t).add(e),++this._size)}delete(t,e){null!=this._map.get(t)&&this._map.get(t).has(e)&&(this._map.get(t).delete(e),--this._size,0===this._map.get(t).size&&(this._map.delete(t),this._sortedKeys.splice(this._sortedKeys.indexOf(t),1)))}pop(t){if(null!=this._map.get(t)){let e;for(e of this._map.get(t).values()){this._map.get(t).delete(e),--this._size;break}return 0===this._map.get(t).size&&(this._map.delete(t),this._sortedKeys.splice(this._sortedKeys.indexOf(t),1)),e}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let t=this._map.keys(),e=null,n={[Symbol.iterator]:()=>n,next:()=>{if(null==e){let n=t.next();if(n.done)return n;e=this._map.get(n.value).values()}let n=e.next();for(;n.done;){let r=t.next();if(r.done)return r;e=this._map.get(r.value).values(),n=e.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let t=0;for(let e of this._map.values())t+=e.size;return S.assert(t===this._size),t}},lt=t=>t.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase(),ra="",Xm=.09,Jm=1,Km=.025,Zm=.5,Qm=5e-4,ef=5e-4,tf=.01,af=.05,jl=1,nf=.01,rf=.2,of={MappedinCategory:"categories",MappedinLocation:"locations"},sf={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:_l,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===x.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:Xm,PRIMARY_INDEX_WEIGHT:Jm,SECONDARY_INDEX_WEIGHT:Km,CATEGORY_NAME_WEIGHT:Zm,LOCATION_NAME_WEIGHT:jl,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:Qm,CATEGORY_LOCATION_TAGS_WEIGHT:ef,CATEGORY_LOCATION_NAME_WEIGHT:tf,PRIMARY_INDEX_TAGS_NAME_WEIGHT:af,LOCATION_DEFAULT_RANK:jl,RATIO_OF_FUZZY_TO_EXACT:nf,RATIO_OF_PREFIX_TO_EXACT:rf}},Ao=class{constructor(t,e){var n,r,i;j(this,ci),j(this,Pt,void 0),j(this,Se,void 0),j(this,wt,void 0),j(this,Ze,void 0),j(this,me,void 0),j(this,yn,new ii({performance:!0})),j(this,vn,void 0),j(this,ia,void 0),j(this,kn,new Map),j(this,oa,0),j(this,ct,(t=>{Oi(this,oa)._++,p(this,yn).scheduleUpdate(new ni({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{t(),Oi(this,oa)._--,0===p(this,oa)&&p(this,bn).call(this)}}))})),j(this,oi,(t=>{var e,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:a,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=p(this,me).constants,o=a;null!=(e=p(this,me))&&e.useLocationRank&&(o=Array.isArray(t.polygons)?Math.max(...t.polygons.map((t=>{var e,n;return null!=(e=t.rank)&&e.score?null==(n=t.rank)?void 0:n.score:a})),a):a),p(this,ct).call(this,(()=>{p(this,Se).add({name:lt(t.name),tags:"",id:"MappedinLocation_"+t.id,weight:a,rank:o})})),null!=(n=p(this,me))&&n.searchTags&&Array.isArray(t.tags)&&t.tags.forEach((e=>{p(this,Se).add({name:"",tag:lt(e),id:"MappedinLocation_"+t.id,weight:s,rank:o})})),null!=(r=p(this,me))&&r.searchDescriptions&&p(this,ct).call(this,(()=>p(this,wt).add({description:lt(t.description||""),id:"MappedinLocation_"+t.id,weight:i,rank:o})))})),j(this,si,(t=>{var e,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:a,CATEGORY_NAME_WEIGHT:s}=p(this,me).constants;p(this,ct).call(this,(()=>p(this,Se).add({name:lt(t.name||""),description:"",id:"MappedinCategory_"+t.id,weight:s})));let o=t.locations.reduce(((t,e)=>t+` ${ra} `+e.name),"")+` ${ra}`;if(null!=(e=p(this,me))&&e.searchDescriptionsInCategories&&t.locations.forEach((e=>{null!=e.description&&p(this,ct).call(this,(()=>p(this,Ze).add({id:"MappedinCategory_"+t.id,"category.locations.description":lt(e.description),ref:e.name,weight:r})))})),null!=(n=p(this,me))&&n.searchTagsInCategories){let e=t.locations.reduce(((t,e)=>{var n;return t+(null==(n=e.tags)?void 0:n.reduce(((t,e)=>t+` ${ra} `+e),""))+` ${ra}`}),"");p(this,ct).call(this,(()=>p(this,Ze).add({"category.locations.tags":lt(e),id:"MappedinCategory_"+t.id,weight:i})))}p(this,ct).call(this,(()=>p(this,Ze).add({"category.locations.name":lt(o),id:"MappedinCategory_"+t.id,weight:a})))})),j(this,xt,void 0),j(this,bn,void 0),j(this,ui,(t=>{var e;let n=t.score,{object:r,id:i,weight:a,rank:s}=t,[o,l]=i.split("_"),u=r||p(this,Pt).getCollectionItemById(of[o],l);return s&&null!=(e=p(this,me))&&e.useLocationRank&&(n+=s),a&&(n*=a),{score:n,type:o,object:u}})),j(this,li,((t,e)=>{for(let n in t.match)t.match[n].forEach((r=>{let i=t.ref||t[r]||e.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let e=new RegExp(`[^${ra}]* `+n+` [^${ra}]*`,"ig").exec(t[r]);null!=e&&(i=e[0].slice(1,-1))}e.matches.push({term:n,weight:t.weight,matchesOn:r,value:i})}))})),j(this,Mn,void 0),j(this,wn,void 0),I(this,ia,new ei(Q(G({},t.options),{testMode:!1===(null==e?void 0:e.emitAnalyticsEvents)}))),I(this,me,G(G({},sf),e)),I(this,Pt,t),I(this,vn,new Set(null==(n=p(this,me))?void 0:n.stopWords));let{PRIMARY_INDEX_FUZZYNESS:a,PRIMARY_INDEX_WEIGHT:s,CATEGORY_NAME_WEIGHT:o,RATIO_OF_FUZZY_TO_EXACT:l,RATIO_OF_PREFIX_TO_EXACT:u,PRIMARY_INDEX_TAGS_NAME_WEIGHT:h}=p(this,me).constants,c=["object","query","weight","tag","rank"],d={fields:["query","name","tag"],storeFields:c,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:a},boost:{name:s,query:s,tag:h},weights:{fuzzy:l,prefix:u},boostDocument:t=>t.includes("MappedinLocation")?s:t.includes("MappedinCategory")?o:s},f={fields:["description"],storeFields:c,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(t,e)=>{var n;return null!=(n=p(this,vn))&&n.has(t.toLowerCase())?null:t.toLowerCase()}},m={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...c,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(I(this,xt,new Promise((t=>{I(this,bn,t)}))),null!=(r=p(this,me))&&r.jsonIndex){let{primary:t,secondary:e,extra:n}=JSON.parse(null==(i=p(this,me))?void 0:i.jsonIndex);I(this,Se,St.loadJS(t,d)),I(this,wt,St.loadJS(e,f)),I(this,Ze,St.loadJS(n,m))}else I(this,Se,new St(d)),I(this,wt,new St(f)),I(this,Ze,new St(m)),p(this,Pt).locations.forEach(p(this,oi)),p(this,Pt).categories.forEach(p(this,si));p(this,yn).update(performance.now()),I(this,Mn,so(((t,e)=>{p(this,ia).trackSearchSuggest({query:t,hits:e})}),300)),I(this,wn,so(((t,e)=>{p(this,ia).trackSearch({query:t,hits:e})}),300))}suggest(t){return B(this,null,(function*(){yield p(this,xt);let{PRIMARY_INDEX_FUZZYNESS:e,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:a}=p(this,me).constants,s=p(this,Se).autoSuggest(t,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:e,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:a}});return p(this,Mn).call(this,t,s.length),{total:s.length,hits:s.map((t=>({text:t.suggestion})))}}))}search(t){return B(this,null,(function*(){yield p(this,xt);let e=tt(this,ci,Tl).call(this,t);return p(this,wn).call(this,t,e.length),e}))}toJSON(){return B(this,null,(function*(){return yield p(this,xt),JSON.stringify({primary:p(this,Se),secondary:p(this,wt),extra:p(this,Ze)})}))}addQuery(t){return B(this,null,(function*(){let e,n,{query:r,object:i,weight:a=1}=t;yield p(this,xt),e=i instanceof it?"MappedinLocation":i instanceof At?"MappedinCategory":"Custom","MappedinLocation"===e||"MappedinCategory"===e?n=e+"_"+i.id:"string"==typeof i.id?n="Custom_"+i.id:(n=p(this,kn).get(i),n||(n="Custom_"+ot(),p(this,kn).set(i,n))),p(this,Se).add({id:n,weight:a,object:i,query:lt(r)})}))}};Pt=new WeakMap,Se=new WeakMap,wt=new WeakMap,Ze=new WeakMap,me=new WeakMap,yn=new WeakMap,vn=new WeakMap,ia=new WeakMap,kn=new WeakMap,oa=new WeakMap,ct=new WeakMap,oi=new WeakMap,si=new WeakMap,xt=new WeakMap,bn=new WeakMap,ui=new WeakMap,li=new WeakMap,ci=new WeakSet,Tl=function(t){let e=[],n=lt(t);e=[...p(this,Se).search(n),...p(this,wt).search(n),...p(this,Ze).search(n)].sort(((t,e)=>e.score-t.score));let r={};for(let t of e){let e=p(this,ui).call(this,t);r[t.id]?r[t.id].score+=e.score:r[t.id]=Q(G({},e),{matches:[]}),p(this,li).call(this,t,r[t.id])}return Object.keys(r).map((t=>Q(G({},r[t]),{matches:r[t].matches.sort(((t,e)=>e.weight-t.weight))}))).sort(((t,e)=>e.score-t.score))},Mn=new WeakMap,wn=new WeakMap,f();var Il=(t=>(t.MULTI_GEOMETRY="MULTI_GEOMETRY",t.SINGLE_GEOMETRY="SINGLE_GEOMETRY",t))(Il||{}),Qo=globalThis.fetch;function kt(){if(null==Qo)throw new Error("fetch is not available in your environment. Pass your own function into `setFetch` (node-fetch, etc)");return Qo}function hM(t){Qo=t}var hc,Af=null==(hc=null==x?void 0:x.env)?void 0:hc.npm_package_version;globalThis.btoa||(globalThis.btoa=mc.encode);var Nf=["ar"];function An(t){let e=G(Q(G({},ko),{things:pl}),t);return e.headers=Q(G({},e.headers),{"mappedin-sdk-version":Af}),t.platformString&&(e.headers=Q(G({},e.headers),{"mappedin-platform-version":t.platformString})),e.noAuth||(e.accessToken?e.authorization=`Bearer ${e.accessToken}`:e.clientId&&e.clientSecret&&(e.authorization=`Basic ${globalThis.btoa(`${e.clientId}:${e.clientSecret}`)}`)),e}function fM(t){return B(this,null,(function*(){let{venue:e,clientId:n,clientSecret:r,bundleBaseUri:i}=t,a=new Mt({venue:e}),s=Cu(yield Pf({clientId:n,clientSecret:r,venue:e,bundleBaseUri:i},!1));return a.hydrateFromMVF(s),a}))}function Ef(t){return B(this,null,(function*(){let e=G(G({},{emitAnalyticsEvents:!0}),t),n=An(G({baseUrl:"https://api-gateway.mappedin.com/"},e)),r="public/1/"+(n.useDraftData?"draft/":""),i=new Mt(Q(G({},n),{baseUrl:n.baseUrl+r}));return yield i.fetch(),i}))}function gM(t){Ef=t}var es={shouldPopulateBundledImagesAsBlobs:!(void 0!==globalThis.navigator&&"ReactNative"==globalThis.navigator.product)};function yM(t){return B(this,null,(function*(){let e=An(G(G({baseUrl:"https://api-gateway.mappedin.com/"},es),t)),{url:n,updated_at:r}=yield Sf(t),i=yield kt()(n,{mode:"cors"}),{data:a,format:s="jsonstring"}=yield i.json();if("jsonstring"!==s)throw new Error(`Unrecognized format ${s}`);let o=new Mt(e);return yield o.hydrate(a,e.shouldPopulateBundledImagesAsBlobs),o.updatedAt=r,o}))}function Sf(t){return B(this,null,(function*(){let e=An(G(G({baseUrl:"https://api-gateway.mappedin.com/"},es),t)),{version:n,venue:r}=t,i=`${t.bundleBaseUri||e.baseUrl+`exports/legacy${null!=e.language&&Nf.includes(e.language)?"-"+e.language:""}/1/bundle`}?venue=${r}&version=1.0.0`;return e.language=void 0,yield Cr(e,i)}))}function vM(t,e){return B(this,arguments,(function*(t,{url:e,updated_at:n}){let r=An(G(G({baseUrl:"https://api-gateway.mappedin.com/"},es),t)),i=yield kt()(e,{mode:"cors"}),{data:a,format:s="jsonstring"}=yield i.json();if("jsonstring"!==s)throw new Error(`Unrecognized format${s}`);let o=new Mt(r);return yield o.hydrate(a,r.shouldPopulateBundledImagesAsBlobs),o.updatedAt=n,o}))}function pc(t){return B(this,null,(function*(){let e=An(G(G({baseUrl:"https://api-gateway.mappedin.com/"},ko),t)),{version:n,venue:r}=t,i=`${t.bundleBaseUri||e.baseUrl+"exports/mvf/1/bundle"}?venue=${r}&version=1.0.0`;return e.language=void 0,yield Cr(e,i)}))}function Pf(t,e=!1){return B(this,null,(function*(){return new Promise(((n,r)=>B(this,null,(function*(){try{let i=new TextDecoder,a=i.decode.bind(i),s=yield Promise.resolve().then((()=>(dc(),cc)));if(e){let e=new Blob(['var enc = new TextDecoder();\n\t\t\t\tvar currentTaskName;\n\t\t\t\tself.onmessage = async function({ data }) {\n\t\t\t\t\tif (data[0] === "task") {\n\t\t\t\t\t\tcurrentTaskName = data[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tpostMessage([\n\t\t\t\t\t\t\t "finished",\n\t\t\t\t\t\t [currentTaskName, JSON.parse(enc.decode(data))]\n\t\t\t\t\t\t]);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t postMessage(["error", e.toString()]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t currentTaskName = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t'],{type:"text/javascript"}),{url:i}=yield pc(t),o=new Uint8Array(yield kt()(i).then((t=>t.arrayBuffer()))),l=s.unzipSync(o),u=Object.keys(l),h=Math.min(u.length,Math.min(4,navigator.hardwareConcurrency)||4),c=[],d=u.map((t=>[t,l[t].buffer])),f=1e6,p=[],m=[];for(let t=0;t<d.length;t++){let[,e]=d[t];e.byteLength>=f?p.push(d[t]):e.byteLength<f&&m.push(d[t])}let g={};if(0===m.length)d.forEach((([t])=>{g[t]=JSON.parse(a(l[t]))})),n(g);else{let t=function({data:t}){let e=this;if("finished"===t[0]){let n=m[s];if(null!=n){let[t,r]=n;e.postMessage(["task",t]),e.postMessage(r,[r]),s++}let[r,i]=t[1];g[r]=i,o++}else if("error"===t[0]){let[,e]=t;c.forEach((t=>t.terminate())),r(e)}o===u.length&&(n(g),c.forEach((t=>t.terminate())))};let i=URL.createObjectURL(e);for(let t=0;t<Math.min(h,m.length);t++)c.push(new Worker(i));let s=0,o=0;c.forEach((e=>{if(e.onmessage=t,null!=m[s]){let[t,n]=m[s];e.postMessage(["task",t]),e.postMessage(n,[n]),s++}})),p.forEach((([t])=>{g[t]=JSON.parse(a(l[t])),o++}))}}else{let{url:e}=yield pc(t),r=new Uint8Array(yield kt()(e).then((t=>t.arrayBuffer()))),i=s.unzipSync(r),o=Object.keys(i),l={};for(let t=0;t<o.length;t++){let e=o[t];if(0===e.indexOf("image/")&&-1===e.indexOf("__MACOSX"))l[e]=i[e].buffer;else if("/"!==e.slice(-1))try{l[e]=JSON.parse(a(i[e]))}catch(t){S.warn("bad file",e)}}n(l)}}catch(t){r(t)}}))))}))}export{Il as MAP_RENDER_MODE,Mt as Mappedin,At as MappedinCategory,Da as MappedinCollectionType,Gt as MappedinCoordinate,za as MappedinDestinationSet,Rt as MappedinDirections,qa as MappedinEvent,it as MappedinLocation,Xa as MappedinMap,Za as MappedinMapGroup,rt as MappedinNavigatable,tn as MappedinNode,zt as MappedinPolygon,nn as MappedinRankings,sn as MappedinVenue,cn as MappedinVortex,Ao as OfflineSearch,gM as __setGetVenueMock,vM as downloadBundle,Pf as downloadVenueBundleMVF,Ef as getVenue,yM as getVenueBundle,Sf as getVenueBundleURL,fM as getVenueMVF,pc as getVenueMVFURL,kt as isomorphicFetch,hM as setFetchFn};
|