@mappedin/mappedin-js 5.38.0 → 5.39.0
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/renderer/{GLTFExporter-2NBPPIMJ.js → GLTFExporter-UHKPRCPA.js} +1 -1
- package/lib/esm/renderer/{PerformanceController-3NSTSWVW.js → PerformanceController-QQ7G4Q2S.js} +1 -1
- package/lib/esm/renderer/{browser-M2MBX5DE.js → browser-BHT5JGFQ.js} +1 -1
- package/lib/esm/renderer/{chunk-MZHN6T6O.js → chunk-27JB5UEJ.js} +1 -1
- package/lib/esm/renderer/chunk-Z7IFQHON.js +1 -0
- package/lib/esm/renderer/index.js +1 -1
- package/lib/esm/renderer/{outdoor-context-D7CPE6DM.js → outdoor-context-D4U3HPZG.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-USZPFQFZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var E,Sw=Object.create,zi=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,Iw=Object.getOwnPropertyNames,Cw=Object.getPrototypeOf,jw=Object.prototype.hasOwnProperty,Lw=(e,t,n)=>t in e?zi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>zi(e,"name",{value:t,configurable:!0}),Am=(e,t)=>()=>(e&&(t=e(e=0)),t),G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nw=(e,t)=>{for(var n in t)zi(e,n,{get:t[n],enumerable:!0})},Fw=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Iw(t))!jw.call(e,i)&&i!==n&&zi(e,i,{get:()=>t[i],enumerable:!(r=Aw(t,i))||r.enumerable});return e},Jt=(e,t,n)=>(n=null!=e?Sw(Cw(e)):{},Fw(!t&&e&&e.__esModule?n:zi(n,"default",{value:e,enumerable:!0}),e)),b=(e,t,n)=>(Lw(e,"symbol"!=typeof t?t+"":t,n),n),yl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},w=(e,t,n)=>(yl(e,t,"read from private field"),n?n.call(e):t.get(e)),A=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},j=(e,t,n,r)=>(yl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),bl=(e,t,n,r)=>({set _(r){j(e,t,r,n)},get _(){return w(e,t,r)}}),we=(e,t,n)=>(yl(e,t,"access private method"),n),y=Am((()=>{E={env:{NODE_ENV:"production",npm_package_version:"5.38.0"}}})),Im=G(((e,t)=>{y(),function(n){var r="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==r&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(n=o);var a=s((function(e){this.message=e}),"InvalidCharacterError");a.prototype=new Error,a.prototype.name="InvalidCharacterError";var l=s((function(e){throw new a(e)}),"error"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,h=s((function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",s=-1;++s<t;)r=u.indexOf(e.charAt(s)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),d={encode:s((function(e){e=String(e),/[^\0-\xFF]/.test(e)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,s="",a=-1,c=e.length-o;++a<c;)t=e.charCodeAt(a)<<16,n=e.charCodeAt(++a)<<8,r=e.charCodeAt(++a),s+=u.charAt((i=t+n+r)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(a)<<8,n=e.charCodeAt(++a),s+=u.charAt((i=t+n)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(a),s+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),s}),"encode"),decode:h,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return d}));else if(r&&!r.nodeType)if(i)i.exports=d;else for(var p in d)d.hasOwnProperty(p)&&(r[p]=d[p]);else n.base64=d}(e)})),We=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.areaConversion=e.timeConversion=e.distanceConversion=e.altitudeKeys=e.latitudeKeys=e.longitudeKeys=e.MAXLON=e.MINLON=e.MAXLAT=e.MINLAT=e.earthRadius=e.sexagesimalPattern=void 0;e.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;e.earthRadius=6378137;e.MINLAT=-90;e.MAXLAT=90;e.MINLON=-180;e.MAXLON=180;e.longitudeKeys=["lng","lon","longitude",0];e.latitudeKeys=["lat","latitude",1];e.altitudeKeys=["alt","altitude","elevation","elev",2];e.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};e.timeConversion={m:60,h:3600,d:86400};var t={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};e.areaConversion=t,t.sqm=t.m2,t.sqkm=t.km2,t.sqft=t.ft2,t.sqyd=t.yd2,t.sqin=t.in2})),Vi=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e,t){return t.reduce((function(t,n){if(typeof e>"u"||null===e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&typeof n<"u"&&typeof t>"u"?(t=n,n):t}),void 0)}),"getCoordinateKey");e.default=t})),qi=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"isDecimal");e.default=t})),Ui=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=s((function(e){return t.sexagesimalPattern.test(e.toString().trim())}),"isSexagesimal");e.default=n})),Gi=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=s((function(e){var n=new RegExp(t.sexagesimalPattern).exec(e);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,o=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-o:o}),"sexagesimalToDecimal");e.default=n})),Xo=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=r(Vi());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(r,"_interopRequireDefault"),s(i,"ownKeys"),s(o,"_objectSpread"),s(a,"_defineProperty");var l=s((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:t.longitudeKeys,latitude:t.latitudeKeys,altitude:t.altitudeKeys},i=(0,n.default)(e,r.longitude),s=(0,n.default)(e,r.latitude),a=(0,n.default)(e,r.altitude);return o({latitude:s,longitude:i},a?{altitude:a}:{})}),"getCoordinateKeys");e.default=l})),Ml=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(qi()),n=o(Ui()),r=o(Gi()),i=We();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLAT||o<i.MINLAT):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLatitude");e.default=a})),El=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(qi()),n=o(Ui()),r=o(Gi()),i=We();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLON||o<i.MINLON):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLongitude");e.default=a})),Pl=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(Xo()),n=i(Ml()),r=i(El());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e){var i=(0,t.default)(e),o=i.latitude,s=i.longitude;if(Array.isArray(e)&&e.length>=2)return(0,r.default)(e[0])&&(0,n.default)(e[1]);if(typeof o>"u"||typeof s>"u")return!1;var a=e[s],l=e[o];return!(typeof l>"u"||typeof a>"u"||!1===(0,n.default)(l)||!1===(0,r.default)(a))}),"isValidCoordinate");e.default=o})),es=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(qi()),n=a(Ui()),r=a(Gi()),i=a(Pl()),o=a(Xo());function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(a,"_interopRequireDefault"),s(l,"ownKeys"),s(u,"_objectSpread"),s(c,"_defineProperty");var h=s((function e(s){if((0,t.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var a=(0,o.default)(s);return Array.isArray(s)?s.map((function(t,n){return[0,1].includes(n)?e(t):t})):u(u(u({},s),a.latitude&&c({},a.latitude,e(s[a.latitude]))),a.longitude&&c({},a.longitude,e(s[a.longitude])))}return Array.isArray(s)?s.map((function(t){return(0,i.default)(t)?e(t):t})):s}),"toDecimal");e.default=h})),Tt=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=i(Vi()),r=i(es());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.latitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLatitude");e.default=o})),Pt=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=i(Vi()),r=i(es());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.longitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLongitude");e.default=o})),Zt=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e*Math.PI/180}),"toRad");e.default=t})),ur=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return 180*e/Math.PI}),"toDeg");e.default=t})),qm=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Tt()),n=a(Pt()),r=a(Zt()),i=a(ur()),o=We();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,t.default)(e),c=(0,n.default)(e),h=s/l,d=(0,r.default)(a),p=(0,r.default)(u),f=(0,r.default)(c),g=Math.asin(Math.sin(p)*Math.cos(h)+Math.cos(p)*Math.sin(h)*Math.cos(d)),v=f+Math.atan2(Math.sin(d)*Math.sin(h)*Math.cos(p),Math.cos(h)-Math.sin(p)*Math.sin(g)),y=(0,i.default)(v);return(y<o.MINLON||y>o.MAXLON)&&(v=(v+3*Math.PI)%(2*Math.PI)-Math.PI,y=(0,i.default)(v)),{latitude:(0,i.default)(g),longitude:y}}),"computeDestinationPoint");e.default=l})),Um=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.areaConversion[n];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"convertArea");e.default=n})),Gm=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.distanceConversion[n];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"convertDistance");e.default=n})),Ym=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=We(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return e*t.timeConversion.h*t.distanceConversion.km;case"mph":return e*t.timeConversion.h*t.distanceConversion.mi;default:return e}}),"convertSpeed");e.default=n})),Hm=G((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"imprecise"),u=s((function(e){var n=t(e.toString().split("."),2),r=n[0],i=n[1],o=Math.abs(Number(r)),s=l(60*+("0."+(i||0))),a=Math.floor(s),u=l(60*(s%a||0));return o+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"decimal2sexagesimal");e.default=u})),Cl=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e>1?1:e<-1?-1:e}),"robustAcos");e.default=t})),zn=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Tt()),n=a(Pt()),r=a(Zt()),i=a(Cl()),o=We();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;a=typeof a<"u"&&!isNaN(a)?a:1;var l=(0,t.default)(e),u=(0,n.default)(e),c=(0,t.default)(s),h=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(c))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(c))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(h))))*o.earthRadius;return Math.round(d/a)*a}),"getDistance");e.default=l})),jl=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default;return r="function"==typeof r?r:t.default,n.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"orderByDistance");e.default=r})),Zm=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(jl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){return(0,t.default)(e,n)[0]}),"findNearest");e.default=r})),tg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Zt()),n=o(Tt()),r=o(Pt()),i=We();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){var o=0;if(e.length>2){for(var s,a,l,u=0;u<e.length;u++){u===e.length-2?(s=e.length-2,a=e.length-1,l=0):u===e.length-1?(s=e.length-1,a=0,l=1):(s=u,a=u+1,l=u+2);var c=(0,r.default)(e[s]),h=(0,n.default)(e[a]),d=(0,r.default)(e[l]);o+=((0,t.default)(d)-(0,t.default)(c))*Math.sin((0,t.default)(h))}o=o*i.earthRadius*i.earthRadius/2}return Math.abs(o)}),"getAreaOfPolygon");e.default=a})),Fl=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Tt()),n=r(Pt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,r){var i=(0,t.default)(r),o=(0,n.default)(r);return{maxLat:Math.max(i,e.maxLat),minLat:Math.min(i,e.minLat),maxLng:Math.max(o,e.maxLng),minLng:Math.min(o,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"getBounds");e.default=i})),rg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Tt()),n=a(Pt()),r=a(Zt()),i=a(ur()),o=We();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a,l,u=(0,t.default)(e),c=(0,n.default)(e),h=(0,r.default)(u),d=(0,r.default)(c),p=s/o.earthRadius,f=h-p,g=h+p,v=(0,r.default)(o.MAXLAT),y=(0,r.default)(o.MINLAT),m=(0,r.default)(o.MAXLON),b=(0,r.default)(o.MINLON);if(f>y&&g<v){var w=Math.asin(Math.sin(p)/Math.cos(h));(a=d-w)<b&&(a+=2*Math.PI),(l=d+w)>m&&(l-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),a=b,l=m;return[{latitude:(0,i.default)(f),longitude:(0,i.default)(a)},{latitude:(0,i.default)(g),longitude:(0,i.default)(l)}]}),"getBoundsOfDistance");e.default=l})),og=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Tt()),n=o(Pt()),r=o(Zt()),i=o(ur());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var o=e.length,s=e.reduce((function(e,i){var o=(0,r.default)((0,t.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:e.X+Math.cos(o)*Math.cos(s),Y:e.Y+Math.cos(o)*Math.sin(s),Z:e.Z+Math.sin(o)}}),{X:0,Y:0,Z:0}),a=s.X/o,l=s.Y/o,u=s.Z/o;return{longitude:(0,i.default)(Math.atan2(l,a)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(a*a+l*l)))}}),"getCenter");e.default=a})),sg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Fl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e){var n=(0,t.default)(e),r=n.minLat+(n.maxLat-n.minLat)/2,i=n.minLng+(n.maxLng-n.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}}),"getCenterOfBounds");e.default=r})),Dl=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Tt()),n=o(Pt()),r=o(Zt()),i=o(ur());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,r.default)((0,n.default)(o))-(0,r.default)((0,n.default)(e)),a=Math.log(Math.tan((0,r.default)((0,t.default)(o))/2+Math.PI/4)/Math.tan((0,r.default)((0,t.default)(e))/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,a))+360)%360}),"getRhumbLineBearing");e.default=a})),dg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Dl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i="function"==typeof r?r(e,n):(0,t.default)(e,n);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"}}),"getCompassDirection");e.default=r})),zl=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(zn()),n=r(Cl());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r,i){var o=(0,t.default)(r,e),s=(0,t.default)(e,i),a=(0,t.default)(r,i),l=Math.acos((0,n.default)((o*o+a*a-s*s)/(2*o*a))),u=Math.acos((0,n.default)((s*s+a*a-o*o)/(2*s*a)));return l>Math.PI/2?o:u>Math.PI/2?s:Math.sin(l)*o}),"getDistanceFromLine");e.default=i})),gg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Tt()),n=o(Pt()),r=o(Zt()),i=o(ur());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,t.default)(o),a=(0,n.default)(o),l=(0,t.default)(e),u=(0,n.default)(e);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(a)-(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)(a)-(0,r.default)(u))))+360)%360}),"getGreatCircleBearing");e.default=a})),vg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?s((function(e){return typeof e}),"_typeof"):s((function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),"_typeof"))(e)}s(n,"_interopRequireDefault"),s(r,"_typeof");var i=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.default;return e.reduce((function(e,t){return"object"===r(e)&&null!==e.last&&(e.distance+=n(t,e.last)),e.last=t,e}),{last:null,distance:0}).distance}),"getPathLength");e.default=i})),kg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Tt()),n=o(Pt()),r=o(Zt()),i=We();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=typeof s<"u"&&!isNaN(s)?s:1;var a,l,u,c,h,d,p,f=(0,t.default)(e),g=(0,n.default)(e),v=(0,t.default)(o),y=(0,n.default)(o),m=6356752.314245,b=1/298.257223563,w=(0,r.default)(y-g),_=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(f)))),M=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(v)))),x=Math.sin(_),S=Math.cos(_),k=Math.sin(M),O=Math.cos(M),E=w,A=100;do{var I=Math.sin(E),C=Math.cos(E);if(0===(d=Math.sqrt(O*I*(O*I)+(S*k-x*O*C)*(S*k-x*O*C))))return 0;a=x*k+S*O*C,l=Math.atan2(d,a),h=a-2*x*k/(c=1-(u=S*O*I/d)*u),isNaN(h)&&(h=0);var P=b/16*c*(4+b*(4-3*c));p=E,E=w+(1-P)*b*u*(l+P*d*(h+P*a*(2*h*h-1)))}while(Math.abs(E-p)>1e-12&&--A>0);if(0===A)return NaN;var T=c*(i.earthRadius*i.earthRadius-m*m)/(m*m),F=1+T/16384*(4096+T*(T*(320-175*T)-768)),j=T/1024*(256+T*(T*(74-47*T)-128)),N=j*d*(h+j/4*(a*(2*h*h-1)-j/6*h*(4*d*d-3)*(4*h*h-3))),R=m*F*(l-N);return Math.round(R/s)*s}),"getDistance");e.default=a})),_g=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return/^NNE|NE|NNW|N$/.test(e)?"N":/^ENE|E|ESE|SE$/.test(e)?"E":/^SSE|S|SSW|SW$/.test(e)?"S":/^WSW|W|WNW|NW$/.test(e)?"W":void 0}),"getRoughCompassDirection");e.default=t})),Mg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i=r(e,n),o=Number(n.time)-Number(e.time),s=i/o*1e3;return s}),"getSpeed");e.default=r})),xg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(n,e)+(0,t.default)(e,r)===(0,t.default)(n,r)}),"isPointInLine");e.default=r})),Tg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Tt()),n=r(Pt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r){for(var i=!1,o=r.length,s=-1,a=o-1;++s<o;a=s)((0,n.default)(r[s])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[a])||(0,n.default)(r[a])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[s]))&&(0,t.default)(e)<((0,t.default)(r[a])-(0,t.default)(r[s]))*((0,n.default)(e)-(0,n.default)(r[s]))/((0,n.default)(r[a])-(0,n.default)(r[s]))+(0,t.default)(r[s])&&(i=!i);return i}),"isPointInPolygon");e.default=i})),Pg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r,i){return(0,t.default)(e,n,r)<i}),"isPointNearLine");e.default=r})),Og=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(zn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(e,n)<r}),"isPointWithinRadius");e.default=r})),Ag=G((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}y(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){if(!e.startsWith("POLYGON"))throw new Error("Invalid wkt.");return e.slice(e.indexOf("(")+2,e.indexOf(")")).split(", ").map((function(e){var n=t(e.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))}),"wktToPolygon");e.default=l})),Cg=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0});var t={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(e,"computeDestinationPoint",{enumerable:!0,get:s((function(){return n.default}),"get")}),Object.defineProperty(e,"convertArea",{enumerable:!0,get:s((function(){return r.default}),"get")}),Object.defineProperty(e,"convertDistance",{enumerable:!0,get:s((function(){return i.default}),"get")}),Object.defineProperty(e,"convertSpeed",{enumerable:!0,get:s((function(){return o.default}),"get")}),Object.defineProperty(e,"decimalToSexagesimal",{enumerable:!0,get:s((function(){return a.default}),"get")}),Object.defineProperty(e,"findNearest",{enumerable:!0,get:s((function(){return l.default}),"get")}),Object.defineProperty(e,"getAreaOfPolygon",{enumerable:!0,get:s((function(){return u.default}),"get")}),Object.defineProperty(e,"getBounds",{enumerable:!0,get:s((function(){return c.default}),"get")}),Object.defineProperty(e,"getBoundsOfDistance",{enumerable:!0,get:s((function(){return h.default}),"get")}),Object.defineProperty(e,"getCenter",{enumerable:!0,get:s((function(){return d.default}),"get")}),Object.defineProperty(e,"getCenterOfBounds",{enumerable:!0,get:s((function(){return p.default}),"get")}),Object.defineProperty(e,"getCompassDirection",{enumerable:!0,get:s((function(){return f.default}),"get")}),Object.defineProperty(e,"getCoordinateKey",{enumerable:!0,get:s((function(){return g.default}),"get")}),Object.defineProperty(e,"getCoordinateKeys",{enumerable:!0,get:s((function(){return v.default}),"get")}),Object.defineProperty(e,"getDistance",{enumerable:!0,get:s((function(){return m.default}),"get")}),Object.defineProperty(e,"getDistanceFromLine",{enumerable:!0,get:s((function(){return b.default}),"get")}),Object.defineProperty(e,"getGreatCircleBearing",{enumerable:!0,get:s((function(){return w.default}),"get")}),Object.defineProperty(e,"getLatitude",{enumerable:!0,get:s((function(){return _.default}),"get")}),Object.defineProperty(e,"getLongitude",{enumerable:!0,get:s((function(){return M.default}),"get")}),Object.defineProperty(e,"getPathLength",{enumerable:!0,get:s((function(){return x.default}),"get")}),Object.defineProperty(e,"getPreciseDistance",{enumerable:!0,get:s((function(){return S.default}),"get")}),Object.defineProperty(e,"getRhumbLineBearing",{enumerable:!0,get:s((function(){return k.default}),"get")}),Object.defineProperty(e,"getRoughCompassDirection",{enumerable:!0,get:s((function(){return O.default}),"get")}),Object.defineProperty(e,"getSpeed",{enumerable:!0,get:s((function(){return E.default}),"get")}),Object.defineProperty(e,"isDecimal",{enumerable:!0,get:s((function(){return A.default}),"get")}),Object.defineProperty(e,"isPointInLine",{enumerable:!0,get:s((function(){return I.default}),"get")}),Object.defineProperty(e,"isPointInPolygon",{enumerable:!0,get:s((function(){return C.default}),"get")}),Object.defineProperty(e,"isPointNearLine",{enumerable:!0,get:s((function(){return P.default}),"get")}),Object.defineProperty(e,"isPointWithinRadius",{enumerable:!0,get:s((function(){return T.default}),"get")}),Object.defineProperty(e,"isSexagesimal",{enumerable:!0,get:s((function(){return F.default}),"get")}),Object.defineProperty(e,"isValidCoordinate",{enumerable:!0,get:s((function(){return j.default}),"get")}),Object.defineProperty(e,"isValidLatitude",{enumerable:!0,get:s((function(){return N.default}),"get")}),Object.defineProperty(e,"isValidLongitude",{enumerable:!0,get:s((function(){return R.default}),"get")}),Object.defineProperty(e,"orderByDistance",{enumerable:!0,get:s((function(){return L.default}),"get")}),Object.defineProperty(e,"sexagesimalToDecimal",{enumerable:!0,get:s((function(){return D.default}),"get")}),Object.defineProperty(e,"toDecimal",{enumerable:!0,get:s((function(){return B.default}),"get")}),Object.defineProperty(e,"toRad",{enumerable:!0,get:s((function(){return z.default}),"get")}),Object.defineProperty(e,"toDeg",{enumerable:!0,get:s((function(){return W.default}),"get")}),Object.defineProperty(e,"wktToPolygon",{enumerable:!0,get:s((function(){return V.default}),"get")});var n=q(qm()),r=q(Um()),i=q(Gm()),o=q(Ym()),a=q(Hm()),l=q(Zm()),u=q(tg()),c=q(Fl()),h=q(rg()),d=q(og()),p=q(sg()),f=q(dg()),g=q(Vi()),v=q(Xo()),m=q(zn()),b=q(zl()),w=q(gg()),_=q(Tt()),M=q(Pt()),x=q(vg()),S=q(kg()),k=q(Dl()),O=q(_g()),E=q(Mg()),A=q(qi()),I=q(xg()),C=q(Tg()),P=q(Pg()),T=q(Og()),F=q(Ui()),j=q(Pl()),N=q(Ml()),R=q(El()),L=q(jl()),D=q(Gi()),B=q(es()),z=q(Zt()),W=q(ur()),V=q(Ag()),U=We();function q(e){return e&&e.__esModule?e:{default:e}}Object.keys(U).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(e,n,{enumerable:!0,get:s((function(){return U[n]}),"get")})})),s(q,"_interopRequireDefault")})),Ec=G(((e,t)=>{y(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",S="BlackBerry",k="Browser",O="Chrome",E="Firefox",A="Google",I="Huawei",C="LG",P="Microsoft",T="Motorola",F="Opera",j="Samsung",N="Sony",R="Xiaomi",L="Zebra",D="Facebook",B=s((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),z=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),W=s((function(e,t){return typeof e===l&&-1!==V(t).indexOf(V(e))}),"has"),V=s((function(e){return e.toLowerCase()}),"lowerize"),U=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),q=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,275)}),"trim"),G=s((function(e,t){for(var n,o,s,l,u,c,h=0;h<t.length&&!u;){var d=t[h],p=t[h+1];for(n=o=0;n<d.length&&!u;)if(u=d[n++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===a&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;h+=2}}),"rgxMapper"),X=s((function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(W(t[n][i],e))return"?"===n?r:n}else if(W(t[n],e))return"?"===n?r:n;return e}),"strMapper"),J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+k]],[/\bqbcore\/([\w\.]+)/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,E+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,E]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+k],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,D],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,E+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,V]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,j],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,j],[h,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,v]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,I],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,I],[h,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,R],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,R],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,T],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,T],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,C],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,C],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[h,v]],[/(pixel c)\b/i],[u,[d,A],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,A],[h,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,N],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,N],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,S],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,v]],[/(nexus 9)/i],[u,[d,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[h,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[h,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[h,y]],[/(surface duo)/i],[u,[d,P],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,v]],[/(u304aa)/i],[u,[d,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[h,y]],[/\b(k88) b/i],[u,[d,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[h,y]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[d,u,[h,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,P],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,L],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,L],[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,g]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,g]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,P],[h,g]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,j],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,C],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,O+"cast"],[d,A],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[h,m]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,m]],[/(bravia[\w- ]+) bui/i],[u,[d,N],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,q],[u,q],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,A],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,L],[h,b]],[/(quest( 2)?)/i],[u,[d,D],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,X,J]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,X,J]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,E+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,O+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},Y=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof Y))return new Y(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?B(K,t):K;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.browser),e.major=U(e.version),e},this.getCPU=function(){var e={};return e[f]=r,G.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,G.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>275?q(e,275):e,this},this.setUA(i),this}),"UAParser");Y.VERSION="0.7.31",Y.BROWSER=z([c,p,"major"]),Y.CPU=z([f]),Y.DEVICE=z([u,d,h,g,v,m,y,b,w]),Y.ENGINE=Y.OS=z([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=Y),e.UAParser=Y):typeof define===i&&define.amd?define((function(){return Y})):typeof n!==o&&(n.UAParser=Y);var H=typeof n!==o&&(n.jQuery||n.Zepto);if(H&&!H.ua){var $=new Y;H.ua=$.getResult(),H.ua.get=function(){return $.getUA()},H.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)H.ua[n]=t[n]}}}("object"==typeof window?window:e)})),cy=G(((e,t)=>{y();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",h="[object Map]",d="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",v="[object Set]",m="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[i]=S[o]=S[w]=S[a]=S[_]=S[l]=S[u]=S[c]=S[h]=S[d]=S[p]=S[g]=S[v]=S[m]=S[b]=!1;var k="object"==typeof global&&global&&global.Object===Object&&global,O="object"==typeof self&&self&&self.Object===Object&&self,E=k||O||Function("return this")(),A="object"==typeof e&&e&&!e.nodeType&&e,I=A&&"object"==typeof t&&t&&!t.nodeType&&t,C=I&&I.exports===A,P=C&&k.process,T=function(){try{return P&&P.binding&&P.binding("util")}catch{}}(),F=T&&T.isTypedArray;function j(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function N(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function R(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function L(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function D(e){return function(t){return e(t)}}function B(e,t){return e.has(t)}function z(e,t){return null==e?void 0:e[t]}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function V(e,t){return function(n){return e(t(n))}}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}s(j,"arrayFilter"),s(N,"arrayPush"),s(R,"arraySome"),s(L,"baseTimes"),s(D,"baseUnary"),s(B,"cacheHas"),s(z,"getValue"),s(W,"mapToArray"),s(V,"overArg"),s(U,"setToArray");var q,G=Array.prototype,X=Function.prototype,J=Object.prototype,K=E["__core-js_shared__"],Y=X.toString,H=J.hasOwnProperty,$=(q=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Z=J.toString,Q=RegExp("^"+Y.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=C?E.Buffer:void 0,te=E.Symbol,ne=E.Uint8Array,re=J.propertyIsEnumerable,ie=G.splice,oe=te?te.toStringTag:void 0,se=Object.getOwnPropertySymbols,ae=ee?ee.isBuffer:void 0,le=V(Object.keys,Object),ue=ct(E,"DataView"),ce=ct(E,"Map"),he=ct(E,"Promise"),de=ct(E,"Set"),pe=ct(E,"WeakMap"),fe=ct(Object,"create"),ge=bt(ue),ve=bt(ce),ye=bt(he),me=bt(de),be=bt(pe),we=te?te.prototype:void 0,_e=we?we.valueOf:void 0;function Me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(){this.__data__=fe?fe(null):{},this.size=0}function Se(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ke(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return H.call(t,e)?t[e]:void 0}function Oe(e){var t=this.__data__;return fe?void 0!==t[e]:H.call(t,e)}function Ee(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function Ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ie(){this.__data__=[],this.size=0}function Ce(e){var t=this.__data__,n=He(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)}function Pe(e){var t=this.__data__,n=He(t,e);return n<0?void 0:t[n][1]}function Te(e){return He(this.__data__,e)>-1}function Fe(e,t){var n=this.__data__,r=He(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function je(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(){this.size=0,this.__data__={hash:new Me,map:new(ce||Ae),string:new Me}}function Re(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function Le(e){return ut(this,e).get(e)}function De(e){return ut(this,e).has(e)}function Be(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ze(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new je;++t<n;)this.add(e[t])}function We(e){return this.__data__.set(e,n),this}function Ve(e){return this.__data__.has(e)}function Ue(e){var t=this.__data__=new Ae(e);this.size=t.size}function qe(){this.__data__=new Ae,this.size=0}function Ge(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Xe(e){return this.__data__.get(e)}function Je(e){return this.__data__.has(e)}function Ke(e,t){var n=this.__data__;if(n instanceof Ae){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new je(r)}return n.set(e,t),this.size=n.size,this}function Ye(e,t){var n=Mt(e),r=!n&&_t(e),i=!n&&!r&&St(e),o=!n&&!r&&!i&&Ct(e),s=n||r||i||o,a=s?L(e.length,String):[],l=a.length;for(var u in e)(t||H.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&a.push(u);return a}function He(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function $e(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(e))}function Ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?ht(e):mt(e)}function Qe(e){return It(e)&&Ze(e)==i}function et(e,t,n,r,i){return e===t||(null==e||null==t||!It(e)&&!It(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,s,a){var l=Mt(e),u=Mt(t),c=l?o:pt(e),h=u?o:pt(t),d=(c=c==i?p:c)==p,f=(h=h==i?p:h)==p,g=c==h;if(g&&St(e)){if(!St(t))return!1;l=!0,d=!1}if(g&&!d)return a||(a=new Ue),l||Ct(e)?ot(e,t,n,r,s,a):st(e,t,c,n,r,s,a);if(!(1&n)){var v=d&&H.call(e,"__wrapped__"),y=f&&H.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,b=y?t.value():t;return a||(a=new Ue),s(m,b,n,r,a)}}return!!g&&(a||(a=new Ue),at(e,t,n,r,s,a))}function nt(e){return!(!At(e)||vt(e))&&(Ot(e)?Q:M).test(bt(e))}function rt(e){return It(e)&&Et(e.length)&&!!S[Ze(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var n in Object(e))H.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ot(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,d=2&n?new ze:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var p=e[c],f=t[c];if(r)var g=s?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(d){if(!R(t,(function(e,t){if(!B(d,t)&&(p===e||i(p,e,n,r,o)))return d.push(t)}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function st(e,t,n,r,i,o,s){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case a:case l:case d:return wt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case h:var c=W;case v:var p=1&r;if(c||(c=U),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;r|=2,s.set(e,t);var y=ot(c(e),c(t),r,i,o,s);return s.delete(e),y;case"[object Symbol]":if(_e)return _e.call(e)==_e.call(t)}return!1}function at(e,t,n,r,i,o){var s=1&n,a=lt(e),l=a.length;if(l!=lt(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?c in t:H.call(t,c)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var d=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<l;){var f=e[c=a[u]],g=t[c];if(r)var v=s?r(g,f,c,t,e,o):r(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,n,r,o):v)){d=!1;break}p||(p="constructor"==c)}if(d&&!p){var y=e.constructor,m=t.constructor;y!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m)&&(d=!1)}return o.delete(e),o.delete(t),d}function lt(e){return $e(e,Pt,dt)}function ut(e,t){var n=e.__data__;return gt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=z(e,t);return nt(n)?n:void 0}function ht(e){var t=H.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch{}var i=Z.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Se,"hashDelete"),s(ke,"hashGet"),s(Oe,"hashHas"),s(Ee,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Se,Me.prototype.get=ke,Me.prototype.has=Oe,Me.prototype.set=Ee,s(Ae,"ListCache"),s(Ie,"listCacheClear"),s(Ce,"listCacheDelete"),s(Pe,"listCacheGet"),s(Te,"listCacheHas"),s(Fe,"listCacheSet"),Ae.prototype.clear=Ie,Ae.prototype.delete=Ce,Ae.prototype.get=Pe,Ae.prototype.has=Te,Ae.prototype.set=Fe,s(je,"MapCache"),s(Ne,"mapCacheClear"),s(Re,"mapCacheDelete"),s(Le,"mapCacheGet"),s(De,"mapCacheHas"),s(Be,"mapCacheSet"),je.prototype.clear=Ne,je.prototype.delete=Re,je.prototype.get=Le,je.prototype.has=De,je.prototype.set=Be,s(ze,"SetCache"),s(We,"setCacheAdd"),s(Ve,"setCacheHas"),ze.prototype.add=ze.prototype.push=We,ze.prototype.has=Ve,s(Ue,"Stack"),s(qe,"stackClear"),s(Ge,"stackDelete"),s(Xe,"stackGet"),s(Je,"stackHas"),s(Ke,"stackSet"),Ue.prototype.clear=qe,Ue.prototype.delete=Ge,Ue.prototype.get=Xe,Ue.prototype.has=Je,Ue.prototype.set=Ke,s(Ye,"arrayLikeKeys"),s(He,"assocIndexOf"),s($e,"baseGetAllKeys"),s(Ze,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(nt,"baseIsNative"),s(rt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(st,"equalByTag"),s(at,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(ht,"getRawTag");var dt=se?function(e){return null==e?[]:(e=Object(e),j(se(e),(function(t){return re.call(e,t)})))}:Tt,pt=Ze;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function gt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function vt(e){return!!$&&$ in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)}function mt(e){return Z.call(e)}function bt(e){if(null!=e){try{return Y.call(e)}catch{}try{return e+""}catch{}}return""}function wt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=_||ce&&pt(new ce)!=h||he&&pt(he.resolve())!=f||de&&pt(new de)!=v||pe&&pt(new pe)!=b)&&(pt=s((function(e){var t=Ze(e),n=t==p?e.constructor:void 0,r=n?bt(n):"";if(r)switch(r){case ge:return _;case ve:return h;case ye:return f;case me:return v;case be:return b}return t}),"getTag")),s(ft,"isIndex"),s(gt,"isKeyable"),s(vt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(bt,"toSource"),s(wt,"eq");var _t=Qe(function(){return arguments}())?Qe:function(e){return It(e)&&H.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&Et(e.length)&&!Ot(e)}s(xt,"isArrayLike");var St=ae||Ft;function kt(e,t){return et(e,t)}function Ot(e){if(!At(e))return!1;var t=Ze(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Et(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function At(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function It(e){return null!=e&&"object"==typeof e}s(kt,"isEqual"),s(Ot,"isFunction"),s(Et,"isLength"),s(At,"isObject"),s(It,"isObjectLike");var Ct=F?D(F):rt;function Pt(e){return xt(e)?Ye(e):it(e)}function Tt(){return[]}function Ft(){return!1}s(Pt,"keys"),s(Tt,"stubArray"),s(Ft,"stubFalse"),t.exports=kt})),zy=G(((e,t)=>{y();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",a="[object Object]",l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[a]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var h="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,p=h||d||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,v=g&&g.exports===f,m=v&&h.process,b=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),w=b&&b.isTypedArray;function _(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function M(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function x(e){return function(t){return e(t)}}function S(e,t){return null==e?void 0:e[t]}function k(e,t){return function(n){return e(t(n))}}s(_,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(S,"getValue"),s(k,"overArg");var O,E=Array.prototype,A=Function.prototype,I=Object.prototype,C=p["__core-js_shared__"],P=A.toString,T=I.hasOwnProperty,F=(O=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",j=I.toString,N=P.call(Object),R=RegExp("^"+P.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=v?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,z=L?L.allocUnsafe:void 0,W=k(Object.getPrototypeOf,Object),V=Object.create,U=I.propertyIsEnumerable,q=E.splice,G=D?D.toStringTag:void 0,X=function(){try{var e=Xe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),J=L?L.isBuffer:void 0,K=Math.max,Y=Date.now,H=Xe(p,"Map"),$=Xe(Object,"create"),Z=function(){function e(){}return s(e,"object"),function(t){if(!gt(t))return{};if(V)return V(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(){this.__data__=$?$(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ne(e){var t=this.__data__;if($){var r=t[e];return r===n?void 0:r}return T.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return $?void 0!==t[e]:T.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$&&void 0===t?n:t,this}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(){this.__data__=[],this.size=0}function ae(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():q.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]}function ue(e){return Oe(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=Oe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function de(){this.size=0,this.__data__={hash:new Q,map:new(H||oe),string:new Q}}function pe(e){var t=Ge(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return Ge(this,e).get(e)}function ge(e){return Ge(this,e).has(e)}function ve(e,t){var n=Ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ye(e){var t=this.__data__=new oe(e);this.size=t.size}function me(){this.__data__=new oe,this.size=0}function be(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function we(e){return this.__data__.get(e)}function _e(e){return this.__data__.has(e)}function Me(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(e,t),this.size=n.size,this}function xe(e,t){var n=ut(e),r=!n&<(e),i=!n&&!r&&dt(e),o=!n&&!r&&!i&&mt(e),s=n||r||i||o,a=s?M(e.length,String):[],l=a.length;for(var u in e)(t||T.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ye(u,l)))&&a.push(u);return a}function Se(e,t,n){(void 0!==n&&!at(e[t],n)||void 0===n&&!(t in e))&&Ee(e,t,n)}function ke(e,t,n){var r=e[t];(!T.call(e,t)||!at(r,n)||void 0===n&&!(t in e))&&Ee(e,t,n)}function Oe(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}function Ee(e,t,n){"__proto__"==t&&X?X(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(ne,"hashGet"),s(re,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=ne,Q.prototype.has=re,Q.prototype.set=ie,s(oe,"ListCache"),s(se,"listCacheClear"),s(ae,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=se,oe.prototype.delete=ae,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(he,"MapCache"),s(de,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),he.prototype.clear=de,he.prototype.delete=pe,he.prototype.get=fe,he.prototype.has=ge,he.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(be,"stackDelete"),s(we,"stackGet"),s(_e,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=be,ye.prototype.get=we,ye.prototype.has=_e,ye.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Se,"assignMergeValue"),s(ke,"assignValue"),s(Oe,"assocIndexOf"),s(Ee,"baseAssignValue");var Ae=qe();function Ie(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?Je(e):tt(e)}function Ce(e){return vt(e)&&Ie(e)==i}function Pe(e){return!(!gt(e)||Ze(e))&&(pt(e)?R:l).test(st(e))}function Te(e){return vt(e)&&ft(e.length)&&!!c[Ie(e)]}function Fe(e){if(!gt(e))return et(e);var t=Qe(e),n=[];for(var r in e)"constructor"==r&&(t||!T.call(e,r))||n.push(r);return n}function je(e,t,n,r,i){e!==t&&Ae(t,(function(o,s){if(i||(i=new ye),gt(o))Ne(e,t,s,n,je,r,i);else{var a=r?r(rt(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Se(e,s,a)}}),wt)}function Ne(e,t,n,r,i,o,s){var a=rt(e,n),l=rt(t,n),u=s.get(l);if(u)Se(e,n,u);else{var c=o?o(a,l,n+"",e,t,s):void 0,h=void 0===c;if(h){var d=ut(l),p=!d&&dt(l),f=!d&&!p&&mt(l);c=l,d||p||f?ut(a)?c=a:ht(a)?c=We(a):p?(h=!1,c=De(l,!0)):f?(h=!1,c=ze(l,!0)):c=[]:yt(l)||lt(l)?(c=a,lt(a)?c=bt(a):(!gt(a)||pt(a))&&(c=Ke(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),Se(e,n,c)}}function Re(e,t){return it(nt(e,t,xt),e+"")}s(Ie,"baseGetTag"),s(Ce,"baseIsArguments"),s(Pe,"baseIsNative"),s(Te,"baseIsTypedArray"),s(Fe,"baseKeysIn"),s(je,"baseMerge"),s(Ne,"baseMergeDeep"),s(Re,"baseRest");var Le=X?function(e,t){return X(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function De(e,t){if(t)return e.slice();var n=e.length,r=z?z(n):new e.constructor(n);return e.copy(r),r}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function ze(e,t){var n=t?Be(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function We(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ve(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?Ee(n,a,l):ke(n,a,l)}return n}function Ue(e){return Re((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&He(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}function qe(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function Ge(e,t){var n=e.__data__;return $e(t)?n["string"==typeof t?"string":"hash"]:n.map}function Xe(e,t){var n=S(e,t);return Pe(n)?n:void 0}function Je(e){var t=T.call(e,G),n=e[G];try{e[G]=void 0;var r=!0}catch{}var i=j.call(e);return r&&(t?e[G]=n:delete e[G]),i}function Ke(e){return"function"!=typeof e.constructor||Qe(e)?{}:Z(W(e))}function Ye(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t,n){if(!gt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Ye(t,n.length):"string"==r&&t in n)&&at(n[t],e)}function $e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ze(e){return!!F&&F in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||I)}function et(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function tt(e){return j.call(e)}function nt(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=K(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),_(e,this,a)}}function rt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(De,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(ze,"cloneTypedArray"),s(We,"copyArray"),s(Ve,"copyObject"),s(Ue,"createAssigner"),s(qe,"createBaseFor"),s(Ge,"getMapData"),s(Xe,"getNative"),s(Je,"getRawTag"),s(Ke,"initCloneObject"),s(Ye,"isIndex"),s(He,"isIterateeCall"),s($e,"isKeyable"),s(Ze,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(nt,"overRest"),s(rt,"safeGet");var it=ot(Le);function ot(e){var t=0,n=0;return function(){var r=Y(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function st(e){if(null!=e){try{return P.call(e)}catch{}try{return e+""}catch{}}return""}function at(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(st,"toSource"),s(at,"eq");var lt=Ce(function(){return arguments}())?Ce:function(e){return vt(e)&&T.call(e,"callee")&&!U.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function ht(e){return vt(e)&&ct(e)}s(ct,"isArrayLike"),s(ht,"isArrayLikeObject");var dt=J||St;function pt(e){if(!gt(e))return!1;var t=Ie(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function gt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function vt(e){return null!=e&&"object"==typeof e}function yt(e){if(!vt(e)||Ie(e)!=a)return!1;var t=W(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&P.call(n)==N}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=w?x(w):Te;function bt(e){return Ve(e,wt(e))}function wt(e){return ct(e)?xe(e,!0):Fe(e)}s(bt,"toPlainObject"),s(wt,"keysIn");var _t=Ue((function(e,t,n){je(e,t,n)}));function Mt(e){return function(){return e}}function xt(e){return e}function St(){return!1}s(Mt,"constant"),s(xt,"identity"),s(St,"stubFalse"),t.exports=_t})),By=G(((e,t)=>{y(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",S="BlackBerry",k="Browser",O="Chrome",E="Firefox",A="Google",I="Huawei",C="LG",P="Microsoft",T="Motorola",F="Opera",j="Samsung",N="Sharp",R="Sony",L="Xiaomi",D="Zebra",B="Facebook",z=s((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),W=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),V=s((function(e,t){return typeof e===l&&-1!==U(t).indexOf(U(e))}),"has"),U=s((function(e){return e.toLowerCase()}),"lowerize"),q=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),G=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)}),"trim"),X=s((function(e,t){for(var n,o,s,l,u,c,h=0;h<t.length&&!u;){var d=t[h],p=t[h+1];for(n=o=0;n<d.length&&!u;)if(u=d[n++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===a&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;h+=2}}),"rgxMapper"),J=s((function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(V(t[n][i],e))return"?"===n?r:n}else if(V(t[n],e))return"?"===n?r:n;return e}),"strMapper"),K={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,E+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,E]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+k]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+k],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,E+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,U]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",U]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,j],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,j],[h,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/(macintosh);/i],[u,[d,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,I],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,I],[h,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,L],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,L],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,T],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,T],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,C],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,C],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[h,v]],[/(pixel c)\b/i],[u,[d,A],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,A],[h,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,R],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,R],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,S],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,v]],[/(nexus 9)/i],[u,[d,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[h,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,N],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[h,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[h,y]],[/(surface duo)/i],[u,[d,P],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,v]],[/(u304aa)/i],[u,[d,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[h,y]],[/\b(k88) b/i],[u,[d,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[h,y]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[d,u,[h,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,P],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,D],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,D],[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,g]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,g]],[/(playstation [345portablevi]+)/i],[u,[d,R],[h,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,P],[h,g]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,j],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,C],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,O+"cast"],[d,A],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[h,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[d,N],[h,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[d,R],[h,m]],[/(mitv-\w{5}) bui/i],[u,[d,L],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,G],[u,G],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,A],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,D],[h,b]],[/(quest( 2)?)/i],[u,[d,B],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,J,K]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,J,K]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,E+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,O+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},H=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof H))return new H(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?z(Y,t):Y;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.browser),e.major=q(e.version),e},this.getCPU=function(){var e={};return e[f]=r,X.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,X.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,X.call(e,i,s.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>350?G(e,350):e,this},this.setUA(i),this}),"UAParser");H.VERSION="0.7.33",H.BROWSER=W([c,p,"major"]),H.CPU=W([f]),H.DEVICE=W([u,d,h,g,v,m,y,b,w]),H.ENGINE=H.OS=W([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=H),e.UAParser=H):typeof define===i&&define.amd?define((function(){return H})):typeof n!==o&&(n.UAParser=H);var $=typeof n!==o&&(n.jQuery||n.Zepto);if($&&!$.ua){var Z=new H;$.ua=Z.getResult(),$.ua.get=function(){return Z.getUA()},$.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)$.ua[n]=t[n]}}}("object"==typeof window?window:e)})),ib=G(((e,t)=>{"use strict";y(),t.exports=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,n=-1;n++<t;)for(var r=n+1;r<e.length;++r)e[n]===e[r]&&e.splice(r--,1);return e}),"unique"),t.exports.immutable=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=e[i];return t.exports(r)}),"uniqueImmutable")})),xb=G(((e,t)=>{var n,r;y(),n=e,r=function(){"use strict";function e(e,r,i,o,a){s((function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/a+h)),Math.min(o,Math.floor(r+(a-l)*c/a+h)),s)}var d=n[r],p=i,f=o;for(t(n,i,r),s(n[o],d)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[i],d)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}),"t")(e,r,i||0,o||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}s(e,"t"),s(t,"i"),s(n,"n");var r=s((function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}),"r");function i(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=g(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var s=e.children[o];l(i,e.leaf?r(s):s)}return i}function l(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function u(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;e(t,a,n,r,o),s.push(n,a,a,r)}}return s(i,"e"),s(o,"a"),s(a,"h"),s(l,"o"),s(u,"s"),s(c,"l"),s(h,"f"),s(d,"u"),s(p,"m"),s(f,"c"),s(g,"p"),s(v,"d"),r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!f(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var s=t.children[o],a=t.leaf?r(s):s;f(e,a)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):i.push(s))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!f(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(f(e,o)){if(t.leaf||p(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=g([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,s=this.data,a=this.toBBox(e),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(e,s.children,t);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var i,s=n-t+1,a=this._maxEntries;if(s<=a)return o(i=g(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=g([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));v(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);v(e,c,h,l,this.compareMinY);for(var d=c;d<=h;d+=l){var p=Math.min(d+l-1,h);i.children.push(this._build(e,d,p,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<t.children.length;a++){var l=t.children[a],u=h(l),c=(d=e,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-u);c<o?(o=c,i=u<i?u:i,s=l):c===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var d,p;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),l(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=g(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(e,t){this.data=g([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,l,u,c,d=1/0,p=1/0,f=t;f<=n-t;f++){var g=a(e,0,f,this.toBBox),v=a(e,f,n,this.toBBox),y=(i=g,o=v,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,c-l)),m=h(g)+h(v);y<d?(d=y,r=f,p=m<p?m:p):y===d&&m<p&&(p=m,r=f)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),s=a(e,n-t,n,i),u=d(o)+d(s),c=t;c<n-t;c++){var h=e.children[c];l(o,e.leaf?i(h):h),u+=d(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];l(s,e.leaf?i(f):f),u+=d(s)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),bh=G((e=>{"use strict";function t(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function n(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return r(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return d(t).geometry;case"MultiLineString":return h(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function r(e,n,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!k(e[0])||!k(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function i(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return r(e,t)})),n)}function o(e,n,r){void 0===r&&(r={});for(var i=0,o=e;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},n,r)}function a(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return o(e,t)})),n)}function l(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function u(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return l(e,t)})),n)}function c(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function h(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function d(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function p(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function f(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)}function g(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function v(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function m(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function b(e,t){return _(m(e,t))}function w(e){var t=e%360;return t<0&&(t+=360),t}function _(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return v(m(e,t),n)}function S(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o}function k(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function O(e){return!!e&&e.constructor===Object}function E(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!k(e))throw new Error("bbox must only contain numbers")}))}function A(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}y(),Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},s(t,"feature"),e.feature=t,s(n,"geometry"),e.geometry=n,s(r,"point"),e.point=r,s(i,"points"),e.points=i,s(o,"polygon"),e.polygon=o,s(a,"polygons"),e.polygons=a,s(l,"lineString"),e.lineString=l,s(u,"lineStrings"),e.lineStrings=u,s(c,"featureCollection"),e.featureCollection=c,s(h,"multiLineString"),e.multiLineString=h,s(d,"multiPoint"),e.multiPoint=d,s(p,"multiPolygon"),e.multiPolygon=p,s(f,"geometryCollection"),e.geometryCollection=f,s(g,"round"),e.round=g,s(v,"radiansToLength"),e.radiansToLength=v,s(m,"lengthToRadians"),e.lengthToRadians=m,s(b,"lengthToDegrees"),e.lengthToDegrees=b,s(w,"bearingToAzimuth"),e.bearingToAzimuth=w,s(_,"radiansToDegrees"),e.radiansToDegrees=_,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(S,"convertArea"),e.convertArea=S,s(k,"isNumber"),e.isNumber=k,s(O,"isObject"),e.isObject=O,s(E,"validateBBox"),e.validateBBox=E,s(A,"validateId"),e.validateId=A})),kh=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0});var t=bh();function n(e,t,r){if(null!==e)for(var i,o,s,a,l,u,c,h,d=0,p=0,f=e.type,g="FeatureCollection"===f,v="Feature"===f,y=g?e.features.length:1,m=0;m<y;m++){l=(h=!!(c=g?e.features[m].geometry:v?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<l;b++){var w=0,_=0;if(null!==(a=h?c.geometries[b]:c)){u=a.coordinates;var M=a.type;switch(d=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,w,_))return!1;p++,w++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,w,_))return!1;p++,"MultiPoint"===M&&w++}"LineString"===M&&w++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-d;o++){if(!1===t(u[i][o],p,m,w,_))return!1;p++}"MultiLineString"===M&&w++,"Polygon"===M&&_++}"Polygon"===M&&w++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(_=0,o=0;o<u[i].length;o++){for(s=0;s<u[i][o].length-d;s++){if(!1===t(u[i][o][s],p,m,w,_))return!1;p++}_++}w++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===n(a.geometries[i],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(e,t,r,i){var o=r;return n(e,(function(e,n,i,s,a){o=0===n&&void 0===r?e:t(o,e,n,i,s,a)}),i),o}function i(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function o(e,t,n){var r=n;return i(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function l(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function u(e){var t=[];return n(e,(function(e){t.push(e)})),t}function c(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function h(e,t,n){var r=n;return c(e,(function(e,i,o,s,a){r=0===i&&void 0===n?e:t(r,e,i,o,s,a)})),r}function d(e,n){c(e,(function(e,r,i,o,s){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==n(t.feature(e,i,{bbox:o,id:s}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:a,coordinates:e.coordinates[u]};if(!1===n(t.feature(c,i),r,u))return!1}}))}function p(e,t,n){var r=n;return d(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r}function f(e,r){d(e,(function(e,i,o){var s=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,u=0,c=0,h=0;if(!1===n(e,(function(n,a,d,p,f){if(void 0===l||i>u||p>c||f>h)return l=n,u=i,c=p,h=f,void(s=0);var g=t.lineString([l,n],e.properties);if(!1===r(g,i,o,f,s))return!1;s++,l=n})))return!1}}}))}function g(e,t,n){var r=n,i=!1;return f(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function v(e,n){if(!e)throw new Error("geojson is required");d(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,s=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===n(t.lineString(s[a],e.properties),r,i,a))return!1}}}))}function m(e,t,n){var r=n;return v(e,(function(e,i,o,s){r=0===i&&void 0===n?e:t(r,e,i,o,s)})),r}function b(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.segmentIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),t.lineString([u[a],u[a+1]],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a-1),t.lineString([u[s][a],u[s][a+1]],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),t.lineString([u[o][a],u[o][a+1]],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a-1),t.lineString([u[o][s][a],u[o][s][a+1]],l,n)}throw new Error("geojson is invalid")}function w(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.coordIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return t.point(u,l,n);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,n);case"LineString":return a<0&&(a=u.length+a),t.point(u[a],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a),t.point(u[s][a],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),t.point(u[o][a],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a),t.point(u[o][s][a],l,n)}throw new Error("geojson is invalid")}s(n,"coordEach"),s(r,"coordReduce"),s(i,"propEach"),s(o,"propReduce"),s(a,"featureEach"),s(l,"featureReduce"),s(u,"coordAll"),s(c,"geomEach"),s(h,"geomReduce"),s(d,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(v,"lineEach"),s(m,"lineReduce"),s(b,"findSegment"),s(w,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=a,e.featureReduce=l,e.findPoint=w,e.findSegment=b,e.flattenEach=d,e.flattenReduce=p,e.geomEach=c,e.geomReduce=h,e.lineEach=v,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),Lb=G((e=>{"use strict";y(),Object.defineProperty(e,"__esModule",{value:!0});var t=kh();function n(e){var n=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]<e[0]&&(n[2]=e[0]),n[3]<e[1]&&(n[3]=e[1])})),n}s(n,"bbox"),n.default=n,e.default=n})),zb=G(((e,t)=>{y();var n=xb(),r=bh(),i=kh(),o=Lb().default,a=i.featureEach,l=(i.coordEach,r.polygon,r.featureCollection);function u(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})):a(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})),n.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=o(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=o(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}s(u,"geojsonRbush"),t.exports=u,t.exports.default=u})),Xh={};function Uh(e,t){return!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,e}function y0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),yi(e,t,[vi],(function(e){return nr(Po(e.data[0],e.data[1]))}),0,n)}function Po(e,t){return Ar(e,t||{},0,0)}function Yh(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),yi(e,t,[gi],(function(e){return nr(wi(e.data[0],Rh(e.data[1])))}),1,n)}function wi(e,t){return Eo(e,t)}function mO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),yi(e,t,[vi,d0,function(){return[Ch]}],(function(e){return nr(Ch(e.data[0],e.data[1]))}),2,n)}function Ch(e,t){t||(t={});var n=mi(),r=e.length;n.p(e);var i=Ar(e,t,Vh(t),8),o=i.length;return zh(i,t),pe(i,o-8,n.d()),pe(i,o-4,r),i}function w0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),yi(e,t,[gi,p0,function(){return[el]}],(function(e){return nr(el(e.data[0]))}),3,n)}function el(e,t){return Eo(e.subarray(Bh(e),-8),t||new ae(m0(e)))}function vO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),yi(e,t,[vi,f0,function(){return[Lh]}],(function(e){return nr(Lh(e.data[0],e.data[1]))}),4,n)}function Lh(e,t){t||(t={});var n=Dh();n.p(e);var r=Ar(e,t,2,4);return qh(r,t),pe(r,r.length-4,n.d()),r}function _0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),yi(e,t,[gi,h0,function(){return[nl]}],(function(e){return nr(nl(e.data[0],Rh(e.data[1])))}),5,n)}function nl(e,t){return Eo((g0(e),e.subarray(2,-4)),t)}function bO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),31==e[0]&&139==e[1]&&8==e[2]?w0(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Yh(e,t,n):_0(e,t,n)}function wO(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?el(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?wi(e,t):nl(e,t)}function tr(e,t){if(t){for(var n=new ae(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Jb)return Jb.encode(e);var i=e.length,o=new ae(e.length+(e.length>>1)),a=0,l=s((function(e){o[a++]=e}),"w");for(r=0;r<i;++r){if(a+5>o.length){var u=new ae(a+8+(i-r<<1));u.set(o),o=u}var c=e.charCodeAt(r);c<128||t?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++r))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return Nt(o,0,a)}function $h(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Nh)return Nh.decode(e);var i=E0(e),o=i[0];return i[1].length&&W(8),o}function TO(e,t,n){n||(n=t,t={}),"function"!=typeof n&&W(7);var r={};Wh(e,"",r,t);var i=Object.keys(r),o=i.length,a=0,l=0,u=o,c=new Array(o),h=[],d=s((function(){for(var e=0;e<h.length;++e)h[e]()}),"tAll"),p=s((function(e,t){rl((function(){n(e,t)}))}),"cbd");rl((function(){p=n}));var f=s((function(){var e=new ae(l+22),t=a,n=l-a;l=0;for(var r=0;r<u;++r){var i=c[r];try{var o=i.c.length;di(e,l,i,i.f,i.u,o);var s=30+i.f.length+er(i.extra),h=l+s;e.set(i.c,h),di(e,a,i,i.f,i.u,o,l,i.m),a+=16+s+(i.m?i.m.length:0),l=h+o}catch(e){return p(e,null)}}Hh(e,a,c.length,n,t),p(null,e)}),"cbf");o||f();for(var g=s((function(e){var t=i[e],n=r[t],u=n[0],g=n[1],v=mi(),y=u.length;v.p(u);var m=tr(t),b=m.length,w=g.comment,_=w&&tr(w),M=_&&_.length,x=er(g.extra),S=0==g.level?0:8,k=s((function(n,r){if(n)d(),p(n,null);else{var i=r.length;c[e]=To(g,{size:y,crc:v.d(),c:r,f:m,m:_,u:b!=t.length||_&&w.length!=M,compression:S}),a+=30+b+x+i,l+=76+2*(b+x)+(M||0)+i,--o||f()}}),"cbl");if(b>65535&&k(W(11,0,1),null),S)if(y<16e4)try{k(null,Po(u,g))}catch(e){k(e,null)}else h.push(y0(u,g,k));else k(null,u)}),"_loop_1"),v=0;v<u;++v)g(v);return d}function PO(e,t){t||(t={});var n={},r=[];Wh(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],u=a[1],c=0==u.level?0:8,h=(x=tr(s)).length,d=u.comment,p=d&&tr(d),f=p&&p.length,g=er(u.extra);h>65535&&W(11);var v=c?Po(l,u):l,y=v.length,m=mi();m.p(l),r.push(To(u,{size:l.length,crc:m.d(),c:v,f:x,m:p,u:h!=s.length||p&&d.length!=f,o:i,compression:c})),i+=30+h+g+y,o+=76+2*(h+g)+(f||0)+y}for(var b=new ae(o+22),w=i,_=o-i,M=0;M<r.length;++M){var x=r[M];di(b,x.o,x,x.f,x.u,x.c.length);var S=30+x.f.length+er(x.extra);b.set(x.c,x.o+S),di(b,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+S+(x.m?x.m.length:0)}return Hh(b,i,r.length,_,w),b}function IO(e,t,n){n||(n=t,t={}),"function"!=typeof n&&W(7);var r=[],i=s((function(){for(var e=0;e<r.length;++e)r[e]()}),"tAll"),o={},a=s((function(e,t){rl((function(){n(e,t)}))}),"cbd");rl((function(){a=n}));for(var l=e.length-22;101010256!=Fe(e,l);--l)if(!l||e.length-l>65558)return a(W(13,0,1),null),i;var u=ct(e,l+8);if(u){var c=u,h=Fe(e,l+16),d=4294967295==h;if(d){if(l=Fe(e,l-12),101075792!=Fe(e,l))return a(W(13,0,1),null),i;c=u=Fe(e,l+32),h=Fe(e,l+48)}for(var p=t&&t.filter,f=s((function(t){var n=O0(e,h,d),l=n[0],c=n[1],f=n[2],g=n[3],v=n[4],y=n[5],m=P0(e,y);h=v;var b=s((function(e,t){e?(i(),a(e,null)):(t&&(o[g]=t),--u||a(null,o))}),"cbl");if(!p||p({name:g,size:c,originalSize:f,compression:l}))if(l)if(8==l){var w=e.subarray(m,m+c);if(c<32e4)try{b(null,wi(w,new ae(f)))}catch(e){b(e,null)}else r.push(Yh(w,{size:f},b))}else b(W(14,"unknown compression type "+l,1),null);else b(null,Nt(e,m,m+c));else b(null,null)}),"_loop_3"),g=0;g<c;++g)f(g)}else a(null,{});return i}function CO(e,t){for(var n={},r=e.length-22;101010256!=Fe(e,r);--r)(!r||e.length-r>65558)&&W(13);var i=ct(e,r+8);if(!i)return{};var o=Fe(e,r+16),s=4294967295==o;s&&(r=Fe(e,r-12),101075792!=Fe(e,r)&&W(13),i=Fe(e,r+32),o=Fe(e,r+48));for(var a=t&&t.filter,l=0;l<i;++l){var u=O0(e,o,s),c=u[0],h=u[1],d=u[2],p=u[3],f=u[4],g=u[5],v=P0(e,g);o=f,(!a||a({name:p,size:h,originalSize:d,compression:c}))&&(c?8==c?n[p]=wi(e.subarray(v,v+h),new ae(d)):W(14,"unknown compression type "+c):n[p]=Nt(e,v,v+h))}return n}Nw(Xh,{AsyncCompress:()=>hO,AsyncDecompress:()=>yO,AsyncDeflate:()=>v0,AsyncGunzip:()=>b0,AsyncGzip:()=>hO,AsyncInflate:()=>Gh,AsyncUnzipInflate:()=>SO,AsyncUnzlib:()=>k0,AsyncZipDeflate:()=>xO,AsyncZlib:()=>gO,Compress:()=>Ih,DecodeUTF8:()=>kO,Decompress:()=>M0,Deflate:()=>mn,EncodeUTF8:()=>_O,FlateErrorCode:()=>pO,Gunzip:()=>Qu,Gzip:()=>Ih,Inflate:()=>mt,Unzip:()=>AO,UnzipInflate:()=>OO,UnzipPassThrough:()=>A0,Unzlib:()=>tl,Zip:()=>EO,ZipDeflate:()=>MO,ZipPassThrough:()=>Mo,Zlib:()=>jh,compress:()=>mO,compressSync:()=>Ch,decompress:()=>bO,decompressSync:()=>wO,deflate:()=>y0,deflateSync:()=>Po,gunzip:()=>w0,gunzipSync:()=>el,gzip:()=>mO,gzipSync:()=>Ch,inflate:()=>Yh,inflateSync:()=>wi,strFromU8:()=>$h,strToU8:()=>tr,unzip:()=>IO,unzipSync:()=>CO,unzlib:()=>_0,unzlibSync:()=>nl,zip:()=>TO,zipSync:()=>PO,zlib:()=>vO,zlibSync:()=>Lh});var Xb,dO,ae,et,pi,fi,hi,ko,Zb,Qb,Fh,Ku,e0,t0,Oh,_o,An,Lt,Cn,ci,le,n0,r0,i0,a0,$u,jt,Hu,xo,Nt,pO,o0,W,Eo,hn,ui,Xu,Ju,Sh,li,Zu,Ah,s0,In,u0,l0,mi,Dh,Ar,To,Kb,Wu,fO,c0,gi,vi,d0,p0,f0,h0,nr,Rh,yi,Ft,bi,ct,Fe,Ph,pe,zh,Bh,m0,Vh,qh,g0,mn,v0,mt,Gh,Ih,hO,Qu,b0,jh,gO,tl,k0,M0,yO,Wh,Jb,Nh,x0,E0,kO,_O,T0,P0,O0,S0,er,di,Hh,Mo,MO,xO,EO,A0,OO,SO,AO,rl,Kh=Am((()=>{for(y(),Xb={},dO=s((function(e,t,n,r,i){var o=new Worker(Xb[t]||(Xb[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}),"wk"),ae=Uint8Array,et=Uint16Array,pi=Uint32Array,fi=new ae([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]),hi=new ae([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]),ko=new ae([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zb=s((function(e,t){for(var n=new et(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new pi(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]}),"freb"),Qb=Zb(fi,2),Fh=Qb[0],Ku=Qb[1],Fh[28]=258,Ku[258]=28,e0=Zb(hi,0),t0=e0[0],Oh=e0[1],_o=new et(32768),le=0;le<32768;++le)An=(61680&(An=(52428&(An=(43690&le)>>>1|(21845&le)<<1))>>>2|(13107&An)<<2))>>>4|(3855&An)<<4,_o[le]=((65280&An)>>>8|(255&An)<<8)>>>1;for(Lt=s((function(e,t,n){for(var r=e.length,i=0,o=new et(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new et(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new et(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)s[_o[h]>>>l]=u}else for(s=new et(r),i=0;i<r;++i)e[i]&&(s[i]=_o[a[e[i]-1]++]>>>15-e[i]);return s}),"hMap"),Cn=new ae(288),le=0;le<144;++le)Cn[le]=8;for(le=144;le<256;++le)Cn[le]=9;for(le=256;le<280;++le)Cn[le]=7;for(le=280;le<288;++le)Cn[le]=8;for(ci=new ae(32),le=0;le<32;++le)ci[le]=5;n0=Lt(Cn,9,0),r0=Lt(Cn,9,1),i0=Lt(ci,5,0),a0=Lt(ci,5,1),$u=s((function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t}),"max"),jt=s((function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n}),"bits"),Hu=s((function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)}),"bits16"),xo=s((function(e){return(e+7)/8|0}),"shft"),Nt=s((function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?et:4==e.BYTES_PER_ELEMENT?pi:ae)(n-t);return r.set(e.subarray(t,n)),r}),"slc"),pO={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},o0=["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"],W=s((function(e,t,n){var r=new Error(t||o0[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,W),!n)throw r;return r}),"err"),Eo=s((function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new ae(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new ae(3*r));var a=s((function(e){var n=t.length;if(e>n){var r=new ae(Math.max(2*n,e));r.set(t),t=r}}),"cbuf"),l=n.f||0,u=n.p||0,c=n.b||0,h=n.l,d=n.d,p=n.m,f=n.n,g=8*r;do{if(!h){l=jt(e,u,1);var v=jt(e,u+1,3);if(u+=3,!v){var y=e[(A=xo(u)+4)-4]|e[A-3]<<8,m=A+y;if(m>r){o&&W(0);break}i&&a(c+y),t.set(e.subarray(A,m),c),n.b=c+=y,n.p=u=8*m,n.f=l;continue}if(1==v)h=r0,d=a0,p=9,f=5;else if(2==v){var b=jt(e,u,31)+257,w=jt(e,u+10,15)+4,_=b+jt(e,u+5,31)+1;u+=14;for(var M=new ae(_),x=new ae(19),S=0;S<w;++S)x[ko[S]]=jt(e,u+3*S,7);u+=3*w;var k=$u(x),O=(1<<k)-1,E=Lt(x,k,1);for(S=0;S<_;){var A,I=E[jt(e,u,O)];if(u+=15&I,(A=I>>>4)<16)M[S++]=A;else{var C=0,P=0;for(16==A?(P=3+jt(e,u,3),u+=2,C=M[S-1]):17==A?(P=3+jt(e,u,7),u+=3):18==A&&(P=11+jt(e,u,127),u+=7);P--;)M[S++]=C}}var T=M.subarray(0,b),F=M.subarray(b);p=$u(T),f=$u(F),h=Lt(T,p,1),d=Lt(F,f,1)}else W(1);if(u>g){o&&W(0);break}}i&&a(c+131072);for(var j=(1<<p)-1,N=(1<<f)-1,R=u;;R=u){var L=(C=h[Hu(e,u)&j])>>>4;if((u+=15&C)>g){o&&W(0);break}if(C||W(2),L<256)t[c++]=L;else{if(256==L){R=u,h=null;break}var D=L-254;if(L>264){var B=fi[S=L-257];D=jt(e,u,(1<<B)-1)+Fh[S],u+=B}var z=d[Hu(e,u)&N],V=z>>>4;z||W(3),u+=15&z;F=t0[V];if(V>3){B=hi[V];F+=Hu(e,u)&(1<<B)-1,u+=B}if(u>g){o&&W(0);break}i&&a(c+131072);for(var U=c+D;c<U;c+=4)t[c]=t[c-F],t[c+1]=t[c+1-F],t[c+2]=t[c+2-F],t[c+3]=t[c+3-F];c=U}}n.l=h,n.p=R,n.b=c,n.f=l,h&&(l=1,n.m=p,n.d=d,n.n=f)}while(!l);return c==t.length?t:Nt(t,0,c)}),"inflt"),hn=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8}),"wbits"),ui=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16}),"wbits16"),Xu=s((function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[In,0];if(1==i){var s=new ae(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[h].f?u++:h++],l=n[u!=c&&n[u].f<n[h].f?u++:h++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new et(d+1),f=Ju(n[c-1],p,0);if(f>t){r=0;var g=0,v=f-t,y=1<<v;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var m=o[r].s;if(!(p[m]>t))break;g+=y-(1<<f-p[m]),p[m]=t}for(g>>>=v;g>0;){var b=o[r].s;p[b]<t?g-=1<<t-p[b]++-1:++r}for(;r>=0&&g;--r){var w=o[r].s;p[w]==t&&(--p[w],++g)}f=t}return[new ae(p),f]}),"hTree"),Ju=s((function(e,t,n){return-1==e.s?Math.max(Ju(e.l,t,n+1),Ju(e.r,t,n+1)):t[e.s]=n}),"ln"),Sh=s((function(e){for(var t=e.length;t&&!e[--t];);for(var n=new et(++t),r=0,i=e[0],o=1,a=s((function(e){n[r++]=e}),"w"),l=1;l<=t;++l)if(e[l]==i&&l!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[l]}return[n.subarray(0,r),t]}),"lc"),li=s((function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n}),"clen"),Zu=s((function(e,t,n){var r=n.length,i=xo(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)}),"wfblk"),Ah=s((function(e,t,n,r,i,o,s,a,l,u,c){hn(t,c++,n),++i[256];for(var h=Xu(i,15),d=h[0],p=h[1],f=Xu(o,15),g=f[0],v=f[1],y=Sh(d),m=y[0],b=y[1],w=Sh(g),_=w[0],M=w[1],x=new et(19),S=0;S<m.length;++S)x[31&m[S]]++;for(S=0;S<_.length;++S)x[31&_[S]]++;for(var k=Xu(x,7),O=k[0],E=k[1],A=19;A>4&&!O[ko[A-1]];--A);var I,C,P,T,F=u+5<<3,j=li(i,Cn)+li(o,ci)+s,N=li(i,d)+li(o,g)+s+14+3*A+li(x,O)+(2*x[16]+3*x[17]+7*x[18]);if(F<=j&&F<=N)return Zu(t,c,e.subarray(l,l+u));if(hn(t,c,1+(N<j)),c+=2,N<j){I=Lt(d,p,0),C=d,P=Lt(g,v,0),T=g;var R=Lt(O,E,0);hn(t,c,b-257),hn(t,c+5,M-1),hn(t,c+10,A-4),c+=14;for(S=0;S<A;++S)hn(t,c+3*S,O[ko[S]]);c+=3*A;for(var L=[m,_],D=0;D<2;++D){var B=L[D];for(S=0;S<B.length;++S){var z=31&B[S];hn(t,c,R[z]),c+=O[z],z>15&&(hn(t,c,B[S]>>>5&127),c+=B[S]>>>12)}}}else I=n0,C=Cn,P=i0,T=ci;for(S=0;S<a;++S)if(r[S]>255){z=r[S]>>>18&31;ui(t,c,I[z+257]),c+=C[z+257],z>7&&(hn(t,c,r[S]>>>23&31),c+=fi[z]);var W=31&r[S];ui(t,c,P[W]),c+=T[W],W>3&&(ui(t,c,r[S]>>>5&8191),c+=hi[W])}else ui(t,c,I[r[S]]),c+=C[r[S]];return ui(t,c,I[256]),c+C[256]}),"wblk"),s0=new pi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),In=new ae(0),u0=s((function(e,t,n,r,i,o){var a=e.length,l=new ae(r+a+5*(1+Math.ceil(a/7e3))+i),u=l.subarray(r,l.length-i),c=0;if(!t||a<8)for(var h=0;h<=a;h+=65535){var d=h+65535;d>=a&&(u[c>>3]=o),c=Zu(u,c+1,e.subarray(h,d))}else{for(var p=s0[t-1],f=p>>>13,g=8191&p,v=(1<<n)-1,y=new et(32768),m=new et(v+1),b=Math.ceil(n/3),w=2*b,_=s((function(t){return(e[t]^e[t+1]<<b^e[t+2]<<w)&v}),"hsh"),M=new pi(25e3),x=new et(288),S=new et(32),k=0,O=0,E=(h=0,0),A=0,I=0;h<a;++h){var C=_(h),P=32767&h,T=m[C];if(y[P]=T,m[C]=P,A<=h){var F=a-h;if((k>7e3||E>24576)&&F>423){c=Ah(e,u,0,M,x,S,O,E,I,h-I,c),E=k=O=0,I=h;for(var j=0;j<286;++j)x[j]=0;for(j=0;j<30;++j)S[j]=0}var N=2,R=0,L=g,D=P-T&32767;if(F>2&&C==_(h-D))for(var B=Math.min(f,F)-1,z=Math.min(32767,h),W=Math.min(258,F);D<=z&&--L&&P!=T;){if(e[h+N]==e[h+N-D]){for(var V=0;V<W&&e[h+V]==e[h+V-D];++V);if(V>N){if(N=V,R=D,V>B)break;var U=Math.min(D,V-2),q=0;for(j=0;j<U;++j){var G=h-D+j+32768&32767,X=G-y[G]+32768&32767;X>q&&(q=X,T=G)}}}D+=(P=T)-(T=y[P])+32768&32767}if(R){M[E++]=268435456|Ku[N]<<18|Oh[R];var J=31&Ku[N],K=31&Oh[R];O+=fi[J]+hi[K],++x[257+J],++S[K],A=h+N,++k}else M[E++]=e[h],++x[e[h]]}}c=Ah(e,u,o,M,x,S,O,E,I,h-I,c),!o&&7&c&&(c=Zu(u,c+1,In))}return Nt(l,0,r+xo(c)+i)}),"dflt"),l0=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),mi=s((function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=l0[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}),"crc"),Dh=s((function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),Ar=s((function(e,t,n,r,i){return u0(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)}),"dopt"),To=s((function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}),"mrg"),Kb=s((function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var h in t+=u,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=u}else n[l]=a}return[t,n]}),"wcln"),Wu=[],fO=s((function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}),"cbfs"),c0=s((function(e,t,n,r){var i;if(!Wu[n]){for(var o="",s={},a=e.length-1,l=0;l<a;++l)o=(i=Kb(e[l],o,s))[0],s=i[1];Wu[n]=Kb(e[a],o,s)}var u=To({},Wu[n][1]);return dO(Wu[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,fO(u),r)}),"wrkr"),gi=s((function(){return[ae,et,pi,fi,hi,ko,Fh,t0,r0,a0,_o,o0,Lt,$u,jt,Hu,xo,Nt,W,Eo,wi,nr,Rh]}),"bInflt"),vi=s((function(){return[ae,et,pi,fi,hi,ko,Ku,Oh,n0,Cn,i0,ci,_o,s0,In,Lt,hn,ui,Xu,Ju,Sh,li,Zu,Ah,xo,Nt,u0,Ar,Po,nr]}),"bDflt"),d0=s((function(){return[zh,Vh,pe,mi,l0]}),"gze"),p0=s((function(){return[Bh,m0]}),"guze"),f0=s((function(){return[qh,pe,Dh]}),"zle"),h0=s((function(){return[g0]}),"zule"),nr=s((function(e){return postMessage(e,[e.buffer])}),"pbf"),Rh=s((function(e){return e&&e.size&&new ae(e.size)}),"gu8"),yi=s((function(e,t,n,r,i,o){var s=c0(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}}),"cbify"),Ft=s((function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}}),"astrm"),bi=s((function(e,t,n,r,i){var o,s=c0(e,r,i,(function(e,n){e?(s.terminate(),t.ondata.call(t,e)):(n[1]&&s.terminate(),t.ondata.call(t,e,n[0],n[1]))}));s.postMessage(n),t.push=function(e,n){t.ondata||W(5),o&&t.ondata(W(4,0,1),null,!!n),s.postMessage([e,o=n],[e.buffer])},t.terminate=function(){s.terminate()}}),"astrmify"),ct=s((function(e,t){return e[t]|e[t+1]<<8}),"b2"),Fe=s((function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}),"b4"),Ph=s((function(e,t){return Fe(e,t)+4294967296*Fe(e,t+4)}),"b8"),pe=s((function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}),"wbytes"),zh=s((function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&pe(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}),"gzh"),Bh=s((function(e){(31!=e[0]||139!=e[1]||8!=e[2])&&W(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)}),"gzs"),m0=s((function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}),"gzl"),Vh=s((function(e){return 10+(e.filename&&e.filename.length+1||0)}),"gzhl"),qh=s((function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}),"zlh"),g0=s((function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&W(6,"invalid zlib data"),32&e[1]&&W(6,"invalid zlib data: preset dictionaries not supported")}),"zlv"),s(Uh,"AsyncCmpStrm"),mn=function(){function e(e,t){!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{}}return s(e,"Deflate"),e.prototype.p=function(e,t){this.ondata(Ar(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){this.ondata||W(5),this.d&&W(4),this.d=t,this.p(e,t||!1)},e}(),v0=function(){function e(e,t){bi([vi,function(){return[Ft,mn]}],this,Uh.call(this,e,t),(function(e){var t=new mn(e.data);onmessage=Ft(t)}),6)}return s(e,"AsyncDeflate"),e}(),s(y0,"deflate"),s(Po,"deflateSync"),mt=function(){function e(e){this.s={},this.p=new ae(0),this.ondata=e}return s(e,"Inflate"),e.prototype.e=function(e){this.ondata||W(5),this.d&&W(4);var t=this.p.length,n=new ae(t+e.length);n.set(this.p),n.set(e,t),this.p=n},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=Eo(this.p,this.o,this.s);this.ondata(Nt(n,t,this.s.b),this.d),this.o=Nt(n,this.s.b-32768),this.s.b=this.o.length,this.p=Nt(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),Gh=function(){function e(e){this.ondata=e,bi([gi,function(){return[Ft,mt]}],this,0,(function(){var e=new mt;onmessage=Ft(e)}),7)}return s(e,"AsyncInflate"),e}(),s(Yh,"inflate"),s(wi,"inflateSync"),Ih=function(){function e(e,t){this.c=mi(),this.l=0,this.v=1,mn.call(this,e,t)}return s(e,"Gzip"),e.prototype.push=function(e,t){mn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=Ar(e,this.o,this.v&&Vh(this.o),t&&8,!t);this.v&&(zh(n,this.o),this.v=0),t&&(pe(n,n.length-8,this.c.d()),pe(n,n.length-4,this.l)),this.ondata(n,t)},e}(),hO=function(){function e(e,t){bi([vi,d0,function(){return[Ft,mn,Ih]}],this,Uh.call(this,e,t),(function(e){var t=new Ih(e.data);onmessage=Ft(t)}),8)}return s(e,"AsyncGzip"),e}(),s(mO,"gzip"),s(Ch,"gzipSync"),Qu=function(){function e(e){this.v=1,mt.call(this,e)}return s(e,"Gunzip"),e.prototype.push=function(e,t){if(mt.prototype.e.call(this,e),this.v){var n=this.p.length>3?Bh(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}t&&(this.p.length<8&&W(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),mt.prototype.c.call(this,t)},e}(),b0=function(){function e(e){this.ondata=e,bi([gi,p0,function(){return[Ft,mt,Qu]}],this,0,(function(){var e=new Qu;onmessage=Ft(e)}),9)}return s(e,"AsyncGunzip"),e}(),s(w0,"gunzip"),s(el,"gunzipSync"),jh=function(){function e(e,t){this.c=Dh(),this.v=1,mn.call(this,e,t)}return s(e,"Zlib"),e.prototype.push=function(e,t){mn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=Ar(e,this.o,this.v&&2,t&&4,!t);this.v&&(qh(n,this.o),this.v=0),t&&pe(n,n.length-4,this.c.d()),this.ondata(n,t)},e}(),gO=function(){function e(e,t){bi([vi,f0,function(){return[Ft,mn,jh]}],this,Uh.call(this,e,t),(function(e){var t=new jh(e.data);onmessage=Ft(t)}),10)}return s(e,"AsyncZlib"),e}(),s(vO,"zlib"),s(Lh,"zlibSync"),tl=function(){function e(e){this.v=1,mt.call(this,e)}return s(e,"Unzlib"),e.prototype.push=function(e,t){if(mt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&W(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),mt.prototype.c.call(this,t)},e}(),k0=function(){function e(e){this.ondata=e,bi([gi,h0,function(){return[Ft,mt,tl]}],this,0,(function(){var e=new tl;onmessage=Ft(e)}),11)}return s(e,"AsyncUnzlib"),e}(),s(_0,"unzlib"),s(nl,"unzlibSync"),M0=function(){function e(e){this.G=Qu,this.I=mt,this.Z=tl,this.ondata=e}return s(e,"Decompress"),e.prototype.push=function(e,t){if(this.ondata||W(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new ae(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var r=this,i=s((function(){r.ondata.apply(r,arguments)}),"cb");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,t),this.p=null}}},e}(),yO=function(){function e(e){this.G=b0,this.I=Gh,this.Z=k0,this.ondata=e}return s(e,"AsyncDecompress"),e.prototype.push=function(e,t){M0.prototype.push.call(this,e,t)},e}(),s(bO,"decompress"),s(wO,"decompressSync"),Wh=s((function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=To(r,o[1]),o=o[0]),o instanceof ae?n[s]=[o,a]:(n[s+="/"]=[new ae(0),a],Wh(o,s,n,r))}}),"fltn"),Jb=typeof TextEncoder<"u"&&new TextEncoder,Nh=typeof TextDecoder<"u"&&new TextDecoder,x0=0;try{Nh.decode(In,{stream:!0}),x0=1}catch{}E0=s((function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Nt(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}),"dutf8"),kO=function(){function e(e){this.ondata=e,x0?this.t=new TextDecoder:this.p=In}return s(e,"DecodeUTF8"),e.prototype.push=function(e,t){if(this.ondata||W(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&W(8),this.t=null));this.p||W(4);var n=new ae(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=E0(n),i=r[0],o=r[1];t?(o.length&&W(8),this.p=null):this.p=o,this.ondata(i,t)},e}(),_O=function(){function e(e){this.ondata=e}return s(e,"EncodeUTF8"),e.prototype.push=function(e,t){this.ondata||W(5),this.d&&W(4),this.ondata(tr(e),this.d=t||!1)},e}(),s(tr,"strToU8"),s($h,"strFromU8"),T0=s((function(e){return 1==e?3:e<6?2:9==e?1:0}),"dbf"),P0=s((function(e,t){return t+30+ct(e,t+26)+ct(e,t+28)}),"slzh"),O0=s((function(e,t,n){var r=ct(e,t+28),i=$h(e.subarray(t+46,t+46+r),!(2048&ct(e,t+8))),o=t+46+r,s=Fe(e,t+20),a=n&&4294967295==s?S0(e,o):[s,Fe(e,t+24),Fe(e,t+42)],l=a[0],u=a[1],c=a[2];return[ct(e,t+10),l,u,i,o+ct(e,t+30)+ct(e,t+32),c]}),"zh"),S0=s((function(e,t){for(;1!=ct(e,t);t+=4+ct(e,t+2));return[Ph(e,t+12),Ph(e,t+4),Ph(e,t+20)]}),"z64e"),er=s((function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&W(9),t+=r+4}return t}),"exfl"),di=s((function(e,t,n,r,i,o,s,a){var l=r.length,u=n.extra,c=a&&a.length,h=er(u);pe(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(null==o&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&W(10),pe(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=o&&(pe(e,t,n.crc),pe(e,t+4,o),pe(e,t+8,n.size)),pe(e,t+12,l),pe(e,t+14,h),t+=16,null!=s&&(pe(e,t,c),pe(e,t+6,n.attrs),pe(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var f in u){var g=u[f],v=g.length;pe(e,t,+f),pe(e,t+2,v),e.set(g,t+4),t+=4+v}return c&&(e.set(a,t),t+=c),t}),"wzh"),Hh=s((function(e,t,n,r,i){pe(e,t,101010256),pe(e,t+8,n),pe(e,t+10,n),pe(e,t+12,r),pe(e,t+16,i)}),"wzf"),Mo=function(){function e(e){this.filename=e,this.c=mi(),this.size=0,this.compression=0}return s(e,"ZipPassThrough"),e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||W(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),MO=function(){function e(e,t){var n=this;t||(t={}),Mo.call(this,e),this.d=new mn(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=T0(t.level)}return s(e,"ZipDeflate"),e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){Mo.prototype.push.call(this,e,t)},e}(),xO=function(){function e(e,t){var n=this;t||(t={}),Mo.call(this,e),this.d=new v0(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=T0(t.level),this.terminate=this.d.terminate}return s(e,"AsyncZipDeflate"),e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){Mo.prototype.push.call(this,e,t)},e}(),EO=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return s(e,"Zip"),e.prototype.add=function(e){var t=this;if(this.ondata||W(5),2&this.d)this.ondata(W(4+8*(1&this.d),0,1),null,!1);else{var n=tr(e.filename),r=n.length,i=e.comment,o=i&&tr(i),a=r!=e.filename.length||o&&i.length!=o.length,l=r+er(e.extra)+30;r>65535&&this.ondata(W(11,0,1),null,!1);var u=new ae(l);di(u,0,e,n,a);var c=[u],h=s((function(){for(var e=0,n=c;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}c=[]}),"pAll_1"),d=this.d;this.d=0;var p=this.u.length,f=To(e,{f:n,u:a,o:o,t:function(){e.terminate&&e.terminate()},r:function(){if(h(),d){var e=t.u[p+1];e?e.r():t.d=1}d=1}}),g=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(g+=r.length,c.push(r),i){var o=new ae(16);pe(o,0,134695760),pe(o,4,e.crc),pe(o,8,g),pe(o,12,e.size),c.push(o),f.c=g,f.b=l+g+16,f.crc=e.crc,f.size=e.size,d&&f.r(),d=1}else d&&h()},this.u.push(f)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(W(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+er(l.extra)+(l.o?l.o.length:0)}for(var o=new ae(n+22),s=0,a=this.u;s<a.length;s++){var l=a[s];di(o,e,l,l.f,l.u,l.c,t,l.o),e+=46+l.f.length+er(l.extra)+(l.o?l.o.length:0),t+=l.b}Hh(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}(),s(TO,"zip"),s(PO,"zipSync"),A0=function(){function e(){}return s(e,"UnzipPassThrough"),e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),OO=function(){function e(){var e=this;this.i=new mt((function(t,n){e.ondata(null,t,n)}))}return s(e,"UnzipInflate"),e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),SO=function(){function e(e,t){var n=this;t<32e4?this.i=new mt((function(e,t){n.ondata(null,e,t)})):(this.i=new Gh((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return s(e,"AsyncUnzipInflate"),e.prototype.push=function(e,t){this.i.terminate&&(e=Nt(e,0)),this.i.push(e,t)},e.compression=8,e}(),AO=function(){function e(e){this.onfile=e,this.k=[],this.o={0:A0},this.p=In}return s(e,"Unzip"),e.prototype.push=function(e,t){var n=this;if(this.onfile||W(5),this.p||W(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(r)).length)return this.push(e,t)}else{var o=0,a=0,l=void 0,u=void 0;this.p.length?e.length?((u=new ae(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var c=u.length,h=this.c,d=h&&this.d,p=s((function(){var e,t=Fe(u,a);if(67324752==t){o=1,l=a,f.d=null,f.c=0;var r=ct(u,a+6),i=ct(u,a+8),s=2048&r,d=8&r,p=ct(u,a+26),g=ct(u,a+28);if(c>a+30+p+g){var v=[];f.k.unshift(v),o=2;var y=Fe(u,a+18),m=Fe(u,a+22),b=$h(u.subarray(a+30,a+=30+p),!s);4294967295==y?(e=d?[-2]:S0(u,a),y=e[0],m=e[1]):d&&(y=-1),a+=g,f.c=y;var w,_={name:b,compression:i,start:function(){if(_.ondata||W(5),y){var e=n.o[i];e||_.ondata(W(14,"unknown compression type "+i,1),null,!1),(w=y<0?new e(b):new e(b,y,m)).ondata=function(e,t,n){_.ondata(e,t,n)};for(var t=0,r=v;t<r.length;t++){var o=r[t];w.push(o,!1)}n.k[0]==v&&n.c?n.d=w:w.push(In,!0)}else _.ondata(null,In,!0)},terminate:function(){w&&w.terminate&&w.terminate()}};y>=0&&(_.size=y,_.originalSize=m),f.onfile(_)}return"break"}if(h){if(134695760==t)return l=a+=12+(-2==h&&8),o=3,f.c=0,"break";if(33639248==t)return l=a-=4,o=3,f.c=0,"break"}}),"_loop_2"),f=this;a<c-4;++a){if("break"===p())break}if(this.p=In,h<0){var g=o?u.subarray(0,l-12-(-2==h&&8)-(134695760==Fe(u,l-16)&&4)):u.subarray(0,a);d?d.push(g,!!o):this.k[+(2==o)].push(g)}if(2&o)return this.push(u.subarray(a),t);this.p=u.subarray(a)}t&&(this.c&&W(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}(),rl="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},s(IO,"unzip"),s(CO,"unzipSync")})),G0=G(((e,t)=>{"use strict";y(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),X0=G(((e,t)=>{"use strict";y();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=a(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}s(o,"decodeComponents"),s(a,"decode"),s(l,"customDecodeURIComponent"),t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return l(e)}}})),J0=G(((e,t)=>{"use strict";y(),t.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),Q0=G(((e,t)=>{"use strict";y(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}})),sw=G((e=>{"use strict";y();var t=G0(),n=X0(),r=J0(),i=Q0(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{let i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[",i,"]"].join("")]:[...n,[h(t,e),"[",h(i,e),"]=",h(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[]"].join("")]:[...n,[h(t,e),"[]=",h(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[h(n,e),t,h(i,e)].join("")]:[[r,h(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,h(t,e)]:[...n,[h(t,e),"=",h(r,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&d(n,e).includes(e.arrayFormatSeparator);n=o?d(n,e):n;let s=i||o?n.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===n?n:d(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&d(n,e));let o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>d(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function h(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(e):e}function p(e){return Array.isArray(e)?e.sort():"object"==typeof e?p(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){let t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){let t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function v(e){let t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function b(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let n=u(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:d(s,t),n(d(e,t),s,i)}for(let e of Object.keys(i)){let n=i[e];if("object"==typeof n&&null!==n)for(let e of Object.keys(n))n[e]=m(n[e],t);else i[e]=m(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=p(n):e[t]=n,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(h,"encode"),s(d,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(v,"extract"),s(m,"parseValue"),s(b,"parse"),e.extract=v,e.parse=b,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let n=s((n=>t.skipNull&&o(e[n])||t.skipEmptyString&&""===e[n]),"shouldFilter"),r=l(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{let i=e[n];return void 0===i?"":null===i?h(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?h(n,t)+"[]":i.reduce(r(n),[]).join("&"):h(n,t)+"="+h(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:b(v(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);let r=f(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query),l=e.stringify(s,n);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(n[a]?h(t.fragmentIdentifier,n):t.fragmentIdentifier)),"".concat(r).concat(l).concat(u)},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:l},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}));y();var Pw=Jt(Im());y(),y(),y();var Lg=Jt(Cg());y();var Gl=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:s=0}){let a,l;if(b(this,"origin"),b(this,"destination"),b(this,"vortex"),b(this,"distance"),b(this,"angle"),b(this,"weight"),this.origin=e,this.destination=t,this.vortex=n,this.distance=i,this.angle=o,n)this.distance=0,this.angle=0,a=void 0!==n.weight&&n.weight>0?n.weight:"elevator"===n.type?2e3:1e3,l=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*l+a;else{let e=s||t.weight;a=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+a}if(isNaN(this.angle))throw new Error("nan angle")}};s(Gl,"Edge");var Ul=Gl,lr=Ul;y();var jg="mi-debug",mx={logState:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},R=mx;function gx(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale||1);try{if(!e.georeference)throw new Error("map ".concat(e.name||e.shortName||e.id," does not have a georeference field"));if(e.georeference.length<3)throw new Error("map ".concat(e.name||e.shortName||e.id," has less than 3 georeference points, we require at least 3 for proper map scaling"));let t=e.georeference[0],n=e.georeference[2],r=(0,Lg.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:n.target.x,longitude:n.target.y}),i=t.control.x-n.control.x,o=t.control.y-n.control.y;return Math.sqrt(i*i+o*o)/r}catch(e){return R.error(e),1}}function Us(e,t){let n=e.x-t.x,r=e.y-t.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}s(gx,"getMapScale"),s(Us,"getAngle");var $l=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){b(this,"edges"),b(this,"nodesById"),b(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:gx(e)}))).reduce(((e,t)=>(e[t.id]=t,e)),{});let i=e.filter((e=>!!this.mapsById[e.map])).map((e=>({...e,paths:e.paths?e.paths.filter((({map:t})=>t===e.map)):[]})));this.nodesById=i.reduce(((e,t)=>(e[t.id]=t,e)),{});for(let e in this.nodesById)this.nodesById.hasOwnProperty(e)&&(this.nodesById[e].paths=this.nodesById[e].paths.filter((({node:e})=>!!this.nodesById[e])));let o=t.map((e=>({...e,name:r?e.name:e.type,nodes:e.nodes?e.nodes.filter((e=>!!this.nodesById[e])):[]})));i.forEach((e=>{this.edges[e.id]=e.paths.map((({node:t,weight:n})=>{let r=this.nodesById[t];return new lr({angle:Us(e,r),destination:r,distance:this.getDistance(e,r),origin:e,pathWeight:n})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let n=this.nodesById[e.nodes[t]];if(t++,null==n)continue;let r=t;for(;r<e.nodes.length;){let t=this.nodesById[e.nodes[r]];if(r++,null==t)continue;let i=this.mapsById[n.map].elevation||0,o=this.mapsById[t.map].elevation||0,s=Math.abs(i-o);this.edges[n.id].push(new lr({destination:t,elevationDelta:s,origin:n,vortex:e})),this.edges[t.id].push(new lr({destination:n,elevationDelta:s,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i,excludedNodeIds:o}){let s=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),a=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===s.length||0===a.length)return[];let l=[],u={},c={};for(s.forEach((e=>{let t=this.getShortestEuclideanDistance(e,a);l.push({origin:e,priority:t}),u[e.id]=null,c[e.id]=0})),l.sort(((e,t)=>e.priority-t.priority));l.length>0;){let e=l[0];if(a.includes(e.origin)){let t=[],n=u[e.origin.id];for(;null!=n;){t.push(n);let e=u[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let s=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,h=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id)),d=o&&o.has(t.destination.id);if(n&&s||h||d)continue;let p=c[e.origin.id]+t.weight;if(null==c[t.destination.id]||p<c[t.destination.id]){c[t.destination.id]=p;let e=p+this.getShortestEuclideanDistance(t.destination,a);l.push({origin:t.destination,priority:e}),u[t.destination.id]=t}}l.splice(0,1),l.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let n,r=e.x-t.x,i=e.y-t.y,o=r*r+i*i;return n=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/n}getShortestEuclideanDistance(e,t){return t.reduce(((t,n)=>{let r=this.getDistance(e,n);return Math.min(t,r)}),Number.MAX_VALUE)}};s($l,"NavigationGraph");var Yl=$l,Wl=Yl;function vx(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}y(),y(),s(vx,"vortexDirectionTest");var Xl=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){b(this,"node"),b(this,"instruction"),b(this,"action"),b(this,"atLocation"),b(this,"type"),b(this,"distance",0),this.node=e,this.action=t,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=r?"Depart from ".concat(r.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=r?"Arrive at ".concat(r.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(r&&r.name," ").concat(vx(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(r&&r.name," at ").concat(t.toMap.name):null!=t&&"bearing"in t&&"Right"===t.bearing?this.instruction="Turn right":null!=t&&"bearing"in t&&"SlightRight"===t.bearing?this.instruction="Turn slightly right":null!=t&&"bearing"in t&&"Straight"===t.bearing?this.instruction="Head straight":null!=t&&"bearing"in t&&"SlightLeft"===t.bearing?this.instruction="Turn slightly left":null!=t&&"bearing"in t&&"Left"===t.bearing&&(this.instruction="Turn left"),null!=t&&"Turn"===t.type&&r&&(this.instruction+=" at ".concat(r.name)))}};s(Xl,"Directive");var Hl=Xl,Bn=Hl;function Kl(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,s=t.x,a=t.y,l=n.x,u=n.y,c=r.x,h=r.y;if(i===s&&o===a||l===c&&u===h)return null;let d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;let p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p<0||p>1||f<0||f>1?null:{x:i+p*(s-i),y:o+p*(a-o)}}function Ng(e,t,n){if(e.x===t.x)return[{x:e.x+n,y:e.y},{x:t.x+n,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+n},{x:t.x,y:t.y+n}];let r=-1/((t.y-e.y)/(t.x-e.x)),i=n*Math.sqrt(1/(1+r*r)),o=r*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function Fg(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=Ng(e,t,-r),s=Ng(e,t,r);if(Kl(o[0],o[1],n[0],n[1])||Kl(s[0],s[1],n[0],n[1]))return void(i=!1)}else if(Kl(e,t,n[0],n[1]))return void(i=!1)})),i}y(),s(Kl,"getLineIntersection"),s(Ng,"getOffsetLine"),s(Fg,"hasLineOfSight");var Gs=.1*Math.PI;function Ys(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Ys,"differenceBetweenAngles");var Ql=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){b(this,"graph"),b(this,"locationsByNodeId"),b(this,"geometryEdgesByMapId",new Map),this.graph=new Wl({maps:r,nodes:t,showVortexNames:o,vortexes:n}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((n=>{e[n.node]=t})),t.polygons&&t.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{e[n]=t}))})),e)),{}),i&&i.forEach((e=>{if(this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),!0===e.isLineStringSegment)for(let t of e.vertexes)for(let n=0;n<t.length;n++)t[n+1]&&this.geometryEdgesByMapId.get(e.map).push([t[n],t[n+1]]);else e.vertexes.forEach(((t,n)=>{e.vertexes[n+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[n+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,n=10){let r=0,i=0,o=e;for(;Math.abs(r)<t&&i<n;){let e=this.graph.edges[o.destination.id],s=null,a=0;for(let t of e)if(t.distance>0)if(null!=s){let e=-Ys(o.angle,t.angle);Math.abs(e)<Math.abs(a)&&(s=t,a=e)}else s=t,a=-Ys(o.angle,t.angle);if(null==s)return null;{if(Math.abs(a)>=t||(r+=a,i+=s.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[s.destination.id];if(null!=e)return e;o=s}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a,simplify:l}){var u,c,h;let d=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a});if(0===d.length)return{distance:0,instructions:[new Bn({distance:0,instruction:"No Valid Path Available"})],path:[]};let p=0,f=[],g=[];if(null!=l&&l.enabled){let e=null!=(u=null==l?void 0:l.bufferRadius)?u:1.8,t=[d[0]];for(let n=1;n<d.length;n++){if(d[n].origin.map!==d[n-1].origin.map){let r=null!=(c=this.geometryEdgesByMapId.get(d[n-1].origin.map))?c:[];g.push(...this.simplifySteps(t,r,e)),t=[d[n]]}t.push(d[n])}let n=d[d.length-1],r=null!=(h=this.geometryEdgesByMapId.get(n.origin.map))?h:[];g.push(...this.simplifySteps(t,r,e)),d=g}for(let e=0;e<d.length;e++)f.push(d[e].origin);f.push(d[d.length-1].destination);let v=[],y=null,m=null,b=0,w=0;for(let e=0;e<d.length;e++){let t=d[e],n=t.origin,o=t.destination;if(p+=t.distance,b+=(null==m?void 0:m.distance)||0,0===e&&v.push(new Bn({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=t.vortex){let e=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=r.elevation){let t=e.elevation-r.elevation;t>0?i="down":t<0&&(i="up")}v.push(new Bn({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:b,origin:n})),w+=b,b=0}else if(null!=y&&null!=m)if(null!=m.vortex){let e=this.graph.mapsById[y.map],t=this.graph.mapsById[m.destination.map];v.push(new Bn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:m.vortex,distance:b,origin:n})),w+=b,b=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==y&&e.destination!==t.destination));if(e.length>0){let r=-Ys(m.angle,t.angle),i=e.reduce(((e,n)=>{let r=-Ys(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Gs||Math.abs(i)<=Gs){let e;e=r<=-Math.PI/4?"Right":r<=-Gs?"SlightRight":r<=Gs?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(m,.5*Math.PI,10)),null!=t){let r=new Bn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:b,origin:n});r.type=e,v.push(r)}else v.push(new Bn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:b,origin:n}));w+=b,b=0}}}e===d.length-1&&(v.push(new Bn({action:{type:"Arrival"},atLocation:i,distance:p-w<0?0:p-w,origin:t.destination})),w+=b,b=0),y=n,m=t}let _=[],M=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:n}=t;n&&"TakeVortex"===n.type?(M=t.node,_.unshift(t)):n&&"Turn"===n.type&&null!=M?this.graph.getDistance(t.node,M)>5?_.unshift(t):_[0].distance+=t.distance:_.unshift(t)}return{distance:p,instructions:_,path:f}}simplifySteps(e,t,n){if(e.length<3)return e;let r=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!Fg(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new lr({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Us(e[i].origin,e[t].origin)})),i=t}return r.push(new lr({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Us(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};s(Ql,"Navigator");var Jl=Ql,Zl=Jl;y(),y();var Qt,Hi,ec,Xi,tc,Ws,Rg,nc=class{constructor(e){A(this,Hi),A(this,Xi),A(this,Ws),A(this,Qt,void 0),j(this,Qt,e)}directionsTo(e,t){let n=w(this,Qt).analytics;return e instanceof St?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),we(this,Ws,Rg).call(this,e,t)):(n.getDirections(this,e),we(this,Xi,tc).call(this,e,t))}distanceTo(e,t){let n=we(this,Xi,tc).call(this,e,t);return(null==n?void 0:n.distance)||0}};Qt=new WeakMap,Hi=new WeakSet,ec=s((function(){var e;return null!=(e=w(this,Qt).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),Xi=new WeakSet,tc=s((function(e,t){let n=$i(this),r=$i(e),i=w(this,Qt).navigator.getDirections({originIds:n,destinationNodeIds:r,accessible:(null==t?void 0:t.accessible)||!1,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,excludedNodeIds:null!=t&&t.excludedNodeIds?new Set(t.excludedNodeIds):void 0,simplify:(null==t?void 0:t.simplify)||w(this,Hi,ec)});return new cr(w(this,Qt),i)}),"#directionsToSingleDestination"),Ws=new WeakSet,Rg=s((function(e,t){let n,r=[],i=$i(this);for(let o=0;o<e.destinations.length;o++){n=$i(e.destinations[o]);let s=w(this,Qt).navigator.getDirections({originIds:i,destinationNodeIds:n,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,accessible:(null==t?void 0:t.accessible)||!1,simplify:(null==t?void 0:t.simplify)||w(this,Hi,ec)}),a=new cr(w(this,Qt),s);r.push(a),i=0===a.path.length?n:[a.path[a.path.length-1].id]}return r}),"#directionsToDestinationSet"),s(nc,"MappedinNavigatable");var en=nc;y(),y(),y(),y(),y();var rc=s((function(e,t){return(rc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics");function Vn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}rc(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(Vn,"__extends");var ue=s((function(){return ue=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),ue.apply(this,arguments)}),"__assign");function ke(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function _e(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function zg(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Bg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(ke,"__awaiter"),s(_e,"__generator"),s(zg,"__values"),s(Bg,"__read"),y(),y(),y();var qn,Ge,wn,Un,nt,pt,xe,Fr,Me=s((function(){return Me=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Me.apply(this,arguments)}),"__assign");function Vg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Pe(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function Oe(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function tn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Bt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}s(Vg,"__rest"),s(Pe,"__awaiter"),s(Oe,"__generator"),s(tn,"__values"),s(tt,"__read"),s(Bt,"__spreadArray"),y(),y(),y(),function(e){e.US="US",e.EU="EU"}(qn||(qn={})),y(),function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(Ge||(Ge={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(wn||(wn={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(Un||(Un={})),y(),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(nt||(nt={})),y(),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(pt||(pt={})),y(),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(xe||(xe={})),y(),function(e){e.XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"}(Fr||(Fr={})),y(),y();var ic="-",Ki="AMP",qg="".concat(Ki,"_unsent"),ac="https://api2.amplitude.com/2/httpapi",Ug="https://api.eu.amplitude.com/2/httpapi",Gg="https://api2.amplitude.com/batch",Yg="https://api.eu.amplitude.com/batch";y();var bx=1e3,$s=s((function(e){if(Object.keys(e).length>bx)return!1;for(var t in e){var n=e[t];if(!oc(t,n))return!1}return!0}),"isValidObject"),oc=s((function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=tn(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&$s(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return $s(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}),"isValidProperties"),Vt=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return Me({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(Ge.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(Ge.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(Ge.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(Ge.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(Ge.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(Ge.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(Ge.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(Ge.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(Ge.UNSET,e,ic),this},e.prototype.clearAll=function(){return this._properties={},this._properties[Ge.CLEAR_ALL]=ic,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[Ge.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===Ge.ADD?"number"==typeof n:e===Ge.UNSET||e===Ge.REMOVE||oc(t,n))},e}(),Wg=s((function(e,t,n){return Me(Me(Me({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}),"createTrackEvent"),Ji=s((function(e,t){return Me(Me({},t),{event_type:Un.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent"),$g=s((function(e,t,n,r){var i;return Me(Me({},r),{event_type:Un.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})}),"createGroupIdentifyEvent"),Hg=s((function(e,t,n){var r,i=new Vt;return i.set(e,t),Me(Me({},n),{event_type:Un.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})}),"createGroupEvent"),Xg=s((function(e,t){return Me(Me({},t),{event_type:Un.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");y(),y();var Gn=s((function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=xe.Unknown),{event:e,code:t,message:n}}),"buildResult"),Kg=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,t){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(n){switch(n.label){case 0:return[4,e.setup(t)];case 1:return n.sent(),this.plugins.push(e),[2]}}))}))},e.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex((function(t){return t.name===e})),1),Promise.resolve()},e.prototype.reset=function(){this.applying=!1,this.plugins=[]},e.prototype.push=function(e){var t=this;return new Promise((function(n){t.queue.push([e,n]),t.scheduleApply(0)}))},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout((function(){t.apply(t.queue.shift()).then((function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)}))}),e))},e.prototype.apply=function(e){return Pe(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m;return Oe(this,(function(b){switch(b.label){case 0:if(!e)return[2];t=tt(e,1),n=t[0],r=tt(e,2),i=r[1],o=this.plugins.filter((function(e){return e.type===pt.BEFORE})),b.label=1;case 1:b.trys.push([1,6,7,8]),s=tn(o),a=s.next(),b.label=2;case 2:return a.done?[3,5]:[4,a.value.execute(Me({},n))];case 3:n=b.sent(),b.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return l=b.sent(),g={error:l},[3,8];case 7:try{a&&!a.done&&(v=s.return)&&v.call(s)}finally{if(g)throw g.error}return[7];case 8:u=this.plugins.filter((function(e){return e.type===pt.ENRICHMENT})),b.label=9;case 9:b.trys.push([9,14,15,16]),c=tn(u),h=c.next(),b.label=10;case 10:return h.done?[3,13]:[4,h.value.execute(Me({},n))];case 11:n=b.sent(),b.label=12;case 12:return h=c.next(),[3,10];case 13:return[3,16];case 14:return d=b.sent(),y={error:d},[3,16];case 15:try{h&&!h.done&&(m=c.return)&&m.call(c)}finally{if(y)throw y.error}return[7];case 16:return p=this.plugins.filter((function(e){return e.type===pt.DESTINATION})),f=p.map((function(e){var t=Me({},n);return e.execute(t).catch((function(e){return Gn(t,0,String(e))}))})),Promise.all(f).then((function(e){var t=tt(e,1)[0];i(t)})),[2]}}))}))},e.prototype.flush=function(){return Pe(this,void 0,void 0,(function(){var e,t,n,r=this;return Oe(this,(function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return i.sent(),t=this.plugins.filter((function(e){return e.type===pt.DESTINATION})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return i.sent(),[2]}}))}))},e}();y();var Jg="Event tracked successfully",Zg="Unexpected error occurred",Qg="Event rejected due to exceeded retry count",ev="Event skipped due to optOut config",tv="Event rejected due to missing API key",nv="Invalid API key",rv="Client not initialized",sc=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new Kg,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),[2]}}))}))},e.prototype.runQueuedFunctions=function(e){return Pe(this,void 0,void 0,(function(){var t,n,r,i,o,s;return Oe(this,(function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,6,7,8]),n=tn(t),r=n.next(),a.label=2;case 2:return r.done?[3,5]:[4,(0,r.value)()];case 3:a.sent(),a.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=a.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var r=Wg(e,t,n);return this.dispatch(r)},e.prototype.identify=function(e,t){var n=Ji(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,r){var i=$g(e,t,n,r);return this.dispatch(i)},e.prototype.setGroup=function(e,t,n){var r=Hg(e,t,n);return this.dispatch(r)},e.prototype.revenue=function(e,t){var n=Xg(e,t);return this.dispatch(n)},e.prototype.add=function(e){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(t){return this.config?[2,this.timeline.register(e,this.config)]:(this.q.push(this.add.bind(this,e)),[2])}))}))},e.prototype.remove=function(e){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(t){return this.config?[2,this.timeline.deregister(e)]:(this.q.push(this.remove.bind(this,e)),[2])}))}))},e.prototype.dispatchWithCallback=function(e,t){if(!this.config)return t(Gn(e,0,rv));this.process(e).then(t)},e.prototype.dispatch=function(e){return Pe(this,void 0,void 0,(function(){var t=this;return Oe(this,(function(n){return this.config?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return Pe(this,void 0,void 0,(function(){var t,n,r;return Oe(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,Gn(e,0,ev)]:[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=Gn(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=!!e:this.q.push(this.setOptOut.bind(this,!!e))},e.prototype.flush=function(){return this.timeline.flush()},e}();y();var Hs=function(){function e(){this.productId="",this.quantity=1,this.price=0}return s(e,"Revenue"),e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return $s(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?Me({},this.properties):{};return e[wn.REVENUE_PRODUCT_ID]=this.productId,e[wn.REVENUE_QUANTITY]=this.quantity,e[wn.REVENUE_PRICE]=this.price,e[wn.REVENUE_TYPE]=this.revenueType,e[wn.REVENUE]=this.revenue,e},e}();y(),y();var iv=s((function(e,t){var n=Math.max(t,1);return e.reduce((function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");y(),y();var Xs="Amplitude Logger ",av=function(){function e(){this.logLevel=nt.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=nt.None},e.prototype.enable=function(e){void 0===e&&(e=nt.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<nt.Verbose||console.log("".concat(Xs,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<nt.Warn||console.warn("".concat(Xs,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<nt.Error||console.error("".concat(Xs,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<nt.Debug||console.log("".concat(Xs,"[Debug]: ").concat(e.join(" ")))},e}(),Ks=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:nt.Warn,loggerProvider:new av,optOut:!1,serverUrl:ac,serverZone:qn.US,useBatch:!1}}),"getDefaultConfig"),uc=function(){function e(e){var t,n,r;this._optOut=!1;var i=Ks();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||i.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||i.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||i.flushQueueSize,this.loggerProvider=e.loggerProvider||i.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:i.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:i.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||i.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(r=e.useBatch)&&void 0!==r?r:i.useBatch,this.loggerProvider.enable(this.logLevel);var o=lc(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=o.serverZone,this.serverUrl=o.serverUrl}return s(e,"Config"),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),wx=s((function(e,t){return e===qn.EU?t?Yg:Ug:t?Gg:ac}),"getServerUrl"),lc=s((function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Ks().serverZone),void 0===n&&(n=Ks().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[qn.US,qn.EU].includes(t)?t:Ks().serverZone;return{serverZone:r,serverUrl:wx(r,n)}}),"createServerConfig"),cc=function(){function e(){this.name="amplitude",this.type=pt.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var t;return Pe(this,void 0,void 0,(function(){var n,r=this;return Oe(this,(function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(qg,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return n=i.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return r.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(r)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,Qg),!1)}));r.forEach((function(t){e.queue=e.queue.concat(t),0!==t.timeout?setTimeout((function(){t.timeout=0,e.schedule(0)}),t.timeout):e.schedule(e.config.flushIntervalMillis)})),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout((function(){t.flush(!0).then((function(){t.queue.length>0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),Pe(this,void 0,void 0,(function(){var t,n,r,i=this;return Oe(this,(function(o){switch(o.label){case 0:return t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),r=iv(t,this.config.flushQueueSize),[4,Promise.all(r.map((function(t){return i.send(t,e)})))];case 1:return o.sent(),[2]}}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),Pe(this,void 0,void 0,(function(){var n,r,i,o,s;return Oe(this,(function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,tv)];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;t.extra;return Vg(t,["extra"])})),options:{min_id_length:this.config.minIdLength}},a.label=1;case 1:return a.trys.push([1,3,,4]),r=lc(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=a.sent()))return this.fulfillRequest(e,0,Zg),[2];if(!t){if("body"in i){o="";try{o=JSON.stringify(i.body,null,2)}catch{}this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(o))}else this.fulfillRequest(e,i.statusCode,i.status);return[2]}return this.handleReponse(i,e),[3,4];case 3:return s=a.sent(),this.fulfillRequest(e,0,String(s)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case xe.Success:this.handleSuccessResponse(e,t);break;case xe.Invalid:this.handleInvalidResponse(e,t);break;case xe.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case xe.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,Jg)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(nv))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=Bt(Bt(Bt(Bt([],tt(Object.values(e.body.eventsWithInvalidFields)),!1),tt(Object.values(e.body.eventsWithMissingFields)),!1),tt(Object.values(e.body.eventsWithInvalidIdLengths)),!1),tt(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter((function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,Bt([],tt(o),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,Bt([],tt(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),l=new Set(o),u=t.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return l.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,Bt([],tt(u),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,Bt([],tt(e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback(Gn(e.event,t,n))}))},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map((function(e){return e.event})));this.config.storageProvider.set(this.storageKey,e)}},e}();y();var At=s((function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return{promise:e.apply(void 0,Bt([],tt(t),!1))}}}),"returnWrapper");y();var kx=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace"),Ce=s((function(e){return function(){var t=Me({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}}),"getClientLogConfig"),_x=s((function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=tn(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}),"getValueByStringPath"),je=s((function(e,t){return function(){var n,r,i={};try{for(var o=tn(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=_x(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}}),"getClientStates"),Le=s((function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),l=a.logger,u=a.logLevel;if(u&&u<nt.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:kx(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var h=e.apply(i,o);return h&&h.promise?h.promise.then((function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))})):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))),h}}),"debugWrapper");y();var Yn=s((function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Yn)}),"UUID");y();var Zi=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return Pe(this,void 0,void 0,(function(){var t;return Oe(this,(function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}}))}))},e.prototype.set=function(e,t){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(n){return this.memoryStorage.set(e,t),[2]}))}))},e.prototype.remove=function(e){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return Pe(this,void 0,void 0,(function(){return Oe(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();y();var dr=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m,b,w,_,M;if("object"!=typeof e)return null;var x=e.code||0,S=this.buildStatus(x);switch(S){case xe.Success:return{status:S,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case xe.Invalid:return{status:S,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case xe.PayloadTooLarge:return{status:S,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case xe.RateLimit:return{status:S,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(M=e.throttled_events)&&void 0!==M?M:[]}};case xe.Timeout:default:return{status:S,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?xe.Success:429===e?xe.RateLimit:413===e?xe.PayloadTooLarge:408===e?xe.Timeout:e>=400&&e<500?xe.Invalid:e>=500?xe.Failed:xe.Unknown},e}();y(),y(),y();var dc=s((function(e,t){return(dc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics");function ov(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}dc(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(ov,"__extends");var $e=s((function(){return $e=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),$e.apply(this,arguments)}),"__assign");function pc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Be(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function Ve(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function sv(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(pc,"__rest"),s(Be,"__awaiter"),s(Ve,"__generator"),s(sv,"__read"),y(),y();var rt=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope"),Dr=s((function(){var e,t=rt();return null!==(e=null==t?void 0:t.location)&&void 0!==e&&e.search?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=uv(n[0]),i=uv(n[1]);return i&&(e[r]=i),e}),{}):{}}),"getQueryParams"),uv=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");y();var lv="utm_campaign",cv="utm_content",dv="utm_id",pv="utm_medium",fv="utm_source",hv="utm_term",fc="dclid",hc="fbclid",mc="gbraid",gc="gclid",vc="ko_click_id",yc="msclkid",bc="ttclid",wc="twclid",kc="wbraid",mv="EMPTY",Js={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,msclkid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},gv="MKTG",vv=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return Be(this,void 0,void 0,(function(){return Ve(this,(function(e){return[2,$e($e($e($e({},Js),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=Dr();return{utm_campaign:e[lv],utm_content:e[cv],utm_id:e[dv],utm_medium:e[pv],utm_source:e[fv],utm_term:e[hv]}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return n},e.prototype.getClickIds=function(){var e,t=Dr();return(e={})[fc]=t[fc],e[hc]=t[hc],e[mc]=t[mc],e[gc]=t[gc],e[vc]=t[vc],e[yc]=t[yc],e[bc]=t[bc],e[wc]=t[wc],e[kc]=t[kc],e},e}();y(),y();var pr=s((function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[Ki,t,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName"),_c=s((function(e){return"".concat(Ki.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName"),Mc=function(){function e(e,t){var n,r;this.storage=t.storage,this.storageKey=pr(e,gv),this.parser=new vv,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=null!==(n=t.excludeReferrers)&&void 0!==n?n:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(r=t.initialEmptyValue)&&void 0!==r?r:mv}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,t,n){void 0===n&&(n=!1);e.referrer;var r=e.referring_domain,i=pc(e,["referrer","referring_domain"]),o=t||{},s=(o.referrer,o.referring_domain),a=pc(o,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var l=JSON.stringify(i)!==JSON.stringify(a),u=n?yv(r||"")!==yv(s||""):r!==s;return!t||l||u},e.prototype.saveCampaignToStorage=function(e){return Be(this,void 0,void 0,(function(){return Ve(this,(function(t){switch(t.label){case 0:return[4,this.storage.set(this.storageKey,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getCampaignFromStorage=function(){return Be(this,void 0,void 0,(function(){return Ve(this,(function(e){switch(e.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.createCampaignEvent=function(e){var t=this,n=$e($e({},Js),e),r=Object.entries(n).reduce((function(e,n){var r=sv(n,2),i=r[0],o=r[1];return e.setOnce("initial_".concat(i),o||t.initialEmptyValue),o?e.set(i,o):e.unset(i)}),new Vt),i={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return $e($e({},Ji(r)),this.trackPageViews&&i)},e.prototype.send=function(e){return Be(this,void 0,void 0,(function(){var t,n;return Ve(this,(function(r){switch(r.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return t=r.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=r.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(t,n))return[2];this.onNewCampaign(t)}return[4,this.track(this.createCampaignEvent(t))];case 3:return r.sent(),[4,this.saveCampaignToStorage(t)];case 4:return r.sent(),[2]}}))}))},e}(),yv=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain");y();var fr=function(){function e(e){this.options=$e({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return Be(this,void 0,void 0,(function(){var t,n,r;return Ve(this,(function(i){switch(i.label){case 0:if(!rt())return[2,!1];t=String(Date.now()),n=new e(this.options),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch{}return[2,JSON.parse(t)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var t;return Be(this,void 0,void 0,(function(){var n,r,i;return Ve(this,(function(o){return n=rt(),r=null!==(t=null==n?void 0:n.document.cookie.split("; "))&&void 0!==t?t:[],(i=r.find((function(t){return 0===t.indexOf(e+"=")})))?[2,i.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,t){var n;return Be(this,void 0,void 0,(function(){var r,i,o,s,a,l;return Ve(this,(function(u){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=void 0,(i=null!==t?r:-1)&&((s=new Date).setTime(s.getTime()+24*i*60*60*1e3),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=rt())&&(l.document.cookie=a)}catch{}return[2]}))}))},e.prototype.remove=function(e){return Be(this,void 0,void 0,(function(){return Ve(this,(function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}}))}))},e.prototype.reset=function(){return Be(this,void 0,void 0,(function(){return Ve(this,(function(e){return[2]}))}))},e}();y();var Zs=function(){function e(e,t){this.storage=e,this.storageKey=pr(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){switch(n.label){case 0:return t=this,[4,this.storage.get(this.storageKey)];case 1:return t.cache=null!==(e=n.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=$e($e({},this.cache),e),this.storage.set(this.storageKey,this.cache)},e.prototype.getSessionId=function(){return this.cache.sessionId},e.prototype.setSessionId=function(e){this.setSession({sessionId:e})},e.prototype.getDeviceId=function(){return this.cache.deviceId},e.prototype.setDeviceId=function(e){this.setSession({deviceId:e})},e.prototype.getUserId=function(){return this.cache.userId},e.prototype.setUserId=function(e){this.setSession({userId:e})},e.prototype.getLastEventTime=function(){return this.cache.lastEventTime},e.prototype.setLastEventTime=function(e){this.setSession({lastEventTime:e})},e.prototype.getOptOut=function(){return this.cache.optOut},e.prototype.setOptOut=function(e){this.setSession({optOut:e})},e.prototype.getLastEventId=function(){return this.cache.lastEventId},e.prototype.setLastEventId=function(e){this.setSession({lastEventId:e})},e}();y();var xc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ov(t,e),s(t,"FetchTransport"),t.prototype.send=function(e,t){return Be(this,void 0,void 0,(function(){var n,r;return Ve(this,(function(i){switch(i.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),[2,this.buildResponse(r)]}}))}))},t}(dr);y(),y();var bv=Jt(Ec()),Mx=function(){function e(){this.ua=new bv.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:Tx(),platform:"Web",os:xx(this.ua),deviceModel:Ex(this.ua)}},e}(),xx=s((function(e){var t,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),Ex=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),Tx=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),Px=function(){function e(){this.queue=[]}return s(e,"EventBridgeImpl"),e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),Wn=s((function(){return Wn=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Wn.apply(this,arguments)}),"__assign"),eu=s((function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++){if(i[r]===n)return e===t}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(!o||!s){var a=Object.keys(e).sort(),l=Object.keys(t).sort();if(!eu(a,l))return!1;var u=!0;return Object.keys(e).forEach((function(n){eu(e[n],t[n])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!eu(e[c],t[c]))return!1;return!0}),"isEqual"),Ox="$set",Sx="$unset",Ax="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var Ix=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=Wn({},this.identity.userProperties),n=Wn(Wn({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},updateUserProperties:function(e){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(s){case Ox:for(var l=0,u=Object.entries(a);l<u.length;l++){var c=u[l],h=c[0],d=c[1];t[h]=d}break;case Sx:for(var p=0,f=Object.keys(a);p<f.length;p++){delete t[h=f[p]]}break;case Ax:t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Wn({},this.identity)},e.prototype.setIdentity=function(e){var t=Wn({},this.identity);this.identity=Wn({},e),eu(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),ea=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,wv=function(){function e(){this.identityStore=new Ix,this.eventBridge=new Px,this.applicationContextProvider=new Mx}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return ea.analyticsConnectorInstances||(ea.analyticsConnectorInstances={}),ea.analyticsConnectorInstances[t]||(ea.analyticsConnectorInstances[t]=new e),ea.analyticsConnectorInstances[t]},e}(),ta=s((function(){return wv.getInstance("$default_instance")}),"getAnalyticsConnector");y();var Tc=function(){function e(){this.name="identity",this.type=pt.BEFORE,this.identityStore=ta().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return Be(this,void 0,void 0,(function(){var t;return Ve(this,(function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();y();var Pc=s((function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""}),"getLanguage");y();var tu=s((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var l=a.apply(e,o);"function"==typeof s&&s(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject"),nu=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");y();var _v=Jt(Ec());y();var kv="1.6.8",Cx="Web",jx="$remote",Mv=function(){function e(){var e;this.name="context",this.type=pt.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(kv),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new _v.default(e).getResult()}return s(e,"Context"),e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return ke(this,void 0,void 0,(function(){var t,n,r,i,o;return _e(this,(function(s){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),t=(new Date).getTime(),n=this.uaResult.browser.name,r=this.uaResult.browser.version,i=this.uaResult.device.model||this.uaResult.os.name,o=this.uaResult.device.vendor,[2,ue(ue(ue(ue(ue(ue(ue(ue(ue(ue(ue(ue({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:Cx}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:r}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:o}),this.config.trackingOptions.deviceModel&&{device_model:i}),this.config.trackingOptions.language&&{language:Pc()}),this.config.trackingOptions.ipAddress&&{ip:jx}),{insert_id:Yn(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:this.eventId++,library:this.library})]}))}))},e.prototype.isSessionValid=function(){var e=this.config.lastEventTime||Date.now();return Date.now()-e<this.config.sessionTimeout},e}();y(),y();var na=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return ke(this,void 0,void 0,(function(){var t,n,r;return _e(this,(function(i){switch(i.label){case 0:if(!rt())return[2,!1];t=String(Date.now()),n=new e,r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return ke(this,void 0,void 0,(function(){var t;return _e(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var t;return ke(this,void 0,void 0,(function(){return _e(this,(function(n){return[2,(null===(t=rt())||void 0===t?void 0:t.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,t){var n;return ke(this,void 0,void 0,(function(){return _e(this,(function(r){try{null===(n=rt())||void 0===n||n.localStorage.setItem(e,JSON.stringify(t))}catch{}return[2]}))}))},e.prototype.remove=function(e){var t;return ke(this,void 0,void 0,(function(){return _e(this,(function(n){try{null===(t=rt())||void 0===t||t.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return ke(this,void 0,void 0,(function(){return _e(this,(function(t){try{null===(e=rt())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();y();var xv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return Vn(t,e),s(t,"XHRTransport"),t.prototype.send=function(e,t){return ke(this,void 0,void 0,(function(){var n=this;return _e(this,(function(r){return[2,new Promise((function(r,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done)try{var e=o.responseText,t=JSON.parse(e),s=n.buildResponse(t);r(s)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))}))]}))}))},t}(dr);y();var Ev=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vn(t,e),s(t,"SendBeaconTransport"),t.prototype.send=function(e,t){return ke(this,void 0,void 0,(function(){var n=this;return _e(this,(function(r){return[2,new Promise((function(r,i){var o=rt();if(null==o||!o.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,JSON.stringify(t))?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},t}(dr),ru=s((function(){var e=new Zi;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new Zs(e,""),sessionTimeout:18e5,storageProvider:new Zi,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new xc}}),"getDefaultConfig"),Tv=function(e){function t(t,n,r){var i,o,s,a,l,u,c,h,d,p,f,g,v=this,y=ru();return(v=e.call(this,ue(ue({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},r),{apiKey:t,storageProvider:null!==(i=null==r?void 0:r.storageProvider)&&void 0!==i?i:y.storageProvider,transportProvider:null!==(o=null==r?void 0:r.transportProvider)&&void 0!==o?o:y.transportProvider}))||this).cookieStorage=null!==(s=null==r?void 0:r.cookieStorage)&&void 0!==s?s:y.cookieStorage,v.sessionManager=null!==(a=null==r?void 0:r.sessionManager)&&void 0!==a?a:y.sessionManager,v.sessionTimeout=null!==(l=null==r?void 0:r.sessionTimeout)&&void 0!==l?l:y.sessionTimeout,v.appVersion=null==r?void 0:r.appVersion,v.attribution=null==r?void 0:r.attribution,v.cookieExpiration=null!==(u=null==r?void 0:r.cookieExpiration)&&void 0!==u?u:y.cookieExpiration,v.cookieSameSite=null!==(c=null==r?void 0:r.cookieSameSite)&&void 0!==c?c:y.cookieSameSite,v.cookieSecure=null!==(h=null==r?void 0:r.cookieSecure)&&void 0!==h?h:y.cookieSecure,v.deviceId=null==r?void 0:r.deviceId,v.disableCookies=null!==(d=null==r?void 0:r.disableCookies)&&void 0!==d?d:y.disableCookies,v.domain=null!==(p=null==r?void 0:r.domain)&&void 0!==p?p:y.domain,v.lastEventTime=null!==(f=v.lastEventTime)&&void 0!==f?f:null==r?void 0:r.lastEventTime,v.optOut=!(null==r||!r.optOut),v.partnerId=null==r?void 0:r.partnerId,v.sessionId=null==r?void 0:r.sessionId,v.trackingOptions=null!==(g=null==r?void 0:r.trackingOptions)&&void 0!==g?g:y.trackingOptions,v.userId=n,v}return Vn(t,e),s(t,"BrowserConfig"),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(!!e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),t}(uc),Pv=s((function(e,t,n){return ke(void 0,void 0,void 0,(function(){var r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m,b;return _e(this,(function(w){switch(w.label){case 0:return r=ru(),null!==(g=null==n?void 0:n.domain)&&void 0!==g?(o=g,[3,3]):[3,1];case 1:return[4,Dx()];case 2:o=w.sent(),w.label=3;case 3:return i=o,[4,Lx(ue(ue({},n),{domain:i}))];case 4:return s=w.sent(),a=pr(e),[4,s.get(a)];case 5:return l=w.sent(),u=Dr(),[4,new Zs(s,e).load()];case 6:return c=w.sent(),h=Tv.bind,d=[void 0,e,null!=t?t:null==l?void 0:l.userId],p=[ue({},n)],f={cookieStorage:s,sessionManager:c,deviceId:Fx(null==l?void 0:l.deviceId,null==n?void 0:n.deviceId,u.deviceId),domain:i,optOut:null!==(v=null==n?void 0:n.optOut)&&void 0!==v?v:!(null==l||!l.optOut)},[4,s.get(a)];case 7:return f.sessionId=null!==(m=null===(y=w.sent())||void 0===y?void 0:y.sessionId)&&void 0!==m?m:null==n?void 0:n.sessionId,[4,Nx(n)];case 8:return[2,new(h.apply(Tv,d.concat([ue.apply(void 0,p.concat([(f.storageProvider=w.sent(),f.trackingOptions=ue(ue({},r.trackingOptions),null==n?void 0:n.trackingOptions),f.transportProvider=null!==(b=null==n?void 0:n.transportProvider)&&void 0!==b?b:Sc(null==n?void 0:n.transport),f)]))])))]}}))}))}),"useBrowserConfig"),Lx=s((function(e,t){return void 0===t&&(t=ru()),ke(void 0,void 0,void 0,(function(){var n,r,i;return _e(this,(function(o){switch(o.label){case 0:return n=ue(ue({},t),e),r=null==e?void 0:e.cookieStorage,(i=!r)?[3,2]:[4,r.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,Oc(n)]:[2,r]}}))}))}),"createCookieStorage"),Oc=s((function(e){return ke(void 0,void 0,void 0,(function(){var t,n;return _e(this,(function(r){switch(r.label){case 0:return t=new fr({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(n=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?[4,(t=new na).isEnabled()]:[3,4];case 3:r.sent()||(t=new Zi),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage"),Nx=s((function(e){return ke(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return _e(this,(function(l){switch(l.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];l.label=1;case 1:l.trys.push([1,7,8,9]),t=zg([null==e?void 0:e.storageProvider,new na]),n=t.next(),l.label=2;case 2:return n.done?[3,6]:(r=n.value,(i=r)?[4,r.isEnabled()]:[3,4]);case 3:i=l.sent(),l.label=4;case 4:if(i)return[2,r];l.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return o=l.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage"),Fx=s((function(e,t,n){return t||n||e||Yn()}),"createDeviceId"),Sc=s((function(e){return e===Fr.XHR?new xv:e===Fr.SendBeacon?new Ev:ru().transportProvider}),"createTransport"),Dx=s((function(e){return ke(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return _e(this,(function(l){switch(l.label){case 0:return[4,(new fr).isEnabled()];case 1:if(!l.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],[4,(a=new fr({domain:"."+s})).set(i,1)]):[3,7];case 3:return l.sent(),[4,a.get(i)];case 4:return l.sent()?[4,a.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");y();var Sv=s((function(e,t){return ke(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,l,u,c;return _e(this,(function(h){switch(h.label){case 0:return[4,(n=new fr).isEnabled()];case 1:return(!h.sent()||null!=t&&t.disableCookies)&&(n=new na),[4,n.isEnabled()];case 2:return h.sent()?(r=_c(e),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return(i=h.sent())?[4,n.remove(r)]:[2,{optOut:!1}];case 4:return h.sent(),o=Bg(i.split("."),5),s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],[2,{deviceId:s,userId:Rx(a),sessionId:Ov(u),lastEventTime:Ov(c),optOut:!!l}]}}))}))}),"parseOldCookies"),Ov=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime"),Rx=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode"),zx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Vn(t,e),s(t,"AmplitudeBrowser"),t.prototype.init=function(t,n,r){var i,o,s;return void 0===t&&(t=""),ke(this,void 0,void 0,(function(){var a,l,u,c,h=this;return _e(this,(function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Sv(t,r)]);case 1:return a=d.sent(),[4,Pv(t,n||a.userId,ue(ue({},r),{deviceId:null!==(i=a.deviceId)&&void 0!==i?i:null==r?void 0:r.deviceId,sessionId:null!==(o=a.sessionId)&&void 0!==o?o:null==r?void 0:r.sessionId,optOut:null!==(s=null==r?void 0:r.optOut)&&void 0!==s?s:a.optOut,lastEventTime:a.lastEventTime}))];case 2:return l=d.sent(),[4,e.prototype._init.call(this,l)];case 3:return d.sent(),u=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),u=!0),(c=ta()).eventBridge.setEventReceiver((function(e){h.track(e.eventType,e.eventProperties)})),c.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new Mv)];case 4:return d.sent(),[4,this.add(new Tc)];case 5:return d.sent(),[4,this.add(new cc)];case 6:return d.sent(),this.initializing=!1,[4,this.runAttributionStrategy(l.attribution,u)];case 7:return d.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return d.sent(),[2]}}))}))},t.prototype.runAttributionStrategy=function(e,t){return void 0===t&&(t=!1),ke(this,void 0,void 0,(function(){var n,r,i;return _e(this,(function(o){switch(o.label){case 0:return n=this.track.bind(this),r=this.setSessionId.bind(this,Date.now()),[4,Oc(this.config)];case 1:return i=o.sent(),[4,new Mc(this.config.apiKey,ue(ue({},e),{storage:i,track:n,onNewCampaign:r})).send(t)];case 2:return o.sent(),[2]}}))}))},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(Yn())},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Sc(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(nu(t)){var r=t._q;t._q=[],t=tu(new Vt,r)}return null!=n&&n.user_id&&this.setUserId(n.user_id),null!=n&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(nu(r)){var o=r._q;r._q=[],r=tu(new Vt,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(nu(t)){var r=t._q;t._q=[],t=tu(new Hs,r)}return e.prototype.revenue.call(this,t,n)},t}(sc),iu=s((function(){var e=new zx;return{init:Le(At(e.init.bind(e)),"init",Ce(e),je(e,["config"])),add:Le(At(e.add.bind(e)),"add",Ce(e),je(e,["config.apiKey","timeline.plugins"])),remove:Le(At(e.remove.bind(e)),"remove",Ce(e),je(e,["config.apiKey","timeline.plugins"])),track:Le(At(e.track.bind(e)),"track",Ce(e),je(e,["config.apiKey","timeline.queue.length"])),logEvent:Le(At(e.logEvent.bind(e)),"logEvent",Ce(e),je(e,["config.apiKey","timeline.queue.length"])),identify:Le(At(e.identify.bind(e)),"identify",Ce(e),je(e,["config.apiKey","timeline.queue.length"])),groupIdentify:Le(At(e.groupIdentify.bind(e)),"groupIdentify",Ce(e),je(e,["config.apiKey","timeline.queue.length"])),setGroup:Le(At(e.setGroup.bind(e)),"setGroup",Ce(e),je(e,["config.apiKey","timeline.queue.length"])),revenue:Le(At(e.revenue.bind(e)),"revenue",Ce(e),je(e,["config.apiKey","timeline.queue.length"])),flush:Le(At(e.flush.bind(e)),"flush",Ce(e),je(e,["config.apiKey","timeline.queue.length"])),getUserId:Le(e.getUserId.bind(e),"getUserId",Ce(e),je(e,["config","config.userId"])),setUserId:Le(e.setUserId.bind(e),"setUserId",Ce(e),je(e,["config","config.userId"])),getDeviceId:Le(e.getDeviceId.bind(e),"getDeviceId",Ce(e),je(e,["config","config.deviceId"])),setDeviceId:Le(e.setDeviceId.bind(e),"setDeviceId",Ce(e),je(e,["config","config.deviceId"])),reset:Le(e.reset.bind(e),"reset",Ce(e),je(e,["config","config.userId","config.deviceId"])),getSessionId:Le(e.getSessionId.bind(e),"getSessionId",Ce(e),je(e,["config"])),setSessionId:Le(e.setSessionId.bind(e),"setSessionId",Ce(e),je(e,["config"])),setOptOut:Le(e.setOptOut.bind(e),"setOptOut",Ce(e),je(e,["config"])),setTransport:Le(e.setTransport.bind(e),"setTransport",Ce(e),je(e,["config"]))}}),"createInstance"),Re=iu(),zF=Re.add,BF=Re.flush,VF=Re.getDeviceId,qF=Re.getSessionId,UF=Re.getUserId,GF=Re.groupIdentify,YF=Re.identify,WF=Re.init,$F=Re.logEvent,HF=Re.remove,XF=Re.reset,KF=Re.revenue,JF=Re.setDeviceId,ZF=Re.setGroup,QF=Re.setOptOut,eD=Re.setSessionId,tD=Re.setTransport,nD=Re.setUserId,rD=Re.track,Vd={production:"40ead723d18886045e302513245edb27",development:""},Rr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},qd=class{constructor(e){this.event_properties=e,b(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(qd,"AnalyticsCategorySelectedCall");var ra=qd,Ud=class{constructor(e){this.event_properties=e,b(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Ud,"AnalyticsLocationSelectedCall");var ia=Ud,Gd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Gd,"BlueDotDisableCall");var Ac=Gd,Yd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Yd,"BlueDotEnableCall");var Ic=Yd,Wd=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(Wd,"BlueDotOffCall");var Cc=Wd,$d=class{constructor(e){this.event_properties=e,b(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s($d,"BlueDotOnCall");var jc=$d,Hd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(Hd,"CameraAnimateCall");var Lc=Hd,Xd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Xd,"CameraCancelAnimationCall");var Nc=Xd,Kd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Kd,"CameraFocusOnCall");var Fc=Kd,Jd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(Jd,"CameraGetSafeAreaInsetsCall");var Dc=Jd,Zd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Zd,"CameraInteractionDisableCall");var Rc=Zd,Qd=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Qd,"CameraInteractionEnableCall");var zc=Qd,ep=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:set-call"),this.event_properties=e}};s(ep,"CameraSetCall");var Bc=ep,tp=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(tp,"CameraSetSafeAreaInsetsCall");var Vc=tp,np=class{constructor(e){this.event_properties=e,b(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(np,"CameraTranslateCall");var qc=np,rp=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(rp,"FlatLabelsAddCall");var Uc=rp,ip=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(ip,"FlatLabelsLabelAllLocationsCall");var Gc=ip,ap=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(ap,"FlatLabelsRemoveCall");var Yc=ap,op=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(op,"FlatLabelsRemoveAllCall");var Wc=op,sp=class{constructor(e){this.event_properties=e,b(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(sp,"FlatLabelsSetAppearanceCall");var $c=sp,up=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(up,"FloatingLabelsAddCall");var Hc=up,lp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(lp,"FloatingLabelsLabelAllLocationsCall");var Xc=lp,cp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(cp,"FloatingLabelsRemoveCall");var Kc=cp,dp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(dp,"FloatingLabelsRemoveAllCall");var Jc=dp,pp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(pp,"FloatingLabelsResetPriorityCall");var Zc=pp,fp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(fp,"FloatingLabelsSetAppearanceCall");var Qc=fp,hp=class{constructor(e){this.event_properties=e,b(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(hp,"FloatingLabelsSetPriorityCall");var ed=hp,mp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(mp,"GlobalGetVenueCall");var aa=mp,gp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(gp,"GlobalGetVenueMvfCall");var oa=gp,vp=class{constructor(e){this.event_properties=e,b(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(vp,"GlobalShowVenueCall");var td=vp,yp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(yp,"JourneyClearCall");var nd=yp,bp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(bp,"JourneyDrawCall");var rd=bp,wp=class{constructor(e){this.event_properties=e,b(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(wp,"JourneySetStepCall");var id=wp,kp=class{constructor(e){this.event_properties=e,b(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(kp,"MappedinGetCollectionItemByIdCall");var ad=kp,_p=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(_p,"MappedinCoordinateAbsoluteDistanceToCall");var od=_p,Mp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(Mp,"MappedinCoordinateNearestNodeCall");var sd=Mp,xp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(xp,"MappedinLocationCloneCall");var sa=xp,Ep=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(Ep,"MappedinLocationDirectionsToCall");var ua=Ep,Tp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(Tp,"MappedinLocationDistanceToCall");var la=Tp,Pp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(Pp,"MappedinMapCreateCoordinateCall");var ud=Pp,Op=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(Op,"MappedinMapCreateCoordinateByXyCall");var ld=Op,Sp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(Sp,"MappedinMapGetNorthCall");var cd=Sp,Ap=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(Ap,"MappedinNodeDirectionsToCall");var ca=Ap,Ip=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(Ip,"MappedinNodeDistanceToCall");var da=Ip,Cp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(Cp,"MappedinPolygonDirectionsToCall");var pa=Cp,jp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(jp,"MappedinPolygonDistanceToCall");var fa=jp,Lp=class{constructor(e){this.event_properties=e,b(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(Lp,"MappedinVenueMetadataRead");var ha=Lp,Np=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(Np,"MapViewAddInteractivePolygonCall");var dd=Np,Fp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(Fp,"MapViewAddInteractivePolygonsForAllLocationsCall");var pd=Fp,Dp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(Dp,"MapViewClearPolygonColorCall");var fd=Dp,Rp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Rp,"MapViewCreateCustomTooltipCall");var hd=Rp,zp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(zp,"MapViewCreateMarkerCall");var md=zp,Bp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Bp,"MapViewCreateTooltipCall");var gd=Bp,Vp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(Vp,"MapViewDestroyCall");var vd=Vp,qp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(qp,"MapViewDisableImageFlippingForAllPolygonsCall");var yd=qp,Up=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Up,"MapViewDrawPathCall");var bd=Up,Gp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Gp,"MapViewEnableImageFlippingForAllLocationsCall");var wd=Gp,Yp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(Yp,"MapViewEnableImageFlippingForPolygonCall");var kd=Yp,Wp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(Wp,"MapViewGetNearestNodeByScreenCoordinatesCall");var _d=Wp,$p=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s($p,"MapViewGetPolygonAtCoordinateCall");var Md=$p,Hp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Hp,"MapViewGetPrimaryLocationForPolygonCall");var xd=Hp,Xp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Xp,"MapViewLabelAllLocationsCall");var Ed=Xp,Kp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Kp,"MapViewRemoveAllInteractivePolygonsCall");var Td=Kp,Jp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Jp,"MapViewRemoveAllMarkersCall");var Pd=Jp,Zp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Zp,"MapViewRemoveAllPathsCall");var Od=Zp,Qp=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Qp,"MapViewRemoveAllTooltipsCall");var Sd=Qp,ef=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(ef,"MapViewRemoveInteractivePolygonCall");var Ad=ef,tf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(tf,"MapViewRemoveMarkerCall");var Id=tf,nf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(nf,"MapViewRemovePathCall");var Cd=nf,rf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(rf,"MapViewRemoveTooltipCall");var jd=rf,af=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(af,"MapViewSetBackgroundColorCall");var Ld=af,of=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(of,"MapViewSetHoverColorCall");var Nd=of,sf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(sf,"MapViewSetMapCall");var Fd=sf,uf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(uf,"MapViewSetPolygonColorCall");var Dd=uf,lf=class{constructor(e){this.event_properties=e,b(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(lf,"MapViewSetStateCall");var Rd=lf,cf=class{constructor(e){this.event_properties=e,b(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(cf,"MetricsMapLoadEvent");var zd=cf,df=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(df,"OfflineSearchAddQueryCall");var ma=df,pf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(pf,"OfflineSearchConstructorCall");var ga=pf,ff=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(ff,"OfflineSearchSearchCall");var va=ff,hf=class{constructor(e){this.event_properties=e,b(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(hf,"OfflineSearchSuggestCall");var ya=hf,au=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),mf=class{constructor(){b(this,"disabled",!1),b(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return null!=this.amplitude}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(e){var t,n;if(this.disabled=null!=(t=e.disabled)&&t,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),au();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=Vd[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=iu(),this.amplitude.init(r,void 0,{...Rr,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(n=e.client)?void 0:n.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return au()}identify(e,t,n){if(!this.isInitializedAndEnabled())return au();e&&(n={...n,user_id:e});let r=new Vt,i=t;if(null!=i)for(let[e,t]of Object.entries(i))r.set(e,t);return this.amplitude.identify(r,n)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):au()}analyticsCategorySelectedCall(e,t){return this.track(new ra(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new ia(e),t)}blueDotDisableCall(e,t){return this.track(new Ac(e),t)}blueDotEnableCall(e,t){return this.track(new Ic(e),t)}blueDotOffCall(e,t){return this.track(new Cc(e),t)}blueDotOnCall(e,t){return this.track(new jc(e),t)}cameraAnimateCall(e,t){return this.track(new Lc(e),t)}cameraCancelAnimationCall(e,t){return this.track(new Nc(e),t)}cameraFocusOnCall(e,t){return this.track(new Fc(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new Dc(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Rc(e),t)}cameraInteractionEnableCall(e,t){return this.track(new zc(e),t)}cameraSetCall(e,t){return this.track(new Bc(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Vc(e),t)}cameraTranslateCall(e,t){return this.track(new qc(e),t)}flatLabelsAddCall(e,t){return this.track(new Uc(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Gc(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Yc(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Wc(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new $c(e),t)}floatingLabelsAddCall(e,t){return this.track(new Hc(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Xc(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Kc(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Jc(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new Zc(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Qc(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new ed(e),t)}globalGetVenueCall(e,t){return this.track(new aa(e),t)}globalGetVenueMvfCall(e,t){return this.track(new oa(e),t)}globalShowVenueCall(e,t){return this.track(new td(e),t)}journeyClearCall(e,t){return this.track(new nd(e),t)}journeyDrawCall(e,t){return this.track(new rd(e),t)}journeySetStepCall(e,t){return this.track(new id(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new ad(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new od(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new sd(e),t)}mappedinLocationCloneCall(e,t){return this.track(new sa(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new ua(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new la(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new ud(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new ld(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new cd(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new ca(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new da(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new pa(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new fa(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new ha(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new dd(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new pd(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new fd(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new hd(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new md(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new gd(e),t)}mapViewDestroyCall(e,t){return this.track(new vd(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new yd(e),t)}mapViewDrawPathCall(e,t){return this.track(new bd(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new wd(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new kd(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new _d(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new Md(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new xd(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new Ed(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new Td(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new Pd(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new Od(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new Sd(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new Ad(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new Id(e),t)}mapViewRemovePathCall(e,t){return this.track(new Cd(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new jd(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new Ld(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new Nd(e),t)}mapViewSetMapCall(e,t){return this.track(new Fd(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new Dd(e),t)}mapViewSetStateCall(e,t){return this.track(new Rd(e),t)}metricsMapLoadEvent(e,t){return this.track(new zd(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new ma(e),t)}offlineSearchConstructorCall(e,t){return this.track(new ga(e),t)}offlineSearchSearchCall(e,t){return this.track(new va(e),t)}offlineSearchSuggestCall(e,t){return this.track(new ya(e),t)}};s(mf,"Ampli");var Bd=mf,ba=new Bd;y();var En,kr,qt,Yr,rn,Tu,Yy,Pu,Wy,Ia,zf,Ca,Bf,Ut,qy=Jt(cy()),Uy=Jt(zy()),Gy=Jt(By()),Vy="5.38.0",cP="https://api2.amplitude.com/2/httpapi",dP="https://api2.amplitude.com/batch",pP="__unspecified__",Df={branch:"main",version:"0",source:"websdk"},it=class e{constructor(){A(this,Tu),A(this,Pu),A(this,Ia),A(this,Ca),A(this,qt,{}),A(this,Yr,!1),A(this,rn,void 0),A(this,Ut,s((async e=>{hP(e.type)&&(window.removeEventListener("visibilitychange",w(this,Ut)),window.removeEventListener("pagehide",w(this,Ut)),window.removeEventListener("beforeunload",w(this,Ut)),window.removeEventListener("unload",w(this,Ut)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==w(e,kr)&&j(e,kr,Vy),typeof navigator<"u"&&null!=navigator.userAgent&&j(this,rn,new Gy.UAParser(navigator.userAgent).getResult())}static setContext(t){j(e,En,t)}static setVersion(t){j(e,kr,t)}addPendingEvent(t){var n;if(null==w(e,En))return;let r=t.event_type;if(!we(this,Pu,Wy).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=w(this,qt)[r];(0,Uy.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),w(this,qt)[r]=t}async sendAllPendingEvents(){if(null==w(e,En)||Object.keys(w(this,qt)).length<1)return;if(w(this,Yr))return void R.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in w(this,qt)){let n=w(this,qt)[e],r=we(this,Ia,zf).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{j(this,Yr,!0),200===(await we(this,Ca,Bf).call(this,dP,t)).status&&j(this,qt,{})}catch(e){R.warn("Error sending batch product analytics!",e)}finally{j(this,Yr,!1)}}async load(){if(!ba.isLoaded){let{promise:e}=ba.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",w(this,Ut)),window.addEventListener("beforeunload",w(this,Ut)),window.addEventListener("unload",w(this,Ut)),window.addEventListener("visibilitychange",w(this,Ut))}))}}async sendEventNow(t){if(null==w(e,En))return;let n=we(this,Ia,zf).call(this,t);if(null!=n)try{await we(this,Ca,Bf).call(this,cP,[n])}catch(e){R.warn("Error sending single product analytics event!",e)}}};En=new WeakMap,kr=new WeakMap,qt=new WeakMap,Yr=new WeakMap,rn=new WeakMap,Tu=new WeakSet,Yy=s((function(e){let t=e.event_type;return null!=w(this,qt)[t]}),"#isEventTypePending"),Pu=new WeakSet,Wy=s((function(e){if(!we(this,Tu,Yy).call(this,e))return!0;let t=e.event_type,n=w(this,qt)[t];return!(0,qy.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),Ia=new WeakSet,zf=s((function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y;if(null!=w(it,En))return null==(null==(t=e.event_properties)?void 0:t.venue)&&R.warn("Error processing product analytics event! Unspecified venue slug",e),null==Rr.plan&&R.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=ba.client.getSessionId())?n:Su(),device_id:null!=(r=ba.client.getDeviceId())?r:Ou(),plan:{branch:null!=(o=null==(i=Rr.plan)?void 0:i.branch)?o:Df.branch,version:null!=(a=null==(s=Rr.plan)?void 0:s.version)?a:Df.version,source:null!=(u=null==(l=Rr.plan)?void 0:l.source)?u:Df.source},os_name:null==(c=w(this,rn))?void 0:c.browser.name,os_version:null==(h=w(this,rn))?void 0:h.browser.version,device_manufacturer:null==(d=w(this,rn))?void 0:d.device.vendor,device_model:null==(p=w(this,rn))?void 0:p.device.model,event_properties:{...e.event_properties,context:w(it,En),sdk_version:w(it,kr),browser_name:null==(f=w(this,rn))?void 0:f.browser.name,browser_version:null==(g=w(this,rn))?void 0:g.browser.version,venue:null!=(y=null==(v=e.event_properties)?void 0:v.venue)?y:pP},time:e.time}}),"#makeBatchFormattedEvent"),Ca=new WeakSet,Bf=s((async function(e,t){return await ft()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Vd.production,events:t})})}),"#batchSend"),Ut=new WeakMap,s(it,"ProductAnalytics"),A(it,En,void 0),A(it,kr,void 0);var Rf=it,fP=new Rf,Ee=fP;function hP(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(hP,"areWeLeavingThePage");var It,Wr,He,Na,ja=class e extends en{constructor(e,t){super(e),A(this,It,void 0),A(this,Wr,void 0),A(this,He,{}),b(this,"id",""),b(this,"x",0),b(this,"y",0),b(this,"operationHours"),b(this,"externalId"),A(this,Na,void 0),j(this,It,e),j(this,Wr,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,He).map;if(typeof e<"u")return e;let t=w(this,It).getCollectionItemById("maps",w(this,Wr).map);return w(this,He).map=t,t}get lat(){var e;let t=w(this,He).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=w(this,It)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,He).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,He).cachedLatLon.lat}get lon(){var e;let t=w(this,He).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=w(this,It)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,He).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,He).cachedLatLon.lon}get paths(){let e=w(this,He).paths;if(typeof e<"u")return e;let t=[],n=w(this,It)._nodesById,r=w(this,Na);if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return w(this,He).paths=t,t}set paths(e){j(this,Na,e)}get locations(){var e,t,n;let r=w(this,He).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=at.instances.get(w(this,It)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],s=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],n=t.nodes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e)if(n[e].id===s){i.push(t);break}}return w(this,He).locations=i,i}get polygon(){var e,t,n,r;let i=w(this,He).polygon;if(typeof i<"u")return i;let o,s=null!=(r=null==(n=null==(e=at.instances.get(w(this,It)))?void 0:e.polygonsByMapId)?void 0:n.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?r:[],a=this.id;for(let e=0,t=s.length;e<t;++e){let t=s[e];t.entrances.map((e=>e.id)).includes(a)&&(o=t)}return w(this,He).polygon=o,o}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.nodes.slice();t.options.things.maps&&Se(n,"map"),["weight","multiplier","accessible"].forEach((function(e){Se(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Ae(t.options,"node",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof St,r=w(this,It).venue.slug,i=new ca({with_destination_set:n||void 0,venue:r});return Ee.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,It).venue.slug;return Ee.addPendingEvent(new da({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,Wr)}};It=new WeakMap,Wr=new WeakMap,He=new WeakMap,Na=new WeakMap,s(ja,"MappedinNode");var La=ja;y();var an,$r,Ct,Ra,Da=class e extends en{constructor(e,t){super(e),A(this,an,void 0),A(this,$r,void 0),A(this,Ct,{}),b(this,"geometry"),b(this,"perspectives"),b(this,"image"),b(this,"holes"),b(this,"textures"),b(this,"material"),b(this,"label"),b(this,"id",""),b(this,"layer"),b(this,"layerId"),b(this,"name"),b(this,"externalId"),b(this,"vertexes"),b(this,"center"),b(this,"canvasBounds"),b(this,"categoryRank"),A(this,Ra,void 0),j(this,an,e),j(this,$r,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,Ct).map;if(typeof e<"u")return e;let t=w(this,an).getCollectionItemById("maps",w(this,$r).map);return w(this,Ct).map=t,t}get locations(){var e,t;let n=w(this,Ct).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=at.instances.get(w(this,an)))?void 0:e.locationsByMapId.get(this.map.id))?t:[],{id:o}=this;for(let e=0,t=i.length;e<t;++e){let t=i[e],n=t.polygons;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e)if(n[e].id===o){r.push(t);break}}return w(this,Ct).locations=r,r}get entrances(){let e=w(this,Ct).entrances;if(typeof e<"u")return e;let t=[],n=w(this,Ra),r=w(this,an)._nodesById;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return w(this,Ct).entrances=t,t}return[]}set entrances(e){j(this,Ra,e)}get rank(){let e=w(this,Ct).rank;if(typeof e<"u")return e;let{rankings:t}=w(this,an);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(w(this,Ct).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(w(this,Ct).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.polygons.slice();t.options.things.maps&&Se(n,"map"),t.options.things.nodes&&Se(n,"entrances");let r={fields:n,venue:t.options.venue};try{return(await Ae(t.options,"polygon",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof St,r=w(this,an).venue.slug,i=new pa({with_destination_set:n||void 0,venue:r});return Ee.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,an).venue.slug;return Ee.addPendingEvent(new fa({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,$r)}};an=new WeakMap,$r=new WeakMap,Ct=new WeakMap,Ra=new WeakMap,s(Da,"MappedinPolygon");var _r=Da;y();var mP=0,gP="9999-12-31T00:00:00.000Z";function vP(e,t,n=new Date){if(!e.states)return;let r=n||new Date,i=e.states.find((e=>{let t=new Date(e.start||mP),n=new Date(e.end||gP);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}s(vP,"getCurrentLocationState");var wt,Xn,kt,za,Ba,Va,$y=["name","description","shortName","tags"],Mr=class e extends en{constructor(e,t){super(e),A(this,wt,void 0),A(this,Xn,void 0),A(this,kt,{}),b(this,"states"),b(this,"id",""),b(this,"name",""),b(this,"type",""),b(this,"description"),b(this,"sortOrder"),b(this,"logo"),b(this,"phone"),b(this,"social"),b(this,"color"),b(this,"shortName"),b(this,"detailsUrl"),b(this,"tags"),b(this,"toMap"),b(this,"externalId"),b(this,"showLabelWhenImagePresent"),b(this,"showSmartLabelWhenImagePresent"),b(this,"picture"),b(this,"operationHours"),b(this,"siblingGroups"),b(this,"gallery"),b(this,"amenity"),b(this,"filterFlags"),A(this,za,void 0),A(this,Ba,[]),A(this,Va,void 0),j(this,wt,e),j(this,Xn,t);let n=Object.assign({},t);delete n.categories,Object.assign(this,n)}get polygons(){let e=w(this,kt).polygons;if(typeof e<"u")return e;let t=[],n=w(this,za),r=w(this,wt)._polygonsById;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return w(this,kt).polygons=t,t}set polygons(e){j(this,za,e)}get nodes(){let e=w(this,kt).nodes;if(typeof e<"u")return e;let t=[],n=w(this,Ba),r=w(this,wt)._nodesById;if(n&&n.length)for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return w(this,kt).nodes=t,t}set nodes(e){j(this,Ba,e)}get parent(){let e=w(this,kt).parent;if(typeof e<"u")return e;let t,n=w(this,wt)._locationsById,r=w(this,Va);return void 0!==r&&(t=n[r]),w(this,kt).parent=t,t}set parent(e){j(this,Va,e)}get categories(){let e=w(this,kt).categories;if(typeof e<"u")return e;let t=[];return w(this,Xn).categories.forEach((e=>{let n=w(this,wt).getCollectionItemById("categories",e);n&&t.push(n)})),w(this,kt).categories=t,t}get state(){return vP(this,w(this,wt).locationStates)}clone(){let t=w(this,wt).venue.slug;return Ee.addPendingEvent(new sa({venue:t})),new e(w(this,wt),w(this,Xn))}get nodeOperationHours(){let e=w(this,kt).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=w(this,Xn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return w(this,kt).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r,i=n||await e.fetch(t);for(let e=0;e<i.length;e++){r=t.locations[e];for(let t of $y)r[t]=i[e][t]}}static async fetch(t){let n=t.options.things.locations.slice();t.options.things.categories&&Se(n,"categories"),t.options.things.nodes&&Se(n,"nodes"),t.options.things.polygons&&Se(n,"polygons"),t.options.things.locationStates&&Se(n,"states");let r={fields:n,venue:t.options.venue};try{let n=await Ae(t.options,"location",r);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return R.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof St,r=w(this,wt).venue.slug,i=new ua({with_destination_set:n||void 0,venue:r});return Ee.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,wt).venue.slug;return Ee.addPendingEvent(new la({venue:n})),super.distanceTo(e,t)}toJSON(){let e={...w(this,Xn)};for(let t of $y)e[t]=this[t];return delete e.color,e}};wt=new WeakMap,Xn=new WeakMap,kt=new WeakMap,za=new WeakMap,Ba=new WeakMap,Va=new WeakMap,s(Mr,"MappedinLocation");var Tn=Mr;y();var Xr,xr,qa,Hy=["name"],Hr=class e{constructor(e,t){A(this,Xr,void 0),A(this,xr,{}),A(this,qa,void 0),b(this,"name"),b(this,"externalId"),b(this,"parents"),b(this,"id"),b(this,"icon"),b(this,"iconFromDefaultList"),b(this,"sortOrder"),this.id=t.id,j(this,qa,t),j(this,Xr,e),Object.assign(this,t)}get locations(){var e;let t=w(this,xr).locations;if(typeof t<"u")return t;let n=[],{locations:r}=w(this,Xr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],s=o.categories;if(Array.isArray(s))for(let t=0,r=s.length;t<r;++t)if((null==(e=s[t])?void 0:e.id)===i){n.push(o);break}}return w(this,xr).locations=n,n}get children(){var e;let t=w(this,xr).children;if(typeof t<"u")return t;let{categories:n}=w(this,Xr),{id:r}=this,i=[];for(let t=0;t<n.length;t++)r&&null!=(e=n[t].parents)&&e.includes(r)&&i.push(n[t]);return w(this,xr).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Hy)t.categories[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.categories,venue:t.options.venue};try{return(await Ae(t.options,"category",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Categories:",e),[]}}toJSON(){let e={...w(this,qa)};for(let t of Hy)e[t]=this[t];return e}};Xr=new WeakMap,xr=new WeakMap,qa=new WeakMap,s(Hr,"MappedinCategory");var Er=Hr;y();var Ua,Pn,Vf=class{constructor(e,t){A(this,Ua,void 0),A(this,Pn,void 0),b(this,"distance",0),b(this,"path",[]),b(this,"instructions",[]),j(this,Pn,e),j(this,Ua,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,s,a,l,u,c,h,d;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=w(this,Pn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(s=null==(o=w(this,Pn))?void 0:o._nodesById)?void 0:s[e.node.id]:void 0};if("TakeVortex"===(null==(a=p.action)?void 0:a.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=w(this,Pn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(d=w(this,Pn)._mapsById)?void 0:d[null==(h=p.action)?void 0:h.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var n,r;let i=null==(r=null==(n=w(this,Pn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return w(this,Ua)}};Ua=new WeakMap,Pn=new WeakMap,s(Vf,"MappedinDirections");var cr=Vf;y();var qf=class{constructor(e){b(this,"destinations",[]),this.destinations=e}};s(qf,"MappedinDestinationSet");var St=qf;y();var Wa,Ga=class e{constructor(e){b(this,"id",""),A(this,Wa,void 0),b(this,"accessible"),b(this,"name"),b(this,"type"),b(this,"weight"),b(this,"multiplier"),b(this,"nodes"),b(this,"filterFlags"),j(this,Wa,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){Se(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Ae(t.options,"vortex",r)).map((t=>new e(t)))}catch(e){return R.error("Fetch Vortexes:",e),[]}}toJSON(){return w(this,Wa)}};Wa=new WeakMap,s(Ga,"MappedinVortex");var Ya=Ga;y();var Ha,Xa,Ka,Kr,$a=class e{constructor(e,t){A(this,Ha,void 0),A(this,Xa,void 0),A(this,Ka,void 0),A(this,Kr,{}),b(this,"defaultMap",""),b(this,"address",""),b(this,"city",""),b(this,"countrycode",""),b(this,"externalId",""),b(this,"id",""),b(this,"latitude"),b(this,"logo"),b(this,"longitude"),b(this,"name",""),b(this,"operationHours"),b(this,"postal",""),b(this,"slug",""),b(this,"state",""),b(this,"telephone",""),b(this,"tzid",""),b(this,"tzidOverride",""),b(this,"utcOffset",""),b(this,"website",""),b(this,"secureContentStorage",!1),b(this,"defaultLanguage"),b(this,"languages",[]),b(this,"topLocations",[]),b(this,"renderOptions",{useLivePolygons:!1,simplifyDirections:!1}),j(this,Xa,e),j(this,Ha,t),Object.assign(this,t)}get metadata(){return Ee.addPendingEvent(new ha({venue:this.slug})),w(this,Ka)}set metadata(e){j(this,Ka,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){let n={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let r=await Ae(t.options,"venue",n);return new e(t,Array.isArray(r)?r[0]:r)}catch(e){return R.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==w(this,Kr).isMultiBuilding){let e=w(this,Xa).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;w(this,Kr).isMultiBuilding=n}return w(this,Kr).isMultiBuilding}toJSON(){return w(this,Ha)}};Ha=new WeakMap,Xa=new WeakMap,Ka=new WeakMap,Kr=new WeakMap,s($a,"MappedinVenue");var Tr=$a;y();var Za,Ja=class e{constructor(e){b(this,"id",""),A(this,Za,void 0),j(this,Za,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await Ae(t.options,"apollo-theme",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Theme:",e),[]}}toJSON(){return w(this,Za)}};Za=new WeakMap,s(Ja,"MappedinTheme");var Au=Ja;y();var to,Qa=class e{constructor(e){A(this,to,void 0),b(this,"polygons",[]),j(this,to,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let n=await Jr({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(n)}catch(e){return R.error("Fetch Rankings:",e),null}}toJSON(){return w(this,to)}};to=new WeakMap,s(Qa,"MappedinRankings");var eo=Qa;y(),y();var ro,Qr,io,Xy=["name","description"],Zr=class e{constructor(e,t){A(this,ro,void 0),A(this,Qr,void 0),A(this,io,{}),b(this,"id",""),b(this,"type",""),b(this,"name",""),b(this,"description"),b(this,"image"),b(this,"startDate"),b(this,"endDate"),b(this,"showDate"),j(this,Qr,t),j(this,ro,e),Object.assign(this,t)}location(){let e=w(this,io).location;if(typeof e<"u")return e;let t,n=w(this,ro)._locationsById,r=w(this,Qr).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return w(this,io).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Xy)t.events[e][n]=r[e][n]}static async fetch(t){let n=t.options.things.events.slice();t.options.things.locations&&Se(n,"location");let r={fields:n,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await Ae(t.options,"event",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Events:",e),[]}}toJSON(){let e={...w(this,Qr)};for(let t of Xy)e[t]=this[t];return e}};ro=new WeakMap,Qr=new WeakMap,io=new WeakMap,s(Zr,"MappedinEvent");var no=Zr;y();var oo,Ky=["name"],ei=class e{constructor(e){A(this,oo,void 0),b(this,"id",""),b(this,"name",""),b(this,"value",""),j(this,oo,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Ky)t.locationStates[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await Ae(t.options,"location-state",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Location States:",e),[]}}toJSON(){let e={...w(this,oo)};for(let t of Ky)e[t]=this[t];return e}};oo=new WeakMap,s(ei,"MappedinLocationState");var ao=ei;y(),y(),y();var Jy=" ",ot=class e{static get separator(){return Jy}static set separator(e){Jy=e}static parse(e){if(!isNaN(parseFloat(e))&&isFinite(e))return Number(e);let t=String(e).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==t[t.length-1]&&t.splice(t.length-1),""==t)return NaN;let n=null;switch(t.length){case 3:n=t[0]/1+t[1]/60+t[2]/3600;break;case 2:n=t[0]/1+t[1]/60;break;case 1:n=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(n=-n),Number(n)}static toDms(t,n="d",r){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===r)switch(n){case"d":case"deg":r=4;break;case"dm":case"deg+min":r=2;break;case"dms":case"deg+min+sec":r=0;break;default:n="d",r=4}t=Math.abs(t);let i=null,o=null,s=null,a=null;switch(n){default:case"d":case"deg":o=t.toFixed(r),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),s=(60*t%60).toFixed(r),60==s&&(s=(0).toFixed(r),o++),o=("000"+o).slice(-3),s<10&&(s="0"+s),i=o+"°"+e.separator+s+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),s=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),s++),60==s&&(s=0,o++),o=("000"+o).slice(-3),s=("00"+s).slice(-2),a<10&&(a="0"+a),i=o+"°"+e.separator+s+"′"+e.separator+a+"″"}return i}static toLat(t,n,r){let i=e.toDms(e.wrap90(t),n,r);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,n,r){let i=e.toDms(e.wrap180(t),n,r);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,n,r){let i=e.toDms(e.wrap360(t),n,r);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,n=3){if(![1,2,3].includes(Number(n)))throw new RangeError("invalid precision ‘".concat(n,"’"));t=e.wrap360(t);let r=4*2**(n-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*r/360)%r*16/r]}static wrap360(e){return 0<=e&&e<360?e:(e%360+360)%360}static wrap180(e){return-180<e&&e<=180?e:(e+540)%360-180}static wrap90(e){return-90<=e&&e<=90?e:Math.abs((e%360+270)%360-180)-90}};s(ot,"Dms");var Uf=ot;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var ie=Uf,Te=Math.PI,J=class e{constructor(e,t){if(isNaN(e))throw new TypeError("invalid lat ‘".concat(e,"’"));if(isNaN(t))throw new TypeError("invalid lon ‘".concat(t,"’"));this._lat=ie.wrap90(Number(e)),this._lon=ie.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?ie.wrap90(ie.parse(e)):ie.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?ie.wrap90(ie.parse(e)):ie.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(e,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?ie.wrap180(ie.parse(e)):ie.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?ie.wrap180(ie.parse(e)):ie.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?ie.wrap180(ie.parse(e)):ie.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(e,"’"))}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 n,r;if(2==t.length&&([n,r]=t,n=ie.wrap90(ie.parse(n)),r=ie.wrap180(ie.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([n,r]=t[0].split(","),n=ie.wrap90(ie.parse(n)),r=ie.wrap180(ie.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t[0],"’"));if(1==t.length&&"object"==typeof t[0]){let e=t[0];if("Point"==e.type&&Array.isArray(e.coordinates)?[r,n]=e.coordinates:(null!=e.latitude&&(n=e.latitude),null!=e.lat&&(n=e.lat),null!=e.longitude&&(r=e.longitude),null!=e.lng&&(r=e.lng),null!=e.lon&&(r=e.lon),n=ie.wrap90(ie.parse(n)),r=ie.wrap180(ie.parse(r))),isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(n,r)}distanceTo(t,n=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(n))throw new TypeError("invalid radius ‘".concat(n,"’"));let r=n,i=this.lat.toRadians(),o=this.lon.toRadians(),s=t.lat.toRadians(),a=s-i,l=t.lon.toRadians()-o,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2);return r*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)))}initialBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),o=Math.cos(n)*Math.sin(r)-Math.sin(n)*Math.cos(r)*Math.cos(i),s=Math.sin(i)*Math.cos(r),a=Math.atan2(s,o).toDegrees();return ie.wrap360(a)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return ie.wrap360(n)}midpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),s=Math.cos(n),a=0,l=Math.sin(n),u={x:s+Math.cos(i)*Math.cos(o),y:a+Math.cos(i)*Math.sin(o),z:l+Math.sin(i)},c=Math.atan2(u.z,Math.sqrt(u.x*u.x+u.y*u.y)),h=r+Math.atan2(u.y,u.x),d=c.toDegrees(),p=h.toDegrees();return new e(d,p)}intermediatePointTo(t,n){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let r=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),s=t.lon.toRadians(),a=o-r,l=s-i,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),h=Math.sin((1-n)*c)/Math.sin(c),d=Math.sin(n*c)/Math.sin(c),p=h*Math.cos(r)*Math.cos(i)+d*Math.cos(o)*Math.cos(s),f=h*Math.cos(r)*Math.sin(i)+d*Math.cos(o)*Math.sin(s),g=h*Math.sin(r)+d*Math.sin(o),v=Math.atan2(g,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=v.toDegrees(),b=y.toDegrees();return new e(m,b)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).toRadians(),s=this.lat.toRadians(),a=this.lon.toRadians(),l=Math.sin(s)*Math.cos(i)+Math.cos(s)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(s),h=Math.cos(i)-Math.sin(s)*l,d=a+Math.atan2(c,h),p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}static intersection(t,n,r,i){if(t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r)),isNaN(n))throw new TypeError("invalid brng1 ‘".concat(n,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),s=t.lon.toRadians(),a=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).toRadians(),c=Number(i).toRadians(),h=a-o,d=l-s,p=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(o)*Math.cos(a)*Math.sin(d/2)*Math.sin(d/2)));if(Math.abs(p)<Number.EPSILON)return new e(t.lat,t.lon);let f=(Math.sin(a)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),g=(Math.sin(o)-Math.sin(a)*Math.cos(p))/(Math.sin(p)*Math.cos(a)),v=Math.acos(Math.min(Math.max(f,-1),1)),y=Math.acos(Math.min(Math.max(g,-1),1)),m=u-(Math.sin(l-s)>0?v:2*Te-v),b=(Math.sin(l-s)>0?2*Te-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(b)||Math.sin(m)*Math.sin(b)<0)return null;let w=-Math.cos(m)*Math.cos(b)+Math.sin(m)*Math.sin(b)*Math.cos(p),_=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(b),Math.cos(b)+Math.cos(m)*w),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(_)+Math.cos(o)*Math.sin(_)*Math.cos(u),-1),1)),x=s+Math.atan2(Math.sin(u)*Math.sin(_)*Math.cos(o),Math.cos(_)-Math.sin(o)*Math.sin(M)),S=M.toDegrees(),k=x.toDegrees();return new e(S,k)}crossTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(s-a))*i}alongTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(s-a));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(a-s))*i}maxLatitude(e){let t=Number(e).toRadians(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(n))).toDegrees()}static crossingParallels(e,t,n){if(e.equals(t))return null;let r=Number(n).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),s=t.lat.toRadians(),a=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(a),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(a)-Math.cos(i)*Math.sin(s)*Math.cos(r),c=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(a);if(c*c>l*l+u*u)return null;let h=Math.atan2(-u,l),d=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+h+d,f=(o+h-d).toDegrees(),g=p.toDegrees();return{lon1:ie.wrap180(f),lon2:ie.wrap180(g)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,i=this.lat.toRadians(),o=t.lat.toRadians(),s=o-i,a=Math.abs(t.lon-this.lon).toRadians();Math.abs(a)>Te&&(a=a>0?-(2*Te-a):2*Te+a);let l=Math.log(Math.tan(o/2+Te/4)/Math.tan(i/2+Te/4)),u=Math.abs(l)>1e-11?s/l:Math.cos(i);return Math.sqrt(s*s+u*u*a*a)*r}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians();Math.abs(i)>Te&&(i=i>0?-(2*Te-i):2*Te+i);let o=Math.log(Math.tan(r/2+Te/4)/Math.tan(n/2+Te/4)),s=Math.atan2(i,o).toDegrees();return ie.wrap360(s)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),s=Number(n).toRadians(),a=t/r,l=a*Math.cos(s),u=i+l;Math.abs(u)>Te/2&&(u=u>0?Te-u:-Te-u);let c=Math.log(Math.tan(u/2+Te/4)/Math.tan(i/2+Te/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(i),d=o+a*Math.sin(s)/h,p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-r)>Te&&(r+=2*Te);let s=(n+i)/2,a=Math.tan(Te/4+n/2),l=Math.tan(Te/4+i/2),u=Math.tan(Te/4+s/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(a))/Math.log(l/a);isFinite(c)||(c=(r+o)/2);let h=s.toDegrees(),d=c.toDegrees();return new e(h,d)}static areaOf(e,t=6371e3){let n=t,r=e[0].equals(e[e.length-1]);r||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let n=e[t].lat.toRadians(),r=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(n/2)+Math.tan(r/2)),1+Math.tan(n/2)*Math.tan(r/2))}a(e)&&(o=Math.abs(o)-2*Te);let s=Math.abs(o*n*n);return r||e.pop(),s;function a(e){let t=0,n=e[0].initialBearingTo(e[1]);for(let r=0;r<e.length-1;r++){let i=e[r].initialBearingTo(e[r+1]),o=e[r].finalBearingTo(e[r+1]);t+=(i-n+540)%360-180,t+=(o-i+540)%360-180,n=o}return t+=(e[0].initialBearingTo(e[1])-n+540)%360-180,Math.abs(t)<90}}equals(t){return t instanceof e||(t=e.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(e="d",t){if(!["d","dm","dms","n"].includes(e))throw new RangeError("invalid format ‘".concat(e,"’"));if("n"==e)return null==t&&(t=4),"".concat(this.lat.toFixed(t),",").concat(this.lon.toFixed(t));let n=ie.toLat(this.lat,e,t),r=ie.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};s(J,"LatLonSpherical");var on,Kn,uo,Ne=J,Zy=["name","shortName"],ti=class e{constructor(e,t){A(this,on,void 0),A(this,Kn,{}),A(this,uo,void 0),b(this,"id",""),b(this,"group",""),b(this,"name",""),b(this,"shortName",""),b(this,"elevation",0),b(this,"subtitle"),b(this,"scale",0),b(this,"layers"),b(this,"x_scale"),b(this,"perspectiveId"),b(this,"scene"),b(this,"width",0),b(this,"height",0),b(this,"georeference",[]),b(this,"_scale",0),j(this,on,e),j(this,uo,t),Object.assign(this,t),this._scale=Qy(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=at.instances.get(w(this,on)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=at.instances.get(w(this,on)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=at.instances.get(w(this,on)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=w(this,Kn).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&w(this,on)._mapGroupsById[t]||null;return w(this,Kn).mapGroup=n,n}createCoordinateByXY(e,t){return new Pr({x:e,y:t,map:this,mappedin:w(this,on)})}createCoordinate(e,t){return new Pr({lat:e,lon:t,map:this,mappedin:w(this,on)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new Ne(t.target.x,t.target.y),i=new Ne(n.target.x,n.target.y);e=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-t.control.y,n.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,R.warn(t),R.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Zy)t.maps[e][n]=r[e][n]}static async fetch(t){var n;let r=t.options.things.maps.slice();t.options.perspective&&Se(r,"perspectives"),t.options.things.mapGroups&&Se(r,"group"),Se(r,"elevation"),Se(r,"x_scale"),Se(r,"scale"),Se(r,"georeference");let i={fields:r,perspective:t.options.perspective,venue:t.options.venue};try{let a=await Ae(t.options,"map",i),l=s((e=>{let t=o.layers.find((t=>t.id===e));t?t.visible=!0:o.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let i=0,s=a.length;i<s;++i){var o=a[i];if(o){let e=o.perspective;null!=e&&(o.perspectiveId=e.id,r.indexOf("scene")>-1&&(o.scene=e.scene),e.layers?(o.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(l)):o.layers.forEach((e=>{e.visible=!0}))),delete o.perspective}if(t.options.preloadMapGeometry&&null!=(n=o.scene)&&n.polygons&&"string"==typeof o.scene.polygons){let e=await ft()(o.scene.polygons);o.scene.polygons=await e.json()}a[i]=new e(t,o)}return a}catch(e){return R.error("Fetch Maps:",e),[]}}get center(){if(w(this,Kn).center)return w(this,Kn).center;let[e,t]=[this.georeference[0].control.x,this.georeference[0].control.y],[n,r]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(e,t),{lat:s,lon:a}=this.createCoordinateByXY(n,r),l=new Ne(i,o),u=new Ne(s,a),c=l.midPointTo(u);return w(this,Kn).center=c,c}toJSON(){let e={...w(this,uo)};for(let t of Zy)e[t]=this[t];return e}};on=new WeakMap,Kn=new WeakMap,uo=new WeakMap,s(ti,"MappedinMap");var so=ti;y();var lo,Gf,co,Yf,Gt,ni,Iu,eb,Cu,tb,sn,un,ln,cn,Wf=class{constructor(e){A(this,lo),A(this,co),A(this,Iu),A(this,Cu),b(this,"map"),A(this,Gt,{}),A(this,ni,void 0),A(this,sn,void 0),A(this,un,void 0),A(this,ln,void 0),A(this,cn,void 0);let{map:t,mappedin:n}=e;null!=e.lat&&null!=e.lon&&(j(this,sn,e.lat),j(this,un,e.lon)),null!=e.x&&null!=e.y&&(j(this,ln,e.x),j(this,cn,e.y)),this.map=t,j(this,ni,n)}get x(){return we(this,co,Yf).call(this,"x")}get y(){return we(this,co,Yf).call(this,"y")}get lat(){return we(this,lo,Gf).call(this,"lat")}get lon(){return we(this,lo,Gf).call(this,"lon")}absoluteDistanceTo(e){return nb([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=w(this,Gt).nearestNode;if(typeof e<"u")return e;let t=at.instances.get(w(this,ni)).findNearestNodeOnMap(this.map.id,this);return w(this,Gt).nearestNode=t,t}nodesInRadius(e){if(e<=0)return R.error("Radius must be greater than 0."),[];let t=w(this,Gt).radius,n=w(this,Gt).nodesInRadius;if(t&&n&&w(this,Gt).radius===e)return w(this,Gt).nodesInRadius;let r=at.instances.get(w(this,ni)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return w(this,Gt).radius=e,w(this,Gt).nodesInRadius=r,r}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};lo=new WeakSet,Gf=s((function(e){if(typeof w(this,sn)<"u"&&typeof w(this,un)<"u")return w(this,"lat"===e?sn:un);if(typeof w(this,ln)<"u"&&typeof w(this,cn)<"u"){let[t,n]=we(this,Cu,tb).call(this,w(this,ln),w(this,cn));return j(this,sn,t),j(this,un,n),w(this,"lat"===e?sn:un)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),co=new WeakSet,Yf=s((function(e){if(w(this,ln)&&w(this,cn))return w(this,"x"===e?ln:cn);if(null!=w(this,sn)&&null!=w(this,un)){let[t,n]=we(this,Iu,eb).call(this,w(this,sn),w(this,un));return j(this,ln,t),j(this,cn,n),w(this,"x"===e?ln:cn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),Gt=new WeakMap,ni=new WeakMap,Iu=new WeakSet,eb=s((function(e,t){let n=this.map.georeference[0],r=new Ne(n.target.x,n.target.y),i=new Ne(e,t),o=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,a=o*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*a,c=Math.cos(l)*a;return[n.control.x+u,n.control.y-c]}),"#latLonToXY"),Cu=new WeakSet,tb=s((function(e,t){let n,r=this.map.georeference[0],i=new Ne(r.target.x,r.target.y),o=e-r.control.x,s=r.control.y-t,a=Math.atan2(o,s);n=0===o&&0===s?0:0===o?s:o/Math.sin(a);let l=a-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),sn=new WeakMap,un=new WeakMap,ln=new WeakMap,cn=new WeakMap,s(Wf,"MappedinCoordinate");var Pr=Wf;y();var fo,ii,ho,rb=["name"],ri=class e{constructor(e,t){A(this,fo,void 0),A(this,ii,void 0),A(this,ho,{}),b(this,"id",""),b(this,"name",""),j(this,ii,t),j(this,fo,e),Object.assign(this,t)}get maps(){let e=w(this,ho).maps;if(typeof e<"u")return e;let t=[],{maps:n}=w(this,fo),{id:r}=w(this,ii);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return w(this,ho).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of rb)t.mapGroups[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await Ae(t.options,"map-group",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...w(this,ii)};for(let t of rb)e[t]=this[t];return e}};fo=new WeakMap,ii=new WeakMap,ho=new WeakMap,s(ri,"MappedinMapGroup");var po=ri;y();var ub=Jt(ib());y(),y();var Or,Yt,Wt,$f=[0,4,6,8,10],On=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let n=0;n<e.length;n++)n>0&&!(3&n)&&(t=4294967296*Math.random()),e[n]=t>>>((3&n)<<3)&255;let n=e.map((e=>e.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],$f.map(((e,t)=>n.slice(e,t===$f.length-1?void 0:$f[t+1]).join(""))).join("-")}),"randomId"),ab="mi-session-data",ob="mi-local-data",mo=class e{constructor(){A(this,Yt,void 0),A(this,Wt,void 0);try{let e=sessionStorage.getItem(ab);j(this,Yt,e?JSON.parse(e):{id:On()})}catch{j(this,Yt,{id:On()})}try{let e=localStorage.getItem(ob);j(this,Wt,e?JSON.parse(e):{deviceId:On()})}catch{j(this,Wt,{deviceId:On()})}w(this,Yt).id||(w(this,Yt).id=On()),w(this,Wt).deviceId||(w(this,Wt).deviceId=On())}static getInstance(){return w(this,Or)||j(this,Or,new e),w(this,Or)}static ___clearInstance(){j(this,Or,void 0)}saveSessionData(e,t){w(this,Yt)[e]=t;try{return sessionStorage.setItem(ab,JSON.stringify(w(this,Yt))),!0}catch{return!1}}loadSessionData(e){let t=w(this,Yt)[e];if(null!=t)return t}saveLocalData(e,t){w(this,Wt)[e]=t;try{return localStorage.setItem(ob,JSON.stringify(w(this,Wt))),!0}catch{return!1}}loadLocalData(e){let t=w(this,Wt)[e];if(null!=t)return t}};Or=new WeakMap,Yt=new WeakMap,Wt=new WeakMap,s(mo,"SafeStorage"),A(mo,Or,void 0);var go=mo;y();var Hf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage","renderOptions"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible","filterFlags"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity","filterFlags"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};function Lu(e){return/^[\da-f]{24}$/i.test(e)}function sb(e,t=!1){let n="";if(null!=e){let r="?",i=t?Object.keys(e).filter((e=>!["slug","venue"].includes(e))):Object.keys(e);for(let t=0,o=i.length;t<o;++t){let o=i[t],s=e[o];null!=s&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(s)),r="&")}}return n}function yP(e,t,n,r=!1){var i,o;return r?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(n.venue||n.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(n.venue||n.slug).concat(sb(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+sb(n)}async function Ae(e,t,n,r=!1){return Jr(e,t,n,r,!0)}async function Jr(e,t,n,r=!1,i=!1){let o=yP(e,t,n,r),s=await Nu(e,o,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}function bP(e,t,n=!1){let r={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};n&&delete r.language,r.language&&(t+="&lang=".concat(encodeURIComponent(r.language)));let{headers:i}=e;i["Content-Type"]=i["Content-Type"]||"text/json",e.accessToken?i.Authorization="Bearer ".concat(e.accessToken):e.noAuth||e.clientId&&e.clientSecret&&(i["x-mappedin-key"]=btoa(e.clientId),i["x-mappedin-secret"]=btoa(e.clientSecret)),r.language&&(i["Accept-Language"]=r.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function Nu(e,t,n=!1){let r=bP(e,t,n),i=await ft()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function Se(e,t){e.indexOf(t)<0&&e.push(t)}function nb([e,t],[n,r]){let i=new Ne(e,t),o=new Ne(n,r);return i.distanceTo(o)}function Qy(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let n=e.georeference[0],r=e.georeference[2],i=new Ne(n.target.x,n.target.y),o=new Ne(r.target.x,r.target.y),s=i.distanceTo(o),a=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(a*a+l*l)/s}catch(n){t=1,R.warn(n),R.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function $i(e){var t;return e instanceof _r?e.entrances.map((e=>e.id)):e instanceof Tn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function lb(e){let t={},{maps:n,images:r,scenes:i,polygons:o}=e;if(null!=r)try{let e=Object.keys(r).map((e=>fetch("data:image/png;base64,".concat(r[e])).then((e=>e.blob())).then((n=>{t[e]=n})).catch((e=>{R.error(e)}))));await Promise.all(e)}catch(e){R.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=r&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var n,r;if(null!=(n=null==e?void 0:e.image)&&n.url&&null!=(r=null==e?void 0:e.image)&&r.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}}))))})),null!=r&&o.forEach((e=>{var n;if(null!=(n=null==e?void 0:e.image)&&n.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function ai(e,t,n){let r;return function(...i){let o=this,a=s((function(){r=null,n||e.apply(o,i)}),"later"),l=n&&!r;clearTimeout(r),r=setTimeout(a,t),l&&e.apply(o,i)}}function cb(e,t,n,r=0){if(!e||e<=0)return 0;let i=0;r>=0&&r<=1&&(i=r/10);let o=1e-5,s=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,s))}function Ou(){return go.getInstance().loadLocalData("deviceId")}function Su(){return go.getInstance().loadSessionData("id")}s(Lu,"isGatewayKey"),s(sb,"stringifyQuery"),s(yP,"buildUrl"),s(Ae,"getArray"),s(Jr,"getObject"),s(bP,"constructParamsForRequest"),s(Nu,"generateAPIRequest"),s(Se,"addToSet"),s(nb,"getDistanceBetweenLatLon"),s(Qy,"getMapScale"),s($i,"getNodesForNavigatable"),s(lb,"populateBundledImagesAsBlobs"),s(ai,"debounce"),s(cb,"normalizeCategoryRank"),s(Ou,"getDeviceID"),s(Su,"getSessionID");var db=s(((e,t)=>{if("string"==typeof e){if(void 0===t||!Array.isArray(t.polygons))return null;e=t.polygons.find((function(t){return t.id===e}))}let n=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){n=e.locations[0];for(let t=0,r=e.locations.length;t<r;t++){let r=e.locations[t];for(;void 0!==r.parent;)r=r.parent,r.polygons.includes(e)&&(n=r);if(void 0===r.parent&&r.polygons.includes(e))return r}}return n}),"getPrimaryLocationForPolygon");function pb(e){var t;let n={...e};for(let[e,r]of Object.entries(Hf))n[e]=(0,ub.default)(r.concat(null!=(t=n[e])?t:[]));return n}function Xf(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return fb(this.cover(t,n),t,n,e)}function fb(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,s,a,l,u,c,h,d,p=e._root,f={data:r},g=e._x0,v=e._y0,y=e._x1,m=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((u=t>=(o=(g+y)/2))?g=o:y=o,(c=n>=(s=(v+m)/2))?v=s:m=s,i=p,!(p=p[h=c<<1|u]))return i[h]=f,e;if(a=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===a&&n===l)return f.next=p,i?i[h]=f:e._root=f,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=n>=(s=(v+m)/2))?v=s:m=s}while((h=c<<1|u)==(d=(l>=s)<<1|a>=o));return i[d]=p,i[h]=f,e}function hb(e){var t,n,r,i,o=e.length,s=new Array(o),a=new Array(o),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(s[n]=r,a[n]=i,r<l&&(l=r),r>c&&(c=r),i<u&&(u=i),i>h&&(h=i));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<o;++n)fb(this,s[n],a[n],e[n]);return this}function Kf(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var s,a,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(a=(t<r)<<1|e<n,s=new Array(4),s[a]=u,u=s,l*=2,a){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function Jf(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Zf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Qf(e,t,n){var r,i,o,s,a,l,u,c=this._x0,h=this._y0,d=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new qe(g,c,h,d,p)),null==n?n=1/0:(c=e-n,h=t-n,d=e+n,p=t+n,n*=n);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>d||(o=l.y0)>p||(s=l.x1)<c||(a=l.y1)<h))if(g.length){var v=(i+s)/2,y=(o+a)/2;f.push(new qe(g[3],v,y,s,a),new qe(g[2],i,y,v,a),new qe(g[1],v,o,s,y),new qe(g[0],i,o,v,y)),(u=(t>=y)<<1|e>=v)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-u],f[f.length-1-u]=l)}else{var m=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),w=m*m+b*b;if(w<n){var _=Math.sqrt(n=w);c=e-_,h=t-_,d=e+_,p=t+_,r=g.data}}return r}function eh(e){if(isNaN(o=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,i,o,s,a,l,u,c,h,d,p=this._root,f=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(a=(f+v)/2))?f=a:v=a,(c=s>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[h=c<<1|u]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[d]=p:this._root=p),this):(this._root=i,this)}function mb(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function th(){return this._root}function nh(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function rh(e){var t,n,r,i,o,s,a=[],l=this._root;for(l&&a.push(new qe(l,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,s=t.y1)&&l.length){var u=(r+o)/2,c=(i+s)/2;(n=l[3])&&a.push(new qe(n,u,c,o,s)),(n=l[2])&&a.push(new qe(n,r,c,u,s)),(n=l[1])&&a.push(new qe(n,u,i,o,c)),(n=l[0])&&a.push(new qe(n,r,i,u,c))}return this}function ih(e){var t,n=[],r=[];for(this._root&&n.push(new qe(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,a=t.y0,l=t.x1,u=t.y1,c=(s+l)/2,h=(a+u)/2;(o=i[0])&&n.push(new qe(o,s,a,c,h)),(o=i[1])&&n.push(new qe(o,c,a,l,h)),(o=i[2])&&n.push(new qe(o,s,h,c,u)),(o=i[3])&&n.push(new qe(o,c,h,l,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function gb(e){return e[0]}function ah(e){return arguments.length?(this._x=e,this):this._x}function vb(e){return e[1]}function oh(e){return arguments.length?(this._y=e,this):this._y}function oi(e,t,n){var r=new sh(null==t?gb:t,null==n?vb:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function sh(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function yb(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}s(pb,"mergeThings"),y(),y(),y(),y(),s(Xf,"default"),s(fb,"add"),s(hb,"addAll"),y(),s(Kf,"default"),y(),s(Jf,"default"),y(),s(Zf,"default"),y(),y(),s(qe,"default"),s(Qf,"default"),y(),s(eh,"default"),s(mb,"removeAll"),y(),s(th,"default"),y(),s(nh,"default"),y(),s(rh,"default"),y(),s(ih,"default"),y(),s(gb,"defaultX"),s(ah,"default"),y(),s(vb,"defaultY"),s(oh,"default"),s(oi,"quadtree"),s(sh,"Quadtree"),s(yb,"leaf_copy");var st=oi.prototype=sh.prototype;st.copy=function(){var e,t,n=new sh(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=yb(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=yb(t));return n},st.add=Xf,st.addAll=hb,st.cover=Kf,st.data=Jf,st.extent=Zf,st.find=Qf,st.remove=eh,st.removeAll=mb,st.root=th,st.size=nh,st.visit=rh,st.visitAfter=ih,st.x=ah,st.y=oh;var dn,be,$t=class e{constructor(e){A(this,dn,void 0),b(this,"categories"),b(this,"locations"),b(this,"vortexes"),b(this,"maps"),b(this,"nodes"),b(this,"polygons"),b(this,"events"),b(this,"mapGroups"),b(this,"locationStates"),b(this,"rankings"),b(this,"languages",{}),A(this,be,{}),j(this,dn,e)}get polygonsByMapId(){if(w(this,be).polygonsByMapId)return w(this,be).polygonsByMapId;let e,t={};for(let n=0,r=w(this,dn).polygons.length;n<r;++n)e=w(this,dn).polygons[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return w(this,be).polygonsByMapId=n,w(this,be).polygonsByMapId}get nodesByMapId(){if(w(this,be).nodesByMapId)return w(this,be).nodesByMapId;let e,t={};for(let n=0,r=w(this,dn).nodes.length;n<r;++n)e=w(this,dn).nodes[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return w(this,be).nodesByMapId=n,w(this,be).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(w(this,be).nodeTreesByMap||(w(this,be).nodeTreesByMap=new Map),!w(this,be).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=oi();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),w(this,be).nodeTreesByMap.set(e,r)}return w(this,be).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,n){var r;if(w(this,be).nodeTreesByMap||(w(this,be).nodeTreesByMap=new Map),!w(this,be).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=oi();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),w(this,be).nodeTreesByMap.set(e,n)}let i=w(this,be).nodeTreesByMap.get(e),o=[],s=t.x,a=t.y;return i.visit(((e,t,r,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-s)**2+(t.y-a)**2)<=n&&o.push(t)}while(e=e.next);let u=s-Math.max(t,Math.min(i,s)),c=a-Math.max(r,Math.min(l,a));return u*u+c*c>=n*n})),o}get locationsByMapId(){if(w(this,be).locationsByMapId)return w(this,be).locationsByMapId;let e,t={};for(let n=0,r=w(this,dn).locations.length;n<r;++n){e=w(this,dn).locations[n];for(let n=0,r=e.polygons.length;n<r;++n)t[e.polygons[n].map.id]||(t[e.polygons[n].map.id]=[]),-1===t[e.polygons[n].map.id].indexOf(e)&&t[e.polygons[n].map.id].push(e);for(let n=0,r=e.nodes.length;n<r;++n){let r=e.nodes[n];t[r.map.id]||(t[r.map.id]=[]),-1===t[r.map.id].indexOf(e)&&t[r.map.id].push(e)}}let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return w(this,be).locationsByMapId=n,w(this,be).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clear(){e.instances.clear()}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};dn=new WeakMap,be=new WeakMap,s($t,"MappedinCache"),b($t,"instances",new Map);var uh=$t,at=uh,Fa=(e=>(e.CATEGORY="categories",e.EVENT="events",e.LOCATION="locations",e.MAPGROUP="mapGroups",e.MAP="maps",e.NODE="nodes",e.POLYGON="polygons",e.VORTEX="vortexes",e))(Fa||{}),Fu={categories:Er,locations:Tn,vortexes:Ya,maps:so,nodes:La,polygons:_r,venue:Tr,events:no,mapGroups:po,themes:Au,locationStates:ao,rankings:eo},Du=(e=>(e[e.LANGUAGE_CHANGED=0]="LANGUAGE_CHANGED",e))(Du||{});y(),y(),y(),y();var ut=6371008.8,bb={centimeters:100*ut,centimetres:100*ut,degrees:ut/111325,feet:3.28084*ut,inches:39.37*ut,kilometers:ut/1e3,kilometres:ut/1e3,meters:ut,metres:ut,miles:ut/1609.344,millimeters:1e3*ut,millimetres:1e3*ut,nauticalmiles:ut/1852,radians:1,yards:1.0936*ut},L3={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/ut,yards:1.0936133};function Jn(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function lt(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!lh(e[0])||!lh(e[1]))throw new Error("coordinates must contain numbers");return Jn({type:"Point",coordinates:e},t,n)}function Sn(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Jn({type:"LineString",coordinates:e},t,n)}function Sr(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function wb(e,t){void 0===t&&(t="kilometers");var n=bb[t];if(!n)throw new Error(t+" units is invalid");return e*n}function kb(e,t){void 0===t&&(t="kilometers");var n=bb[t];if(!n)throw new Error(t+" units is invalid");return e/n}function vo(e){return 180*(e%(2*Math.PI))/Math.PI}function ht(e){return e%360*Math.PI/180}function lh(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Ru(e,t,n){if(null!==e)for(var r,i,o,s,a,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,v=f?e.features.length:1,y=0;y<v;y++){a=(c=!!(u=f?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<a;m++){var b=0,w=0;if(null!==(s=c?u.geometries[m]:u)){l=s.coordinates;var _=s.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,y,b,w))return!1;d++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,y,b,w))return!1;d++,"MultiPoint"===_&&b++}"LineString"===_&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,y,b,w))return!1;d++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(w=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,y,b,w))return!1;d++}w++}b++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===Ru(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ch(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function wP(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function yo(e,t){wP(e,(function(e,n,r,i,o){var s,a=null===e?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Jn(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Jn({type:s,coordinates:u},r),n,l))return!1}}))}function kP(e,t){yo(e,(function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,u=0;if(!1===Ru(e,(function(o,c,h,d,p){if(void 0===s||n>a||d>l||p>u)return s=o,a=n,l=d,u=p,void(i=0);var f=Sn([s,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,s=o})))return!1}}}))}function _b(e,t,n){var r=n,i=!1;return kP(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function dh(e){var t=[1/0,1/0,-1/0,-1/0];return Ru(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}s(Jn,"feature"),s(lt,"point"),s(Sn,"lineString"),s(Sr,"featureCollection"),s(wb,"radiansToLength"),s(kb,"lengthToRadians"),s(vo,"radiansToDegrees"),s(ht,"degreesToRadians"),s(lh,"isNumber"),s(Ru,"coordEach"),s(ch,"featureEach"),s(wP,"geomEach"),s(yo,"flattenEach"),s(kP,"segmentEach"),s(_b,"segmentReduce"),s(dh,"bbox"),dh.default=dh;var zu=dh;function pn(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Mt(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Mb(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function _P(e,t,n){void 0===n&&(n={});var r=pn(e),i=pn(t),o=ht(i[1]-r[1]),s=ht(i[0]-r[0]),a=ht(r[1]),l=ht(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return wb(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}y(),y(),y(),y(),s(pn,"getCoord"),s(Mt,"getCoords"),s(Mb,"getType"),s(_P,"distance");var Zn=_P;function Bu(e,t){return void 0===t&&(t={}),_b(e,(function(e,n){var r=n.geometry.coordinates;return e+Zn(r[0],r[1],t)}),0)}function Vu(e,t,n){if(void 0===n&&(n={}),!0===n.final)return MP(e,t);var r=pn(e),i=pn(t),o=ht(r[0]),s=ht(i[0]),a=ht(r[1]),l=ht(i[1]),u=Math.sin(s-o)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return vo(Math.atan2(u,c))}function MP(e,t){var n=Vu(t,e);return n=(n+180)%360}function qu(e,t,n,r){void 0===r&&(r={});var i=pn(e),o=ht(i[0]),s=ht(i[1]),a=ht(n),l=kb(t,r.units),u=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a));return lt([vo(o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(u))),vo(u)],r.properties)}function xP(e){if(!e)throw new Error("geojson is required");var t=[];return yo(e,(function(e){EP(e,t)})),Sr(t)}function EP(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=Mt(r);break;case"LineString":n=[Mt(r)]}n.forEach((function(n){TP(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function TP(e,t){var n=[];return e.reduce((function(e,r){var i=Sn([e,r],t);return i.bbox=PP(e,r),n.push(i),r})),n}function PP(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}s(Bu,"length"),y(),y(),y(),s(Vu,"bearing"),s(MP,"calculateFinalBearing"),y(),s(qu,"destination"),y(),y(),s(xP,"lineSegment"),s(EP,"lineSegmentFeature"),s(TP,"createSegments"),s(PP,"bbox");var ph=xP,Vb=Jt(zb(),1);function eO(e,t){var n={},r=[];if("LineString"===e.type&&(e=Jn(e)),"LineString"===t.type&&(t=Jn(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=Bb(e,t);return i&&r.push(i),Sr(r)}var o=(0,Vb.default)();return o.load(ph(t)),ch(ph(e),(function(e){ch(o.search(e),(function(t){var i=Bb(e,t);if(i){var o=Mt(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),Sr(r)}function Bb(e,t){var n=Mt(e),r=Mt(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;var p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p>=0&&p<=1&&f>=0&&f<=1?lt([i+p*(s-i),o+p*(a-o)]):null}s(eO,"lineIntersect"),s(Bb,"intersects");var qb=eO;function tO(e,t,n){void 0===n&&(n={});var r=lt([1/0,1/0],{dist:1/0}),i=0;return yo(e,(function(e){for(var o=Mt(e),s=0;s<o.length-1;s++){var a=lt(o[s]);a.properties.dist=Zn(t,a,n);var l=lt(o[s+1]);l.properties.dist=Zn(t,l,n);var u=Zn(a,l,n),c=Math.max(a.properties.dist,l.properties.dist),h=Vu(a,l),d=qu(t,c,h+90,n),p=qu(t,c,h-90,n),f=qb(Sn([d.geometry.coordinates,p.geometry.coordinates]),Sn([a.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=Zn(t,g,n),g.properties.location=i+Zn(a,g,n)),a.properties.dist<r.properties.dist&&((r=a).properties.index=s,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=s+1,r.properties.location=i+u),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=s),i+=u}})),r}s(tO,"nearestPointOnLine");var wo=tO;function nO(e,t,n){var r=Mt(n);if("LineString"!==Mb(n))throw new Error("line must be a LineString");for(var i,o=wo(n,e),s=wo(n,t),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)a.push(r[l]);return a.push(i[1].geometry.coordinates),Sn(a,n.properties)}s(nO,"lineSlice");var Eh=nO;function rO(e,t){void 0===t&&(t={});var n=zu(e);return lt([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}y(),s(rO,"center");var Ub=rO;function iO(e,t,n){void 0===n&&(n={});for(var r=pn(e),i=Mt(t),o=0;o<i.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===i.length-2&&(s="end"),0===o&&o+1===i.length-1&&(s="both")),aO(i[o],i[o+1],r,s,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function aO(e,t,n,r,i){var o=n[0],s=n[1],a=e[0],l=e[1],u=t[0],c=t[1],h=u-a,d=c-l,p=(n[0]-a)*d-(n[1]-l)*h;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<=u:u<=o&&o<a:d>0?l<s&&s<=c:c<=s&&s<l:"end"===r?Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<u:u<o&&o<=a:d>0?l<=s&&s<c:c<s&&s<=l:"both"===r&&(Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<u:u<o&&o<a:d>0?l<s&&s<c:c<s&&s<l):Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<=u:u<=o&&o<=a:d>0?l<=s&&s<=c:c<=s&&s<=l}y(),s(iO,"booleanPointOnLine"),s(aO,"isPointOnLineSegment");var Gb=iO,oO=1e-7,Yb=.005,Wb=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];function Th(e,t){let n=cO(t);return Sr(e.features.reduce(((e,t)=>{let r=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(n.has(t)&&e.push(n.get(t)),e)),[]);return o.length&&(r=sO(t,o)),e.push(...r),e}),[]))}function sO(e,t){return t.reduce(((e,t)=>{let n={epsilon:oO},r=e.findIndex((e=>Gb(Ub(t),e,n))),i=e[r];if(i){let[n,o]=lO(i,t);e.splice(r,1,n,o)}return e}),[e])}function uO(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function lO(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>wo(e,lt(t))));return r.reduce(((t,n)=>{let r=Eh(lt(n),i[0],e),o=Eh(lt(n),i[1],e),s=Bu(r)<Bu(o)?r:o;return s.properties={...e.properties,entrances:[]},t.concat([s])}),[])}function $b(e){let t=new Map;for(let n in e){let r=e[n];if(!uO(r))continue;let{altitude:i,color:o,width:s,height:a,opacity:l}=r,u={altitude:i,color:o,width:s,height:a,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function cO(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Hb(e){if(0===e.length)return;let t;for(let n of e)if("number"==typeof n.elevation){if(!t){t=n;continue}"number"==typeof t.elevation&&(t=Math.abs(n.elevation)===Math.abs(t.elevation)?n.elevation>t.elevation?n:t:Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)}return t}function jO(e){if(null==e||"object"!=typeof e)return!1;for(let t of Wb)if("Uint8Array"!==e[t][Symbol.toStringTag])return!1;return!0}function LO(e){var t;if(null==e||"object"!=typeof e)return!1;let n=["building.geojson","category.geojson","location.geojson","manifest.geojson"];for(let r of n)if("Uint8Array"!==(null==(t=null==e?void 0:e[r])?void 0:t[Symbol.toStringTag]))return!1;return!0}async function j0(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Kh(),Xh)))).unzipSync(e);if(!LO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"building.geojson":n["building.geojson"],"category.geojson":n["category.geojson"],"location.geojson":n["location.geojson"],"manifest.geojson":n["manifest.geojson"],space:{},obstruction:{},node:{},level:{},connection:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}async function Zh(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Kh(),Xh)))).unzipSync(e);if(!jO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}function L0(e){let[t,n,r,i]=zu(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function NO(e,t,n){let r=n.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",s=e.externalId||o||"",a=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/n.mapScale;return{id:o,georeference:r,name:s,shortName:s,scene:{polygons:t},elevation:a,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(Th,"processObstructions"),s(sO,"splitObstructionByAllEntrances"),s(uO,"isPolygonStyle"),s(lO,"splitObstructionByEntrance"),s($b,"getStylesMap"),s(cO,"getEntranceMap"),y(),y(),s(Hb,"findMapWithElevationClosestToZero"),y(),s(jO,"validateStaticMVFFiles"),s(LO,"validateStaticMVFv1Files"),s(j0,"unzipMVFv1"),s(Zh,"unzipMVF"),s(L0,"getMapExtent"),s(NO,"convertMap");var em=class{constructor(e){b(this,"mapExtent"),b(this,"stretchRatio"),b(this,"midLat"),b(this,"midLong"),b(this,"mapUnitRatio",1e6),b(this,"latDistance"),b(this,"longDistance"),b(this,"mapScale"),b(this,"widthInMapUnits"),b(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,s=(n+i)/2,a=new Ne(o,i),l=new Ne(o,n),u=new Ne(t,s),c=new Ne(r,s);this.latDistance=u.distanceTo(c),this.longDistance=a.distanceTo(l);let h=this.latDistance/this.longDistance,d=(r-t)/(i-n);this.stretchRatio=h/d,this.midLat=o,this.midLong=s,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],n=(e[0]-this.midLong)*this.mapUnitRatio,r=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:n+this.widthInMapUnits/2,y:r+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:n,maxLong:r}=this.mapExtent;return[[e,t],[e,r],[n,r],[n,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};s(em,"CoordinateConverter");var il=em;function FO(e,t){let n=[];return e.forEach(((r,i)=>{let o=r.properties.map||"",s=t.get(o);if(s){let t=s.convert(r.geometry.coordinates),a=r.properties.externalId||"",l=[];r.properties.neighbors.forEach((t=>{var n;let r=null!=(n=t.weight)?n:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),n.push({id:i,map:o,externalId:a,paths:l,...t})}})),n}function DO(e,t,n){let r=[];return e.features.forEach((e=>{let i=n.convert(e.geometry.coordinates);r.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),r}s(FO,"convertNodes"),s(DO,"convertNodes_MVFv1");var I0=s(((e,t,n,r,i,o)=>{var s,a,l;let u,c=[],h=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,d=i.Walls,p=null!=(s=i.ExteriorWalls)?s:d,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/h},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]},g={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==p?void 0:p.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/h},width:null==p?void 0:p.width},material:{color:(null==p?void 0:p.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let s=t.features[i];if("Point"===s.geometry.type)continue;let d="desk-entrance"===(null==(a=s.properties.kind)?void 0:a.toLowerCase()),p=(d?s.properties.externalId:s.properties.id)||"",v=s.properties.externalId||"",y=n.get(p)||[];if("destinationNodes"in s.properties&&s.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),d)n.set(v,y);else{let n=r.get(s.properties.id),a=s.properties.center?o.convert(s.properties.center):void 0,d=s.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=s.properties.kind||"",b="void"===m.toLowerCase(),w=1-(i+1)/t.features.length*Yb;"LineString"===s.geometry.type&&"wall"===(null==(l=s.properties.kind)?void 0:l.toLowerCase())?(u=s.geometry.coordinates.map((e=>o.convert(e))),s.properties.footprintComponent?g.vertexes.push(u):f.vertexes.push(u)):(u=s.geometry.coordinates[0].map((e=>o.convert(e))),c.push({entrances:y,map:e,id:p,externalId:v,layer:m,geometry:{visible:!b,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/h*w},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:u,center:a,holes:d}))}}return f.vertexes.length>0&&c.push(f),g.vertexes.length>0&&c.push(g),c}),"generateMappedinPolygons"),C0=s(((e,t,n)=>{let r=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>n.convert(e))),s=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),a=Math.max(n.widthInMapUnits,n.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),r.push({entrances:null!=l?l:[],map:e,id:t.properties.id||"",externalId:t.properties.externalId||"",layer:t.properties.layer||"Polygon",geometry:{visible:!0,position:{x:0,y:0,z:((null==i?void 0:i.altitude)||0)*n.mapScale/a},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*n.mapScale/a}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:s})})),r}),"generateMappedinPolygons_MVFv1");function RO(e,t,n,r,i,o,s){let a=I0(e,n,r,i,o,s),l=I0(e,t,r,i,o,s);return a.concat(l)}function zO(e,t){let n=[];return e.forEach((e=>{var r;let i;for(let n of e.nodes){let r=t.get(n);if(r)for(let t of r.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}n.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(r=e.accessible)&&r})})),n}function BO(e){let t=new Map;return e.features.forEach((e=>{var n,r,i,o,s,a,l;let u="",c=["n_".concat(e.properties.id)];e.properties.destinations.forEach((e=>{let t=e.split("-");u=t[0],c.push("n_".concat(t[1]))}));let h=null!=(r=null==(n=t.get(u))?void 0:n.nodes)?r:[],d=new Set([...h,...c]);t.set(u,{id:u,name:null!=(i=e.properties.name)?i:"",type:null!=(o=e.properties.type)?o:"",weight:null!=(s=e.properties.weight)?s:1e3,multiplier:null!=(a=e.properties.multiplier)?a:1,nodes:Array.from(d),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function N0(e,t){if(t)for(let n in t)t.hasOwnProperty(n)&&Object.assign(e[n],t[n]);return e}function Qh(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"connection.json":JSON.parse(n(e["connection.json"])),"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"styles.json":JSON.parse(n(e["styles.json"])),"map.geojson":JSON.parse(n(e["map.geojson"])),"mapstack.geojson":JSON.parse(n(e["mapstack.geojson"])),"node.geojson":JSON.parse(n(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(null!=e.annotation){let r=Object.keys(e.annotation);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.annotation[r]=JSON.parse(n(e.annotation[i]))}}let r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.entrance);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.entrance[i]=JSON.parse(n(e.entrance[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function F0(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"building.geojson":JSON.parse(n(e["building.geojson"])),"category.geojson":JSON.parse(n(e["category.geojson"])),"location.geojson":JSON.parse(n(e["location.geojson"])),obstruction:{},space:{},level:{},node:{},connection:{}},r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.node);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.node[i]=JSON.parse(n(e.node[r]))}let s=Object.keys(e.level);for(let r of s){let i=r.replace(/\.json|\.geojson/g,"");t.level[i]=JSON.parse(n(e.level[r]))}let a=Object.keys(e.connection);for(let r of a){let i=r.replace(/\.json|\.geojson/g,"");t.connection[i]=JSON.parse(n(e.connection[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function D0(e,t){var n;let r=null!=(n=t.properties.externalId)?n:"";return 0===r.length&&(r=t.properties.id),"location-".concat(e,"-").concat(r.toLowerCase().replace(" ","-"))}function R0(e,t){var n;let r=new Set;if("entrance"===e)r.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add(e),t.properties.footprintComponent&&r.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add("default"===e?"Room":e);let i=null!=(n=t.properties.tags)?n:[];if(i.length>0)for(let e of i)r.add(e)}return Array.from(r).filter((e=>e.length>0))}function z0(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Jh(e,t,n){let r=R0(e,t);for(let e of r){let t=z0(e);null==n[t]&&(n[t]={id:t,name:e})}}function B0(e){var t,n,r;return null!=(r=null==(n=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:n.startsWith("connection"))&&r}function VO(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return B0(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function Oo(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!B0(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=VO(t),s=D0(e,t);if(null==r[s]){let e={id:s,type:"",name:o,nodes:[],polygons:[],categories:[]};r[s]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[s].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[s].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[s].nodes.push(e)}let a=R0(e,t);for(let e of a){let t=z0(e);r[s].categories.push(t)}}function qO(e,t=new Map){var n,r,i,o,s,a,l,u,c;let h={},d={},{space:p,"map.geojson":f,entrance:g,obstruction:v}=e;for(let e of f){let f=null!=(r=null==(n=p[e.id])?void 0:n.features)?r:[],y=null!=(o=null==(i=g[e.id])?void 0:i.features)?o:[],m=null!=(a=null==(s=v[e.id])?void 0:s.features)?a:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(Jh("space",t,d),Oo("space",t,e,h));let b=new Map;for(let t of y)b.set(t.properties.id,t),t.properties.externalId&&(Jh("entrance",t,d),Oo("entrance",t,e,h));let w={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};Oo("entrance",w,e,h);for(let n of m){if(Jh("obstruction",n,d),Oo("obstruction",n,e,h),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=b.get(n);t&&Oo("entrance",{...t,properties:{...t.properties,externalId:w.properties.externalId}},e,h)}}if("desks"===(null==(u=n.properties.kind)?void 0:u.toLowerCase())&&n.properties.externalId.length>0){let e=null!=(c=t.get(n.properties.id))?c:[];for(let t of e){let e=D0("obstruction",n);null!=h[e]&&h[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(h),categories:Object.values(d)}}function V0(e){var t,n,r,i,o,s,a,l,u,c;let h=null!=(t=e.obstruction)?t:[],d=null!=(n=e.space)?n:[],p=null!=(r=e.entrance)?r:[],f=null!=(i=e["mapstack.geojson"])?i:[],g=null!=(o=e["map.geojson"])?o:[],v=null!=(s=e["styles.json"])?s:{},y=null!=(a=e["manifest.geojson"])?a:{},m=null!=(l=e["node.geojson"])?l:{},b=null!=(u=e["connection.json"])?u:[],w={},_=new Map,M=[],x=$b(v),S=new Map,k=new Map;g.forEach((e=>{let t=e.id;t&&!k.has(t)&&k.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!k.has(e))return;let t=Th(h[e],p[e]);if(t.features.length){let n=L0(t),r=new il(n);_.set(e,r),w[e]=RO(e,t,d[e],S,x,v,r),M.push(NO(k.get(e),w[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let O=new Map;"features"in m&&m.features.forEach((e=>{let t=e.properties.id;t&&!O.has(t)&&O.set(t,e)}));let E=Object.values(w).flat(),A=zO(b,O),I=FO(O,_),C=y.features[0],P=C.properties.name,T=C.geometry.coordinates[0],F=C.geometry.coordinates[1],j=(null==(c=Hb(M))?void 0:c.id)||"",{locations:N,categories:R}=qO(e,S);return{polygons:E,venue:{name:P,latitude:F,longitude:T,defaultMap:j},maps:M,vortexes:A,nodes:I,locations:N,mapGroups:[],locationStates:[],categories:R,themes:[],imageBinaries:new Map}}function q0(e){var t,n,r,i,o,s,a;let l=null!=(t=e.obstruction)?t:{},u=null!=(n=e.space)?n:{},c=null!=(r=e.node)?r:{},h=null!=(i=e.level)?i:{},d=null!=(o=e["manifest.geojson"])?o:{},p=null!=(s=e.connection)?s:{},f={},g=new Map,v=[],y=[],m=[];Object.keys(h).forEach((e=>{let t=Th(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=L0(t),r=new il(n);g.set(e,r);let i=C0(e,u[e],r),o=C0(e,t,r);f[e]=i.concat(o),y=y.concat(DO(c[e],e,r)),v.push(UO(h[e],f[e],r))}m=m.concat(BO(p[e]))}));let b=Object.values(f).flat(),w=d.features[0],_=w.properties.name,M=w.geometry.coordinates[0],x=w.geometry.coordinates[1],S=(null==(a=v[0])?void 0:a.id)||"",k=new Map;b.forEach((e=>k.set(e.id,e)));let O=[],E=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>k.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),O=e}}return{...e.properties,nodes:O,polygons:e.properties.spaces}})),A=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:_,latitude:x,longitude:M,defaultMap:S},maps:v,vortexes:m,nodes:y,locations:E,mapGroups:[],locationStates:[],categories:A,themes:[],imageBinaries:new Map}}function UO(e,t,n){let r=n.createGeoreferences(),i=new Set,o=e.features[0].properties;t.forEach((e=>{e.layer&&i.add(e.layer)}));let s=[...i].map((e=>({id:e,visible:!0}))),a=1/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:a,x_scale:a,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(RO,"convertPolygons"),s(zO,"convertVortexes"),s(BO,"convertVortexes_MVFv1"),s(N0,"overrideMVF"),s(Qh,"parseMVF"),s(F0,"parseMVFv1"),s(D0,"getLocationId"),s(R0,"getFeatureCategories"),s(z0,"getCategoryIdFromName"),s(Jh,"mutateCategoriesWithNewFeature"),s(B0,"isFeatureConnection"),s(VO,"getLocationLabel"),s(Oo,"mutateLocationsWithNewFeature"),s(qO,"createMetaDataFromMVF"),s(V0,"convertMVFToMappedin"),s(q0,"convertMVFv1ToMappedin"),s(UO,"convertMap_MVFv1"),y();var uw,So,ki,_i,Ao,Mi,xi,Ei,rr,Ti,Pi,Oi,Io,Si,Ir,lw=Jt(sw()),QO=null==(uw=null==E?void 0:E.env)?void 0:uw.npm_package_version,al=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],rm=al[0],eS=!1,Ht=class e{constructor(e){var t;A(this,So,void 0),A(this,ki,void 0),A(this,_i,void 0),A(this,Ao,void 0),A(this,Mi,void 0),A(this,xi,void 0),A(this,Ei,void 0),A(this,rr,void 0),A(this,Ti,void 0),A(this,Pi,void 0),A(this,Oi,void 0),A(this,Io,void 0),A(this,Si,void 0),A(this,Ir,void 0),j(this,rr,e.clientId),j(this,Ti,e.clientSecret),j(this,Pi,e.accessToken),j(this,Ei,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!w(this,Ei)&&w(this,rr)&&!Lu(w(this,rr))&&(n="https://web-proxy.mappedin.com/a/"),j(this,_i,n),j(this,_i,w(this,_i)+(e.venue+"/")),j(this,Si,e.venue),j(this,ki,!1),j(this,So,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),j(this,Ao,al.find((t=>t===e.context))||al[0]),j(this,Mi,Ou()),j(this,xi,Su()),j(this,Oi,new Set),j(this,Io,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=ai(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let n={...t,g:w(this,ki)};w(this,Ir)&&(n={...n,...w(this,Ir)});let r=w(this,_i)+e+"?"+lw.default.stringify(n,{skipEmptyString:!0,skipNull:!0});if(eS&&R.log("Analytics.track",r),w(this,So))return;let i={"mi-context":rm||w(this,Ao),"mi-session":w(this,xi),"mi-device":w(this,Mi),"mappedin-sdk-version":QO,"mappedin-platform-version":w(this,Io)};w(this,Pi)?i.Authorization="Bearer ".concat(w(this,Pi)):w(this,Ei)||w(this,Ti)&&w(this,rr)&&(i["x-mappedin-key"]=btoa(w(this,rr)),i["x-mappedin-secret"]=btoa(w(this,Ti))),ft()(r,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(e){j(this,Ir,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;Ee.addPendingEvent(new ia({venue:w(this,Si)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;Ee.addPendingEvent(new ra({venue:w(this,Si)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,n,r){this.track("load-mapview",{type:e,force:t,benchmark:n||-1,reason:r||"success"})}getDirections(e,t){let n={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return w(this,xi)}getDeviceID(){return w(this,Mi)}setGeolocationMode(e){j(this,ki,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!w(this,Oi).has(t)&&(this.track(t),w(this,Oi).add(t))}trackSearch(e){null!=e&&this.track("query-search",e)}trackSearchSuggest(e){null!=e&&this.track("query-suggest",e)}static setContext(e){let t=al.find((t=>t===e));t&&(rm=t)}static clearContext(){rm=void 0}static destroy(){e.instance=null}};So=new WeakMap,ki=new WeakMap,_i=new WeakMap,Ao=new WeakMap,Mi=new WeakMap,xi=new WeakMap,Ei=new WeakMap,rr=new WeakMap,Ti=new WeakMap,Pi=new WeakMap,Oi=new WeakMap,Io=new WeakMap,Si=new WeakMap,Ir=new WeakMap,s(Ht,"Analytics"),b(Ht,"instance",null),b(Ht,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var im=Ht,Co=im;y();var am=class{constructor(){b(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach((function(e){"function"==typeof e&&e(t)}))}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||null==this._subscribers[e])return;let n=this._subscribers[e].indexOf(t);-1!==n&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};s(am,"PubSub");var ir,Ai,Cr,Ii,jo,om,sl,cw,ol=am,sm={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""},um=class extends ol{constructor(e){super(),A(this,jo),A(this,sl),b(this,"perspective"),b(this,"things"),b(this,"options"),A(this,ir,void 0),A(this,Ai,""),b(this,"updatedAt"),b(this,"categories",[]),b(this,"locations",[]),b(this,"vortexes",[]),b(this,"maps",[]),b(this,"nodes",[]),b(this,"polygons",[]),b(this,"venue",{}),b(this,"events",[]),b(this,"mapGroups",[]),b(this,"themes",[]),b(this,"locationStates",[]),b(this,"rankings"),b(this,"currentLanguage"),A(this,Cr,{}),b(this,"_categoriesById"),b(this,"_locationsById"),b(this,"_vortexesById"),b(this,"_mapsById"),b(this,"_nodesById"),b(this,"_polygonsById"),b(this,"_eventsById"),b(this,"_mapGroupsById"),b(this,"_locationStatesById"),b(this,"_locationRankingsById"),b(this,"_rankingsById"),b(this,"_categoriesByExternalId"),b(this,"_locationsByExternalId"),b(this,"_vortexesByExternalId"),b(this,"_mapsByExternalId"),b(this,"_nodesByExternalId"),b(this,"_polygonsByExternalId"),b(this,"_eventsByExternalId"),b(this,"_mapGroupsByExternalId"),b(this,"_locationStatesByExternalId"),b(this,"_locationRankingsByExternalId"),b(this,"_rankingsByExternalId"),A(this,Ii,void 0),b(this,"images"),b(this,"imageBinaries"),b(this,"scenes"),b(this,"analytics"),b(this,"navigator"),this.options=e,j(this,ir,at.create(this));let t=Co.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(jg,"true")}})}generateGetters(e){try{for(let t=0,n=e.length;t<n;++t){let n=e[t];Array.isArray(this[n])&&(Object.defineProperty(this,"_".concat(n,"ByExternalId"),{configurable:!0,get(){let e=w(this,ir)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.externalId]=e)),w(this,ir)[n]=t,t}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=w(this,ir)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),w(this,ir)[n]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let n="_".concat(e,"ById"),r="_".concat(e,"ByExternalId"),i=this[n];return null!=i&&null!=i[t]||(i=this[r],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=V0(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=q0(e);return this.hydrate(t)}async changeLanguage(e,t=!0){var n;let r=e.toLowerCase();if(this.currentLanguage.code.toLowerCase()!==r){if(null==(n=this.venue.languages)||!n.find((e=>e.code.toLowerCase()===r)))return void R.error("Language ".concat(r," not found in venue ").concat(this.venue.slug));if(t&&!w(this,Cr)[this.currentLanguage.code]&&(w(this,Cr)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===r)),null!=w(this,Cr)[r]){let e=JSON.parse(w(this,Cr)[r]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}}async hydrate(e,t=!1,n=!1){let r;if("string"==typeof e)try{j(this,Ai,e),r=JSON.parse(e)}catch(e){return void R.error("Unable to parse JSON",e)}else r=e,j(this,Ai,JSON.stringify(r));let i=Object.keys(r);for(let e=0,t=i.length;e<t;++e){let t=i[e],o=r[t],s=Fu[t];null!=s&&"function"==typeof s.hydrate&&(n?"updateInPlace"in s&&"function"==typeof s.updateInPlace&&s.updateInPlace(this,o):this[t]=s.hydrate(o,this))}t&&await lb(r);let{images:o,scenes:s,imageBinaries:a}=r;this.images=o,this.scenes=s,this.imageBinaries=a,n||this.generateGetters(i),we(this,jo,om).call(this),this.initNavigator()}async fetch(e=!1){"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"]),Lu(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,n=[],r=Object.keys(t);for(let t=0,i=r.length;t<i;++t){let i=r[t],o=Fu[i];if(o){let t;e?"updateInPlace"in o&&"function"==typeof o.updateInPlace&&(t=o.updateInPlace(this)):t=o.fetch(this).then((e=>(this[i]=e,Promise.resolve()))),n.push(t)}}return n.push(Jr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>j(this,Ii,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(r),Promise.all(n).then((()=>{var e;this.currentLanguage=this.currentLanguage||(null==(e=this.venue.languages)?void 0:e.find((e=>e.code===this.options.language)))||this.venue.defaultLanguage,we(this,jo,om).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Zl({locations:this.locations.map((e=>e.toJSON())),nodes:this.nodes.map((e=>e.toJSON())),vortexes:this.vortexes.map((e=>e.toJSON())),maps:this.maps.map((e=>e.toJSON())),polygons:this.polygons.map((e=>e.toJSON()))})}toJSON(){var e;let t={};for(let e in Fu)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let n={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(n.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete n.locationRankings,n}toString(){return w(this,Ai)||JSON.stringify(this.toJSON())}};ir=new WeakMap,Ai=new WeakMap,Cr=new WeakMap,Ii=new WeakMap,jo=new WeakSet,om=s((function(){w(this,Ii)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(w(this,Ii)))})),we(this,sl,cw).call(this)}),"#transformData"),sl=new WeakSet,cw=s((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),n=Math.max(...e);this.polygons.forEach((e=>{var r,i;let o=db(e,this);if(o){let s=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(s.length>0){let o=Math.min(...s);e.categoryRank=cb(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(um,"Mappedin");var _t=um;y(),y();var ze=s((function(){return ze=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),ze.apply(this,arguments)}),"__assign");function oe(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xe(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(oe,"__values"),s(Xe,"__read");var Lo,tS="ENTRIES",vw="KEYS",yw="VALUES",Ke="",lm=function(){function e(e,t){var n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}return s(e,"TreeIterator"),e.prototype.next=function(){var e=this.dive();return this.backtrack(),e},e.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var e=Ci(this._path),t=e.node,n=e.keys;if(Ci(n)===Ke)return{done:!1,value:this.result()};var r=t.get(Ci(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=Ci(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},e.prototype.key=function(){return this.set._prefix+this._path.map((function(e){var t=e.keys;return Ci(t)})).filter((function(e){return e!==Ke})).join("")},e.prototype.value=function(){return Ci(this._path).node.get(Ke)},e.prototype.result=function(){switch(this._type){case yw:return this.value();case vw:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),Ci=s((function(e){return e[e.length-1]}),"last$1"),nS=s((function(e,t,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,s=new Uint8Array(o*i).fill(n+1),a=0;a<i;++a)s[a]=a;for(var l=1;l<o;++l)s[l*i]=l;return bw(e,t,n,r,s,1,i,""),r}),"fuzzySearch"),bw=s((function(e,t,n,r,i,o,s,a){var l,u,c=o*s;try{e:for(var h=oe(e.keys()),d=h.next();!d.done;d=h.next()){var p=d.value;if(p===Ke){var f=i[c-1];f<=n&&r.set(a,[e.get(p),f])}else{for(var g=o,v=0;v<p.length;++v,++g){for(var y=p[v],m=s*g,b=m-s,w=i[m],_=Math.max(0,g-n-1),M=Math.min(s-1,g+n),x=_;x<M;++x){var S=y!==t[x],k=i[b+x]+ +S,O=i[b+x+1]+1,E=i[m+x]+1,A=i[m+x+1]=Math.min(k,O,E);A<w&&(w=A)}if(w>n)continue e}bw(e.get(p),t,n,r,i,g,s,a+p)}}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}}),"recurse"),cm=function(){function e(e,t){void 0===e&&(e=new Map),void 0===t&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return s(e,"SearchableMap"),e.prototype.atPrefix=function(t){var n,r;if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=Xe(ll(this._tree,t.slice(this._prefix.length)),2),o=i[0],s=i[1];if(void 0===o){var a=Xe(mm(s),2),l=a[0],u=a[1];try{for(var c=oe(l.keys()),h=c.next();!h.done;h=c.next()){var d=h.value;if(d!==Ke&&d.startsWith(u)){var p=new Map;return p.set(d.slice(u.length),l.get(d)),new e(p,t)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}return new e(o,t)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,rS(this._tree,e)},e.prototype.entries=function(){return new lm(this,tS)},e.prototype.forEach=function(e){var t,n;try{for(var r=oe(this),i=r.next();!i.done;i=r.next()){var o=Xe(i.value,2);e(o[0],o[1],this)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.fuzzyGet=function(e,t){return nS(this._tree,e,t)},e.prototype.get=function(e){var t=hm(this._tree,e);return void 0!==t?t.get(Ke):void 0},e.prototype.has=function(e){var t=hm(this._tree,e);return void 0!==t&&t.has(Ke)},e.prototype.keys=function(){return new lm(this,vw)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,dm(this._tree,e).set(Ke,t),this},Object.defineProperty(e.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=dm(this._tree,e);return n.set(Ke,t(n.get(Ke))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=dm(this._tree,e),r=n.get(Ke);return void 0===r&&n.set(Ke,r=t()),r},e.prototype.values=function(){return new lm(this,yw)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(t){var n,r,i=new e;try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=Xe(s.value,2),l=a[0],u=a[1];i.set(l,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),ll=s((function(e,t,n){var r,i;if(void 0===n&&(n=[]),0===t.length||null==e)return[e,n];try{for(var o=oe(e.keys()),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!==Ke&&t.startsWith(a))return n.push([e,a]),ll(e.get(a),t.slice(a.length),n)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n.push([e,t]),ll(void 0,"",n)}),"trackDown"),hm=s((function(e,t){var n,r;if(0===t.length||null==e)return e;try{for(var i=oe(e.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!==Ke&&t.startsWith(s))return hm(e.get(s),t.slice(s.length))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"lookup"),dm=s((function(e,t){var n,r,i=t.length;e:for(var o=0;e&&o<i;){try{for(var s=(n=void 0,oe(e.keys())),a=s.next();!a.done;a=s.next()){var l=a.value;if(l!==Ke&&t[o]===l[0]){for(var u=Math.min(i-o,l.length),c=1;c<u&&t[o+c]===l[c];)++c;var h=e.get(l);if(c===l.length)e=h;else{var d=new Map;d.set(l.slice(c),h),e.set(t.slice(o,o+c),d),e.delete(l),e=d}o+=c;continue e}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var p=new Map;return e.set(t.slice(o),p),p}return e}),"createPath"),rS=s((function(e,t){var n=Xe(ll(e,t),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete(Ke),0===r.size)ww(i);else if(1===r.size){var o=Xe(r.entries().next().value,2),s=o[0],a=o[1];kw(i,s,a)}}),"remove"),ww=s((function(e){if(0!==e.length){var t=Xe(mm(e),2),n=t[0],r=t[1];if(n.delete(r),0===n.size)ww(e.slice(0,-1));else if(1===n.size){var i=Xe(n.entries().next().value,2),o=i[0],s=i[1];o!==Ke&&kw(e.slice(0,-1),o,s)}}}),"cleanup"),kw=s((function(e,t,n){if(0!==e.length){var r=Xe(mm(e),2),i=r[0],o=r[1];i.set(o+t,n),i.delete(o)}}),"merge"),mm=s((function(e){return e[e.length-1]}),"last"),gm="or",iS="and",aS="and_not",jr=function(){function e(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=ze(ze(ze({},fm),e),{searchOptions:ze(ze({},fw),e.searchOptions||{})}),this._index=new cm,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 s(e,"MiniSearch"),e.prototype.add=function(e){var t,n,r,i,o=this._options,s=o.extractField,a=o.tokenize,l=o.processTerm,u=o.fields,c=o.idField,h=s(e,c);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(c,'"'));var d=this.addDocumentId(h);this.saveStoredFields(d,e);try{for(var p=oe(u),f=p.next();!f.done;f=p.next()){var g=f.value,v=s(e,g);if(null!=v){var y=a(v.toString(),g),m=this._fieldIds[g],b=new Set(y).size;this.addFieldLength(d,m,this._documentCount-1,b);try{for(var w=(r=void 0,oe(y)),_=w.next();!_.done;_=w.next()){var M=l(_.value,g);M&&this.addTerm(m,d,M)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(i=w.return)&&i.call(w)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}},e.prototype.addAll=function(e){var t,n;try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.add(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.addAllAsync=function(e,t){var n=this;void 0===t&&(t={});var r=t.chunkSize,i=void 0===r?10:r,o={chunk:[],promise:Promise.resolve()},s=e.reduce((function(e,t,r){var o=e.chunk,s=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return n.addAll(o)}))}:{chunk:o,promise:s}}),o),a=s.chunk;return s.promise.then((function(){return n.addAll(a)}))},e.prototype.remove=function(e){var t,n,r,i,o,s,a=this._options,l=a.tokenize,u=a.processTerm,c=a.extractField,h=a.fields,d=a.idField,p=c(e,d);if(null==p)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var f=oe(this._documentIds),g=f.next();!g.done;g=f.next()){var v=Xe(g.value,2),y=v[0];if(p===v[1]){try{for(var m=(r=void 0,oe(h)),b=m.next();!b.done;b=m.next()){var w=b.value,_=c(e,w);if(null!=_){var M=l(_.toString(),w),x=this._fieldIds[w],S=new Set(M).size;this.removeFieldLength(y,x,this._documentCount,S);try{for(var k=(o=void 0,oe(M)),O=k.next();!O.done;O=k.next()){var E=u(O.value,w);E&&this.removeTerm(x,y,E)}}catch(e){o={error:e}}finally{try{O&&!O.done&&(s=k.return)&&s.call(k)}finally{if(o)throw o.error}}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}return this._storedFields.delete(y),this._documentIds.delete(y),this._fieldLength.delete(y),void(this._documentCount-=1)}}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(p,": it is not in the index"))},e.prototype.removeAll=function(e){var t,n;if(e)try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.remove(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new cm,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},e.prototype.search=function(e,t){var n,r;void 0===t&&(t={});var i=this.executeQuery(e,t),o=[];try{for(var s=oe(i),a=s.next();!a.done;a=s.next()){var l=Xe(a.value,2),u=l[0],c=l[1],h=c.score,d=c.terms,p=c.match,f=d.length,g={id:this._documentIds.get(u),score:h*f,terms:Object.keys(p),match:p};Object.assign(g,this._storedFields.get(u)),(null==t.filter||t.filter(g))&&o.push(g)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o.sort(mw),o},e.prototype.autoSuggest=function(e,t){var n,r,i,o;void 0===t&&(t={}),t=ze(ze({},cS),t);var s=new Map;try{for(var a=oe(this.search(e,t)),l=a.next();!l.done;l=a.next()){var u=l.value,c=u.score,h=(m=u.terms).join(" ");null!=(v=s.get(h))?(v.score+=c,v.count+=1):s.set(h,{score:c,terms:m,count:1})}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var d=[];try{for(var p=oe(s),f=p.next();!f.done;f=p.next()){var g=Xe(f.value,2),v=g[0],y=g[1],m=(c=y.score,y.terms),b=y.count;d.push({suggestion:v,terms:m,score:c/b})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return d.sort(mw),d},Object.defineProperty(e.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),e.loadJSON=function(t,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return e.loadJS(JSON.parse(t),n)},e.getDefault=function(e){if(fm.hasOwnProperty(e))return pm(fm,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},e.loadJS=function(t,n){var r,i,o,s,a=t.index,l=t.documentCount,u=t.nextId,c=t.documentIds,h=t.fieldIds,d=t.fieldLength,p=t.averageFieldLength,f=t.storedFields,g=t.serializationVersion;if(1!==g&&2!==g)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var v=new e(n);v._documentCount=l,v._nextId=u,v._documentIds=ul(c),v._fieldIds=h,v._fieldLength=ul(d),v._avgFieldLength=p,v._storedFields=ul(f),v._index=new cm;try{for(var y=oe(a),m=y.next();!m.done;m=y.next()){var b=Xe(m.value,2),w=b[0],_=b[1],M=new Map;try{for(var x=(o=void 0,oe(Object.keys(_))),S=x.next();!S.done;S=x.next()){var k=S.value,O=_[k];1===g&&(O=O.ds),M.set(parseInt(k,10),ul(O))}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}v._index.set(w,M)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return v},e.prototype.executeQuery=function(e,t){var n=this;if(void 0===t&&(t={}),"string"!=typeof e){var r=ze(ze(ze({},t),e),{queries:void 0}),i=e.queries.map((function(e){return n.executeQuery(e,r)}));return this.combineResults(i,e.combineWith)}var o=this._options,s=o.tokenize,a=o.processTerm,l=o.searchOptions,u=ze(ze({tokenize:s,processTerm:a},l),t),c=u.tokenize,h=u.processTerm,d=c(e).map((function(e){return h(e)})).filter((function(e){return!!e})).map(lS(u)).map((function(e){return n.executeQuerySpec(e,u)}));return this.combineResults(d,u.combineWith)},e.prototype.executeQuerySpec=function(e,t){var n,r,i,o,s,a,l=ze(ze({},this._options.searchOptions),t),u=(l.fields||this._options.fields).reduce((function(e,t){var n;return ze(ze({},e),((n={})[t]=pm(e,t)||1,n))}),l.boost||{}),c=l.boostDocument,h=l.weights,d=l.maxFuzzy,p=ze(ze({},fw.weights),h),f=p.fuzzy,g=p.prefix,v=this._index.get(e.term),y=this.termResults(e.term,e.term,1,v,u,c);if(e.prefix&&(s=this._index.atPrefix(e.term)),e.fuzzy){var m=!0===e.fuzzy?.2:e.fuzzy,b=m<1?Math.min(d,Math.round(e.term.length*m)):m;b&&(a=this._index.fuzzyGet(e.term,b))}if(s)try{for(var w=oe(s),_=w.next();!_.done;_=w.next()){var M=Xe(_.value,2),x=M[0],S=M[1];if(A=x.length-e.term.length){null==a||a.delete(x);var k=g*x.length/(x.length+.3*A);this.termResults(e.term,x,k,S,u,c,y)}}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}if(a)try{for(var O=oe(a.keys()),E=O.next();!E.done;E=O.next()){x=E.value;var A,I=Xe(a.get(x),2),C=I[0];if(A=I[1]){k=f*x.length/(x.length+A);this.termResults(e.term,x,k,C,u,c,y)}}}catch(e){i={error:e}}finally{try{E&&!E.done&&(o=O.return)&&o.call(O)}finally{if(i)throw i.error}}return y},e.prototype.combineResults=function(e,t){if(void 0===t&&(t=gm),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce(oS[n])||new Map},e.prototype.toJSON=function(){var e,t,n,r,i=[];try{for(var o=oe(this._index),s=o.next();!s.done;s=o.next()){var a=Xe(s.value,2),l=a[0],u=a[1],c={};try{for(var h=(n=void 0,oe(u)),d=h.next();!d.done;d=h.next()){var p=Xe(d.value,2),f=p[0],g=p[1];c[f]=Object.fromEntries(g)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}i.push([l,c])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.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}},e.prototype.termResults=function(e,t,n,r,i,o,s){var a,l,u,c,h;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=oe(Object.keys(i)),p=d.next();!p.done;p=d.next()){var f=p.value,g=i[f],v=this._fieldIds[f],y=r.get(v);if(null!=y){var m=y.size,b=this._avgFieldLength[v];try{for(var w=(u=void 0,oe(y.keys())),_=w.next();!_.done;_=w.next()){var M=_.value,x=o?o(this._documentIds.get(M),t):1;if(x){var S=y.get(M),k=this._fieldLength.get(M)[v],O=n*g*x*uS(S,m,this._documentCount,k,b),E=s.get(M);if(E){E.score+=O,dS(E.terms,e);var A=pm(E.match,t);A?A.push(f):E.match[t]=[f]}else s.set(M,{score:O,terms:[e],match:(h={},h[t]=[f],h)})}}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}}}}catch(e){a={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(a)throw a.error}}return s},e.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,gw),i=r.get(e);if(null==i)(i=new Map).set(t,1),r.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},e.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,gw),i=r.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(t,e,n)},e.prototype.warnDocumentChanged=function(e,t,n){var r,i;if(null!=console&&null!=console.warn)try{for(var o=oe(Object.keys(this._fieldIds)),s=o.next();!s.done;s=o.next()){var a=s.value;if(this._fieldIds[a]===t)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(n,'" was not present in field "').concat(a,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},e.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},e.prototype.addFieldLength=function(e,t,n,r){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=r;var o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)},e.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},e.prototype.saveStoredFields=function(e,t){var n,r,i=this._options,o=i.storeFields,s=i.extractField;if(null!=o&&0!==o.length){var a=this._storedFields.get(e);null==a&&this._storedFields.set(e,a={});try{for(var l=oe(o),u=l.next();!u.done;u=l.next()){var c=u.value,h=s(t,c);void 0!==h&&(a[c]=h)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},e}(),pm=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),oS=((Lo={})[gm]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e.get(s);if(null==a)e.set(s,t.get(s));else{var l=t.get(s),u=l.score,c=l.terms,h=l.match;a.score=a.score+u,a.match=Object.assign(a.match,h),hw(a.terms,c)}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Lo[iS]=function(e,t){var n,r,i=new Map;try{for(var o=oe(t.keys()),s=o.next();!s.done;s=o.next()){var a=s.value,l=e.get(a);if(null!=l){var u=t.get(a),c=u.score,h=u.terms,d=u.match;hw(l.terms,h),i.set(a,{score:l.score+c,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Lo[aS]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;e.delete(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Lo),dw=1.2,pw=.7,sS=.5,uS=s((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(sS+e*(dw+1)/(e+dw*(1-pw+pw*r/i)))}),"calcBM25Score"),lS=s((function(e){return function(t,n,r){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,n,r):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,n,r):!0===e.prefix}}}),"termToQuerySpec"),fm={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(pS)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},fw={combineWith:gm,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},cS={prefix:function(e,t,n){return t===n.length-1}},dS=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),hw=s((function(e,t){var n,r;try{for(var i=oe(t),o=i.next();!o.done;o=i.next()){var s=o.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),mw=s((function(e,t){var n=e.score;return t.score-n}),"byScore"),gw=s((function(){return new Map}),"createMap"),ul=s((function(e){var t,n,r=new Map;try{for(var i=oe(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;r.set(parseInt(s,10),e[s])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}),"objectToNumericMap"),pS=/[\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;y();var fS=["0","1","2","3","4","5","6","7","8","9"],hS=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],mS=["0","1","2","3","4","5","6","7","8","9"],gS=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],R6=[...fS,...hS,...mS,...gS],_w=["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"];y();var vS=32,vt=!1,yS=120,vm=0,bm=class{constructor(e){b(this,"_callback"),b(this,"_frameCount"),b(this,"_ordering"),b(this,"_supersededBy"),b(this,"name"),b(this,"_remainingFrameCount"),b(this,"_lastFrameTime"),b(this,"userdata"),this._callback=e.callback,this._frameCount=null!=e.frameCount?e.frameCount:1,this._ordering=null!=e.ordering?e.ordering:0,this._supersededBy=null!=e.supersededBy?new Set(e.supersededBy):new Set,this.name=e.name,this.userdata=e.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,vt&&R.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(bm,"FrameUpdate");var cl=bm,wm=class{constructor(e){if(b(this,"_postponed"),b(this,"userdata"),b(this,"_priority"),b(this,"_group"),b(this,"name"),b(this,"_lastFrameTime"),b(this,"_callback"),b(this,"_complete"),b(this,"_scheduled"),b(this,"_cancelled"),null!=e.group&&null!=e.priority)throw new Error("cannot specify task priority individually within group");if(null!=e.group&&null!=e.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=e.callback,this._group=null!=e.group?e.group:null,this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata||{},this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,vt&&R.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(wm,"FrameTask");var Ln=wm,km=class{constructor(e){b(this,"_postponed"),b(this,"_onComplete"),b(this,"_priority"),b(this,"userdata"),b(this,"name"),b(this,"_tasks"),b(this,"_scheduledTasks"),b(this,"_scheduled"),b(this,"_cancelled"),this._onComplete=null!=e.onComplete?e.onComplete:()=>{},this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,vt&&R.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 e of this._scheduledTasks)return this._scheduledTasks.delete(e),e}};s(km,"FrameTaskGroup");var dl=km,_m=class{constructor(e){b(this,"_maxMillisecondsPerFrame"),b(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:vS,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(_m,"RealTimeTimer");var ym=_m,Mm=class{constructor(e){var t;b(this,"_raf"),b(this,"options"),b(this,"_timer"),b(this,"_performance"),b(this,"_scheduledUpdatesByOrdering"),b(this,"_scheduledTasksByPriority"),b(this,"_postponedTasks"),b(this,"_requestAnimationFrameHandle"),b(this,"_updatesToRunThisFrame"),b(this,"_lastFrameTime",0),b(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new ym,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new ji,this._scheduledTasksByPriority=new ji,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),vt&&R.log("task scheduler instantiated"),null!=(t=globalThis.MappedinDebug)&&t.TEST_IOS&&(this._raf=e=>setTimeout(e,16))}clear(){for(let e of this._scheduledTasksByPriority.values())e._cancelled=!0;for(let e of this._postponedTasks.values())e._cancelled=!0;this._scheduledUpdatesByOrdering=new ji,this._scheduledTasksByPriority=new ji,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),vt&&R.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(e){var t;let n;this._timer.beginFrame(),this._performance&&(n=performance.now());let r=!1;vt&&(0===vm&&(r=!0),++vm,vm%=yS);let i=this._scheduledUpdatesByOrdering.keys();for(let e=i.length-1;e>=0;--e){let t=i[e];for(let e of this._scheduledUpdatesByOrdering.get(t).values())this._updatesToRunThisFrame.push(e),r&&R.log("update scheduled to run this frame",e.name)}for(let e of this._updatesToRunThisFrame){--e._remainingFrameCount,e._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(e._ordering,e),e._superseded=!1;for(let t of this._updatesToRunThisFrame)e._supersededBy.has(t)&&(e._superseded=!0,r&&R.log("update superseded",e.name,t.name))}for(let e=0;e<this._updatesToRunThisFrame.length;++e)this._updatesToRunThisFrame[e]._superseded&&(this._updatesToRunThisFrame.splice(e,1),--e);for(let t of this._updatesToRunThisFrame){let n;this._performance&&(n=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-n),r&&R.log("update completed",t.name)}this._updatesRunLastFrame.clear();for(let e of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(e);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(e)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-n),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame(),null!=(t=this.options)&&t.onUpdateEnd&&this.options.onUpdateEnd()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(e){let t,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;R.assert(void 0!==n),Object.getPrototypeOf(n)===dl.prototype&&(r=n,n=r._popTask()),R.assert(void 0!==n),R.assert(Object.getPrototypeOf(n)===Ln.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),vt&&R.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),vt&&R.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===dl)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+e.name);if(e._scheduled)throw new Error("cannot schedule already scheduled task: "+e.name);if(e._cancelled)throw new Error("cannot schedule cancelled task: "+e.name);let t=e;"_group"in e&&null!=e._group&&(e._group._tasks.add(e),e._group._scheduledTasks.add(e),t=e._group),t._postponed?this._postponedTasks.add(t):this._scheduledTasksByPriority.insert(t._priority,t),e._scheduled=!0,t._scheduled=!0,vt&&R.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),vt&&R.log("update cancelled",e.name)}cancelTask(e){if(!e._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+e.name);if(e._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+e.name);if("_group"in e&&null!=e._group){let t=e._group.isComplete();e._group._tasks.delete(e),e._group._scheduledTasks.delete(e),e._group.isComplete()&&(this._scheduledTasksByPriority.delete(e._group._priority,e._group),t||e._group._onComplete())}else this._scheduledTasksByPriority.delete(e._priority,e),this._postponedTasks.delete(e);Object.getPrototypeOf(e)===Ln.prototype?e._cancelled=!0:"clear"in e&&e.clear(),vt&&R.log("task cancelled",e.name)}postponeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot postpone individual tasks in group: "+e.name);if(e._cancelled)throw new Error("cannot postpone cancelled task: "+e.name);if(!e._postponed){if(Object.getPrototypeOf(e)===Ln.prototype){if("_complete"in e)return;if(!e._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+e.name)}this._scheduledTasksByPriority.delete(e._priority,e),(Object.getPrototypeOf(e)===Ln.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,vt&&R.log("task postponed",e.name)}}resumeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot resume individual tasks in groups");if(e._cancelled)throw new Error("cannot resume cancelled task");if(e._postponed){if(Object.getPrototypeOf(e)===Ln.prototype){if("_complete"in e&&e._complete)return;if(!e._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(e),(Object.getPrototypeOf(e)===Ln.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),vt&&R.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Ln.prototype&&!e._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(e._priority,e)&&(this._scheduledTasksByPriority.delete(e._priority,e),this._scheduledTasksByPriority.insert(t,e)),e._priority=t,vt&&R.log("task priority changed",e.name,t)}};s(Mm,"TaskScheduler");var pl=Mm,xm=class{constructor(){b(this,"_map"),b(this,"_size"),b(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(e,t){return null!=this._map.get(e)&&this._map.get(e).has(t)}get(e){return this._map.get(e)}insert(e,t){if(R.assert("number"==typeof e&&Number.isFinite(e)),null==this._map.get(e)){this._map.set(e,new Set);for(let t=0;t<=this._sortedKeys.length;++t)if(t===this._sortedKeys.length||e<this._sortedKeys[t]){this._sortedKeys.splice(t,0,e);break}}this._map.get(e).has(t)||(this._map.get(e).add(t),++this._size)}delete(e,t){null!=this._map.get(e)&&this._map.get(e).has(t)&&(this._map.get(e).delete(t),--this._size,0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)))}pop(e){if(null!=this._map.get(e)){let t;for(t of this._map.get(e).values()){this._map.get(e).delete(t),--this._size;break}return 0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)),t}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let e=this._map.keys(),t=null,n={[Symbol.iterator]:()=>n,next:()=>{if(null==t){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values()}let n=t.next();for(;n.done;){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values(),n=t.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return R.assert(e===this._size),e}};s(xm,"Multimap");var ji=xm,Nn=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),bS=/([!-/:-@])|(?:[\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;function wS(e){return e.split(bS).filter(Boolean)}s(wS,"tokenizeAndCaptureDelimiters");var Fn,Dt,ar,gn,Ie,No,Fo,Ni,Do,Ro,zo,Bo,Fi,Dn,fl,hl,or,Vo,ml,gl,vl,xw,Li="",kS=.09,_S=1,MS=.025,xS=.5,ES=5e-4,TS=5e-4,PS=.01,OS=.05,Mw=1,SS=.01,AS=.2,IS={MappedinCategory:"categories",MappedinLocation:"locations"},CS={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:_w,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===E.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:kS,PRIMARY_INDEX_WEIGHT:_S,SECONDARY_INDEX_WEIGHT:MS,CATEGORY_NAME_WEIGHT:xS,LOCATION_NAME_WEIGHT:Mw,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:ES,CATEGORY_LOCATION_TAGS_WEIGHT:TS,CATEGORY_LOCATION_NAME_WEIGHT:PS,PRIMARY_INDEX_TAGS_NAME_WEIGHT:OS,LOCATION_DEFAULT_RANK:Mw,RATIO_OF_FUZZY_TO_EXACT:SS,RATIO_OF_PREFIX_TO_EXACT:AS}},Tm=class{constructor(e,t){var n;A(this,vl),A(this,Fn,void 0),A(this,Dt,void 0),A(this,ar,void 0),A(this,gn,void 0),A(this,Ie,void 0),A(this,No,new pl({performance:!0})),A(this,Fo,void 0),A(this,Ni,void 0),A(this,Do,new Map),A(this,Ro,void 0),A(this,zo,void 0),A(this,Bo,void 0),b(this,"buildIndices",s((()=>{var e,t;j(this,or,new Promise((e=>{j(this,Vo,e)})));let{PRIMARY_INDEX_FUZZYNESS:n,PRIMARY_INDEX_WEIGHT:r,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=w(this,Ie).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:a},weights:{fuzzy:o,prefix:s},boostDocument:e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r,tokenize:wS},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var n;return null!=(n=w(this,Fo))&&n.has(e.toLowerCase())?null:e.toLowerCase()}},h={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(null!=(e=w(this,Ie))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=w(this,Ie))?void 0:t.jsonIndex);j(this,Dt,jr.loadJS(e,u)),j(this,ar,jr.loadJS(n,c)),j(this,gn,jr.loadJS(r,h))}else j(this,Dt,new jr(u)),j(this,ar,new jr(c)),j(this,gn,new jr(h)),w(this,Fn).locations.forEach(w(this,fl)),w(this,Fn).categories.forEach(w(this,hl));w(this,No).update(performance.now())}),"buildIndices")),A(this,Fi,0),A(this,Dn,s((e=>{bl(this,Fi)._++,w(this,No).scheduleUpdate(new cl({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),bl(this,Fi)._--,0===w(this,Fi)&&w(this,Vo).call(this)}}))}),"#addTask")),A(this,fl,s((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=w(this,Ie).constants,a=o;null!=(t=w(this,Ie))&&t.useLocationRank&&(a=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,n;return null!=(t=e.rank)&&t.score?null==(n=e.rank)?void 0:n.score:o})),o):o),w(this,Dn).call(this,(()=>{w(this,Dt).add({name:Nn(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:a})})),null!=(n=w(this,Ie))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{w(this,Dt).add({name:"",tag:Nn(t),id:"MappedinLocation_"+e.id,weight:s,rank:a})})),null!=(r=w(this,Ie))&&r.searchDescriptions&&w(this,Dn).call(this,(()=>w(this,ar).add({description:Nn(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:a})))}),"#processLocation")),A(this,hl,s((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:s}=w(this,Ie).constants;w(this,Dn).call(this,(()=>w(this,Dt).add({name:Nn(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:s})));let a=e.locations.reduce(((e,t)=>e+" ".concat(Li," ")+t.name),"")+" ".concat(Li);if(null!=(t=w(this,Ie))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&w(this,Dn).call(this,(()=>w(this,gn).add({id:"MappedinCategory_"+e.id,"category.locations.description":Nn(t.description),ref:t.name,weight:r})))})),null!=(n=w(this,Ie))&&n.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var n;return e+(null==(n=t.tags)?void 0:n.reduce(((e,t)=>e+" ".concat(Li," ")+t),""))+" ".concat(Li)}),"");w(this,Dn).call(this,(()=>w(this,gn).add({"category.locations.tags":Nn(t),id:"MappedinCategory_"+e.id,weight:i})))}w(this,Dn).call(this,(()=>w(this,gn).add({"category.locations.name":Nn(a),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),A(this,or,void 0),A(this,Vo,void 0),A(this,ml,s((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:s}=e,[a,l]=i.split("_"),u=r||w(this,Fn).getCollectionItemById(IS[a],l);return s&&null!=(t=w(this,Ie))&&t.useLocationRank&&(n+=s),o&&(n*=o),{score:n,type:a,object:u}}),"#processSearchResult")),A(this,gl,s(((e,t)=>{for(let n in e.match)e.match[n].forEach((r=>{let i=e.ref||e[r]||t.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let t=new RegExp("[^".concat(Li,"]* ")+n+" [^".concat(Li,"]*"),"ig").exec(e[r]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:n,weight:e.weight,matchesOn:r,value:i})}))}),"#addMatches")),j(this,Ni,Co.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),j(this,Ie,{...CS,...t}),j(this,Fn,e),j(this,Fo,new Set(null==(n=w(this,Ie))?void 0:n.stopWords));let r=w(this,Fn).venue.slug;w(this,Fn).on(0,this.buildIndices),this.buildIndices(),j(this,Ro,ai((e=>{w(this,Ni).trackSearchSuggest({query:e}),Ee.addPendingEvent(new ya({venue:r}))}),300)),j(this,zo,ai((e=>{w(this,Ni).trackSearch({query:e}),Ee.addPendingEvent(new va({venue:r}))}),300)),j(this,Bo,ai((()=>{Ee.addPendingEvent(new ma({venue:r}))}),300)),Ee.addPendingEvent(new ga({search_descriptions:w(this,Ie).searchDescriptions,search_tags:w(this,Ie).searchTags,search_descriptions_in_categories:w(this,Ie).searchDescriptionsInCategories,search_tags_in_categories:w(this,Ie).searchTagsInCategories,use_location_rank:w(this,Ie).useLocationRank,venue:r}))}async suggest(e){await w(this,or);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=w(this,Ie).constants,s=w(this,Dt).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:o}});return w(this,Ro).call(this,e),{total:s.length,hits:s.map((e=>({text:e.suggestion})))}}async search(e){await w(this,or);let t=we(this,vl,xw).call(this,e);return w(this,zo).call(this,e),t}async toJSON(){return await w(this,or),JSON.stringify({primary:w(this,Dt),secondary:w(this,ar),extra:w(this,gn)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await w(this,or),t=i instanceof Tn?"MappedinLocation":i instanceof Er?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"_"+i.id:"string"==typeof i.id?n="Custom_"+i.id:(n=w(this,Do).get(i),n||(n="Custom_"+On(),w(this,Do).set(i,n))),w(this,Dt).add({id:n,weight:o,object:i,query:Nn(r)}),w(this,Bo).call(this)}};Fn=new WeakMap,Dt=new WeakMap,ar=new WeakMap,gn=new WeakMap,Ie=new WeakMap,No=new WeakMap,Fo=new WeakMap,Ni=new WeakMap,Do=new WeakMap,Ro=new WeakMap,zo=new WeakMap,Bo=new WeakMap,Fi=new WeakMap,Dn=new WeakMap,fl=new WeakMap,hl=new WeakMap,or=new WeakMap,Vo=new WeakMap,ml=new WeakMap,gl=new WeakMap,vl=new WeakSet,xw=s((function(e){let t=[],n=Nn(e);t=[...w(this,Dt).search(n),...w(this,ar).search(n),...w(this,gn).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=w(this,ml).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},w(this,gl).call(this,e,r[e.id])}return Object.keys(r).map((e=>({...r[e],matches:r[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),s(Tm,"OfflineSearch");var Em=Tm;y();var Ew=(e=>(e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY",e))(Ew||{}),Pm=globalThis.fetch;function ft(){if(null==Pm)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return Pm}function d4(e){Pm=e}s(ft,"isomorphicFetch"),s(d4,"setFetchFn");var Tw,jS=null==(Tw=null==E?void 0:E.env)?void 0:Tw.npm_package_version;globalThis.btoa||(globalThis.btoa=Pw.encode);var LS=["ar"];function sr(e){var t;let n={...sm,...e};return n.headers={...n.headers,"mappedin-sdk-version":jS},n.things=pb("things"in e?e.things:void 0),"platformString"in e&&(n.headers={...n.headers,"mappedin-platform-version":e.platformString}),n.noAuth||(n.accessToken?n.authorization="Bearer ".concat(n.accessToken):n.clientId&&n.clientSecret&&(n.authorization="Basic ".concat(globalThis.btoa("".concat(n.clientId,":").concat(n.clientSecret))))),n.language=null==(t=n.language)?void 0:t.toLowerCase(),n}function Ow(e){return e.endsWith("/")?e:"".concat(e,"/")}async function v4(e){let t={emitAnalyticsEvents:!0,version:"2.0.0",...e},n=sr(t),r=new _t(n),i=await RS(n);if("1.0.0"===n.version){let e=F0(await j0(i));return r.hydrateFromMVFv1(e),r}let o=N0(Qh(await Zh(i)),n.override);return"function"==typeof t.onMVFParsed&&t.onMVFParsed(o),await r.hydrateFromMVF(o),Ee.addPendingEvent(new oa({venue:n.venue})),r}async function y4(e){e.key||R.error('"key" is required.'),e.secret||R.error('"secret" is required.'),e.mapId||R.error('"mapId" is required.');let{access_token:t}=await zS(e),n={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,accessToken:t,...e},r=sr({...n}),i=new _t(r),o=await VS(r,t),s=Qh(await Zh(o));return"function"==typeof n.onMVFParsed&&n.onMVFParsed(s),i.hydrateFromMVF(s),i}async function NS(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=sr({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new _t({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,Ee.addPendingEvent(new aa({venue:n.venue})),i}async function b4(e){let t=sr({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,secure:!0,...e}}),n="public/1/".concat(t.useDraftData?"draft/":""),r=new _t({...t,baseUrl:t.baseUrl+n}),i=await Tr.fetch(r);return{hasSecureAssets:i.secureContentStorage,languages:i.languages}}function w4(e){NS=e}s(sr,"parseOptions"),s(Ow,"normalizeUrl"),s(v4,"getVenueMVF"),s(y4,"getVenueMaker"),s(NS,"getVenue"),s(b4,"getVenueMetadata"),s(w4,"__setGetVenueMock");var Om={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function k4(e){let t=sr({baseUrl:"https://api-gateway.mappedin.com/",...Om,...e}),{url:n,updated_at:r}=await FS(e),i=await ft()(n,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format ".concat(s));let a=new _t(t);return await a.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),a.updatedAt=r,a}async function FS(e){let t=sr({baseUrl:"https://api-gateway.mappedin.com/",...Om,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&LS.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await Nu(t,i)}async function _4(e,{url:t,updated_at:n}){let r=sr({baseUrl:"https://api-gateway.mappedin.com/",...Om,...e}),i=await ft()(t,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format".concat(s));let a=new _t(r);return await a.hydrate(o,r.shouldPopulateBundledImagesAsBlobs),a.updatedAt=n,a}async function DS(e){var t;let n=sr({baseUrl:"https://api-gateway.mappedin.com/",...sm,...e}),r="".concat(n.bundleBaseUri||n.baseUrl+"exports/mvf/1/bundle","?venue=").concat(n.venue,"&version=").concat(null!=(t=n.version)?t:"2.0.0");return n.headers["Content-Type"]="application/zip",await Nu(n,r)}async function RS(e){return new Promise((async(t,n)=>{try{let{url:n}=await DS(e),r=await ft()(n).then((e=>e.arrayBuffer()));t(new Uint8Array(r))}catch(e){n(e)}}))}async function zS(e){let t="".concat(e.authBaseUri?Ow(e.authBaseUri):"https://auth-maker.mappedin.com/","api-key/token"),n=await ft()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}async function BS(e,t){let n="".concat(e.bundleBaseUri?Ow(e.bundleBaseUri):"https://app.mappedin.com/","api/venue/").concat(e.mapId,"/mvf"),r=await ft()(n,{headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText));return r.json()}async function VS(e,t){return new Promise((async(n,r)=>{try{let{url:r}=await BS(e,t),i=await ft()(r).then((e=>e.arrayBuffer()));n(new Uint8Array(i))}catch(e){r(e)}}))}async function M4(e,t=!0){let n=new _t({venue:""});return await n.hydrate(e,t),n}async function x4(e){let t=new _t({venue:""});return await t.hydrateFromMVF(e),t}s(k4,"getVenueBundle"),s(FS,"getVenueBundleURL"),s(_4,"downloadBundle"),s(DS,"getVenueMVFURL"),s(RS,"downloadVenueBundleMVF"),s(zS,"getMakerAccessToken"),s(BS,"getMakerBundleURL"),s(VS,"downloadMVF"),s(M4,"hydrateVenue"),s(x4,"hydrateVenueMVF");export{Co as CustomerAnalytics,Du as GET_VENUE_EVENT,Ew as MAP_RENDER_MODE,_t as Mappedin,Er as MappedinCategory,Fa as MappedinCollectionType,Pr as MappedinCoordinate,St as MappedinDestinationSet,cr as MappedinDirections,no as MappedinEvent,Tn as MappedinLocation,ao as MappedinLocationState,so as MappedinMap,po as MappedinMapGroup,en as MappedinNavigatable,La as MappedinNode,_r as MappedinPolygon,eo as MappedinRankings,Tr as MappedinVenue,Ya as MappedinVortex,Em as OfflineSearch,w4 as __setGetVenueMock,Hf as defaultThings,_4 as downloadBundle,VS as downloadMVF,RS as downloadVenueBundleMVF,zS as getMakerAccessToken,BS as getMakerBundleURL,NS as getVenue,k4 as getVenueBundle,FS as getVenueBundleURL,v4 as getVenueMVF,DS as getVenueMVFURL,y4 as getVenueMaker,b4 as getVenueMetadata,M4 as hydrateVenue,x4 as hydrateVenueMVF,ft as isomorphicFetch,sr as parseOptions,d4 as setFetchFn};
|
|
1
|
+
var E,Ew=Object.create,Ci=Object.defineProperty,Tw=Object.getOwnPropertyDescriptor,Pw=Object.getOwnPropertyNames,Ow=Object.getPrototypeOf,Sw=Object.prototype.hasOwnProperty,Iw=(e,t,n)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>Ci(e,"name",{value:t,configurable:!0}),Pm=(e,t)=>()=>(e&&(t=e(e=0)),t),q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Aw=(e,t)=>{for(var n in t)Ci(e,n,{get:t[n],enumerable:!0})},Cw=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Pw(t))!Sw.call(e,i)&&i!==n&&Ci(e,i,{get:()=>t[i],enumerable:!(r=Tw(t,i))||r.enumerable});return e},qt=(e,t,n)=>(n=null!=e?Ew(Ow(e)):{},Cw(!t&&e&&e.__esModule?n:Ci(n,"default",{value:e,enumerable:!0}),e)),y=(e,t,n)=>(Iw(e,"symbol"!=typeof t?t+"":t,n),n),fl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},w=(e,t,n)=>(fl(e,t,"read from private field"),n?n.call(e):t.get(e)),I=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},j=(e,t,n,r)=>(fl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),hl=(e,t,n,r)=>({set _(r){j(e,t,r,n)},get _(){return w(e,t,r)}}),he=(e,t,n)=>(fl(e,t,"access private method"),n),g=Pm((()=>{E={env:{NODE_ENV:"production",npm_package_version:"5.39.0"}}})),Om=q(((e,t)=>{g(),function(n){var r="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==r&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(n=o);var a=s((function(e){this.message=e}),"InvalidCharacterError");a.prototype=new Error,a.prototype.name="InvalidCharacterError";var l=s((function(e){throw new a(e)}),"error"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,h=s((function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",s=-1;++s<t;)r=u.indexOf(e.charAt(s)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),d={encode:s((function(e){e=String(e),/[^\0-\xFF]/.test(e)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,s="",a=-1,c=e.length-o;++a<c;)t=e.charCodeAt(a)<<16,n=e.charCodeAt(++a)<<8,r=e.charCodeAt(++a),s+=u.charAt((i=t+n+r)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(a)<<8,n=e.charCodeAt(++a),s+=u.charAt((i=t+n)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(a),s+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),s}),"encode"),decode:h,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return d}));else if(r&&!r.nodeType)if(i)i.exports=d;else for(var p in d)d.hasOwnProperty(p)&&(r[p]=d[p]);else n.base64=d}(e)})),Ue=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.areaConversion=e.timeConversion=e.distanceConversion=e.altitudeKeys=e.latitudeKeys=e.longitudeKeys=e.MAXLON=e.MINLON=e.MAXLAT=e.MINLAT=e.earthRadius=e.sexagesimalPattern=void 0;e.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;e.earthRadius=6378137;e.MINLAT=-90;e.MAXLAT=90;e.MINLON=-180;e.MAXLON=180;e.longitudeKeys=["lng","lon","longitude",0];e.latitudeKeys=["lat","latitude",1];e.altitudeKeys=["alt","altitude","elevation","elev",2];e.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};e.timeConversion={m:60,h:3600,d:86400};var t={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};e.areaConversion=t,t.sqm=t.m2,t.sqkm=t.km2,t.sqft=t.ft2,t.sqyd=t.yd2,t.sqin=t.in2})),Li=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e,t){return t.reduce((function(t,n){if(typeof e>"u"||null===e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&typeof n<"u"&&typeof t>"u"?(t=n,n):t}),void 0)}),"getCoordinateKey");e.default=t})),Fi=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"isDecimal");e.default=t})),Ni=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=s((function(e){return t.sexagesimalPattern.test(e.toString().trim())}),"isSexagesimal");e.default=n})),Di=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=s((function(e){var n=new RegExp(t.sexagesimalPattern).exec(e);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,o=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-o:o}),"sexagesimalToDecimal");e.default=n})),Uo=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=r(Li());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(r,"_interopRequireDefault"),s(i,"ownKeys"),s(o,"_objectSpread"),s(a,"_defineProperty");var l=s((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:t.longitudeKeys,latitude:t.latitudeKeys,altitude:t.altitudeKeys},i=(0,n.default)(e,r.longitude),s=(0,n.default)(e,r.latitude),a=(0,n.default)(e,r.altitude);return o({latitude:s,longitude:i},a?{altitude:a}:{})}),"getCoordinateKeys");e.default=l})),yl=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Fi()),n=o(Ni()),r=o(Di()),i=Ue();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLAT||o<i.MINLAT):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLatitude");e.default=a})),wl=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Fi()),n=o(Ni()),r=o(Di()),i=Ue();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLON||o<i.MINLON):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLongitude");e.default=a})),_l=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(Uo()),n=i(yl()),r=i(wl());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e){var i=(0,t.default)(e),o=i.latitude,s=i.longitude;if(Array.isArray(e)&&e.length>=2)return(0,r.default)(e[0])&&(0,n.default)(e[1]);if(typeof o>"u"||typeof s>"u")return!1;var a=e[s],l=e[o];return!(typeof l>"u"||typeof a>"u"||!1===(0,n.default)(l)||!1===(0,r.default)(a))}),"isValidCoordinate");e.default=o})),Ho=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Fi()),n=a(Ni()),r=a(Di()),i=a(_l()),o=a(Uo());function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(a,"_interopRequireDefault"),s(l,"ownKeys"),s(u,"_objectSpread"),s(c,"_defineProperty");var h=s((function e(s){if((0,t.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var a=(0,o.default)(s);return Array.isArray(s)?s.map((function(t,n){return[0,1].includes(n)?e(t):t})):u(u(u({},s),a.latitude&&c({},a.latitude,e(s[a.latitude]))),a.longitude&&c({},a.longitude,e(s[a.longitude])))}return Array.isArray(s)?s.map((function(t){return(0,i.default)(t)?e(t):t})):s}),"toDecimal");e.default=h})),vt=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=i(Li()),r=i(Ho());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.latitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLatitude");e.default=o})),yt=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=i(Li()),r=i(Ho());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.longitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLongitude");e.default=o})),Ut=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e*Math.PI/180}),"toRad");e.default=t})),Qn=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return 180*e/Math.PI}),"toDeg");e.default=t})),zm=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(vt()),n=a(yt()),r=a(Ut()),i=a(Qn()),o=Ue();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,t.default)(e),c=(0,n.default)(e),h=s/l,d=(0,r.default)(a),p=(0,r.default)(u),f=(0,r.default)(c),g=Math.asin(Math.sin(p)*Math.cos(h)+Math.cos(p)*Math.sin(h)*Math.cos(d)),v=f+Math.atan2(Math.sin(d)*Math.sin(h)*Math.cos(p),Math.cos(h)-Math.sin(p)*Math.sin(g)),y=(0,i.default)(v);return(y<o.MINLON||y>o.MAXLON)&&(v=(v+3*Math.PI)%(2*Math.PI)-Math.PI,y=(0,i.default)(v)),{latitude:(0,i.default)(g),longitude:y}}),"computeDestinationPoint");e.default=l})),Bm=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.areaConversion[n];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"convertArea");e.default=n})),Vm=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.distanceConversion[n];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"convertDistance");e.default=n})),qm=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ue(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return e*t.timeConversion.h*t.distanceConversion.km;case"mph":return e*t.timeConversion.h*t.distanceConversion.mi;default:return e}}),"convertSpeed");e.default=n})),Ym=q((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"imprecise"),u=s((function(e){var n=t(e.toString().split("."),2),r=n[0],i=n[1],o=Math.abs(Number(r)),s=l(60*+("0."+(i||0))),a=Math.floor(s),u=l(60*(s%a||0));return o+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"decimal2sexagesimal");e.default=u})),Pl=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e>1?1:e<-1?-1:e}),"robustAcos");e.default=t})),Sn=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(vt()),n=a(yt()),r=a(Ut()),i=a(Pl()),o=Ue();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;a=typeof a<"u"&&!isNaN(a)?a:1;var l=(0,t.default)(e),u=(0,n.default)(e),c=(0,t.default)(s),h=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(c))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(c))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(h))))*o.earthRadius;return Math.round(d/a)*a}),"getDistance");e.default=l})),Ol=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default;return r="function"==typeof r?r:t.default,n.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"orderByDistance");e.default=r})),Xm=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ol());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){return(0,t.default)(e,n)[0]}),"findNearest");e.default=r})),Zm=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Ut()),n=o(vt()),r=o(yt()),i=Ue();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){var o=0;if(e.length>2){for(var s,a,l,u=0;u<e.length;u++){u===e.length-2?(s=e.length-2,a=e.length-1,l=0):u===e.length-1?(s=e.length-1,a=0,l=1):(s=u,a=u+1,l=u+2);var c=(0,r.default)(e[s]),h=(0,n.default)(e[a]),d=(0,r.default)(e[l]);o+=((0,t.default)(d)-(0,t.default)(c))*Math.sin((0,t.default)(h))}o=o*i.earthRadius*i.earthRadius/2}return Math.abs(o)}),"getAreaOfPolygon");e.default=a})),Al=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(vt()),n=r(yt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,r){var i=(0,t.default)(r),o=(0,n.default)(r);return{maxLat:Math.max(i,e.maxLat),minLat:Math.min(i,e.minLat),maxLng:Math.max(o,e.maxLng),minLng:Math.min(o,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"getBounds");e.default=i})),eg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(vt()),n=a(yt()),r=a(Ut()),i=a(Qn()),o=Ue();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a,l,u=(0,t.default)(e),c=(0,n.default)(e),h=(0,r.default)(u),d=(0,r.default)(c),p=s/o.earthRadius,f=h-p,g=h+p,v=(0,r.default)(o.MAXLAT),y=(0,r.default)(o.MINLAT),m=(0,r.default)(o.MAXLON),w=(0,r.default)(o.MINLON);if(f>y&&g<v){var b=Math.asin(Math.sin(p)/Math.cos(h));(a=d-b)<w&&(a+=2*Math.PI),(l=d+b)>m&&(l-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),a=w,l=m;return[{latitude:(0,i.default)(f),longitude:(0,i.default)(a)},{latitude:(0,i.default)(g),longitude:(0,i.default)(l)}]}),"getBoundsOfDistance");e.default=l})),rg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(vt()),n=o(yt()),r=o(Ut()),i=o(Qn());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var o=e.length,s=e.reduce((function(e,i){var o=(0,r.default)((0,t.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:e.X+Math.cos(o)*Math.cos(s),Y:e.Y+Math.cos(o)*Math.sin(s),Z:e.Z+Math.sin(o)}}),{X:0,Y:0,Z:0}),a=s.X/o,l=s.Y/o,u=s.Z/o;return{longitude:(0,i.default)(Math.atan2(l,a)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(a*a+l*l)))}}),"getCenter");e.default=a})),ig=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Al());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e){var n=(0,t.default)(e),r=n.minLat+(n.maxLat-n.minLat)/2,i=n.minLng+(n.maxLng-n.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}}),"getCenterOfBounds");e.default=r})),Cl=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(vt()),n=o(yt()),r=o(Ut()),i=o(Qn());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,r.default)((0,n.default)(o))-(0,r.default)((0,n.default)(e)),a=Math.log(Math.tan((0,r.default)((0,t.default)(o))/2+Math.PI/4)/Math.tan((0,r.default)((0,t.default)(e))/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,a))+360)%360}),"getRhumbLineBearing");e.default=a})),ug=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Cl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i="function"==typeof r?r(e,n):(0,t.default)(e,n);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"}}),"getCompassDirection");e.default=r})),Ll=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Sn()),n=r(Pl());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r,i){var o=(0,t.default)(r,e),s=(0,t.default)(e,i),a=(0,t.default)(r,i),l=Math.acos((0,n.default)((o*o+a*a-s*s)/(2*o*a))),u=Math.acos((0,n.default)((s*s+a*a-o*o)/(2*s*a)));return l>Math.PI/2?o:u>Math.PI/2?s:Math.sin(l)*o}),"getDistanceFromLine");e.default=i})),fg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(vt()),n=o(yt()),r=o(Ut()),i=o(Qn());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,t.default)(o),a=(0,n.default)(o),l=(0,t.default)(e),u=(0,n.default)(e);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(a)-(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)(a)-(0,r.default)(u))))+360)%360}),"getGreatCircleBearing");e.default=a})),hg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?s((function(e){return typeof e}),"_typeof"):s((function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),"_typeof"))(e)}s(n,"_interopRequireDefault"),s(r,"_typeof");var i=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.default;return e.reduce((function(e,t){return"object"===r(e)&&null!==e.last&&(e.distance+=n(t,e.last)),e.last=t,e}),{last:null,distance:0}).distance}),"getPathLength");e.default=i})),yg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(vt()),n=o(yt()),r=o(Ut()),i=Ue();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=typeof s<"u"&&!isNaN(s)?s:1;var a,l,u,c,h,d,p,f=(0,t.default)(e),g=(0,n.default)(e),v=(0,t.default)(o),y=(0,n.default)(o),m=6356752.314245,w=1/298.257223563,b=(0,r.default)(y-g),_=Math.atan((1-w)*Math.tan((0,r.default)(parseFloat(f)))),M=Math.atan((1-w)*Math.tan((0,r.default)(parseFloat(v)))),x=Math.sin(_),I=Math.cos(_),S=Math.sin(M),O=Math.cos(M),k=b,E=100;do{var P=Math.sin(k),A=Math.cos(k);if(0===(d=Math.sqrt(O*P*(O*P)+(I*S-x*O*A)*(I*S-x*O*A))))return 0;a=x*S+I*O*A,l=Math.atan2(d,a),h=a-2*x*S/(c=1-(u=I*O*P/d)*u),isNaN(h)&&(h=0);var C=w/16*c*(4+w*(4-3*c));p=k,k=b+(1-C)*w*u*(l+C*d*(h+C*a*(2*h*h-1)))}while(Math.abs(k-p)>1e-12&&--E>0);if(0===E)return NaN;var j=c*(i.earthRadius*i.earthRadius-m*m)/(m*m),T=1+j/16384*(4096+j*(j*(320-175*j)-768)),F=j/1024*(256+j*(j*(74-47*j)-128)),N=F*d*(h+F/4*(a*(2*h*h-1)-F/6*h*(4*d*d-3)*(4*h*h-3))),R=m*T*(l-N);return Math.round(R/s)*s}),"getDistance");e.default=a})),bg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return/^NNE|NE|NNW|N$/.test(e)?"N":/^ENE|E|ESE|SE$/.test(e)?"E":/^SSE|S|SSW|SW$/.test(e)?"S":/^WSW|W|WNW|NW$/.test(e)?"W":void 0}),"getRoughCompassDirection");e.default=t})),wg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i=r(e,n),o=Number(n.time)-Number(e.time),s=i/o*1e3;return s}),"getSpeed");e.default=r})),kg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(n,e)+(0,t.default)(e,r)===(0,t.default)(n,r)}),"isPointInLine");e.default=r})),Mg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(vt()),n=r(yt());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r){for(var i=!1,o=r.length,s=-1,a=o-1;++s<o;a=s)((0,n.default)(r[s])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[a])||(0,n.default)(r[a])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[s]))&&(0,t.default)(e)<((0,t.default)(r[a])-(0,t.default)(r[s]))*((0,n.default)(e)-(0,n.default)(r[s]))/((0,n.default)(r[a])-(0,n.default)(r[s]))+(0,t.default)(r[s])&&(i=!i);return i}),"isPointInPolygon");e.default=i})),xg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ll());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r,i){return(0,t.default)(e,n,r)<i}),"isPointNearLine");e.default=r})),Eg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(e,n)<r}),"isPointWithinRadius");e.default=r})),Pg=q((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}g(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){if(!e.startsWith("POLYGON"))throw new Error("Invalid wkt.");return e.slice(e.indexOf("(")+2,e.indexOf(")")).split(", ").map((function(e){var n=t(e.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))}),"wktToPolygon");e.default=l})),Sg=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0});var t={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(e,"computeDestinationPoint",{enumerable:!0,get:s((function(){return n.default}),"get")}),Object.defineProperty(e,"convertArea",{enumerable:!0,get:s((function(){return r.default}),"get")}),Object.defineProperty(e,"convertDistance",{enumerable:!0,get:s((function(){return i.default}),"get")}),Object.defineProperty(e,"convertSpeed",{enumerable:!0,get:s((function(){return o.default}),"get")}),Object.defineProperty(e,"decimalToSexagesimal",{enumerable:!0,get:s((function(){return a.default}),"get")}),Object.defineProperty(e,"findNearest",{enumerable:!0,get:s((function(){return l.default}),"get")}),Object.defineProperty(e,"getAreaOfPolygon",{enumerable:!0,get:s((function(){return u.default}),"get")}),Object.defineProperty(e,"getBounds",{enumerable:!0,get:s((function(){return c.default}),"get")}),Object.defineProperty(e,"getBoundsOfDistance",{enumerable:!0,get:s((function(){return h.default}),"get")}),Object.defineProperty(e,"getCenter",{enumerable:!0,get:s((function(){return d.default}),"get")}),Object.defineProperty(e,"getCenterOfBounds",{enumerable:!0,get:s((function(){return p.default}),"get")}),Object.defineProperty(e,"getCompassDirection",{enumerable:!0,get:s((function(){return f.default}),"get")}),Object.defineProperty(e,"getCoordinateKey",{enumerable:!0,get:s((function(){return v.default}),"get")}),Object.defineProperty(e,"getCoordinateKeys",{enumerable:!0,get:s((function(){return y.default}),"get")}),Object.defineProperty(e,"getDistance",{enumerable:!0,get:s((function(){return m.default}),"get")}),Object.defineProperty(e,"getDistanceFromLine",{enumerable:!0,get:s((function(){return w.default}),"get")}),Object.defineProperty(e,"getGreatCircleBearing",{enumerable:!0,get:s((function(){return b.default}),"get")}),Object.defineProperty(e,"getLatitude",{enumerable:!0,get:s((function(){return _.default}),"get")}),Object.defineProperty(e,"getLongitude",{enumerable:!0,get:s((function(){return M.default}),"get")}),Object.defineProperty(e,"getPathLength",{enumerable:!0,get:s((function(){return x.default}),"get")}),Object.defineProperty(e,"getPreciseDistance",{enumerable:!0,get:s((function(){return I.default}),"get")}),Object.defineProperty(e,"getRhumbLineBearing",{enumerable:!0,get:s((function(){return S.default}),"get")}),Object.defineProperty(e,"getRoughCompassDirection",{enumerable:!0,get:s((function(){return O.default}),"get")}),Object.defineProperty(e,"getSpeed",{enumerable:!0,get:s((function(){return k.default}),"get")}),Object.defineProperty(e,"isDecimal",{enumerable:!0,get:s((function(){return E.default}),"get")}),Object.defineProperty(e,"isPointInLine",{enumerable:!0,get:s((function(){return P.default}),"get")}),Object.defineProperty(e,"isPointInPolygon",{enumerable:!0,get:s((function(){return A.default}),"get")}),Object.defineProperty(e,"isPointNearLine",{enumerable:!0,get:s((function(){return C.default}),"get")}),Object.defineProperty(e,"isPointWithinRadius",{enumerable:!0,get:s((function(){return j.default}),"get")}),Object.defineProperty(e,"isSexagesimal",{enumerable:!0,get:s((function(){return T.default}),"get")}),Object.defineProperty(e,"isValidCoordinate",{enumerable:!0,get:s((function(){return F.default}),"get")}),Object.defineProperty(e,"isValidLatitude",{enumerable:!0,get:s((function(){return N.default}),"get")}),Object.defineProperty(e,"isValidLongitude",{enumerable:!0,get:s((function(){return R.default}),"get")}),Object.defineProperty(e,"orderByDistance",{enumerable:!0,get:s((function(){return L.default}),"get")}),Object.defineProperty(e,"sexagesimalToDecimal",{enumerable:!0,get:s((function(){return D.default}),"get")}),Object.defineProperty(e,"toDecimal",{enumerable:!0,get:s((function(){return B.default}),"get")}),Object.defineProperty(e,"toRad",{enumerable:!0,get:s((function(){return U.default}),"get")}),Object.defineProperty(e,"toDeg",{enumerable:!0,get:s((function(){return z.default}),"get")}),Object.defineProperty(e,"wktToPolygon",{enumerable:!0,get:s((function(){return V.default}),"get")});var n=W(zm()),r=W(Bm()),i=W(Vm()),o=W(qm()),a=W(Ym()),l=W(Xm()),u=W(Zm()),c=W(Al()),h=W(eg()),d=W(rg()),p=W(ig()),f=W(ug()),v=W(Li()),y=W(Uo()),m=W(Sn()),w=W(Ll()),b=W(fg()),_=W(vt()),M=W(yt()),x=W(hg()),I=W(yg()),S=W(Cl()),O=W(bg()),k=W(wg()),E=W(Fi()),P=W(kg()),A=W(Mg()),C=W(xg()),j=W(Eg()),T=W(Ni()),F=W(_l()),N=W(yl()),R=W(wl()),L=W(Ol()),D=W(Di()),B=W(Ho()),U=W(Ut()),z=W(Qn()),V=W(Pg()),q=Ue();function W(e){return e&&e.__esModule?e:{default:e}}Object.keys(q).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(e,n,{enumerable:!0,get:s((function(){return q[n]}),"get")})})),s(W,"_interopRequireDefault")})),Hs=q(((e,t)=>{g(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",w="wearable",b="embedded",_="Amazon",M="Apple",x="ASUS",I="BlackBerry",S="Browser",O="Chrome",k="Firefox",E="Google",P="Huawei",A="LG",C="Microsoft",j="Motorola",T="Opera",F="Samsung",N="Sony",R="Xiaomi",L="Zebra",D="Facebook",B=s((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),U=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),z=s((function(e,t){return typeof e===l&&-1!==V(t).indexOf(V(e))}),"has"),V=s((function(e){return e.toLowerCase()}),"lowerize"),q=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),W=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,275)}),"trim"),G=s((function(e,t){for(var n,o,s,l,u,c,h=0;h<t.length&&!u;){var d=t[h],p=t[h+1];for(n=o=0;n<d.length&&!u;)if(u=d[n++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===a&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;h+=2}}),"rgxMapper"),J=s((function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(z(t[n][i],e))return"?"===n?r:n}else if(z(t[n],e))return"?"===n?r:n;return e}),"strMapper"),X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,T+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,T]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+S]],[/\bqbcore\/([\w\.]+)/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],p],[/\bfocus\/([\w\.]+)/i],[p,[c,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,D],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,O+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,V]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,F],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,F],[h,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,v]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,P],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,P],[h,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,R],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,R],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,j],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,j],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,A],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,A],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[h,v]],[/(pixel c)\b/i],[u,[d,E],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,E],[h,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,N],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,N],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,I],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,v]],[/(nexus 9)/i],[u,[d,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[h,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[h,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[h,y]],[/(surface duo)/i],[u,[d,C],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,v]],[/(u304aa)/i],[u,[d,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[h,y]],[/\b(k88) b/i],[u,[d,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[h,y]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[d,u,[h,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,C],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,L],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,L],[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,g]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,g]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,C],[h,g]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,F],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,A],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,O+"cast"],[d,E],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[h,m]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,m]],[/(bravia[\w- ]+) bui/i],[u,[d,N],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,W],[u,W],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,w]],[/droid.+; (glass) \d/i],[u,[d,E],[h,w]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,L],[h,w]],[/(quest( 2)?)/i],[u,[d,D],[h,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,J,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,J,X]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,O+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},K=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof K))return new K(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?B(Y,t):Y;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.browser),e.major=q(e.version),e},this.getCPU=function(){var e={};return e[f]=r,G.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,G.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>275?W(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=U([c,p,"major"]),K.CPU=U([f]),K.DEVICE=U([u,d,h,g,v,m,y,w,b]),K.ENGINE=K.OS=U([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=K),e.UAParser=K):typeof define===i&&define.amd?define((function(){return K})):typeof n!==o&&(n.UAParser=K);var H=typeof n!==o&&(n.jQuery||n.Zepto);if(H&&!H.ua){var $=new K;H.ua=$.getResult(),H.ua.get=function(){return $.getUA()},H.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)H.ua[n]=t[n]}}}("object"==typeof window?window:e)})),sy=q(((e,t)=>{g();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",h="[object Map]",d="[object Number]",p="[object Object]",f="[object Promise]",v="[object RegExp]",y="[object Set]",m="[object String]",w="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,I={};I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I[i]=I[o]=I[b]=I[a]=I[_]=I[l]=I[u]=I[c]=I[h]=I[d]=I[p]=I[v]=I[y]=I[m]=I[w]=!1;var S="object"==typeof global&&global&&global.Object===Object&&global,O="object"==typeof self&&self&&self.Object===Object&&self,k=S||O||Function("return this")(),E="object"==typeof e&&e&&!e.nodeType&&e,P=E&&"object"==typeof t&&t&&!t.nodeType&&t,A=P&&P.exports===E,C=A&&S.process,j=function(){try{return C&&C.binding&&C.binding("util")}catch{}}(),T=j&&j.isTypedArray;function F(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function N(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function R(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function L(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function D(e){return function(t){return e(t)}}function B(e,t){return e.has(t)}function U(e,t){return null==e?void 0:e[t]}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function V(e,t){return function(n){return e(t(n))}}function q(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}s(F,"arrayFilter"),s(N,"arrayPush"),s(R,"arraySome"),s(L,"baseTimes"),s(D,"baseUnary"),s(B,"cacheHas"),s(U,"getValue"),s(z,"mapToArray"),s(V,"overArg"),s(q,"setToArray");var W,G=Array.prototype,J=Function.prototype,X=Object.prototype,Y=k["__core-js_shared__"],K=J.toString,H=X.hasOwnProperty,$=(W=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",Z=X.toString,Q=RegExp("^"+K.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=A?k.Buffer:void 0,te=k.Symbol,ne=k.Uint8Array,re=X.propertyIsEnumerable,ie=G.splice,oe=te?te.toStringTag:void 0,se=Object.getOwnPropertySymbols,ae=ee?ee.isBuffer:void 0,le=V(Object.keys,Object),ue=ct(k,"DataView"),ce=ct(k,"Map"),he=ct(k,"Promise"),de=ct(k,"Set"),pe=ct(k,"WeakMap"),fe=ct(Object,"create"),ge=wt(ue),ve=wt(ce),ye=wt(he),me=wt(de),we=wt(pe),be=te?te.prototype:void 0,_e=be?be.valueOf:void 0;function Me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(){this.__data__=fe?fe(null):{},this.size=0}function Ie(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Se(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return H.call(t,e)?t[e]:void 0}function Oe(e){var t=this.__data__;return fe?void 0!==t[e]:H.call(t,e)}function ke(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(){this.__data__=[],this.size=0}function Ae(e){var t=this.__data__,n=He(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)}function Ce(e){var t=this.__data__,n=He(t,e);return n<0?void 0:t[n][1]}function je(e){return He(this.__data__,e)>-1}function Te(e,t){var n=this.__data__,r=He(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Fe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(){this.size=0,this.__data__={hash:new Me,map:new(ce||Ee),string:new Me}}function Re(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function Le(e){return ut(this,e).get(e)}function De(e){return ut(this,e).has(e)}function Be(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ue(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fe;++t<n;)this.add(e[t])}function ze(e){return this.__data__.set(e,n),this}function Ve(e){return this.__data__.has(e)}function qe(e){var t=this.__data__=new Ee(e);this.size=t.size}function We(){this.__data__=new Ee,this.size=0}function Ge(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Je(e){return this.__data__.get(e)}function Xe(e){return this.__data__.has(e)}function Ye(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fe(r)}return n.set(e,t),this.size=n.size,this}function Ke(e,t){var n=Mt(e),r=!n&&_t(e),i=!n&&!r&&It(e),o=!n&&!r&&!i&&At(e),s=n||r||i||o,a=s?L(e.length,String):[],l=a.length;for(var u in e)(t||H.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&a.push(u);return a}function He(e,t){for(var n=e.length;n--;)if(bt(e[n][0],t))return n;return-1}function $e(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(e))}function Ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?ht(e):mt(e)}function Qe(e){return Pt(e)&&Ze(e)==i}function et(e,t,n,r,i){return e===t||(null==e||null==t||!Pt(e)&&!Pt(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,s,a){var l=Mt(e),u=Mt(t),c=l?o:pt(e),h=u?o:pt(t),d=(c=c==i?p:c)==p,f=(h=h==i?p:h)==p,g=c==h;if(g&&It(e)){if(!It(t))return!1;l=!0,d=!1}if(g&&!d)return a||(a=new qe),l||At(e)?ot(e,t,n,r,s,a):st(e,t,c,n,r,s,a);if(!(1&n)){var v=d&&H.call(e,"__wrapped__"),y=f&&H.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,w=y?t.value():t;return a||(a=new qe),s(m,w,n,r,a)}}return!!g&&(a||(a=new qe),at(e,t,n,r,s,a))}function nt(e){return!(!Et(e)||vt(e))&&(Ot(e)?Q:M).test(wt(e))}function rt(e){return Pt(e)&&kt(e.length)&&!!I[Ze(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var n in Object(e))H.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ot(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,d=2&n?new Ue:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var p=e[c],f=t[c];if(r)var g=s?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(d){if(!R(t,(function(e,t){if(!B(d,t)&&(p===e||i(p,e,n,r,o)))return d.push(t)}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function st(e,t,n,r,i,o,s){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case a:case l:case d:return bt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case v:case m:return e==t+"";case h:var c=z;case y:var p=1&r;if(c||(c=q),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;r|=2,s.set(e,t);var g=ot(c(e),c(t),r,i,o,s);return s.delete(e),g;case"[object Symbol]":if(_e)return _e.call(e)==_e.call(t)}return!1}function at(e,t,n,r,i,o){var s=1&n,a=lt(e),l=a.length;if(l!=lt(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?c in t:H.call(t,c)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var d=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<l;){var f=e[c=a[u]],g=t[c];if(r)var v=s?r(g,f,c,t,e,o):r(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,n,r,o):v)){d=!1;break}p||(p="constructor"==c)}if(d&&!p){var y=e.constructor,m=t.constructor;y!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m)&&(d=!1)}return o.delete(e),o.delete(t),d}function lt(e){return $e(e,Ct,dt)}function ut(e,t){var n=e.__data__;return gt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=U(e,t);return nt(n)?n:void 0}function ht(e){var t=H.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch{}var i=Z.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Ie,"hashDelete"),s(Se,"hashGet"),s(Oe,"hashHas"),s(ke,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Ie,Me.prototype.get=Se,Me.prototype.has=Oe,Me.prototype.set=ke,s(Ee,"ListCache"),s(Pe,"listCacheClear"),s(Ae,"listCacheDelete"),s(Ce,"listCacheGet"),s(je,"listCacheHas"),s(Te,"listCacheSet"),Ee.prototype.clear=Pe,Ee.prototype.delete=Ae,Ee.prototype.get=Ce,Ee.prototype.has=je,Ee.prototype.set=Te,s(Fe,"MapCache"),s(Ne,"mapCacheClear"),s(Re,"mapCacheDelete"),s(Le,"mapCacheGet"),s(De,"mapCacheHas"),s(Be,"mapCacheSet"),Fe.prototype.clear=Ne,Fe.prototype.delete=Re,Fe.prototype.get=Le,Fe.prototype.has=De,Fe.prototype.set=Be,s(Ue,"SetCache"),s(ze,"setCacheAdd"),s(Ve,"setCacheHas"),Ue.prototype.add=Ue.prototype.push=ze,Ue.prototype.has=Ve,s(qe,"Stack"),s(We,"stackClear"),s(Ge,"stackDelete"),s(Je,"stackGet"),s(Xe,"stackHas"),s(Ye,"stackSet"),qe.prototype.clear=We,qe.prototype.delete=Ge,qe.prototype.get=Je,qe.prototype.has=Xe,qe.prototype.set=Ye,s(Ke,"arrayLikeKeys"),s(He,"assocIndexOf"),s($e,"baseGetAllKeys"),s(Ze,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(nt,"baseIsNative"),s(rt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(st,"equalByTag"),s(at,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(ht,"getRawTag");var dt=se?function(e){return null==e?[]:(e=Object(e),F(se(e),(function(t){return re.call(e,t)})))}:jt,pt=Ze;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function gt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function vt(e){return!!$&&$ in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||X)}function mt(e){return Z.call(e)}function wt(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function bt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=_||ce&&pt(new ce)!=h||he&&pt(he.resolve())!=f||de&&pt(new de)!=y||pe&&pt(new pe)!=w)&&(pt=s((function(e){var t=Ze(e),n=t==p?e.constructor:void 0,r=n?wt(n):"";if(r)switch(r){case ge:return _;case ve:return h;case ye:return f;case me:return y;case we:return w}return t}),"getTag")),s(ft,"isIndex"),s(gt,"isKeyable"),s(vt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(wt,"toSource"),s(bt,"eq");var _t=Qe(function(){return arguments}())?Qe:function(e){return Pt(e)&&H.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&kt(e.length)&&!Ot(e)}s(xt,"isArrayLike");var It=ae||Tt;function St(e,t){return et(e,t)}function Ot(e){if(!Et(e))return!1;var t=Ze(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function kt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Et(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Pt(e){return null!=e&&"object"==typeof e}s(St,"isEqual"),s(Ot,"isFunction"),s(kt,"isLength"),s(Et,"isObject"),s(Pt,"isObjectLike");var At=T?D(T):rt;function Ct(e){return xt(e)?Ke(e):it(e)}function jt(){return[]}function Tt(){return!1}s(Ct,"keys"),s(jt,"stubArray"),s(Tt,"stubFalse"),t.exports=St})),Ny=q(((e,t)=>{g();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",a="[object Object]",l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[a]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var h="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,p=h||d||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,v=f&&"object"==typeof t&&t&&!t.nodeType&&t,y=v&&v.exports===f,m=y&&h.process,w=function(){try{return v&&v.require&&v.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),b=w&&w.isTypedArray;function _(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function M(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function x(e){return function(t){return e(t)}}function I(e,t){return null==e?void 0:e[t]}function S(e,t){return function(n){return e(t(n))}}s(_,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(I,"getValue"),s(S,"overArg");var O,k=Array.prototype,E=Function.prototype,P=Object.prototype,A=p["__core-js_shared__"],C=E.toString,j=P.hasOwnProperty,T=(O=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",F=P.toString,N=C.call(Object),R=RegExp("^"+C.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=y?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,U=L?L.allocUnsafe:void 0,z=S(Object.getPrototypeOf,Object),V=Object.create,q=P.propertyIsEnumerable,W=k.splice,G=D?D.toStringTag:void 0,J=function(){try{var e=Je(Object,"defineProperty");return e({},"",{}),e}catch{}}(),X=L?L.isBuffer:void 0,Y=Math.max,K=Date.now,H=Je(p,"Map"),$=Je(Object,"create"),Z=function(){function e(){}return s(e,"object"),function(t){if(!gt(t))return{};if(V)return V(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(){this.__data__=$?$(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ne(e){var t=this.__data__;if($){var r=t[e];return r===n?void 0:r}return j.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return $?void 0!==t[e]:j.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$&&void 0===t?n:t,this}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(){this.__data__=[],this.size=0}function ae(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():W.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]}function ue(e){return Oe(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=Oe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function de(){this.size=0,this.__data__={hash:new Q,map:new(H||oe),string:new Q}}function pe(e){var t=Ge(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return Ge(this,e).get(e)}function ge(e){return Ge(this,e).has(e)}function ve(e,t){var n=Ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ye(e){var t=this.__data__=new oe(e);this.size=t.size}function me(){this.__data__=new oe,this.size=0}function we(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function be(e){return this.__data__.get(e)}function _e(e){return this.__data__.has(e)}function Me(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(e,t),this.size=n.size,this}function xe(e,t){var n=ut(e),r=!n&<(e),i=!n&&!r&&dt(e),o=!n&&!r&&!i&&mt(e),s=n||r||i||o,a=s?M(e.length,String):[],l=a.length;for(var u in e)(t||j.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ke(u,l)))&&a.push(u);return a}function Ie(e,t,n){(void 0!==n&&!at(e[t],n)||void 0===n&&!(t in e))&&ke(e,t,n)}function Se(e,t,n){var r=e[t];(!j.call(e,t)||!at(r,n)||void 0===n&&!(t in e))&&ke(e,t,n)}function Oe(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}function ke(e,t,n){"__proto__"==t&&J?J(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(ne,"hashGet"),s(re,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=ne,Q.prototype.has=re,Q.prototype.set=ie,s(oe,"ListCache"),s(se,"listCacheClear"),s(ae,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=se,oe.prototype.delete=ae,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(he,"MapCache"),s(de,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),he.prototype.clear=de,he.prototype.delete=pe,he.prototype.get=fe,he.prototype.has=ge,he.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(we,"stackDelete"),s(be,"stackGet"),s(_e,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=we,ye.prototype.get=be,ye.prototype.has=_e,ye.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Ie,"assignMergeValue"),s(Se,"assignValue"),s(Oe,"assocIndexOf"),s(ke,"baseAssignValue");var Ee=We();function Pe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?Xe(e):tt(e)}function Ae(e){return vt(e)&&Pe(e)==i}function Ce(e){return!(!gt(e)||Ze(e))&&(pt(e)?R:l).test(st(e))}function je(e){return vt(e)&&ft(e.length)&&!!c[Pe(e)]}function Te(e){if(!gt(e))return et(e);var t=Qe(e),n=[];for(var r in e)"constructor"==r&&(t||!j.call(e,r))||n.push(r);return n}function Fe(e,t,n,r,i){e!==t&&Ee(t,(function(o,s){if(i||(i=new ye),gt(o))Ne(e,t,s,n,Fe,r,i);else{var a=r?r(rt(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Ie(e,s,a)}}),bt)}function Ne(e,t,n,r,i,o,s){var a=rt(e,n),l=rt(t,n),u=s.get(l);if(u)Ie(e,n,u);else{var c=o?o(a,l,n+"",e,t,s):void 0,h=void 0===c;if(h){var d=ut(l),p=!d&&dt(l),f=!d&&!p&&mt(l);c=l,d||p||f?ut(a)?c=a:ht(a)?c=ze(a):p?(h=!1,c=De(l,!0)):f?(h=!1,c=Ue(l,!0)):c=[]:yt(l)||lt(l)?(c=a,lt(a)?c=wt(a):(!gt(a)||pt(a))&&(c=Ye(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),Ie(e,n,c)}}function Re(e,t){return it(nt(e,t,xt),e+"")}s(Pe,"baseGetTag"),s(Ae,"baseIsArguments"),s(Ce,"baseIsNative"),s(je,"baseIsTypedArray"),s(Te,"baseKeysIn"),s(Fe,"baseMerge"),s(Ne,"baseMergeDeep"),s(Re,"baseRest");var Le=J?function(e,t){return J(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function De(e,t){if(t)return e.slice();var n=e.length,r=U?U(n):new e.constructor(n);return e.copy(r),r}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function Ue(e,t){var n=t?Be(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ze(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ve(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?ke(n,a,l):Se(n,a,l)}return n}function qe(e){return Re((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&He(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}function We(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function Ge(e,t){var n=e.__data__;return $e(t)?n["string"==typeof t?"string":"hash"]:n.map}function Je(e,t){var n=I(e,t);return Ce(n)?n:void 0}function Xe(e){var t=j.call(e,G),n=e[G];try{e[G]=void 0;var r=!0}catch{}var i=F.call(e);return r&&(t?e[G]=n:delete e[G]),i}function Ye(e){return"function"!=typeof e.constructor||Qe(e)?{}:Z(z(e))}function Ke(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t,n){if(!gt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Ke(t,n.length):"string"==r&&t in n)&&at(n[t],e)}function $e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ze(e){return!!T&&T in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||P)}function et(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function tt(e){return F.call(e)}function nt(e,t,n){return t=Y(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Y(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),_(e,this,a)}}function rt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(De,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(Ue,"cloneTypedArray"),s(ze,"copyArray"),s(Ve,"copyObject"),s(qe,"createAssigner"),s(We,"createBaseFor"),s(Ge,"getMapData"),s(Je,"getNative"),s(Xe,"getRawTag"),s(Ye,"initCloneObject"),s(Ke,"isIndex"),s(He,"isIterateeCall"),s($e,"isKeyable"),s(Ze,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(nt,"overRest"),s(rt,"safeGet");var it=ot(Le);function ot(e){var t=0,n=0;return function(){var r=K(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function st(e){if(null!=e){try{return C.call(e)}catch{}try{return e+""}catch{}}return""}function at(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(st,"toSource"),s(at,"eq");var lt=Ae(function(){return arguments}())?Ae:function(e){return vt(e)&&j.call(e,"callee")&&!q.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function ht(e){return vt(e)&&ct(e)}s(ct,"isArrayLike"),s(ht,"isArrayLikeObject");var dt=X||It;function pt(e){if(!gt(e))return!1;var t=Pe(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function gt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function vt(e){return null!=e&&"object"==typeof e}function yt(e){if(!vt(e)||Pe(e)!=a)return!1;var t=z(e);if(null===t)return!0;var n=j.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&C.call(n)==N}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=b?x(b):je;function wt(e){return Ve(e,bt(e))}function bt(e){return ct(e)?xe(e,!0):Te(e)}s(wt,"toPlainObject"),s(bt,"keysIn");var _t=qe((function(e,t,n){Fe(e,t,n)}));function Mt(e){return function(){return e}}function xt(e){return e}function It(){return!1}s(Mt,"constant"),s(xt,"identity"),s(It,"stubFalse"),t.exports=_t})),eb=q(((e,t)=>{"use strict";g(),t.exports=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,n=-1;n++<t;)for(var r=n+1;r<e.length;++r)e[n]===e[r]&&e.splice(r--,1);return e}),"unique"),t.exports.immutable=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=e[i];return t.exports(r)}),"uniqueImmutable")})),wb=q(((e,t)=>{var n,r;g(),n=e,r=function(){"use strict";function e(e,r,i,o,a){s((function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/a+h)),Math.min(o,Math.floor(r+(a-l)*c/a+h)),s)}var d=n[r],p=i,f=o;for(t(n,i,r),s(n[o],d)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[i],d)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}),"t")(e,r,i||0,o||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}s(e,"t"),s(t,"i"),s(n,"n");var r=s((function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}),"r");function i(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=g(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var s=e.children[o];l(i,e.leaf?r(s):s)}return i}function l(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function u(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;e(t,a,n,r,o),s.push(n,a,a,r)}}return s(i,"e"),s(o,"a"),s(a,"h"),s(l,"o"),s(u,"s"),s(c,"l"),s(h,"f"),s(d,"u"),s(p,"m"),s(f,"c"),s(g,"p"),s(v,"d"),r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!f(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var s=t.children[o],a=t.leaf?r(s):s;f(e,a)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):i.push(s))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!f(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(f(e,o)){if(t.leaf||p(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=g([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,s=this.data,a=this.toBBox(e),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(e,s.children,t);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var i,s=n-t+1,a=this._maxEntries;if(s<=a)return o(i=g(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=g([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));v(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);v(e,c,h,l,this.compareMinY);for(var d=c;d<=h;d+=l){var p=Math.min(d+l-1,h);i.children.push(this._build(e,d,p,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<t.children.length;a++){var l=t.children[a],u=h(l),c=(d=e,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-u);c<o?(o=c,i=u<i?u:i,s=l):c===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var d,p;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),l(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=g(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(e,t){this.data=g([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,l,u,c,d=1/0,p=1/0,f=t;f<=n-t;f++){var g=a(e,0,f,this.toBBox),v=a(e,f,n,this.toBBox),y=(i=g,o=v,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,c-l)),m=h(g)+h(v);y<d?(d=y,r=f,p=m<p?m:p):y===d&&m<p&&(p=m,r=f)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),s=a(e,n-t,n,i),u=d(o)+d(s),c=t;c<n-t;c++){var h=e.children[c];l(o,e.leaf?i(h):h),u+=d(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];l(s,e.leaf?i(f):f),u+=d(s)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),fh=q((e=>{"use strict";function t(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function n(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return r(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return d(t).geometry;case"MultiLineString":return h(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function r(e,n,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!S(e[0])||!S(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function i(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return r(e,t)})),n)}function o(e,n,r){void 0===r&&(r={});for(var i=0,o=e;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},n,r)}function a(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return o(e,t)})),n)}function l(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function u(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return l(e,t)})),n)}function c(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function h(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function d(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function p(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function f(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)}function v(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function y(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function m(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function w(e,t){return _(m(e,t))}function b(e){var t=e%360;return t<0&&(t+=360),t}function _(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return y(m(e,t),n)}function I(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o}function S(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function O(e){return!!e&&e.constructor===Object}function k(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!S(e))throw new Error("bbox must only contain numbers")}))}function E(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}g(),Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},s(t,"feature"),e.feature=t,s(n,"geometry"),e.geometry=n,s(r,"point"),e.point=r,s(i,"points"),e.points=i,s(o,"polygon"),e.polygon=o,s(a,"polygons"),e.polygons=a,s(l,"lineString"),e.lineString=l,s(u,"lineStrings"),e.lineStrings=u,s(c,"featureCollection"),e.featureCollection=c,s(h,"multiLineString"),e.multiLineString=h,s(d,"multiPoint"),e.multiPoint=d,s(p,"multiPolygon"),e.multiPolygon=p,s(f,"geometryCollection"),e.geometryCollection=f,s(v,"round"),e.round=v,s(y,"radiansToLength"),e.radiansToLength=y,s(m,"lengthToRadians"),e.lengthToRadians=m,s(w,"lengthToDegrees"),e.lengthToDegrees=w,s(b,"bearingToAzimuth"),e.bearingToAzimuth=b,s(_,"radiansToDegrees"),e.radiansToDegrees=_,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(I,"convertArea"),e.convertArea=I,s(S,"isNumber"),e.isNumber=S,s(O,"isObject"),e.isObject=O,s(k,"validateBBox"),e.validateBBox=k,s(E,"validateId"),e.validateId=E})),mh=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0});var t=fh();function n(e,t,r){if(null!==e)for(var i,o,s,a,l,u,c,h,d=0,p=0,f=e.type,g="FeatureCollection"===f,v="Feature"===f,y=g?e.features.length:1,m=0;m<y;m++){l=(h=!!(c=g?e.features[m].geometry:v?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var w=0;w<l;w++){var b=0,_=0;if(null!==(a=h?c.geometries[w]:c)){u=a.coordinates;var M=a.type;switch(d=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,b,_))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,b,_))return!1;p++,"MultiPoint"===M&&b++}"LineString"===M&&b++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-d;o++){if(!1===t(u[i][o],p,m,b,_))return!1;p++}"MultiLineString"===M&&b++,"Polygon"===M&&_++}"Polygon"===M&&b++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(_=0,o=0;o<u[i].length;o++){for(s=0;s<u[i][o].length-d;s++){if(!1===t(u[i][o][s],p,m,b,_))return!1;p++}_++}b++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===n(a.geometries[i],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(e,t,r,i){var o=r;return n(e,(function(e,n,i,s,a){o=0===n&&void 0===r?e:t(o,e,n,i,s,a)}),i),o}function i(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function o(e,t,n){var r=n;return i(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function l(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function u(e){var t=[];return n(e,(function(e){t.push(e)})),t}function c(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function h(e,t,n){var r=n;return c(e,(function(e,i,o,s,a){r=0===i&&void 0===n?e:t(r,e,i,o,s,a)})),r}function d(e,n){c(e,(function(e,r,i,o,s){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==n(t.feature(e,i,{bbox:o,id:s}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:a,coordinates:e.coordinates[u]};if(!1===n(t.feature(c,i),r,u))return!1}}))}function p(e,t,n){var r=n;return d(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r}function f(e,r){d(e,(function(e,i,o){var s=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,u=0,c=0,h=0;if(!1===n(e,(function(n,a,d,p,f){if(void 0===l||i>u||p>c||f>h)return l=n,u=i,c=p,h=f,void(s=0);var g=t.lineString([l,n],e.properties);if(!1===r(g,i,o,f,s))return!1;s++,l=n})))return!1}}}))}function v(e,t,n){var r=n,i=!1;return f(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function y(e,n){if(!e)throw new Error("geojson is required");d(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,s=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===n(t.lineString(s[a],e.properties),r,i,a))return!1}}}))}function m(e,t,n){var r=n;return y(e,(function(e,i,o,s){r=0===i&&void 0===n?e:t(r,e,i,o,s)})),r}function w(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.segmentIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),t.lineString([u[a],u[a+1]],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a-1),t.lineString([u[s][a],u[s][a+1]],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),t.lineString([u[o][a],u[o][a+1]],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a-1),t.lineString([u[o][s][a],u[o][s][a+1]],l,n)}throw new Error("geojson is invalid")}function b(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.coordIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return t.point(u,l,n);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,n);case"LineString":return a<0&&(a=u.length+a),t.point(u[a],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a),t.point(u[s][a],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),t.point(u[o][a],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a),t.point(u[o][s][a],l,n)}throw new Error("geojson is invalid")}s(n,"coordEach"),s(r,"coordReduce"),s(i,"propEach"),s(o,"propReduce"),s(a,"featureEach"),s(l,"featureReduce"),s(u,"coordAll"),s(c,"geomEach"),s(h,"geomReduce"),s(d,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(v,"segmentReduce"),s(y,"lineEach"),s(m,"lineReduce"),s(w,"findSegment"),s(b,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=a,e.featureReduce=l,e.findPoint=b,e.findSegment=w,e.flattenEach=d,e.flattenReduce=p,e.geomEach=c,e.geomReduce=h,e.lineEach=y,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=v})),Ib=q((e=>{"use strict";g(),Object.defineProperty(e,"__esModule",{value:!0});var t=mh();function n(e){var n=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]<e[0]&&(n[2]=e[0]),n[3]<e[1]&&(n[3]=e[1])})),n}s(n,"bbox"),n.default=n,e.default=n})),Fb=q(((e,t)=>{g();var n=wb(),r=fh(),i=mh(),o=Ib().default,a=i.featureEach,l=(i.coordEach,r.polygon,r.featureCollection);function u(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})):a(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})),n.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=o(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=o(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}s(u,"geojsonRbush"),t.exports=u,t.exports.default=u})),Uh={};function Dh(e,t){return!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,e}function h0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&U(7),di(e,t,[ci],(function(e){return Wn(bo(e.data[0],e.data[1]))}),0,n)}function bo(e,t){return kr(e,t||{},0,0)}function zh(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&U(7),di(e,t,[li],(function(e){return Wn(fi(e.data[0],Ch(e.data[1])))}),1,n)}function fi(e,t){return vo(e,t)}function dO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&U(7),di(e,t,[ci,s0,function(){return[Th]}],(function(e){return Wn(Th(e.data[0],e.data[1]))}),2,n)}function Th(e,t){t||(t={});var n=ui(),r=e.length;n.p(e);var i=kr(e,t,Fh(t),8),o=i.length;return jh(i,t),oe(i,o-8,n.d()),oe(i,o-4,r),i}function g0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&U(7),di(e,t,[li,u0,function(){return[Hu]}],(function(e){return Wn(Hu(e.data[0]))}),3,n)}function Hu(e,t){return vo(e.subarray(Lh(e),-8),t||new J(d0(e)))}function fO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&U(7),di(e,t,[ci,l0,function(){return[Oh]}],(function(e){return Wn(Oh(e.data[0],e.data[1]))}),4,n)}function Oh(e,t){t||(t={});var n=Ah();n.p(e);var r=kr(e,t,2,4);return Nh(r,t),oe(r,r.length-4,n.d()),r}function y0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&U(7),di(e,t,[li,c0,function(){return[Ku]}],(function(e){return Wn(Ku(e.data[0],Ch(e.data[1])))}),5,n)}function Ku(e,t){return vo((p0(e),e.subarray(2,-4)),t)}function mO(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&U(7),31==e[0]&&139==e[1]&&8==e[2]?g0(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?zh(e,t,n):y0(e,t,n)}function gO(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Hu(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?fi(e,t):Ku(e,t)}function Yn(e,t){if(t){for(var n=new J(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if($b)return $b.encode(e);var i=e.length,o=new J(e.length+(e.length>>1)),a=0,l=s((function(e){o[a++]=e}),"w");for(r=0;r<i;++r){if(a+5>o.length){var u=new J(a+8+(i-r<<1));u.set(o),o=u}var c=e.charCodeAt(r);c<128||t?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++r))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return Tt(o,0,a)}function Vh(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Sh)return Sh.decode(e);var i=k0(e),o=i[0];return i[1].length&&U(8),o}function _O(e,t,n){n||(n=t,t={}),"function"!=typeof n&&U(7);var r={};Bh(e,"",r,t);var i=Object.keys(r),o=i.length,a=0,l=0,u=o,c=new Array(o),h=[],d=s((function(){for(var e=0;e<h.length;++e)h[e]()}),"tAll"),p=s((function(e,t){Ju((function(){n(e,t)}))}),"cbd");Ju((function(){p=n}));var f=s((function(){var e=new J(l+22),t=a,n=l-a;l=0;for(var r=0;r<u;++r){var i=c[r];try{var o=i.c.length;ii(e,l,i,i.f,i.u,o);var s=30+i.f.length+Gn(i.extra),h=l+s;e.set(i.c,h),ii(e,a,i,i.f,i.u,o,l,i.m),a+=16+s+(i.m?i.m.length:0),l=h+o}catch(e){return p(e,null)}}qh(e,a,c.length,n,t),p(null,e)}),"cbf");o||f();for(var g=s((function(e){var t=i[e],n=r[t],u=n[0],g=n[1],v=ui(),y=u.length;v.p(u);var m=Yn(t),w=m.length,b=g.comment,_=b&&Yn(b),M=_&&_.length,x=Gn(g.extra),I=0==g.level?0:8,S=s((function(n,r){if(n)d(),p(n,null);else{var i=r.length;c[e]=yo(g,{size:y,crc:v.d(),c:r,f:m,m:_,u:w!=t.length||_&&b.length!=M,compression:I}),a+=30+w+x+i,l+=76+2*(w+x)+(M||0)+i,--o||f()}}),"cbl");if(w>65535&&S(U(11,0,1),null),I)if(y<16e4)try{S(null,bo(u,g))}catch(e){S(e,null)}else h.push(h0(u,g,S));else S(null,u)}),"_loop_1"),v=0;v<u;++v)g(v);return d}function MO(e,t){t||(t={});var n={},r=[];Bh(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],u=a[1],c=0==u.level?0:8,h=(x=Yn(s)).length,d=u.comment,p=d&&Yn(d),f=p&&p.length,g=Gn(u.extra);h>65535&&U(11);var v=c?bo(l,u):l,y=v.length,m=ui();m.p(l),r.push(yo(u,{size:l.length,crc:m.d(),c:v,f:x,m:p,u:h!=s.length||p&&d.length!=f,o:i,compression:c})),i+=30+h+g+y,o+=76+2*(h+g)+(f||0)+y}for(var w=new J(o+22),b=i,_=o-i,M=0;M<r.length;++M){var x=r[M];ii(w,x.o,x,x.f,x.u,x.c.length);var I=30+x.f.length+Gn(x.extra);w.set(x.c,x.o+I),ii(w,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+I+(x.m?x.m.length:0)}return qh(w,i,r.length,_,b),w}function PO(e,t,n){n||(n=t,t={}),"function"!=typeof n&&U(7);var r=[],i=s((function(){for(var e=0;e<r.length;++e)r[e]()}),"tAll"),o={},a=s((function(e,t){Ju((function(){n(e,t)}))}),"cbd");Ju((function(){a=n}));for(var l=e.length-22;101010256!=Le(e,l);--l)if(!l||e.length-l>65558)return a(U(13,0,1),null),i;var u=at(e,l+8);if(u){var c=u,h=Le(e,l+16),d=4294967295==h;if(d){if(l=Le(e,l-12),101075792!=Le(e,l))return a(U(13,0,1),null),i;c=u=Le(e,l+32),h=Le(e,l+48)}for(var p=t&&t.filter,f=s((function(t){var n=x0(e,h,d),l=n[0],c=n[1],f=n[2],g=n[3],v=n[4],y=n[5],m=M0(e,y);h=v;var w=s((function(e,t){e?(i(),a(e,null)):(t&&(o[g]=t),--u||a(null,o))}),"cbl");if(!p||p({name:g,size:c,originalSize:f,compression:l}))if(l)if(8==l){var b=e.subarray(m,m+c);if(c<32e4)try{w(null,fi(b,new J(f)))}catch(e){w(e,null)}else r.push(zh(b,{size:f},w))}else w(U(14,"unknown compression type "+l,1),null);else w(null,Tt(e,m,m+c));else w(null,null)}),"_loop_3"),g=0;g<c;++g)f(g)}else a(null,{});return i}function OO(e,t){for(var n={},r=e.length-22;101010256!=Le(e,r);--r)(!r||e.length-r>65558)&&U(13);var i=at(e,r+8);if(!i)return{};var o=Le(e,r+16),s=4294967295==o;s&&(r=Le(e,r-12),101075792!=Le(e,r)&&U(13),i=Le(e,r+32),o=Le(e,r+48));for(var a=t&&t.filter,l=0;l<i;++l){var u=x0(e,o,s),c=u[0],h=u[1],d=u[2],p=u[3],f=u[4],g=u[5],v=M0(e,g);o=f,(!a||a({name:p,size:h,originalSize:d,compression:c}))&&(c?8==c?n[p]=fi(e.subarray(v,v+h),new J(d)):U(14,"unknown compression type "+c):n[p]=Tt(e,v,v+h))}return n}Aw(Uh,{AsyncCompress:()=>cO,AsyncDecompress:()=>hO,AsyncDeflate:()=>f0,AsyncGunzip:()=>m0,AsyncGzip:()=>cO,AsyncInflate:()=>Rh,AsyncUnzipInflate:()=>EO,AsyncUnzlib:()=>v0,AsyncZipDeflate:()=>wO,AsyncZlib:()=>pO,Compress:()=>Eh,DecodeUTF8:()=>vO,Decompress:()=>b0,Deflate:()=>on,EncodeUTF8:()=>yO,FlateErrorCode:()=>uO,Gunzip:()=>$u,Gzip:()=>Eh,Inflate:()=>lt,Unzip:()=>TO,UnzipInflate:()=>xO,UnzipPassThrough:()=>T0,Unzlib:()=>Xu,Zip:()=>kO,ZipDeflate:()=>bO,ZipPassThrough:()=>mo,Zlib:()=>Ph,compress:()=>dO,compressSync:()=>Th,decompress:()=>mO,decompressSync:()=>gO,deflate:()=>h0,deflateSync:()=>bo,gunzip:()=>g0,gunzipSync:()=>Hu,gzip:()=>dO,gzipSync:()=>Th,inflate:()=>zh,inflateSync:()=>fi,strFromU8:()=>Vh,strToU8:()=>Yn,unzip:()=>PO,unzipSync:()=>OO,unzlib:()=>y0,unzlibSync:()=>Ku,zip:()=>_O,zipSync:()=>MO,zlib:()=>fO,zlibSync:()=>Oh});var Yb,sO,J,Xe,ai,oi,si,fo,Hb,Xb,Ih,Gu,Kb,Jb,_h,ho,wn,Et,_n,ri,ae,Zb,Qb,e0,t0,Vu,xt,qu,go,Tt,uO,n0,U,vo,an,ti,Uu,Yu,Mh,ni,Wu,xh,r0,kn,i0,a0,ui,Ah,kr,yo,Wb,Bu,lO,o0,li,ci,s0,u0,l0,c0,Wn,Ch,di,Pt,pi,at,Le,kh,oe,jh,Lh,d0,Fh,Nh,p0,on,f0,lt,Rh,Eh,cO,$u,m0,Ph,pO,Xu,v0,b0,hO,Bh,$b,Sh,w0,k0,vO,yO,_0,M0,x0,E0,Gn,ii,qh,mo,bO,wO,kO,T0,xO,EO,TO,Ju,Gh=Pm((()=>{for(g(),Yb={},sO=s((function(e,t,n,r,i){var o=new Worker(Yb[t]||(Yb[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}),"wk"),J=Uint8Array,Xe=Uint16Array,ai=Uint32Array,oi=new J([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]),si=new J([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]),fo=new J([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hb=s((function(e,t){for(var n=new Xe(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new ai(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]}),"freb"),Xb=Hb(oi,2),Ih=Xb[0],Gu=Xb[1],Ih[28]=258,Gu[258]=28,Kb=Hb(si,0),Jb=Kb[0],_h=Kb[1],ho=new Xe(32768),ae=0;ae<32768;++ae)wn=(61680&(wn=(52428&(wn=(43690&ae)>>>1|(21845&ae)<<1))>>>2|(13107&wn)<<2))>>>4|(3855&wn)<<4,ho[ae]=((65280&wn)>>>8|(255&wn)<<8)>>>1;for(Et=s((function(e,t,n){for(var r=e.length,i=0,o=new Xe(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new Xe(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new Xe(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)s[ho[h]>>>l]=u}else for(s=new Xe(r),i=0;i<r;++i)e[i]&&(s[i]=ho[a[e[i]-1]++]>>>15-e[i]);return s}),"hMap"),_n=new J(288),ae=0;ae<144;++ae)_n[ae]=8;for(ae=144;ae<256;++ae)_n[ae]=9;for(ae=256;ae<280;++ae)_n[ae]=7;for(ae=280;ae<288;++ae)_n[ae]=8;for(ri=new J(32),ae=0;ae<32;++ae)ri[ae]=5;Zb=Et(_n,9,0),Qb=Et(_n,9,1),e0=Et(ri,5,0),t0=Et(ri,5,1),Vu=s((function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t}),"max"),xt=s((function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n}),"bits"),qu=s((function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)}),"bits16"),go=s((function(e){return(e+7)/8|0}),"shft"),Tt=s((function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?Xe:4==e.BYTES_PER_ELEMENT?ai:J)(n-t);return r.set(e.subarray(t,n)),r}),"slc"),uO={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},n0=["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"],U=s((function(e,t,n){var r=new Error(t||n0[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,U),!n)throw r;return r}),"err"),vo=s((function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new J(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new J(3*r));var a=s((function(e){var n=t.length;if(e>n){var r=new J(Math.max(2*n,e));r.set(t),t=r}}),"cbuf"),l=n.f||0,u=n.p||0,c=n.b||0,h=n.l,d=n.d,p=n.m,f=n.n,g=8*r;do{if(!h){l=xt(e,u,1);var v=xt(e,u+1,3);if(u+=3,!v){var y=e[(E=go(u)+4)-4]|e[E-3]<<8,m=E+y;if(m>r){o&&U(0);break}i&&a(c+y),t.set(e.subarray(E,m),c),n.b=c+=y,n.p=u=8*m,n.f=l;continue}if(1==v)h=Qb,d=t0,p=9,f=5;else if(2==v){var w=xt(e,u,31)+257,b=xt(e,u+10,15)+4,_=w+xt(e,u+5,31)+1;u+=14;for(var M=new J(_),x=new J(19),I=0;I<b;++I)x[fo[I]]=xt(e,u+3*I,7);u+=3*b;var S=Vu(x),O=(1<<S)-1,k=Et(x,S,1);for(I=0;I<_;){var E,P=k[xt(e,u,O)];if(u+=15&P,(E=P>>>4)<16)M[I++]=E;else{var A=0,C=0;for(16==E?(C=3+xt(e,u,3),u+=2,A=M[I-1]):17==E?(C=3+xt(e,u,7),u+=3):18==E&&(C=11+xt(e,u,127),u+=7);C--;)M[I++]=A}}var j=M.subarray(0,w),T=M.subarray(w);p=Vu(j),f=Vu(T),h=Et(j,p,1),d=Et(T,f,1)}else U(1);if(u>g){o&&U(0);break}}i&&a(c+131072);for(var F=(1<<p)-1,N=(1<<f)-1,R=u;;R=u){var L=(A=h[qu(e,u)&F])>>>4;if((u+=15&A)>g){o&&U(0);break}if(A||U(2),L<256)t[c++]=L;else{if(256==L){R=u,h=null;break}var D=L-254;if(L>264){var B=oi[I=L-257];D=xt(e,u,(1<<B)-1)+Ih[I],u+=B}var z=d[qu(e,u)&N],V=z>>>4;z||U(3),u+=15&z;T=Jb[V];if(V>3){B=si[V];T+=qu(e,u)&(1<<B)-1,u+=B}if(u>g){o&&U(0);break}i&&a(c+131072);for(var q=c+D;c<q;c+=4)t[c]=t[c-T],t[c+1]=t[c+1-T],t[c+2]=t[c+2-T],t[c+3]=t[c+3-T];c=q}}n.l=h,n.p=R,n.b=c,n.f=l,h&&(l=1,n.m=p,n.d=d,n.n=f)}while(!l);return c==t.length?t:Tt(t,0,c)}),"inflt"),an=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8}),"wbits"),ti=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16}),"wbits16"),Uu=s((function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[kn,0];if(1==i){var s=new J(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[h].f?u++:h++],l=n[u!=c&&n[u].f<n[h].f?u++:h++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new Xe(d+1),f=Yu(n[c-1],p,0);if(f>t){r=0;var g=0,v=f-t,y=1<<v;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var m=o[r].s;if(!(p[m]>t))break;g+=y-(1<<f-p[m]),p[m]=t}for(g>>>=v;g>0;){var w=o[r].s;p[w]<t?g-=1<<t-p[w]++-1:++r}for(;r>=0&&g;--r){var b=o[r].s;p[b]==t&&(--p[b],++g)}f=t}return[new J(p),f]}),"hTree"),Yu=s((function(e,t,n){return-1==e.s?Math.max(Yu(e.l,t,n+1),Yu(e.r,t,n+1)):t[e.s]=n}),"ln"),Mh=s((function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Xe(++t),r=0,i=e[0],o=1,a=s((function(e){n[r++]=e}),"w"),l=1;l<=t;++l)if(e[l]==i&&l!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[l]}return[n.subarray(0,r),t]}),"lc"),ni=s((function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n}),"clen"),Wu=s((function(e,t,n){var r=n.length,i=go(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)}),"wfblk"),xh=s((function(e,t,n,r,i,o,s,a,l,u,c){an(t,c++,n),++i[256];for(var h=Uu(i,15),d=h[0],p=h[1],f=Uu(o,15),g=f[0],v=f[1],y=Mh(d),m=y[0],w=y[1],b=Mh(g),_=b[0],M=b[1],x=new Xe(19),I=0;I<m.length;++I)x[31&m[I]]++;for(I=0;I<_.length;++I)x[31&_[I]]++;for(var S=Uu(x,7),O=S[0],k=S[1],E=19;E>4&&!O[fo[E-1]];--E);var P,A,C,j,T=u+5<<3,F=ni(i,_n)+ni(o,ri)+s,N=ni(i,d)+ni(o,g)+s+14+3*E+ni(x,O)+(2*x[16]+3*x[17]+7*x[18]);if(T<=F&&T<=N)return Wu(t,c,e.subarray(l,l+u));if(an(t,c,1+(N<F)),c+=2,N<F){P=Et(d,p,0),A=d,C=Et(g,v,0),j=g;var R=Et(O,k,0);an(t,c,w-257),an(t,c+5,M-1),an(t,c+10,E-4),c+=14;for(I=0;I<E;++I)an(t,c+3*I,O[fo[I]]);c+=3*E;for(var L=[m,_],D=0;D<2;++D){var B=L[D];for(I=0;I<B.length;++I){var U=31&B[I];an(t,c,R[U]),c+=O[U],U>15&&(an(t,c,B[I]>>>5&127),c+=B[I]>>>12)}}}else P=Zb,A=_n,C=e0,j=ri;for(I=0;I<a;++I)if(r[I]>255){U=r[I]>>>18&31;ti(t,c,P[U+257]),c+=A[U+257],U>7&&(an(t,c,r[I]>>>23&31),c+=oi[U]);var z=31&r[I];ti(t,c,C[z]),c+=j[z],z>3&&(ti(t,c,r[I]>>>5&8191),c+=si[z])}else ti(t,c,P[r[I]]),c+=A[r[I]];return ti(t,c,P[256]),c+A[256]}),"wblk"),r0=new ai([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),kn=new J(0),i0=s((function(e,t,n,r,i,o){var a=e.length,l=new J(r+a+5*(1+Math.ceil(a/7e3))+i),u=l.subarray(r,l.length-i),c=0;if(!t||a<8)for(var h=0;h<=a;h+=65535){var d=h+65535;d>=a&&(u[c>>3]=o),c=Wu(u,c+1,e.subarray(h,d))}else{for(var p=r0[t-1],f=p>>>13,g=8191&p,v=(1<<n)-1,y=new Xe(32768),m=new Xe(v+1),w=Math.ceil(n/3),b=2*w,_=s((function(t){return(e[t]^e[t+1]<<w^e[t+2]<<b)&v}),"hsh"),M=new ai(25e3),x=new Xe(288),I=new Xe(32),S=0,O=0,k=(h=0,0),E=0,P=0;h<a;++h){var A=_(h),C=32767&h,j=m[A];if(y[C]=j,m[A]=C,E<=h){var T=a-h;if((S>7e3||k>24576)&&T>423){c=xh(e,u,0,M,x,I,O,k,P,h-P,c),k=S=O=0,P=h;for(var F=0;F<286;++F)x[F]=0;for(F=0;F<30;++F)I[F]=0}var N=2,R=0,L=g,D=C-j&32767;if(T>2&&A==_(h-D))for(var B=Math.min(f,T)-1,U=Math.min(32767,h),z=Math.min(258,T);D<=U&&--L&&C!=j;){if(e[h+N]==e[h+N-D]){for(var V=0;V<z&&e[h+V]==e[h+V-D];++V);if(V>N){if(N=V,R=D,V>B)break;var q=Math.min(D,V-2),W=0;for(F=0;F<q;++F){var G=h-D+F+32768&32767,X=G-y[G]+32768&32767;X>W&&(W=X,j=G)}}}D+=(C=j)-(j=y[C])+32768&32767}if(R){M[k++]=268435456|Gu[N]<<18|_h[R];var Y=31&Gu[N],K=31&_h[R];O+=oi[Y]+si[K],++x[257+Y],++I[K],E=h+N,++S}else M[k++]=e[h],++x[e[h]]}}c=xh(e,u,o,M,x,I,O,k,P,h-P,c),!o&&7&c&&(c=Wu(u,c+1,kn))}return Tt(l,0,r+go(c)+i)}),"dflt"),a0=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),ui=s((function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=a0[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}),"crc"),Ah=s((function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),kr=s((function(e,t,n,r,i){return i0(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)}),"dopt"),yo=s((function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}),"mrg"),Wb=s((function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var h in t+=u,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=u}else n[l]=a}return[t,n]}),"wcln"),Bu=[],lO=s((function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}),"cbfs"),o0=s((function(e,t,n,r){var i;if(!Bu[n]){for(var o="",s={},a=e.length-1,l=0;l<a;++l)o=(i=Wb(e[l],o,s))[0],s=i[1];Bu[n]=Wb(e[a],o,s)}var u=yo({},Bu[n][1]);return sO(Bu[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,lO(u),r)}),"wrkr"),li=s((function(){return[J,Xe,ai,oi,si,fo,Ih,Jb,Qb,t0,ho,n0,Et,Vu,xt,qu,go,Tt,U,vo,fi,Wn,Ch]}),"bInflt"),ci=s((function(){return[J,Xe,ai,oi,si,fo,Gu,_h,Zb,_n,e0,ri,ho,r0,kn,Et,an,ti,Uu,Yu,Mh,ni,Wu,xh,go,Tt,i0,kr,bo,Wn]}),"bDflt"),s0=s((function(){return[jh,Fh,oe,ui,a0]}),"gze"),u0=s((function(){return[Lh,d0]}),"guze"),l0=s((function(){return[Nh,oe,Ah]}),"zle"),c0=s((function(){return[p0]}),"zule"),Wn=s((function(e){return postMessage(e,[e.buffer])}),"pbf"),Ch=s((function(e){return e&&e.size&&new J(e.size)}),"gu8"),di=s((function(e,t,n,r,i,o){var s=o0(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}}),"cbify"),Pt=s((function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}}),"astrm"),pi=s((function(e,t,n,r,i){var o,s=o0(e,r,i,(function(e,n){e?(s.terminate(),t.ondata.call(t,e)):(n[1]&&s.terminate(),t.ondata.call(t,e,n[0],n[1]))}));s.postMessage(n),t.push=function(e,n){t.ondata||U(5),o&&t.ondata(U(4,0,1),null,!!n),s.postMessage([e,o=n],[e.buffer])},t.terminate=function(){s.terminate()}}),"astrmify"),at=s((function(e,t){return e[t]|e[t+1]<<8}),"b2"),Le=s((function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}),"b4"),kh=s((function(e,t){return Le(e,t)+4294967296*Le(e,t+4)}),"b8"),oe=s((function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}),"wbytes"),jh=s((function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&oe(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}),"gzh"),Lh=s((function(e){(31!=e[0]||139!=e[1]||8!=e[2])&&U(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)}),"gzs"),d0=s((function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}),"gzl"),Fh=s((function(e){return 10+(e.filename&&e.filename.length+1||0)}),"gzhl"),Nh=s((function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}),"zlh"),p0=s((function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&U(6,"invalid zlib data"),32&e[1]&&U(6,"invalid zlib data: preset dictionaries not supported")}),"zlv"),s(Dh,"AsyncCmpStrm"),on=function(){function e(e,t){!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{}}return s(e,"Deflate"),e.prototype.p=function(e,t){this.ondata(kr(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){this.ondata||U(5),this.d&&U(4),this.d=t,this.p(e,t||!1)},e}(),f0=function(){function e(e,t){pi([ci,function(){return[Pt,on]}],this,Dh.call(this,e,t),(function(e){var t=new on(e.data);onmessage=Pt(t)}),6)}return s(e,"AsyncDeflate"),e}(),s(h0,"deflate"),s(bo,"deflateSync"),lt=function(){function e(e){this.s={},this.p=new J(0),this.ondata=e}return s(e,"Inflate"),e.prototype.e=function(e){this.ondata||U(5),this.d&&U(4);var t=this.p.length,n=new J(t+e.length);n.set(this.p),n.set(e,t),this.p=n},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=vo(this.p,this.o,this.s);this.ondata(Tt(n,t,this.s.b),this.d),this.o=Tt(n,this.s.b-32768),this.s.b=this.o.length,this.p=Tt(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),Rh=function(){function e(e){this.ondata=e,pi([li,function(){return[Pt,lt]}],this,0,(function(){var e=new lt;onmessage=Pt(e)}),7)}return s(e,"AsyncInflate"),e}(),s(zh,"inflate"),s(fi,"inflateSync"),Eh=function(){function e(e,t){this.c=ui(),this.l=0,this.v=1,on.call(this,e,t)}return s(e,"Gzip"),e.prototype.push=function(e,t){on.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=kr(e,this.o,this.v&&Fh(this.o),t&&8,!t);this.v&&(jh(n,this.o),this.v=0),t&&(oe(n,n.length-8,this.c.d()),oe(n,n.length-4,this.l)),this.ondata(n,t)},e}(),cO=function(){function e(e,t){pi([ci,s0,function(){return[Pt,on,Eh]}],this,Dh.call(this,e,t),(function(e){var t=new Eh(e.data);onmessage=Pt(t)}),8)}return s(e,"AsyncGzip"),e}(),s(dO,"gzip"),s(Th,"gzipSync"),$u=function(){function e(e){this.v=1,lt.call(this,e)}return s(e,"Gunzip"),e.prototype.push=function(e,t){if(lt.prototype.e.call(this,e),this.v){var n=this.p.length>3?Lh(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}t&&(this.p.length<8&&U(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),lt.prototype.c.call(this,t)},e}(),m0=function(){function e(e){this.ondata=e,pi([li,u0,function(){return[Pt,lt,$u]}],this,0,(function(){var e=new $u;onmessage=Pt(e)}),9)}return s(e,"AsyncGunzip"),e}(),s(g0,"gunzip"),s(Hu,"gunzipSync"),Ph=function(){function e(e,t){this.c=Ah(),this.v=1,on.call(this,e,t)}return s(e,"Zlib"),e.prototype.push=function(e,t){on.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=kr(e,this.o,this.v&&2,t&&4,!t);this.v&&(Nh(n,this.o),this.v=0),t&&oe(n,n.length-4,this.c.d()),this.ondata(n,t)},e}(),pO=function(){function e(e,t){pi([ci,l0,function(){return[Pt,on,Ph]}],this,Dh.call(this,e,t),(function(e){var t=new Ph(e.data);onmessage=Pt(t)}),10)}return s(e,"AsyncZlib"),e}(),s(fO,"zlib"),s(Oh,"zlibSync"),Xu=function(){function e(e){this.v=1,lt.call(this,e)}return s(e,"Unzlib"),e.prototype.push=function(e,t){if(lt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&U(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),lt.prototype.c.call(this,t)},e}(),v0=function(){function e(e){this.ondata=e,pi([li,c0,function(){return[Pt,lt,Xu]}],this,0,(function(){var e=new Xu;onmessage=Pt(e)}),11)}return s(e,"AsyncUnzlib"),e}(),s(y0,"unzlib"),s(Ku,"unzlibSync"),b0=function(){function e(e){this.G=$u,this.I=lt,this.Z=Xu,this.ondata=e}return s(e,"Decompress"),e.prototype.push=function(e,t){if(this.ondata||U(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new J(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var r=this,i=s((function(){r.ondata.apply(r,arguments)}),"cb");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,t),this.p=null}}},e}(),hO=function(){function e(e){this.G=m0,this.I=Rh,this.Z=v0,this.ondata=e}return s(e,"AsyncDecompress"),e.prototype.push=function(e,t){b0.prototype.push.call(this,e,t)},e}(),s(mO,"decompress"),s(gO,"decompressSync"),Bh=s((function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=yo(r,o[1]),o=o[0]),o instanceof J?n[s]=[o,a]:(n[s+="/"]=[new J(0),a],Bh(o,s,n,r))}}),"fltn"),$b=typeof TextEncoder<"u"&&new TextEncoder,Sh=typeof TextDecoder<"u"&&new TextDecoder,w0=0;try{Sh.decode(kn,{stream:!0}),w0=1}catch{}k0=s((function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Tt(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}),"dutf8"),vO=function(){function e(e){this.ondata=e,w0?this.t=new TextDecoder:this.p=kn}return s(e,"DecodeUTF8"),e.prototype.push=function(e,t){if(this.ondata||U(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&U(8),this.t=null));this.p||U(4);var n=new J(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=k0(n),i=r[0],o=r[1];t?(o.length&&U(8),this.p=null):this.p=o,this.ondata(i,t)},e}(),yO=function(){function e(e){this.ondata=e}return s(e,"EncodeUTF8"),e.prototype.push=function(e,t){this.ondata||U(5),this.d&&U(4),this.ondata(Yn(e),this.d=t||!1)},e}(),s(Yn,"strToU8"),s(Vh,"strFromU8"),_0=s((function(e){return 1==e?3:e<6?2:9==e?1:0}),"dbf"),M0=s((function(e,t){return t+30+at(e,t+26)+at(e,t+28)}),"slzh"),x0=s((function(e,t,n){var r=at(e,t+28),i=Vh(e.subarray(t+46,t+46+r),!(2048&at(e,t+8))),o=t+46+r,s=Le(e,t+20),a=n&&4294967295==s?E0(e,o):[s,Le(e,t+24),Le(e,t+42)],l=a[0],u=a[1],c=a[2];return[at(e,t+10),l,u,i,o+at(e,t+30)+at(e,t+32),c]}),"zh"),E0=s((function(e,t){for(;1!=at(e,t);t+=4+at(e,t+2));return[kh(e,t+12),kh(e,t+4),kh(e,t+20)]}),"z64e"),Gn=s((function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&U(9),t+=r+4}return t}),"exfl"),ii=s((function(e,t,n,r,i,o,s,a){var l=r.length,u=n.extra,c=a&&a.length,h=Gn(u);oe(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(null==o&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&U(10),oe(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=o&&(oe(e,t,n.crc),oe(e,t+4,o),oe(e,t+8,n.size)),oe(e,t+12,l),oe(e,t+14,h),t+=16,null!=s&&(oe(e,t,c),oe(e,t+6,n.attrs),oe(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var f in u){var g=u[f],v=g.length;oe(e,t,+f),oe(e,t+2,v),e.set(g,t+4),t+=4+v}return c&&(e.set(a,t),t+=c),t}),"wzh"),qh=s((function(e,t,n,r,i){oe(e,t,101010256),oe(e,t+8,n),oe(e,t+10,n),oe(e,t+12,r),oe(e,t+16,i)}),"wzf"),mo=function(){function e(e){this.filename=e,this.c=ui(),this.size=0,this.compression=0}return s(e,"ZipPassThrough"),e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||U(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),bO=function(){function e(e,t){var n=this;t||(t={}),mo.call(this,e),this.d=new on(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=_0(t.level)}return s(e,"ZipDeflate"),e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){mo.prototype.push.call(this,e,t)},e}(),wO=function(){function e(e,t){var n=this;t||(t={}),mo.call(this,e),this.d=new f0(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=_0(t.level),this.terminate=this.d.terminate}return s(e,"AsyncZipDeflate"),e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){mo.prototype.push.call(this,e,t)},e}(),kO=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return s(e,"Zip"),e.prototype.add=function(e){var t=this;if(this.ondata||U(5),2&this.d)this.ondata(U(4+8*(1&this.d),0,1),null,!1);else{var n=Yn(e.filename),r=n.length,i=e.comment,o=i&&Yn(i),a=r!=e.filename.length||o&&i.length!=o.length,l=r+Gn(e.extra)+30;r>65535&&this.ondata(U(11,0,1),null,!1);var u=new J(l);ii(u,0,e,n,a);var c=[u],h=s((function(){for(var e=0,n=c;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}c=[]}),"pAll_1"),d=this.d;this.d=0;var p=this.u.length,f=yo(e,{f:n,u:a,o:o,t:function(){e.terminate&&e.terminate()},r:function(){if(h(),d){var e=t.u[p+1];e?e.r():t.d=1}d=1}}),g=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(g+=r.length,c.push(r),i){var o=new J(16);oe(o,0,134695760),oe(o,4,e.crc),oe(o,8,g),oe(o,12,e.size),c.push(o),f.c=g,f.b=l+g+16,f.crc=e.crc,f.size=e.size,d&&f.r(),d=1}else d&&h()},this.u.push(f)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(U(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+Gn(l.extra)+(l.o?l.o.length:0)}for(var o=new J(n+22),s=0,a=this.u;s<a.length;s++){var l=a[s];ii(o,e,l,l.f,l.u,l.c,t,l.o),e+=46+l.f.length+Gn(l.extra)+(l.o?l.o.length:0),t+=l.b}qh(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}(),s(_O,"zip"),s(MO,"zipSync"),T0=function(){function e(){}return s(e,"UnzipPassThrough"),e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),xO=function(){function e(){var e=this;this.i=new lt((function(t,n){e.ondata(null,t,n)}))}return s(e,"UnzipInflate"),e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),EO=function(){function e(e,t){var n=this;t<32e4?this.i=new lt((function(e,t){n.ondata(null,e,t)})):(this.i=new Rh((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return s(e,"AsyncUnzipInflate"),e.prototype.push=function(e,t){this.i.terminate&&(e=Tt(e,0)),this.i.push(e,t)},e.compression=8,e}(),TO=function(){function e(e){this.onfile=e,this.k=[],this.o={0:T0},this.p=kn}return s(e,"Unzip"),e.prototype.push=function(e,t){var n=this;if(this.onfile||U(5),this.p||U(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(r)).length)return this.push(e,t)}else{var o=0,a=0,l=void 0,u=void 0;this.p.length?e.length?((u=new J(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var c=u.length,h=this.c,d=h&&this.d,p=s((function(){var e,t=Le(u,a);if(67324752==t){o=1,l=a,f.d=null,f.c=0;var r=at(u,a+6),i=at(u,a+8),s=2048&r,d=8&r,p=at(u,a+26),g=at(u,a+28);if(c>a+30+p+g){var v=[];f.k.unshift(v),o=2;var y=Le(u,a+18),m=Le(u,a+22),w=Vh(u.subarray(a+30,a+=30+p),!s);4294967295==y?(e=d?[-2]:E0(u,a),y=e[0],m=e[1]):d&&(y=-1),a+=g,f.c=y;var b,_={name:w,compression:i,start:function(){if(_.ondata||U(5),y){var e=n.o[i];e||_.ondata(U(14,"unknown compression type "+i,1),null,!1),(b=y<0?new e(w):new e(w,y,m)).ondata=function(e,t,n){_.ondata(e,t,n)};for(var t=0,r=v;t<r.length;t++){var o=r[t];b.push(o,!1)}n.k[0]==v&&n.c?n.d=b:b.push(kn,!0)}else _.ondata(null,kn,!0)},terminate:function(){b&&b.terminate&&b.terminate()}};y>=0&&(_.size=y,_.originalSize=m),f.onfile(_)}return"break"}if(h){if(134695760==t)return l=a+=12+(-2==h&&8),o=3,f.c=0,"break";if(33639248==t)return l=a-=4,o=3,f.c=0,"break"}}),"_loop_2"),f=this;a<c-4;++a){if("break"===p())break}if(this.p=kn,h<0){var g=o?u.subarray(0,l-12-(-2==h&&8)-(134695760==Le(u,l-16)&&4)):u.subarray(0,a);d?d.push(g,!!o):this.k[+(2==o)].push(g)}if(2&o)return this.push(u.subarray(a),t);this.p=u.subarray(a)}t&&(this.c&&U(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}(),Ju="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},s(PO,"unzip"),s(OO,"unzipSync")})),B0=q(((e,t)=>{"use strict";g(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),Y0=q(((e,t)=>{"use strict";g();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=a(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}s(o,"decodeComponents"),s(a,"decode"),s(l,"customDecodeURIComponent"),t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return l(e)}}})),$0=q(((e,t)=>{"use strict";g(),t.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),X0=q(((e,t)=>{"use strict";g(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}})),rw=q((e=>{"use strict";g();var t=B0(),n=Y0(),r=$0(),i=X0(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{let i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[",i,"]"].join("")]:[...n,[h(t,e),"[",h(i,e),"]=",h(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[]"].join("")]:[...n,[h(t,e),"[]=",h(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[h(n,e),t,h(i,e)].join("")]:[[r,h(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,h(t,e)]:[...n,[h(t,e),"=",h(r,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&d(n,e).includes(e.arrayFormatSeparator);n=o?d(n,e):n;let s=i||o?n.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===n?n:d(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&d(n,e));let o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>d(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function h(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(e):e}function p(e){return Array.isArray(e)?e.sort():"object"==typeof e?p(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){let t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function v(e){let t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function y(e){let t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function w(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let n=u(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:d(s,t),n(d(e,t),s,i)}for(let e of Object.keys(i)){let n=i[e];if("object"==typeof n&&null!==n)for(let e of Object.keys(n))n[e]=m(n[e],t);else i[e]=m(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=p(n):e[t]=n,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(h,"encode"),s(d,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(v,"getHash"),s(y,"extract"),s(m,"parseValue"),s(w,"parse"),e.extract=y,e.parse=w,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let n=s((n=>t.skipNull&&o(e[n])||t.skipEmptyString&&""===e[n]),"shouldFilter"),r=l(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{let i=e[n];return void 0===i?"":null===i?h(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?h(n,t)+"[]":i.reduce(r(n),[]).join("&"):h(n,t)+"="+h(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:w(y(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);let r=f(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query),l=e.stringify(s,n);l&&(l="?".concat(l));let u=v(t.url);return t.fragmentIdentifier&&(u="#".concat(n[a]?h(t.fragmentIdentifier,n):t.fragmentIdentifier)),"".concat(r).concat(l).concat(u)},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:l},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}));g();var Mw=qt(Om());g(),g(),g();var Ag=qt(Sg());g();var zl=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:s=0}){let a,l;if(y(this,"origin"),y(this,"destination"),y(this,"vortex"),y(this,"distance"),y(this,"angle"),y(this,"weight"),this.origin=e,this.destination=t,this.vortex=n,this.distance=i,this.angle=o,n)this.distance=0,this.angle=0,a=void 0!==n.weight&&n.weight>0?n.weight:"elevator"===n.type?2e3:1e3,l=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*l+a;else{let e=s||t.weight;a=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+a}if(isNaN(this.angle))throw new Error("nan angle")}};s(zl,"Edge");var Rl=zl,er=Rl;g();var Ig="mi-debug",dx={logState:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},R=dx;function px(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale||1);try{if(!e.georeference)throw new Error("map ".concat(e.name||e.shortName||e.id," does not have a georeference field"));if(e.georeference.length<3)throw new Error("map ".concat(e.name||e.shortName||e.id," has less than 3 georeference points, we require at least 3 for proper map scaling"));let t=e.georeference[0],n=e.georeference[2],r=(0,Ag.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:n.target.x,longitude:n.target.y}),i=t.control.x-n.control.x,o=t.control.y-n.control.y;return Math.sqrt(i*i+o*o)/r}catch(e){return R.error(e),1}}function Ds(e,t){let n=e.x-t.x,r=e.y-t.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}s(px,"getMapScale"),s(Ds,"getAngle");var ql=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){y(this,"edges"),y(this,"nodesById"),y(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:px(e)}))).reduce(((e,t)=>(e[t.id]=t,e)),{});let i=e.filter((e=>!!this.mapsById[e.map])).map((e=>({...e,paths:e.paths?e.paths.filter((({map:t})=>t===e.map)):[]})));this.nodesById=i.reduce(((e,t)=>(e[t.id]=t,e)),{});for(let e in this.nodesById)this.nodesById.hasOwnProperty(e)&&(this.nodesById[e].paths=this.nodesById[e].paths.filter((({node:e})=>!!this.nodesById[e])));let o=t.map((e=>({...e,name:r?e.name:e.type,nodes:e.nodes?e.nodes.filter((e=>!!this.nodesById[e])):[]})));i.forEach((e=>{this.edges[e.id]=e.paths.map((({node:t,weight:n})=>{let r=this.nodesById[t];return new er({angle:Ds(e,r),destination:r,distance:this.getDistance(e,r),origin:e,pathWeight:n})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let n=this.nodesById[e.nodes[t]];if(t++,null==n)continue;let r=t;for(;r<e.nodes.length;){let t=this.nodesById[e.nodes[r]];if(r++,null==t)continue;let i=this.mapsById[n.map].elevation||0,o=this.mapsById[t.map].elevation||0,s=Math.abs(i-o);this.edges[n.id].push(new er({destination:t,elevationDelta:s,origin:n,vortex:e})),this.edges[t.id].push(new er({destination:n,elevationDelta:s,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i,excludedNodeIds:o}){let s=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),a=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===s.length||0===a.length)return[];let l=[],u={},c={};for(s.forEach((e=>{let t=this.getShortestEuclideanDistance(e,a);l.push({origin:e,priority:t}),u[e.id]=null,c[e.id]=0})),l.sort(((e,t)=>e.priority-t.priority));l.length>0;){let e=l[0];if(a.includes(e.origin)){let t=[],n=u[e.origin.id];for(;null!=n;){t.push(n);let e=u[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let s=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,h=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id)),d=o&&o.has(t.destination.id);if(n&&s||h||d)continue;let p=c[e.origin.id]+t.weight;if(null==c[t.destination.id]||p<c[t.destination.id]){c[t.destination.id]=p;let e=p+this.getShortestEuclideanDistance(t.destination,a);l.push({origin:t.destination,priority:e}),u[t.destination.id]=t}}l.splice(0,1),l.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let n,r=e.x-t.x,i=e.y-t.y,o=r*r+i*i;return n=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/n}getShortestEuclideanDistance(e,t){return t.reduce(((t,n)=>{let r=this.getDistance(e,n);return Math.min(t,r)}),Number.MAX_VALUE)}};s(ql,"NavigationGraph");var Bl=ql,Vl=Bl;function fx(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}g(),g(),s(fx,"vortexDirectionTest");var Gl=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){y(this,"node"),y(this,"instruction"),y(this,"action"),y(this,"atLocation"),y(this,"type"),y(this,"distance",0),this.node=e,this.action=t,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=r?"Depart from ".concat(r.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=r?"Arrive at ".concat(r.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(r&&r.name," ").concat(fx(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(r&&r.name," at ").concat(t.toMap.name):null!=t&&"bearing"in t&&"Right"===t.bearing?this.instruction="Turn right":null!=t&&"bearing"in t&&"SlightRight"===t.bearing?this.instruction="Turn slightly right":null!=t&&"bearing"in t&&"Straight"===t.bearing?this.instruction="Head straight":null!=t&&"bearing"in t&&"SlightLeft"===t.bearing?this.instruction="Turn slightly left":null!=t&&"bearing"in t&&"Left"===t.bearing&&(this.instruction="Turn left"),null!=t&&"Turn"===t.type&&r&&(this.instruction+=" at ".concat(r.name)))}};s(Gl,"Directive");var Ul=Gl,In=Ul;function Yl(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,s=t.x,a=t.y,l=n.x,u=n.y,c=r.x,h=r.y;if(i===s&&o===a||l===c&&u===h)return null;let d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;let p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p<0||p>1||f<0||f>1?null:{x:i+p*(s-i),y:o+p*(a-o)}}function Cg(e,t,n){if(e.x===t.x)return[{x:e.x+n,y:e.y},{x:t.x+n,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+n},{x:t.x,y:t.y+n}];let r=-1/((t.y-e.y)/(t.x-e.x)),i=n*Math.sqrt(1/(1+r*r)),o=r*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function jg(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=Cg(e,t,-r),s=Cg(e,t,r);if(Yl(o[0],o[1],n[0],n[1])||Yl(s[0],s[1],n[0],n[1]))return void(i=!1)}else if(Yl(e,t,n[0],n[1]))return void(i=!1)})),i}g(),s(Yl,"getLineIntersection"),s(Cg,"getOffsetLine"),s(jg,"hasLineOfSight");var Rs=.1*Math.PI;function zs(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(zs,"differenceBetweenAngles");var Hl=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){y(this,"graph"),y(this,"locationsByNodeId"),y(this,"geometryEdgesByMapId",new Map),this.graph=new Vl({maps:r,nodes:t,showVortexNames:o,vortexes:n}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((n=>{e[n.node]=t})),t.polygons&&t.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{e[n]=t}))})),e)),{}),i&&i.forEach((e=>{if(this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),!0===e.isLineStringSegment)for(let t of e.vertexes)for(let n=0;n<t.length;n++)t[n+1]&&this.geometryEdgesByMapId.get(e.map).push([t[n],t[n+1]]);else e.vertexes.forEach(((t,n)=>{e.vertexes[n+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[n+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,n=10){let r=0,i=0,o=e;for(;Math.abs(r)<t&&i<n;){let e=this.graph.edges[o.destination.id],s=null,a=0;for(let t of e)if(t.distance>0)if(null!=s){let e=-zs(o.angle,t.angle);Math.abs(e)<Math.abs(a)&&(s=t,a=e)}else s=t,a=-zs(o.angle,t.angle);if(null==s)return null;{if(Math.abs(a)>=t||(r+=a,i+=s.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[s.destination.id];if(null!=e)return e;o=s}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a,simplify:l}){var u,c,h;let d=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a});if(0===d.length)return{distance:0,instructions:[new In({distance:0,instruction:"No Valid Path Available"})],path:[]};let p=0,f=[],g=[];if(null!=l&&l.enabled){let e=null!=(u=null==l?void 0:l.bufferRadius)?u:1.8,t=[d[0]];for(let n=1;n<d.length;n++){if(d[n].origin.map!==d[n-1].origin.map){let r=null!=(c=this.geometryEdgesByMapId.get(d[n-1].origin.map))?c:[];g.push(...this.simplifySteps(t,r,e)),t=[d[n]]}t.push(d[n])}let n=d[d.length-1],r=null!=(h=this.geometryEdgesByMapId.get(n.origin.map))?h:[];g.push(...this.simplifySteps(t,r,e)),d=g}for(let e=0;e<d.length;e++)f.push(d[e].origin);f.push(d[d.length-1].destination);let v=[],y=null,m=null,w=0,b=0;for(let e=0;e<d.length;e++){let t=d[e],n=t.origin,o=t.destination;if(p+=t.distance,w+=(null==m?void 0:m.distance)||0,0===e&&v.push(new In({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=t.vortex){let e=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=r.elevation){let t=e.elevation-r.elevation;t>0?i="down":t<0&&(i="up")}v.push(new In({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:w,origin:n})),b+=w,w=0}else if(null!=y&&null!=m)if(null!=m.vortex){let e=this.graph.mapsById[y.map],t=this.graph.mapsById[m.destination.map];v.push(new In({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:m.vortex,distance:w,origin:n})),b+=w,w=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==y&&e.destination!==t.destination));if(e.length>0){let r=-zs(m.angle,t.angle),i=e.reduce(((e,n)=>{let r=-zs(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Rs||Math.abs(i)<=Rs){let e;e=r<=-Math.PI/4?"Right":r<=-Rs?"SlightRight":r<=Rs?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(m,.5*Math.PI,10)),null!=t){let r=new In({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:w,origin:n});r.type=e,v.push(r)}else v.push(new In({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:w,origin:n}));b+=w,w=0}}}e===d.length-1&&(v.push(new In({action:{type:"Arrival"},atLocation:i,distance:p-b<0?0:p-b,origin:t.destination})),b+=w,w=0),y=n,m=t}let _=[],M=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:n}=t;n&&"TakeVortex"===n.type?(M=t.node,_.unshift(t)):n&&"Turn"===n.type&&null!=M?this.graph.getDistance(t.node,M)>5?_.unshift(t):_[0].distance+=t.distance:_.unshift(t)}return{distance:p,instructions:_,path:f}}simplifySteps(e,t,n){if(e.length<3)return e;let r=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!jg(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new er({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Ds(e[i].origin,e[t].origin)})),i=t}return r.push(new er({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Ds(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};s(Hl,"Navigator");var Wl=Hl,$l=Wl;g(),g();var Gt,Vi,Xl,qi,Kl,Bs,Fg,Jl=class{constructor(e){I(this,Vi),I(this,qi),I(this,Bs),I(this,Gt,void 0),j(this,Gt,e)}directionsTo(e,t){let n=w(this,Gt).analytics;return e instanceof wt?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),he(this,Bs,Fg).call(this,e,t)):(n.getDirections(this,e),he(this,qi,Kl).call(this,e,t))}distanceTo(e,t){let n=he(this,qi,Kl).call(this,e,t);return(null==n?void 0:n.distance)||0}};Gt=new WeakMap,Vi=new WeakSet,Xl=s((function(){var e;return null!=(e=w(this,Gt).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),qi=new WeakSet,Kl=s((function(e,t){let n=Bi(this),r=Bi(e),i=w(this,Gt).navigator.getDirections({originIds:n,destinationNodeIds:r,accessible:(null==t?void 0:t.accessible)||!1,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,excludedNodeIds:null!=t&&t.excludedNodeIds?new Set(t.excludedNodeIds):void 0,simplify:(null==t?void 0:t.simplify)||w(this,Vi,Xl)});return new tr(w(this,Gt),i)}),"#directionsToSingleDestination"),Bs=new WeakSet,Fg=s((function(e,t){let n,r=[],i=Bi(this);for(let o=0;o<e.destinations.length;o++){n=Bi(e.destinations[o]);let s=w(this,Gt).navigator.getDirections({originIds:i,destinationNodeIds:n,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,accessible:(null==t?void 0:t.accessible)||!1,simplify:(null==t?void 0:t.simplify)||w(this,Vi,Xl)}),a=new tr(w(this,Gt),s);r.push(a),i=0===a.path.length?n:[a.path[a.path.length-1].id]}return r}),"#directionsToDestinationSet"),s(Jl,"MappedinNavigatable");var Yt=Jl;g(),g(),g(),g(),g();var Zl=s((function(e,t){return(Zl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics");function An(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Zl(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(An,"__extends");var ie=s((function(){return ie=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),ie.apply(this,arguments)}),"__assign");function me(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function ge(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Ng(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(me,"__awaiter"),s(ge,"__generator"),s(Ng,"__values"),s(Dg,"__read"),g(),g(),g();var Cn,Ve,cn,jn,Je,ot,ye,Sr,ve=s((function(){return ve=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),ve.apply(this,arguments)}),"__assign");function Rg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Me(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function xe(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function Wt(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ke(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function It(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}s(Rg,"__rest"),s(Me,"__awaiter"),s(xe,"__generator"),s(Wt,"__values"),s(Ke,"__read"),s(It,"__spreadArray"),g(),g(),g(),function(e){e.US="US",e.EU="EU"}(Cn||(Cn={})),g(),function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(Ve||(Ve={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(cn||(cn={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(jn||(jn={})),g(),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(Je||(Je={})),g(),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(ot||(ot={})),g(),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(ye||(ye={})),g(),function(e){e.XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"}(Sr||(Sr={})),g(),g();var Ql="-",Ui="AMP",zg="".concat(Ui,"_unsent"),ec="https://api2.amplitude.com/2/httpapi",Bg="https://api.eu.amplitude.com/2/httpapi",Vg="https://api2.amplitude.com/batch",qg="https://api.eu.amplitude.com/batch";g();var mx=1e3,Vs=s((function(e){if(Object.keys(e).length>mx)return!1;for(var t in e){var n=e[t];if(!tc(t,n))return!1}return!0}),"isValidObject"),tc=s((function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=Wt(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&Vs(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return Vs(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}),"isValidProperties"),At=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return ve({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(Ve.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(Ve.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(Ve.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(Ve.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(Ve.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(Ve.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(Ve.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(Ve.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(Ve.UNSET,e,Ql),this},e.prototype.clearAll=function(){return this._properties={},this._properties[Ve.CLEAR_ALL]=Ql,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[Ve.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===Ve.ADD?"number"==typeof n:e===Ve.UNSET||e===Ve.REMOVE||tc(t,n))},e}(),Ug=s((function(e,t,n){return ve(ve(ve({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}),"createTrackEvent"),Gi=s((function(e,t){return ve(ve({},t),{event_type:jn.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent"),Gg=s((function(e,t,n,r){var i;return ve(ve({},r),{event_type:jn.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})}),"createGroupIdentifyEvent"),Yg=s((function(e,t,n){var r,i=new At;return i.set(e,t),ve(ve({},n),{event_type:jn.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})}),"createGroupEvent"),Wg=s((function(e,t){return ve(ve({},t),{event_type:jn.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");g(),g();var Ln=s((function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=ye.Unknown),{event:e,code:t,message:n}}),"buildResult"),$g=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,t){return Me(this,void 0,void 0,(function(){return xe(this,(function(n){switch(n.label){case 0:return[4,e.setup(t)];case 1:return n.sent(),this.plugins.push(e),[2]}}))}))},e.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex((function(t){return t.name===e})),1),Promise.resolve()},e.prototype.reset=function(){this.applying=!1,this.plugins=[]},e.prototype.push=function(e){var t=this;return new Promise((function(n){t.queue.push([e,n]),t.scheduleApply(0)}))},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout((function(){t.apply(t.queue.shift()).then((function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)}))}),e))},e.prototype.apply=function(e){return Me(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m;return xe(this,(function(w){switch(w.label){case 0:if(!e)return[2];t=Ke(e,1),n=t[0],r=Ke(e,2),i=r[1],o=this.plugins.filter((function(e){return e.type===ot.BEFORE})),w.label=1;case 1:w.trys.push([1,6,7,8]),s=Wt(o),a=s.next(),w.label=2;case 2:return a.done?[3,5]:[4,a.value.execute(ve({},n))];case 3:n=w.sent(),w.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return l=w.sent(),g={error:l},[3,8];case 7:try{a&&!a.done&&(v=s.return)&&v.call(s)}finally{if(g)throw g.error}return[7];case 8:u=this.plugins.filter((function(e){return e.type===ot.ENRICHMENT})),w.label=9;case 9:w.trys.push([9,14,15,16]),c=Wt(u),h=c.next(),w.label=10;case 10:return h.done?[3,13]:[4,h.value.execute(ve({},n))];case 11:n=w.sent(),w.label=12;case 12:return h=c.next(),[3,10];case 13:return[3,16];case 14:return d=w.sent(),y={error:d},[3,16];case 15:try{h&&!h.done&&(m=c.return)&&m.call(c)}finally{if(y)throw y.error}return[7];case 16:return p=this.plugins.filter((function(e){return e.type===ot.DESTINATION})),f=p.map((function(e){var t=ve({},n);return e.execute(t).catch((function(e){return Ln(t,0,String(e))}))})),Promise.all(f).then((function(e){var t=Ke(e,1)[0];i(t)})),[2]}}))}))},e.prototype.flush=function(){return Me(this,void 0,void 0,(function(){var e,t,n,r=this;return xe(this,(function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return i.sent(),t=this.plugins.filter((function(e){return e.type===ot.DESTINATION})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return i.sent(),[2]}}))}))},e}();g();var Hg="Event tracked successfully",Xg="Unexpected error occurred",Kg="Event rejected due to exceeded retry count",Jg="Event skipped due to optOut config",Zg="Event rejected due to missing API key",Qg="Invalid API key",ev="Client not initialized",nc=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new $g,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return Me(this,void 0,void 0,(function(){return xe(this,(function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),[2]}}))}))},e.prototype.runQueuedFunctions=function(e){return Me(this,void 0,void 0,(function(){var t,n,r,i,o,s;return xe(this,(function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,6,7,8]),n=Wt(t),r=n.next(),a.label=2;case 2:return r.done?[3,5]:[4,(0,r.value)()];case 3:a.sent(),a.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=a.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var r=Ug(e,t,n);return this.dispatch(r)},e.prototype.identify=function(e,t){var n=Gi(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,r){var i=Gg(e,t,n,r);return this.dispatch(i)},e.prototype.setGroup=function(e,t,n){var r=Yg(e,t,n);return this.dispatch(r)},e.prototype.revenue=function(e,t){var n=Wg(e,t);return this.dispatch(n)},e.prototype.add=function(e){return Me(this,void 0,void 0,(function(){return xe(this,(function(t){return this.config?[2,this.timeline.register(e,this.config)]:(this.q.push(this.add.bind(this,e)),[2])}))}))},e.prototype.remove=function(e){return Me(this,void 0,void 0,(function(){return xe(this,(function(t){return this.config?[2,this.timeline.deregister(e)]:(this.q.push(this.remove.bind(this,e)),[2])}))}))},e.prototype.dispatchWithCallback=function(e,t){if(!this.config)return t(Ln(e,0,ev));this.process(e).then(t)},e.prototype.dispatch=function(e){return Me(this,void 0,void 0,(function(){var t=this;return xe(this,(function(n){return this.config?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return Me(this,void 0,void 0,(function(){var t,n,r;return xe(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,Ln(e,0,Jg)]:[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=Ln(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=!!e:this.q.push(this.setOptOut.bind(this,!!e))},e.prototype.flush=function(){return this.timeline.flush()},e}();g();var qs=function(){function e(){this.productId="",this.quantity=1,this.price=0}return s(e,"Revenue"),e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return Vs(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?ve({},this.properties):{};return e[cn.REVENUE_PRODUCT_ID]=this.productId,e[cn.REVENUE_QUANTITY]=this.quantity,e[cn.REVENUE_PRICE]=this.price,e[cn.REVENUE_TYPE]=this.revenueType,e[cn.REVENUE]=this.revenue,e},e}();g(),g();var tv=s((function(e,t){var n=Math.max(t,1);return e.reduce((function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");g(),g();var Us="Amplitude Logger ",nv=function(){function e(){this.logLevel=Je.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=Je.None},e.prototype.enable=function(e){void 0===e&&(e=Je.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Je.Verbose||console.log("".concat(Us,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Je.Warn||console.warn("".concat(Us,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Je.Error||console.error("".concat(Us,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<Je.Debug||console.log("".concat(Us,"[Debug]: ").concat(e.join(" ")))},e}(),Gs=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:Je.Warn,loggerProvider:new nv,optOut:!1,serverUrl:ec,serverZone:Cn.US,useBatch:!1}}),"getDefaultConfig"),rc=function(){function e(e){var t,n,r;this._optOut=!1;var i=Gs();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||i.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||i.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||i.flushQueueSize,this.loggerProvider=e.loggerProvider||i.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:i.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:i.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||i.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(r=e.useBatch)&&void 0!==r?r:i.useBatch,this.loggerProvider.enable(this.logLevel);var o=ic(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=o.serverZone,this.serverUrl=o.serverUrl}return s(e,"Config"),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),gx=s((function(e,t){return e===Cn.EU?t?qg:Bg:t?Vg:ec}),"getServerUrl"),ic=s((function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Gs().serverZone),void 0===n&&(n=Gs().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[Cn.US,Cn.EU].includes(t)?t:Gs().serverZone;return{serverZone:r,serverUrl:gx(r,n)}}),"createServerConfig"),ac=function(){function e(){this.name="amplitude",this.type=ot.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var t;return Me(this,void 0,void 0,(function(){var n,r=this;return xe(this,(function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(zg,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return n=i.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return r.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(r)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,Kg),!1)}));r.forEach((function(t){e.queue=e.queue.concat(t),0!==t.timeout?setTimeout((function(){t.timeout=0,e.schedule(0)}),t.timeout):e.schedule(e.config.flushIntervalMillis)})),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout((function(){t.flush(!0).then((function(){t.queue.length>0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),Me(this,void 0,void 0,(function(){var t,n,r,i=this;return xe(this,(function(o){switch(o.label){case 0:return t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),r=tv(t,this.config.flushQueueSize),[4,Promise.all(r.map((function(t){return i.send(t,e)})))];case 1:return o.sent(),[2]}}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),Me(this,void 0,void 0,(function(){var n,r,i,o,s;return xe(this,(function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,Zg)];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;t.extra;return Rg(t,["extra"])})),options:{min_id_length:this.config.minIdLength}},a.label=1;case 1:return a.trys.push([1,3,,4]),r=ic(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=a.sent()))return this.fulfillRequest(e,0,Xg),[2];if(!t){if("body"in i){o="";try{o=JSON.stringify(i.body,null,2)}catch{}this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(o))}else this.fulfillRequest(e,i.statusCode,i.status);return[2]}return this.handleReponse(i,e),[3,4];case 3:return s=a.sent(),this.fulfillRequest(e,0,String(s)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case ye.Success:this.handleSuccessResponse(e,t);break;case ye.Invalid:this.handleInvalidResponse(e,t);break;case ye.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case ye.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,Hg)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(Qg))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=It(It(It(It([],Ke(Object.values(e.body.eventsWithInvalidFields)),!1),Ke(Object.values(e.body.eventsWithMissingFields)),!1),Ke(Object.values(e.body.eventsWithInvalidIdLengths)),!1),Ke(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter((function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,It([],Ke(o),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,It([],Ke(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),l=new Set(o),u=t.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return l.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,It([],Ke(u),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,It([],Ke(e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback(Ln(e.event,t,n))}))},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map((function(e){return e.event})));this.config.storageProvider.set(this.storageKey,e)}},e}();g();var kt=s((function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return{promise:e.apply(void 0,It([],Ke(t),!1))}}}),"returnWrapper");g();var vx=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace"),Ie=s((function(e){return function(){var t=ve({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}}),"getClientLogConfig"),yx=s((function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=Wt(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}),"getValueByStringPath"),Ae=s((function(e,t){return function(){var n,r,i={};try{for(var o=Wt(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=yx(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}}),"getClientStates"),Ce=s((function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),l=a.logger,u=a.logLevel;if(u&&u<Je.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:vx(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var h=e.apply(i,o);return h&&h.promise?h.promise.then((function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))})):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))),h}}),"debugWrapper");g();var Fn=s((function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Fn)}),"UUID");g();var Yi=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return Me(this,void 0,void 0,(function(){return xe(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return Me(this,void 0,void 0,(function(){return xe(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return Me(this,void 0,void 0,(function(){var t;return xe(this,(function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}}))}))},e.prototype.set=function(e,t){return Me(this,void 0,void 0,(function(){return xe(this,(function(n){return this.memoryStorage.set(e,t),[2]}))}))},e.prototype.remove=function(e){return Me(this,void 0,void 0,(function(){return xe(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return Me(this,void 0,void 0,(function(){return xe(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();g();var nr=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m,w,b,_,M;if("object"!=typeof e)return null;var x=e.code||0,I=this.buildStatus(x);switch(I){case ye.Success:return{status:I,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case ye.Invalid:return{status:I,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case ye.PayloadTooLarge:return{status:I,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case ye.RateLimit:return{status:I,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(w=e.throttled_users)&&void 0!==w?w:{},exceededDailyQuotaDevices:null!==(b=e.exceeded_daily_quota_devices)&&void 0!==b?b:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(M=e.throttled_events)&&void 0!==M?M:[]}};case ye.Timeout:default:return{status:I,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?ye.Success:429===e?ye.RateLimit:413===e?ye.PayloadTooLarge:408===e?ye.Timeout:e>=400&&e<500?ye.Invalid:e>=500?ye.Failed:ye.Unknown},e}();g(),g(),g();var oc=s((function(e,t){return(oc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics");function rv(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oc(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(rv,"__extends");var Ge=s((function(){return Ge=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Ge.apply(this,arguments)}),"__assign");function sc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function De(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function Re(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function iv(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(sc,"__rest"),s(De,"__awaiter"),s(Re,"__generator"),s(iv,"__read"),g(),g();var Ze=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope"),Ir=s((function(){var e,t=Ze();return null!==(e=null==t?void 0:t.location)&&void 0!==e&&e.search?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=av(n[0]),i=av(n[1]);return i&&(e[r]=i),e}),{}):{}}),"getQueryParams"),av=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");g();var ov="utm_campaign",sv="utm_content",uv="utm_id",lv="utm_medium",cv="utm_source",dv="utm_term",uc="dclid",lc="fbclid",cc="gbraid",dc="gclid",pc="ko_click_id",fc="msclkid",hc="ttclid",mc="twclid",gc="wbraid",pv="EMPTY",Ys={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,msclkid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},fv="MKTG",hv=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return De(this,void 0,void 0,(function(){return Re(this,(function(e){return[2,Ge(Ge(Ge(Ge({},Ys),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=Ir();return{utm_campaign:e[ov],utm_content:e[sv],utm_id:e[uv],utm_medium:e[lv],utm_source:e[cv],utm_term:e[dv]}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return n},e.prototype.getClickIds=function(){var e,t=Ir();return(e={})[uc]=t[uc],e[lc]=t[lc],e[cc]=t[cc],e[dc]=t[dc],e[pc]=t[pc],e[fc]=t[fc],e[hc]=t[hc],e[mc]=t[mc],e[gc]=t[gc],e},e}();g(),g();var rr=s((function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[Ui,t,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName"),vc=s((function(e){return"".concat(Ui.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName"),yc=function(){function e(e,t){var n,r;this.storage=t.storage,this.storageKey=rr(e,fv),this.parser=new hv,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=null!==(n=t.excludeReferrers)&&void 0!==n?n:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(r=t.initialEmptyValue)&&void 0!==r?r:pv}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,t,n){void 0===n&&(n=!1);e.referrer;var r=e.referring_domain,i=sc(e,["referrer","referring_domain"]),o=t||{},s=(o.referrer,o.referring_domain),a=sc(o,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var l=JSON.stringify(i)!==JSON.stringify(a),u=n?mv(r||"")!==mv(s||""):r!==s;return!t||l||u},e.prototype.saveCampaignToStorage=function(e){return De(this,void 0,void 0,(function(){return Re(this,(function(t){switch(t.label){case 0:return[4,this.storage.set(this.storageKey,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getCampaignFromStorage=function(){return De(this,void 0,void 0,(function(){return Re(this,(function(e){switch(e.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.createCampaignEvent=function(e){var t=this,n=Ge(Ge({},Ys),e),r=Object.entries(n).reduce((function(e,n){var r=iv(n,2),i=r[0],o=r[1];return e.setOnce("initial_".concat(i),o||t.initialEmptyValue),o?e.set(i,o):e.unset(i)}),new At),i={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return Ge(Ge({},Gi(r)),this.trackPageViews&&i)},e.prototype.send=function(e){return De(this,void 0,void 0,(function(){var t,n;return Re(this,(function(r){switch(r.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return t=r.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=r.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(t,n))return[2];this.onNewCampaign(t)}return[4,this.track(this.createCampaignEvent(t))];case 3:return r.sent(),[4,this.saveCampaignToStorage(t)];case 4:return r.sent(),[2]}}))}))},e}(),mv=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain");g();var ir=function(){function e(e){this.options=Ge({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return De(this,void 0,void 0,(function(){var t,n,r;return Re(this,(function(i){switch(i.label){case 0:if(!Ze())return[2,!1];t=String(Date.now()),n=new e(this.options),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return De(this,void 0,void 0,(function(){var t;return Re(this,(function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch{}return[2,JSON.parse(t)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var t;return De(this,void 0,void 0,(function(){var n,r,i;return Re(this,(function(o){return n=Ze(),r=null!==(t=null==n?void 0:n.document.cookie.split("; "))&&void 0!==t?t:[],(i=r.find((function(t){return 0===t.indexOf(e+"=")})))?[2,i.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,t){var n;return De(this,void 0,void 0,(function(){var r,i,o,s,a,l;return Re(this,(function(u){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=void 0,(i=null!==t?r:-1)&&((s=new Date).setTime(s.getTime()+24*i*60*60*1e3),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=Ze())&&(l.document.cookie=a)}catch{}return[2]}))}))},e.prototype.remove=function(e){return De(this,void 0,void 0,(function(){return Re(this,(function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}}))}))},e.prototype.reset=function(){return De(this,void 0,void 0,(function(){return Re(this,(function(e){return[2]}))}))},e}();g();var Ws=function(){function e(e,t){this.storage=e,this.storageKey=rr(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return De(this,void 0,void 0,(function(){var t;return Re(this,(function(n){switch(n.label){case 0:return t=this,[4,this.storage.get(this.storageKey)];case 1:return t.cache=null!==(e=n.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=Ge(Ge({},this.cache),e),this.storage.set(this.storageKey,this.cache)},e.prototype.getSessionId=function(){return this.cache.sessionId},e.prototype.setSessionId=function(e){this.setSession({sessionId:e})},e.prototype.getDeviceId=function(){return this.cache.deviceId},e.prototype.setDeviceId=function(e){this.setSession({deviceId:e})},e.prototype.getUserId=function(){return this.cache.userId},e.prototype.setUserId=function(e){this.setSession({userId:e})},e.prototype.getLastEventTime=function(){return this.cache.lastEventTime},e.prototype.setLastEventTime=function(e){this.setSession({lastEventTime:e})},e.prototype.getOptOut=function(){return this.cache.optOut},e.prototype.setOptOut=function(e){this.setSession({optOut:e})},e.prototype.getLastEventId=function(){return this.cache.lastEventId},e.prototype.setLastEventId=function(e){this.setSession({lastEventId:e})},e}();g();var bc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rv(t,e),s(t,"FetchTransport"),t.prototype.send=function(e,t){return De(this,void 0,void 0,(function(){var n,r;return Re(this,(function(i){switch(i.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),[2,this.buildResponse(r)]}}))}))},t}(nr);g(),g();var gv=qt(Hs()),bx=function(){function e(){this.ua=new gv.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:_x(),platform:"Web",os:wx(this.ua),deviceModel:kx(this.ua)}},e}(),wx=s((function(e){var t,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),kx=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),_x=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),Mx=function(){function e(){this.queue=[]}return s(e,"EventBridgeImpl"),e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),Nn=s((function(){return Nn=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Nn.apply(this,arguments)}),"__assign"),Xs=s((function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++){if(i[r]===n)return e===t}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(!o||!s){var a=Object.keys(e).sort(),l=Object.keys(t).sort();if(!Xs(a,l))return!1;var u=!0;return Object.keys(e).forEach((function(n){Xs(e[n],t[n])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!Xs(e[c],t[c]))return!1;return!0}),"isEqual"),xx="$set",Ex="$unset",Tx="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var Px=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=Nn({},this.identity.userProperties),n=Nn(Nn({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},updateUserProperties:function(e){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(s){case xx:for(var l=0,u=Object.entries(a);l<u.length;l++){var c=u[l],h=c[0],d=c[1];t[h]=d}break;case Ex:for(var p=0,f=Object.keys(a);p<f.length;p++){delete t[h=f[p]]}break;case Tx:t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Nn({},this.identity)},e.prototype.setIdentity=function(e){var t=Nn({},this.identity);this.identity=Nn({},e),Xs(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),$i=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,vv=function(){function e(){this.identityStore=new Px,this.eventBridge=new Mx,this.applicationContextProvider=new bx}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return $i.analyticsConnectorInstances||($i.analyticsConnectorInstances={}),$i.analyticsConnectorInstances[t]||($i.analyticsConnectorInstances[t]=new e),$i.analyticsConnectorInstances[t]},e}(),Hi=s((function(){return vv.getInstance("$default_instance")}),"getAnalyticsConnector");g();var wc=function(){function e(){this.name="identity",this.type=ot.BEFORE,this.identityStore=Hi().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return De(this,void 0,void 0,(function(){var t;return Re(this,(function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();g();var kc=s((function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""}),"getLanguage");g();var Ks=s((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var l=a.apply(e,o);"function"==typeof s&&s(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject"),Js=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");g();var bv=qt(Hs());g();var yv="1.6.8",Ox="Web",Sx="$remote",wv=function(){function e(){var e;this.name="context",this.type=ot.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(yv),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new bv.default(e).getResult()}return s(e,"Context"),e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return me(this,void 0,void 0,(function(){var t,n,r,i,o;return ge(this,(function(s){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),t=(new Date).getTime(),n=this.uaResult.browser.name,r=this.uaResult.browser.version,i=this.uaResult.device.model||this.uaResult.os.name,o=this.uaResult.device.vendor,[2,ie(ie(ie(ie(ie(ie(ie(ie(ie(ie(ie(ie({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:Ox}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:r}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:o}),this.config.trackingOptions.deviceModel&&{device_model:i}),this.config.trackingOptions.language&&{language:kc()}),this.config.trackingOptions.ipAddress&&{ip:Sx}),{insert_id:Fn(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:this.eventId++,library:this.library})]}))}))},e.prototype.isSessionValid=function(){var e=this.config.lastEventTime||Date.now();return Date.now()-e<this.config.sessionTimeout},e}();g(),g();var Xi=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return me(this,void 0,void 0,(function(){var t,n,r;return ge(this,(function(i){switch(i.label){case 0:if(!Ze())return[2,!1];t=String(Date.now()),n=new e,r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return me(this,void 0,void 0,(function(){var t;return ge(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var t;return me(this,void 0,void 0,(function(){return ge(this,(function(n){return[2,(null===(t=Ze())||void 0===t?void 0:t.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,t){var n;return me(this,void 0,void 0,(function(){return ge(this,(function(r){try{null===(n=Ze())||void 0===n||n.localStorage.setItem(e,JSON.stringify(t))}catch{}return[2]}))}))},e.prototype.remove=function(e){var t;return me(this,void 0,void 0,(function(){return ge(this,(function(n){try{null===(t=Ze())||void 0===t||t.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return me(this,void 0,void 0,(function(){return ge(this,(function(t){try{null===(e=Ze())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();g();var kv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return An(t,e),s(t,"XHRTransport"),t.prototype.send=function(e,t){return me(this,void 0,void 0,(function(){var n=this;return ge(this,(function(r){return[2,new Promise((function(r,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done)try{var e=o.responseText,t=JSON.parse(e),s=n.buildResponse(t);r(s)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))}))]}))}))},t}(nr);g();var _v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return An(t,e),s(t,"SendBeaconTransport"),t.prototype.send=function(e,t){return me(this,void 0,void 0,(function(){var n=this;return ge(this,(function(r){return[2,new Promise((function(r,i){var o=Ze();if(null==o||!o.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,JSON.stringify(t))?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},t}(nr),Zs=s((function(){var e=new Yi;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new Ws(e,""),sessionTimeout:18e5,storageProvider:new Yi,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new bc}}),"getDefaultConfig"),Mv=function(e){function t(t,n,r){var i,o,s,a,l,u,c,h,d,p,f,g,v=this,y=Zs();return(v=e.call(this,ie(ie({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},r),{apiKey:t,storageProvider:null!==(i=null==r?void 0:r.storageProvider)&&void 0!==i?i:y.storageProvider,transportProvider:null!==(o=null==r?void 0:r.transportProvider)&&void 0!==o?o:y.transportProvider}))||this).cookieStorage=null!==(s=null==r?void 0:r.cookieStorage)&&void 0!==s?s:y.cookieStorage,v.sessionManager=null!==(a=null==r?void 0:r.sessionManager)&&void 0!==a?a:y.sessionManager,v.sessionTimeout=null!==(l=null==r?void 0:r.sessionTimeout)&&void 0!==l?l:y.sessionTimeout,v.appVersion=null==r?void 0:r.appVersion,v.attribution=null==r?void 0:r.attribution,v.cookieExpiration=null!==(u=null==r?void 0:r.cookieExpiration)&&void 0!==u?u:y.cookieExpiration,v.cookieSameSite=null!==(c=null==r?void 0:r.cookieSameSite)&&void 0!==c?c:y.cookieSameSite,v.cookieSecure=null!==(h=null==r?void 0:r.cookieSecure)&&void 0!==h?h:y.cookieSecure,v.deviceId=null==r?void 0:r.deviceId,v.disableCookies=null!==(d=null==r?void 0:r.disableCookies)&&void 0!==d?d:y.disableCookies,v.domain=null!==(p=null==r?void 0:r.domain)&&void 0!==p?p:y.domain,v.lastEventTime=null!==(f=v.lastEventTime)&&void 0!==f?f:null==r?void 0:r.lastEventTime,v.optOut=!(null==r||!r.optOut),v.partnerId=null==r?void 0:r.partnerId,v.sessionId=null==r?void 0:r.sessionId,v.trackingOptions=null!==(g=null==r?void 0:r.trackingOptions)&&void 0!==g?g:y.trackingOptions,v.userId=n,v}return An(t,e),s(t,"BrowserConfig"),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(!!e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),t}(rc),xv=s((function(e,t,n){return me(void 0,void 0,void 0,(function(){var r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m,w;return ge(this,(function(b){switch(b.label){case 0:return r=Zs(),null!==(g=null==n?void 0:n.domain)&&void 0!==g?(o=g,[3,3]):[3,1];case 1:return[4,jx()];case 2:o=b.sent(),b.label=3;case 3:return i=o,[4,Ix(ie(ie({},n),{domain:i}))];case 4:return s=b.sent(),a=rr(e),[4,s.get(a)];case 5:return l=b.sent(),u=Ir(),[4,new Ws(s,e).load()];case 6:return c=b.sent(),h=Mv.bind,d=[void 0,e,null!=t?t:null==l?void 0:l.userId],p=[ie({},n)],f={cookieStorage:s,sessionManager:c,deviceId:Cx(null==l?void 0:l.deviceId,null==n?void 0:n.deviceId,u.deviceId),domain:i,optOut:null!==(v=null==n?void 0:n.optOut)&&void 0!==v?v:!(null==l||!l.optOut)},[4,s.get(a)];case 7:return f.sessionId=null!==(m=null===(y=b.sent())||void 0===y?void 0:y.sessionId)&&void 0!==m?m:null==n?void 0:n.sessionId,[4,Ax(n)];case 8:return[2,new(h.apply(Mv,d.concat([ie.apply(void 0,p.concat([(f.storageProvider=b.sent(),f.trackingOptions=ie(ie({},r.trackingOptions),null==n?void 0:n.trackingOptions),f.transportProvider=null!==(w=null==n?void 0:n.transportProvider)&&void 0!==w?w:Mc(null==n?void 0:n.transport),f)]))])))]}}))}))}),"useBrowserConfig"),Ix=s((function(e,t){return void 0===t&&(t=Zs()),me(void 0,void 0,void 0,(function(){var n,r,i;return ge(this,(function(o){switch(o.label){case 0:return n=ie(ie({},t),e),r=null==e?void 0:e.cookieStorage,(i=!r)?[3,2]:[4,r.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,_c(n)]:[2,r]}}))}))}),"createCookieStorage"),_c=s((function(e){return me(void 0,void 0,void 0,(function(){var t,n;return ge(this,(function(r){switch(r.label){case 0:return t=new ir({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(n=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?[4,(t=new Xi).isEnabled()]:[3,4];case 3:r.sent()||(t=new Yi),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage"),Ax=s((function(e){return me(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return ge(this,(function(l){switch(l.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];l.label=1;case 1:l.trys.push([1,7,8,9]),t=Ng([null==e?void 0:e.storageProvider,new Xi]),n=t.next(),l.label=2;case 2:return n.done?[3,6]:(r=n.value,(i=r)?[4,r.isEnabled()]:[3,4]);case 3:i=l.sent(),l.label=4;case 4:if(i)return[2,r];l.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return o=l.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage"),Cx=s((function(e,t,n){return t||n||e||Fn()}),"createDeviceId"),Mc=s((function(e){return e===Sr.XHR?new kv:e===Sr.SendBeacon?new _v:Zs().transportProvider}),"createTransport"),jx=s((function(e){return me(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return ge(this,(function(l){switch(l.label){case 0:return[4,(new ir).isEnabled()];case 1:if(!l.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],[4,(a=new ir({domain:"."+s})).set(i,1)]):[3,7];case 3:return l.sent(),[4,a.get(i)];case 4:return l.sent()?[4,a.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");g();var Tv=s((function(e,t){return me(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,l,u,c;return ge(this,(function(h){switch(h.label){case 0:return[4,(n=new ir).isEnabled()];case 1:return(!h.sent()||null!=t&&t.disableCookies)&&(n=new Xi),[4,n.isEnabled()];case 2:return h.sent()?(r=vc(e),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return(i=h.sent())?[4,n.remove(r)]:[2,{optOut:!1}];case 4:return h.sent(),o=Dg(i.split("."),5),s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],[2,{deviceId:s,userId:Lx(a),sessionId:Ev(u),lastEventTime:Ev(c),optOut:!!l}]}}))}))}),"parseOldCookies"),Ev=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime"),Lx=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode"),Fx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return An(t,e),s(t,"AmplitudeBrowser"),t.prototype.init=function(t,n,r){var i,o,s;return void 0===t&&(t=""),me(this,void 0,void 0,(function(){var a,l,u,c,h=this;return ge(this,(function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Tv(t,r)]);case 1:return a=d.sent(),[4,xv(t,n||a.userId,ie(ie({},r),{deviceId:null!==(i=a.deviceId)&&void 0!==i?i:null==r?void 0:r.deviceId,sessionId:null!==(o=a.sessionId)&&void 0!==o?o:null==r?void 0:r.sessionId,optOut:null!==(s=null==r?void 0:r.optOut)&&void 0!==s?s:a.optOut,lastEventTime:a.lastEventTime}))];case 2:return l=d.sent(),[4,e.prototype._init.call(this,l)];case 3:return d.sent(),u=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),u=!0),(c=Hi()).eventBridge.setEventReceiver((function(e){h.track(e.eventType,e.eventProperties)})),c.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new wv)];case 4:return d.sent(),[4,this.add(new wc)];case 5:return d.sent(),[4,this.add(new ac)];case 6:return d.sent(),this.initializing=!1,[4,this.runAttributionStrategy(l.attribution,u)];case 7:return d.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return d.sent(),[2]}}))}))},t.prototype.runAttributionStrategy=function(e,t){return void 0===t&&(t=!1),me(this,void 0,void 0,(function(){var n,r,i;return ge(this,(function(o){switch(o.label){case 0:return n=this.track.bind(this),r=this.setSessionId.bind(this,Date.now()),[4,_c(this.config)];case 1:return i=o.sent(),[4,new yc(this.config.apiKey,ie(ie({},e),{storage:i,track:n,onNewCampaign:r})).send(t)];case 2:return o.sent(),[2]}}))}))},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(Fn())},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Mc(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(Js(t)){var r=t._q;t._q=[],t=Ks(new At,r)}return null!=n&&n.user_id&&this.setUserId(n.user_id),null!=n&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(Js(r)){var o=r._q;r._q=[],r=Ks(new At,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(Js(t)){var r=t._q;t._q=[],t=Ks(new qs,r)}return e.prototype.revenue.call(this,t,n)},t}(nc),Qs=s((function(){var e=new Fx;return{init:Ce(kt(e.init.bind(e)),"init",Ie(e),Ae(e,["config"])),add:Ce(kt(e.add.bind(e)),"add",Ie(e),Ae(e,["config.apiKey","timeline.plugins"])),remove:Ce(kt(e.remove.bind(e)),"remove",Ie(e),Ae(e,["config.apiKey","timeline.plugins"])),track:Ce(kt(e.track.bind(e)),"track",Ie(e),Ae(e,["config.apiKey","timeline.queue.length"])),logEvent:Ce(kt(e.logEvent.bind(e)),"logEvent",Ie(e),Ae(e,["config.apiKey","timeline.queue.length"])),identify:Ce(kt(e.identify.bind(e)),"identify",Ie(e),Ae(e,["config.apiKey","timeline.queue.length"])),groupIdentify:Ce(kt(e.groupIdentify.bind(e)),"groupIdentify",Ie(e),Ae(e,["config.apiKey","timeline.queue.length"])),setGroup:Ce(kt(e.setGroup.bind(e)),"setGroup",Ie(e),Ae(e,["config.apiKey","timeline.queue.length"])),revenue:Ce(kt(e.revenue.bind(e)),"revenue",Ie(e),Ae(e,["config.apiKey","timeline.queue.length"])),flush:Ce(kt(e.flush.bind(e)),"flush",Ie(e),Ae(e,["config.apiKey","timeline.queue.length"])),getUserId:Ce(e.getUserId.bind(e),"getUserId",Ie(e),Ae(e,["config","config.userId"])),setUserId:Ce(e.setUserId.bind(e),"setUserId",Ie(e),Ae(e,["config","config.userId"])),getDeviceId:Ce(e.getDeviceId.bind(e),"getDeviceId",Ie(e),Ae(e,["config","config.deviceId"])),setDeviceId:Ce(e.setDeviceId.bind(e),"setDeviceId",Ie(e),Ae(e,["config","config.deviceId"])),reset:Ce(e.reset.bind(e),"reset",Ie(e),Ae(e,["config","config.userId","config.deviceId"])),getSessionId:Ce(e.getSessionId.bind(e),"getSessionId",Ie(e),Ae(e,["config"])),setSessionId:Ce(e.setSessionId.bind(e),"setSessionId",Ie(e),Ae(e,["config"])),setOptOut:Ce(e.setOptOut.bind(e),"setOptOut",Ie(e),Ae(e,["config"])),setTransport:Ce(e.setTransport.bind(e),"setTransport",Ie(e),Ae(e,["config"]))}}),"createInstance"),Fe=Qs(),F2=Fe.add,N2=Fe.flush,D2=Fe.getDeviceId,R2=Fe.getSessionId,z2=Fe.getUserId,B2=Fe.groupIdentify,V2=Fe.identify,q2=Fe.init,U2=Fe.logEvent,G2=Fe.remove,Y2=Fe.reset,W2=Fe.revenue,$2=Fe.setDeviceId,H2=Fe.setGroup,X2=Fe.setOptOut,K2=Fe.setSessionId,J2=Fe.setTransport,Z2=Fe.setUserId,Q2=Fe.track,Fd={production:"40ead723d18886045e302513245edb27",development:""},Ar={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Nd=class{constructor(e){this.event_properties=e,y(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(Nd,"AnalyticsCategorySelectedCall");var Ki=Nd,Dd=class{constructor(e){this.event_properties=e,y(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Dd,"AnalyticsLocationSelectedCall");var Ji=Dd,Rd=class{constructor(e){this.event_properties=e,y(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Rd,"BlueDotDisableCall");var xc=Rd,zd=class{constructor(e){this.event_properties=e,y(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(zd,"BlueDotEnableCall");var Ec=zd,Bd=class{constructor(e){this.event_properties=e,y(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(Bd,"BlueDotOffCall");var Tc=Bd,Vd=class{constructor(e){this.event_properties=e,y(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Vd,"BlueDotOnCall");var Pc=Vd,qd=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(qd,"CameraAnimateCall");var Oc=qd,Ud=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Ud,"CameraCancelAnimationCall");var Sc=Ud,Gd=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Gd,"CameraFocusOnCall");var Ic=Gd,Yd=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(Yd,"CameraGetSafeAreaInsetsCall");var Ac=Yd,Wd=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Wd,"CameraInteractionDisableCall");var Cc=Wd,$d=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s($d,"CameraInteractionEnableCall");var jc=$d,Hd=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Hd,"CameraSetCall");var Lc=Hd,Xd=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(Xd,"CameraSetSafeAreaInsetsCall");var Fc=Xd,Kd=class{constructor(e){this.event_properties=e,y(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Kd,"CameraTranslateCall");var Nc=Kd,Jd=class{constructor(e){this.event_properties=e,y(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(Jd,"FlatLabelsAddCall");var Dc=Jd,Zd=class{constructor(e){this.event_properties=e,y(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Zd,"FlatLabelsLabelAllLocationsCall");var Rc=Zd,Qd=class{constructor(e){this.event_properties=e,y(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(Qd,"FlatLabelsRemoveCall");var zc=Qd,ep=class{constructor(e){this.event_properties=e,y(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(ep,"FlatLabelsRemoveAllCall");var Bc=ep,tp=class{constructor(e){this.event_properties=e,y(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(tp,"FlatLabelsSetAppearanceCall");var Vc=tp,np=class{constructor(e){this.event_properties=e,y(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(np,"FloatingLabelsAddCall");var qc=np,rp=class{constructor(e){this.event_properties=e,y(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(rp,"FloatingLabelsLabelAllLocationsCall");var Uc=rp,ip=class{constructor(e){this.event_properties=e,y(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(ip,"FloatingLabelsRemoveCall");var Gc=ip,ap=class{constructor(e){this.event_properties=e,y(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(ap,"FloatingLabelsRemoveAllCall");var Yc=ap,op=class{constructor(e){this.event_properties=e,y(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(op,"FloatingLabelsResetPriorityCall");var Wc=op,sp=class{constructor(e){this.event_properties=e,y(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(sp,"FloatingLabelsSetAppearanceCall");var $c=sp,up=class{constructor(e){this.event_properties=e,y(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(up,"FloatingLabelsSetPriorityCall");var Hc=up,lp=class{constructor(e){this.event_properties=e,y(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(lp,"GlobalGetVenueCall");var Zi=lp,cp=class{constructor(e){this.event_properties=e,y(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(cp,"GlobalGetVenueMvfCall");var Qi=cp,dp=class{constructor(e){this.event_properties=e,y(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(dp,"GlobalShowVenueCall");var Xc=dp,pp=class{constructor(e){this.event_properties=e,y(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(pp,"JourneyClearCall");var Kc=pp,fp=class{constructor(e){this.event_properties=e,y(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(fp,"JourneyDrawCall");var Jc=fp,hp=class{constructor(e){this.event_properties=e,y(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(hp,"JourneySetStepCall");var Zc=hp,mp=class{constructor(e){this.event_properties=e,y(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(mp,"MappedinGetCollectionItemByIdCall");var Qc=mp,gp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(gp,"MappedinCoordinateAbsoluteDistanceToCall");var ed=gp,vp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(vp,"MappedinCoordinateNearestNodeCall");var td=vp,yp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(yp,"MappedinLocationCloneCall");var ea=yp,bp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(bp,"MappedinLocationDirectionsToCall");var ta=bp,wp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(wp,"MappedinLocationDistanceToCall");var na=wp,kp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(kp,"MappedinMapCreateCoordinateCall");var nd=kp,_p=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(_p,"MappedinMapCreateCoordinateByXyCall");var rd=_p,Mp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(Mp,"MappedinMapGetNorthCall");var id=Mp,xp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(xp,"MappedinNodeDirectionsToCall");var ra=xp,Ep=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(Ep,"MappedinNodeDistanceToCall");var ia=Ep,Tp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(Tp,"MappedinPolygonDirectionsToCall");var aa=Tp,Pp=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(Pp,"MappedinPolygonDistanceToCall");var oa=Pp,Op=class{constructor(e){this.event_properties=e,y(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(Op,"MappedinVenueMetadataRead");var sa=Op,Sp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(Sp,"MapViewAddInteractivePolygonCall");var ad=Sp,Ip=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(Ip,"MapViewAddInteractivePolygonsForAllLocationsCall");var od=Ip,Ap=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(Ap,"MapViewClearPolygonColorCall");var sd=Ap,Cp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Cp,"MapViewCreateCustomTooltipCall");var ud=Cp,jp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(jp,"MapViewCreateMarkerCall");var ld=jp,Lp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Lp,"MapViewCreateTooltipCall");var cd=Lp,Fp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(Fp,"MapViewDestroyCall");var dd=Fp,Np=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(Np,"MapViewDisableImageFlippingForAllPolygonsCall");var pd=Np,Dp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Dp,"MapViewDrawPathCall");var fd=Dp,Rp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Rp,"MapViewEnableImageFlippingForAllLocationsCall");var hd=Rp,zp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(zp,"MapViewEnableImageFlippingForPolygonCall");var md=zp,Bp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(Bp,"MapViewGetNearestNodeByScreenCoordinatesCall");var gd=Bp,Vp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Vp,"MapViewGetPolygonAtCoordinateCall");var vd=Vp,qp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(qp,"MapViewGetPrimaryLocationForPolygonCall");var yd=qp,Up=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Up,"MapViewLabelAllLocationsCall");var bd=Up,Gp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Gp,"MapViewRemoveAllInteractivePolygonsCall");var wd=Gp,Yp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Yp,"MapViewRemoveAllMarkersCall");var kd=Yp,Wp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Wp,"MapViewRemoveAllPathsCall");var _d=Wp,$p=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s($p,"MapViewRemoveAllTooltipsCall");var Md=$p,Hp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Hp,"MapViewRemoveInteractivePolygonCall");var xd=Hp,Xp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(Xp,"MapViewRemoveMarkerCall");var Ed=Xp,Kp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Kp,"MapViewRemovePathCall");var Td=Kp,Jp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Jp,"MapViewRemoveTooltipCall");var Pd=Jp,Zp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(Zp,"MapViewSetBackgroundColorCall");var Od=Zp,Qp=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(Qp,"MapViewSetHoverColorCall");var Sd=Qp,ef=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(ef,"MapViewSetMapCall");var Id=ef,tf=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(tf,"MapViewSetPolygonColorCall");var Ad=tf,nf=class{constructor(e){this.event_properties=e,y(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(nf,"MapViewSetStateCall");var Cd=nf,rf=class{constructor(e){this.event_properties=e,y(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(rf,"MetricsMapLoadEvent");var jd=rf,af=class{constructor(e){this.event_properties=e,y(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(af,"OfflineSearchAddQueryCall");var ua=af,of=class{constructor(e){this.event_properties=e,y(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(of,"OfflineSearchConstructorCall");var la=of,sf=class{constructor(e){this.event_properties=e,y(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(sf,"OfflineSearchSearchCall");var ca=sf,uf=class{constructor(e){this.event_properties=e,y(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(uf,"OfflineSearchSuggestCall");var da=uf,eu=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),lf=class{constructor(){y(this,"disabled",!1),y(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return null!=this.amplitude}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(e){var t,n;if(this.disabled=null!=(t=e.disabled)&&t,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),eu();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=Fd[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=Qs(),this.amplitude.init(r,void 0,{...Ar,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(n=e.client)?void 0:n.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return eu()}identify(e,t,n){if(!this.isInitializedAndEnabled())return eu();e&&(n={...n,user_id:e});let r=new At,i=t;if(null!=i)for(let[e,t]of Object.entries(i))r.set(e,t);return this.amplitude.identify(r,n)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):eu()}analyticsCategorySelectedCall(e,t){return this.track(new Ki(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new Ji(e),t)}blueDotDisableCall(e,t){return this.track(new xc(e),t)}blueDotEnableCall(e,t){return this.track(new Ec(e),t)}blueDotOffCall(e,t){return this.track(new Tc(e),t)}blueDotOnCall(e,t){return this.track(new Pc(e),t)}cameraAnimateCall(e,t){return this.track(new Oc(e),t)}cameraCancelAnimationCall(e,t){return this.track(new Sc(e),t)}cameraFocusOnCall(e,t){return this.track(new Ic(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new Ac(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Cc(e),t)}cameraInteractionEnableCall(e,t){return this.track(new jc(e),t)}cameraSetCall(e,t){return this.track(new Lc(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Fc(e),t)}cameraTranslateCall(e,t){return this.track(new Nc(e),t)}flatLabelsAddCall(e,t){return this.track(new Dc(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Rc(e),t)}flatLabelsRemoveCall(e,t){return this.track(new zc(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Bc(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Vc(e),t)}floatingLabelsAddCall(e,t){return this.track(new qc(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Uc(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Gc(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Yc(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new Wc(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new $c(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new Hc(e),t)}globalGetVenueCall(e,t){return this.track(new Zi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new Qi(e),t)}globalShowVenueCall(e,t){return this.track(new Xc(e),t)}journeyClearCall(e,t){return this.track(new Kc(e),t)}journeyDrawCall(e,t){return this.track(new Jc(e),t)}journeySetStepCall(e,t){return this.track(new Zc(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new Qc(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new ed(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new td(e),t)}mappedinLocationCloneCall(e,t){return this.track(new ea(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new ta(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new na(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new nd(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new rd(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new id(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new ra(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new ia(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new aa(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new oa(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new sa(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new ad(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new od(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new sd(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new ud(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new ld(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new cd(e),t)}mapViewDestroyCall(e,t){return this.track(new dd(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new pd(e),t)}mapViewDrawPathCall(e,t){return this.track(new fd(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new hd(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new md(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new gd(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new vd(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new yd(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new bd(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new wd(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new kd(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new _d(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new Md(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new xd(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new Ed(e),t)}mapViewRemovePathCall(e,t){return this.track(new Td(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new Pd(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new Od(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new Sd(e),t)}mapViewSetMapCall(e,t){return this.track(new Id(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new Ad(e),t)}mapViewSetStateCall(e,t){return this.track(new Cd(e),t)}metricsMapLoadEvent(e,t){return this.track(new jd(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new ua(e),t)}offlineSearchConstructorCall(e,t){return this.track(new la(e),t)}offlineSearchSearchCall(e,t){return this.track(new ca(e),t)}offlineSearchSuggestCall(e,t){return this.track(new da(e),t)}};s(lf,"Ampli");var Ld=lf,pa=new Ld;g();var mn,pr,Ct,Rr,Ht,wu,Vy,ku,qy,Ma,jf,xa,Lf,jt,Ry=qt(sy()),zy=qt(Ny()),By=qt(Hs()),Dy="5.39.0",oP="https://api2.amplitude.com/2/httpapi",sP="https://api2.amplitude.com/batch",uP="__unspecified__",Af={branch:"main",version:"0",source:"websdk"},Qe=class e{constructor(){I(this,wu),I(this,ku),I(this,Ma),I(this,xa),I(this,Ct,{}),I(this,Rr,!1),I(this,Ht,void 0),I(this,jt,s((async e=>{cP(e.type)&&(window.removeEventListener("visibilitychange",w(this,jt)),window.removeEventListener("pagehide",w(this,jt)),window.removeEventListener("beforeunload",w(this,jt)),window.removeEventListener("unload",w(this,jt)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==w(e,pr)&&j(e,pr,Dy),typeof navigator<"u"&&null!=navigator.userAgent&&j(this,Ht,new By.UAParser(navigator.userAgent).getResult())}static setContext(t){j(e,mn,t)}static setVersion(t){j(e,pr,t)}addPendingEvent(t){var n;if(null==w(e,mn))return;let r=t.event_type;if(!he(this,ku,qy).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=w(this,Ct)[r];(0,zy.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),w(this,Ct)[r]=t}async sendAllPendingEvents(){if(null==w(e,mn)||Object.keys(w(this,Ct)).length<1)return;if(w(this,Rr))return void R.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in w(this,Ct)){let n=w(this,Ct)[e],r=he(this,Ma,jf).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{j(this,Rr,!0),200===(await he(this,xa,Lf).call(this,sP,t)).status&&j(this,Ct,{})}catch(e){R.warn("Error sending batch product analytics!",e)}finally{j(this,Rr,!1)}}async load(){if(!pa.isLoaded){let{promise:e}=pa.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",w(this,jt)),window.addEventListener("beforeunload",w(this,jt)),window.addEventListener("unload",w(this,jt)),window.addEventListener("visibilitychange",w(this,jt))}))}}async sendEventNow(t){if(null==w(e,mn))return;let n=he(this,Ma,jf).call(this,t);if(null!=n)try{await he(this,xa,Lf).call(this,oP,[n])}catch(e){R.warn("Error sending single product analytics event!",e)}}};mn=new WeakMap,pr=new WeakMap,Ct=new WeakMap,Rr=new WeakMap,Ht=new WeakMap,wu=new WeakSet,Vy=s((function(e){let t=e.event_type;return null!=w(this,Ct)[t]}),"#isEventTypePending"),ku=new WeakSet,qy=s((function(e){if(!he(this,wu,Vy).call(this,e))return!0;let t=e.event_type,n=w(this,Ct)[t];return!(0,Ry.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),Ma=new WeakSet,jf=s((function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y;if(null!=w(Qe,mn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&R.warn("Error processing product analytics event! Unspecified venue slug",e),null==Ar.plan&&R.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=pa.client.getSessionId())?n:Mu(),device_id:null!=(r=pa.client.getDeviceId())?r:_u(),plan:{branch:null!=(o=null==(i=Ar.plan)?void 0:i.branch)?o:Af.branch,version:null!=(a=null==(s=Ar.plan)?void 0:s.version)?a:Af.version,source:null!=(u=null==(l=Ar.plan)?void 0:l.source)?u:Af.source},os_name:null==(c=w(this,Ht))?void 0:c.browser.name,os_version:null==(h=w(this,Ht))?void 0:h.browser.version,device_manufacturer:null==(d=w(this,Ht))?void 0:d.device.vendor,device_model:null==(p=w(this,Ht))?void 0:p.device.model,event_properties:{...e.event_properties,context:w(Qe,mn),sdk_version:w(Qe,pr),browser_name:null==(f=w(this,Ht))?void 0:f.browser.name,browser_version:null==(g=w(this,Ht))?void 0:g.browser.version,venue:null!=(y=null==(v=e.event_properties)?void 0:v.venue)?y:uP},time:e.time}}),"#makeBatchFormattedEvent"),xa=new WeakSet,Lf=s((async function(e,t){return await st()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Fd.production,events:t})})}),"#batchSend"),jt=new WeakMap,s(Qe,"ProductAnalytics"),I(Qe,mn,void 0),I(Qe,pr,void 0);var Cf=Qe,lP=new Cf,be=lP;function cP(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(cP,"areWeLeavingThePage");var _t,zr,Ye,Pa,Ea=class e extends Yt{constructor(e,t){super(e),I(this,_t,void 0),I(this,zr,void 0),I(this,Ye,{}),y(this,"id",""),y(this,"x",0),y(this,"y",0),y(this,"operationHours"),y(this,"externalId"),I(this,Pa,void 0),j(this,_t,e),j(this,zr,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,Ye).map;if(typeof e<"u")return e;let t=w(this,_t).getCollectionItemById("maps",w(this,zr).map);return w(this,Ye).map=t,t}get lat(){var e;let t=w(this,Ye).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=w(this,_t)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,Ye).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,Ye).cachedLatLon.lat}get lon(){var e;let t=w(this,Ye).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=w(this,_t)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return w(this,Ye).cachedLatLon=n.createCoordinateByXY(this.x,this.y),w(this,Ye).cachedLatLon.lon}get paths(){let e=w(this,Ye).paths;if(typeof e<"u")return e;let t=[],n=w(this,_t)._nodesById,r=w(this,Pa);if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return w(this,Ye).paths=t,t}set paths(e){j(this,Pa,e)}get locations(){var e,t,n;let r=w(this,Ye).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=et.instances.get(w(this,_t)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],s=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],n=t.nodes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e)if(n[e].id===s){i.push(t);break}}return w(this,Ye).locations=i,i}get polygon(){var e,t,n,r;let i=w(this,Ye).polygon;if(typeof i<"u")return i;let o,s=null!=(r=null==(n=null==(e=et.instances.get(w(this,_t)))?void 0:e.polygonsByMapId)?void 0:n.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?r:[],a=this.id;for(let e=0,t=s.length;e<t;++e){let t=s[e];t.entrances.map((e=>e.id)).includes(a)&&(o=t)}return w(this,Ye).polygon=o,o}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.nodes.slice();t.options.things.maps&&Ee(n,"map"),["weight","multiplier","accessible"].forEach((function(e){Ee(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Te(t.options,"node",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof wt,r=w(this,_t).venue.slug,i=new ra({with_destination_set:n||void 0,venue:r});return be.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,_t).venue.slug;return be.addPendingEvent(new ia({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,zr)}};_t=new WeakMap,zr=new WeakMap,Ye=new WeakMap,Pa=new WeakMap,s(Ea,"MappedinNode");var Ta=Ea;g();var Xt,Br,Mt,Ia,Sa=class e extends Yt{constructor(e,t){super(e),I(this,Xt,void 0),I(this,Br,void 0),I(this,Mt,{}),y(this,"geometry"),y(this,"perspectives"),y(this,"image"),y(this,"holes"),y(this,"textures"),y(this,"material"),y(this,"label"),y(this,"id",""),y(this,"layer"),y(this,"layerId"),y(this,"name"),y(this,"externalId"),y(this,"vertexes"),y(this,"center"),y(this,"canvasBounds"),y(this,"categoryRank"),I(this,Ia,void 0),j(this,Xt,e),j(this,Br,t);let n=Object.assign({},t);delete n.map,Object.assign(this,n)}get map(){let e=w(this,Mt).map;if(typeof e<"u")return e;let t=w(this,Xt).getCollectionItemById("maps",w(this,Br).map);return w(this,Mt).map=t,t}get locations(){var e,t;let n=w(this,Mt).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=et.instances.get(w(this,Xt)))?void 0:e.locationsByMapId.get(this.map.id))?t:[],{id:o}=this;for(let e=0,t=i.length;e<t;++e){let t=i[e],n=t.polygons;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e)if(n[e].id===o){r.push(t);break}}return w(this,Mt).locations=r,r}get entrances(){let e=w(this,Mt).entrances;if(typeof e<"u")return e;let t=[],n=w(this,Ia),r=w(this,Xt)._nodesById;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return w(this,Mt).entrances=t,t}return[]}set entrances(e){j(this,Ia,e)}get rank(){let e=w(this,Mt).rank;if(typeof e<"u")return e;let{rankings:t}=w(this,Xt);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(w(this,Mt).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(w(this,Mt).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.polygons.slice();t.options.things.maps&&Ee(n,"map"),t.options.things.nodes&&Ee(n,"entrances");let r={fields:n,venue:t.options.venue};try{return(await Te(t.options,"polygon",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof wt,r=w(this,Xt).venue.slug,i=new aa({with_destination_set:n||void 0,venue:r});return be.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,Xt).venue.slug;return be.addPendingEvent(new oa({venue:n})),super.distanceTo(e,t)}toJSON(){return w(this,Br)}};Xt=new WeakMap,Br=new WeakMap,Mt=new WeakMap,Ia=new WeakMap,s(Sa,"MappedinPolygon");var fr=Sa;g();var dP=0,pP="9999-12-31T00:00:00.000Z";function fP(e,t,n=new Date){if(!e.states)return;let r=n||new Date,i=e.states.find((e=>{let t=new Date(e.start||dP),n=new Date(e.end||pP);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}s(fP,"getCurrentLocationState");var ft,zn,ht,Aa,Ca,ja,Uy=["name","description","shortName","tags"],hr=class e extends Yt{constructor(e,t){super(e),I(this,ft,void 0),I(this,zn,void 0),I(this,ht,{}),y(this,"states"),y(this,"id",""),y(this,"name",""),y(this,"type",""),y(this,"description"),y(this,"sortOrder"),y(this,"logo"),y(this,"phone"),y(this,"social"),y(this,"color"),y(this,"shortName"),y(this,"detailsUrl"),y(this,"tags"),y(this,"toMap"),y(this,"externalId"),y(this,"showLabelWhenImagePresent"),y(this,"showSmartLabelWhenImagePresent"),y(this,"picture"),y(this,"operationHours"),y(this,"siblingGroups"),y(this,"gallery"),y(this,"amenity"),y(this,"filterFlags"),I(this,Aa,void 0),I(this,Ca,[]),I(this,ja,void 0),j(this,ft,e),j(this,zn,t);let n=Object.assign({},t);delete n.categories,Object.assign(this,n)}get polygons(){let e=w(this,ht).polygons;if(typeof e<"u")return e;let t=[],n=w(this,Aa),r=w(this,ft)._polygonsById;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return w(this,ht).polygons=t,t}set polygons(e){j(this,Aa,e)}get nodes(){let e=w(this,ht).nodes;if(typeof e<"u")return e;let t=[],n=w(this,Ca),r=w(this,ft)._nodesById;if(n&&n.length)for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return w(this,ht).nodes=t,t}set nodes(e){j(this,Ca,e)}get parent(){let e=w(this,ht).parent;if(typeof e<"u")return e;let t,n=w(this,ft)._locationsById,r=w(this,ja);return void 0!==r&&(t=n[r]),w(this,ht).parent=t,t}set parent(e){j(this,ja,e)}get categories(){let e=w(this,ht).categories;if(typeof e<"u")return e;let t=[];return w(this,zn).categories.forEach((e=>{let n=w(this,ft).getCollectionItemById("categories",e);n&&t.push(n)})),w(this,ht).categories=t,t}get state(){return fP(this,w(this,ft).locationStates)}clone(){let t=w(this,ft).venue.slug;return be.addPendingEvent(new ea({venue:t})),new e(w(this,ft),w(this,zn))}get nodeOperationHours(){let e=w(this,ht).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=w(this,zn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return w(this,ht).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r,i=n||await e.fetch(t);for(let e=0;e<i.length;e++){r=t.locations[e];for(let t of Uy)r[t]=i[e][t]}}static async fetch(t){let n=t.options.things.locations.slice();t.options.things.categories&&Ee(n,"categories"),t.options.things.nodes&&Ee(n,"nodes"),t.options.things.polygons&&Ee(n,"polygons"),t.options.things.locationStates&&Ee(n,"states");let r={fields:n,venue:t.options.venue};try{let n=await Te(t.options,"location",r);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return R.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof wt,r=w(this,ft).venue.slug,i=new ta({with_destination_set:n||void 0,venue:r});return be.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=w(this,ft).venue.slug;return be.addPendingEvent(new na({venue:n})),super.distanceTo(e,t)}toJSON(){let e={...w(this,zn)};for(let t of Uy)e[t]=this[t];return delete e.color,e}};ft=new WeakMap,zn=new WeakMap,ht=new WeakMap,Aa=new WeakMap,Ca=new WeakMap,ja=new WeakMap,s(hr,"MappedinLocation");var gn=hr;g();var qr,mr,La,Gy=["name"],Vr=class e{constructor(e,t){I(this,qr,void 0),I(this,mr,{}),I(this,La,void 0),y(this,"name"),y(this,"externalId"),y(this,"parents"),y(this,"id"),y(this,"icon"),y(this,"iconFromDefaultList"),y(this,"sortOrder"),this.id=t.id,j(this,La,t),j(this,qr,e),Object.assign(this,t)}get locations(){var e;let t=w(this,mr).locations;if(typeof t<"u")return t;let n=[],{locations:r}=w(this,qr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],s=o.categories;if(Array.isArray(s))for(let t=0,r=s.length;t<r;++t)if((null==(e=s[t])?void 0:e.id)===i){n.push(o);break}}return w(this,mr).locations=n,n}get children(){var e;let t=w(this,mr).children;if(typeof t<"u")return t;let{categories:n}=w(this,qr),{id:r}=this,i=[];for(let t=0;t<n.length;t++)r&&null!=(e=n[t].parents)&&e.includes(r)&&i.push(n[t]);return w(this,mr).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Gy)t.categories[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.categories,venue:t.options.venue};try{return(await Te(t.options,"category",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Categories:",e),[]}}toJSON(){let e={...w(this,La)};for(let t of Gy)e[t]=this[t];return e}};qr=new WeakMap,mr=new WeakMap,La=new WeakMap,s(Vr,"MappedinCategory");var gr=Vr;g();var Fa,vn,Ff=class{constructor(e,t){I(this,Fa,void 0),I(this,vn,void 0),y(this,"distance",0),y(this,"path",[]),y(this,"instructions",[]),j(this,vn,e),j(this,Fa,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,s,a,l,u,c,h,d;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=w(this,vn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(s=null==(o=w(this,vn))?void 0:o._nodesById)?void 0:s[e.node.id]:void 0};if("TakeVortex"===(null==(a=p.action)?void 0:a.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=w(this,vn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(d=w(this,vn)._mapsById)?void 0:d[null==(h=p.action)?void 0:h.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var n,r;let i=null==(r=null==(n=w(this,vn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return w(this,Fa)}};Fa=new WeakMap,vn=new WeakMap,s(Ff,"MappedinDirections");var tr=Ff;g();var Nf=class{constructor(e){y(this,"destinations",[]),this.destinations=e}};s(Nf,"MappedinDestinationSet");var wt=Nf;g();var Ra,Na=class e{constructor(e){y(this,"id",""),I(this,Ra,void 0),y(this,"accessible"),y(this,"name"),y(this,"type"),y(this,"weight"),y(this,"multiplier"),y(this,"nodes"),y(this,"filterFlags"),j(this,Ra,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){Ee(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Te(t.options,"vortex",r)).map((t=>new e(t)))}catch(e){return R.error("Fetch Vortexes:",e),[]}}toJSON(){return w(this,Ra)}};Ra=new WeakMap,s(Na,"MappedinVortex");var Da=Na;g();var Ba,Va,qa,Ur,za=class e{constructor(e,t){I(this,Ba,void 0),I(this,Va,void 0),I(this,qa,void 0),I(this,Ur,{}),y(this,"defaultMap",""),y(this,"address",""),y(this,"city",""),y(this,"countrycode",""),y(this,"externalId",""),y(this,"id",""),y(this,"latitude"),y(this,"logo"),y(this,"longitude"),y(this,"name",""),y(this,"operationHours"),y(this,"postal",""),y(this,"slug",""),y(this,"state",""),y(this,"telephone",""),y(this,"tzid",""),y(this,"tzidOverride",""),y(this,"utcOffset",""),y(this,"website",""),y(this,"secureContentStorage",!1),y(this,"defaultLanguage"),y(this,"languages",[]),y(this,"topLocations",[]),y(this,"renderOptions",{useLivePolygons:!1,simplifyDirections:!1}),j(this,Va,e),j(this,Ba,t),Object.assign(this,t)}get metadata(){return be.addPendingEvent(new sa({venue:this.slug})),w(this,qa)}set metadata(e){j(this,qa,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){let n={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let r=await Te(t.options,"venue",n);return new e(t,Array.isArray(r)?r[0]:r)}catch(e){return R.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==w(this,Ur).isMultiBuilding){let e=w(this,Va).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;w(this,Ur).isMultiBuilding=n}return w(this,Ur).isMultiBuilding}toJSON(){return w(this,Ba)}};Ba=new WeakMap,Va=new WeakMap,qa=new WeakMap,Ur=new WeakMap,s(za,"MappedinVenue");var vr=za;g();var Ga,Ua=class e{constructor(e){y(this,"id",""),I(this,Ga,void 0),j(this,Ga,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await Te(t.options,"apollo-theme",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Theme:",e),[]}}toJSON(){return w(this,Ga)}};Ga=new WeakMap,s(Ua,"MappedinTheme");var xu=Ua;g();var $a,Ya=class e{constructor(e){I(this,$a,void 0),y(this,"polygons",[]),j(this,$a,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let n=await Gr({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(n)}catch(e){return R.error("Fetch Rankings:",e),null}}toJSON(){return w(this,$a)}};$a=new WeakMap,s(Ya,"MappedinRankings");var Wa=Ya;g(),g();var Xa,Wr,Ka,Yy=["name","description"],Yr=class e{constructor(e,t){I(this,Xa,void 0),I(this,Wr,void 0),I(this,Ka,{}),y(this,"id",""),y(this,"type",""),y(this,"name",""),y(this,"description"),y(this,"image"),y(this,"startDate"),y(this,"endDate"),y(this,"showDate"),j(this,Wr,t),j(this,Xa,e),Object.assign(this,t)}location(){let e=w(this,Ka).location;if(typeof e<"u")return e;let t,n=w(this,Xa)._locationsById,r=w(this,Wr).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return w(this,Ka).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Yy)t.events[e][n]=r[e][n]}static async fetch(t){let n=t.options.things.events.slice();t.options.things.locations&&Ee(n,"location");let r={fields:n,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await Te(t.options,"event",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Events:",e),[]}}toJSON(){let e={...w(this,Wr)};for(let t of Yy)e[t]=this[t];return e}};Xa=new WeakMap,Wr=new WeakMap,Ka=new WeakMap,s(Yr,"MappedinEvent");var Ha=Yr;g();var Za,Wy=["name"],$r=class e{constructor(e){I(this,Za,void 0),y(this,"id",""),y(this,"name",""),y(this,"value",""),j(this,Za,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Wy)t.locationStates[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await Te(t.options,"location-state",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Location States:",e),[]}}toJSON(){let e={...w(this,Za)};for(let t of Wy)e[t]=this[t];return e}};Za=new WeakMap,s($r,"MappedinLocationState");var Ja=$r;g(),g(),g();var $y=" ",tt=class e{static get separator(){return $y}static set separator(e){$y=e}static parse(e){if(!isNaN(parseFloat(e))&&isFinite(e))return Number(e);let t=String(e).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==t[t.length-1]&&t.splice(t.length-1),""==t)return NaN;let n=null;switch(t.length){case 3:n=t[0]/1+t[1]/60+t[2]/3600;break;case 2:n=t[0]/1+t[1]/60;break;case 1:n=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(n=-n),Number(n)}static toDms(t,n="d",r){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===r)switch(n){case"d":case"deg":r=4;break;case"dm":case"deg+min":r=2;break;case"dms":case"deg+min+sec":r=0;break;default:n="d",r=4}t=Math.abs(t);let i=null,o=null,s=null,a=null;switch(n){default:case"d":case"deg":o=t.toFixed(r),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),s=(60*t%60).toFixed(r),60==s&&(s=(0).toFixed(r),o++),o=("000"+o).slice(-3),s<10&&(s="0"+s),i=o+"°"+e.separator+s+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),s=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),s++),60==s&&(s=0,o++),o=("000"+o).slice(-3),s=("00"+s).slice(-2),a<10&&(a="0"+a),i=o+"°"+e.separator+s+"′"+e.separator+a+"″"}return i}static toLat(t,n,r){let i=e.toDms(e.wrap90(t),n,r);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,n,r){let i=e.toDms(e.wrap180(t),n,r);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,n,r){let i=e.toDms(e.wrap360(t),n,r);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,n=3){if(![1,2,3].includes(Number(n)))throw new RangeError("invalid precision ‘".concat(n,"’"));t=e.wrap360(t);let r=4*2**(n-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*r/360)%r*16/r]}static wrap360(e){return 0<=e&&e<360?e:(e%360+360)%360}static wrap180(e){return-180<e&&e<=180?e:(e+540)%360-180}static wrap90(e){return-90<=e&&e<=90?e:Math.abs((e%360+270)%360-180)-90}};s(tt,"Dms");var Df=tt;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var X=Df,we=Math.PI,$=class e{constructor(e,t){if(isNaN(e))throw new TypeError("invalid lat ‘".concat(e,"’"));if(isNaN(t))throw new TypeError("invalid lon ‘".concat(t,"’"));this._lat=X.wrap90(Number(e)),this._lon=X.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?X.wrap90(X.parse(e)):X.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?X.wrap90(X.parse(e)):X.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(e,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?X.wrap180(X.parse(e)):X.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?X.wrap180(X.parse(e)):X.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?X.wrap180(X.parse(e)):X.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(e,"’"))}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 n,r;if(2==t.length&&([n,r]=t,n=X.wrap90(X.parse(n)),r=X.wrap180(X.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([n,r]=t[0].split(","),n=X.wrap90(X.parse(n)),r=X.wrap180(X.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t[0],"’"));if(1==t.length&&"object"==typeof t[0]){let e=t[0];if("Point"==e.type&&Array.isArray(e.coordinates)?[r,n]=e.coordinates:(null!=e.latitude&&(n=e.latitude),null!=e.lat&&(n=e.lat),null!=e.longitude&&(r=e.longitude),null!=e.lng&&(r=e.lng),null!=e.lon&&(r=e.lon),n=X.wrap90(X.parse(n)),r=X.wrap180(X.parse(r))),isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(n,r)}distanceTo(t,n=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(n))throw new TypeError("invalid radius ‘".concat(n,"’"));let r=n,i=this.lat.toRadians(),o=this.lon.toRadians(),s=t.lat.toRadians(),a=s-i,l=t.lon.toRadians()-o,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2);return r*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)))}initialBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),o=Math.cos(n)*Math.sin(r)-Math.sin(n)*Math.cos(r)*Math.cos(i),s=Math.sin(i)*Math.cos(r),a=Math.atan2(s,o).toDegrees();return X.wrap360(a)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return X.wrap360(n)}midpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),s=Math.cos(n),a=0,l=Math.sin(n),u={x:s+Math.cos(i)*Math.cos(o),y:a+Math.cos(i)*Math.sin(o),z:l+Math.sin(i)},c=Math.atan2(u.z,Math.sqrt(u.x*u.x+u.y*u.y)),h=r+Math.atan2(u.y,u.x),d=c.toDegrees(),p=h.toDegrees();return new e(d,p)}intermediatePointTo(t,n){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let r=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),s=t.lon.toRadians(),a=o-r,l=s-i,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),h=Math.sin((1-n)*c)/Math.sin(c),d=Math.sin(n*c)/Math.sin(c),p=h*Math.cos(r)*Math.cos(i)+d*Math.cos(o)*Math.cos(s),f=h*Math.cos(r)*Math.sin(i)+d*Math.cos(o)*Math.sin(s),g=h*Math.sin(r)+d*Math.sin(o),v=Math.atan2(g,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=v.toDegrees(),w=y.toDegrees();return new e(m,w)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).toRadians(),s=this.lat.toRadians(),a=this.lon.toRadians(),l=Math.sin(s)*Math.cos(i)+Math.cos(s)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(s),h=Math.cos(i)-Math.sin(s)*l,d=a+Math.atan2(c,h),p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}static intersection(t,n,r,i){if(t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r)),isNaN(n))throw new TypeError("invalid brng1 ‘".concat(n,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),s=t.lon.toRadians(),a=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).toRadians(),c=Number(i).toRadians(),h=a-o,d=l-s,p=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(o)*Math.cos(a)*Math.sin(d/2)*Math.sin(d/2)));if(Math.abs(p)<Number.EPSILON)return new e(t.lat,t.lon);let f=(Math.sin(a)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),g=(Math.sin(o)-Math.sin(a)*Math.cos(p))/(Math.sin(p)*Math.cos(a)),v=Math.acos(Math.min(Math.max(f,-1),1)),y=Math.acos(Math.min(Math.max(g,-1),1)),m=u-(Math.sin(l-s)>0?v:2*we-v),w=(Math.sin(l-s)>0?2*we-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(w)||Math.sin(m)*Math.sin(w)<0)return null;let b=-Math.cos(m)*Math.cos(w)+Math.sin(m)*Math.sin(w)*Math.cos(p),_=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(w),Math.cos(w)+Math.cos(m)*b),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(_)+Math.cos(o)*Math.sin(_)*Math.cos(u),-1),1)),x=s+Math.atan2(Math.sin(u)*Math.sin(_)*Math.cos(o),Math.cos(_)-Math.sin(o)*Math.sin(M)),I=M.toDegrees(),S=x.toDegrees();return new e(I,S)}crossTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(s-a))*i}alongTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(s-a));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(a-s))*i}maxLatitude(e){let t=Number(e).toRadians(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(n))).toDegrees()}static crossingParallels(e,t,n){if(e.equals(t))return null;let r=Number(n).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),s=t.lat.toRadians(),a=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(a),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(a)-Math.cos(i)*Math.sin(s)*Math.cos(r),c=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(a);if(c*c>l*l+u*u)return null;let h=Math.atan2(-u,l),d=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+h+d,f=(o+h-d).toDegrees(),g=p.toDegrees();return{lon1:X.wrap180(f),lon2:X.wrap180(g)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,i=this.lat.toRadians(),o=t.lat.toRadians(),s=o-i,a=Math.abs(t.lon-this.lon).toRadians();Math.abs(a)>we&&(a=a>0?-(2*we-a):2*we+a);let l=Math.log(Math.tan(o/2+we/4)/Math.tan(i/2+we/4)),u=Math.abs(l)>1e-11?s/l:Math.cos(i);return Math.sqrt(s*s+u*u*a*a)*r}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians();Math.abs(i)>we&&(i=i>0?-(2*we-i):2*we+i);let o=Math.log(Math.tan(r/2+we/4)/Math.tan(n/2+we/4)),s=Math.atan2(i,o).toDegrees();return X.wrap360(s)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),s=Number(n).toRadians(),a=t/r,l=a*Math.cos(s),u=i+l;Math.abs(u)>we/2&&(u=u>0?we-u:-we-u);let c=Math.log(Math.tan(u/2+we/4)/Math.tan(i/2+we/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(i),d=o+a*Math.sin(s)/h,p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-r)>we&&(r+=2*we);let s=(n+i)/2,a=Math.tan(we/4+n/2),l=Math.tan(we/4+i/2),u=Math.tan(we/4+s/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(a))/Math.log(l/a);isFinite(c)||(c=(r+o)/2);let h=s.toDegrees(),d=c.toDegrees();return new e(h,d)}static areaOf(e,t=6371e3){let n=t,r=e[0].equals(e[e.length-1]);r||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let n=e[t].lat.toRadians(),r=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(n/2)+Math.tan(r/2)),1+Math.tan(n/2)*Math.tan(r/2))}a(e)&&(o=Math.abs(o)-2*we);let s=Math.abs(o*n*n);return r||e.pop(),s;function a(e){let t=0,n=e[0].initialBearingTo(e[1]);for(let r=0;r<e.length-1;r++){let i=e[r].initialBearingTo(e[r+1]),o=e[r].finalBearingTo(e[r+1]);t+=(i-n+540)%360-180,t+=(o-i+540)%360-180,n=o}return t+=(e[0].initialBearingTo(e[1])-n+540)%360-180,Math.abs(t)<90}}equals(t){return t instanceof e||(t=e.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(e="d",t){if(!["d","dm","dms","n"].includes(e))throw new RangeError("invalid format ‘".concat(e,"’"));if("n"==e)return null==t&&(t=4),"".concat(this.lat.toFixed(t),",").concat(this.lon.toFixed(t));let n=X.toLat(this.lat,e,t),r=X.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};s($,"LatLonSpherical");var Kt,Bn,eo,je=$,Hy=["name","shortName"],Hr=class e{constructor(e,t){I(this,Kt,void 0),I(this,Bn,{}),I(this,eo,void 0),y(this,"id",""),y(this,"group",""),y(this,"name",""),y(this,"shortName",""),y(this,"elevation",0),y(this,"subtitle"),y(this,"scale",0),y(this,"layers"),y(this,"x_scale"),y(this,"perspectiveId"),y(this,"scene"),y(this,"width",0),y(this,"height",0),y(this,"georeference",[]),y(this,"_scale",0),j(this,Kt,e),j(this,eo,t),Object.assign(this,t),this._scale=Xy(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=et.instances.get(w(this,Kt)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=et.instances.get(w(this,Kt)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=et.instances.get(w(this,Kt)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=w(this,Bn).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&w(this,Kt)._mapGroupsById[t]||null;return w(this,Bn).mapGroup=n,n}createCoordinateByXY(e,t){return new yr({x:e,y:t,map:this,mappedin:w(this,Kt)})}createCoordinate(e,t){return new yr({lat:e,lon:t,map:this,mappedin:w(this,Kt)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new je(t.target.x,t.target.y),i=new je(n.target.x,n.target.y);e=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-t.control.y,n.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,R.warn(t),R.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Hy)t.maps[e][n]=r[e][n]}static async fetch(t){var n;let r=t.options.things.maps.slice();t.options.perspective&&Ee(r,"perspectives"),t.options.things.mapGroups&&Ee(r,"group"),Ee(r,"elevation"),Ee(r,"x_scale"),Ee(r,"scale"),Ee(r,"georeference");let i={fields:r,perspective:t.options.perspective,venue:t.options.venue};try{let a=await Te(t.options,"map",i),l=s((e=>{let t=o.layers.find((t=>t.id===e));t?t.visible=!0:o.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let i=0,s=a.length;i<s;++i){var o=a[i];if(o){let e=o.perspective;null!=e&&(o.perspectiveId=e.id,r.indexOf("scene")>-1&&(o.scene=e.scene),e.layers?(o.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(l)):o.layers.forEach((e=>{e.visible=!0}))),delete o.perspective}if(t.options.preloadMapGeometry&&null!=(n=o.scene)&&n.polygons&&"string"==typeof o.scene.polygons){let e=await st()(o.scene.polygons);o.scene.polygons=await e.json()}a[i]=new e(t,o)}return a}catch(e){return R.error("Fetch Maps:",e),[]}}get center(){if(w(this,Bn).center)return w(this,Bn).center;let[e,t]=[this.georeference[0].control.x,this.georeference[0].control.y],[n,r]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(e,t),{lat:s,lon:a}=this.createCoordinateByXY(n,r),l=new je(i,o),u=new je(s,a),c=l.midPointTo(u);return w(this,Bn).center=c,c}toJSON(){let e={...w(this,eo)};for(let t of Hy)e[t]=this[t];return e}};Kt=new WeakMap,Bn=new WeakMap,eo=new WeakMap,s(Hr,"MappedinMap");var Qa=Hr;g();var to,Rf,no,zf,Lt,Xr,Eu,Ky,Tu,Jy,Jt,Zt,Qt,en,Bf=class{constructor(e){I(this,to),I(this,no),I(this,Eu),I(this,Tu),y(this,"map"),I(this,Lt,{}),I(this,Xr,void 0),I(this,Jt,void 0),I(this,Zt,void 0),I(this,Qt,void 0),I(this,en,void 0);let{map:t,mappedin:n}=e;null!=e.lat&&null!=e.lon&&(j(this,Jt,e.lat),j(this,Zt,e.lon)),null!=e.x&&null!=e.y&&(j(this,Qt,e.x),j(this,en,e.y)),this.map=t,j(this,Xr,n)}get x(){return he(this,no,zf).call(this,"x")}get y(){return he(this,no,zf).call(this,"y")}get lat(){return he(this,to,Rf).call(this,"lat")}get lon(){return he(this,to,Rf).call(this,"lon")}absoluteDistanceTo(e){return Zy([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=w(this,Lt).nearestNode;if(typeof e<"u")return e;let t=et.instances.get(w(this,Xr)).findNearestNodeOnMap(this.map.id,this);return w(this,Lt).nearestNode=t,t}nodesInRadius(e){if(e<=0)return R.error("Radius must be greater than 0."),[];let t=w(this,Lt).radius,n=w(this,Lt).nodesInRadius;if(t&&n&&w(this,Lt).radius===e)return w(this,Lt).nodesInRadius;let r=et.instances.get(w(this,Xr)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return w(this,Lt).radius=e,w(this,Lt).nodesInRadius=r,r}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};to=new WeakSet,Rf=s((function(e){if(typeof w(this,Jt)<"u"&&typeof w(this,Zt)<"u")return w(this,"lat"===e?Jt:Zt);if(typeof w(this,Qt)<"u"&&typeof w(this,en)<"u"){let[t,n]=he(this,Tu,Jy).call(this,w(this,Qt),w(this,en));return j(this,Jt,t),j(this,Zt,n),w(this,"lat"===e?Jt:Zt)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),no=new WeakSet,zf=s((function(e){if(w(this,Qt)&&w(this,en))return w(this,"x"===e?Qt:en);if(null!=w(this,Jt)&&null!=w(this,Zt)){let[t,n]=he(this,Eu,Ky).call(this,w(this,Jt),w(this,Zt));return j(this,Qt,t),j(this,en,n),w(this,"x"===e?Qt:en)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),Lt=new WeakMap,Xr=new WeakMap,Eu=new WeakSet,Ky=s((function(e,t){let n=this.map.georeference[0],r=new je(n.target.x,n.target.y),i=new je(e,t),o=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,a=o*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*a,c=Math.cos(l)*a;return[n.control.x+u,n.control.y-c]}),"#latLonToXY"),Tu=new WeakSet,Jy=s((function(e,t){let n,r=this.map.georeference[0],i=new je(r.target.x,r.target.y),o=e-r.control.x,s=r.control.y-t,a=Math.atan2(o,s);n=0===o&&0===s?0:0===o?s:o/Math.sin(a);let l=a-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),Jt=new WeakMap,Zt=new WeakMap,Qt=new WeakMap,en=new WeakMap,s(Bf,"MappedinCoordinate");var yr=Bf;g();var io,Jr,ao,Qy=["name"],Kr=class e{constructor(e,t){I(this,io,void 0),I(this,Jr,void 0),I(this,ao,{}),y(this,"id",""),y(this,"name",""),j(this,Jr,t),j(this,io,e),Object.assign(this,t)}get maps(){let e=w(this,ao).maps;if(typeof e<"u")return e;let t=[],{maps:n}=w(this,io),{id:r}=w(this,Jr);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return w(this,ao).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Qy)t.mapGroups[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await Te(t.options,"map-group",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...w(this,Jr)};for(let t of Qy)e[t]=this[t];return e}};io=new WeakMap,Jr=new WeakMap,ao=new WeakMap,s(Kr,"MappedinMapGroup");var ro=Kr;g();var ib=qt(eb());g(),g();var br,Ft,Nt,Vf=[0,4,6,8,10],yn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let n=0;n<e.length;n++)n>0&&!(3&n)&&(t=4294967296*Math.random()),e[n]=t>>>((3&n)<<3)&255;let n=e.map((e=>e.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],Vf.map(((e,t)=>n.slice(e,t===Vf.length-1?void 0:Vf[t+1]).join(""))).join("-")}),"randomId"),tb="mi-session-data",nb="mi-local-data",oo=class e{constructor(){I(this,Ft,void 0),I(this,Nt,void 0);try{let e=sessionStorage.getItem(tb);j(this,Ft,e?JSON.parse(e):{id:yn()})}catch{j(this,Ft,{id:yn()})}try{let e=localStorage.getItem(nb);j(this,Nt,e?JSON.parse(e):{deviceId:yn()})}catch{j(this,Nt,{deviceId:yn()})}w(this,Ft).id||(w(this,Ft).id=yn()),w(this,Nt).deviceId||(w(this,Nt).deviceId=yn())}static getInstance(){return w(this,br)||j(this,br,new e),w(this,br)}static ___clearInstance(){j(this,br,void 0)}saveSessionData(e,t){w(this,Ft)[e]=t;try{return sessionStorage.setItem(tb,JSON.stringify(w(this,Ft))),!0}catch{return!1}}loadSessionData(e){let t=w(this,Ft)[e];if(null!=t)return t}saveLocalData(e,t){w(this,Nt)[e]=t;try{return localStorage.setItem(nb,JSON.stringify(w(this,Nt))),!0}catch{return!1}}loadLocalData(e){let t=w(this,Nt)[e];if(null!=t)return t}};br=new WeakMap,Ft=new WeakMap,Nt=new WeakMap,s(oo,"SafeStorage"),I(oo,br,void 0);var so=oo;g();var qf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage","renderOptions"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible","filterFlags"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity","filterFlags"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};function Ou(e){return/^[\da-f]{24}$/i.test(e)}function rb(e,t=!1){let n="";if(null!=e){let r="?",i=t?Object.keys(e).filter((e=>!["slug","venue"].includes(e))):Object.keys(e);for(let t=0,o=i.length;t<o;++t){let o=i[t],s=e[o];null!=s&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(s)),r="&")}}return n}function hP(e,t,n,r=!1){var i,o;return r?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(n.venue||n.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(n.venue||n.slug).concat(rb(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+rb(n)}async function Te(e,t,n,r=!1){return Gr(e,t,n,r,!0)}async function Gr(e,t,n,r=!1,i=!1){let o=hP(e,t,n,r),s=await Su(e,o,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}function mP(e,t,n=!1){let r={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};n&&delete r.language,r.language&&(t+="&lang=".concat(encodeURIComponent(r.language)));let{headers:i}=e;i["Content-Type"]=i["Content-Type"]||"text/json",e.accessToken?i.Authorization="Bearer ".concat(e.accessToken):e.noAuth||e.clientId&&e.clientSecret&&(i["x-mappedin-key"]=btoa(e.clientId),i["x-mappedin-secret"]=btoa(e.clientSecret)),r.language&&(i["Accept-Language"]=r.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function Su(e,t,n=!1){let r=mP(e,t,n),i=await st()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function Ee(e,t){e.indexOf(t)<0&&e.push(t)}function Zy([e,t],[n,r]){let i=new je(e,t),o=new je(n,r);return i.distanceTo(o)}function Xy(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let n=e.georeference[0],r=e.georeference[2],i=new je(n.target.x,n.target.y),o=new je(r.target.x,r.target.y),s=i.distanceTo(o),a=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(a*a+l*l)/s}catch(n){t=1,R.warn(n),R.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Bi(e){var t;return e instanceof fr?e.entrances.map((e=>e.id)):e instanceof gn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function ab(e){let t={},{maps:n,images:r,scenes:i,polygons:o}=e;if(null!=r)try{let e=Object.keys(r).map((e=>fetch("data:image/png;base64,".concat(r[e])).then((e=>e.blob())).then((n=>{t[e]=n})).catch((e=>{R.error(e)}))));await Promise.all(e)}catch(e){R.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=r&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var n,r;if(null!=(n=null==e?void 0:e.image)&&n.url&&null!=(r=null==e?void 0:e.image)&&r.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}}))))})),null!=r&&o.forEach((e=>{var n;if(null!=(n=null==e?void 0:e.image)&&n.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function Zr(e,t,n){let r;return function(...i){let o=this,a=s((function(){r=null,n||e.apply(o,i)}),"later"),l=n&&!r;clearTimeout(r),r=setTimeout(a,t),l&&e.apply(o,i)}}function ob(e,t,n,r=0){if(!e||e<=0)return 0;let i=0;r>=0&&r<=1&&(i=r/10);let o=1e-5,s=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,s))}function _u(){return so.getInstance().loadLocalData("deviceId")}function Mu(){return so.getInstance().loadSessionData("id")}s(Ou,"isGatewayKey"),s(rb,"stringifyQuery"),s(hP,"buildUrl"),s(Te,"getArray"),s(Gr,"getObject"),s(mP,"constructParamsForRequest"),s(Su,"generateAPIRequest"),s(Ee,"addToSet"),s(Zy,"getDistanceBetweenLatLon"),s(Xy,"getMapScale"),s(Bi,"getNodesForNavigatable"),s(ab,"populateBundledImagesAsBlobs"),s(Zr,"debounce"),s(ob,"normalizeCategoryRank"),s(_u,"getDeviceID"),s(Mu,"getSessionID");var sb=s(((e,t)=>{if("string"==typeof e){if(void 0===t||!Array.isArray(t.polygons))return null;e=t.polygons.find((function(t){return t.id===e}))}let n=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){n=e.locations[0];for(let t=0,r=e.locations.length;t<r;t++){let r=e.locations[t];for(;void 0!==r.parent;)r=r.parent,r.polygons.includes(e)&&(n=r);if(void 0===r.parent&&r.polygons.includes(e))return r}}return n}),"getPrimaryLocationForPolygon");function ub(e){var t;let n={...e};for(let[e,r]of Object.entries(qf))n[e]=(0,ib.default)(r.concat(null!=(t=n[e])?t:[]));return n}function Uf(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return lb(this.cover(t,n),t,n,e)}function lb(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,s,a,l,u,c,h,d,p=e._root,f={data:r},g=e._x0,v=e._y0,y=e._x1,m=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((u=t>=(o=(g+y)/2))?g=o:y=o,(c=n>=(s=(v+m)/2))?v=s:m=s,i=p,!(p=p[h=c<<1|u]))return i[h]=f,e;if(a=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===a&&n===l)return f.next=p,i?i[h]=f:e._root=f,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=n>=(s=(v+m)/2))?v=s:m=s}while((h=c<<1|u)==(d=(l>=s)<<1|a>=o));return i[d]=p,i[h]=f,e}function cb(e){var t,n,r,i,o=e.length,s=new Array(o),a=new Array(o),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(s[n]=r,a[n]=i,r<l&&(l=r),r>c&&(c=r),i<u&&(u=i),i>h&&(h=i));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<o;++n)lb(this,s[n],a[n],e[n]);return this}function Gf(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var s,a,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(a=(t<r)<<1|e<n,s=new Array(4),s[a]=u,u=s,l*=2,a){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function Yf(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Wf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ze(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function $f(e,t,n){var r,i,o,s,a,l,u,c=this._x0,h=this._y0,d=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new ze(g,c,h,d,p)),null==n?n=1/0:(c=e-n,h=t-n,d=e+n,p=t+n,n*=n);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>d||(o=l.y0)>p||(s=l.x1)<c||(a=l.y1)<h))if(g.length){var v=(i+s)/2,y=(o+a)/2;f.push(new ze(g[3],v,y,s,a),new ze(g[2],i,y,v,a),new ze(g[1],v,o,s,y),new ze(g[0],i,o,v,y)),(u=(t>=y)<<1|e>=v)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-u],f[f.length-1-u]=l)}else{var m=e-+this._x.call(null,g.data),w=t-+this._y.call(null,g.data),b=m*m+w*w;if(b<n){var _=Math.sqrt(n=b);c=e-_,h=t-_,d=e+_,p=t+_,r=g.data}}return r}function Hf(e){if(isNaN(o=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,i,o,s,a,l,u,c,h,d,p=this._root,f=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(a=(f+v)/2))?f=a:v=a,(c=s>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[h=c<<1|u]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[d]=p:this._root=p),this):(this._root=i,this)}function db(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Xf(){return this._root}function Kf(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function Jf(e){var t,n,r,i,o,s,a=[],l=this._root;for(l&&a.push(new ze(l,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,s=t.y1)&&l.length){var u=(r+o)/2,c=(i+s)/2;(n=l[3])&&a.push(new ze(n,u,c,o,s)),(n=l[2])&&a.push(new ze(n,r,c,u,s)),(n=l[1])&&a.push(new ze(n,u,i,o,c)),(n=l[0])&&a.push(new ze(n,r,i,u,c))}return this}function Zf(e){var t,n=[],r=[];for(this._root&&n.push(new ze(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,a=t.y0,l=t.x1,u=t.y1,c=(s+l)/2,h=(a+u)/2;(o=i[0])&&n.push(new ze(o,s,a,c,h)),(o=i[1])&&n.push(new ze(o,c,a,l,h)),(o=i[2])&&n.push(new ze(o,s,h,c,u)),(o=i[3])&&n.push(new ze(o,c,h,l,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function pb(e){return e[0]}function Qf(e){return arguments.length?(this._x=e,this):this._x}function fb(e){return e[1]}function eh(e){return arguments.length?(this._y=e,this):this._y}function Qr(e,t,n){var r=new th(null==t?pb:t,null==n?fb:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function th(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function hb(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}s(ub,"mergeThings"),g(),g(),g(),g(),s(Uf,"default"),s(lb,"add"),s(cb,"addAll"),g(),s(Gf,"default"),g(),s(Yf,"default"),g(),s(Wf,"default"),g(),g(),s(ze,"default"),s($f,"default"),g(),s(Hf,"default"),s(db,"removeAll"),g(),s(Xf,"default"),g(),s(Kf,"default"),g(),s(Jf,"default"),g(),s(Zf,"default"),g(),s(pb,"defaultX"),s(Qf,"default"),g(),s(fb,"defaultY"),s(eh,"default"),s(Qr,"quadtree"),s(th,"Quadtree"),s(hb,"leaf_copy");var nt=Qr.prototype=th.prototype;nt.copy=function(){var e,t,n=new th(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=hb(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=hb(t));return n},nt.add=Uf,nt.addAll=cb,nt.cover=Gf,nt.data=Yf,nt.extent=Wf,nt.find=$f,nt.remove=Hf,nt.removeAll=db,nt.root=Xf,nt.size=Kf,nt.visit=Jf,nt.visitAfter=Zf,nt.x=Qf,nt.y=eh;var tn,fe,Dt=class e{constructor(e){I(this,tn,void 0),y(this,"categories"),y(this,"locations"),y(this,"vortexes"),y(this,"maps"),y(this,"nodes"),y(this,"polygons"),y(this,"events"),y(this,"mapGroups"),y(this,"locationStates"),y(this,"rankings"),y(this,"languages",{}),I(this,fe,{}),j(this,tn,e)}get polygonsByMapId(){if(w(this,fe).polygonsByMapId)return w(this,fe).polygonsByMapId;let e,t={};for(let n=0,r=w(this,tn).polygons.length;n<r;++n)e=w(this,tn).polygons[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return w(this,fe).polygonsByMapId=n,w(this,fe).polygonsByMapId}get nodesByMapId(){if(w(this,fe).nodesByMapId)return w(this,fe).nodesByMapId;let e,t={};for(let n=0,r=w(this,tn).nodes.length;n<r;++n)e=w(this,tn).nodes[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return w(this,fe).nodesByMapId=n,w(this,fe).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(w(this,fe).nodeTreesByMap||(w(this,fe).nodeTreesByMap=new Map),!w(this,fe).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=Qr();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),w(this,fe).nodeTreesByMap.set(e,r)}return w(this,fe).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,n){var r;if(w(this,fe).nodeTreesByMap||(w(this,fe).nodeTreesByMap=new Map),!w(this,fe).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=Qr();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),w(this,fe).nodeTreesByMap.set(e,n)}let i=w(this,fe).nodeTreesByMap.get(e),o=[],s=t.x,a=t.y;return i.visit(((e,t,r,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-s)**2+(t.y-a)**2)<=n&&o.push(t)}while(e=e.next);let u=s-Math.max(t,Math.min(i,s)),c=a-Math.max(r,Math.min(l,a));return u*u+c*c>=n*n})),o}get locationsByMapId(){if(w(this,fe).locationsByMapId)return w(this,fe).locationsByMapId;let e,t={};for(let n=0,r=w(this,tn).locations.length;n<r;++n){e=w(this,tn).locations[n];for(let n=0,r=e.polygons.length;n<r;++n)t[e.polygons[n].map.id]||(t[e.polygons[n].map.id]=[]),-1===t[e.polygons[n].map.id].indexOf(e)&&t[e.polygons[n].map.id].push(e);for(let n=0,r=e.nodes.length;n<r;++n){let r=e.nodes[n];t[r.map.id]||(t[r.map.id]=[]),-1===t[r.map.id].indexOf(e)&&t[r.map.id].push(e)}}let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return w(this,fe).locationsByMapId=n,w(this,fe).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clear(){e.instances.clear()}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};tn=new WeakMap,fe=new WeakMap,s(Dt,"MappedinCache"),y(Dt,"instances",new Map);var nh=Dt,et=nh,Oa=(e=>(e.CATEGORY="categories",e.EVENT="events",e.LOCATION="locations",e.MAPGROUP="mapGroups",e.MAP="maps",e.NODE="nodes",e.POLYGON="polygons",e.VORTEX="vortexes",e))(Oa||{}),Iu={categories:gr,locations:gn,vortexes:Da,maps:Qa,nodes:Ta,polygons:fr,venue:vr,events:Ha,mapGroups:ro,themes:xu,locationStates:Ja,rankings:Wa},Au=(e=>(e[e.LANGUAGE_CHANGED=0]="LANGUAGE_CHANGED",e))(Au||{});g(),g(),g(),g();var rt=6371008.8,mb={centimeters:100*rt,centimetres:100*rt,degrees:rt/111325,feet:3.28084*rt,inches:39.37*rt,kilometers:rt/1e3,kilometres:rt/1e3,meters:rt,metres:rt,miles:rt/1609.344,millimeters:1e3*rt,millimetres:1e3*rt,nauticalmiles:rt/1852,radians:1,yards:1.0936*rt},O3={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/rt,yards:1.0936133};function Vn(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function it(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!rh(e[0])||!rh(e[1]))throw new Error("coordinates must contain numbers");return Vn({type:"Point",coordinates:e},t,n)}function bn(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Vn({type:"LineString",coordinates:e},t,n)}function wr(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function gb(e,t){void 0===t&&(t="kilometers");var n=mb[t];if(!n)throw new Error(t+" units is invalid");return e*n}function vb(e,t){void 0===t&&(t="kilometers");var n=mb[t];if(!n)throw new Error(t+" units is invalid");return e/n}function uo(e){return 180*(e%(2*Math.PI))/Math.PI}function ut(e){return e%360*Math.PI/180}function rh(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Cu(e,t,n){if(null!==e)for(var r,i,o,s,a,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,v=f?e.features.length:1,y=0;y<v;y++){a=(c=!!(u=f?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<a;m++){var w=0,b=0;if(null!==(s=c?u.geometries[m]:u)){l=s.coordinates;var _=s.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,y,w,b))return!1;d++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,y,w,b))return!1;d++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,y,w,b))return!1;d++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,y,w,b))return!1;d++}b++}w++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===Cu(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ih(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function gP(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function lo(e,t){gP(e,(function(e,n,r,i,o){var s,a=null===e?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Vn(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Vn({type:s,coordinates:u},r),n,l))return!1}}))}function vP(e,t){lo(e,(function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,u=0;if(!1===Cu(e,(function(o,c,h,d,p){if(void 0===s||n>a||d>l||p>u)return s=o,a=n,l=d,u=p,void(i=0);var f=bn([s,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,s=o})))return!1}}}))}function yb(e,t,n){var r=n,i=!1;return vP(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function ah(e){var t=[1/0,1/0,-1/0,-1/0];return Cu(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}s(Vn,"feature"),s(it,"point"),s(bn,"lineString"),s(wr,"featureCollection"),s(gb,"radiansToLength"),s(vb,"lengthToRadians"),s(uo,"radiansToDegrees"),s(ut,"degreesToRadians"),s(rh,"isNumber"),s(Cu,"coordEach"),s(ih,"featureEach"),s(gP,"geomEach"),s(lo,"flattenEach"),s(vP,"segmentEach"),s(yb,"segmentReduce"),s(ah,"bbox"),ah.default=ah;var ju=ah;function nn(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function gt(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function bb(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function yP(e,t,n){void 0===n&&(n={});var r=nn(e),i=nn(t),o=ut(i[1]-r[1]),s=ut(i[0]-r[0]),a=ut(r[1]),l=ut(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return gb(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}g(),g(),g(),g(),s(nn,"getCoord"),s(gt,"getCoords"),s(bb,"getType"),s(yP,"distance");var qn=yP;function Lu(e,t){return void 0===t&&(t={}),yb(e,(function(e,n){var r=n.geometry.coordinates;return e+qn(r[0],r[1],t)}),0)}function Fu(e,t,n){if(void 0===n&&(n={}),!0===n.final)return bP(e,t);var r=nn(e),i=nn(t),o=ut(r[0]),s=ut(i[0]),a=ut(r[1]),l=ut(i[1]),u=Math.sin(s-o)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return uo(Math.atan2(u,c))}function bP(e,t){var n=Fu(t,e);return n=(n+180)%360}function Nu(e,t,n,r){void 0===r&&(r={});var i=nn(e),o=ut(i[0]),s=ut(i[1]),a=ut(n),l=vb(t,r.units),u=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a));return it([uo(o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(u))),uo(u)],r.properties)}function wP(e){if(!e)throw new Error("geojson is required");var t=[];return lo(e,(function(e){kP(e,t)})),wr(t)}function kP(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=gt(r);break;case"LineString":n=[gt(r)]}n.forEach((function(n){_P(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function _P(e,t){var n=[];return e.reduce((function(e,r){var i=bn([e,r],t);return i.bbox=MP(e,r),n.push(i),r})),n}function MP(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}s(Lu,"length"),g(),g(),g(),s(Fu,"bearing"),s(bP,"calculateFinalBearing"),g(),s(Nu,"destination"),g(),g(),s(wP,"lineSegment"),s(kP,"lineSegmentFeature"),s(_P,"createSegments"),s(MP,"bbox");var oh=wP,Db=qt(Fb(),1);function KP(e,t){var n={},r=[];if("LineString"===e.type&&(e=Vn(e)),"LineString"===t.type&&(t=Vn(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=Nb(e,t);return i&&r.push(i),wr(r)}var o=(0,Db.default)();return o.load(oh(t)),ih(oh(e),(function(e){ih(o.search(e),(function(t){var i=Nb(e,t);if(i){var o=gt(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),wr(r)}function Nb(e,t){var n=gt(e),r=gt(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;var p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p>=0&&p<=1&&f>=0&&f<=1?it([i+p*(s-i),o+p*(a-o)]):null}s(KP,"lineIntersect"),s(Nb,"intersects");var Rb=KP;function JP(e,t,n){void 0===n&&(n={});var r=it([1/0,1/0],{dist:1/0}),i=0;return lo(e,(function(e){for(var o=gt(e),s=0;s<o.length-1;s++){var a=it(o[s]);a.properties.dist=qn(t,a,n);var l=it(o[s+1]);l.properties.dist=qn(t,l,n);var u=qn(a,l,n),c=Math.max(a.properties.dist,l.properties.dist),h=Fu(a,l),d=Nu(t,c,h+90,n),p=Nu(t,c,h-90,n),f=Rb(bn([d.geometry.coordinates,p.geometry.coordinates]),bn([a.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=qn(t,g,n),g.properties.location=i+qn(a,g,n)),a.properties.dist<r.properties.dist&&((r=a).properties.index=s,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=s+1,r.properties.location=i+u),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=s),i+=u}})),r}s(JP,"nearestPointOnLine");var po=JP;function ZP(e,t,n){var r=gt(n);if("LineString"!==bb(n))throw new Error("line must be a LineString");for(var i,o=po(n,e),s=po(n,t),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)a.push(r[l]);return a.push(i[1].geometry.coordinates),bn(a,n.properties)}s(ZP,"lineSlice");var bh=ZP;function QP(e,t){void 0===t&&(t={});var n=ju(e);return it([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}g(),s(QP,"center");var zb=QP;function eO(e,t,n){void 0===n&&(n={});for(var r=nn(e),i=gt(t),o=0;o<i.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===i.length-2&&(s="end"),0===o&&o+1===i.length-1&&(s="both")),tO(i[o],i[o+1],r,s,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function tO(e,t,n,r,i){var o=n[0],s=n[1],a=e[0],l=e[1],u=t[0],c=t[1],h=u-a,d=c-l,p=(n[0]-a)*d-(n[1]-l)*h;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<=u:u<=o&&o<a:d>0?l<s&&s<=c:c<=s&&s<l:"end"===r?Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<u:u<o&&o<=a:d>0?l<=s&&s<c:c<s&&s<=l:"both"===r&&(Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<u:u<o&&o<a:d>0?l<s&&s<c:c<s&&s<l):Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<=u:u<=o&&o<=a:d>0?l<=s&&s<=c:c<=s&&s<=l}g(),s(eO,"booleanPointOnLine"),s(tO,"isPointOnLineSegment");var Bb=eO,nO=1e-7,Vb=.005,qb=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];function wh(e,t){let n=oO(t);return wr(e.features.reduce(((e,t)=>{let r=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(n.has(t)&&e.push(n.get(t)),e)),[]);return o.length&&(r=rO(t,o)),e.push(...r),e}),[]))}function rO(e,t){return t.reduce(((e,t)=>{let n={epsilon:nO},r=e.findIndex((e=>Bb(zb(t),e,n))),i=e[r];if(i){let[n,o]=aO(i,t);e.splice(r,1,n,o)}return e}),[e])}function iO(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function aO(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>po(e,it(t))));return r.reduce(((t,n)=>{let r=bh(it(n),i[0],e),o=bh(it(n),i[1],e),s=Lu(r)<Lu(o)?r:o;return s.properties={...e.properties,entrances:[]},t.concat([s])}),[])}function Ub(e){let t=new Map;for(let n in e){let r=e[n];if(!iO(r))continue;let{altitude:i,color:o,width:s,height:a,opacity:l}=r,u={altitude:i,color:o,width:s,height:a,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function oO(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Gb(e){if(0===e.length)return;let t;for(let n of e)if("number"==typeof n.elevation){if(!t){t=n;continue}"number"==typeof t.elevation&&(t=Math.abs(n.elevation)===Math.abs(t.elevation)?n.elevation>t.elevation?n:t:Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)}return t}function SO(e){if(null==e||"object"!=typeof e)return!1;for(let t of qb)if("Uint8Array"!==e[t][Symbol.toStringTag])return!1;return!0}function IO(e){var t;if(null==e||"object"!=typeof e)return!1;let n=["building.geojson","category.geojson","location.geojson","manifest.geojson"];for(let r of n)if("Uint8Array"!==(null==(t=null==e?void 0:e[r])?void 0:t[Symbol.toStringTag]))return!1;return!0}async function S0(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Gh(),Uh)))).unzipSync(e);if(!IO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"building.geojson":n["building.geojson"],"category.geojson":n["category.geojson"],"location.geojson":n["location.geojson"],"manifest.geojson":n["manifest.geojson"],space:{},obstruction:{},node:{},level:{},connection:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}async function Wh(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Gh(),Uh)))).unzipSync(e);if(!SO(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}function I0(e){let[t,n,r,i]=ju(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function AO(e,t,n){let r=n.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",s=e.externalId||o||"",a=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/n.mapScale;return{id:o,georeference:r,name:s,shortName:s,scene:{polygons:t},elevation:a,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(wh,"processObstructions"),s(rO,"splitObstructionByAllEntrances"),s(iO,"isPolygonStyle"),s(aO,"splitObstructionByEntrance"),s(Ub,"getStylesMap"),s(oO,"getEntranceMap"),g(),g(),s(Gb,"findMapWithElevationClosestToZero"),g(),s(SO,"validateStaticMVFFiles"),s(IO,"validateStaticMVFv1Files"),s(S0,"unzipMVFv1"),s(Wh,"unzipMVF"),s(I0,"getMapExtent"),s(AO,"convertMap");var Hh=class{constructor(e){y(this,"mapExtent"),y(this,"stretchRatio"),y(this,"midLat"),y(this,"midLong"),y(this,"mapUnitRatio",1e6),y(this,"latDistance"),y(this,"longDistance"),y(this,"mapScale"),y(this,"widthInMapUnits"),y(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,s=(n+i)/2,a=new je(o,i),l=new je(o,n),u=new je(t,s),c=new je(r,s);this.latDistance=u.distanceTo(c),this.longDistance=a.distanceTo(l);let h=this.latDistance/this.longDistance,d=(r-t)/(i-n);this.stretchRatio=h/d,this.midLat=o,this.midLong=s,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],n=(e[0]-this.midLong)*this.mapUnitRatio,r=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:n+this.widthInMapUnits/2,y:r+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:n,maxLong:r}=this.mapExtent;return[[e,t],[e,r],[n,r],[n,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};s(Hh,"CoordinateConverter");var Zu=Hh;function CO(e,t){let n=[];return e.forEach(((r,i)=>{let o=r.properties.map||"",s=t.get(o);if(s){let t=s.convert(r.geometry.coordinates),a=r.properties.externalId||"",l=[];r.properties.neighbors.forEach((t=>{var n;let r=null!=(n=t.weight)?n:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),n.push({id:i,map:o,externalId:a,paths:l,...t})}})),n}function jO(e,t,n){let r=[];return e.features.forEach((e=>{let i=n.convert(e.geometry.coordinates);r.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),r}s(CO,"convertNodes"),s(jO,"convertNodes_MVFv1");var P0=s(((e,t,n,r,i,o)=>{var s,a,l;let u,c=[],h=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,d=i.Walls,p=null!=(s=i.ExteriorWalls)?s:d,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/h},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]},g={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==p?void 0:p.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/h},width:null==p?void 0:p.width},material:{color:(null==p?void 0:p.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let s=t.features[i];if("Point"===s.geometry.type)continue;let d="desk-entrance"===(null==(a=s.properties.kind)?void 0:a.toLowerCase()),p=(d?s.properties.externalId:s.properties.id)||"",v=s.properties.externalId||"",y=n.get(p)||[];if("destinationNodes"in s.properties&&s.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),d)n.set(v,y);else{let n=r.get(s.properties.id),a=s.properties.center?o.convert(s.properties.center):void 0,d=s.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=s.properties.kind||"",w="void"===m.toLowerCase(),b=1-(i+1)/t.features.length*Vb;"LineString"===s.geometry.type&&"wall"===(null==(l=s.properties.kind)?void 0:l.toLowerCase())?(u=s.geometry.coordinates.map((e=>o.convert(e))),s.properties.footprintComponent?g.vertexes.push(u):f.vertexes.push(u)):(u=s.geometry.coordinates[0].map((e=>o.convert(e))),c.push({entrances:y,map:e,id:p,externalId:v,layer:m,geometry:{visible:!w,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/h*b},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:u,center:a,holes:d}))}}return f.vertexes.length>0&&c.push(f),g.vertexes.length>0&&c.push(g),c}),"generateMappedinPolygons"),O0=s(((e,t,n)=>{let r=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>n.convert(e))),s=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),a=Math.max(n.widthInMapUnits,n.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),r.push({entrances:null!=l?l:[],map:e,id:t.properties.id||"",externalId:t.properties.externalId||"",layer:t.properties.layer||"Polygon",geometry:{visible:!0,position:{x:0,y:0,z:((null==i?void 0:i.altitude)||0)*n.mapScale/a},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*n.mapScale/a}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:s})})),r}),"generateMappedinPolygons_MVFv1");function LO(e,t,n,r,i,o,s){let a=P0(e,n,r,i,o,s),l=P0(e,t,r,i,o,s);return a.concat(l)}function FO(e,t){let n=[];return e.forEach((e=>{var r;let i;for(let n of e.nodes){let r=t.get(n);if(r)for(let t of r.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}n.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(r=e.accessible)&&r})})),n}function NO(e){let t=new Map;return e.features.forEach((e=>{var n,r,i,o,s,a,l;let u="",c=["n_".concat(e.properties.id)];e.properties.destinations.forEach((e=>{let t=e.split("-");u=t[0],c.push("n_".concat(t[1]))}));let h=null!=(r=null==(n=t.get(u))?void 0:n.nodes)?r:[],d=new Set([...h,...c]);t.set(u,{id:u,name:null!=(i=e.properties.name)?i:"",type:null!=(o=e.properties.type)?o:"",weight:null!=(s=e.properties.weight)?s:1e3,multiplier:null!=(a=e.properties.multiplier)?a:1,nodes:Array.from(d),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function A0(e,t){if(t)for(let n in t)t.hasOwnProperty(n)&&Object.assign(e[n],t[n]);return e}function $h(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"connection.json":JSON.parse(n(e["connection.json"])),"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"styles.json":JSON.parse(n(e["styles.json"])),"map.geojson":JSON.parse(n(e["map.geojson"])),"mapstack.geojson":JSON.parse(n(e["mapstack.geojson"])),"node.geojson":JSON.parse(n(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(null!=e.annotation){let r=Object.keys(e.annotation);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.annotation[r]=JSON.parse(n(e.annotation[i]))}}let r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.entrance);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.entrance[i]=JSON.parse(n(e.entrance[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function C0(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"building.geojson":JSON.parse(n(e["building.geojson"])),"category.geojson":JSON.parse(n(e["category.geojson"])),"location.geojson":JSON.parse(n(e["location.geojson"])),obstruction:{},space:{},level:{},node:{},connection:{}},r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.node);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.node[i]=JSON.parse(n(e.node[r]))}let s=Object.keys(e.level);for(let r of s){let i=r.replace(/\.json|\.geojson/g,"");t.level[i]=JSON.parse(n(e.level[r]))}let a=Object.keys(e.connection);for(let r of a){let i=r.replace(/\.json|\.geojson/g,"");t.connection[i]=JSON.parse(n(e.connection[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function j0(e,t){var n;let r=null!=(n=t.properties.externalId)?n:"";return 0===r.length&&(r=t.properties.id),"location-".concat(e,"-").concat(r.toLowerCase().replace(" ","-"))}function L0(e,t){var n;let r=new Set;if("entrance"===e)r.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add(e),t.properties.footprintComponent&&r.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add("default"===e?"Room":e);let i=null!=(n=t.properties.tags)?n:[];if(i.length>0)for(let e of i)r.add(e)}return Array.from(r).filter((e=>e.length>0))}function F0(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Yh(e,t,n){let r=L0(e,t);for(let e of r){let t=F0(e);null==n[t]&&(n[t]={id:t,name:e})}}function N0(e){var t,n,r;return null!=(r=null==(n=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:n.startsWith("connection"))&&r}function DO(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return N0(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function wo(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!N0(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=DO(t),s=j0(e,t);if(null==r[s]){let e={id:s,type:"",name:o,nodes:[],polygons:[],categories:[]};r[s]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[s].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[s].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[s].nodes.push(e)}let a=L0(e,t);for(let e of a){let t=F0(e);r[s].categories.push(t)}}function RO(e,t=new Map){var n,r,i,o,s,a,l,u,c;let h={},d={},{space:p,"map.geojson":f,entrance:g,obstruction:v}=e;for(let e of f){let f=null!=(r=null==(n=p[e.id])?void 0:n.features)?r:[],y=null!=(o=null==(i=g[e.id])?void 0:i.features)?o:[],m=null!=(a=null==(s=v[e.id])?void 0:s.features)?a:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(Yh("space",t,d),wo("space",t,e,h));let w=new Map;for(let t of y)w.set(t.properties.id,t),t.properties.externalId&&(Yh("entrance",t,d),wo("entrance",t,e,h));let b={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};wo("entrance",b,e,h);for(let n of m){if(Yh("obstruction",n,d),wo("obstruction",n,e,h),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=w.get(n);t&&wo("entrance",{...t,properties:{...t.properties,externalId:b.properties.externalId}},e,h)}}if("desks"===(null==(u=n.properties.kind)?void 0:u.toLowerCase())&&n.properties.externalId.length>0){let e=null!=(c=t.get(n.properties.id))?c:[];for(let t of e){let e=j0("obstruction",n);null!=h[e]&&h[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(h),categories:Object.values(d)}}function D0(e){var t,n,r,i,o,s,a,l,u,c;let h=null!=(t=e.obstruction)?t:[],d=null!=(n=e.space)?n:[],p=null!=(r=e.entrance)?r:[],f=null!=(i=e["mapstack.geojson"])?i:[],g=null!=(o=e["map.geojson"])?o:[],v=null!=(s=e["styles.json"])?s:{},y=null!=(a=e["manifest.geojson"])?a:{},m=null!=(l=e["node.geojson"])?l:{},w=null!=(u=e["connection.json"])?u:[],b={},_=new Map,M=[],x=Ub(v),I=new Map,S=new Map;g.forEach((e=>{let t=e.id;t&&!S.has(t)&&S.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!S.has(e))return;let t=wh(h[e],p[e]);if(t.features.length){let n=I0(t),r=new Zu(n);_.set(e,r),b[e]=LO(e,t,d[e],I,x,v,r),M.push(AO(S.get(e),b[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let O=new Map;"features"in m&&m.features.forEach((e=>{let t=e.properties.id;t&&!O.has(t)&&O.set(t,e)}));let k=Object.values(b).flat(),E=FO(w,O),P=CO(O,_),A=y.features[0],C=A.properties.name,j=A.geometry.coordinates[0],T=A.geometry.coordinates[1],F=(null==(c=Gb(M))?void 0:c.id)||"",{locations:N,categories:R}=RO(e,I);return{polygons:k,venue:{name:C,latitude:T,longitude:j,defaultMap:F},maps:M,vortexes:E,nodes:P,locations:N,mapGroups:[],locationStates:[],categories:R,themes:[],imageBinaries:new Map}}function R0(e){var t,n,r,i,o,s,a;let l=null!=(t=e.obstruction)?t:{},u=null!=(n=e.space)?n:{},c=null!=(r=e.node)?r:{},h=null!=(i=e.level)?i:{},d=null!=(o=e["manifest.geojson"])?o:{},p=null!=(s=e.connection)?s:{},f={},g=new Map,v=[],y=[],m=[];Object.keys(h).forEach((e=>{let t=wh(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=I0(t),r=new Zu(n);g.set(e,r);let i=O0(e,u[e],r),o=O0(e,t,r);f[e]=i.concat(o),y=y.concat(jO(c[e],e,r)),v.push(zO(h[e],f[e],r))}m=m.concat(NO(p[e]))}));let w=Object.values(f).flat(),b=d.features[0],_=b.properties.name,M=b.geometry.coordinates[0],x=b.geometry.coordinates[1],I=(null==(a=v[0])?void 0:a.id)||"",S=new Map;w.forEach((e=>S.set(e.id,e)));let O=[],k=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>S.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),O=e}}return{...e.properties,nodes:O,polygons:e.properties.spaces}})),E=e["category.geojson"].features.map((e=>e.properties));return{polygons:w,venue:{name:_,latitude:x,longitude:M,defaultMap:I},maps:v,vortexes:m,nodes:y,locations:k,mapGroups:[],locationStates:[],categories:E,themes:[],imageBinaries:new Map}}function zO(e,t,n){let r=n.createGeoreferences(),i=new Set,o=e.features[0].properties;t.forEach((e=>{e.layer&&i.add(e.layer)}));let s=[...i].map((e=>({id:e,visible:!0}))),a=1/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:a,x_scale:a,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(LO,"convertPolygons"),s(FO,"convertVortexes"),s(NO,"convertVortexes_MVFv1"),s(A0,"overrideMVF"),s($h,"parseMVF"),s(C0,"parseMVFv1"),s(j0,"getLocationId"),s(L0,"getFeatureCategories"),s(F0,"getCategoryIdFromName"),s(Yh,"mutateCategoriesWithNewFeature"),s(N0,"isFeatureConnection"),s(DO,"getLocationLabel"),s(wo,"mutateLocationsWithNewFeature"),s(RO,"createMetaDataFromMVF"),s(D0,"convertMVFToMappedin"),s(R0,"convertMVFv1ToMappedin"),s(zO,"convertMap_MVFv1"),g();var iw,ko,hi,mi,_o,gi,vi,yi,$n,bi,wi,ki,Mo,_i,_r,aw=qt(rw()),XO=null==(iw=null==E?void 0:E.env)?void 0:iw.npm_package_version,Qu=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],Jh=Qu[0],KO=!1,Rt=class e{constructor(e){var t;I(this,ko,void 0),I(this,hi,void 0),I(this,mi,void 0),I(this,_o,void 0),I(this,gi,void 0),I(this,vi,void 0),I(this,yi,void 0),I(this,$n,void 0),I(this,bi,void 0),I(this,wi,void 0),I(this,ki,void 0),I(this,Mo,void 0),I(this,_i,void 0),I(this,_r,void 0),j(this,$n,e.clientId),j(this,bi,e.clientSecret),j(this,wi,e.accessToken),j(this,yi,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!w(this,yi)&&w(this,$n)&&!Ou(w(this,$n))&&(n="https://web-proxy.mappedin.com/a/"),j(this,mi,n),j(this,mi,w(this,mi)+(e.venue+"/")),j(this,_i,e.venue),j(this,hi,!1),j(this,ko,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),j(this,_o,Qu.find((t=>t===e.context))||Qu[0]),j(this,gi,_u()),j(this,vi,Mu()),j(this,ki,new Set),j(this,Mo,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=Zr(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let n={...t,g:w(this,hi)};w(this,_r)&&(n={...n,...w(this,_r)});let r=w(this,mi)+e+"?"+aw.default.stringify(n,{skipEmptyString:!0,skipNull:!0});if(KO&&R.log("Analytics.track",r),w(this,ko))return;let i={"mi-context":Jh||w(this,_o),"mi-session":w(this,vi),"mi-device":w(this,gi),"mappedin-sdk-version":XO,"mappedin-platform-version":w(this,Mo)};w(this,wi)?i.Authorization="Bearer ".concat(w(this,wi)):w(this,yi)||w(this,bi)&&w(this,$n)&&(i["x-mappedin-key"]=btoa(w(this,$n)),i["x-mappedin-secret"]=btoa(w(this,bi))),st()(r,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(e){j(this,_r,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;be.addPendingEvent(new Ji({venue:w(this,_i)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;be.addPendingEvent(new Ki({venue:w(this,_i)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,n,r){this.track("load-mapview",{type:e,force:t,benchmark:n||-1,reason:r||"success"})}getDirections(e,t){let n={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return w(this,vi)}getDeviceID(){return w(this,gi)}setGeolocationMode(e){j(this,hi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!w(this,ki).has(t)&&(this.track(t),w(this,ki).add(t))}trackSearch(e){null!=e&&this.track("query-search",e)}trackSearchSuggest(e){null!=e&&this.track("query-suggest",e)}static setContext(e){let t=Qu.find((t=>t===e));t&&(Jh=t)}static clearContext(){Jh=void 0}static destroy(){e.instance=null}};ko=new WeakMap,hi=new WeakMap,mi=new WeakMap,_o=new WeakMap,gi=new WeakMap,vi=new WeakMap,yi=new WeakMap,$n=new WeakMap,bi=new WeakMap,wi=new WeakMap,ki=new WeakMap,Mo=new WeakMap,_i=new WeakMap,_r=new WeakMap,s(Rt,"Analytics"),y(Rt,"instance",null),y(Rt,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var Zh=Rt,xo=Zh;g();var Qh=class{constructor(){y(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach((function(e){"function"==typeof e&&e(t)}))}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||null==this._subscribers[e])return;let n=this._subscribers[e].indexOf(t);-1!==n&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};s(Qh,"PubSub");var Hn,Mi,Mr,xi,Eo,em,tl,ow,el=Qh,tm={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""},nm=class extends el{constructor(e){super(),I(this,Eo),I(this,tl),y(this,"perspective"),y(this,"things"),y(this,"options"),I(this,Hn,void 0),I(this,Mi,""),y(this,"updatedAt"),y(this,"categories",[]),y(this,"locations",[]),y(this,"vortexes",[]),y(this,"maps",[]),y(this,"nodes",[]),y(this,"polygons",[]),y(this,"venue",{}),y(this,"events",[]),y(this,"mapGroups",[]),y(this,"themes",[]),y(this,"locationStates",[]),y(this,"rankings"),y(this,"currentLanguage"),I(this,Mr,{}),y(this,"_categoriesById"),y(this,"_locationsById"),y(this,"_vortexesById"),y(this,"_mapsById"),y(this,"_nodesById"),y(this,"_polygonsById"),y(this,"_eventsById"),y(this,"_mapGroupsById"),y(this,"_locationStatesById"),y(this,"_locationRankingsById"),y(this,"_rankingsById"),y(this,"_categoriesByExternalId"),y(this,"_locationsByExternalId"),y(this,"_vortexesByExternalId"),y(this,"_mapsByExternalId"),y(this,"_nodesByExternalId"),y(this,"_polygonsByExternalId"),y(this,"_eventsByExternalId"),y(this,"_mapGroupsByExternalId"),y(this,"_locationStatesByExternalId"),y(this,"_locationRankingsByExternalId"),y(this,"_rankingsByExternalId"),I(this,xi,void 0),y(this,"images"),y(this,"imageBinaries"),y(this,"scenes"),y(this,"analytics"),y(this,"navigator"),this.options=e,j(this,Hn,et.create(this));let t=xo.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Ig,"true")}})}generateGetters(e){try{for(let t=0,n=e.length;t<n;++t){let n=e[t];Array.isArray(this[n])&&(Object.defineProperty(this,"_".concat(n,"ByExternalId"),{configurable:!0,get(){let e=w(this,Hn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.externalId]=e)),w(this,Hn)[n]=t,t}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=w(this,Hn)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),w(this,Hn)[n]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let n="_".concat(e,"ById"),r="_".concat(e,"ByExternalId"),i=this[n];return null!=i&&null!=i[t]||(i=this[r],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=D0(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=R0(e);return this.hydrate(t)}async changeLanguage(e,t=!0){var n;let r=e.toLowerCase();if(this.currentLanguage.code.toLowerCase()!==r){if(null==(n=this.venue.languages)||!n.find((e=>e.code.toLowerCase()===r)))return void R.error("Language ".concat(r," not found in venue ").concat(this.venue.slug));if(t&&!w(this,Mr)[this.currentLanguage.code]&&(w(this,Mr)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===r)),null!=w(this,Mr)[r]){let e=JSON.parse(w(this,Mr)[r]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}}async hydrate(e,t=!1,n=!1){let r;if("string"==typeof e)try{j(this,Mi,e),r=JSON.parse(e)}catch(e){return void R.error("Unable to parse JSON",e)}else r=e,j(this,Mi,JSON.stringify(r));let i=Object.keys(r);for(let e=0,t=i.length;e<t;++e){let t=i[e],o=r[t],s=Iu[t];null!=s&&"function"==typeof s.hydrate&&(n?"updateInPlace"in s&&"function"==typeof s.updateInPlace&&s.updateInPlace(this,o):this[t]=s.hydrate(o,this))}t&&await ab(r);let{images:o,scenes:s,imageBinaries:a}=r;this.images=o,this.scenes=s,this.imageBinaries=a,n||this.generateGetters(i),he(this,Eo,em).call(this),this.initNavigator()}async fetch(e=!1){"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"]),Ou(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,n=[],r=Object.keys(t);for(let t=0,i=r.length;t<i;++t){let i=r[t],o=Iu[i];if(o){let t;e?"updateInPlace"in o&&"function"==typeof o.updateInPlace&&(t=o.updateInPlace(this)):t=o.fetch(this).then((e=>(this[i]=e,Promise.resolve()))),n.push(t)}}return n.push(Gr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>j(this,xi,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(r),Promise.all(n).then((()=>{var e;this.currentLanguage=this.currentLanguage||(null==(e=this.venue.languages)?void 0:e.find((e=>e.code===this.options.language)))||this.venue.defaultLanguage,he(this,Eo,em).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new $l({locations:this.locations.map((e=>e.toJSON())),nodes:this.nodes.map((e=>e.toJSON())),vortexes:this.vortexes.map((e=>e.toJSON())),maps:this.maps.map((e=>e.toJSON())),polygons:this.polygons.map((e=>e.toJSON()))})}toJSON(){var e;let t={};for(let e in Iu)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let n={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(n.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete n.locationRankings,n}toString(){return w(this,Mi)||JSON.stringify(this.toJSON())}};Hn=new WeakMap,Mi=new WeakMap,Mr=new WeakMap,xi=new WeakMap,Eo=new WeakSet,em=s((function(){w(this,xi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(w(this,xi)))})),he(this,tl,ow).call(this)}),"#transformData"),tl=new WeakSet,ow=s((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),n=Math.max(...e);this.polygons.forEach((e=>{var r,i;let o=sb(e,this);if(o){let s=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(s.length>0){let o=Math.min(...s);e.categoryRank=ob(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(nm,"Mappedin");var mt=nm;g(),g();var Ne=s((function(){return Ne=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Ne.apply(this,arguments)}),"__assign");function re(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function We(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(re,"__values"),s(We,"__read");var To,JO="ENTRIES",fw="KEYS",hw="VALUES",$e="",rm=function(){function e(e,t){var n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}return s(e,"TreeIterator"),e.prototype.next=function(){var e=this.dive();return this.backtrack(),e},e.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var e=Ei(this._path),t=e.node,n=e.keys;if(Ei(n)===$e)return{done:!1,value:this.result()};var r=t.get(Ei(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=Ei(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},e.prototype.key=function(){return this.set._prefix+this._path.map((function(e){var t=e.keys;return Ei(t)})).filter((function(e){return e!==$e})).join("")},e.prototype.value=function(){return Ei(this._path).node.get($e)},e.prototype.result=function(){switch(this._type){case hw:return this.value();case fw:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),Ei=s((function(e){return e[e.length-1]}),"last$1"),ZO=s((function(e,t,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,s=new Uint8Array(o*i).fill(n+1),a=0;a<i;++a)s[a]=a;for(var l=1;l<o;++l)s[l*i]=l;return mw(e,t,n,r,s,1,i,""),r}),"fuzzySearch"),mw=s((function(e,t,n,r,i,o,s,a){var l,u,c=o*s;try{e:for(var h=re(e.keys()),d=h.next();!d.done;d=h.next()){var p=d.value;if(p===$e){var f=i[c-1];f<=n&&r.set(a,[e.get(p),f])}else{for(var g=o,v=0;v<p.length;++v,++g){for(var y=p[v],m=s*g,w=m-s,b=i[m],_=Math.max(0,g-n-1),M=Math.min(s-1,g+n),x=_;x<M;++x){var I=y!==t[x],S=i[w+x]+ +I,O=i[w+x+1]+1,k=i[m+x]+1,E=i[m+x+1]=Math.min(S,O,k);E<b&&(b=E)}if(b>n)continue e}mw(e.get(p),t,n,r,i,g,s,a+p)}}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}}),"recurse"),im=function(){function e(e,t){void 0===e&&(e=new Map),void 0===t&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return s(e,"SearchableMap"),e.prototype.atPrefix=function(t){var n,r;if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=We(rl(this._tree,t.slice(this._prefix.length)),2),o=i[0],s=i[1];if(void 0===o){var a=We(lm(s),2),l=a[0],u=a[1];try{for(var c=re(l.keys()),h=c.next();!h.done;h=c.next()){var d=h.value;if(d!==$e&&d.startsWith(u)){var p=new Map;return p.set(d.slice(u.length),l.get(d)),new e(p,t)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}return new e(o,t)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,QO(this._tree,e)},e.prototype.entries=function(){return new rm(this,JO)},e.prototype.forEach=function(e){var t,n;try{for(var r=re(this),i=r.next();!i.done;i=r.next()){var o=We(i.value,2);e(o[0],o[1],this)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.fuzzyGet=function(e,t){return ZO(this._tree,e,t)},e.prototype.get=function(e){var t=um(this._tree,e);return void 0!==t?t.get($e):void 0},e.prototype.has=function(e){var t=um(this._tree,e);return void 0!==t&&t.has($e)},e.prototype.keys=function(){return new rm(this,fw)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,am(this._tree,e).set($e,t),this},Object.defineProperty(e.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=am(this._tree,e);return n.set($e,t(n.get($e))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=am(this._tree,e),r=n.get($e);return void 0===r&&n.set($e,r=t()),r},e.prototype.values=function(){return new rm(this,hw)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(t){var n,r,i=new e;try{for(var o=re(t),s=o.next();!s.done;s=o.next()){var a=We(s.value,2),l=a[0],u=a[1];i.set(l,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),rl=s((function(e,t,n){var r,i;if(void 0===n&&(n=[]),0===t.length||null==e)return[e,n];try{for(var o=re(e.keys()),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!==$e&&t.startsWith(a))return n.push([e,a]),rl(e.get(a),t.slice(a.length),n)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n.push([e,t]),rl(void 0,"",n)}),"trackDown"),um=s((function(e,t){var n,r;if(0===t.length||null==e)return e;try{for(var i=re(e.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!==$e&&t.startsWith(s))return um(e.get(s),t.slice(s.length))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"lookup"),am=s((function(e,t){var n,r,i=t.length;e:for(var o=0;e&&o<i;){try{for(var s=(n=void 0,re(e.keys())),a=s.next();!a.done;a=s.next()){var l=a.value;if(l!==$e&&t[o]===l[0]){for(var u=Math.min(i-o,l.length),c=1;c<u&&t[o+c]===l[c];)++c;var h=e.get(l);if(c===l.length)e=h;else{var d=new Map;d.set(l.slice(c),h),e.set(t.slice(o,o+c),d),e.delete(l),e=d}o+=c;continue e}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var p=new Map;return e.set(t.slice(o),p),p}return e}),"createPath"),QO=s((function(e,t){var n=We(rl(e,t),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete($e),0===r.size)gw(i);else if(1===r.size){var o=We(r.entries().next().value,2),s=o[0],a=o[1];vw(i,s,a)}}),"remove"),gw=s((function(e){if(0!==e.length){var t=We(lm(e),2),n=t[0],r=t[1];if(n.delete(r),0===n.size)gw(e.slice(0,-1));else if(1===n.size){var i=We(n.entries().next().value,2),o=i[0],s=i[1];o!==$e&&vw(e.slice(0,-1),o,s)}}}),"cleanup"),vw=s((function(e,t,n){if(0!==e.length){var r=We(lm(e),2),i=r[0],o=r[1];i.set(o+t,n),i.delete(o)}}),"merge"),lm=s((function(e){return e[e.length-1]}),"last"),cm="or",eS="and",tS="and_not",xr=function(){function e(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=Ne(Ne(Ne({},sm),e),{searchOptions:Ne(Ne({},lw),e.searchOptions||{})}),this._index=new im,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 s(e,"MiniSearch"),e.prototype.add=function(e){var t,n,r,i,o=this._options,s=o.extractField,a=o.tokenize,l=o.processTerm,u=o.fields,c=o.idField,h=s(e,c);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(c,'"'));var d=this.addDocumentId(h);this.saveStoredFields(d,e);try{for(var p=re(u),f=p.next();!f.done;f=p.next()){var g=f.value,v=s(e,g);if(null!=v){var y=a(v.toString(),g),m=this._fieldIds[g],w=new Set(y).size;this.addFieldLength(d,m,this._documentCount-1,w);try{for(var b=(r=void 0,re(y)),_=b.next();!_.done;_=b.next()){var M=l(_.value,g);M&&this.addTerm(m,d,M)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(i=b.return)&&i.call(b)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}},e.prototype.addAll=function(e){var t,n;try{for(var r=re(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.add(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.addAllAsync=function(e,t){var n=this;void 0===t&&(t={});var r=t.chunkSize,i=void 0===r?10:r,o={chunk:[],promise:Promise.resolve()},s=e.reduce((function(e,t,r){var o=e.chunk,s=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return n.addAll(o)}))}:{chunk:o,promise:s}}),o),a=s.chunk;return s.promise.then((function(){return n.addAll(a)}))},e.prototype.remove=function(e){var t,n,r,i,o,s,a=this._options,l=a.tokenize,u=a.processTerm,c=a.extractField,h=a.fields,d=a.idField,p=c(e,d);if(null==p)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var f=re(this._documentIds),g=f.next();!g.done;g=f.next()){var v=We(g.value,2),y=v[0];if(p===v[1]){try{for(var m=(r=void 0,re(h)),w=m.next();!w.done;w=m.next()){var b=w.value,_=c(e,b);if(null!=_){var M=l(_.toString(),b),x=this._fieldIds[b],I=new Set(M).size;this.removeFieldLength(y,x,this._documentCount,I);try{for(var S=(o=void 0,re(M)),O=S.next();!O.done;O=S.next()){var k=u(O.value,b);k&&this.removeTerm(x,y,k)}}catch(e){o={error:e}}finally{try{O&&!O.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}}}}catch(e){r={error:e}}finally{try{w&&!w.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}return this._storedFields.delete(y),this._documentIds.delete(y),this._fieldLength.delete(y),void(this._documentCount-=1)}}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(p,": it is not in the index"))},e.prototype.removeAll=function(e){var t,n;if(e)try{for(var r=re(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.remove(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new im,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},e.prototype.search=function(e,t){var n,r;void 0===t&&(t={});var i=this.executeQuery(e,t),o=[];try{for(var s=re(i),a=s.next();!a.done;a=s.next()){var l=We(a.value,2),u=l[0],c=l[1],h=c.score,d=c.terms,p=c.match,f=d.length,g={id:this._documentIds.get(u),score:h*f,terms:Object.keys(p),match:p};Object.assign(g,this._storedFields.get(u)),(null==t.filter||t.filter(g))&&o.push(g)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o.sort(dw),o},e.prototype.autoSuggest=function(e,t){var n,r,i,o;void 0===t&&(t={}),t=Ne(Ne({},oS),t);var s=new Map;try{for(var a=re(this.search(e,t)),l=a.next();!l.done;l=a.next()){var u=l.value,c=u.score,h=(m=u.terms).join(" ");null!=(v=s.get(h))?(v.score+=c,v.count+=1):s.set(h,{score:c,terms:m,count:1})}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var d=[];try{for(var p=re(s),f=p.next();!f.done;f=p.next()){var g=We(f.value,2),v=g[0],y=g[1],m=(c=y.score,y.terms),w=y.count;d.push({suggestion:v,terms:m,score:c/w})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return d.sort(dw),d},Object.defineProperty(e.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),e.loadJSON=function(t,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return e.loadJS(JSON.parse(t),n)},e.getDefault=function(e){if(sm.hasOwnProperty(e))return om(sm,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},e.loadJS=function(t,n){var r,i,o,s,a=t.index,l=t.documentCount,u=t.nextId,c=t.documentIds,h=t.fieldIds,d=t.fieldLength,p=t.averageFieldLength,f=t.storedFields,g=t.serializationVersion;if(1!==g&&2!==g)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var v=new e(n);v._documentCount=l,v._nextId=u,v._documentIds=nl(c),v._fieldIds=h,v._fieldLength=nl(d),v._avgFieldLength=p,v._storedFields=nl(f),v._index=new im;try{for(var y=re(a),m=y.next();!m.done;m=y.next()){var w=We(m.value,2),b=w[0],_=w[1],M=new Map;try{for(var x=(o=void 0,re(Object.keys(_))),I=x.next();!I.done;I=x.next()){var S=I.value,O=_[S];1===g&&(O=O.ds),M.set(parseInt(S,10),nl(O))}}catch(e){o={error:e}}finally{try{I&&!I.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}v._index.set(b,M)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return v},e.prototype.executeQuery=function(e,t){var n=this;if(void 0===t&&(t={}),"string"!=typeof e){var r=Ne(Ne(Ne({},t),e),{queries:void 0}),i=e.queries.map((function(e){return n.executeQuery(e,r)}));return this.combineResults(i,e.combineWith)}var o=this._options,s=o.tokenize,a=o.processTerm,l=o.searchOptions,u=Ne(Ne({tokenize:s,processTerm:a},l),t),c=u.tokenize,h=u.processTerm,d=c(e).map((function(e){return h(e)})).filter((function(e){return!!e})).map(aS(u)).map((function(e){return n.executeQuerySpec(e,u)}));return this.combineResults(d,u.combineWith)},e.prototype.executeQuerySpec=function(e,t){var n,r,i,o,s,a,l=Ne(Ne({},this._options.searchOptions),t),u=(l.fields||this._options.fields).reduce((function(e,t){var n;return Ne(Ne({},e),((n={})[t]=om(e,t)||1,n))}),l.boost||{}),c=l.boostDocument,h=l.weights,d=l.maxFuzzy,p=Ne(Ne({},lw.weights),h),f=p.fuzzy,g=p.prefix,v=this._index.get(e.term),y=this.termResults(e.term,e.term,1,v,u,c);if(e.prefix&&(s=this._index.atPrefix(e.term)),e.fuzzy){var m=!0===e.fuzzy?.2:e.fuzzy,w=m<1?Math.min(d,Math.round(e.term.length*m)):m;w&&(a=this._index.fuzzyGet(e.term,w))}if(s)try{for(var b=re(s),_=b.next();!_.done;_=b.next()){var M=We(_.value,2),x=M[0],I=M[1];if(E=x.length-e.term.length){null==a||a.delete(x);var S=g*x.length/(x.length+.3*E);this.termResults(e.term,x,S,I,u,c,y)}}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=b.return)&&r.call(b)}finally{if(n)throw n.error}}if(a)try{for(var O=re(a.keys()),k=O.next();!k.done;k=O.next()){x=k.value;var E,P=We(a.get(x),2),A=P[0];if(E=P[1]){S=f*x.length/(x.length+E);this.termResults(e.term,x,S,A,u,c,y)}}}catch(e){i={error:e}}finally{try{k&&!k.done&&(o=O.return)&&o.call(O)}finally{if(i)throw i.error}}return y},e.prototype.combineResults=function(e,t){if(void 0===t&&(t=cm),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce(nS[n])||new Map},e.prototype.toJSON=function(){var e,t,n,r,i=[];try{for(var o=re(this._index),s=o.next();!s.done;s=o.next()){var a=We(s.value,2),l=a[0],u=a[1],c={};try{for(var h=(n=void 0,re(u)),d=h.next();!d.done;d=h.next()){var p=We(d.value,2),f=p[0],g=p[1];c[f]=Object.fromEntries(g)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}i.push([l,c])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.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}},e.prototype.termResults=function(e,t,n,r,i,o,s){var a,l,u,c,h;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=re(Object.keys(i)),p=d.next();!p.done;p=d.next()){var f=p.value,g=i[f],v=this._fieldIds[f],y=r.get(v);if(null!=y){var m=y.size,w=this._avgFieldLength[v];try{for(var b=(u=void 0,re(y.keys())),_=b.next();!_.done;_=b.next()){var M=_.value,x=o?o(this._documentIds.get(M),t):1;if(x){var I=y.get(M),S=this._fieldLength.get(M)[v],O=n*g*x*iS(I,m,this._documentCount,S,w),k=s.get(M);if(k){k.score+=O,sS(k.terms,e);var E=om(k.match,t);E?E.push(f):k.match[t]=[f]}else s.set(M,{score:O,terms:[e],match:(h={},h[t]=[f],h)})}}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=b.return)&&c.call(b)}finally{if(u)throw u.error}}}}}catch(e){a={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(a)throw a.error}}return s},e.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,pw),i=r.get(e);if(null==i)(i=new Map).set(t,1),r.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},e.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,pw),i=r.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(t,e,n)},e.prototype.warnDocumentChanged=function(e,t,n){var r,i;if(null!=console&&null!=console.warn)try{for(var o=re(Object.keys(this._fieldIds)),s=o.next();!s.done;s=o.next()){var a=s.value;if(this._fieldIds[a]===t)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(n,'" was not present in field "').concat(a,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},e.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},e.prototype.addFieldLength=function(e,t,n,r){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=r;var o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)},e.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},e.prototype.saveStoredFields=function(e,t){var n,r,i=this._options,o=i.storeFields,s=i.extractField;if(null!=o&&0!==o.length){var a=this._storedFields.get(e);null==a&&this._storedFields.set(e,a={});try{for(var l=re(o),u=l.next();!u.done;u=l.next()){var c=u.value,h=s(t,c);void 0!==h&&(a[c]=h)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},e}(),om=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),nS=((To={})[cm]=function(e,t){var n,r;try{for(var i=re(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e.get(s);if(null==a)e.set(s,t.get(s));else{var l=t.get(s),u=l.score,c=l.terms,h=l.match;a.score=a.score+u,a.match=Object.assign(a.match,h),cw(a.terms,c)}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},To[eS]=function(e,t){var n,r,i=new Map;try{for(var o=re(t.keys()),s=o.next();!s.done;s=o.next()){var a=s.value,l=e.get(a);if(null!=l){var u=t.get(a),c=u.score,h=u.terms,d=u.match;cw(l.terms,h),i.set(a,{score:l.score+c,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},To[tS]=function(e,t){var n,r;try{for(var i=re(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;e.delete(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},To),sw=1.2,uw=.7,rS=.5,iS=s((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(rS+e*(sw+1)/(e+sw*(1-uw+uw*r/i)))}),"calcBM25Score"),aS=s((function(e){return function(t,n,r){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,n,r):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,n,r):!0===e.prefix}}}),"termToQuerySpec"),sm={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(uS)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},lw={combineWith:cm,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},oS={prefix:function(e,t,n){return t===n.length-1}},sS=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),cw=s((function(e,t){var n,r;try{for(var i=re(t),o=i.next();!o.done;o=i.next()){var s=o.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),dw=s((function(e,t){var n=e.score;return t.score-n}),"byScore"),pw=s((function(){return new Map}),"createMap"),nl=s((function(e){var t,n,r=new Map;try{for(var i=re(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;r.set(parseInt(s,10),e[s])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}),"objectToNumericMap"),uS=/[\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;g();var lS=["0","1","2","3","4","5","6","7","8","9"],cS=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],dS=["0","1","2","3","4","5","6","7","8","9"],pS=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],C4=[...lS,...cS,...dS,...pS],yw=["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"];g();var fS=32,dt=!1,hS=120,dm=0,fm=class{constructor(e){y(this,"_callback"),y(this,"_frameCount"),y(this,"_ordering"),y(this,"_supersededBy"),y(this,"name"),y(this,"_remainingFrameCount"),y(this,"_lastFrameTime"),y(this,"userdata"),this._callback=e.callback,this._frameCount=null!=e.frameCount?e.frameCount:1,this._ordering=null!=e.ordering?e.ordering:0,this._supersededBy=null!=e.supersededBy?new Set(e.supersededBy):new Set,this.name=e.name,this.userdata=e.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,dt&&R.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(fm,"FrameUpdate");var il=fm,hm=class{constructor(e){if(y(this,"_postponed"),y(this,"userdata"),y(this,"_priority"),y(this,"_group"),y(this,"name"),y(this,"_lastFrameTime"),y(this,"_callback"),y(this,"_complete"),y(this,"_scheduled"),y(this,"_cancelled"),null!=e.group&&null!=e.priority)throw new Error("cannot specify task priority individually within group");if(null!=e.group&&null!=e.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=e.callback,this._group=null!=e.group?e.group:null,this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata||{},this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,dt&&R.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(hm,"FrameTask");var xn=hm,mm=class{constructor(e){y(this,"_postponed"),y(this,"_onComplete"),y(this,"_priority"),y(this,"userdata"),y(this,"name"),y(this,"_tasks"),y(this,"_scheduledTasks"),y(this,"_scheduled"),y(this,"_cancelled"),this._onComplete=null!=e.onComplete?e.onComplete:()=>{},this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,dt&&R.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 e of this._scheduledTasks)return this._scheduledTasks.delete(e),e}};s(mm,"FrameTaskGroup");var al=mm,gm=class{constructor(e){y(this,"_maxMillisecondsPerFrame"),y(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:fS,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(gm,"RealTimeTimer");var pm=gm,vm=class{constructor(e){var t;y(this,"_raf"),y(this,"options"),y(this,"_timer"),y(this,"_performance"),y(this,"_scheduledUpdatesByOrdering"),y(this,"_scheduledTasksByPriority"),y(this,"_postponedTasks"),y(this,"_requestAnimationFrameHandle"),y(this,"_updatesToRunThisFrame"),y(this,"_lastFrameTime",0),y(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new pm,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new Ti,this._scheduledTasksByPriority=new Ti,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),dt&&R.log("task scheduler instantiated"),null!=(t=globalThis.MappedinDebug)&&t.TEST_IOS&&(this._raf=e=>setTimeout(e,16))}clear(){for(let e of this._scheduledTasksByPriority.values())e._cancelled=!0;for(let e of this._postponedTasks.values())e._cancelled=!0;this._scheduledUpdatesByOrdering=new Ti,this._scheduledTasksByPriority=new Ti,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),dt&&R.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(e){var t;let n;this._timer.beginFrame(),this._performance&&(n=performance.now());let r=!1;dt&&(0===dm&&(r=!0),++dm,dm%=hS);let i=this._scheduledUpdatesByOrdering.keys();for(let e=i.length-1;e>=0;--e){let t=i[e];for(let e of this._scheduledUpdatesByOrdering.get(t).values())this._updatesToRunThisFrame.push(e),r&&R.log("update scheduled to run this frame",e.name)}for(let e of this._updatesToRunThisFrame){--e._remainingFrameCount,e._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(e._ordering,e),e._superseded=!1;for(let t of this._updatesToRunThisFrame)e._supersededBy.has(t)&&(e._superseded=!0,r&&R.log("update superseded",e.name,t.name))}for(let e=0;e<this._updatesToRunThisFrame.length;++e)this._updatesToRunThisFrame[e]._superseded&&(this._updatesToRunThisFrame.splice(e,1),--e);for(let t of this._updatesToRunThisFrame){let n;this._performance&&(n=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-n),r&&R.log("update completed",t.name)}this._updatesRunLastFrame.clear();for(let e of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(e);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(e)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-n),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame(),null!=(t=this.options)&&t.onUpdateEnd&&this.options.onUpdateEnd()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(e){let t,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;R.assert(void 0!==n),Object.getPrototypeOf(n)===al.prototype&&(r=n,n=r._popTask()),R.assert(void 0!==n),R.assert(Object.getPrototypeOf(n)===xn.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),dt&&R.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),dt&&R.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===al)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+e.name);if(e._scheduled)throw new Error("cannot schedule already scheduled task: "+e.name);if(e._cancelled)throw new Error("cannot schedule cancelled task: "+e.name);let t=e;"_group"in e&&null!=e._group&&(e._group._tasks.add(e),e._group._scheduledTasks.add(e),t=e._group),t._postponed?this._postponedTasks.add(t):this._scheduledTasksByPriority.insert(t._priority,t),e._scheduled=!0,t._scheduled=!0,dt&&R.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),dt&&R.log("update cancelled",e.name)}cancelTask(e){if(!e._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+e.name);if(e._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+e.name);if("_group"in e&&null!=e._group){let t=e._group.isComplete();e._group._tasks.delete(e),e._group._scheduledTasks.delete(e),e._group.isComplete()&&(this._scheduledTasksByPriority.delete(e._group._priority,e._group),t||e._group._onComplete())}else this._scheduledTasksByPriority.delete(e._priority,e),this._postponedTasks.delete(e);Object.getPrototypeOf(e)===xn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),dt&&R.log("task cancelled",e.name)}postponeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot postpone individual tasks in group: "+e.name);if(e._cancelled)throw new Error("cannot postpone cancelled task: "+e.name);if(!e._postponed){if(Object.getPrototypeOf(e)===xn.prototype){if("_complete"in e)return;if(!e._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+e.name)}this._scheduledTasksByPriority.delete(e._priority,e),(Object.getPrototypeOf(e)===xn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,dt&&R.log("task postponed",e.name)}}resumeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot resume individual tasks in groups");if(e._cancelled)throw new Error("cannot resume cancelled task");if(e._postponed){if(Object.getPrototypeOf(e)===xn.prototype){if("_complete"in e&&e._complete)return;if(!e._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(e),(Object.getPrototypeOf(e)===xn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),dt&&R.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===xn.prototype&&!e._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(e._priority,e)&&(this._scheduledTasksByPriority.delete(e._priority,e),this._scheduledTasksByPriority.insert(t,e)),e._priority=t,dt&&R.log("task priority changed",e.name,t)}};s(vm,"TaskScheduler");var ol=vm,ym=class{constructor(){y(this,"_map"),y(this,"_size"),y(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(e,t){return null!=this._map.get(e)&&this._map.get(e).has(t)}get(e){return this._map.get(e)}insert(e,t){if(R.assert("number"==typeof e&&Number.isFinite(e)),null==this._map.get(e)){this._map.set(e,new Set);for(let t=0;t<=this._sortedKeys.length;++t)if(t===this._sortedKeys.length||e<this._sortedKeys[t]){this._sortedKeys.splice(t,0,e);break}}this._map.get(e).has(t)||(this._map.get(e).add(t),++this._size)}delete(e,t){null!=this._map.get(e)&&this._map.get(e).has(t)&&(this._map.get(e).delete(t),--this._size,0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)))}pop(e){if(null!=this._map.get(e)){let t;for(t of this._map.get(e).values()){this._map.get(e).delete(t),--this._size;break}return 0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)),t}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let e=this._map.keys(),t=null,n={[Symbol.iterator]:()=>n,next:()=>{if(null==t){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values()}let n=t.next();for(;n.done;){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values(),n=t.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return R.assert(e===this._size),e}};s(ym,"Multimap");var Ti=ym,En=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),mS=/([!-/:-@])|(?:[\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;function gS(e){return e.split(mS).filter(Boolean)}s(gS,"tokenizeAndCaptureDelimiters");var Tn,Ot,Xn,sn,Pe,Po,Oo,Oi,So,Io,Ao,Co,Si,Pn,sl,ul,Kn,jo,ll,cl,dl,ww,Pi="",vS=.09,yS=1,bS=.025,wS=.5,kS=5e-4,_S=5e-4,MS=.01,xS=.05,bw=1,ES=.01,TS=.2,PS={MappedinCategory:"categories",MappedinLocation:"locations"},OS={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:yw,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===E.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:vS,PRIMARY_INDEX_WEIGHT:yS,SECONDARY_INDEX_WEIGHT:bS,CATEGORY_NAME_WEIGHT:wS,LOCATION_NAME_WEIGHT:bw,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:kS,CATEGORY_LOCATION_TAGS_WEIGHT:_S,CATEGORY_LOCATION_NAME_WEIGHT:MS,PRIMARY_INDEX_TAGS_NAME_WEIGHT:xS,LOCATION_DEFAULT_RANK:bw,RATIO_OF_FUZZY_TO_EXACT:ES,RATIO_OF_PREFIX_TO_EXACT:TS}},wm=class{constructor(e,t){var n;I(this,dl),I(this,Tn,void 0),I(this,Ot,void 0),I(this,Xn,void 0),I(this,sn,void 0),I(this,Pe,void 0),I(this,Po,new ol({performance:!0})),I(this,Oo,void 0),I(this,Oi,void 0),I(this,So,new Map),I(this,Io,void 0),I(this,Ao,void 0),I(this,Co,void 0),y(this,"buildIndices",s((()=>{var e,t;j(this,Kn,new Promise((e=>{j(this,jo,e)})));let{PRIMARY_INDEX_FUZZYNESS:n,PRIMARY_INDEX_WEIGHT:r,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=w(this,Pe).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:a},weights:{fuzzy:o,prefix:s},boostDocument:e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r,tokenize:gS},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var n;return null!=(n=w(this,Oo))&&n.has(e.toLowerCase())?null:e.toLowerCase()}},h={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(null!=(e=w(this,Pe))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=w(this,Pe))?void 0:t.jsonIndex);j(this,Ot,xr.loadJS(e,u)),j(this,Xn,xr.loadJS(n,c)),j(this,sn,xr.loadJS(r,h))}else j(this,Ot,new xr(u)),j(this,Xn,new xr(c)),j(this,sn,new xr(h)),w(this,Tn).locations.forEach(w(this,sl)),w(this,Tn).categories.forEach(w(this,ul));w(this,Po).update(performance.now())}),"buildIndices")),I(this,Si,0),I(this,Pn,s((e=>{hl(this,Si)._++,w(this,Po).scheduleUpdate(new il({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),hl(this,Si)._--,0===w(this,Si)&&w(this,jo).call(this)}}))}),"#addTask")),I(this,sl,s((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=w(this,Pe).constants,a=o;null!=(t=w(this,Pe))&&t.useLocationRank&&(a=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,n;return null!=(t=e.rank)&&t.score?null==(n=e.rank)?void 0:n.score:o})),o):o),w(this,Pn).call(this,(()=>{w(this,Ot).add({name:En(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:a})})),null!=(n=w(this,Pe))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{w(this,Ot).add({name:"",tag:En(t),id:"MappedinLocation_"+e.id,weight:s,rank:a})})),null!=(r=w(this,Pe))&&r.searchDescriptions&&w(this,Pn).call(this,(()=>w(this,Xn).add({description:En(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:a})))}),"#processLocation")),I(this,ul,s((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:s}=w(this,Pe).constants;w(this,Pn).call(this,(()=>w(this,Ot).add({name:En(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:s})));let a=e.locations.reduce(((e,t)=>e+" ".concat(Pi," ")+t.name),"")+" ".concat(Pi);if(null!=(t=w(this,Pe))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&w(this,Pn).call(this,(()=>w(this,sn).add({id:"MappedinCategory_"+e.id,"category.locations.description":En(t.description),ref:t.name,weight:r})))})),null!=(n=w(this,Pe))&&n.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var n;return e+(null==(n=t.tags)?void 0:n.reduce(((e,t)=>e+" ".concat(Pi," ")+t),""))+" ".concat(Pi)}),"");w(this,Pn).call(this,(()=>w(this,sn).add({"category.locations.tags":En(t),id:"MappedinCategory_"+e.id,weight:i})))}w(this,Pn).call(this,(()=>w(this,sn).add({"category.locations.name":En(a),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),I(this,Kn,void 0),I(this,jo,void 0),I(this,ll,s((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:s}=e,[a,l]=i.split("_"),u=r||w(this,Tn).getCollectionItemById(PS[a],l);return s&&null!=(t=w(this,Pe))&&t.useLocationRank&&(n+=s),o&&(n*=o),{score:n,type:a,object:u}}),"#processSearchResult")),I(this,cl,s(((e,t)=>{for(let n in e.match)e.match[n].forEach((r=>{let i=e.ref||e[r]||t.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let t=new RegExp("[^".concat(Pi,"]* ")+n+" [^".concat(Pi,"]*"),"ig").exec(e[r]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:n,weight:e.weight,matchesOn:r,value:i})}))}),"#addMatches")),j(this,Oi,xo.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),j(this,Pe,{...OS,...t}),j(this,Tn,e),j(this,Oo,new Set(null==(n=w(this,Pe))?void 0:n.stopWords));let r=w(this,Tn).venue.slug;w(this,Tn).on(0,this.buildIndices),this.buildIndices(),j(this,Io,Zr((e=>{w(this,Oi).trackSearchSuggest({query:e}),be.addPendingEvent(new da({venue:r}))}),300)),j(this,Ao,Zr((e=>{w(this,Oi).trackSearch({query:e}),be.addPendingEvent(new ca({venue:r}))}),300)),j(this,Co,Zr((()=>{be.addPendingEvent(new ua({venue:r}))}),300)),be.addPendingEvent(new la({search_descriptions:w(this,Pe).searchDescriptions,search_tags:w(this,Pe).searchTags,search_descriptions_in_categories:w(this,Pe).searchDescriptionsInCategories,search_tags_in_categories:w(this,Pe).searchTagsInCategories,use_location_rank:w(this,Pe).useLocationRank,venue:r}))}async suggest(e){await w(this,Kn);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=w(this,Pe).constants,s=w(this,Ot).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:o}});return w(this,Io).call(this,e),{total:s.length,hits:s.map((e=>({text:e.suggestion})))}}async search(e){await w(this,Kn);let t=he(this,dl,ww).call(this,e);return w(this,Ao).call(this,e),t}async toJSON(){return await w(this,Kn),JSON.stringify({primary:w(this,Ot),secondary:w(this,Xn),extra:w(this,sn)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await w(this,Kn),t=i instanceof gn?"MappedinLocation":i instanceof gr?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"_"+i.id:"string"==typeof i.id?n="Custom_"+i.id:(n=w(this,So).get(i),n||(n="Custom_"+yn(),w(this,So).set(i,n))),w(this,Ot).add({id:n,weight:o,object:i,query:En(r)}),w(this,Co).call(this)}};Tn=new WeakMap,Ot=new WeakMap,Xn=new WeakMap,sn=new WeakMap,Pe=new WeakMap,Po=new WeakMap,Oo=new WeakMap,Oi=new WeakMap,So=new WeakMap,Io=new WeakMap,Ao=new WeakMap,Co=new WeakMap,Si=new WeakMap,Pn=new WeakMap,sl=new WeakMap,ul=new WeakMap,Kn=new WeakMap,jo=new WeakMap,ll=new WeakMap,cl=new WeakMap,dl=new WeakSet,ww=s((function(e){let t=[],n=En(e);t=[...w(this,Ot).search(n),...w(this,Xn).search(n),...w(this,sn).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=w(this,ll).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},w(this,cl).call(this,e,r[e.id])}return Object.keys(r).map((e=>({...r[e],matches:r[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),s(wm,"OfflineSearch");var bm=wm;g();var kw=(e=>(e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY",e))(kw||{}),km=globalThis.fetch;function st(){if(null==km)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return km}function a6(e){km=e}s(st,"isomorphicFetch"),s(a6,"setFetchFn");var _w,SS=null==(_w=null==E?void 0:E.env)?void 0:_w.npm_package_version;globalThis.btoa||(globalThis.btoa=Mw.encode);var IS=["ar"];function Jn(e){var t;let n={...tm,...e};return n.headers={...n.headers,"mappedin-sdk-version":SS},n.things=ub("things"in e?e.things:void 0),"platformString"in e&&(n.headers={...n.headers,"mappedin-platform-version":e.platformString}),n.noAuth||(n.accessToken?n.authorization="Bearer ".concat(n.accessToken):n.clientId&&n.clientSecret&&(n.authorization="Basic ".concat(globalThis.btoa("".concat(n.clientId,":").concat(n.clientSecret))))),n.language=null==(t=n.language)?void 0:t.toLowerCase(),n}function xw(e){return e.endsWith("/")?e:"".concat(e,"/")}async function d6(e){let t={emitAnalyticsEvents:!0,version:"2.0.0",...e},n=Jn(t),r=new mt(n),i=await LS(n);if("1.0.0"===n.version){let e=C0(await S0(i));return r.hydrateFromMVFv1(e),r}let o=A0($h(await Wh(i)),n.override);return"function"==typeof t.onMVFParsed&&t.onMVFParsed(o),await r.hydrateFromMVF(o),be.addPendingEvent(new Qi({venue:n.venue})),r}async function p6(e){e.key||R.error('"key" is required.'),e.secret||R.error('"secret" is required.'),e.mapId||R.error('"mapId" is required.');let{access_token:t}=await FS(e),n={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,accessToken:t,...e},r=Jn({...n}),i=new mt(r),o=await DS(r,t),s=$h(await Wh(o));return"function"==typeof n.onMVFParsed&&n.onMVFParsed(s),i.hydrateFromMVF(s),i}async function AS(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=Jn({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new mt({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,be.addPendingEvent(new Zi({venue:n.venue})),i}async function f6(e){let t=Jn({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,secure:!0,...e}}),n="public/1/".concat(t.useDraftData?"draft/":""),r=new mt({...t,baseUrl:t.baseUrl+n}),i=await vr.fetch(r);return{hasSecureAssets:i.secureContentStorage,languages:i.languages}}function h6(e){AS=e}s(Jn,"parseOptions"),s(xw,"normalizeUrl"),s(d6,"getVenueMVF"),s(p6,"getVenueMaker"),s(AS,"getVenue"),s(f6,"getVenueMetadata"),s(h6,"__setGetVenueMock");var _m={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function m6(e){let t=Jn({baseUrl:"https://api-gateway.mappedin.com/",..._m,...e}),{url:n,updated_at:r}=await CS(e),i=await st()(n,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format ".concat(s));let a=new mt(t);return await a.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),a.updatedAt=r,a}async function CS(e){let t=Jn({baseUrl:"https://api-gateway.mappedin.com/",..._m,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&IS.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await Su(t,i)}async function g6(e,{url:t,updated_at:n}){let r=Jn({baseUrl:"https://api-gateway.mappedin.com/",..._m,...e}),i=await st()(t,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format".concat(s));let a=new mt(r);return await a.hydrate(o,r.shouldPopulateBundledImagesAsBlobs),a.updatedAt=n,a}async function jS(e){var t;let n=Jn({baseUrl:"https://api-gateway.mappedin.com/",...tm,...e}),r="".concat(n.bundleBaseUri||n.baseUrl+"exports/mvf/1/bundle","?venue=").concat(n.venue,"&version=").concat(null!=(t=n.version)?t:"2.0.0");return n.headers["Content-Type"]="application/zip",await Su(n,r)}async function LS(e){return new Promise((async(t,n)=>{try{let{url:n}=await jS(e),r=await st()(n).then((e=>e.arrayBuffer()));t(new Uint8Array(r))}catch(e){n(e)}}))}async function FS(e){let t="".concat(e.authBaseUri?xw(e.authBaseUri):"https://auth-maker.mappedin.com/","api-key/token"),n=await st()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}async function NS(e,t){let n="".concat(e.bundleBaseUri?xw(e.bundleBaseUri):"https://app.mappedin.com/","api/venue/").concat(e.mapId,"/mvf"),r=await st()(n,{headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText));return r.json()}async function DS(e,t){return new Promise((async(n,r)=>{try{let{url:r}=await NS(e,t),i=await st()(r).then((e=>e.arrayBuffer()));n(new Uint8Array(i))}catch(e){r(e)}}))}async function v6(e,t=!0){let n=new mt({venue:""});return await n.hydrate(e,t),n}async function y6(e){let t=new mt({venue:""});return await t.hydrateFromMVF(e),t}s(m6,"getVenueBundle"),s(CS,"getVenueBundleURL"),s(g6,"downloadBundle"),s(jS,"getVenueMVFURL"),s(LS,"downloadVenueBundleMVF"),s(FS,"getMakerAccessToken"),s(NS,"getMakerBundleURL"),s(DS,"downloadMVF"),s(v6,"hydrateVenue"),s(y6,"hydrateVenueMVF");export{xo as CustomerAnalytics,Au as GET_VENUE_EVENT,kw as MAP_RENDER_MODE,mt as Mappedin,gr as MappedinCategory,Oa as MappedinCollectionType,yr as MappedinCoordinate,wt as MappedinDestinationSet,tr as MappedinDirections,Ha as MappedinEvent,gn as MappedinLocation,Ja as MappedinLocationState,Qa as MappedinMap,ro as MappedinMapGroup,Yt as MappedinNavigatable,Ta as MappedinNode,fr as MappedinPolygon,Wa as MappedinRankings,vr as MappedinVenue,Da as MappedinVortex,bm as OfflineSearch,h6 as __setGetVenueMock,qf as defaultThings,g6 as downloadBundle,DS as downloadMVF,LS as downloadVenueBundleMVF,FS as getMakerAccessToken,NS as getMakerBundleURL,AS as getVenue,m6 as getVenueBundle,CS as getVenueBundleURL,d6 as getVenueMVF,jS as getVenueMVFURL,p6 as getVenueMaker,f6 as getVenueMetadata,v6 as hydrateVenue,y6 as hydrateVenueMVF,st as isomorphicFetch,Jn as parseOptions,a6 as setFetchFn};
|