@mappedin/mappedin-js 5.2.0 → 5.2.2
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.d.ts +146 -115
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/navigator/index.js +1 -1
- package/lib/esm/renderer/{browser-KSQ7VLQL.js → browser-PV7BMKYF.js} +1 -1
- package/lib/esm/renderer/chunk-YMYTDW5Q.js +1 -0
- package/lib/esm/renderer/index.d.ts +173 -130
- package/lib/esm/renderer/index.js +1 -1
- package/lib/mappedin.js +1 -1
- package/lib/node/index.js +1 -1
- package/package.json +2 -2
- package/lib/esm/renderer/chunk-F5JOIQOQ.js +0 -1
package/lib/node/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var pm,L,rm=Object.create,or=Object.defineProperty,im=Object.getOwnPropertyDescriptor,am=Object.getOwnPropertyNames,om=Object.getPrototypeOf,sm=Object.prototype.hasOwnProperty,lm=(e,t,r)=>t in e?or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cc=e=>or(e,"__esModule",{value:!0}),s=(e,t)=>or(e,"name",{value:t,configurable:!0}),um=(e,t)=>()=>(e&&(t=e(e=0)),t),se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cm=(e,t)=>{for(var r in Cc(e),t)or(e,r,{get:t[r],enumerable:!0})},dm=(e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of am(t))!sm.call(e,n)&&"default"!==n&&or(e,n,{get:()=>t[n],enumerable:!(r=im(t,n))||r.enumerable});return e},xn=e=>dm(Cc(or(null!=e?rm(om(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),m=(e,t,r)=>(lm(e,"symbol"!=typeof t?t+"":t,r),r),Rs=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},g=(e,t,r)=>(Rs(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},V=(e,t,r,n)=>(Rs(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ds=(e,t,r,n)=>({set _(n){V(e,t,n,r)},get _(){return g(e,t,n)}}),ut=(e,t,r)=>(Rs(e,t,"access private method"),r),y=um((()=>{L={env:pm={NODE_ENV:"production",npm_package_version:"5.2.0"}}})),Nc=se(((e,t)=>{y(),function(r){var n="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==n&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(r=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,d=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 r,n,i=0,o="",a=-1;++a<t;)n=u.indexOf(e.charAt(a)),r=i%4?64*r+n:n,i++%4&&(o+=String.fromCharCode(255&r>>(-2*i&6)));return o}),"decode"),h={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,r,n,i,o=e.length%3,a="",s=-1,c=e.length-o;++s<c;)t=e.charCodeAt(s)<<16,r=e.charCodeAt(++s)<<8,n=e.charCodeAt(++s),a+=u.charAt((i=t+r+n)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(s)<<8,r=e.charCodeAt(++s),a+=u.charAt((i=t+r)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(s),a+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),a}),"encode"),decode:d,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(n&&!n.nodeType)if(i)i.exports=h;else for(var p in h)h.hasOwnProperty(p)&&(n[p]=h[p]);else r.base64=h}(e)})),Lc=se(((e,t)=>{var r,n;y(),r="undefined"!=typeof self?self:e,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return s(r,"r"),r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t),r.d(t,"computeDestinationPoint",(function(){return N})),r.d(t,"convertArea",(function(){return R})),r.d(t,"convertDistance",(function(){return L})),r.d(t,"convertSpeed",(function(){return D})),r.d(t,"decimalToSexagesimal",(function(){return z})),r.d(t,"findNearest",(function(){return $})),r.d(t,"getAreaOfPolygon",(function(){return H})),r.d(t,"getBounds",(function(){return K})),r.d(t,"getBoundsOfDistance",(function(){return X})),r.d(t,"getCenter",(function(){return J})),r.d(t,"getCenterOfBounds",(function(){return Z})),r.d(t,"getCompassDirection",(function(){return Q})),r.d(t,"getCoordinateKey",(function(){return v})),r.d(t,"getCoordinateKeys",(function(){return S})),r.d(t,"getDistance",(function(){return G})),r.d(t,"getDistanceFromLine",(function(){return ee})),r.d(t,"getGreatCircleBearing",(function(){return te})),r.d(t,"getLatitude",(function(){return A})),r.d(t,"getLongitude",(function(){return P})),r.d(t,"getPathLength",(function(){return ne})),r.d(t,"getPreciseDistance",(function(){return ie})),r.d(t,"getRhumbLineBearing",(function(){return Y})),r.d(t,"getRoughCompassDirection",(function(){return oe})),r.d(t,"getSpeed",(function(){return ae})),r.d(t,"isDecimal",(function(){return y})),r.d(t,"isPointInLine",(function(){return se})),r.d(t,"isPointInPolygon",(function(){return le})),r.d(t,"isPointNearLine",(function(){return ue})),r.d(t,"isPointWithinRadius",(function(){return ce})),r.d(t,"isSexagesimal",(function(){return m})),r.d(t,"isValidCoordinate",(function(){return E})),r.d(t,"isValidLatitude",(function(){return I})),r.d(t,"isValidLongitude",(function(){return k})),r.d(t,"orderByDistance",(function(){return q})),r.d(t,"sexagesimalToDecimal",(function(){return _})),r.d(t,"toDecimal",(function(){return C})),r.d(t,"toRad",(function(){return j})),r.d(t,"toDeg",(function(){return F})),r.d(t,"wktToPolygon",(function(){return pe})),r.d(t,"sexagesimalPattern",(function(){return n})),r.d(t,"earthRadius",(function(){return i})),r.d(t,"MINLAT",(function(){return o})),r.d(t,"MAXLAT",(function(){return a})),r.d(t,"MINLON",(function(){return l})),r.d(t,"MAXLON",(function(){return u})),r.d(t,"longitudeKeys",(function(){return c})),r.d(t,"latitudeKeys",(function(){return d})),r.d(t,"altitudeKeys",(function(){return h})),r.d(t,"distanceConversion",(function(){return p})),r.d(t,"timeConversion",(function(){return f})),r.d(t,"areaConversion",(function(){return g}));var n=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/,i=6378137,o=-90,a=90,l=-180,u=180,c=["lng","lon","longitude",0],d=["lat","latitude",1],h=["alt","altitude","elevation","elev",2],p={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},f={m:60,h:3600,d:86400},g={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};g.sqm=g.m2,g.sqkm=g.km2,g.sqft=g.ft2,g.sqyd=g.yd2,g.sqin=g.in2;var v=s((function(e,t){return t.reduce((function(t,r){if(null==e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,r)&&void 0!==r&&void 0===t?(t=r,r):t}),void 0)}),"m"),y=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"v"),m=s((function(e){return n.test(e.toString().trim())}),"p"),_=s((function(e){var t=new RegExp(n).exec(e);if(null==t)throw new Error("Given value is not in sexagesimal format");var r=Number(t[2])/60||0,i=Number(t[4])/3600||0,o=parseFloat(t[1])+r+i;return["S","W"].includes(t[7])?-o:o}),"y");function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(b,"b"),s(w,"M"),s(M,"O");var S=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:d,altitude:h},r=v(e,t.longitude),n=v(e,t.latitude),i=v(e,t.altitude);return w({latitude:n,longitude:r},i?{altitude:i}:{})}),"S"),I=s((function e(t){return y(t)?!(parseFloat(t)>a||t<o):!!m(t)&&e(_(t))}),"t"),k=s((function e(t){return y(t)?!(parseFloat(t)>u||t<l):!!m(t)&&e(_(t))}),"t"),E=s((function(e){var t=S(e),r=t.latitude,n=t.longitude;if(Array.isArray(e)&&e.length>=2)return k(e[0])&&I(e[1]);if(void 0===r||void 0===n)return!1;var i=e[n],o=e[r];return void 0!==o&&void 0!==i&&!1!==I(o)&&!1!==k(i)}),"j");function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(O,"w"),s(T,"x"),s(x,"E");var C=s((function e(t){if(y(t))return Number(t);if(m(t))return _(t);if(E(t)){var r=S(t);return Array.isArray(t)?t.map((function(t,r){return[0,1].includes(r)?e(t):t})):T(T(T({},t),r.latitude&&x({},r.latitude,e(t[r.latitude]))),r.longitude&&x({},r.longitude,e(t[r.longitude])))}return Array.isArray(t)?t.map((function(t){return E(t)?e(t):t})):t}),"t"),A=s((function(e,t){var r=v(e,d);if(null!=r){var n=e[r];return!0===t?n:C(n)}}),"A"),P=s((function(e,t){var r=v(e,c);if(null!=r){var n=e[r];return!0===t?n:C(n)}}),"I"),j=s((function(e){return e*Math.PI/180}),"W"),F=s((function(e){return 180*e/Math.PI}),"D"),N=s((function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=A(e),o=P(e),a=t/n,s=j(r),c=j(i),d=j(o),h=Math.asin(Math.sin(c)*Math.cos(a)+Math.cos(c)*Math.sin(a)*Math.cos(s)),p=d+Math.atan2(Math.sin(s)*Math.sin(a)*Math.cos(c),Math.cos(a)-Math.sin(c)*Math.sin(h)),f=F(p);return(f<l||f>u)&&(p=(p+3*Math.PI)%(2*Math.PI)-Math.PI,f=F(p)),{latitude:F(h),longitude:f}}),"F"),R=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=g[t];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"C"),L=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=p[t];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"k"),D=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(t){case"kmh":return e*f.h*p.km;case"mph":return e*f.h*p.mi;default:return e}}),"T");function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(B,"q"),s(U,"$");var V=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"B"),z=s((function(e){var t=B(e.toString().split("."),2),r=t[0],n=t[1],i=Math.abs(Number(r)),o=V(60*Number("0."+(n||0))),a=Math.floor(o),s=V(60*(o%a||0));return i+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(s.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"R"),W=s((function(e){return e>1?1:e<-1?-1:e}),"X"),G=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n=A(e),o=P(e),a=A(t),s=P(t),l=Math.acos(W(Math.sin(j(a))*Math.sin(j(n))+Math.cos(j(a))*Math.cos(j(n))*Math.cos(j(o)-j(s))))*i;return Math.round(l/r)*r}),"_"),q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G;return r="function"==typeof r?r:G,t.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"K"),$=s((function(e,t){return q(e,t)[0]}),"Y"),H=s((function(e){var t=0;if(e.length>2){for(var r,n,o,a=0;a<e.length;a++){a===e.length-2?(r=e.length-2,n=e.length-1,o=0):a===e.length-1?(r=e.length-1,n=0,o=1):(r=a,n=a+1,o=a+2);var s=P(e[r]),l=A(e[n]),u=P(e[o]);t+=(j(u)-j(s))*Math.sin(j(l))}t=t*i*i/2}return Math.abs(t)}),"Z"),K=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,t){var r=A(t),n=P(t);return{maxLat:Math.max(r,e.maxLat),minLat:Math.min(r,e.minLat),maxLng:Math.max(n,e.maxLng),minLng:Math.min(n,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),X=s((function(e,t){var r,n,s=A(e),c=P(e),d=j(s),h=j(c),p=t/i,f=d-p,g=d+p,v=j(a),y=j(o),m=j(u),_=j(l);if(f>y&&g<v){var b=Math.asin(Math.sin(p)/Math.cos(d));(r=h-b)<_&&(r+=2*Math.PI),(n=h+b)>m&&(n-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),r=_,n=m;return[{latitude:F(f),longitude:F(r)},{latitude:F(g),longitude:F(n)}]}),"V"),J=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var t=e.length,r=e.reduce((function(e,t){var r=j(A(t)),n=j(P(t));return{X:e.X+Math.cos(r)*Math.cos(n),Y:e.Y+Math.cos(r)*Math.sin(n),Z:e.Z+Math.sin(r)}}),{X:0,Y:0,Z:0}),n=r.X/t,i=r.Y/t,o=r.Z/t;return{longitude:F(Math.atan2(i,n)),latitude:F(Math.atan2(o,Math.sqrt(n*n+i*i)))}}),"U"),Z=s((function(e){var t=K(e),r=t.minLat+(t.maxLat-t.minLat)/2,n=t.minLng+(t.maxLng-t.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(n.toFixed(6))}}),"z"),Y=s((function(e,t){var r=j(P(t))-j(P(e)),n=Math.log(Math.tan(j(A(t))/2+Math.PI/4)/Math.tan(j(A(e))/2+Math.PI/4));return Math.abs(r)>Math.PI&&(r=r>0?-1*(2*Math.PI-r):2*Math.PI+r),(F(Math.atan2(r,n))+360)%360}),"H"),Q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Y,n="function"==typeof r?r(e,t):Y(e,t);if(isNaN(n))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(n/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"}}),"J"),ee=s((function(e,t,r){var n=G(t,e),i=G(e,r),o=G(t,r),a=Math.acos(W((n*n+o*o-i*i)/(2*n*o))),s=Math.acos(W((i*i+o*o-n*n)/(2*i*o)));return a>Math.PI/2?n:s>Math.PI/2?i:Math.sin(a)*n}),"Q"),te=s((function(e,t){var r=A(t),n=P(t),i=A(e),o=P(e);return(F(Math.atan2(Math.sin(j(n)-j(o))*Math.cos(j(r)),Math.cos(j(i))*Math.sin(j(r))-Math.sin(j(i))*Math.cos(j(r))*Math.cos(j(n)-j(o))))+360)%360}),"tt");function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}s(re,"nt");var ne=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G;return e.reduce((function(e,r){return"object"===re(e)&&null!==e.last&&(e.distance+=t(r,e.last)),e.last=r,e}),{last:null,distance:0}).distance}),"rt"),ie=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n,o,a,s,l,u,c,d=A(e),h=P(e),p=A(t),f=P(t),g=6356752.314245,v=1/298.257223563,y=j(f-h),m=Math.atan((1-v)*Math.tan(j(parseFloat(d)))),_=Math.atan((1-v)*Math.tan(j(parseFloat(p)))),b=Math.sin(m),w=Math.cos(m),M=Math.sin(_),S=Math.cos(_),I=y,k=100;do{var E=Math.sin(I),O=Math.cos(I);if(0===(u=Math.sqrt(S*E*(S*E)+(w*M-b*S*O)*(w*M-b*S*O))))return 0;n=b*M+w*S*O,o=Math.atan2(u,n),l=n-2*b*M/(s=1-(a=w*S*E/u)*a),isNaN(l)&&(l=0);var T=v/16*s*(4+v*(4-3*s));c=I,I=y+(1-T)*v*a*(o+T*u*(l+T*n*(2*l*l-1)))}while(Math.abs(I-c)>1e-12&&--k>0);if(0===k)return NaN;var x=s*(i*i-g*g)/(g*g),C=1+x/16384*(4096+x*(x*(320-175*x)-768)),F=x/1024*(256+x*(x*(74-47*x)-128)),N=F*u*(l+F/4*(n*(2*l*l-1)-F/6*l*(4*u*u-3)*(4*l*l-3))),R=g*C*(o-N);return Math.round(R/r)*r}),"et"),oe=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}),"it"),ae=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G,n=r(e,t),i=Number(t.time)-Number(e.time),o=n/i*1e3;return o}),"ot"),se=s((function(e,t,r){return G(t,e)+G(e,r)===G(t,r)}),"ut"),le=s((function(e,t){for(var r=!1,n=t.length,i=-1,o=n-1;++i<n;o=i)(P(t[i])<=P(e)&&P(e)<P(t[o])||P(t[o])<=P(e)&&P(e)<P(t[i]))&&A(e)<(A(t[o])-A(t[i]))*(P(e)-P(t[i]))/(P(t[o])-P(t[i]))+A(t[i])&&(r=!r);return r}),"at"),ue=s((function(e,t,r,n){return ee(e,t,r)<n}),"ct"),ce=s((function(e,t,r){return G(e,t)<r}),"ft");function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return he(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(de,"st"),s(he,"lt");var pe=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 t=de(e.split(" "),2),r=t[0],n=t[1];return{longitude:parseFloat(r),latitude:parseFloat(n)}}))}),"dt")}])},"object"==typeof e&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof e?e.geolib=n():r.geolib=n()})),sn=se(((e,t)=>{var r,n,i,o,a,l,u,c,d,h,p,f,g,v,m,_,b,w,M,S,I,k,E,O,T;y(),function(e){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function n(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(r,n){return e[r]=t?t(r,n):n}}"function"==typeof define&&define.amd?define("tslib",["exports"],(function(t){e(n(r,n(t)))})):"object"==typeof t&&"object"==typeof t.exports?e(n(r,n(t.exports))):e(n(r)),s(n,"createExporter")}((function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])};r=s((function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),s(n,"__"),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),"__extends"),n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=s((function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),"__rest"),o=s((function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}),"__decorate"),a=s((function(e,t){return function(r,n){t(r,n,e)}}),"__param"),l=s((function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}),"__metadata"),u=s((function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}),"__awaiter"),c=s((function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}),"__generator"),d=s((function(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&T(t,e,r)}),"__exportStar"),T=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},h=s((function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}),"__values"),p=s((function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}),"__read"),f=s((function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}),"__spread"),g=s((function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}),"__spreadArrays"),v=s((function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}),"__spreadArray"),m=s((function(e){return this instanceof m?(this.v=e,this):new m(e)}),"__await"),_=s((function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof m?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}),"__asyncGenerator"),b=s((function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}),"__asyncDelegator"),w=s((function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}),"__asyncValues"),M=s((function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}),"__makeTemplateObject");var y=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};S=s((function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&T(t,e,r);return y(t,e),t}),"__importStar"),I=s((function(e){return e&&e.__esModule?e:{default:e}}),"__importDefault"),k=s((function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}),"__classPrivateFieldGet"),E=s((function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}),"__classPrivateFieldSet"),O=s((function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}),"__classPrivateFieldIn"),e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",l),e("__awaiter",u),e("__generator",c),e("__exportStar",d),e("__createBinding",T),e("__values",h),e("__read",p),e("__spread",f),e("__spreadArrays",g),e("__spreadArray",v),e("__await",m),e("__asyncGenerator",_),e("__asyncDelegator",b),e("__asyncValues",w),e("__makeTemplateObject",M),e("__importStar",S),e("__importDefault",I),e("__classPrivateFieldGet",k),e("__classPrivateFieldSet",E),e("__classPrivateFieldIn",O)}))})),Bt=se(((e,t)=>{var r,n,i,o,a,l,u,c,d,h,p,f,g,v,m,_,b,w,M,S,I,k,E,O,T;y(),function(e){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function n(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(r,n){return e[r]=t?t(r,n):n}}"function"==typeof define&&define.amd?define("tslib",["exports"],(function(t){e(n(r,n(t)))})):"object"==typeof t&&"object"==typeof t.exports?e(n(r,n(t.exports))):e(n(r)),s(n,"createExporter")}((function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])};r=s((function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),s(n,"__"),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),"__extends"),n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=s((function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),"__rest"),o=s((function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}),"__decorate"),a=s((function(e,t){return function(r,n){t(r,n,e)}}),"__param"),l=s((function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}),"__metadata"),u=s((function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}),"__awaiter"),c=s((function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}),"__generator"),d=s((function(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&T(t,e,r)}),"__exportStar"),T=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},h=s((function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}),"__values"),p=s((function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}),"__read"),f=s((function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}),"__spread"),g=s((function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}),"__spreadArrays"),v=s((function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}),"__spreadArray"),m=s((function(e){return this instanceof m?(this.v=e,this):new m(e)}),"__await"),_=s((function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof m?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}),"__asyncGenerator"),b=s((function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}),"__asyncDelegator"),w=s((function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}),"__asyncValues"),M=s((function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}),"__makeTemplateObject");var y=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};S=s((function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&T(t,e,r);return y(t,e),t}),"__importStar"),I=s((function(e){return e&&e.__esModule?e:{default:e}}),"__importDefault"),k=s((function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}),"__classPrivateFieldGet"),E=s((function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}),"__classPrivateFieldSet"),O=s((function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}),"__classPrivateFieldIn"),e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",l),e("__awaiter",u),e("__generator",c),e("__exportStar",d),e("__createBinding",T),e("__values",h),e("__read",p),e("__spread",f),e("__spreadArrays",g),e("__spreadArray",v),e("__await",m),e("__asyncGenerator",_),e("__asyncDelegator",b),e("__asyncValues",w),e("__makeTemplateObject",M),e("__importStar",S),e("__importDefault",I),e("__classPrivateFieldGet",k),e("__classPrivateFieldSet",E),e("__classPrivateFieldIn",O)}))})),Cd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.ServerZone=void 0,(t=e.ServerZone||(e.ServerZone={})).US="US",t.EU="EU"})),Ad=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SpecialEventType=e.RevenueProperty=e.IdentifyOperation=void 0,(t=e.IdentifyOperation||(e.IdentifyOperation={})).SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll",function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(e.RevenueProperty||(e.RevenueProperty={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(e.SpecialEventType||(e.SpecialEventType={}))})),Nd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=void 0,(t=e.LogLevel||(e.LogLevel={}))[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})),Ld=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.PluginType=void 0,(t=e.PluginType||(e.PluginType={})).BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})),Rd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Status=void 0,(t=e.Status||(e.Status={})).Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})),Dd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=void 0,(t=e.TransportType||(e.TransportType={})).XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})),ft=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=e.Status=e.PluginType=e.LogLevel=e.RevenueProperty=e.IdentifyOperation=e.SpecialEventType=e.ServerZone=void 0;var t=Cd();Object.defineProperty(e,"ServerZone",{enumerable:!0,get:function(){return t.ServerZone}});var r=Ad();Object.defineProperty(e,"SpecialEventType",{enumerable:!0,get:function(){return r.SpecialEventType}}),Object.defineProperty(e,"IdentifyOperation",{enumerable:!0,get:function(){return r.IdentifyOperation}}),Object.defineProperty(e,"RevenueProperty",{enumerable:!0,get:function(){return r.RevenueProperty}});var n=Nd();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return n.LogLevel}});var i=Ld();Object.defineProperty(e,"PluginType",{enumerable:!0,get:function(){return i.PluginType}});var o=Rd();Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return o.Status}});var a=Dd();Object.defineProperty(e,"TransportType",{enumerable:!0,get:function(){return a.TransportType}})})),ti=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.EU_AMPLITUDE_BATCH_SERVER_URL=e.AMPLITUDE_BATCH_SERVER_URL=e.EU_AMPLITUDE_SERVER_URL=e.AMPLITUDE_SERVER_URL=e.STORAGE_PREFIX=e.AMPLITUDE_PREFIX=e.UNSET_VALUE=void 0,e.UNSET_VALUE="-",e.AMPLITUDE_PREFIX="AMP",e.STORAGE_PREFIX="".concat(e.AMPLITUDE_PREFIX,"_unsent"),e.AMPLITUDE_SERVER_URL="https://api2.amplitude.com/2/httpapi",e.EU_AMPLITUDE_SERVER_URL="https://api.eu.amplitude.com/2/httpapi",e.AMPLITUDE_BATCH_SERVER_URL="https://api2.amplitude.com/batch",e.EU_AMPLITUDE_BATCH_SERVER_URL="https://api.eu.amplitude.com/batch"})),ll=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isValidProperties=e.isValidObject=void 0;var t=Bt(),r=s((function(t){if(Object.keys(t).length>1e3)return!1;for(var r in t){var n=t[r];if(!(0,e.isValidProperties)(r,n))return!1}return!0}),"isValidObject");e.isValidObject=r;var n=s((function(r,n){var i,o;if("string"!=typeof r)return!1;if(Array.isArray(n)){var a=!0;try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;if(Array.isArray(u))return!1;if("object"==typeof u)a=a&&(0,e.isValidObject)(u);else if(!["number","string"].includes(typeof u))return!1;if(!a)return!1}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}else{if(null==n)return!1;if("object"==typeof n)return(0,e.isValidObject)(n);if(!["number","string","boolean"].includes(typeof n))return!1}return!0}),"isValidProperties");e.isValidProperties=n})),ul=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var t=Bt(),r=ft(),n=ti(),i=ll(),o=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return t.__assign({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(r.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(r.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(r.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(r.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(r.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(r.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(r.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(r.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(r.IdentifyOperation.UNSET,e,n.UNSET_VALUE),this},e.prototype.clearAll=function(){return this._properties={},this._properties[r.IdentifyOperation.CLEAR_ALL]=n.UNSET_VALUE,this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[r.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===r.IdentifyOperation.ADD?"number"==typeof n:e===r.IdentifyOperation.UNSET||e===r.IdentifyOperation.REMOVE||(0,i.isValidProperties)(t,n))},e}();e.Identify=o})),cl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createRevenueEvent=e.createGroupEvent=e.createGroupIdentifyEvent=e.createIdentifyEvent=e.createTrackEvent=void 0;var t=Bt(),r=ft(),n=ul(),i=s((function(e,r,n){var i="string"==typeof e?{event_type:e}:e;return t.__assign(t.__assign(t.__assign({},i),n),r&&{event_properties:r})}),"createTrackEvent");e.createTrackEvent=i;var o=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent");e.createIdentifyEvent=o;var a=s((function(e,n,i,o){var a;return t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[e]=n,a)})}),"createGroupIdentifyEvent");e.createGroupIdentifyEvent=a;var l=s((function(e,i,o){var a,s=new n.Identify;return s.set(e,i),t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[e]=i,a)})}),"createGroupEvent");e.createGroupEvent=l;var u=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");e.createRevenueEvent=u})),Ja=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.buildResult=void 0;var t=ft(),r=s((function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=t.Status.Unknown),{event:e,code:r,message:n}}),"buildResult");e.buildResult=r})),Fd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var t=Bt(),r=ft(),n=Ja(),i=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,e.setup(r)];case 1:return t.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(r){t.queue.push([e,r]),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 t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,_,b,w;return t.__generator(this,(function(M){switch(M.label){case 0:if(!e)return[2];i=t.__read(e,1),o=i[0],a=t.__read(e,2),s=a[1],l=this.plugins.filter((function(e){return e.type===r.PluginType.BEFORE})),M.label=1;case 1:M.trys.push([1,6,7,8]),u=t.__values(l),c=u.next(),M.label=2;case 2:return c.done?[3,5]:[4,c.value.execute(t.__assign({},o))];case 3:o=M.sent(),M.label=4;case 4:return c=u.next(),[3,2];case 5:return[3,8];case 6:return d=M.sent(),m={error:d},[3,8];case 7:try{c&&!c.done&&(_=u.return)&&_.call(u)}finally{if(m)throw m.error}return[7];case 8:h=this.plugins.filter((function(e){return e.type===r.PluginType.ENRICHMENT})),M.label=9;case 9:M.trys.push([9,14,15,16]),p=t.__values(h),f=p.next(),M.label=10;case 10:return f.done?[3,13]:[4,f.value.execute(t.__assign({},o))];case 11:o=M.sent(),M.label=12;case 12:return f=p.next(),[3,10];case 13:return[3,16];case 14:return g=M.sent(),b={error:g},[3,16];case 15:try{f&&!f.done&&(w=p.return)&&w.call(p)}finally{if(b)throw b.error}return[7];case 16:return v=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),y=v.map((function(e){var r=t.__assign({},o);return e.execute(r).catch((function(e){return(0,n.buildResult)(r,0,String(e))}))})),Promise.all(y).then((function(e){var r=t.__read(e,1)[0];s(r)})),[2]}}))}))},e.prototype.flush=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,n,i,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return o.apply(e)})))];case 1:return t.sent(),n=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),i=n.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return t.sent(),[2]}}))}))},e}();e.Timeline=i})),dl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CLIENT_NOT_INITIALIZED=e.INVALID_API_KEY=e.MISSING_API_KEY_MESSAGE=e.OPT_OUT_MESSAGE=e.MAX_RETRIES_EXCEEDED_MESSAGE=e.UNEXPECTED_ERROR_MESSAGE=e.SUCCESS_MESSAGE=void 0,e.SUCCESS_MESSAGE="Event tracked successfully",e.UNEXPECTED_ERROR_MESSAGE="Unexpected error occurred",e.MAX_RETRIES_EXCEEDED_MESSAGE="Event rejected due to exceeded retry count",e.OPT_OUT_MESSAGE="Event skipped due to optOut config",e.MISSING_API_KEY_MESSAGE="Event rejected due to missing API key",e.INVALID_API_KEY="Invalid API key",e.CLIENT_NOT_INITIALIZED="Client not initialized"})),qd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.AmplitudeCore=void 0;var t=Bt(),r=cl(),n=Fd(),i=Ja(),o=dl(),a=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 n.Timeline,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s;return t.__generator(this,(function(l){switch(l.label){case 0:r=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,6,7,8]),n=t.__values(r),i=n.next(),l.label=2;case 2:return i.done?[3,5]:[4,(0,i.value)()];case 3:l.sent(),l.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),a={error:o},[3,8];case 7:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var i=(0,r.createTrackEvent)(e,t,n);return this.dispatch(i)},e.prototype.identify=function(e,t){var n=(0,r.createIdentifyEvent)(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,i){var o=(0,r.createGroupIdentifyEvent)(e,t,n,i);return this.dispatch(o)},e.prototype.setGroup=function(e,t,n){var i=(0,r.createGroupEvent)(e,t,n);return this.dispatch(i)},e.prototype.revenue=function(e,t){var n=(0,r.createRevenueEvent)(e,t);return this.dispatch(n)},e.prototype.add=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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((0,i.buildResult)(e,0,o.CLIENT_NOT_INITIALIZED));this.process(e).then(t)},e.prototype.dispatch=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r=this;return t.__generator(this,(function(t){return this.config?[2,this.process(e)]:[2,new Promise((function(t){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,t))}))]}))}))},e.prototype.process=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n,a;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.config.optOut?[2,(0,i.buildResult)(e,0,o.OPT_OUT_MESSAGE)]:[4,this.timeline.push(e)];case 1:return 200===(a=t.sent()).code?this.config.loggerProvider.log(a.message):this.config.loggerProvider.error(a.message),[2,a];case 2:return r=t.sent(),n=String(r),this.config.loggerProvider.error(n),[2,a=(0,i.buildResult)(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=Boolean(e):this.q.push(this.setOptOut.bind(this,Boolean(e)))},e.prototype.flush=function(){return this.timeline.flush()},e}();e.AmplitudeCore=a})),Vd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Revenue=void 0;var t=Bt(),r=ft(),n=ll(),i=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(0,n.isValidObject)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?t.__assign({},this.properties):{};return e[r.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[r.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[r.RevenueProperty.REVENUE_PRICE]=this.price,e[r.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[r.RevenueProperty.REVENUE]=this.revenue,e},e}();e.Revenue=i})),Ud=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.chunk=void 0;var t=s((function(e,t){var r=Math.max(t,1);return e.reduce((function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");e.chunk=t})),hl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var t=ft(),r="Amplitude Logger ",n=function(){function e(){this.logLevel=t.LogLevel.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=t.LogLevel.None},e.prototype.enable=function(e){void 0===e&&(e=t.LogLevel.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Verbose||console.log("".concat(r,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Warn||console.warn("".concat(r,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Error||console.error("".concat(r,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Debug||console.log("".concat(r,"[Debug]: ").concat(e.join(" ")))},e}();e.Logger=n})),fl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createServerConfig=e.getServerUrl=e.Config=e.getDefaultConfig=void 0;var t=ft(),r=ti(),n=hl(),i=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:t.LogLevel.Warn,loggerProvider:new n.Logger,optOut:!1,serverUrl:r.AMPLITUDE_SERVER_URL,serverZone:t.ServerZone.US,useBatch:!1}}),"getDefaultConfig");e.getDefaultConfig=i;var o=function(){function t(t){var r,n,i;this._optOut=!1;var o=(0,e.getDefaultConfig)();this.apiKey=t.apiKey,this.flushIntervalMillis=t.flushIntervalMillis||o.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||o.flushQueueSize,this.loggerProvider=t.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=t.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.optOut=null!==(n=t.optOut)&&void 0!==n?n:o.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||o.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=null!==(i=t.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=(0,e.createServerConfig)(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return s(t,"Config"),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}();e.Config=o;var a=s((function(e,n){return e===t.ServerZone.EU?n?r.EU_AMPLITUDE_BATCH_SERVER_URL:r.EU_AMPLITUDE_SERVER_URL:n?r.AMPLITUDE_BATCH_SERVER_URL:r.AMPLITUDE_SERVER_URL}),"getServerUrl");e.getServerUrl=a;var l=s((function(r,n,i){if(void 0===r&&(r=""),void 0===n&&(n=(0,e.getDefaultConfig)().serverZone),void 0===i&&(i=(0,e.getDefaultConfig)().useBatch),r)return{serverUrl:r,serverZone:void 0};var o=[t.ServerZone.US,t.ServerZone.EU].includes(n)?n:(0,e.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,e.getServerUrl)(o,i)}}),"createServerConfig");e.createServerConfig=l})),Gd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Destination=void 0;var t=Bt(),r=ft(),n=dl(),i=ti(),o=Ud(),a=Ja(),l=fl(),u=function(){function e(){this.name="amplitude",this.type=r.PluginType.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){var n,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return this.config=e,this.storageKey="".concat(i.STORAGE_PREFIX,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(r=this.config.storageProvider)||void 0===r?void 0:r.get(this.storageKey)];case 1:return n=t.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return o.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(r){var n={event:e,attempts:0,callback:function(e){return r(e)},timeout:0};t.addToQueue(n)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,n.MAX_RETRIES_EXCEEDED_MESSAGE),!1)}));i.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),t.__awaiter(this,void 0,void 0,(function(){var r,n,i,a=this;return t.__generator(this,(function(t){switch(t.label){case 0:return r=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?r.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=(0,o.chunk)(r,this.config.flushQueueSize),[4,Promise.all(i.map((function(t){return a.send(t,e)})))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(e,r){return void 0===r&&(r=!0),t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u;return t.__generator(this,(function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,n.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:e.map((function(e){var r=e.event;r.extra;return t.__rest(r,["extra"])})),options:{min_id_length:this.config.minIdLength}},c.label=1;case 1:return c.trys.push([1,3,,4]),o=(0,l.createServerConfig)(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(o,i)];case 2:if(null===(a=c.sent()))return this.fulfillRequest(e,0,n.UNEXPECTED_ERROR_MESSAGE),[2];if(!r){if("body"in a){s="";try{s=JSON.stringify(a.body,null,2)}catch(e){}this.fulfillRequest(e,a.statusCode,"".concat(a.status,": ").concat(s))}else this.fulfillRequest(e,a.statusCode,a.status);return[2]}return this.handleReponse(a,e),[3,4];case 3:return u=c.sent(),this.fulfillRequest(e,0,String(u)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case r.Status.Success:this.handleSuccessResponse(e,t);break;case r.Status.Invalid:this.handleInvalidResponse(e,t);break;case r.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case r.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,n.SUCCESS_MESSAGE)},e.prototype.handleInvalidResponse=function(e,r){var i=this;if(e.body.missingField||e.body.error.startsWith(n.INVALID_API_KEY))this.fulfillRequest(r,e.statusCode,e.body.error);else{var o=t.__spreadArray(t.__spreadArray(t.__spreadArray(t.__spreadArray([],t.__read(Object.values(e.body.eventsWithInvalidFields)),!1),t.__read(Object.values(e.body.eventsWithMissingFields)),!1),t.__read(Object.values(e.body.eventsWithInvalidIdLengths)),!1),t.__read(e.body.silencedEvents),!1).flat(),a=new Set(o),s=r.filter((function(t,r){if(!a.has(r))return!0;i.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(s),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,r){1!==r.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,t.__spreadArray([],t.__read(r),!1))):this.fulfillRequest(r,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,s=new Set(i),l=new Set(o),u=new Set(a),c=r.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&l.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(c),!1))},e.prototype.handleOtherReponse=function(e){var r=this;this.addToQueue.apply(this,t.__spreadArray([],t.__read(e.map((function(e){return e.timeout=e.attempts*r.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,r){this.saveEvents(),e.forEach((function(e){return e.callback((0,a.buildResult)(e.event,t,r))}))},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}();e.Destination=u})),Hd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.returnWrapper=void 0;var t=Bt(),r=s((function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return{promise:e.apply(void 0,t.__spreadArray([],t.__read(r),!1))}}}),"returnWrapper");e.returnWrapper=r})),$d=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.debugWrapper=e.getClientStates=e.getValueByStringPath=e.getClientLogConfig=e.getStacktrace=void 0;var t=Bt(),r=ft(),n=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace");e.getStacktrace=n;var i=s((function(e){return function(){var r=t.__assign({},e.config);return{logger:r.loggerProvider,logLevel:r.logLevel}}}),"getClientLogConfig");e.getClientLogConfig=i;var o=s((function(e,r){var n,i;r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=t.__values(r.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e}),"getValueByStringPath");e.getValueByStringPath=o;var a=s((function(r,n){return function(){var i,o,a={};try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=(0,e.getValueByStringPath)(r,u)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}}),"getClientStates");e.getClientStates=a;var l=s((function(t,n,i,o,a){return void 0===a&&(a=null),function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var u=i(),c=u.logger,d=u.logLevel;if(d&&d<r.LogLevel.Debug||!d||!c)return t.apply(a,s);var h={type:"invoke public method",name:n,args:s,stacktrace:(0,e.getStacktrace)(1),time:{start:(new Date).toISOString()},states:{}};o&&h.states&&(h.states.before=o());var p=t.apply(a,s);return p&&p.promise?p.promise.then((function(){o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))})):(o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))),p}}),"debugWrapper");e.debugWrapper=l})),Kd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var t=s((function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e.UUID)}),"UUID");e.UUID=t})),Xd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MemoryStorage=void 0;var t=Bt(),r=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.get(e)];case 1:return[2,(r=t.sent())?JSON.stringify(r):void 0]}}))}))},e.prototype.set=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.set(e,r),[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();e.MemoryStorage=r})),Yd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransport=void 0;var t=ft(),r=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,_,b,w,M,S;if("object"!=typeof e)return null;var I=e.code||0,k=this.buildStatus(I);switch(k){case t.Status.Success:return{status:k,statusCode:I,body:{eventsIngested:null!==(r=e.events_ingested)&&void 0!==r?r:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(i=e.server_upload_time)&&void 0!==i?i:0}};case t.Status.Invalid:return{status:k,statusCode:I,body:{error:null!==(o=e.error)&&void 0!==o?o:"",missingField:null!==(a=e.missing_field)&&void 0!==a?a:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(d=e.exceeded_daily_quota_devices)&&void 0!==d?d:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(g=e.throttled_events)&&void 0!==g?g:[]}};case t.Status.PayloadTooLarge:return{status:k,statusCode:I,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case t.Status.RateLimit:return{status:k,statusCode:I,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(_=e.throttled_devices)&&void 0!==_?_:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(M=e.exceeded_daily_quota_users)&&void 0!==M?M:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case t.Status.Timeout:default:return{status:k,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?t.Status.Success:429===e?t.Status.RateLimit:413===e?t.Status.PayloadTooLarge:408===e?t.Status.Timeout:e>=400&&e<500?t.Status.Invalid:e>=500?t.Status.Failed:t.Status.Unknown},e}();e.BaseTransport=r})),Kt=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createIdentifyEvent=e.BaseTransport=e.MemoryStorage=e.UUID=e.getClientStates=e.getClientLogConfig=e.debugWrapper=e.returnWrapper=e.AMPLITUDE_PREFIX=e.Logger=e.Config=e.Destination=e.Revenue=e.Identify=e.AmplitudeCore=void 0;var t=qd();Object.defineProperty(e,"AmplitudeCore",{enumerable:!0,get:function(){return t.AmplitudeCore}});var r=ul();Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return r.Identify}});var n=Vd();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return n.Revenue}});var i=Gd();Object.defineProperty(e,"Destination",{enumerable:!0,get:function(){return i.Destination}});var o=fl();Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return o.Config}});var a=hl();Object.defineProperty(e,"Logger",{enumerable:!0,get:function(){return a.Logger}});var s=ti();Object.defineProperty(e,"AMPLITUDE_PREFIX",{enumerable:!0,get:function(){return s.AMPLITUDE_PREFIX}});var l=Hd();Object.defineProperty(e,"returnWrapper",{enumerable:!0,get:function(){return l.returnWrapper}});var u=$d();Object.defineProperty(e,"debugWrapper",{enumerable:!0,get:function(){return u.debugWrapper}}),Object.defineProperty(e,"getClientLogConfig",{enumerable:!0,get:function(){return u.getClientLogConfig}}),Object.defineProperty(e,"getClientStates",{enumerable:!0,get:function(){return u.getClientStates}});var c=Kd();Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return c.UUID}});var d=Xd();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:function(){return d.MemoryStorage}});var h=Yd();Object.defineProperty(e,"BaseTransport",{enumerable:!0,get:function(){return h.BaseTransport}});var p=cl();Object.defineProperty(e,"createIdentifyEvent",{enumerable:!0,get:function(){return p.createIdentifyEvent}})})),Un=se(((e,t)=>{var r,n,i,o,a,l,u,c,d,h,p,f,g,v,m,_,b,w,M,S,I,k,E,O,T;y(),function(e){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function n(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(r,n){return e[r]=t?t(r,n):n}}"function"==typeof define&&define.amd?define("tslib",["exports"],(function(t){e(n(r,n(t)))})):"object"==typeof t&&"object"==typeof t.exports?e(n(r,n(t.exports))):e(n(r)),s(n,"createExporter")}((function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])};r=s((function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),s(n,"__"),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),"__extends"),n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=s((function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),"__rest"),o=s((function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}),"__decorate"),a=s((function(e,t){return function(r,n){t(r,n,e)}}),"__param"),l=s((function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}),"__metadata"),u=s((function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}),"__awaiter"),c=s((function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}),"__generator"),d=s((function(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&T(t,e,r)}),"__exportStar"),T=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},h=s((function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}),"__values"),p=s((function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}),"__read"),f=s((function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}),"__spread"),g=s((function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}),"__spreadArrays"),v=s((function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}),"__spreadArray"),m=s((function(e){return this instanceof m?(this.v=e,this):new m(e)}),"__await"),_=s((function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof m?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}),"__asyncGenerator"),b=s((function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}),"__asyncDelegator"),w=s((function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}),"__asyncValues"),M=s((function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}),"__makeTemplateObject");var y=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};S=s((function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&T(t,e,r);return y(t,e),t}),"__importStar"),I=s((function(e){return e&&e.__esModule?e:{default:e}}),"__importDefault"),k=s((function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}),"__classPrivateFieldGet"),E=s((function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}),"__classPrivateFieldSet"),O=s((function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}),"__classPrivateFieldIn"),e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",l),e("__awaiter",u),e("__generator",c),e("__exportStar",d),e("__createBinding",T),e("__values",h),e("__read",p),e("__spread",f),e("__spreadArrays",g),e("__spreadArray",v),e("__await",m),e("__asyncGenerator",_),e("__asyncDelegator",b),e("__asyncValues",w),e("__makeTemplateObject",M),e("__importStar",S),e("__importDefault",I),e("__classPrivateFieldGet",k),e("__classPrivateFieldSet",E),e("__classPrivateFieldIn",O)}))})),fo=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=void 0;var t=s((function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0}),"getGlobalScope");e.getGlobalScope=t})),yl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeURIComponent=e.getQueryParams=void 0;var t=fo(),r=s((function(){var r,n=(0,t.getGlobalScope)();return(null===(r=null==n?void 0:n.location)||void 0===r?void 0:r.search)?n.location.search.substring(1).split("&").filter(Boolean).reduce((function(t,r){var n=r.split("=",2),i=(0,e.tryDecodeURIComponent)(n[0]),o=(0,e.tryDecodeURIComponent)(n[1]);return o&&(t[i]=o),t}),{}):{}}),"getQueryParams");e.getQueryParams=r;var n=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}}),"tryDecodeURIComponent");e.tryDecodeURIComponent=n})),mo=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MKTG=e.BASE_CAMPAIGN=e.EMPTY_VALUE=e.WBRAID=e.TWCLID=e.TTCLID=e.MSCLKID=e.KO_CLICK_ID=e.GCLID=e.GBRAID=e.FBCLID=e.DCLID=e.UTM_TERM=e.UTM_SOURCE=e.UTM_MEDIUM=e.UTM_ID=e.UTM_CONTENT=e.UTM_CAMPAIGN=void 0,e.UTM_CAMPAIGN="utm_campaign",e.UTM_CONTENT="utm_content",e.UTM_ID="utm_id",e.UTM_MEDIUM="utm_medium",e.UTM_SOURCE="utm_source",e.UTM_TERM="utm_term",e.DCLID="dclid",e.FBCLID="fbclid",e.GBRAID="gbraid",e.GCLID="gclid",e.KO_CLICK_ID="ko_click_id",e.MSCLKID="msclkid",e.TTCLID="ttclid",e.TWCLID="twclid",e.WBRAID="wbraid",e.EMPTY_VALUE="EMPTY",e.BASE_CAMPAIGN={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},e.MKTG="MKTG"})),bl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignParser=void 0;var t=Un(),r=yl(),n=mo(),i=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,t.__assign(t.__assign(t.__assign(t.__assign({},n.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=(0,r.getQueryParams)();return{utm_campaign:e[n.UTM_CAMPAIGN],utm_content:e[n.UTM_CONTENT],utm_id:e[n.UTM_ID],utm_medium:e[n.UTM_MEDIUM],utm_source:e[n.UTM_SOURCE],utm_term:e[n.UTM_TERM]}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!==(t=null===(e=r.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=(0,r.getQueryParams)();return(e={})[n.DCLID]=t[n.DCLID],e[n.FBCLID]=t[n.FBCLID],e[n.GBRAID]=t[n.GBRAID],e[n.GCLID]=t[n.GCLID],e[n.KO_CLICK_ID]=t[n.KO_CLICK_ID],e[n.MSCLKID]=t[n.MSCLKID],e[n.TTCLID]=t[n.TTCLID],e[n.TWCLID]=t[n.TWCLID],e[n.WBRAID]=t[n.WBRAID],e},e}();e.CampaignParser=i})),vo=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getOldCookieName=e.getCookieName=void 0;var t=Kt(),r=s((function(e,r,n){return void 0===r&&(r=""),void 0===n&&(n=10),[t.AMPLITUDE_PREFIX,r,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName");e.getCookieName=r;var n=s((function(e){return"".concat(t.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName");e.getOldCookieName=n})),kp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignTracker=void 0;var t=Un(),r=Kt(),n=vo(),i=bl(),o=mo(),a=function(){function e(e,t){var r,a;this.storage=t.storage,this.storageKey=(0,n.getCookieName)(e,o.MKTG),this.parser=new i.CampaignParser,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=Boolean(t.disabled),this.trackNewCampaigns=Boolean(t.trackNewCampaigns),this.trackPageViews=Boolean(t.trackPageViews),this.excludeReferrers=null!==(r=t.excludeReferrers)&&void 0!==r?r:[],"undefined"!=typeof location&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(a=t.initialEmptyValue)&&void 0!==a?a:o.EMPTY_VALUE}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,r,n){void 0===n&&(n=!1);e.referrer;var i=e.referring_domain,o=t.__rest(e,["referrer","referring_domain"]),a=r||{},s=(a.referrer,a.referring_domain),u=t.__rest(a,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var c=JSON.stringify(o)!==JSON.stringify(u),d=n?l(i||"")!==l(s||""):i!==s;return!r||c||d},e.prototype.saveCampaignToStorage=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 n=this,i=t.__assign(t.__assign({},o.BASE_CAMPAIGN),e),a=Object.entries(i).reduce((function(e,r){var i=t.__read(r,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),a||n.initialEmptyValue),a?e.set(o,a):e.unset(o)}),new r.Identify),s={event_type:"Page View",event_properties:{page_title:"undefined"!=typeof document&&document.title||"",page_location:"undefined"!=typeof location&&location.href||"",page_path:"undefined"!=typeof location&&location.pathname||""}};return t.__assign(t.__assign({},(0,r.createIdentifyEvent)(a)),this.trackPageViews&&s)},e.prototype.send=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n;return t.__generator(this,(function(t){switch(t.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return r=t.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=t.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(r,n))return[2];this.onNewCampaign(r)}return[4,this.track(this.createCampaignEvent(r))];case 3:return t.sent(),[4,this.saveCampaignToStorage(r)];case 4:return t.sent(),[2]}}))}))},e}();e.CampaignTracker=a;var l=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain")})),Mp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CookieStorage=void 0;var t=Un(),r=fo(),n=function(){function e(e){this.options=t.__assign({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e(this.options),o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=t.sent()))return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch(e){}return[2,JSON.parse(r)]}catch(e){return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(t){return i=(0,r.getGlobalScope)(),o=null!==(n=null==i?void 0:i.document.cookie.split("; "))&&void 0!==n?n:[],(a=o.find((function(t){return 0===t.indexOf(e+"=")})))?[2,a.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){var o,a,s,l,u,c;return t.__generator(this,(function(t){try{o=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,s=void 0,(a=null!==n?o:-1)&&((l=new Date).setTime(l.getTime()+24*a*60*60*1e3),s=l),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(u+="; expires=".concat(s.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),(c=(0,r.getGlobalScope)())&&(c.document.cookie=u)}catch(e){}return[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2]}))}))},e}();e.CookieStorage=n})),Tp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SessionManager=void 0;var t=Un(),r=vo(),n=function(){function e(e,t){this.storage=e,this.storageKey=(0,r.getCookieName)(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return r=this,[4,this.storage.get(this.storageKey)];case 1:return r.cache=null!==(e=t.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=t.__assign(t.__assign({},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}();e.SessionManager=n})),xp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.FetchTransport=void 0;var t=Un(),r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),s(r,"FetchTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n,i;return t.__generator(this,(function(t){switch(t.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(r),method:"POST"},[4,fetch(e,n)];case 1:return[4,t.sent().json()];case 2:return i=t.sent(),[2,this.buildResponse(i)]}}))}))},r}(Kt().BaseTransport);e.FetchTransport=r})),Ip=se(((e,t)=>{var r,n;y(),r=e,n=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return n(null==t&&r.path)}},r.exports),r.exports}function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}s(r,"createCommonjsModule"),s(n,"commonjsRequire");var i=r((function(e,r){!function(t,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",S="ASUS",I="BlackBerry",k="Browser",E="Chrome",O="Firefox",T="Google",x="Huawei",C="LG",A="Microsoft",P="Motorola",j="Opera",F="Samsung",N="Sony",R="Xiaomi",L="Zebra",D="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),V=s((function(e,t){return typeof e===l&&-1!==z(t).indexOf(z(e))}),"has"),z=s((function(e){return e.toLowerCase()}),"lowerize"),W=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),G=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),$=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(V(t[r][i],e))return"?"===r?n:r}else if(V(t[r],e))return"?"===r?n:r;return e}),"strMapper"),H={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,O]],[/\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,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,E+" 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,$,{"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,O+" 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,z]],[/((?: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/,"",z]],[/(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,z]]],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,[h,F],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,F],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,x],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,x],[d,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," "],[h,R],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,R],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,C],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,C],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,T],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,T],[d,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,[h,N],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,L],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,L],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,N],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,F],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,C],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,E+"cast"],[h,T],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,N],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,G],[u,G],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,L],[d,_]],[/(quest( 2)?)/i],[u,[h,D],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,$,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,$,H]],[/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,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,E+"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]]},X=s((function(e,r){if(typeof e===a&&(r=e,e=n),!(this instanceof X))return new X(e,r).getResult();var i=e||(typeof t!==o&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:""),s=r?B(K,r):K;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=W(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?G(e,275):e,this},this.setUA(i),this}),"UAParser");X.VERSION="0.7.31",X.BROWSER=U([c,p,"major"]),X.CPU=U([f]),X.DEVICE=U([u,h,d,g,v,m,y,_,b]),X.ENGINE=X.OS=U([c,p]),e.exports&&(r=e.exports=X),r.UAParser=X;var J=typeof t!==o&&(t.jQuery||t.Zepto);if(J&&!J.ua){var Z=new X;J.ua=Z.getResult(),J.ua.get=function(){return Z.getUA()},J.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)J.ua[r]=t[r]}}}("object"==typeof window?window:t)})),o=function(){function e(){this.ua=new i.UAParser("undefined"!=typeof navigator?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:u(),platform:"Web",os:a(this.ua),deviceModel:l(this.ua)}},e}(),a=s((function(e){var t,r;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(r=e.browser)||void 0===r?void 0:r.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),l=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),u=s((function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),c=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}(),d=s((function(){return d=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),d.apply(this,arguments)}),"__assign"),h=s((function(e,t){var r=typeof e;if(r!==typeof t)return!1;for(var n=0,i=["string","number","boolean","undefined"];n<i.length;n++)if(i[n]===r)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),a=Array.isArray(t);if(o!==a)return!1;if(!o||!a){var s=Object.keys(e).sort(),l=Object.keys(t).sort();if(!h(s,l))return!1;var u=!0;return Object.keys(e).forEach((function(r){h(e[r],t[r])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!h(e[c],t[c]))return!1;return!0}),"isEqual");Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var p=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=d({},this.identity.userProperties),r=d(d({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},updateUserProperties:function(e){for(var t=r.userProperties||{},n=0,i=Object.entries(e);n<i.length;n++){var o=i[n],a=o[0],s=o[1];switch(a){case"$set":for(var l=0,u=Object.entries(s);l<u.length;l++){var c=u[l],d=c[0],h=c[1];t[d]=h}break;case"$unset":for(var p=0,f=Object.keys(s);p<f.length;p++)delete t[d=f[p]];break;case"$clearAll":t={}}}return r.userProperties=t,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return d({},this.identity)},e.prototype.setIdentity=function(e){var t=d({},this.identity);this.identity=d({},e),h(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}(),f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,g=function(){function e(){this.identityStore=new p,this.eventBridge=new c,this.applicationContextProvider=new o}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return f.analyticsConnectorInstances||(f.analyticsConnectorInstances={}),f.analyticsConnectorInstances[t]||(f.analyticsConnectorInstances[t]=new e),f.analyticsConnectorInstances[t]},e}();e.AnalyticsConnector=g,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&void 0!==t?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n((r="undefined"!=typeof globalThis?globalThis:r||self).Experiment={})})),Ml=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getAnalyticsConnector=void 0;var t=Ip(),r=s((function(){return t.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");e.getAnalyticsConnector=r})),Sp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityEventSender=void 0;var t=Un(),r=ft(),n=Ml(),i=function(){function e(){this.name="identity",this.type=r.PluginType.BEFORE,this.identityStore=(0,n.getAnalyticsConnector)().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){return(r=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();e.IdentityEventSender=i})),jp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguage=void 0;var t=s((function(){var e,t,r,n;if("undefined"==typeof navigator)return"";var i=navigator.userLanguage;return null!==(n=null!==(r=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==r?r:i)&&void 0!==n?n:""}),"getLanguage");e.getLanguage=t})),Gn=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=e.BASE_CAMPAIGN=e.getLanguage=e.IdentityEventSender=e.getAnalyticsConnector=e.FetchTransport=e.SessionManager=e.CookieStorage=e.getOldCookieName=e.getCookieName=e.getQueryParams=e.CampaignTracker=e.CampaignParser=void 0;var t=bl();Object.defineProperty(e,"CampaignParser",{enumerable:!0,get:function(){return t.CampaignParser}});var r=kp();Object.defineProperty(e,"CampaignTracker",{enumerable:!0,get:function(){return r.CampaignTracker}});var n=yl();Object.defineProperty(e,"getQueryParams",{enumerable:!0,get:function(){return n.getQueryParams}});var i=vo();Object.defineProperty(e,"getCookieName",{enumerable:!0,get:function(){return i.getCookieName}}),Object.defineProperty(e,"getOldCookieName",{enumerable:!0,get:function(){return i.getOldCookieName}});var o=Mp();Object.defineProperty(e,"CookieStorage",{enumerable:!0,get:function(){return o.CookieStorage}});var a=Tp();Object.defineProperty(e,"SessionManager",{enumerable:!0,get:function(){return a.SessionManager}});var s=xp();Object.defineProperty(e,"FetchTransport",{enumerable:!0,get:function(){return s.FetchTransport}});var l=Ml();Object.defineProperty(e,"getAnalyticsConnector",{enumerable:!0,get:function(){return l.getAnalyticsConnector}});var u=Sp();Object.defineProperty(e,"IdentityEventSender",{enumerable:!0,get:function(){return u.IdentityEventSender}});var c=jp();Object.defineProperty(e,"getLanguage",{enumerable:!0,get:function(){return c.getLanguage}});var d=mo();Object.defineProperty(e,"BASE_CAMPAIGN",{enumerable:!0,get:function(){return d.BASE_CAMPAIGN}});var h=fo();Object.defineProperty(e,"getGlobalScope",{enumerable:!0,get:function(){return h.getGlobalScope}})})),Tl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceProxy=e.convertProxyObjectToRealObject=e.runQueuedFunctions=void 0;var t=s((function(t,r){(0,e.convertProxyObjectToRealObject)(t,r)}),"runQueuedFunctions");e.runQueuedFunctions=t;var r=s((function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var l=s.apply(e,o);"function"==typeof a&&a(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject");e.convertProxyObjectToRealObject=r;var n=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");e.isInstanceProxy=n})),Cp=se(((e,t)=>{y(),function(r,n){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",S="ASUS",I="BlackBerry",k="Browser",E="Chrome",O="Firefox",T="Google",x="Huawei",C="LG",A="Microsoft",P="Motorola",j="Opera",F="Samsung",N="Sony",R="Xiaomi",L="Zebra",D="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),V=s((function(e,t){return typeof e===l&&-1!==z(t).indexOf(z(e))}),"has"),z=s((function(e){return e.toLowerCase()}),"lowerize"),W=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),G=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),$=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(V(t[r][i],e))return"?"===r?n:r}else if(V(t[r],e))return"?"===r?n:r;return e}),"strMapper"),H={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,O]],[/\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,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,E+" 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,$,{"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,O+" 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,z]],[/((?: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/,"",z]],[/(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,z]]],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,[h,F],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,F],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,x],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,x],[d,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," "],[h,R],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,R],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,C],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,C],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,T],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,T],[d,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,[h,N],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,L],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,L],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,N],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,F],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,C],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,E+"cast"],[h,T],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,N],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,G],[u,G],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,L],[d,_]],[/(quest( 2)?)/i],[u,[h,D],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,$,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,$,H]],[/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,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,E+"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]]},X=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof X))return new X(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?B(K,t):K;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=W(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?G(e,275):e,this},this.setUA(i),this}),"UAParser");X.VERSION="0.7.31",X.BROWSER=U([c,p,"major"]),X.CPU=U([f]),X.DEVICE=U([u,h,d,g,v,m,y,_,b]),X.ENGINE=X.OS=U([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=X),e.UAParser=X):typeof define===i&&define.amd?define((function(){return X})):typeof r!==o&&(r.UAParser=X);var J=typeof r!==o&&(r.jQuery||r.Zepto);if(J&&!J.ua){var Z=new X;J.ua=Z.getResult(),J.ua.get=function(){return Z.getUA()},J.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)J.ua[r]=t[r]}}}("object"==typeof window?window:e)})),Ap=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.6.8"})),Np=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=sn(),r=ft(),n=t.__importDefault(Cp()),i=Kt(),o=Gn(),a=Ap(),l=function(){function e(){var e;this.name="context",this.type=r.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(a.VERSION),"undefined"!=typeof navigator&&(e=navigator.userAgent),this.uaResult=new n.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 t.__awaiter(this,void 0,void 0,(function(){var r,n,a,s,l;return t.__generator(this,(function(u){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),r=(new Date).getTime(),n=this.uaResult.browser.name,a=this.uaResult.browser.version,s=this.uaResult.device.model||this.uaResult.os.name,l=this.uaResult.device.vendor,[2,t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:a}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:l}),this.config.trackingOptions.deviceModel&&{device_model:s}),this.config.trackingOptions.language&&{language:(0,o.getLanguage)()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:(0,i.UUID)(),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}();e.Context=l})),xl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorage=void 0;var t=sn(),r=Gn(),n=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e,o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(r=t.sent())?[2,JSON.parse(r)]:[2,void 0];case 2:return t.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,(null===(n=(0,r.getGlobalScope)())||void 0===n?void 0:n.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(i=(0,r.getGlobalScope)())||void 0===i||i.localStorage.setItem(e,JSON.stringify(n))}catch(e){}return[2]}))}))},e.prototype.remove=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(n=(0,r.getGlobalScope)())||void 0===n||n.localStorage.removeItem(e)}catch(e){}return[2]}))}))},e.prototype.reset=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(e=(0,r.getGlobalScope)())||void 0===e||e.localStorage.clear()}catch(e){}return[2]}))}))},e}();e.LocalStorage=n})),Lp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.XHRTransport=void 0;var t=sn(),r=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.__extends(r,e),s(r,"XHRTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,i){"undefined"==typeof XMLHttpRequest&&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,r=JSON.parse(e),a=n.buildResponse(r);t(a)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(r))}))]}))}))},r}(Kt().BaseTransport);e.XHRTransport=r})),Rp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SendBeaconTransport=void 0;var t=sn(),r=Gn(),n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),s(n,"SendBeaconTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var i=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,o){var a=(0,r.getGlobalScope)();if(!(null==a?void 0:a.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(n);return t(a.navigator.sendBeacon(e,JSON.stringify(n))?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(e){o(e)}}))]}))}))},n}(Kt().BaseTransport);e.SendBeaconTransport=n})),Fp=se((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.getTopLevelDomain=e.createTransport=e.createDeviceId=e.createEventsStorage=e.createFlexibleStorage=e.createCookieStorage=e.useBrowserConfig=e.BrowserConfig=e.getDefaultConfig=void 0;var r=sn(),n=ft(),i=Kt(),o=Gn(),a=xl(),l=Lp(),u=Rp(),c=s((function(){var e=new i.MemoryStorage;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new o.SessionManager(e,""),sessionTimeout:18e5,storageProvider:new i.MemoryStorage,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new o.FetchTransport}}),"getDefaultConfig");e.getDefaultConfig=c;var d=function(t){function n(n,i,o){var a,s,l,u,c,d,h,p,f,g,v,y,m=this,_=(0,e.getDefaultConfig)();return(m=t.call(this,r.__assign(r.__assign({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},o),{apiKey:n,storageProvider:null!==(a=null==o?void 0:o.storageProvider)&&void 0!==a?a:_.storageProvider,transportProvider:null!==(s=null==o?void 0:o.transportProvider)&&void 0!==s?s:_.transportProvider}))||this).cookieStorage=null!==(l=null==o?void 0:o.cookieStorage)&&void 0!==l?l:_.cookieStorage,m.sessionManager=null!==(u=null==o?void 0:o.sessionManager)&&void 0!==u?u:_.sessionManager,m.sessionTimeout=null!==(c=null==o?void 0:o.sessionTimeout)&&void 0!==c?c:_.sessionTimeout,m.appVersion=null==o?void 0:o.appVersion,m.attribution=null==o?void 0:o.attribution,m.cookieExpiration=null!==(d=null==o?void 0:o.cookieExpiration)&&void 0!==d?d:_.cookieExpiration,m.cookieSameSite=null!==(h=null==o?void 0:o.cookieSameSite)&&void 0!==h?h:_.cookieSameSite,m.cookieSecure=null!==(p=null==o?void 0:o.cookieSecure)&&void 0!==p?p:_.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(f=null==o?void 0:o.disableCookies)&&void 0!==f?f:_.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:_.domain,m.lastEventTime=null!==(v=m.lastEventTime)&&void 0!==v?v:null==o?void 0:o.lastEventTime,m.optOut=Boolean(null==o?void 0:o.optOut),m.partnerId=null==o?void 0:o.partnerId,m.sessionId=null==o?void 0:o.sessionId,m.trackingOptions=null!==(y=null==o?void 0:o.trackingOptions)&&void 0!==y?y:_.trackingOptions,m.userId=i,m}return r.__extends(n,t),s(n,"BrowserConfig"),Object.defineProperty(n.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(Boolean(e))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),n}(i.Config);e.BrowserConfig=d;var h=s((function(n,i,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,h,p,f,g,v,y,m,_,b,w,M,S;return r.__generator(this,(function(I){switch(I.label){case 0:return t=(0,e.getDefaultConfig)(),null!==(_=null==a?void 0:a.domain)&&void 0!==_?(l=_,[3,3]):[3,1];case 1:return[4,(0,e.getTopLevelDomain)()];case 2:l=I.sent(),I.label=3;case 3:return s=l,[4,(0,e.createCookieStorage)(r.__assign(r.__assign({},a),{domain:s}))];case 4:return u=I.sent(),c=(0,o.getCookieName)(n),[4,u.get(c)];case 5:return h=I.sent(),p=(0,o.getQueryParams)(),[4,new o.SessionManager(u,n).load()];case 6:return f=I.sent(),g=d.bind,v=[void 0,n,null!=i?i:null==h?void 0:h.userId],y=[r.__assign({},a)],m={cookieStorage:u,sessionManager:f,deviceId:(0,e.createDeviceId)(null==h?void 0:h.deviceId,null==a?void 0:a.deviceId,p.deviceId),domain:s,optOut:null!==(b=null==a?void 0:a.optOut)&&void 0!==b?b:Boolean(null==h?void 0:h.optOut)},[4,u.get(c)];case 7:return m.sessionId=null!==(M=null===(w=I.sent())||void 0===w?void 0:w.sessionId)&&void 0!==M?M:null==a?void 0:a.sessionId,[4,(0,e.createEventsStorage)(a)];case 8:return[2,new(g.apply(d,v.concat([r.__assign.apply(void 0,y.concat([(m.storageProvider=I.sent(),m.trackingOptions=r.__assign(r.__assign({},t.trackingOptions),null==a?void 0:a.trackingOptions),m.transportProvider=null!==(S=null==a?void 0:a.transportProvider)&&void 0!==S?S:(0,e.createTransport)(null==a?void 0:a.transport),m)]))])))]}}))}))}),"useBrowserConfig");e.useBrowserConfig=h;var p=s((function(n,i){return void 0===i&&(i=(0,e.getDefaultConfig)()),r.__awaiter(t,void 0,void 0,(function(){var t,o,a;return r.__generator(this,(function(s){switch(s.label){case 0:return t=r.__assign(r.__assign({},i),n),o=null==n?void 0:n.cookieStorage,(a=!o)?[3,2]:[4,o.isEnabled()];case 1:a=!s.sent(),s.label=2;case 2:return a?[2,(0,e.createFlexibleStorage)(t)]:[2,o]}}))}))}),"createCookieStorage");e.createCookieStorage=p;var f=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:return t=new o.CookieStorage({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 a.LocalStorage).isEnabled()]:[3,4];case 3:r.sent()||(t=new i.MemoryStorage),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage");e.createFlexibleStorage=f;var g=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,o,s,l,u;return r.__generator(this,(function(c){switch(c.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];c.label=1;case 1:c.trys.push([1,7,8,9]),t=r.__values([null==e?void 0:e.storageProvider,new a.LocalStorage]),n=t.next(),c.label=2;case 2:return n.done?[3,6]:(i=n.value,(o=i)?[4,i.isEnabled()]:[3,4]);case 3:o=c.sent(),c.label=4;case 4:if(o)return[2,i];c.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return s=c.sent(),l={error:s},[3,9];case 8:try{n&&!n.done&&(u=t.return)&&u.call(t)}finally{if(l)throw l.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage");e.createEventsStorage=g;var v=s((function(e,t,r){return t||r||e||(0,i.UUID)()}),"createDeviceId");e.createDeviceId=v;var m=s((function(t){return t===n.TransportType.XHR?new l.XHRTransport:t===n.TransportType.SendBeacon?new u.SendBeaconTransport:(0,e.getDefaultConfig)().transportProvider}),"createTransport");e.createTransport=m;var _=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,a,s,l,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,(new o.CookieStorage).isEnabled()];case 1:if(!r.sent()||!e&&"undefined"==typeof location)return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),i=[],a="AMP_TLDTEST",s=n.length-2;s>=0;--s)i.push(n.slice(s).join("."));s=0,r.label=2;case 2:return s<i.length?(l=i[s],u={domain:"."+l},[4,(c=new o.CookieStorage(u)).set(a,1)]):[3,7];case 3:return r.sent(),[4,c.get(a)];case 4:return r.sent()?[4,c.remove(a)]:[3,6];case 5:return r.sent(),[2,"."+l];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");e.getTopLevelDomain=_})),qp=se((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.parseTime=e.parseOldCookies=void 0;var r=sn(),n=Gn(),i=xl(),o=s((function(o,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,d,h,p,f;return r.__generator(this,(function(g){switch(g.label){case 0:return[4,(t=new n.CookieStorage).isEnabled()];case 1:return(!g.sent()||(null==a?void 0:a.disableCookies))&&(t=new i.LocalStorage),[4,t.isEnabled()];case 2:return g.sent()?(s=(0,n.getOldCookieName)(o),[4,t.getRaw(s)]):[2,{optOut:!1}];case 3:return(l=g.sent())?[4,t.remove(s)]:[2,{optOut:!1}];case 4:return g.sent(),u=r.__read(l.split("."),5),c=u[0],d=u[1],h=u[2],p=u[3],f=u[4],[2,{deviceId:c,userId:(0,e.decode)(d),sessionId:(0,e.parseTime)(p),lastEventTime:(0,e.parseTime)(f),optOut:Boolean(h)}]}}))}))}),"parseOldCookies");e.parseOldCookies=o;var a=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime");e.parseTime=a;var l=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}}),"decode");e.decode=l})),Cl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=e.AmplitudeBrowser=void 0;var t=sn(),r=Kt(),n=Gn(),i=Tl(),o=Np(),a=Fp(),l=qp(),u=function(e){function u(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(u,e),s(u,"AmplitudeBrowser"),u.prototype.init=function(i,s,u){var c,d,h;return void 0===i&&(i=""),t.__awaiter(this,void 0,void 0,(function(){var p,f,g,v,y=this;return t.__generator(this,(function(m){switch(m.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,(0,l.parseOldCookies)(i,u)]);case 1:return p=m.sent(),[4,(0,a.useBrowserConfig)(i,s||p.userId,t.__assign(t.__assign({},u),{deviceId:null!==(c=p.deviceId)&&void 0!==c?c:null==u?void 0:u.deviceId,sessionId:null!==(d=p.sessionId)&&void 0!==d?d:null==u?void 0:u.sessionId,optOut:null!==(h=null==u?void 0:u.optOut)&&void 0!==h?h:p.optOut,lastEventTime:p.lastEventTime}))];case 2:return f=m.sent(),[4,e.prototype._init.call(this,f)];case 3:return m.sent(),g=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),g=!0),(v=(0,n.getAnalyticsConnector)()).eventBridge.setEventReceiver((function(e){y.track(e.eventType,e.eventProperties)})),v.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new o.Context)];case 4:return m.sent(),[4,this.add(new n.IdentityEventSender)];case 5:return m.sent(),[4,this.add(new r.Destination)];case 6:return m.sent(),this.initializing=!1,[4,this.runAttributionStrategy(f.attribution,g)];case 7:return m.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return m.sent(),[2]}}))}))},u.prototype.runAttributionStrategy=function(e,r){return void 0===r&&(r=!1),t.__awaiter(this,void 0,void 0,(function(){var i,o,s;return t.__generator(this,(function(l){switch(l.label){case 0:return i=this.track.bind(this),o=this.setSessionId.bind(this,Date.now()),[4,(0,a.createFlexibleStorage)(this.config)];case 1:return s=l.sent(),[4,new n.CampaignTracker(this.config.apiKey,t.__assign(t.__assign({},e),{storage:s,track:i,onNewCampaign:o})).send(r)];case 2:return l.sent(),[2]}}))}))},u.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},u.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},u.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},u.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},u.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId((0,r.UUID)())},u.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},u.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},u.prototype.setTransport=function(e){this.config?this.config.transportProvider=(0,a.createTransport)(e):this.q.push(this.setTransport.bind(this,e))},u.prototype.identify=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Identify,o)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},u.prototype.groupIdentify=function(t,n,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new r.Identify,s)}return e.prototype.groupIdentify.call(this,t,n,o,a)},u.prototype.revenue=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Revenue,o)}return e.prototype.revenue.call(this,t,n)},u}(r.AmplitudeCore);e.AmplitudeBrowser=u;var c=s((function(){var e=new u;return{init:(0,r.debugWrapper)((0,r.returnWrapper)(e.init.bind(e)),"init",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),add:(0,r.debugWrapper)((0,r.returnWrapper)(e.add.bind(e)),"add",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),remove:(0,r.debugWrapper)((0,r.returnWrapper)(e.remove.bind(e)),"remove",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),track:(0,r.debugWrapper)((0,r.returnWrapper)(e.track.bind(e)),"track",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),logEvent:(0,r.debugWrapper)((0,r.returnWrapper)(e.logEvent.bind(e)),"logEvent",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),identify:(0,r.debugWrapper)((0,r.returnWrapper)(e.identify.bind(e)),"identify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,r.debugWrapper)((0,r.returnWrapper)(e.groupIdentify.bind(e)),"groupIdentify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),setGroup:(0,r.debugWrapper)((0,r.returnWrapper)(e.setGroup.bind(e)),"setGroup",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),revenue:(0,r.debugWrapper)((0,r.returnWrapper)(e.revenue.bind(e)),"revenue",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),flush:(0,r.debugWrapper)((0,r.returnWrapper)(e.flush.bind(e)),"flush",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),getUserId:(0,r.debugWrapper)(e.getUserId.bind(e),"getUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),setUserId:(0,r.debugWrapper)(e.setUserId.bind(e),"setUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),getDeviceId:(0,r.debugWrapper)(e.getDeviceId.bind(e),"getDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),setDeviceId:(0,r.debugWrapper)(e.setDeviceId.bind(e),"setDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),reset:(0,r.debugWrapper)(e.reset.bind(e),"reset",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId","config.deviceId"])),getSessionId:(0,r.debugWrapper)(e.getSessionId.bind(e),"getSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setSessionId:(0,r.debugWrapper)(e.setSessionId.bind(e),"setSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setOptOut:(0,r.debugWrapper)(e.setOptOut.bind(e),"setOptOut",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setTransport:(0,r.debugWrapper)(e.setTransport.bind(e),"setTransport",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"]))}}),"createInstance");e.createInstance=c,e.default=(0,e.createInstance)()})),Wp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Types=e.Identify=e.Revenue=e.runQueuedFunctions=e.track=e.setUserId=e.setTransport=e.setSessionId=e.setOptOut=e.setGroup=e.setDeviceId=e.revenue=e.reset=e.remove=e.logEvent=e.init=e.identify=e.groupIdentify=e.getUserId=e.getSessionId=e.getDeviceId=e.flush=e.add=e.createInstance=void 0;var t=sn(),r=t.__importDefault(Cl()),n=Cl();Object.defineProperty(e,"createInstance",{enumerable:!0,get:function(){return n.createInstance}}),e.add=r.default.add,e.flush=r.default.flush,e.getDeviceId=r.default.getDeviceId,e.getSessionId=r.default.getSessionId,e.getUserId=r.default.getUserId,e.groupIdentify=r.default.groupIdentify,e.identify=r.default.identify,e.init=r.default.init,e.logEvent=r.default.logEvent,e.remove=r.default.remove,e.reset=r.default.reset,e.revenue=r.default.revenue,e.setDeviceId=r.default.setDeviceId,e.setGroup=r.default.setGroup,e.setOptOut=r.default.setOptOut,e.setSessionId=r.default.setSessionId,e.setTransport=r.default.setTransport,e.setUserId=r.default.setUserId,e.track=r.default.track;var i=Tl();Object.defineProperty(e,"runQueuedFunctions",{enumerable:!0,get:function(){return i.runQueuedFunctions}});var o=Kt();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return o.Revenue}}),Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}}),e.Types=t.__importStar(ft())})),Eh=se(((e,t)=>{y();var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",v="[object Set]",m="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",M=/^\[object .+?Constructor\]$/,S=/^(?: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[w]=I[l]=I[u]=I[c]=I[d]=I[h]=I[p]=I[g]=I[v]=I[m]=I[_]=!1;var k="object"==typeof global&&global&&global.Object===Object&&global,E="object"==typeof self&&self&&self.Object===Object&&self,O=k||E||Function("return this")(),T="object"==typeof e&&e&&!e.nodeType&&e,x=T&&"object"==typeof t&&t&&!t.nodeType&&t,C=x&&x.exports===T,A=C&&k.process,P=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),j=P&&P.isTypedArray;function F(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function N(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function R(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function L(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}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 V(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function z(e,t){return function(r){return e(t(r))}}function W(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}s(F,"arrayFilter"),s(N,"arrayPush"),s(R,"arraySome"),s(L,"baseTimes"),s(D,"baseUnary"),s(B,"cacheHas"),s(U,"getValue"),s(V,"mapToArray"),s(z,"overArg"),s(W,"setToArray");var G,q=Array.prototype,$=Function.prototype,H=Object.prototype,K=O["__core-js_shared__"],X=$.toString,J=H.hasOwnProperty,Z=(G=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Y=H.toString,Q=RegExp("^"+X.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=C?O.Buffer:void 0,te=O.Symbol,re=O.Uint8Array,ne=H.propertyIsEnumerable,ie=q.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,le=z(Object.keys,Object),ue=ct(O,"DataView"),ce=ct(O,"Map"),de=ct(O,"Promise"),he=ct(O,"Set"),pe=ct(O,"WeakMap"),fe=ct(Object,"create"),ge=_t(ue),ve=_t(ce),ye=_t(de),me=_t(he),_e=_t(pe),be=te?te.prototype:void 0,we=be?be.valueOf:void 0;function Me(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Se(){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 ke(e){var t=this.__data__;if(fe){var n=t[e];return n===r?void 0:n}return J.call(t,e)?t[e]:void 0}function Ee(e){var t=this.__data__;return fe?void 0!==t[e]:J.call(t,e)}function Oe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&void 0===t?r:t,this}function Te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(){this.__data__=[],this.size=0}function Ce(e){var t=this.__data__,r=Je(t,e);return!(r<0)&&(r==t.length-1?t.pop():ie.call(t,r,1),--this.size,!0)}function Ae(e){var t=this.__data__,r=Je(t,e);return r<0?void 0:t[r][1]}function Pe(e){return Je(this.__data__,e)>-1}function je(e,t){var r=this.__data__,n=Je(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Fe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ne(){this.size=0,this.__data__={hash:new Me,map:new(ce||Te),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 r=ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ue(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Fe;++t<r;)this.add(e[t])}function Ve(e){return this.__data__.set(e,r),this}function ze(e){return this.__data__.has(e)}function We(e){var t=this.__data__=new Te(e);this.size=t.size}function Ge(){this.__data__=new Te,this.size=0}function qe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function $e(e){return this.__data__.get(e)}function He(e){return this.__data__.has(e)}function Ke(e,t){var r=this.__data__;if(r instanceof Te){var n=r.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Fe(n)}return r.set(e,t),this.size=r.size,this}function Xe(e,t){var r=Mt(e),n=!r&&wt(e),i=!r&&!n&&It(e),o=!r&&!n&&!i&&Ct(e),a=r||n||i||o,s=a?L(e.length,String):[],l=s.length;for(var u in e)(t||J.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&s.push(u);return s}function Je(e,t){for(var r=e.length;r--;)if(bt(e[r][0],t))return r;return-1}function Ze(e,t,r){var n=t(e);return Mt(e)?n:N(n,r(e))}function Ye(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?dt(e):mt(e)}function Qe(e){return xt(e)&&Ye(e)==i}function et(e,t,r,n,i){return e===t||(null==e||null==t||!xt(e)&&!xt(t)?e!=e&&t!=t:tt(e,t,r,n,et,i))}function tt(e,t,r,n,a,s){var l=Mt(e),u=Mt(t),c=l?o:pt(e),d=u?o:pt(t),h=(c=c==i?p:c)==p,f=(d=d==i?p:d)==p,g=c==d;if(g&&It(e)){if(!It(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new We),l||Ct(e)?ot(e,t,r,n,a,s):at(e,t,c,r,n,a,s);if(!(1&r)){var v=h&&J.call(e,"__wrapped__"),y=f&&J.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,_=y?t.value():t;return s||(s=new We),a(m,_,r,n,s)}}return!!g&&(s||(s=new We),st(e,t,r,n,a,s))}function rt(e){return!(!Tt(e)||vt(e))&&(Et(e)?Q:M).test(_t(e))}function nt(e){return xt(e)&&Ot(e.length)&&!!I[Ye(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var r in Object(e))J.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ot(e,t,r,n,i,o){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,h=2&r?new Ue:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var p=e[c],f=t[c];if(n)var g=a?n(f,p,c,t,e,o):n(p,f,c,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!R(t,(function(e,t){if(!B(h,t)&&(p===e||i(p,e,r,n,o)))return h.push(t)}))){d=!1;break}}else if(p!==f&&!i(p,f,r,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function at(e,t,r,n,i,o,s){switch(r){case w: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 re(e),new re(t)));case a:case l:case h:return bt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var c=V;case v:var p=1&n;if(c||(c=W),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;n|=2,s.set(e,t);var y=ot(c(e),c(t),n,i,o,s);return s.delete(e),y;case"[object Symbol]":if(we)return we.call(e)==we.call(t)}return!1}function st(e,t,r,n,i,o){var a=1&r,s=lt(e),l=s.length;if(l!=lt(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:J.call(t,c)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var h=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var f=e[c=s[u]],g=t[c];if(n)var v=a?n(g,f,c,t,e,o):n(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,r,n,o):v)){h=!1;break}p||(p="constructor"==c)}if(h&&!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)&&(h=!1)}return o.delete(e),o.delete(t),h}function lt(e){return Ze(e,At,ht)}function ut(e,t){var r=e.__data__;return gt(t)?r["string"==typeof t?"string":"hash"]:r.map}function ct(e,t){var r=U(e,t);return rt(r)?r:void 0}function dt(e){var t=J.call(e,oe),r=e[oe];try{e[oe]=void 0;var n=!0}catch(e){}var i=Y.call(e);return n&&(t?e[oe]=r:delete e[oe]),i}s(Me,"Hash"),s(Se,"hashClear"),s(Ie,"hashDelete"),s(ke,"hashGet"),s(Ee,"hashHas"),s(Oe,"hashSet"),Me.prototype.clear=Se,Me.prototype.delete=Ie,Me.prototype.get=ke,Me.prototype.has=Ee,Me.prototype.set=Oe,s(Te,"ListCache"),s(xe,"listCacheClear"),s(Ce,"listCacheDelete"),s(Ae,"listCacheGet"),s(Pe,"listCacheHas"),s(je,"listCacheSet"),Te.prototype.clear=xe,Te.prototype.delete=Ce,Te.prototype.get=Ae,Te.prototype.has=Pe,Te.prototype.set=je,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(Ve,"setCacheAdd"),s(ze,"setCacheHas"),Ue.prototype.add=Ue.prototype.push=Ve,Ue.prototype.has=ze,s(We,"Stack"),s(Ge,"stackClear"),s(qe,"stackDelete"),s($e,"stackGet"),s(He,"stackHas"),s(Ke,"stackSet"),We.prototype.clear=Ge,We.prototype.delete=qe,We.prototype.get=$e,We.prototype.has=He,We.prototype.set=Ke,s(Xe,"arrayLikeKeys"),s(Je,"assocIndexOf"),s(Ze,"baseGetAllKeys"),s(Ye,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(rt,"baseIsNative"),s(nt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(at,"equalByTag"),s(st,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(dt,"getRawTag");var ht=ae?function(e){return null==e?[]:(e=Object(e),F(ae(e),(function(t){return ne.call(e,t)})))}:Pt,pt=Ye;function ft(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||S.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!!Z&&Z in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||H)}function mt(e){return Y.call(e)}function _t(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function bt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=w||ce&&pt(new ce)!=d||de&&pt(de.resolve())!=f||he&&pt(new he)!=v||pe&&pt(new pe)!=_)&&(pt=s((function(e){var t=Ye(e),r=t==p?e.constructor:void 0,n=r?_t(r):"";if(n)switch(n){case ge:return w;case ve:return d;case ye:return f;case me:return v;case _e:return _}return t}),"getTag")),s(ft,"isIndex"),s(gt,"isKeyable"),s(vt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(_t,"toSource"),s(bt,"eq");var wt=Qe(function(){return arguments}())?Qe:function(e){return xt(e)&&J.call(e,"callee")&&!ne.call(e,"callee")},Mt=Array.isArray;function St(e){return null!=e&&Ot(e.length)&&!Et(e)}s(St,"isArrayLike");var It=se||jt;function kt(e,t){return et(e,t)}function Et(e){if(!Tt(e))return!1;var t=Ye(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ot(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Tt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xt(e){return null!=e&&"object"==typeof e}s(kt,"isEqual"),s(Et,"isFunction"),s(Ot,"isLength"),s(Tt,"isObject"),s(xt,"isObjectLike");var Ct=j?D(j):nt;function At(e){return St(e)?Xe(e):it(e)}function Pt(){return[]}function jt(){return!1}s(At,"keys"),s(Pt,"stubArray"),s(jt,"stubFalse"),t.exports=kt})),tf=se(((e,t)=>{y();var r="__lodash_hash_undefined__",n=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 d="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||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&&d.process,_=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch(e){}}(),b=_&&_.isTypedArray;function w(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function M(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function S(e){return function(t){return e(t)}}function I(e,t){return null==e?void 0:e[t]}function k(e,t){return function(r){return e(t(r))}}s(w,"apply"),s(M,"baseTimes"),s(S,"baseUnary"),s(I,"getValue"),s(k,"overArg");var E,O=Array.prototype,T=Function.prototype,x=Object.prototype,C=p["__core-js_shared__"],A=T.toString,P=x.hasOwnProperty,j=(E=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",F=x.toString,N=A.call(Object),R=RegExp("^"+A.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=v?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,U=L?L.allocUnsafe:void 0,V=k(Object.getPrototypeOf,Object),z=Object.create,W=x.propertyIsEnumerable,G=O.splice,q=D?D.toStringTag:void 0,$=function(){try{var e=$e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=L?L.isBuffer:void 0,K=Math.max,X=Date.now,J=$e(p,"Map"),Z=$e(Object,"create"),Y=function(){function e(){}return s(e,"object"),function(t){if(!gt(t))return{};if(z)return z(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(){this.__data__=Z?Z(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function re(e){var t=this.__data__;if(Z){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0}function ne(e){var t=this.__data__;return Z?void 0!==t[e]:P.call(t,e)}function ie(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Z&&void 0===t?r:t,this}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ae(){this.__data__=[],this.size=0}function se(e){var t=this.__data__,r=Ee(t,e);return!(r<0)&&(r==t.length-1?t.pop():G.call(t,r,1),--this.size,!0)}function le(e){var t=this.__data__,r=Ee(t,e);return r<0?void 0:t[r][1]}function ue(e){return Ee(this.__data__,e)>-1}function ce(e,t){var r=this.__data__,n=Ee(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function de(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function he(){this.size=0,this.__data__={hash:new Q,map:new(J||oe),string:new Q}}function pe(e){var t=qe(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return qe(this,e).get(e)}function ge(e){return qe(this,e).has(e)}function ve(e,t){var r=qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?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 _e(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function be(e){return this.__data__.get(e)}function we(e){return this.__data__.has(e)}function Me(e,t){var r=this.__data__;if(r instanceof oe){var n=r.__data__;if(!J||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new de(n)}return r.set(e,t),this.size=r.size,this}function Se(e,t){var r=ut(e),n=!r&<(e),i=!r&&!n&&ht(e),o=!r&&!n&&!i&&mt(e),a=r||n||i||o,s=a?M(e.length,String):[],l=s.length;for(var u in e)(t||P.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Xe(u,l)))&&s.push(u);return s}function Ie(e,t,r){(void 0!==r&&!st(e[t],r)||void 0===r&&!(t in e))&&Oe(e,t,r)}function ke(e,t,r){var n=e[t];(!P.call(e,t)||!st(n,r)||void 0===r&&!(t in e))&&Oe(e,t,r)}function Ee(e,t){for(var r=e.length;r--;)if(st(e[r][0],t))return r;return-1}function Oe(e,t,r){"__proto__"==t&&$?$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(re,"hashGet"),s(ne,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=re,Q.prototype.has=ne,Q.prototype.set=ie,s(oe,"ListCache"),s(ae,"listCacheClear"),s(se,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=ae,oe.prototype.delete=se,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(de,"MapCache"),s(he,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),de.prototype.clear=he,de.prototype.delete=pe,de.prototype.get=fe,de.prototype.has=ge,de.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(_e,"stackDelete"),s(be,"stackGet"),s(we,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=_e,ye.prototype.get=be,ye.prototype.has=we,ye.prototype.set=Me,s(Se,"arrayLikeKeys"),s(Ie,"assignMergeValue"),s(ke,"assignValue"),s(Ee,"assocIndexOf"),s(Oe,"baseAssignValue");var Te=Ge();function xe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?He(e):tt(e)}function Ce(e){return vt(e)&&xe(e)==i}function Ae(e){return!(!gt(e)||Ye(e))&&(pt(e)?R:l).test(at(e))}function Pe(e){return vt(e)&&ft(e.length)&&!!c[xe(e)]}function je(e){if(!gt(e))return et(e);var t=Qe(e),r=[];for(var n in e)"constructor"==n&&(t||!P.call(e,n))||r.push(n);return r}function Fe(e,t,r,n,i){e!==t&&Te(t,(function(o,a){if(i||(i=new ye),gt(o))Ne(e,t,a,r,Fe,n,i);else{var s=n?n(nt(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Ie(e,a,s)}}),bt)}function Ne(e,t,r,n,i,o,a){var s=nt(e,r),l=nt(t,r),u=a.get(l);if(u)Ie(e,r,u);else{var c=o?o(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var h=ut(l),p=!h&&ht(l),f=!h&&!p&&mt(l);c=l,h||p||f?ut(s)?c=s:dt(s)?c=Ve(s):p?(d=!1,c=De(l,!0)):f?(d=!1,c=Ue(l,!0)):c=[]:yt(l)||lt(l)?(c=s,lt(s)?c=_t(s):(!gt(s)||pt(s))&&(c=Ke(l))):d=!1}d&&(a.set(l,c),i(c,l,n,o,a),a.delete(l)),Ie(e,r,c)}}function Re(e,t){return it(rt(e,t,St),e+"")}s(xe,"baseGetTag"),s(Ce,"baseIsArguments"),s(Ae,"baseIsNative"),s(Pe,"baseIsTypedArray"),s(je,"baseKeysIn"),s(Fe,"baseMerge"),s(Ne,"baseMergeDeep"),s(Re,"baseRest");var Le=$?function(e,t){return $(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:St;function De(e,t){if(t)return e.slice();var r=e.length,n=U?U(r):new e.constructor(r);return e.copy(n),n}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function Ue(e,t){var r=t?Be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ve(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function ze(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),i?Oe(r,s,l):ke(r,s,l)}return r}function We(e){return Re((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&Je(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t}))}function Ge(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}function qe(e,t){var r=e.__data__;return Ze(t)?r["string"==typeof t?"string":"hash"]:r.map}function $e(e,t){var r=I(e,t);return Ae(r)?r:void 0}function He(e){var t=P.call(e,q),r=e[q];try{e[q]=void 0;var n=!0}catch(e){}var i=F.call(e);return n&&(t?e[q]=r:delete e[q]),i}function Ke(e){return"function"!=typeof e.constructor||Qe(e)?{}:Y(V(e))}function Xe(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&u.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t,r){if(!gt(r))return!1;var n=typeof t;return!!("number"==n?ct(r)&&Xe(t,r.length):"string"==n&&t in r)&&st(r[t],e)}function Ze(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ye(e){return!!j&&j in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||x)}function et(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}function tt(e){return F.call(e)}function rt(e,t,r){return t=K(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=K(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),w(e,this,s)}}function nt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(De,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(Ue,"cloneTypedArray"),s(Ve,"copyArray"),s(ze,"copyObject"),s(We,"createAssigner"),s(Ge,"createBaseFor"),s(qe,"getMapData"),s($e,"getNative"),s(He,"getRawTag"),s(Ke,"initCloneObject"),s(Xe,"isIndex"),s(Je,"isIterateeCall"),s(Ze,"isKeyable"),s(Ye,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(rt,"overRest"),s(nt,"safeGet");var it=ot(Le);function ot(e){var t=0,r=0;return function(){var n=X(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function at(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function st(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(at,"toSource"),s(st,"eq");var lt=Ce(function(){return arguments}())?Ce:function(e){return vt(e)&&P.call(e,"callee")&&!W.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function dt(e){return vt(e)&&ct(e)}s(ct,"isArrayLike"),s(dt,"isArrayLikeObject");var ht=H||It;function pt(e){if(!gt(e))return!1;var t=xe(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<=n}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)||xe(e)!=a)return!1;var t=V(e);if(null===t)return!0;var r=P.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&A.call(r)==N}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=b?S(b):Pe;function _t(e){return ze(e,bt(e))}function bt(e){return ct(e)?Se(e,!0):je(e)}s(_t,"toPlainObject"),s(bt,"keysIn");var wt=We((function(e,t,r){Fe(e,t,r)}));function Mt(e){return function(){return e}}function St(e){return e}function It(){return!1}s(Mt,"constant"),s(St,"identity"),s(It,"stubFalse"),t.exports=wt})),nf=se(((e,t)=>{y(),function(r,n){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",S="ASUS",I="BlackBerry",k="Browser",E="Chrome",O="Firefox",T="Google",x="Huawei",C="LG",A="Microsoft",P="Motorola",j="Opera",F="Samsung",N="Sharp",R="Sony",L="Xiaomi",D="Zebra",B="Facebook",U=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),V=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),z=s((function(e,t){return typeof e===l&&-1!==W(t).indexOf(W(e))}),"has"),W=s((function(e){return e.toLowerCase()}),"lowerize"),G=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),q=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)}),"trim"),$=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),H=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(z(t[r][i],e))return"?"===r?n:r}else if(z(t[r],e))return"?"===r?n:r;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"},X={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,O]],[/\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,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,E+" 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,H,{"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,O+" 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,W]],[/((?: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/,"",W]],[/(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,W]]],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,[h,F],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,F],[d,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/(macintosh);/i],[u,[h,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,x],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,x],[d,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," "],[h,L],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,C],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,C],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,T],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,T],[d,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,[h,R],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,R],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,N],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,D],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,D],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,R],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,F],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,C],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,E+"cast"],[h,T],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,N],[d,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,R],[d,m]],[/(mitv-\w{5}) bui/i],[u,[h,L],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,q],[u,q],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,D],[d,_]],[/(quest( 2)?)/i],[u,[h,B],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,H,K]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,H,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,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,E+"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]]},J=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof J))return new J(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?U(X,t):X;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,$.call(e,i,s.browser),e.major=G(e.version),e},this.getCPU=function(){var e={};return e[f]=n,$.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,$.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,$.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,$.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?q(e,350):e,this},this.setUA(i),this}),"UAParser");J.VERSION="0.7.33",J.BROWSER=V([c,p,"major"]),J.CPU=V([f]),J.DEVICE=V([u,h,d,g,v,m,y,_,b]),J.ENGINE=J.OS=V([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=J),e.UAParser=J):typeof define===i&&define.amd?define((function(){return J})):typeof r!==o&&(r.UAParser=J);var Z=typeof r!==o&&(r.jQuery||r.Zepto);if(Z&&!Z.ua){var Y=new J;Z.ua=Y.getResult(),Z.ua.get=function(){return Y.getUA()},Z.ua.set=function(e){Y.setUA(e);var t=Y.getResult();for(var r in t)Z.ua[r]=t[r]}}}("object"==typeof window?window:e)})),Mf=se(((e,t)=>{y(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))})),Of=se(((e,t)=>{y();var r="%[a-f0-9]{2}",n=new RegExp("("+r+")|([^%]+?)","gi"),i=new RegExp("("+r+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function a(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(n)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=i.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=a(r[0]);n!==r[0]&&(t[r[0]]=n)}r=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(t){return l(e)}}})),jf=se(((e,t)=>{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 r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}})),Cf=se(((e,t)=>{y(),t.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var a=n[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(r[a]=s)}return r}})),Bf=se((e=>{y();var t=Mf(),r=Of(),n=jf(),i=Cf(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[",i,"]"].join("")]:[...r,[d(t,e),"[",d(i,e),"]=",d(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[]"].join("")]:[...r,[d(t,e),"[]=",d(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[d(r,e),t,d(i,e)].join("")]:[[n,d(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,d(t,e)]:[...r,[d(t,e),"=",d(n,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&h(r,e).includes(e.arrayFormatSeparator);r=o?h(r,e):r;let a=i||o?r.split(e.arrayFormatSeparator).map((t=>h(t,e))):null===r?r:h(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r&&h(r,e));let o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>h(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,r){return r.encode?r.strict?t(e):encodeURIComponent(e):e}function h(e,t){return t.decode?r(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="",r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),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 _(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=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,a]=n(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:h(a,t),r(h(e,t),a,i)}for(let e of Object.keys(i)){let r=i[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else i[e]=m(r,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let r=i[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=p(r):e[t]=r,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(d,"encode"),s(h,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(v,"extract"),s(m,"parseValue"),s(_,"parse"),e.extract=v,e.parse=_,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=s((r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r]),"shouldFilter"),n=l(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((r=>{let i=e[r];return void 0===i?"":null===i?d(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?d(r,t)+"[]":i.reduce(n(r),[]).join("&"):d(r,t)+"="+d(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,i]=n(e,"#");return Object.assign({url:r.split("?")[0]||"",query:_(v(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);let n=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,r);l&&(l=`?${l}`);let u=g(t.url);return t.fragmentIdentifier&&(u=`#${r[a]?d(t.fragmentIdentifier,r):t.fragmentIdentifier}`),`${n}${l}${u}`},e.pick=(t,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,n);return e.stringifyUrl({url:o,query:i(s,r),fragmentIdentifier:l},n)},e.exclude=(t,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return e.pick(t,i,n)}})),Hf=se(((e,t)=>{var r,n;y(),r=e,n=function(){"use strict";var e=s((function(){return e=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),e.apply(this,arguments)}),"__assign");function t(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}s(t,"__values"),s(r,"__read");var n,i="KEYS",o="VALUES",a="",l=function(){function e(e,t){var r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}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=u(this._path),t=e.node,r=e.keys;if(u(r)===a)return{done:!1,value:this.result()};var n=t.get(u(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=u(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 u(t)})).filter((function(e){return e!==a})).join("")},e.prototype.value=function(){return u(this._path).node.get(a)},e.prototype.result=function(){switch(this._type){case o:return this.value();case i:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),u=s((function(e){return e[e.length-1]}),"last$1"),c=s((function(e,t,r){var n=new Map;if(void 0===t)return n;for(var i=t.length+1,o=i+r,a=new Uint8Array(o*i).fill(r+1),s=0;s<i;++s)a[s]=s;for(var l=1;l<o;++l)a[l*i]=l;return d(e,t,r,n,a,1,i,""),n}),"fuzzySearch"),d=s((function(e,r,n,i,o,s,l,u){var c,h,p=s*l;try{e:for(var f=t(e.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v===a){var y=o[p-1];y<=n&&i.set(u,[e.get(v),y])}else{for(var m=s,_=0;_<v.length;++_,++m){for(var b=v[_],w=l*m,M=w-l,S=o[w],I=Math.max(0,m-n-1),k=Math.min(l-1,m+n),E=I;E<k;++E){var O=b!==r[E],T=o[M+E]+ +O,x=o[M+E+1]+1,C=o[w+E]+1,A=o[w+E+1]=Math.min(T,x,C);A<S&&(S=A)}if(S>n)continue e}d(e.get(v),r,n,i,o,m,l,u+v)}}}catch(e){c={error:e}}finally{try{g&&!g.done&&(h=f.return)&&h.call(f)}finally{if(c)throw c.error}}}),"recurse"),h=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(n){var i,o;if(!n.startsWith(this._prefix))throw new Error("Mismatched prefix");var s=r(p(this._tree,n.slice(this._prefix.length)),2),l=s[0],u=s[1];if(void 0===l){var c=r(_(u),2),d=c[0],h=c[1];try{for(var f=t(d.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v!==a&&v.startsWith(h)){var y=new Map;return y.set(v.slice(h.length),d.get(v)),new e(y,n)}}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}return new e(l,n)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,v(this._tree,e)},e.prototype.entries=function(){return new l(this,"ENTRIES")},e.prototype.forEach=function(e){var n,i;try{for(var o=t(this),a=o.next();!a.done;a=o.next()){var s=r(a.value,2);e(s[0],s[1],this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.fuzzyGet=function(e,t){return c(this._tree,e,t)},e.prototype.get=function(e){var t=f(this._tree,e);return void 0!==t?t.get(a):void 0},e.prototype.has=function(e){var t=f(this._tree,e);return void 0!==t&&t.has(a)},e.prototype.keys=function(){return new l(this,i)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,g(this._tree,e).set(a,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 r=g(this._tree,e);return r.set(a,t(r.get(a))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var r=g(this._tree,e),n=r.get(a);return void 0===n&&r.set(a,n=t()),n},e.prototype.values=function(){return new l(this,o)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(n){var i,o,a=new e;try{for(var s=t(n),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1];a.set(c,d)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),p=s((function(e,r,n){var i,o;if(void 0===n&&(n=[]),0===r.length||null==e)return[e,n];try{for(var s=t(e.keys()),l=s.next();!l.done;l=s.next()){var u=l.value;if(u!==a&&r.startsWith(u))return n.push([e,u]),p(e.get(u),r.slice(u.length),n)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n.push([e,r]),p(void 0,"",n)}),"trackDown"),f=s((function(e,r){var n,i;if(0===r.length||null==e)return e;try{for(var o=t(e.keys()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!==a&&r.startsWith(l))return f(e.get(l),r.slice(l.length))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"lookup"),g=s((function(e,r){var n,i,o=r.length;e:for(var s=0;e&&s<o;){try{for(var l=(n=void 0,t(e.keys())),u=l.next();!u.done;u=l.next()){var c=u.value;if(c!==a&&r[s]===c[0]){for(var d=Math.min(o-s,c.length),h=1;h<d&&r[s+h]===c[h];)++h;var p=e.get(c);if(h===c.length)e=p;else{var f=new Map;f.set(c.slice(h),p),e.set(r.slice(s,s+h),f),e.delete(c),e=f}s+=h;continue e}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}var g=new Map;return e.set(r.slice(s),g),g}return e}),"createPath"),v=s((function(e,t){var n=r(p(e,t),2),i=n[0],o=n[1];if(void 0!==i)if(i.delete(a),0===i.size)y(o);else if(1===i.size){var s=r(i.entries().next().value,2),l=s[0],u=s[1];m(o,l,u)}}),"remove"),y=s((function(e){if(0!==e.length){var t=r(_(e),2),n=t[0],i=t[1];if(n.delete(i),0===n.size)y(e.slice(0,-1));else if(1===n.size){var o=r(n.entries().next().value,2),s=o[0],l=o[1];s!==a&&m(e.slice(0,-1),s,l)}}}),"cleanup"),m=s((function(e,t,n){if(0!==e.length){var i=r(_(e),2),o=i[0],a=i[1];o.set(a+t,n),o.delete(a)}}),"merge"),_=s((function(e){return e[e.length-1]}),"last"),b="or",w=function(){function n(t){if(null==(null==t?void 0:t.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=e(e(e({},E),t),{searchOptions:e(e({},O),t.searchOptions||{})}),this._index=new h,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(n,"MiniSearch"),n.prototype.add=function(e){var r,n,i,o,a=this._options,s=a.extractField,l=a.tokenize,u=a.processTerm,c=a.fields,d=a.idField,h=s(e,d);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));var p=this.addDocumentId(h);this.saveStoredFields(p,e);try{for(var f=t(c),g=f.next();!g.done;g=f.next()){var v=g.value,y=s(e,v);if(null!=y){var m=l(y.toString(),v),_=this._fieldIds[v],b=new Set(m).size;this.addFieldLength(p,_,this._documentCount-1,b);try{for(var w=(i=void 0,t(m)),M=w.next();!M.done;M=w.next()){var S=u(M.value,v);S&&this.addTerm(_,p,S)}}catch(e){i={error:e}}finally{try{M&&!M.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},n.prototype.addAll=function(e){var r,n;try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},n.prototype.addAllAsync=function(e,t){var r=this;void 0===t&&(t={});var n=t.chunkSize,i=void 0===n?10:n,o={chunk:[],promise:Promise.resolve()},a=e.reduce((function(e,t,n){var o=e.chunk,a=e.promise;return o.push(t),(n+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return r.addAll(o)}))}:{chunk:o,promise:a}}),o),s=a.chunk;return a.promise.then((function(){return r.addAll(s)}))},n.prototype.remove=function(e){var n,i,o,a,s,l,u=this._options,c=u.tokenize,d=u.processTerm,h=u.extractField,p=u.fields,f=u.idField,g=h(e,f);if(null==g)throw new Error('MiniSearch: document does not have ID field "'.concat(f,'"'));try{for(var v=t(this._documentIds),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),_=m[0];if(g===m[1]){try{for(var b=(o=void 0,t(p)),w=b.next();!w.done;w=b.next()){var M=w.value,S=h(e,M);if(null!=S){var I=c(S.toString(),M),k=this._fieldIds[M],E=new Set(I).size;this.removeFieldLength(_,k,this._documentCount,E);try{for(var O=(s=void 0,t(I)),T=O.next();!T.done;T=O.next()){var x=d(T.value,M);x&&this.removeTerm(k,_,x)}}catch(e){s={error:e}}finally{try{T&&!T.done&&(l=O.return)&&l.call(O)}finally{if(s)throw s.error}}}}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return this._storedFields.delete(_),this._documentIds.delete(_),this._fieldLength.delete(_),void(this._documentCount-=1)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(g,": it is not in the index"))},n.prototype.removeAll=function(e){var r,n;if(e)try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.remove(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},n.prototype.search=function(e,n){var i,o;void 0===n&&(n={});var a=this.executeQuery(e,n),s=[];try{for(var l=t(a),u=l.next();!u.done;u=l.next()){var c=r(u.value,2),d=c[0],h=c[1],p=h.score,f=h.terms,g=h.match,v=f.length,y={id:this._documentIds.get(d),score:p*v,terms:Object.keys(g),match:g};Object.assign(y,this._storedFields.get(d)),(null==n.filter||n.filter(y))&&s.push(y)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return s.sort(A),s},n.prototype.autoSuggest=function(n,i){var o,a,s,l;void 0===i&&(i={}),i=e(e({},T),i);var u=new Map;try{for(var c=t(this.search(n,i)),d=c.next();!d.done;d=c.next()){var h=d.value,p=h.score,f=(w=h.terms).join(" ");null!=(_=u.get(f))?(_.score+=p,_.count+=1):u.set(f,{score:p,terms:w,count:1})}}catch(e){o={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var g=[];try{for(var v=t(u),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),_=m[0],b=m[1],w=(p=b.score,b.terms),M=b.count;g.push({suggestion:_,terms:w,score:p/M})}}catch(e){s={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}return g.sort(A),g},Object.defineProperty(n.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),n.loadJSON=function(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return n.loadJS(JSON.parse(e),t)},n.getDefault=function(e){if(E.hasOwnProperty(e))return M(E,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},n.loadJS=function(e,i){var o,a,s,l,u=e.index,c=e.documentCount,d=e.nextId,p=e.documentIds,f=e.fieldIds,g=e.fieldLength,v=e.averageFieldLength,y=e.storedFields,m=e.serializationVersion;if(1!==m&&2!==m)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var _=new n(i);_._documentCount=c,_._nextId=d,_._documentIds=j(p),_._fieldIds=f,_._fieldLength=j(g),_._avgFieldLength=v,_._storedFields=j(y),_._index=new h;try{for(var b=t(u),w=b.next();!w.done;w=b.next()){var M=r(w.value,2),S=M[0],I=M[1],k=new Map;try{for(var E=(s=void 0,t(Object.keys(I))),O=E.next();!O.done;O=E.next()){var T=O.value,x=I[T];1===m&&(x=x.ds),k.set(parseInt(T,10),j(x))}}catch(e){s={error:e}}finally{try{O&&!O.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}_._index.set(S,k)}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return _},n.prototype.executeQuery=function(t,r){var n=this;if(void 0===r&&(r={}),"string"!=typeof t){var i=e(e(e({},r),t),{queries:void 0}),o=t.queries.map((function(e){return n.executeQuery(e,i)}));return this.combineResults(o,t.combineWith)}var a=this._options,s=a.tokenize,l=a.processTerm,u=a.searchOptions,c=e(e({tokenize:s,processTerm:l},u),r),d=c.tokenize,h=c.processTerm,p=d(t).map((function(e){return h(e)})).filter((function(e){return!!e})).map(k(c)).map((function(e){return n.executeQuerySpec(e,c)}));return this.combineResults(p,c.combineWith)},n.prototype.executeQuerySpec=function(n,i){var o,a,s,l,u,c,d=e(e({},this._options.searchOptions),i),h=(d.fields||this._options.fields).reduce((function(t,r){var n;return e(e({},t),((n={})[r]=M(t,r)||1,n))}),d.boost||{}),p=d.boostDocument,f=d.weights,g=d.maxFuzzy,v=e(e({},O.weights),f),y=v.fuzzy,m=v.prefix,_=this._index.get(n.term),b=this.termResults(n.term,n.term,1,_,h,p);if(n.prefix&&(u=this._index.atPrefix(n.term)),n.fuzzy){var w=!0===n.fuzzy?.2:n.fuzzy,S=w<1?Math.min(g,Math.round(n.term.length*w)):w;S&&(c=this._index.fuzzyGet(n.term,S))}if(u)try{for(var I=t(u),k=I.next();!k.done;k=I.next()){var E=r(k.value,2),T=E[0],x=E[1];if(j=T.length-n.term.length){null==c||c.delete(T);var C=m*T.length/(T.length+.3*j);this.termResults(n.term,T,C,x,h,p,b)}}}catch(e){o={error:e}}finally{try{k&&!k.done&&(a=I.return)&&a.call(I)}finally{if(o)throw o.error}}if(c)try{for(var A=t(c.keys()),P=A.next();!P.done;P=A.next()){T=P.value;var j,F=r(c.get(T),2),N=F[0];(j=F[1])&&(C=y*T.length/(T.length+j),this.termResults(n.term,T,C,N,h,p,b))}}catch(e){s={error:e}}finally{try{P&&!P.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}return b},n.prototype.combineResults=function(e,t){if(void 0===t&&(t=b),0===e.length)return new Map;var r=t.toLowerCase();return e.reduce(S[r])||new Map},n.prototype.toJSON=function(){var e,n,i,o,a=[];try{for(var s=t(this._index),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1],h={};try{for(var p=(i=void 0,t(d)),f=p.next();!f.done;f=p.next()){var g=r(f.value,2),v=g[0],y=g[1];h[v]=Object.fromEntries(y)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}a.push([c,h])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}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:a,serializationVersion:2}},n.prototype.termResults=function(e,r,n,i,o,a,s){var l,u,c,d,h;if(void 0===s&&(s=new Map),null==i)return s;try{for(var p=t(Object.keys(o)),f=p.next();!f.done;f=p.next()){var g=f.value,v=o[g],y=this._fieldIds[g],m=i.get(y);if(null!=m){var _=m.size,b=this._avgFieldLength[y];try{for(var w=(c=void 0,t(m.keys())),S=w.next();!S.done;S=w.next()){var k=S.value,E=a?a(this._documentIds.get(k),r):1;if(E){var O=m.get(k),T=this._fieldLength.get(k)[y],C=n*v*E*I(O,_,this._documentCount,T,b),A=s.get(k);if(A){A.score+=C,x(A.terms,e);var P=M(A.match,r);P?P.push(g):A.match[r]=[g]}else s.set(k,{score:C,terms:[e],match:(h={},h[r]=[g],h)})}}}catch(e){c={error:e}}finally{try{S&&!S.done&&(d=w.return)&&d.call(w)}finally{if(c)throw c.error}}}}}catch(e){l={error:e}}finally{try{f&&!f.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}return s},n.prototype.addTerm=function(e,t,r){var n=this._index.fetch(r,P),i=n.get(e);if(null==i)(i=new Map).set(t,1),n.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},n.prototype.removeTerm=function(e,t,r){if(this._index.has(r)){var n=this._index.fetch(r,P),i=n.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,r):i.get(t)<=1?i.size<=1?n.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(r).size&&this._index.delete(r)}else this.warnDocumentChanged(t,e,r)},n.prototype.warnDocumentChanged=function(e,r,n){var i,o;if(null!=console&&null!=console.warn)try{for(var a=t(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var l=s.value;if(this._fieldIds[l]===r)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(l,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},n.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},n.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},n.prototype.addFieldLength=function(e,t,r,n){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=n;var o=(this._avgFieldLength[t]||0)*r+n;this._avgFieldLength[t]=o/(r+1)},n.prototype.removeFieldLength=function(e,t,r,n){var i=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=i/(r-1)},n.prototype.saveStoredFields=function(e,r){var n,i,o=this._options,a=o.storeFields,s=o.extractField;if(null!=a&&0!==a.length){var l=this._storedFields.get(e);null==l&&this._storedFields.set(e,l={});try{for(var u=t(a),c=u.next();!c.done;c=u.next()){var d=c.value,h=s(r,d);void 0!==h&&(l[d]=h)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}},n}(),M=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),S=((n={}).or=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.get(s);if(null==l)e.set(s,r.get(s));else{var u=r.get(s),c=u.score,d=u.terms,h=u.match;l.score=l.score+c,l.match=Object.assign(l.match,h),C(l.terms,d)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n.and=function(e,r){var n,i,o=new Map;try{for(var a=t(r.keys()),s=a.next();!s.done;s=a.next()){var l=s.value,u=e.get(l);if(null!=u){var c=r.get(l),d=c.score,h=c.terms,p=c.match;C(u.terms,h),o.set(l,{score:u.score+d,terms:u.terms,match:Object.assign(u.match,p)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},n.and_not=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;e.delete(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n),I=s((function(e,t,r,n,i){return Math.log(1+(r-t+.5)/(t+.5))*(.5+2.2*e/(e+1.2*(1-.7+.7*n/i)))}),"calcBM25Score"),k=s((function(e){return function(t,r,n){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,r,n):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,r,n):!0===e.prefix}}}),"termToQuerySpec"),E={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(F)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},O={combineWith:b,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},T={prefix:function(e,t,r){return t===r.length-1}},x=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),C=s((function(e,r){var n,i;try{for(var o=t(r),a=o.next();!a.done;a=o.next()){var s=a.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),A=s((function(e,t){var r=e.score;return t.score-r}),"byScore"),P=s((function(){return new Map}),"createMap"),j=s((function(e){var r,n,i=new Map;try{for(var o=t(Object.keys(e)),a=o.next();!a.done;a=o.next()){var s=a.value;i.set(parseInt(s,10),e[s])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}),"objectToNumericMap"),F=/[\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;return w},"object"==typeof e&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define(n):(r="undefined"!=typeof globalThis?globalThis:r||self).MiniSearch=n()}));cm(exports,{Mappedin:()=>Ln,MappedinDestinationSet:()=>xt,OfflineSearch:()=>Ea,getVenue:()=>Sc,getVenueBundle:()=>jc,initialize:()=>yk}),y(),y();var Xf=xn(Nc());y(),y(),y();var Rc=xn(Lc());y();var Fs=class{constructor({origin:e,destination:t,vortex:r,elevationDelta:n=0,distance:i=0,angle:o=0}){let a,s;if(m(this,"origin"),m(this,"destination"),m(this,"vortex"),m(this,"distance"),m(this,"angle"),m(this,"weight"),this.origin=e,this.destination=t,this.vortex=r,this.distance=i,this.angle=o,r?(this.distance=0,this.angle=0,a=void 0!==r.weight&&r.weight>0?r.weight:"elevator"===r.type?2e3:1e3,s=r.multiplier&&r.multiplier>=1?r.multiplier:1,this.weight=n*s+a):(a=t.weight&&t.weight>=0?t.weight:0,s=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*s+a),isNaN(this.angle))throw new Error("nan angle")}};s(Fs,"Edge");var Da=Fs;y();var Bs="mi-debug",hm={loggingEnabled(){var e;return"development"===L.env.NODE_ENV||"dev"===L.env.NODE_ENV||"test"===L.env.NODE_ENV||"true"===(null==(e=globalThis.sessionStorage)?void 0:e.getItem(Bs))},log(...e){this.loggingEnabled()&&console.log("[MappedInJS]",...e)},warn(...e){this.loggingEnabled()&&console.warn("[MappedInJS]",...e)},error(...e){this.loggingEnabled()&&console.error("[MappedInJS]",...e)},assert(...e){this.loggingEnabled()&&console.assert(...e)},time(e){this.loggingEnabled()&&console.time(e)},timeEnd(e){this.loggingEnabled()&&console.timeEnd(e)}},te=hm;function fm(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale||1);try{if(!e.georeference)throw new Error(`map ${e.name||e.shortName||e.id} does not have a georeference field`);if(e.georeference.length<3)throw new Error(`map ${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],r=e.georeference[2],n=(0,Rc.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:r.target.x,longitude:r.target.y}),i=t.control.x-r.control.x,o=t.control.y-r.control.y;return Math.sqrt(i*i+o*o)/n}catch(e){return te.error(e),1}}function mm(e,t){let r=e.x-t.x,n=e.y-t.y;return(Math.atan2(n,r)+2.5*Math.PI)%(2*Math.PI)}s(fm,"getMapScale"),s(mm,"getAngle");var qs=class{constructor({nodes:e,vortexes:t,maps:r,showVortexNames:n=!1}){m(this,"edges"),m(this,"nodesById"),m(this,"mapsById"),this.edges={},this.mapsById=r.map((e=>({...e,_scale:fm(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:n?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})=>{let r=this.nodesById[t];return new Da({angle:mm(e,r),destination:r,distance:this.getDistance(e,r),origin:e})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let r=this.nodesById[e.nodes[t]];if(t++,null==r)continue;let n=t;for(;n<e.nodes.length;){let t=this.nodesById[e.nodes[n]];if(n++,null==t)continue;let i=this.mapsById[r.map].elevation||0,o=this.mapsById[t.map].elevation||0,a=Math.abs(i-o);this.edges[r.id].push(new Da({destination:t,elevationDelta:a,origin:r,vortex:e})),this.edges[t.id].push(new Da({destination:r,elevationDelta:a,origin:t,vortex:e}))}}}))}aStar(e,t,r){let n=e.map((e=>this.nodesById[e])).filter((e=>e)),i=t.map((e=>this.nodesById[e])).filter((e=>e));if(0===n.length||0===i.length)return[];let o=[],a={},s={};for(n.forEach((e=>{let t=this.getShortestEuclideanDistance(e,i);o.push({origin:e,priority:t}),a[e.id]=null,s[e.id]=0})),o.sort(((e,t)=>e.priority-t.priority));o.length>0;){let e=o[0];if(i.includes(e.origin)){let t=[],r=a[e.origin.id];for(;null!=r;){t.push(r);let e=a[r.origin.id];r=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let n=t.vortex&&!1===t.vortex.accessible;if(r&&(n||!1===t.origin.accessible||!1===t.destination.accessible))continue;let l=s[e.origin.id]+t.weight;if(null==s[t.destination.id]||l<s[t.destination.id]){s[t.destination.id]=l;let e=l+this.getShortestEuclideanDistance(t.destination,i);o.push({origin:t.destination,priority:e}),a[t.destination.id]=t}}o.splice(0,1),o.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let r,n=e.x-t.x,i=e.y-t.y,o=n*n+i*i;return r=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/r}getShortestEuclideanDistance(e,t){return t.reduce(((t,r)=>{let n=this.getDistance(e,r);return Math.min(t,n)}),Number.MAX_VALUE)}};s(qs,"NavigationGraph");var et,gt,En,Vs=qs;function gm(e){switch(e){case En.DOWN:case En.UP:return`${e} `;default:return""}}y(),y(),function(e){e.DEPARTURE="Departure",e.TAKEVORTEX="TakeVortex",e.EXITVORTEX="ExitVortex",e.TURN="Turn",e.ARRIVAL="Arrival"}(et||(et={})),function(e){e.STRAIGHT="Straight",e.RIGHT="Right",e.SLIGHTRIGHT="SlightRight",e.LEFT="Left",e.SLIGHTLEFT="SlightLeft"}(gt||(gt={})),function(e){e.UP="up",e.DOWN="down",e.NONE="none"}(En||(En={})),s(gm,"vortexDirectionTest");var Us=class{constructor({origin:e,action:t,distance:r,atLocation:n,instruction:i}){m(this,"node"),m(this,"instruction"),m(this,"action"),m(this,"atLocation"),m(this,"type"),m(this,"distance",0),this.node=e,this.action=t,this.distance=r||0,this.atLocation=n,this.instruction="",i?this.instruction=i:(null!=t&&t.type===et.DEPARTURE?this.instruction=null!=n?`Depart from ${n.name}`:"Depart from current location":null!=t&&t.type===et.ARRIVAL?this.instruction=null!=n?`Arrive at ${n.name}`:"Arrive at destination":null!=t&&t.type===et.TAKEVORTEX?this.instruction=`Take ${n&&n.name} ${gm(t.direction)}to ${t.toMap.name}`:null!=t&&t.type===et.EXITVORTEX?this.instruction=`Exit ${n&&n.name} at ${t.toMap.name}`:null!=t&&t.bearing===gt.RIGHT?this.instruction="Turn right":null!=t&&t.bearing===gt.SLIGHTRIGHT?this.instruction="Turn slightly right":null!=t&&t.bearing===gt.STRAIGHT?this.instruction="Head straight":null!=t&&t.bearing===gt.SLIGHTLEFT?this.instruction="Turn slightly left":null!=t&&t.bearing===gt.LEFT&&(this.instruction="Turn left"),null!=t&&t.type===et.TURN&&n&&(this.instruction+=` at ${n.name}`))}};s(Us,"Directive");var za,In=Us;(za||(za={})).NO_VALID_PATH="No Valid Path Available";var Fa=.1*Math.PI;function Ba(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Ba,"differenceBetweenAngles");var Gs=class{constructor({locations:e,nodes:t,vortexes:r,maps:n,showVortexNames:i}){m(this,"graph"),m(this,"locationsByNodeId"),this.graph=new Vs({maps:n,nodes:t,showVortexNames:i,vortexes:r}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((r=>{e[r.node]=t})),t.polygons&&t.polygons.forEach((r=>{r.entrances&&r.entrances.forEach((r=>{e[r]=t}))})),e)),{})}getClosestLocationInRay(e,t=.5*Math.PI,r=10){let n=0,i=0,o=e;for(;Math.abs(n)<t&&i<r;){let e=this.graph.edges[o.destination.id],a=null,s=0;for(let t of e)if(t.distance>0)if(null!=a){let e=-Ba(o.angle,t.angle);Math.abs(e)<Math.abs(s)&&(a=t,s=e)}else a=t,s=-Ba(o.angle,t.angle);if(null==a)return null;{if(Math.abs(s)>=t||(n+=s,i+=a.distance,Math.abs(n)>=t||i>r))return null;let e=this.locationsByNodeId[a.destination.id];if(null!=e)return e;o=a}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:r,departFrom:n,arriveAt:i}){let o=this.graph.aStar(e,t,r);if(0===o.length)return{distance:0,instructions:[new In({distance:0,instruction:za.NO_VALID_PATH})],path:[]};let a=0,s=new Array(o.length+1);for(let e=0;e<o.length;e++)s[e]=o[e].origin;s[o.length]=o[o.length-1].destination;let l=[],u=null,c=null,d=0,h=0;for(let e=0;e<o.length;e++){let t=o[e],r=t.origin,s=t.destination;if(a+=t.distance,d+=(null==c?void 0:c.distance)||0,0===e&&l.push(new In({action:{type:et.DEPARTURE},atLocation:n,distance:0,origin:r})),null!=t.vortex){let e=this.graph.mapsById[r.map],n=this.graph.mapsById[s.map],i=En.NONE;if(null!=e.elevation&&null!=n.elevation){let t=e.elevation-n.elevation;t>0?i=En.DOWN:t<0&&(i=En.UP)}l.push(new In({action:{direction:i,fromMap:e,toMap:n,type:et.TAKEVORTEX},atLocation:t.vortex,distance:d,origin:r})),h+=d,d=0}else if(null!=u&&null!=c)if(null!=c.vortex){let e=this.graph.mapsById[u.map],t=this.graph.mapsById[c.destination.map];l.push(new In({action:{fromMap:e,toMap:t,type:et.EXITVORTEX},atLocation:c.vortex,distance:d,origin:r})),h+=d,d=0}else{let e=this.graph.edges[r.id].filter((e=>e.destination!==u&&e.destination!==t.destination));if(e.length>0){let n=-Ba(c.angle,t.angle),i=e.reduce(((e,r)=>{let n=-Ba(t.angle,r.angle);return Math.min(e,Math.abs(n))}),Math.PI);if(Math.abs(n)>=Fa||Math.abs(i)<=Fa){let e;e=n<=-Math.PI/4?gt.RIGHT:n<=-Fa?gt.SLIGHTRIGHT:n<=Fa?gt.STRAIGHT:n<=Math.PI/4?gt.SLIGHTLEFT:gt.LEFT;let t=this.locationsByNodeId[r.id];if(t||(t=this.getClosestLocationInRay(c,.5*Math.PI,10)),null!=t){let n=new In({action:{bearing:e,referencePosition:"At",type:et.TURN},atLocation:t,distance:d,origin:r});n.type=e,l.push(n)}else l.push(new In({action:{bearing:e,referencePosition:"At",type:et.TURN},distance:d,origin:r}));h+=d,d=0}}}e===o.length-1&&(l.push(new In({action:{type:et.ARRIVAL},atLocation:i,distance:a-h<0?0:a-h,origin:t.destination})),h+=d,d=0),u=r,c=t}let p=[],f=null;for(let e=l.length-1;e>=0;e--){let t=l[e],{action:r}=t;r&&r.type===et.TAKEVORTEX?(f=t.node,p.unshift(t)):r&&r.type===et.TURN&&null!=f?this.graph.getDistance(t.node,f)>5&&p.unshift(t):p.unshift(t)}return{distance:a,instructions:p,path:s}}};s(Gs,"Navigator");var Ws=Gs;function Hs(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return Dc(this.cover(t,r),t,r,e)}function Dc(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o,a,s,l,u,c,d,h,p=e._root,f={data:n},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=r>=(a=(v+m)/2))?v=a:m=a,i=p,!(p=p[d=c<<1|u]))return i[d]=f,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&r===l)return f.next=p,i?i[d]=f:e._root=f,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(v+m)/2))?v=a:m=a}while((d=c<<1|u)==(h=(l>=a)<<1|s>=o));return i[h]=p,i[d]=f,e}function zc(e){var t,r,n,i,o=e.length,a=new Array(o),s=new Array(o),l=1/0,u=1/0,c=-1/0,d=-1/0;for(r=0;r<o;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(i=+this._y.call(null,t))||(a[r]=n,s[r]=i,n<l&&(l=n),n>c&&(c=n),i<u&&(u=i),i>d&&(d=i));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),r=0;r<o;++r)Dc(this,a[r],s[r],e[r]);return this}function $s(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a,s,l=i-r||1,u=this._root;r>e||e>=i||n>t||t>=o;)switch(s=(t<n)<<1|e<r,a=new Array(4),a[s]=u,u=a,l*=2,s){case 0:i=r+l,o=n+l;break;case 1:r=i-l,o=n+l;break;case 2:i=r+l,n=o-l;break;case 3:r=i-l,n=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function Ks(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Xs(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 rt(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function Ys(e,t,r){var n,i,o,a,s,l,u,c=this._x0,d=this._y0,h=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new rt(g,c,d,h,p)),null==r?r=1/0:(c=e-r,d=t-r,h=e+r,p=t+r,r*=r);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<c||(s=l.y1)<d))if(g.length){var v=(i+a)/2,y=(o+s)/2;f.push(new rt(g[3],v,y,a,s),new rt(g[2],i,y,v,s),new rt(g[1],v,o,a,y),new rt(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),_=t-+this._y.call(null,g.data),b=m*m+_*_;if(b<r){var w=Math.sqrt(r=b);c=e-w,d=t-w,h=e+w,p=t+w,n=g.data}}return n}function Js(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,i,o,a,s,l,u,c,d,h,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>=(s=(f+v)/2))?f=s:v=s,(c=a>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[d=c<<1|u]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,h=d)}for(;p.data!==e;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)}function Fc(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function Zs(){return this._root}function Qs(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function el(e){var t,r,n,i,o,a,s=[],l=this._root;for(l&&s.push(new rt(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,n=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var u=(n+o)/2,c=(i+a)/2;(r=l[3])&&s.push(new rt(r,u,c,o,a)),(r=l[2])&&s.push(new rt(r,n,c,u,a)),(r=l[1])&&s.push(new rt(r,u,i,o,c)),(r=l[0])&&s.push(new rt(r,n,i,u,c))}return this}function tl(e){var t,r=[],n=[];for(this._root&&r.push(new rt(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,l=t.x1,u=t.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&r.push(new rt(o,a,s,c,d)),(o=i[1])&&r.push(new rt(o,c,s,l,d)),(o=i[2])&&r.push(new rt(o,a,d,c,u)),(o=i[3])&&r.push(new rt(o,c,d,l,u))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function Bc(e){return e[0]}function nl(e){return arguments.length?(this._x=e,this):this._x}function qc(e){return e[1]}function rl(e){return arguments.length?(this._y=e,this):this._y}function $r(e,t,r){var n=new il(null==t?Bc:t,null==r?qc:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function il(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function Vc(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}y(),y(),y(),y(),s(Hs,"default"),s(Dc,"add"),s(zc,"addAll"),y(),s($s,"default"),y(),s(Ks,"default"),y(),s(Xs,"default"),y(),y(),s(rt,"default"),s(Ys,"default"),y(),s(Js,"default"),s(Fc,"removeAll"),y(),s(Zs,"default"),y(),s(Qs,"default"),y(),s(el,"default"),y(),s(tl,"default"),y(),s(Bc,"defaultX"),s(nl,"default"),y(),s(qc,"defaultY"),s(rl,"default"),s($r,"quadtree"),s(il,"Quadtree"),s(Vc,"leaf_copy");var ht=$r.prototype=il.prototype;ht.copy=function(){var e,t,r=new il(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=Vc(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=Vc(t));return r},ht.add=Hs,ht.addAll=zc,ht.cover=$s,ht.data=Ks,ht.extent=Xs,ht.find=Ys,ht.remove=Js,ht.removeAll=Fc,ht.root=Zs,ht.size=Qs,ht.visit=el,ht.visitAfter=tl,ht.x=nl,ht.y=rl;var $t,tt,qn=class{constructor(e){F(this,$t,void 0),m(this,"categories"),m(this,"locations"),m(this,"vortexes"),m(this,"maps"),m(this,"nodes"),m(this,"polygons"),m(this,"events"),m(this,"mapGroups"),m(this,"locationStates"),m(this,"rankings"),F(this,tt,{}),V(this,$t,e)}get polygonsByMapId(){if(g(this,tt).polygonsByMapId)return g(this,tt).polygonsByMapId;let e,t={};for(let r=0,n=g(this,$t).polygons.length;r<n;++r)e=g(this,$t).polygons[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return g(this,tt).polygonsByMapId=r,g(this,tt).polygonsByMapId}get nodesByMapId(){if(g(this,tt).nodesByMapId)return g(this,tt).nodesByMapId;let e,t={};for(let r=0,n=g(this,$t).nodes.length;r<n;++r)e=g(this,$t).nodes[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return g(this,tt).nodesByMapId=r,g(this,tt).nodesByMapId}findNearestNodeOnMap(e,t){var r;if(g(this,tt).nodeTreesByMap||(g(this,tt).nodeTreesByMap=new Map),!g(this,tt).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=$r();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),g(this,tt).nodeTreesByMap.set(e,n)}return g(this,tt).nodeTreesByMap.get(e).find(t.x,t.y)}get locationsByMapId(){if(g(this,tt).locationsByMapId)return g(this,tt).locationsByMapId;let e,t={};for(let r=0,n=g(this,$t).locations.length;r<n;++r){e=g(this,$t).locations[r];for(let r=0,n=e.polygons.length;r<n;++r)t[e.polygons[r].map.id]||(t[e.polygons[r].map.id]=[]),t[e.polygons[r].map.id].push(e)}let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return g(this,tt).locationsByMapId=r,g(this,tt).locationsByMapId}static create(e){return qn.instances.has(e)||qn.instances.set(e,new qn(e)),qn.instances.get(e)}static clear(){qn.instances.clear()}},qa=qn;s(qa,"MappedinCache"),$t=new WeakMap,tt=new WeakMap,m(qa,"instances",new Map);var Tt=qa;y(),y(),y(),y();var Uc=" ",ct=class{static get separator(){return Uc}static set separator(e){Uc=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 r=null;switch(t.length){case 3:r=t[0]/1+t[1]/60+t[2]/3600;break;case 2:r=t[0]/1+t[1]/60;break;case 1:r=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(r=-r),Number(r)}static toDms(e,t="d",r){if(isNaN(e)||"string"==typeof e&&""==e.trim()||"boolean"==typeof e||e==1/0||null==e)return null;if(void 0===r)switch(t){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:t="d",r=4}e=Math.abs(e);let n=null,i=null,o=null,a=null;switch(t){default:case"d":case"deg":i=e.toFixed(r),i<100&&(i="0"+i),i<10&&(i="0"+i),n=i+"°";break;case"dm":case"deg+min":i=Math.floor(e),o=(60*e%60).toFixed(r),60==o&&(o=(0).toFixed(r),i++),i=("000"+i).slice(-3),o<10&&(o="0"+o),n=i+"°"+ct.separator+o+"′";break;case"dms":case"deg+min+sec":i=Math.floor(e),o=Math.floor(3600*e/60)%60,a=(3600*e%60).toFixed(r),60==a&&(a=(0).toFixed(r),o++),60==o&&(o=0,i++),i=("000"+i).slice(-3),o=("00"+o).slice(-2),a<10&&(a="0"+a),n=i+"°"+ct.separator+o+"′"+ct.separator+a+"″"}return n}static toLat(e,t,r){let n=ct.toDms(ct.wrap90(e),t,r);return null===n?"–":n.slice(1)+ct.separator+(e<0?"S":"N")}static toLon(e,t,r){let n=ct.toDms(ct.wrap180(e),t,r);return null===n?"–":n+ct.separator+(e<0?"W":"E")}static toBrng(e,t,r){let n=ct.toDms(ct.wrap360(e),t,r);return null===n?"–":n.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(r.thousands,"⁜").replace(r.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",r.decimal).replace("⁜",r.thousands)}static compassPoint(e,t=3){if(![1,2,3].includes(Number(t)))throw new RangeError(`invalid precision ‘${t}’`);e=ct.wrap360(e);let r=4*2**(t-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(e*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(ct,"Dms"),Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var Ae=ct,He=Math.PI,me=class{constructor(e,t){if(isNaN(e))throw new TypeError(`invalid lat ‘${e}’`);if(isNaN(t))throw new TypeError(`invalid lon ‘${t}’`);this._lat=Ae.wrap90(Number(e)),this._lon=Ae.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?Ae.wrap90(Ae.parse(e)):Ae.wrap90(Number(e)),isNaN(this._lat))throw new TypeError(`invalid lat ‘${e}’`)}set latitude(e){if(this._lat=isNaN(e)?Ae.wrap90(Ae.parse(e)):Ae.wrap90(Number(e)),isNaN(this._lat))throw new TypeError(`invalid latitude ‘${e}’`)}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?Ae.wrap180(Ae.parse(e)):Ae.wrap180(Number(e)),isNaN(this._lon))throw new TypeError(`invalid lon ‘${e}’`)}set lng(e){if(this._lon=isNaN(e)?Ae.wrap180(Ae.parse(e)):Ae.wrap180(Number(e)),isNaN(this._lon))throw new TypeError(`invalid lng ‘${e}’`)}set longitude(e){if(this._lon=isNaN(e)?Ae.wrap180(Ae.parse(e)):Ae.wrap180(Number(e)),isNaN(this._lon))throw new TypeError(`invalid longitude ‘${e}’`)}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...e){if(0==e.length)throw new TypeError("invalid (empty) point");if(null===e[0]||null===e[1])throw new TypeError("invalid (null) point");let t,r;if(2==e.length&&([t,r]=e,t=Ae.wrap90(Ae.parse(t)),r=Ae.wrap180(Ae.parse(r)),isNaN(t)||isNaN(r)))throw new TypeError(`invalid point ‘${e.toString()}’`);if(1==e.length&&"string"==typeof e[0]&&([t,r]=e[0].split(","),t=Ae.wrap90(Ae.parse(t)),r=Ae.wrap180(Ae.parse(r)),isNaN(t)||isNaN(r)))throw new TypeError(`invalid point ‘${e[0]}’`);if(1==e.length&&"object"==typeof e[0]){let n=e[0];if("Point"==n.type&&Array.isArray(n.coordinates)?[r,t]=n.coordinates:(null!=n.latitude&&(t=n.latitude),null!=n.lat&&(t=n.lat),null!=n.longitude&&(r=n.longitude),null!=n.lng&&(r=n.lng),null!=n.lon&&(r=n.lon),t=Ae.wrap90(Ae.parse(t)),r=Ae.wrap180(Ae.parse(r))),isNaN(t)||isNaN(r))throw new TypeError(`invalid point ‘${JSON.stringify(e[0])}’`)}if(isNaN(t)||isNaN(r))throw new TypeError(`invalid point ‘${e.toString()}’`);return new me(t,r)}distanceTo(e,t=6371e3){if(e instanceof me||(e=me.parse(e)),isNaN(t))throw new TypeError(`invalid radius ‘${t}’`);let r=t,n=this.lat.toRadians(),i=this.lon.toRadians(),o=e.lat.toRadians(),a=o-n,s=e.lon.toRadians()-i,l=Math.sin(a/2)*Math.sin(a/2)+Math.cos(n)*Math.cos(o)*Math.sin(s/2)*Math.sin(s/2);return r*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}initialBearingTo(e){if(e instanceof me||(e=me.parse(e)),this.equals(e))return NaN;let t=this.lat.toRadians(),r=e.lat.toRadians(),n=(e.lon-this.lon).toRadians(),i=Math.cos(t)*Math.sin(r)-Math.sin(t)*Math.cos(r)*Math.cos(n),o=Math.sin(n)*Math.cos(r),a=Math.atan2(o,i).toDegrees();return Ae.wrap360(a)}finalBearingTo(e){e instanceof me||(e=me.parse(e));let t=e.initialBearingTo(this)+180;return Ae.wrap360(t)}midpointTo(e){e instanceof me||(e=me.parse(e));let t=this.lat.toRadians(),r=this.lon.toRadians(),n=e.lat.toRadians(),i=(e.lon-this.lon).toRadians(),o=Math.cos(t),a=0,s=Math.sin(t),l={x:o+Math.cos(n)*Math.cos(i),y:a+Math.cos(n)*Math.sin(i),z:s+Math.sin(n)},u=Math.atan2(l.z,Math.sqrt(l.x*l.x+l.y*l.y)),c=r+Math.atan2(l.y,l.x),d=u.toDegrees(),h=c.toDegrees();return new me(d,h)}intermediatePointTo(e,t){if(e instanceof me||(e=me.parse(e)),this.equals(e))return new me(this.lat,this.lon);let r=this.lat.toRadians(),n=this.lon.toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),a=i-r,s=o-n,l=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(s/2)*Math.sin(s/2),u=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),c=Math.sin((1-t)*u)/Math.sin(u),d=Math.sin(t*u)/Math.sin(u),h=c*Math.cos(r)*Math.cos(n)+d*Math.cos(i)*Math.cos(o),p=c*Math.cos(r)*Math.sin(n)+d*Math.cos(i)*Math.sin(o),f=c*Math.sin(r)+d*Math.sin(i),g=Math.atan2(f,Math.sqrt(h*h+p*p)),v=Math.atan2(p,h),y=g.toDegrees(),m=v.toDegrees();return new me(y,m)}destinationPoint(e,t,r=6371e3){let n=e/r,i=Number(t).toRadians(),o=this.lat.toRadians(),a=this.lon.toRadians(),s=Math.sin(o)*Math.cos(n)+Math.cos(o)*Math.sin(n)*Math.cos(i),l=Math.asin(s),u=Math.sin(i)*Math.sin(n)*Math.cos(o),c=Math.cos(n)-Math.sin(o)*s,d=a+Math.atan2(u,c),h=l.toDegrees(),p=d.toDegrees();return new me(h,p)}static intersection(e,t,r,n){if(e instanceof me||(e=me.parse(e)),r instanceof me||(r=me.parse(r)),isNaN(t))throw new TypeError(`invalid brng1 ‘${t}’`);if(isNaN(n))throw new TypeError(`invalid brng2 ‘${n}’`);let i=e.lat.toRadians(),o=e.lon.toRadians(),a=r.lat.toRadians(),s=r.lon.toRadians(),l=Number(t).toRadians(),u=Number(n).toRadians(),c=a-i,d=s-o,h=2*Math.asin(Math.sqrt(Math.sin(c/2)*Math.sin(c/2)+Math.cos(i)*Math.cos(a)*Math.sin(d/2)*Math.sin(d/2)));if(Math.abs(h)<Number.EPSILON)return new me(e.lat,e.lon);let p=(Math.sin(a)-Math.sin(i)*Math.cos(h))/(Math.sin(h)*Math.cos(i)),f=(Math.sin(i)-Math.sin(a)*Math.cos(h))/(Math.sin(h)*Math.cos(a)),g=Math.acos(Math.min(Math.max(p,-1),1)),v=Math.acos(Math.min(Math.max(f,-1),1)),y=l-(Math.sin(s-o)>0?g:2*He-g),m=(Math.sin(s-o)>0?2*He-v:v)-u;if(0==Math.sin(y)&&0==Math.sin(m)||Math.sin(y)*Math.sin(m)<0)return null;let _=-Math.cos(y)*Math.cos(m)+Math.sin(y)*Math.sin(m)*Math.cos(h),b=Math.atan2(Math.sin(h)*Math.sin(y)*Math.sin(m),Math.cos(m)+Math.cos(y)*_),w=Math.asin(Math.min(Math.max(Math.sin(i)*Math.cos(b)+Math.cos(i)*Math.sin(b)*Math.cos(l),-1),1)),M=o+Math.atan2(Math.sin(l)*Math.sin(b)*Math.cos(i),Math.cos(b)-Math.sin(i)*Math.sin(w)),S=w.toDegrees(),I=M.toDegrees();return new me(S,I)}crossTrackDistanceTo(e,t,r=6371e3){e instanceof me||(e=me.parse(e)),t instanceof me||(t=me.parse(t));let n=r;if(this.equals(e))return 0;let i=e.distanceTo(this,n)/n,o=e.initialBearingTo(this).toRadians(),a=e.initialBearingTo(t).toRadians();return Math.asin(Math.sin(i)*Math.sin(o-a))*n}alongTrackDistanceTo(e,t,r=6371e3){e instanceof me||(e=me.parse(e)),t instanceof me||(t=me.parse(t));let n=r;if(this.equals(e))return 0;let i=e.distanceTo(this,n)/n,o=e.initialBearingTo(this).toRadians(),a=e.initialBearingTo(t).toRadians(),s=Math.asin(Math.sin(i)*Math.sin(o-a));return Math.acos(Math.cos(i)/Math.abs(Math.cos(s)))*Math.sign(Math.cos(a-o))*n}maxLatitude(e){let t=Number(e).toRadians(),r=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(r))).toDegrees()}static crossingParallels(e,t,r){if(e.equals(t))return null;let n=Number(r).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),a=t.lat.toRadians(),s=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.sin(s),u=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.cos(s)-Math.cos(i)*Math.sin(a)*Math.cos(n),c=Math.cos(i)*Math.cos(a)*Math.sin(n)*Math.sin(s);if(c*c>l*l+u*u)return null;let d=Math.atan2(-u,l),h=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+d+h,f=(o+d-h).toDegrees(),g=p.toDegrees();return{lon1:Ae.wrap180(f),lon2:Ae.wrap180(g)}}rhumbDistanceTo(e,t=6371e3){e instanceof me||(e=me.parse(e));let r=t,n=this.lat.toRadians(),i=e.lat.toRadians(),o=i-n,a=Math.abs(e.lon-this.lon).toRadians();Math.abs(a)>He&&(a=a>0?-(2*He-a):2*He+a);let s=Math.log(Math.tan(i/2+He/4)/Math.tan(n/2+He/4)),l=Math.abs(s)>1e-11?o/s:Math.cos(n);return Math.sqrt(o*o+l*l*a*a)*r}rhumbBearingTo(e){if(e instanceof me||(e=me.parse(e)),this.equals(e))return NaN;let t=this.lat.toRadians(),r=e.lat.toRadians(),n=(e.lon-this.lon).toRadians();Math.abs(n)>He&&(n=n>0?-(2*He-n):2*He+n);let i=Math.log(Math.tan(r/2+He/4)/Math.tan(t/2+He/4)),o=Math.atan2(n,i).toDegrees();return Ae.wrap360(o)}rhumbDestinationPoint(e,t,r=6371e3){let n=this.lat.toRadians(),i=this.lon.toRadians(),o=Number(t).toRadians(),a=e/r,s=a*Math.cos(o),l=n+s;Math.abs(l)>He/2&&(l=l>0?He-l:-He-l);let u=Math.log(Math.tan(l/2+He/4)/Math.tan(n/2+He/4)),c=Math.abs(u)>1e-11?s/u:Math.cos(n),d=i+a*Math.sin(o)/c,h=l.toDegrees(),p=d.toDegrees();return new me(h,p)}rhumbMidpointTo(e){e instanceof me||(e=me.parse(e));let t=this.lat.toRadians(),r=this.lon.toRadians(),n=e.lat.toRadians(),i=e.lon.toRadians();Math.abs(i-r)>He&&(r+=2*He);let o=(t+n)/2,a=Math.tan(He/4+t/2),s=Math.tan(He/4+n/2),l=Math.tan(He/4+o/2),u=((i-r)*Math.log(l)+r*Math.log(s)-i*Math.log(a))/Math.log(s/a);isFinite(u)||(u=(r+i)/2);let c=o.toDegrees(),d=u.toDegrees();return new me(c,d)}static areaOf(e,t=6371e3){let r=t,n=e[0].equals(e[e.length-1]);n||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let r=e[t].lat.toRadians(),n=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(r/2)+Math.tan(n/2)),1+Math.tan(r/2)*Math.tan(n/2))}s(e)&&(o=Math.abs(o)-2*He);let a=Math.abs(o*r*r);return n||e.pop(),a;function s(e){let t=0,r=e[0].initialBearingTo(e[1]);for(let n=0;n<e.length-1;n++){let i=e[n].initialBearingTo(e[n+1]),o=e[n].finalBearingTo(e[n+1]);t+=(i-r+540)%360-180,t+=(o-i+540)%360-180,r=o}return t+=(e[0].initialBearingTo(e[1])-r+540)%360-180,Math.abs(t)<90}}equals(e){return e instanceof me||(e=me.parse(e)),!(Math.abs(this.lat-e.lat)>Number.EPSILON||Math.abs(this.lon-e.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 ‘${e}’`);if("n"==e)return null==t&&(t=4),`${this.lat.toFixed(t)},${this.lon.toFixed(t)}`;return`${Ae.toLat(this.lat,e,t)}, ${Ae.toLon(this.lon,e,t)}`}};s(me,"LatLonSpherical"),y(),y(),y();var xt=class{constructor(e){m(this,"destinations",[]),this.destinations=e}};s(xt,"MappedinDestinationSet"),y();var Kr,an,sr=class{constructor(e,t){F(this,Kr,void 0),F(this,an,void 0),m(this,"distance",0),m(this,"path",[]),m(this,"instructions",[]),V(this,an,e),V(this,Kr,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,r,n,i,o,a,s,l,u,c,d,h;let p={...e,action:{...e.action},atLocation:(null==(t=e.atLocation)?void 0:t.id)?null==(n=null==(r=g(this,an))?void 0:r._vortexesById)?void 0:n[e.atLocation.id]:void 0,node:(null==(i=e.node)?void 0:i.id)?null==(a=null==(o=g(this,an))?void 0:o._nodesById)?void 0:a[e.node.id]:void 0};return((null==(s=p.action)?void 0:s.type)===et.TAKEVORTEX||(null==(l=p.action)?void 0:l.type)===et.EXITVORTEX)&&(p.action.fromMap=null==(c=g(this,an)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],p.action.toMap=null==(h=g(this,an)._mapsById)?void 0:h[null==(d=p.action)?void 0:d.toMap.id]),p})),this.path=t.path.map((e=>{var t,r;return null==(r=null==(t=g(this,an))?void 0:t._nodesById)?void 0:r[e.id]}))}toJSON(){return g(this,Kr)}};s(sr,"MappedinDirections"),Kr=new WeakMap,an=new WeakMap;var On,on=class{constructor(e){F(this,On,void 0),V(this,On,e)}directionsTo(e,t){if(e instanceof xt){let r=[],n=this;for(let i=0;i<e.destinations.length;i++){let o=e.destinations[i],a=Xr(n),s=Xr(o),l=g(this,On).navigator.getDirections({originIds:a,destinationNodeIds:s,accessible:(null==t?void 0:t.accessible)||!1}),u=new sr(g(this,On),l);r.push(u),n=o}return r}{let r=Xr(this),n=Xr(e),i=g(this,On).navigator.getDirections({originIds:r,destinationNodeIds:n,accessible:(null==t?void 0:t.accessible)||!1});return new sr(g(this,On),i)}}distanceTo(e,t){let r=this.directionsTo(e,t);return(null==r?void 0:r.distance)||0}};s(on,"MappedinNavigatable"),On=new WeakMap,y();var Ao=xn(Wp()),Al={production:"40ead723d18886045e302513245edb27",development:""},fr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},hi=class{constructor(e){this.event_properties=e,m(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(hi,"AnalyticsCategorySelectedCall");var fi=class{constructor(e){this.event_properties=e,m(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(fi,"AnalyticsLocationSelectedCall");var Nl=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Nl,"BlueDotDisableCall");var Ll=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Ll,"BlueDotEnableCall");var Rl=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(Rl,"BlueDotOffCall");var Dl=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Dl,"BlueDotOnCall");var zl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(zl,"CameraAnimateCall");var Fl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Fl,"CameraCancelAnimationCall");var Bl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Bl,"CameraFocusOnCall");var ql=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(ql,"CameraGetSafeAreaInsetsCall");var Vl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Vl,"CameraInteractionDisableCall");var Ul=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Ul,"CameraInteractionEnableCall");var Gl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Gl,"CameraSetCall");var Wl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(Wl,"CameraSetSafeAreaInsetsCall");var Hl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Hl,"CameraTranslateCall");var $l=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s($l,"FlatLabelsAddCall");var Kl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Kl,"FlatLabelsLabelAllLocationsCall");var Xl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(Xl,"FlatLabelsRemoveCall");var Yl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(Yl,"FlatLabelsRemoveAllCall");var Jl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(Jl,"FlatLabelsSetAppearanceCall");var Zl=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(Zl,"FloatingLabelsAddCall");var Ql=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(Ql,"FloatingLabelsLabelAllLocationsCall");var eu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(eu,"FloatingLabelsRemoveCall");var tu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(tu,"FloatingLabelsRemoveAllCall");var nu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(nu,"FloatingLabelsResetPriorityCall");var ru=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(ru,"FloatingLabelsSetAppearanceCall");var iu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(iu,"FloatingLabelsSetPriorityCall");var mi=class{constructor(e){this.event_properties=e,m(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(mi,"GlobalGetVenueCall");var No=class{constructor(e){this.event_properties=e,m(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(No,"GlobalGetVenueMvfCall");var au=class{constructor(e){this.event_properties=e,m(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(au,"GlobalShowVenueCall");var ou=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(ou,"JourneyClearCall");var su=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(su,"JourneyDrawCall");var lu=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(lu,"JourneySetStepCall");var uu=class{constructor(e){this.event_properties=e,m(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(uu,"MappedinGetCollectionItemByIdCall");var cu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(cu,"MappedinCoordinateAbsoluteDistanceToCall");var du=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(du,"MappedinCoordinateNearestNodeCall");var gi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(gi,"MappedinLocationCloneCall");var vi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(vi,"MappedinLocationDirectionsToCall");var yi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(yi,"MappedinLocationDistanceToCall");var pu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(pu,"MappedinMapCreateCoordinateCall");var hu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(hu,"MappedinMapCreateCoordinateByXyCall");var fu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(fu,"MappedinMapGetNorthCall");var bi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(bi,"MappedinNodeDirectionsToCall");var _i=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(_i,"MappedinNodeDistanceToCall");var wi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(wi,"MappedinPolygonDirectionsToCall");var ki=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(ki,"MappedinPolygonDistanceToCall");var Mi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(Mi,"MappedinVenueMetadataRead");var mu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(mu,"MapViewAddInteractivePolygonCall");var gu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(gu,"MapViewAddInteractivePolygonsForAllLocationsCall");var vu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(vu,"MapViewClearPolygonColorCall");var yu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(yu,"MapViewCreateCustomTooltipCall");var bu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(bu,"MapViewCreateMarkerCall");var _u=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(_u,"MapViewCreateTooltipCall");var wu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(wu,"MapViewDestroyCall");var ku=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(ku,"MapViewDisableImageFlippingForAllPolygonsCall");var Mu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Mu,"MapViewDrawPathCall");var Tu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Tu,"MapViewEnableImageFlippingForAllLocationsCall");var xu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(xu,"MapViewEnableImageFlippingForPolygonCall");var Eu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(Eu,"MapViewGetNearestNodeByScreenCoordinatesCall");var Iu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Iu,"MapViewGetPolygonAtCoordinateCall");var Ou=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Ou,"MapViewGetPrimaryLocationForPolygonCall");var Su=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Su,"MapViewLabelAllLocationsCall");var ju=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(ju,"MapViewRemoveAllInteractivePolygonsCall");var Pu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Pu,"MapViewRemoveAllMarkersCall");var Cu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Cu,"MapViewRemoveAllPathsCall");var Au=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Au,"MapViewRemoveAllTooltipsCall");var Nu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Nu,"MapViewRemoveInteractivePolygonCall");var Lu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(Lu,"MapViewRemoveMarkerCall");var Ru=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Ru,"MapViewRemovePathCall");var Du=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Du,"MapViewRemoveTooltipCall");var zu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(zu,"MapViewSetBackgroundColorCall");var Fu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(Fu,"MapViewSetHoverColorCall");var Bu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(Bu,"MapViewSetMapCall");var qu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(qu,"MapViewSetPolygonColorCall");var Vu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(Vu,"MapViewSetStateCall");var Uu=class{constructor(e){this.event_properties=e,m(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(Uu,"MetricsMapLoadEvent");var Ti=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(Ti,"OfflineSearchAddQueryCall");var xi=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(xi,"OfflineSearchConstructorCall");var Ei=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(Ei,"OfflineSearchSearchCall");var Ii=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(Ii,"OfflineSearchSuggestCall");var Lo=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),Gu=class{constructor(){m(this,"disabled",!1),m(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,r;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."),Lo();let n=null;if(e.client&&"apiKey"in e.client?n=e.client.apiKey:"environment"in e&&(n=Al[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(n)return this.amplitude=Ao.createInstance(),this.amplitude.init(n,void 0,{...fr,...null==(r=e.client)?void 0:r.configuration});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return Lo()}identify(e,t,r){if(!this.isInitializedAndEnabled())return Lo();e&&(r={...r,user_id:e});let n=new Ao.Identify,i=t;if(null!=i)for(let[e,t]of Object.entries(i))n.set(e,t);return this.amplitude.identify(n,r)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):Lo()}analyticsCategorySelectedCall(e,t){return this.track(new hi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new fi(e),t)}blueDotDisableCall(e,t){return this.track(new Nl(e),t)}blueDotEnableCall(e,t){return this.track(new Ll(e),t)}blueDotOffCall(e,t){return this.track(new Rl(e),t)}blueDotOnCall(e,t){return this.track(new Dl(e),t)}cameraAnimateCall(e,t){return this.track(new zl(e),t)}cameraCancelAnimationCall(e,t){return this.track(new Fl(e),t)}cameraFocusOnCall(e,t){return this.track(new Bl(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new ql(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Vl(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Ul(e),t)}cameraSetCall(e,t){return this.track(new Gl(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Wl(e),t)}cameraTranslateCall(e,t){return this.track(new Hl(e),t)}flatLabelsAddCall(e,t){return this.track(new $l(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Kl(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Xl(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Yl(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Jl(e),t)}floatingLabelsAddCall(e,t){return this.track(new Zl(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Ql(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new eu(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new tu(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new nu(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new ru(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new iu(e),t)}globalGetVenueCall(e,t){return this.track(new mi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new No(e),t)}globalShowVenueCall(e,t){return this.track(new au(e),t)}journeyClearCall(e,t){return this.track(new ou(e),t)}journeyDrawCall(e,t){return this.track(new su(e),t)}journeySetStepCall(e,t){return this.track(new lu(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new uu(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new cu(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new du(e),t)}mappedinLocationCloneCall(e,t){return this.track(new gi(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new vi(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new yi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new pu(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new hu(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new fu(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new bi(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new _i(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new wi(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new ki(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new Mi(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new mu(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new gu(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new vu(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new yu(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new bu(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new _u(e),t)}mapViewDestroyCall(e,t){return this.track(new wu(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new ku(e),t)}mapViewDrawPathCall(e,t){return this.track(new Mu(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new Tu(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new xu(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new Eu(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new Iu(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new Ou(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new Su(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new ju(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new Pu(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new Cu(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new Au(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new Nu(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new Lu(e),t)}mapViewRemovePathCall(e,t){return this.track(new Ru(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new Du(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new zu(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new Fu(e),t)}mapViewSetMapCall(e,t){return this.track(new Bu(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new qu(e),t)}mapViewSetStateCall(e,t){return this.track(new Vu(e),t)}metricsMapLoadEvent(e,t){return this.track(new Uu(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new Ti(e),t)}offlineSearchConstructorCall(e,t){return this.track(new xi(e),t)}offlineSearchSearchCall(e,t){return this.track(new Ei(e),t)}offlineSearchSuggestCall(e,t){return this.track(new Ii(e),t)}};s(Gu,"Ampli");var Oi=new Gu;y();var lf=xn(Eh()),uf=xn(tf()),cf=xn(nf());y(),y(),y();var Zn,Ut,Gt,pc=[0,4,6,8,10],mn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let r=0;r<e.length;r++)r>0&&0==(3&r)&&(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;let r=e.map((e=>e.toString(16).padStart(2,"0")));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],pc.map(((e,t)=>r.slice(e,t===pc.length-1?void 0:pc[t+1]).join(""))).join("-")}),"randomId"),rf="mi-session-data",af="mi-local-data",hc=class{constructor(){F(this,Ut,void 0),F(this,Gt,void 0);try{let e=sessionStorage.getItem(rf);V(this,Ut,e?JSON.parse(e):{id:mn()})}catch{V(this,Ut,{id:mn()})}try{let e=localStorage.getItem(af);V(this,Gt,e?JSON.parse(e):{deviceId:mn()})}catch{V(this,Gt,{deviceId:mn()})}g(this,Ut).id||(g(this,Ut).id=mn()),g(this,Gt).deviceId||(g(this,Gt).deviceId=mn())}static getInstance(){return g(this,Zn)||V(this,Zn,new hc),g(this,Zn)}static ___clearInstance(){V(this,Zn,void 0)}saveSessionData(e,t){g(this,Ut)[e]=t;try{return sessionStorage.setItem(rf,JSON.stringify(g(this,Ut))),!0}catch{return!1}}loadSessionData(e){let t=g(this,Ut)[e];if(null!=t)return t}saveLocalData(e,t){g(this,Gt)[e]=t;try{return localStorage.setItem(af,JSON.stringify(g(this,Gt))),!0}catch{return!1}}loadLocalData(e){let t=g(this,Gt)[e];if(null!=t)return t}},wr=hc;function of(e){return/^[\da-f]{24}$/i.test(e)}function ns(){return wr.getInstance().loadLocalData("deviceId")}function rs(){return wr.getInstance().loadSessionData("id")}s(wr,"SafeStorage"),Zn=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,F(wr,Zn,void 0),s(of,"isGatewayKey"),s(ns,"getDeviceID"),s(rs,"getSessionID");var gn,Qn,Wt,kr,Yt,is,bw,as,_w,qi,df,Vi,pf,Ht,sf="5.2.0",gw="https://api2.amplitude.com/2/httpapi",vw="https://api2.amplitude.com/batch",yw="__unspecified__",fc={branch:"main",version:"0",source:"websdk"},Rt=class{constructor(){if(F(this,is),F(this,as),F(this,qi),F(this,Vi),F(this,Wt,{}),F(this,kr,!1),F(this,Yt,void 0),F(this,Ht,s((async e=>{kw(e.type)&&(window.removeEventListener("visibilitychange",g(this,Ht)),window.removeEventListener("pagehide",g(this,Ht)),window.removeEventListener("beforeunload",g(this,Ht)),window.removeEventListener("unload",g(this,Ht)),await this.sendAllPendingEvents())}),"#handlePageUnload")),!Oi.isLoaded){let{promise:e}=Oi.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",g(this,Ht)),window.addEventListener("beforeunload",g(this,Ht)),window.addEventListener("unload",g(this,Ht)),window.addEventListener("visibilitychange",g(this,Ht))}))}null==g(Rt,Qn)&&V(Rt,Qn,sf),null!=navigator.userAgent&&V(this,Yt,new cf.UAParser(navigator.userAgent).getResult())}static setContext(e){V(Rt,gn,e)}static setVersion(e){V(Rt,Qn,e)}addPendingEvent(e){var t;if(null==g(Rt,gn))return void te.warn("No context defined for product analytics! Event will not be tracked.");let r=e.event_type;if(!ut(this,as,_w).call(this,e))return;null==e.event_properties&&(e.event_properties={});let n=g(this,Wt)[r];(0,uf.default)(e.event_properties,null!=(t=null==n?void 0:n.event_properties)?t:{}),g(this,Wt)[r]=e}async sendAllPendingEvents(){if(null==g(Rt,gn))return void te.warn("No context defined for product analytics! No events will be sent.");if(Object.keys(g(this,Wt)).length<1)return;if(g(this,kr))return void te.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let e=[];for(let t in g(this,Wt)){let r=g(this,Wt)[t],n=ut(this,qi,df).call(this,r);null!=n&&e.push(n)}if(!(e.length<1))try{V(this,kr,!0),200===(await ut(this,Vi,pf).call(this,vw,e)).status&&V(this,Wt,{})}catch(e){te.warn("Error sending batch product analytics!",e)}finally{V(this,kr,!1)}}async sendEventNow(e){if(null==g(Rt,gn))return void te.warn("No context defined for product analytics! No events will be sent.");let t=ut(this,qi,df).call(this,e);if(null!=t)try{await ut(this,Vi,pf).call(this,gw,[t])}catch(e){te.warn("Error sending single product analytics event!",e)}}},Bi=Rt;s(Bi,"ProductAnalytics"),gn=new WeakMap,Qn=new WeakMap,Wt=new WeakMap,kr=new WeakMap,Yt=new WeakMap,is=new WeakSet,bw=s((function(e){let t=e.event_type;return null!=g(this,Wt)[t]}),"#isEventTypePending"),as=new WeakSet,_w=s((function(e){if(!ut(this,is,bw).call(this,e))return!0;let t=e.event_type,r=g(this,Wt)[t];return!(0,lf.default)(r.event_properties,e.event_properties)}),"#didEventPropertiesChange"),qi=new WeakSet,df=s((function(e){var t,r,n,i,o,a,s,l,u,c,d,h,p,f,v,y,m;if(null!=g(Rt,gn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&te.warn("Error processing product analytics event! Unspecified venue slug",e),null==fr.plan&&te.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(r=Oi.client.getSessionId())?r:rs(),device_id:null!=(n=Oi.client.getDeviceId())?n:ns(),plan:{branch:null!=(o=null==(i=fr.plan)?void 0:i.branch)?o:fc.branch,version:null!=(s=null==(a=fr.plan)?void 0:a.version)?s:fc.version,source:null!=(u=null==(l=fr.plan)?void 0:l.source)?u:fc.source},os_name:null==(c=g(this,Yt))?void 0:c.browser.name,os_version:null==(d=g(this,Yt))?void 0:d.browser.version,device_manufacturer:null==(h=g(this,Yt))?void 0:h.device.vendor,device_model:null==(p=g(this,Yt))?void 0:p.device.model,event_properties:{...e.event_properties,context:g(Rt,gn),sdk_version:g(Rt,Qn),browser_name:null==(f=g(this,Yt))?void 0:f.browser.name,browser_version:null==(v=g(this,Yt))?void 0:v.browser.version,venue:null!=(m=null==(y=e.event_properties)?void 0:y.venue)?m:yw},time:e.time}}),"#makeBatchFormattedEvent"),Vi=new WeakSet,pf=s((async function(e,t){return await er()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Al.production,events:t})})}),"#batchSend"),Ht=new WeakMap,F(Bi,gn,void 0),F(Bi,Qn,void 0);var ww=new Bi,Xe=ww;function kw(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(kw,"areWeLeavingThePage");var Mw=0,Tw="9999-12-31T00:00:00.000Z";function xw(e,t,r=new Date){if(!e.states)return;let n=r||new Date,i=e.states.find((e=>{let t=new Date(e.start||Mw),r=new Date(e.end||Tw);return t<n&&r>n}));return i?t.find((e=>e.value===i.type)):void 0}s(xw,"getCurrentLocationState");var St,Nn,jt,Ui,Gi,Wi,Hi=class extends on{constructor(e,t){super(e),F(this,St,void 0),F(this,Nn,void 0),F(this,jt,{}),m(this,"states"),m(this,"id",""),m(this,"name",""),m(this,"type",""),m(this,"description"),m(this,"sortOrder"),m(this,"logo"),m(this,"phone"),m(this,"social"),m(this,"color"),m(this,"shortName"),m(this,"detailsUrl"),m(this,"tags"),m(this,"externalId"),m(this,"showLabelWhenImagePresent"),m(this,"showSmartLabelWhenImagePresent"),m(this,"picture"),m(this,"operationHours"),m(this,"siblingGroups"),m(this,"gallery"),F(this,Ui,void 0),F(this,Gi,[]),F(this,Wi,void 0),V(this,St,e),V(this,Nn,t);let r=Object.assign({},t);delete r.categories,Object.assign(this,r)}get polygons(){let e=g(this,jt).polygons;if(void 0!==e)return e;let t=[],r=g(this,Ui),n=g(this,St)._polygonsById;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&i.geometry.visible&&t.push(i)}return g(this,jt).polygons=t,t}set polygons(e){V(this,Ui,e)}get nodes(){let e=g(this,jt).nodes;if(void 0!==e)return e;let t=[],r=g(this,Gi),n=g(this,St)._nodesById;if(r)for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return g(this,jt).nodes=t,t}set nodes(e){V(this,Gi,e)}get parent(){let e=g(this,jt).parent;if(void 0!==e)return e;let t,r=g(this,St)._locationsById,n=g(this,Wi);return void 0!==n&&(t=r[n]),g(this,jt).parent=t,t}set parent(e){V(this,Wi,e)}get categories(){let e=g(this,jt).categories;if(void 0!==e)return e;let t=[];return g(this,Nn).categories.forEach((e=>{let r=g(this,St).getCollectionItemById(yn.CATEGORY,e);r&&t.push(r)})),g(this,jt).categories=t,t}get state(){return xw(this,g(this,St).locationStates)}clone(){let e=g(this,St).venue.slug;return Xe.addPendingEvent(new gi({venue:e})),new Hi(g(this,St),g(this,Nn))}get nodeOperationHours(){let e=g(this,jt).nodeOperationHours;if(void 0!==e)return e;if(null==this.nodes)return{};let t=g(this,Nn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return g(this,jt).nodeOperationHours=t,t}static hydrate(e,t){return e.map((e=>new Hi(t,e)))}static async fetch(e){let t=e.options.things.locations.slice();e.options.things.categories&&Je(t,"categories"),e.options.things.nodes&&Je(t,"nodes"),e.options.things.polygons&&Je(t,"polygons"),e.options.things.locationStates&&Je(t,"states");let r={fields:t,venue:e.options.venue};try{let t=await Ye(e.options,"location",r);return e.options.includeHidden||(t=t.filter((e=>!e.hidden))),t.map((t=>new Hi(e,t)))}catch(e){return te.error("Fetch Locations:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=g(this,St).venue.slug,i=new vi({with_destination_set:r||void 0,venue:n});return Xe.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=g(this,St).venue.slug;return Xe.addPendingEvent(new yi({venue:r})),super.distanceTo(e,t)}toJSON(){let e=g(this,Nn);return delete e.color,e}},vn=Hi;s(vn,"MappedinLocation"),St=new WeakMap,Nn=new WeakMap,jt=new WeakMap,Ui=new WeakMap,Gi=new WeakMap,Wi=new WeakMap,y();var Jt,Mr,Dt,$i,os=class extends on{constructor(e,t){super(e),F(this,Jt,void 0),F(this,Mr,void 0),F(this,Dt,{}),m(this,"geometry"),m(this,"perspectives"),m(this,"image"),m(this,"holes"),m(this,"textures"),m(this,"material"),m(this,"label"),m(this,"id",""),m(this,"layer"),m(this,"layerId"),m(this,"name"),m(this,"externalId"),m(this,"vertexes"),m(this,"canvasBounds"),F(this,$i,void 0),V(this,Jt,e),V(this,Mr,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=g(this,Dt).map;if(void 0!==e)return e;let t=g(this,Jt).getCollectionItemById(yn.MAP,g(this,Mr).map);return g(this,Dt).map=t,t}get locations(){var e,t;let r=g(this,Dt).locations;if(void 0!==r)return r;let n=[],i=null!=(t=null==(e=Tt.instances.get(g(this,Jt)))?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],r=t.polygons;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e)if(r[e].id===o){n.push(t);break}}return g(this,Dt).locations=n,n}get entrances(){let e=g(this,Dt).entrances;if(void 0!==e)return e;let t=[],r=g(this,$i),n=g(this,Jt)._nodesById;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return g(this,Dt).entrances=t,t}return[]}set entrances(e){V(this,$i,e)}get rank(){let e=g(this,Dt).rank;if(void 0!==e)return e;let{rankings:t}=g(this,Jt);if(!t||!t.polygons)return null;let r=t.polygons.find((e=>e.polygonId===this.id));return r?(g(this,Dt).rank={score:r.score,node:r.entranceNodeId},{score:r.score,node:r.entranceNodeId}):(g(this,Dt).rank=null,null)}static hydrate(e,t){return e.map((e=>new os(t,e)))}static async fetch(e){let t=e.options.things.polygons.slice();e.options.things.maps&&Je(t,"map"),e.options.things.nodes&&Je(t,"entrances");let r={fields:t,venue:e.options.venue};try{return(await Ye(e.options,"polygon",r)).filter((e=>e.geometry.visible)).map((t=>new os(e,t)))}catch(e){return te.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=g(this,Jt).venue.slug,i=new wi({with_destination_set:r||void 0,venue:n});return Xe.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=g(this,Jt).venue.slug;return Xe.addPendingEvent(new ki({venue:r})),super.distanceTo(e,t)}toJSON(){return g(this,Mr)}},tr=os;function hf(e){return/^[\da-f]{24}$/i.test(e)}function ff(e,t=!1){let r="";if(null!=e){let n="?",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],a=e[o];null!=a&&(r+=`${n+encodeURIComponent(o)}=${encodeURIComponent(a)}`,n="&")}}return r}function Ew(e,t,r,n=!1){var i,o;return n?`${e.supplementaryUrl}${t}?venue=${r.venue||r.slug}`:(null==(i=e.baseUrl)?void 0:i.includes("gateway"))?`${e.baseUrl}${t}/${r.venue||r.slug}${ff(r,null==(o=e.baseUrl)?void 0:o.includes("gateway"))}`:e.baseUrl+t+ff(r)}async function Ye(e,t,r,n=!1){return mc(e,t,r,n,!0)}async function mc(e,t,r,n=!1,i=!1){let o=Ew(e,t,r,n),a=await gc(e,o,n);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}async function gc(e,t,r=!1){let n={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};r&&delete n.language,n.language&&(t+=`&lang=${encodeURIComponent(n.language)}`);let{headers:i}=e;i["Content-Type"]="text/json",e.authorization&&(i.Authorization=e.authorization),n.language&&(i["Accept-Language"]=n.language);let o={method:"GET",headers:i},a=await er()(t,o);if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function Je(e,t){e.indexOf(t)<0&&e.push(t)}function mf([e,t],[r,n]){let i=new me(e,t),o=new me(r,n);return i.distanceTo(o)}function gf(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let r=e.georeference[0],n=e.georeference[2],i=new me(r.target.x,r.target.y),o=new me(n.target.x,n.target.y),a=i.distanceTo(o),s=r.control.x-n.control.x,l=r.control.y-n.control.y;t=Math.sqrt(s*s+l*l)/a}catch(r){t=1,te.warn(r),te.warn(`Couldn't georeference ${e.name||e.shortName||e.id}. Probably not enough geocoordinates.`)}return t}function Xr(e){var t;return e instanceof tr?e.entrances.map((e=>e.id)):e instanceof vn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function vf(e){let t={},{maps:r,images:n,scenes:i,polygons:o}=e;if(null!=n)try{let e=Object.keys(n).map((e=>fetch(`data:image/png;base64,${n[e]}`).then((e=>e.blob())).then((r=>{t[e]=r})).catch((e=>{te.error(e)}))));await Promise.all(e)}catch(e){te.error(e)}return r.forEach((e=>{var r;!(null==(r=e.scene)?void 0:r.polygons)&&!i[e.id]||(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=n&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var r,n;if((null==(r=null==e?void 0:e.image)?void 0:r.url)&&(null==(n=null==e?void 0:e.image)?void 0:n.url)){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}}))))})),null!=n&&o.forEach((e=>{var r;if(null==(r=null==e?void 0:e.image)?void 0:r.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function ss(e,t,r){let n;return function(){let i=this,o=arguments,a=s((function(){n=null,r||e.apply(i,o)}),"later"),l=r&&!n;clearTimeout(n),n=setTimeout(a,t),l&&e.apply(i,o)}}s(tr,"MappedinPolygon"),Jt=new WeakMap,Mr=new WeakMap,Dt=new WeakMap,$i=new WeakMap,s(hf,"isGatewayKey"),s(ff,"stringifyQuery"),s(Ew,"buildUrl"),s(Ye,"getArray"),s(mc,"getObject"),s(gc,"generateAPIRequest"),s(Je,"addToSet"),s(mf,"getDistanceBetweenLatLon"),s(gf,"getMapScale"),s(Xr,"getNodesForNavigatable"),s(vf,"populateBundledImagesAsBlobs"),s(ss,"debounce");var Ki,Xi,Yi,ls=class{constructor(e,t){F(this,Ki,void 0),F(this,Xi,{}),F(this,Yi,void 0),m(this,"name"),m(this,"externalId"),m(this,"parents"),m(this,"id"),m(this,"icon"),this.id=t.id,V(this,Yi,t),V(this,Ki,e),Object.assign(this,t)}get locations(){var e;let t=g(this,Xi).locations;if(void 0!==t)return t;let r=[],{locations:n}=g(this,Ki),{id:i}=this;for(let t=0,o=n.length;t<o;++t){let o=n[t],a=o.categories;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if((null==(e=a[t])?void 0:e.id)===i){r.push(o);break}}return g(this,Xi).locations=r,r}static hydrate(e,t){return e.map((e=>new ls(t,e)))}static async fetch(e){let t={fields:e.options.things.categories,venue:e.options.venue};try{return(await Ye(e.options,"category",t)).map((t=>new ls(e,t)))}catch(e){return te.error("Fetch Categories:",e),[]}}toJSON(){return g(this,Yi)}},nr=ls;s(nr,"MappedinCategory"),Ki=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,y();var Zi,Tr,Qi,us=class{constructor(e,t){F(this,Zi,void 0),F(this,Tr,void 0),F(this,Qi,{}),m(this,"id",""),m(this,"type",""),m(this,"name",""),m(this,"description"),m(this,"image"),m(this,"startDate"),m(this,"endDate"),m(this,"showDate"),V(this,Tr,t),V(this,Zi,e),Object.assign(this,t)}location(){let e=g(this,Qi).location;if(void 0!==e)return e;let t,r=g(this,Zi)._locationsById,n=g(this,Tr).location;if(null!=n){let e=r[n];null!=e&&(t=e)}return g(this,Qi).location=t,t}static hydrate(e,t){return e.map((e=>new us(t,e)))}static async fetch(e){let t=e.options.things.events.slice();e.options.things.locations&&Je(t,"location");let r={fields:t,venue:e.options.venue,activeAtOrAfter:Date.now()};try{return(await Ye(e.options,"event",r)).map((t=>new us(e,t)))}catch(e){return te.error("Fetch Events:",e),[]}}toJSON(){return g(this,Tr)}},Ji=us;s(Ji,"MappedinEvent"),Zi=new WeakMap,Tr=new WeakMap,Qi=new WeakMap,y();var ea,ds=class{constructor(e){F(this,ea,void 0),m(this,"id",""),m(this,"name",""),m(this,"value",""),V(this,ea,e),Object.assign(this,e)}static hydrate(e){return e.map((e=>new ds(e)))}static async fetch(e){let t={fields:e.options.things.locationStates.slice(),venue:e.options.venue};try{return(await Ye(e.options,"location-state",t)).map((e=>new ds(e)))}catch(e){return te.error("Fetch Location States:",e),[]}}toJSON(){return g(this,ea)}},cs=ds;s(cs,"MappedinLocationState"),ea=new WeakMap,y(),y();var ta,yf,na,bf,ra,ia,ps,Iw,hs,Ow,Zt,Qt,en,tn,xr=class{constructor(e){F(this,ta),F(this,na),F(this,ps),F(this,hs),m(this,"map"),F(this,ra,{}),F(this,ia,void 0),F(this,Zt,void 0),F(this,Qt,void 0),F(this,en,void 0),F(this,tn,void 0);let{map:t,mappedin:r}=e;null!=e.lat&&null!=e.lon&&(V(this,Zt,e.lat),V(this,Qt,e.lon)),null!=e.x&&null!=e.y&&(V(this,en,e.x),V(this,tn,e.y)),this.map=t,V(this,ia,r)}get x(){return ut(this,na,bf).call(this,"x")}get y(){return ut(this,na,bf).call(this,"y")}get lat(){return ut(this,ta,yf).call(this,"lat")}get lon(){return ut(this,ta,yf).call(this,"lon")}absoluteDistanceTo(e){return mf([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=g(this,ra).nearestNode;if(void 0!==e)return e;let t=Tt.instances.get(g(this,ia)).findNearestNodeOnMap(this.map.id,this);return g(this,ra).nearestNode=t,t}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};s(xr,"MappedinCoordinate"),ta=new WeakSet,yf=s((function(e){if(g(this,Zt)&&g(this,Qt))return g(this,"lat"===e?Zt:Qt);if(null!=g(this,en)&&null!=g(this,tn)){let[t,r]=ut(this,hs,Ow).call(this,g(this,en),g(this,tn));return V(this,Zt,t),V(this,Qt,r),g(this,"lat"===e?Zt:Qt)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),na=new WeakSet,bf=s((function(e){if(g(this,en)&&g(this,tn))return g(this,"x"===e?en:tn);if(null!=g(this,Zt)&&null!=g(this,Qt)){let[t,r]=ut(this,ps,Iw).call(this,g(this,Zt),g(this,Qt));return V(this,en,t),V(this,tn,r),g(this,"x"===e?en:tn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),ra=new WeakMap,ia=new WeakMap,ps=new WeakSet,Iw=s((function(e,t){let r=this.map.georeference[0],n=new me(r.target.x,r.target.y),i=new me(e,t),o=n.distanceTo(i),a=(n.finalBearingTo(i)+360)%360*Math.PI/180||0,s=o*(1/this.map.scale),l=a+this.map.getNorth(),u=Math.sin(l)*s,c=Math.cos(l)*s;return[r.control.x+u,r.control.y-c]}),"#latLonToXY"),hs=new WeakSet,Ow=s((function(e,t){let r,n=this.map.georeference[0],i=new me(n.target.x,n.target.y),o=e-n.control.x,a=n.control.y-t,s=Math.atan2(o,a);r=0===o&&0===a?0:0===o?a:o/Math.sin(s);let l=s-this.map.getNorth(),u=r/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),Zt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap;var nn,oa,sa,fs=class{constructor(e,t){F(this,nn,void 0),F(this,oa,{}),F(this,sa,void 0),m(this,"id",""),m(this,"group",""),m(this,"name",""),m(this,"shortName",""),m(this,"elevation",0),m(this,"scale",0),m(this,"layers"),m(this,"x_scale"),m(this,"perspectiveId"),m(this,"scene"),m(this,"width",0),m(this,"height",0),m(this,"georeference",[]),m(this,"_scale",0),V(this,nn,e),V(this,sa,t),Object.assign(this,t),this._scale=gf(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,r;return null!=(r=null==(t=null==(e=Tt.instances.get(g(this,nn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?r:[]}get locations(){var e,t,r;return null!=(r=null==(t=null==(e=Tt.instances.get(g(this,nn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?r:[]}get nodes(){var e,t,r;return null!=(r=null==(t=null==(e=Tt.instances.get(g(this,nn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?r:[]}get mapGroup(){let e=g(this,oa).mapGroup;if(void 0!==e)return e;let t=this.group,r=t&&g(this,nn)._mapGroupsById[t]||null;return g(this,oa).mapGroup=r,r}createCoordinateByXY(e,t){return new xr({x:e,y:t,map:this,mappedin:g(this,nn)})}createCoordinate(e,t){return new xr({lat:e,lon:t,map:this,mappedin:g(this,nn)})}getNorth(){let e;try{let t=this.georeference[0],r=this.georeference[2],n=new me(t.target.x,t.target.y),i=new me(r.target.x,r.target.y);e=-((n.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(r.control.y-t.control.y,r.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,te.warn(t),te.warn(`Couldn't georeference ${this.name||this.shortName||this.id}. Probably not enough geocoordinates.`)}return e}static hydrate(e,t){return e.map((e=>new fs(t,e)))}static async fetch(e){let t=e.options.things.maps.slice();e.options.perspective&&Je(t,"perspectives"),e.options.things.mapGroups&&Je(t,"group"),Je(t,"elevation"),Je(t,"x_scale"),Je(t,"scale"),Je(t,"georeference");let r={fields:t,perspective:e.options.perspective,venue:e.options.venue};try{let i=await Ye(e.options,"map",r),o=s((e=>{let t=n.layers.find((t=>t.id===e));t?t.visible=!0:n.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let r=0,a=i.length;r<a;++r){var n=i[r];if(n){let e=n.perspective;null!=e&&(n.perspectiveId=e.id,t.indexOf("scene")>-1&&(n.scene=e.scene),e.layers?(n.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(o)):n.layers.forEach((e=>{e.visible=!0}))),delete n.perspective}i[r]=new fs(e,n)}return i}catch(e){return te.error("Fetch Maps:",e),[]}}toJSON(){return g(this,sa)}},aa=fs;s(aa,"MappedinMap"),nn=new WeakMap,oa=new WeakMap,sa=new WeakMap,y();var ua,Er,ca,ms=class{constructor(e,t){F(this,ua,void 0),F(this,Er,void 0),F(this,ca,{}),m(this,"id",""),m(this,"name",""),V(this,Er,t),V(this,ua,e),Object.assign(this,t)}get maps(){let e=g(this,ca).maps;if(void 0!==e)return e;let t=[],{maps:r}=g(this,ua),{id:n}=g(this,Er);for(let e=0,i=r.length;e<i;++e){let i=r[e];i.group===n&&t.push(i)}return g(this,ca).maps=t,t}static hydrate(e,t){return e.map((e=>new ms(t,e)))}static async fetch(e){let t={fields:e.options.things.mapGroups.slice(),venue:e.options.venue};try{return(await Ye(e.options,"map-group",t)).map((t=>new ms(e,t)))}catch(e){return te.error("Fetch Map Groups:",e),[]}}toJSON(){return g(this,Er)}},la=ms;s(la,"MappedinMapGroup"),ua=new WeakMap,Er=new WeakMap,ca=new WeakMap,y();var zt,Ir,lt,pa,gs=class extends on{constructor(e,t){super(e),F(this,zt,void 0),F(this,Ir,void 0),F(this,lt,{}),m(this,"id",""),m(this,"x",0),m(this,"y",0),m(this,"operationHours"),m(this,"externalId"),F(this,pa,void 0),V(this,zt,e),V(this,Ir,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=g(this,lt).map;if(void 0!==e)return e;let t=g(this,zt).getCollectionItemById(yn.MAP,g(this,Ir).map);return g(this,lt).map=t,t}get lat(){var e;let t=g(this,lt).cachedLatLon;if(null!=t)return t.lat;let r=null==(e=g(this,zt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return g(this,lt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),g(this,lt).cachedLatLon.lat}get lon(){var e;let t=g(this,lt).cachedLatLon;if(null!=t)return t.lon;let r=null==(e=g(this,zt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return g(this,lt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),g(this,lt).cachedLatLon.lon}get paths(){let e=g(this,lt).paths;if(void 0!==e)return e;let t=[],r=g(this,zt)._nodesById,n=g(this,pa);if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return g(this,lt).paths=t,t}set paths(e){V(this,pa,e)}get locations(){var e,t,r;let n=g(this,lt).locations;if(void 0!==n)return n;let i=[],o=null!=(r=null==(t=null==(e=Tt.instances.get(g(this,zt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],r=t.nodes;if(Array.isArray(r))for(let e=0,n=r.length;e<n;++e)if(r[e].id===a){i.push(t);break}}return g(this,lt).locations=i,i}get polygon(){var e,t,r;let n=g(this,lt).polygon;if(void 0!==n)return n;let i,o=null!=(r=null==(t=null==(e=Tt.instances.get(g(this,zt)))?void 0:e.polygonsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e];t.entrances.map((e=>e.id)).includes(a)&&(i=t)}return g(this,lt).polygon=i,i}static hydrate(e,t){return e.map((e=>new gs(t,e)))}static async fetch(e){let t=e.options.things.nodes.slice();e.options.things.maps&&Je(t,"map"),["weight","multiplier","accessible"].forEach((function(e){Je(t,e)}));let r={fields:t,venue:e.options.venue};try{return(await Ye(e.options,"node",r)).map((t=>new gs(e,t)))}catch(e){return te.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=g(this,zt).venue.slug,i=new bi({with_destination_set:r||void 0,venue:n});return Xe.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=g(this,zt).venue.slug;return Xe.addPendingEvent(new _i({venue:r})),super.distanceTo(e,t)}toJSON(){return g(this,Ir)}},da=gs;s(da,"MappedinNode"),zt=new WeakMap,Ir=new WeakMap,lt=new WeakMap,pa=new WeakMap,y();var fa,vs=class{constructor(e){F(this,fa,void 0),m(this,"polygons",[]),V(this,fa,e),Object.assign(this,e)}static hydrate(e){return new vs(e)}static async fetch(e){try{let t=await mc(e.options,"smart-labels/polygon-label-ranking",{venue:e.options.venue},!0);return new vs(t)}catch(e){return te.error("Fetch Rankings:",e),null}}toJSON(){return g(this,fa)}},ha=vs;s(ha,"MappedinRankings"),fa=new WeakMap,y();var ma,bs=class{constructor(e){m(this,"id",""),F(this,ma,void 0),V(this,ma,e),Object.assign(this,e)}static hydrate(e){return e.map((e=>new bs(e)))}static async fetch(e){let t={fields:e.options.things.themes.slice(),venue:e.options.venue};try{return(await Ye(e.options,"apollo-theme",t)).map((e=>new bs(e)))}catch(e){return te.error("Fetch Theme:",e),[]}}toJSON(){return g(this,ma)}},ys=bs;s(ys,"MappedinTheme"),ma=new WeakMap,y();var va,ya,ba,Or,_s=class{constructor(e,t){F(this,va,void 0),F(this,ya,void 0),F(this,ba,void 0),F(this,Or,{}),m(this,"defaultMap",""),m(this,"address",""),m(this,"city",""),m(this,"countrycode",""),m(this,"externalId",""),m(this,"id",""),m(this,"latitude"),m(this,"logo"),m(this,"longitude"),m(this,"name",""),m(this,"operationHours"),m(this,"postal",""),m(this,"slug",""),m(this,"state",""),m(this,"telephone",""),m(this,"tzid",""),m(this,"tzidOverride",""),m(this,"utcOffset",""),m(this,"website",""),V(this,ya,e),V(this,va,t),Object.assign(this,t)}get metadata(){return Xe.addPendingEvent(new Mi({venue:this.slug})),g(this,ba)}set metadata(e){V(this,ba,e)}static hydrate(e,t){return new _s(t,e)}static async fetch(e){let t={fields:e.options.things.venue,slug:e.options.venue,limit:1};try{let r=await Ye(e.options,"venue",t);return new _s(e,r[0])}catch(e){return te.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==g(this,Or).isMultiBuilding){let e=g(this,ya).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),r=e.length!==t.size;g(this,Or).isMultiBuilding=r}return g(this,Or).isMultiBuilding}toJSON(){return g(this,va)}},ga=_s;s(ga,"MappedinVenue"),va=new WeakMap,ya=new WeakMap,ba=new WeakMap,Or=new WeakMap,y();var wa,ws=class{constructor(e){m(this,"id",""),F(this,wa,void 0),m(this,"name"),m(this,"type"),m(this,"weight"),m(this,"multiplier"),V(this,wa,e),Object.assign(this,e)}static hydrate(e){return e.map((e=>new ws(e)))}static async fetch(e){let t=e.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){Je(t,e)}));let r={fields:t,venue:e.options.venue};try{return(await Ye(e.options,"vortex",r)).map((e=>new ws(e)))}catch(e){return te.error("Fetch Vortexes:",e),[]}}toJSON(){return g(this,wa)}},_a=ws;function Sw(e,t){let r=[];return e.features.forEach((e=>{var n,i;let o=[];null==(n=e.properties.spaces)||n.forEach((e=>{if("id"in e){let r;r=t.get(e.id),r&&o.push(...r)}else null==o||o.push({id:e.node,level:""})}));let a=o.map((e=>({node:"n_"+e.id,map:e.level}))),s=null==(i=e.properties.spaces)?void 0:i.filter((e=>"id"in e)),l=(e.properties.hours||[]).map((e=>({...e,"@type":"OpeningHoursSpecification",dayOfWeek:[e.dayOfWeek.replace("http://schema.org/","")]}))),u={...e.properties,polygons:s||[],nodes:a||[],description:e.properties.description||"",logo:e.properties.logo||{},picture:e.properties.picture||{},phone:e.properties.phone||{},social:e.properties.social||{},externalId:e.properties.externalId||"",states:e.properties.states||[],siblingGroups:e.properties.siblingGroups||[],operationHours:l};delete u.spaces,r.push(u)})),r}function jw(e){let t=new Set;return e.features.forEach((e=>{var r;null==(r=e.properties.states)||r.forEach((e=>{t.add(e.type)}))})),Array.from(t).map((e=>({id:e,name:e,value:e})))}function Pw(e){let t=[];return e.features.forEach((e=>{let r={...e.properties,icon:e.properties.picture};delete r.picture,t.push(r)})),t}function Cw(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;return e.features.forEach((e=>{let o;o="MultiPolygon"===e.geometry.type?e.geometry.coordinates[0].flat():e.geometry.coordinates[0],o.forEach((e=>{t=Math.min(t,e[1]),n=Math.max(n,e[1]),r=Math.min(r,e[0]),i=Math.max(i,e[0])}))})),{id:e.features[0].properties.id,minLat:t,minLong:r,maxLat:n,maxLong:i}}function Aw(e,t,r){let n=r.createGeoreferences(),i=[];return e.features.forEach((e=>{let o=new Set;t.forEach((e=>{e.layer&&o.add(e.layer)}));let a=[...o].map((e=>({id:e,visible:!0}))),s=1/r.mapScale,l={...e.properties,georeference:n,shortName:e.properties.abbreviation||"",scene:{polygons:t},scale:s,x_scale:s,group:e.properties.building,layers:a,width:r.widthInMapUnits,height:r.heightInMapUnits};i.push(l)})),i}s(_a,"MappedinVortex"),wa=new WeakMap,y(),s(Sw,"convertLocations"),s(jw,"convertLocationStates"),s(Pw,"convertCategories"),s(Cw,"getMapExtent"),s(Aw,"convertMaps");var vc=class{constructor(e){m(this,"mapExtent"),m(this,"stretchRatio"),m(this,"midLat"),m(this,"midLong"),m(this,"mapUnitRatio",1e6),m(this,"latDistance"),m(this,"longDistance"),m(this,"mapScale"),m(this,"widthInMapUnits"),m(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:r,maxLat:n,maxLong:i}=e,o=(t+n)/2,a=(r+i)/2,s=new me(o,i),l=new me(o,r),u=new me(t,a),c=new me(n,a);this.latDistance=u.distanceTo(c),this.longDistance=s.distanceTo(l);let d=this.latDistance/this.longDistance,h=(n-t)/(i-r);this.stretchRatio=d/h,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-r)*this.mapUnitRatio,this.heightInMapUnits=(n-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1];return{x:(e[0]-this.midLong)*this.mapUnitRatio,y:(this.midLat-t)*this.mapUnitRatio*this.stretchRatio}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:r,maxLong:n}=this.mapExtent;return[[e,t],[e,n],[r,n],[r,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};function Nw(e,t){let r=[];return e.features.forEach((e=>{let n=t.convert(e.geometry.coordinates),i=(e.properties.neighbors||[]).map((t=>({node:t,map:e.properties.level}))),o=e.properties.level,a={...e.properties,x:n.x,y:n.y,paths:i,map:o,externalId:e.properties.externalId||""};r.push(a)})),r}s(vc,"CoordinateConverter"),s(Nw,"convertNodes");var _f=s(((e,t,r,n,i)=>{let o=[];return e.features.forEach((e=>{if(!e.geometry.coordinates[0].forEach)return;let a=[];"entrances"in e.properties&&(a=e.properties.entrances.map((e=>({id:"n_"+e.id,node:"n_"+e.id,map:e.level}))));let s,l=r[e.properties.id],u=t.find((e=>e.id===l)),c=e.geometry.coordinates[0].map((e=>i.convert(e))),d=n.find((t=>t.polygonId===e.properties.id)),h=Math.max(i.widthInMapUnits,i.heightInMapUnits)/1e3;if(d){let e=i.convert([d.position[0],d.position[1]]),t=d.size.x,r=d.size.y,n=i.mapScale,o=r*n,a=t*n/h/d.viewBox.width,l=o/h/d.viewBox.height;s={url:null==u?void 0:u.image,visible:!!(null==u?void 0:u.image),viewBox:d.viewBox,scale:{x:a,y:l},position:{x:e.x,y:e.y},rotation:d.rotation,useLocalScaling:!1,_isAbsolutelyPositioned:!0}}let p={...e.properties,entrances:a,map:e.properties.level,externalId:e.properties.externalId||"",geometry:{visible:!0,position:{x:0,y:0,z:((null==u?void 0:u.altitude)||0)*i.mapScale/h},scale:{x:1,y:1,z:((null==u?void 0:u.height)||1)*i.mapScale/h}},material:{color:(null==u?void 0:u.color)||"#000000"},image:s,vertexes:c};o.push(p)})),o}),"generateMappedinPolygons");function Lw(e,t,r,n,i,o){let a=_f(e,r,n,i,o),s=_f(t,r,n,i,o);return a.concat(s)}function Rw(e){let t=new Map;return e.forEach((e=>{e.features.forEach((e=>{let{destinations:r}=e.properties;if(0===r.length)return;let n=r[0].split("-")[0],i=t.get(n),o=r.map((e=>e.split("-")[1])).map((e=>"n_"+e));if(i)i.nodes.push(...o);else{let{name:r,type:i,weight:a,multiplier:s,accessible:l}=e.properties,u={id:n,nodes:o,name:r,type:i,weight:a,multiplier:s,accessible:l};t.set(n,u)}}))})),Array.from(t.values())}function Dw(e){let t=[];return e.features.forEach((e=>{let r={...e.properties};t.push(r)})),t}function wf(e){let t=Array.from(e.connection.values()),r=Array.from(e.level.values()),n=e.building,i=e.category,o=e.style,a=e.location,s=e.imageInstance,l=e.polygonStyle,u={},c=[],d=new Map;r.forEach((t=>{let r=t.features[0].properties.id,n=Cw(t),i=new vc(n);d.set(r,i);let a=e.obstruction.get(r),h=e.space.get(r),p=s.get(r),f=l.get(r);u[r]=Lw(h,a,o,f,p,i);let g=e.node.get(r);c.push(...Nw(g,i))}));let h=Object.values(u).flat(),p=Rw(t),f=r.map((e=>{let t=e.features[0].properties.id,r=d.get(t);return Aw(e,u[t],r)})).flat(),g=new Map;Array.from(e.space.values()).forEach((e=>{e.features.forEach((e=>{g.set(e.properties.id,e.properties.entrances)}))}));let v=Dw(n),y=Sw(a,g),m=Pw(i),_=jw(a),b=e.manifest.features[0].properties.name,w=e.manifest.features[0].geometry.coordinates[0],M=e.manifest.features[0].geometry.coordinates[1],S=e.imageBinaries;return{locations:y,categories:m,nodes:c,maps:f,polygons:h,vortexes:p,mapGroups:v,locationStates:_,themes:[],venue:{name:b,latitude:M,longitude:w},imageBinaries:S}}s(Lw,"convertPolygons"),s(Rw,"convertVortexes"),s(Dw,"convertMapGroups"),s(wf,"convertMVFToMappedin"),y();var Vf,Uf,ka,Sr,jr,Ma,Pr,Cr,Ar,rr,Ta,Nr,Lr,xa,Rr,qf=xn(Bf()),$w=null==(Uf=null==(Vf=L)?void 0:Vf.env)?void 0:Uf.npm_package_version,_c=["websdk","web","webv2"],wc="websdk",kc=class{constructor(e){var t;F(this,ka,void 0),F(this,Sr,void 0),F(this,jr,void 0),F(this,Ma,void 0),F(this,Pr,void 0),F(this,Cr,void 0),F(this,Ar,void 0),F(this,rr,void 0),F(this,Ta,void 0),F(this,Nr,void 0),F(this,Lr,void 0),F(this,xa,void 0),F(this,Rr,void 0),V(this,rr,e.clientId),V(this,Ta,e.clientSecret),V(this,Nr,e.accessToken),V(this,Ar,e.noAuth||!1);let r="https://api-gateway.mappedin.com/track-analytics/a/";!g(this,Ar)&&g(this,rr)&&!of(g(this,rr))&&(r="https://web-proxy.mappedin.com/a/"),V(this,jr,r),V(this,jr,g(this,jr)+(e.venue+"/")),V(this,Rr,e.venue),V(this,Sr,!1),V(this,ka,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),V(this,Ma,_c.find((t=>t===e.context))||_c[0]),V(this,Pr,ns()),V(this,Cr,rs()),V(this,Lr,new Set),V(this,xa,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=this.getDirections.bind(this)}track(e,t){if(g(this,ka))return;let r={...t,g:g(this,Sr)},n=g(this,jr)+e+"?"+qf.default.stringify(r),i={"mi-context":wc||g(this,Ma),"mi-session":g(this,Cr),"mi-device":g(this,Pr),"mappedin-sdk-version":$w,"mappedin-platform-version":g(this,xa)};g(this,Nr)?i.Authorization=`Bearer ${g(this,Nr)}`:g(this,Ar)||(i.Authorization=`Basic ${btoa(`${g(this,rr)}:${g(this,Ta)}`)}`),er()(n,{method:"GET",mode:"cors",headers:i})}locationSelected(e){let t=e.id||e;Xe.addPendingEvent(new fi({venue:g(this,Rr)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;Xe.addPendingEvent(new hi({venue:g(this,Rr)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,r,n){this.track("load-mapview",{type:e,force:t,benchmark:r||-1,reason:n||"success"})}getDirections(e,t){let r={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",r)}getSessionID(){return g(this,Cr)}getDeviceID(){return g(this,Pr)}setGeolocationMode(e){V(this,Sr,e)}trackBlueDotEvent(e){e&&Object.values(kc.BLUEDOT_EVENT).includes(e)&&!g(this,Lr).has(e)?(this.track(e),g(this,Lr).add(e)):te.warn(`Ignored unsupported blue dot event: "${e}".`)}trackSearch(e){null!=e&&this.track("query-search",e)}trackSearchSuggest(e){null!=e&&this.track("query-suggest",e)}static setContext(e){let t=_c.find((t=>t===e));t&&(wc=t)}static clearContext(){wc=void 0}},ks=kc;s(ks,"Analytics"),ka=new WeakMap,Sr=new WeakMap,jr=new WeakMap,Ma=new WeakMap,Pr=new WeakMap,Cr=new WeakMap,Ar=new WeakMap,rr=new WeakMap,Ta=new WeakMap,Nr=new WeakMap,Lr=new WeakMap,xa=new WeakMap,Rr=new WeakMap,m(ks,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var yn,Ms=ks,Gf={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",things:{},venue:""};!function(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"}(yn||(yn={}));var Rn,zr,Dr={categories:nr,locations:vn,vortexes:_a,maps:aa,nodes:da,polygons:tr,venue:ga,events:Ji,mapGroups:la,themes:ys,locationStates:cs,rankings:ha},Ln=class{constructor(e){m(this,"perspective"),m(this,"things"),m(this,"options"),F(this,Rn,void 0),F(this,zr,""),m(this,"updatedAt"),m(this,"categories",[]),m(this,"locations",[]),m(this,"vortexes",[]),m(this,"maps",[]),m(this,"nodes",[]),m(this,"polygons",[]),m(this,"venue",{}),m(this,"events",[]),m(this,"mapGroups",[]),m(this,"themes",[]),m(this,"locationStates",[]),m(this,"rankings"),m(this,"_categoriesById"),m(this,"_locationsById"),m(this,"_vortexesById"),m(this,"_mapsById"),m(this,"_nodesById"),m(this,"_polygonsById"),m(this,"_eventsById"),m(this,"_mapGroupsById"),m(this,"_locationStatesById"),m(this,"_locationRankingsById"),m(this,"_rankingsById"),m(this,"_categoriesByExternalId"),m(this,"_locationsByExternalId"),m(this,"_vortexesByExternalId"),m(this,"_mapsByExternalId"),m(this,"_nodesByExternalId"),m(this,"_polygonsByExternalId"),m(this,"_eventsByExternalId"),m(this,"_mapGroupsByExternalId"),m(this,"_locationStatesByExternalId"),m(this,"_locationRankingsByExternalId"),m(this,"_rankingsByExternalId"),m(this,"images"),m(this,"imageBinaries"),m(this,"scenes"),m(this,"analytics"),m(this,"navigator"),this.options=e,V(this,Rn,Tt.create(this));let t=new Ms({...e,testMode:!(null==e?void 0:e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Bs,"true")}})}generateGetters(e){try{for(let t=0,r=e.length;t<r;++t){let r=e[t];Array.isArray(this[r])&&(Object.defineProperty(this,`_${r}ByExternalId`,{get(){let e=g(this,Rn)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.externalId]=e)),g(this,Rn)[r]=t,t}}),Object.defineProperty(this,`_${r}ById`,{get(){let e=g(this,Rn)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.id]=e)),g(this,Rn)[r]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let r=`_${e}ByExternalId`,n=this[`_${e}ById`];return null!=n&&null!=n[t]||(n=this[r],null!=n&&null!=n[t])?n[t]:null}async hydrateFromMVF(e){let t=wf(e);return this.hydrate(t)}async hydrate(e,t){let r;if("string"==typeof e)try{V(this,zr,e),r=JSON.parse(e)}catch(e){return void te.error("Unable to parse JSON",e)}else r=e,V(this,zr,JSON.stringify(r));let n=Object.keys(r);for(let e=0,t=n.length;e<t;++e){let t=n[e],i=r[t];null!=Dr[t]&&"function"==typeof Dr[t].hydrate&&(this[t]=Dr[t].hydrate(i,this))}t&&await vf(r);let{images:i,scenes:o,imageBinaries:a}=r;this.images=i,this.scenes=o,this.imageBinaries=a,this.generateGetters(n),this.initNavigator()}async fetch(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),hf(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:e}=this.options,t=[],r=Object.keys(e);for(let e=0,n=r.length;e<n;++e){let n=r[e];Dr[n]&&t.push(Dr[n].fetch(this).then((e=>(this[n]=e,Promise.resolve()))))}return this.generateGetters(r),Promise.all(t).then((()=>{this.initNavigator()}))}initNavigator(){this.navigator=new Ws({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()))})}toJSON(){var e;let t={};for(let e in Dr)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let r={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(r.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete r.locationRankings,r}toString(){return g(this,zr)||JSON.stringify(this.toJSON())}};s(Ln,"Mappedin"),Rn=new WeakMap,zr=new WeakMap,y();var Wf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent"],categories:["name","color","sortOrder","parents"],maps:["name","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};y();var ir=xn(Hf());y();var Kw=["0","1","2","3","4","5","6","7","8","9"],Xw=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],Yw=["0","1","2","3","4","5","6","7","8","9"],Jw=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],qx=[...Kw,...Xw,...Yw,...Jw],$f=["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 Zw=32,wt=!1,Qw=120,xc=0,Ts=class{constructor(e){m(this,"_callback"),m(this,"_frameCount"),m(this,"_ordering"),m(this,"_supersededBy"),m(this,"name"),m(this,"_remainingFrameCount"),m(this,"_lastFrameTime"),m(this,"userdata"),this._callback=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,wt&&te.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(Ts,"FrameUpdate");var _n=class{constructor(e){if(m(this,"_postponed"),m(this,"userdata"),m(this,"_priority"),m(this,"_group"),m(this,"name"),m(this,"_lastFrameTime"),m(this,"_callback"),m(this,"_complete"),m(this,"_scheduled"),m(this,"_cancelled"),null!=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,wt&&te.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(_n,"FrameTask");var xs=class{constructor(e){m(this,"_postponed"),m(this,"_onComplete"),m(this,"_priority"),m(this,"userdata"),m(this,"name"),m(this,"_tasks"),m(this,"_scheduledTasks"),m(this,"_scheduled"),m(this,"_cancelled"),this._onComplete=null!=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,wt&&te.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(xs,"FrameTaskGroup");var Ec=class{constructor(e){m(this,"_maxMillisecondsPerFrame"),m(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:Zw,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(Ec,"RealTimeTimer");var Es=class{constructor(e){var t;m(this,"_raf"),m(this,"_timer"),m(this,"_performance"),m(this,"_scheduledUpdatesByOrdering"),m(this,"_scheduledTasksByPriority"),m(this,"_postponedTasks"),m(this,"_requestAnimationFrameHandle"),m(this,"_updatesToRunThisFrame"),m(this,"_lastFrameTime",0),m(this,"_updatesRunLastFrame"),this._timer=null!=(null==e?void 0:e.timer)?e.timer:new Ec,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new Fr,this._scheduledTasksByPriority=new Fr,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),wt&&te.log("task scheduler instantiated"),(null==(t=globalThis.MappedinDebug)?void 0: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 Fr,this._scheduledTasksByPriority=new Fr,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),wt&&te.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){let t;this._timer.beginFrame(),this._performance&&(t=performance.now());let r=!1;wt&&(0===xc&&(r=!0),++xc,xc%=Qw);let n=this._scheduledUpdatesByOrdering.keys();for(let e=n.length-1;e>=0;--e){let t=n[e];for(let e of this._scheduledUpdatesByOrdering.get(t).values())this._updatesToRunThisFrame.push(e),r&&te.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&&te.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&&te.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()-t),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(e){let t,r=this._scheduledTasksByPriority.popFromMaxKey(),n=null;te.assert(void 0!==r),Object.getPrototypeOf(r)===xs.prototype&&(n=r,r=n._popTask()),te.assert(void 0!==r),te.assert(Object.getPrototypeOf(r)===_n.prototype),this._performance&&(t=performance.now()),r._callback(e),r._complete=!0,this._performance&&(r._lastFrameTime=performance.now()-t),wt&&te.log("task completed",r.name),null!=n&&(n.isComplete()?(n.clear(),n._onComplete(),wt&&te.log("group completed",n.name)):this._scheduledTasksByPriority.insert(n._priority,n))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===xs)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,wt&&te.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),wt&&te.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)===_n.prototype?e._cancelled=!0:"clear"in e&&e.clear(),wt&&te.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)===_n.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)===_n.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,wt&&te.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)===_n.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)===_n.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),wt&&te.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===_n.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,wt&&te.log("task priority changed",e.name,t)}};s(Es,"TaskScheduler");var Fr=class{constructor(){m(this,"_map"),m(this,"_size"),m(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(te.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,r={[Symbol.iterator]:()=>r,next:()=>{if(null==t){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values()}let r=t.next();for(;r.done;){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values(),r=t.next()}return r}};return r}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return te.assert(e===this._size),e}};s(Fr,"Multimap");var Dn,Ft,zn,rn,Ze,Ia,Oa,qr,Sa,Vr,kn,Is,Os,Fn,ja,Ss,js,Ps,pk,Pa,Ca,Aa,Ic,wn=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),Br="",ek=.09,tk=1,nk=.025,rk=.5,ik=5e-4,ak=5e-4,ok=.01,sk=.05,Kf=1,lk=.01,uk=.2,ck={MappedinCategory:"categories",MappedinLocation:"locations"},dk={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:$f,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===L.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:ek,PRIMARY_INDEX_WEIGHT:tk,SECONDARY_INDEX_WEIGHT:nk,CATEGORY_NAME_WEIGHT:rk,LOCATION_NAME_WEIGHT:Kf,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:ik,CATEGORY_LOCATION_TAGS_WEIGHT:ak,CATEGORY_LOCATION_NAME_WEIGHT:ok,PRIMARY_INDEX_TAGS_NAME_WEIGHT:sk,LOCATION_DEFAULT_RANK:Kf,RATIO_OF_FUZZY_TO_EXACT:lk,RATIO_OF_PREFIX_TO_EXACT:uk}},Ea=class{constructor(e,t){var r,n,i;F(this,Ps),F(this,Dn,void 0),F(this,Ft,void 0),F(this,zn,void 0),F(this,rn,void 0),F(this,Ze,void 0),F(this,Ia,new Es({performance:!0})),F(this,Oa,void 0),F(this,qr,void 0),F(this,Sa,new Map),F(this,Vr,0),F(this,kn,s((e=>{Ds(this,Vr)._++,g(this,Ia).scheduleUpdate(new Ts({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),Ds(this,Vr)._--,0===g(this,Vr)&&g(this,ja).call(this)}}))}),"#addTask")),F(this,Is,s((e=>{var t,r,n;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=g(this,Ze).constants,s=o;(null==(t=g(this,Ze))?void 0:t.useLocationRank)&&(s=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,r;return(null==(t=e.rank)?void 0:t.score)?null==(r=e.rank)?void 0:r.score:o})),o):o),g(this,kn).call(this,(()=>{g(this,Ft).add({name:wn(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:s})})),(null==(r=g(this,Ze))?void 0:r.searchTags)&&Array.isArray(e.tags)&&e.tags.forEach((t=>{g(this,Ft).add({name:"",tag:wn(t),id:"MappedinLocation_"+e.id,weight:a,rank:s})})),(null==(n=g(this,Ze))?void 0:n.searchDescriptions)&&g(this,kn).call(this,(()=>g(this,zn).add({description:wn(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:s})))}),"#processLocation")),F(this,Os,s((e=>{var t,r;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:n,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=g(this,Ze).constants;g(this,kn).call(this,(()=>g(this,Ft).add({name:wn(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:a})));let s=e.locations.reduce(((e,t)=>e+` ${Br} `+t.name),"")+` ${Br}`;if((null==(t=g(this,Ze))?void 0:t.searchDescriptionsInCategories)&&e.locations.forEach((t=>{null!=t.description&&g(this,kn).call(this,(()=>g(this,rn).add({id:"MappedinCategory_"+e.id,"category.locations.description":wn(t.description),ref:t.name,weight:n})))})),null==(r=g(this,Ze))?void 0:r.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var r;return e+(null==(r=t.tags)?void 0:r.reduce(((e,t)=>e+` ${Br} `+t),""))+` ${Br}`}),"");g(this,kn).call(this,(()=>g(this,rn).add({"category.locations.tags":wn(t),id:"MappedinCategory_"+e.id,weight:i})))}g(this,kn).call(this,(()=>g(this,rn).add({"category.locations.name":wn(s),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),F(this,Fn,void 0),F(this,ja,void 0),F(this,Ss,s((e=>{var t;let r=e.score,{object:n,id:i,weight:o,rank:a}=e,[s,l]=i.split("_"),u=n||g(this,Dn).getCollectionItemById(ck[s],l);return a&&(null==(t=g(this,Ze))?void 0:t.useLocationRank)&&(r+=a),o&&(r*=o),{score:r,type:s,object:u}}),"#processSearchResult")),F(this,js,s(((e,t)=>{for(let r in e.match)e.match[r].forEach((n=>{let i=e.ref||e[n]||t.object[n];if("category.locations.tags"===n||"category.locations.name"===n){let t=new RegExp(`[^${Br}]* `+r+` [^${Br}]*`,"ig").exec(e[n]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:r,weight:e.weight,matchesOn:n,value:i})}))}),"#addMatches")),F(this,Pa,void 0),F(this,Ca,void 0),F(this,Aa,void 0),V(this,qr,new Ms({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),V(this,Ze,{...dk,...t}),V(this,Dn,e),V(this,Oa,new Set(null==(r=g(this,Ze))?void 0:r.stopWords));let o=g(this,Dn).venue.slug,{PRIMARY_INDEX_FUZZYNESS:a,PRIMARY_INDEX_WEIGHT:l,CATEGORY_NAME_WEIGHT:u,RATIO_OF_FUZZY_TO_EXACT:c,RATIO_OF_PREFIX_TO_EXACT:d,PRIMARY_INDEX_TAGS_NAME_WEIGHT:h}=g(this,Ze).constants,p=["object","query","weight","tag","rank"],f={fields:["query","name","tag"],storeFields:p,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:a},boost:{name:l,query:l,tag:h},weights:{fuzzy:c,prefix:d},boostDocument:e=>e.includes("MappedinLocation")?l:e.includes("MappedinCategory")?u:l},v={fields:["description"],storeFields:p,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var r;return(null==(r=g(this,Oa))?void 0:r.has(e.toLowerCase()))?null:e.toLowerCase()}},y={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...p,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(V(this,Fn,new Promise((e=>{V(this,ja,e)}))),null==(n=g(this,Ze))?void 0:n.jsonIndex){let{primary:e,secondary:t,extra:r}=JSON.parse(null==(i=g(this,Ze))?void 0:i.jsonIndex);V(this,Ft,ir.default.loadJS(e,f)),V(this,zn,ir.default.loadJS(t,v)),V(this,rn,ir.default.loadJS(r,y))}else V(this,Ft,new ir.default(f)),V(this,zn,new ir.default(v)),V(this,rn,new ir.default(y)),g(this,Dn).locations.forEach(g(this,Is)),g(this,Dn).categories.forEach(g(this,Os));g(this,Ia).update(performance.now()),V(this,Pa,ss(((e,t)=>{g(this,qr).trackSearchSuggest({query:e,hits:t}),Xe.addPendingEvent(new Ii({venue:o}))}),300)),V(this,Ca,ss(((e,t)=>{g(this,qr).trackSearch({query:e,hits:t}),Xe.addPendingEvent(new Ei({venue:o}))}),300)),V(this,Aa,ss((()=>{Xe.addPendingEvent(new Ti({venue:o}))}),300)),Xe.addPendingEvent(new xi({search_descriptions:g(this,Ze).searchDescriptions,search_tags:g(this,Ze).searchTags,search_descriptions_in_categories:g(this,Ze).searchDescriptionsInCategories,search_tags_in_categories:g(this,Ze).searchTagsInCategories,use_location_rank:g(this,Ze).useLocationRank,venue:o}))}async suggest(e){await g(this,Fn);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:r,PRIMARY_INDEX_TAGS_NAME_WEIGHT:n,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=g(this,Ze).constants,a=g(this,Ft).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:r,query:r,tag:n},weights:{fuzzy:i,prefix:o}});return g(this,Pa).call(this,e,a.length),{total:a.length,hits:a.map((e=>({text:e.suggestion})))}}async search(e){await g(this,Fn);let t=ut(this,Ps,pk).call(this,e);return g(this,Ca).call(this,e,t.length),t}async toJSON(){return await g(this,Fn),JSON.stringify({primary:g(this,Ft),secondary:g(this,zn),extra:g(this,rn)})}async addQuery(e){let t,r,{query:n,object:i,weight:o=1}=e;await g(this,Fn),t=i instanceof vn?"MappedinLocation":i instanceof nr?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?r=t+"_"+i.id:"string"==typeof i.id?r="Custom_"+i.id:(r=g(this,Sa).get(i),r||(r="Custom_"+mn(),g(this,Sa).set(i,r))),g(this,Ft).add({id:r,weight:o,object:i,query:wn(n)}),g(this,Aa).call(this)}};s(Ea,"OfflineSearch"),Dn=new WeakMap,Ft=new WeakMap,zn=new WeakMap,rn=new WeakMap,Ze=new WeakMap,Ia=new WeakMap,Oa=new WeakMap,qr=new WeakMap,Sa=new WeakMap,Vr=new WeakMap,kn=new WeakMap,Is=new WeakMap,Os=new WeakMap,Fn=new WeakMap,ja=new WeakMap,Ss=new WeakMap,js=new WeakMap,Ps=new WeakSet,pk=s((function(e){let t=[],r=wn(e);t=[...g(this,Ft).search(r),...g(this,zn).search(r),...g(this,rn).search(r)].sort(((e,t)=>t.score-e.score));let n={};for(let e of t){let t=g(this,Ss).call(this,e);n[e.id]?n[e.id].score+=t.score:n[e.id]={...t,matches:[]},g(this,js).call(this,e,n[e.id])}return Object.keys(n).map((e=>({...n[e],matches:n[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),Pa=new WeakMap,Ca=new WeakMap,Aa=new WeakMap,y(),function(e){e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY"}(Ic||(Ic={}));var Yf=globalThis.fetch;function er(){if(null==Yf)throw new Error("fetch is not available in your environment. Pass your own function into `setFetch` (node-fetch, etc)");return Yf}s(er,"isomorphicFetch");var Zf,Qf,hk=null==(Qf=null==(Zf=L)?void 0:Zf.env)?void 0:Qf.npm_package_version;globalThis.btoa||(globalThis.btoa=Xf.encode);var fk=["ar"];function Oc(e){let t={...Gf,things:Wf,...e};return t.headers={...t.headers,"mappedin-sdk-version":hk},e.platformString&&(t.headers={...t.headers,"mappedin-platform-version":e.platformString}),t.noAuth||(t.accessToken?t.authorization=`Bearer ${t.accessToken}`:t.clientId&&t.clientSecret&&(t.authorization=`Basic ${globalThis.btoa(`${t.clientId}:${t.clientSecret}`)}`)),t}async function Sc(e){let t=Oc({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,...e}}),r="public/1/"+(t.useDraftData?"draft/":""),n=new Ln({...t,baseUrl:t.baseUrl+r});return await n.fetch(),Xe.addPendingEvent(new mi({venue:t.venue})),n}s(Oc,"parseOptions"),s(Sc,"getVenue");var Jf={shouldPopulateBundledImagesAsBlobs:!(void 0!==globalThis.navigator&&"ReactNative"==globalThis.navigator.product)};async function jc(e){let t=Oc({baseUrl:"https://api-gateway.mappedin.com/",...Jf,...e}),{url:r,updated_at:n}=await mk(e),i=await er()(r,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error(`Unrecognized format ${a}`);let s=new Ln(t);return await s.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),s.updatedAt=n,s}async function mk(e){let t=Oc({baseUrl:"https://api-gateway.mappedin.com/",...Jf,...e}),{version:r,venue:n}=e,i=`${e.bundleBaseUri||t.baseUrl+`exports/legacy${null!=t.language&&fk.includes(t.language)?"-"+t.language:""}/1/bundle`}?venue=${n}&version=1.0.0`;return t.language=void 0,await gc(t,i)}s(jc,"getVenueBundle"),s(mk,"getVenueBundleURL");var gk=!1;function vk(e){e.things=e.things||{},e.things.venue=e.things.venue||[],e.things.venue.push("slug","defaultMap"),e.things.nodes=e.things.nodes||[],e.things.nodes.push("x","y","paths","map"),e.things.polygons=e.things.polygons||[],e.things.locations=e.things.locations||[],e.things.locations.push("sortOrder","parent","showLabelWhenImagePresent","hidden"),e.things.maps=e.things.maps||[],e.things.maps.push("height","width","georeference"),e.perspective=e.perspective3D||e.perspective||void 0,e.things.maps.push("scene","layers"),e.things.polygons.push("canvasBounds","map","image","perspectives","material","holes","label","geometry"),gk&&e.things.polygons.push("layer","geometry","vertexes")}s(vk,"parseOptions");var yk=s((function(e){return null==e.mapView&&(e.mapView={}),new Promise((function(t,r){function n(n,i){if(n)r(n);else{let n={};try{e.firstMapSelector&&(e.mapView=e.mapView||{},e.mapView.firstMap=e.firstMapSelector(i))}catch(e){te.error("Failure in firstMapSelector! Loading default map instead."),te.error(e),r(e)}n.venue=i,t(n)}}s(n,"handleInit"),vk(e.venue),e.venue.useVenueBundle?jc(e.venue).then((e=>n(null,e))).catch((e=>n(e,null))):Sc(e.venue).then((e=>n(null,e))).catch((e=>n(e,null)))}))}),"initialize");
|
|
1
|
+
var pm,L,rm=Object.create,or=Object.defineProperty,im=Object.getOwnPropertyDescriptor,am=Object.getOwnPropertyNames,om=Object.getPrototypeOf,sm=Object.prototype.hasOwnProperty,lm=(e,t,r)=>t in e?or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cc=e=>or(e,"__esModule",{value:!0}),s=(e,t)=>or(e,"name",{value:t,configurable:!0}),um=(e,t)=>()=>(e&&(t=e(e=0)),t),se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cm=(e,t)=>{for(var r in Cc(e),t)or(e,r,{get:t[r],enumerable:!0})},dm=(e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of am(t))!sm.call(e,n)&&"default"!==n&&or(e,n,{get:()=>t[n],enumerable:!(r=im(t,n))||r.enumerable});return e},xn=e=>dm(Cc(or(null!=e?rm(om(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),m=(e,t,r)=>(lm(e,"symbol"!=typeof t?t+"":t,r),r),Rs=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},g=(e,t,r)=>(Rs(e,t,"read from private field"),r?r.call(e):t.get(e)),F=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},V=(e,t,r,n)=>(Rs(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ds=(e,t,r,n)=>({set _(n){V(e,t,n,r)},get _(){return g(e,t,n)}}),ut=(e,t,r)=>(Rs(e,t,"access private method"),r),y=um((()=>{L={env:pm={NODE_ENV:"production",npm_package_version:"5.2.2"}}})),Nc=se(((e,t)=>{y(),function(r){var n="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==n&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(r=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,d=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 r,n,i=0,o="",a=-1;++a<t;)n=u.indexOf(e.charAt(a)),r=i%4?64*r+n:n,i++%4&&(o+=String.fromCharCode(255&r>>(-2*i&6)));return o}),"decode"),h={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,r,n,i,o=e.length%3,a="",s=-1,c=e.length-o;++s<c;)t=e.charCodeAt(s)<<16,r=e.charCodeAt(++s)<<8,n=e.charCodeAt(++s),a+=u.charAt((i=t+r+n)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(s)<<8,r=e.charCodeAt(++s),a+=u.charAt((i=t+r)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(s),a+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),a}),"encode"),decode:d,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(n&&!n.nodeType)if(i)i.exports=h;else for(var p in h)h.hasOwnProperty(p)&&(n[p]=h[p]);else r.base64=h}(e)})),Lc=se(((e,t)=>{var r,n;y(),r="undefined"!=typeof self?self:e,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return s(r,"r"),r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t),r.d(t,"computeDestinationPoint",(function(){return F})),r.d(t,"convertArea",(function(){return R})),r.d(t,"convertDistance",(function(){return L})),r.d(t,"convertSpeed",(function(){return D})),r.d(t,"decimalToSexagesimal",(function(){return z})),r.d(t,"findNearest",(function(){return $})),r.d(t,"getAreaOfPolygon",(function(){return H})),r.d(t,"getBounds",(function(){return K})),r.d(t,"getBoundsOfDistance",(function(){return X})),r.d(t,"getCenter",(function(){return Z})),r.d(t,"getCenterOfBounds",(function(){return J})),r.d(t,"getCompassDirection",(function(){return Q})),r.d(t,"getCoordinateKey",(function(){return v})),r.d(t,"getCoordinateKeys",(function(){return S})),r.d(t,"getDistance",(function(){return G})),r.d(t,"getDistanceFromLine",(function(){return ee})),r.d(t,"getGreatCircleBearing",(function(){return te})),r.d(t,"getLatitude",(function(){return A})),r.d(t,"getLongitude",(function(){return P})),r.d(t,"getPathLength",(function(){return ne})),r.d(t,"getPreciseDistance",(function(){return ie})),r.d(t,"getRhumbLineBearing",(function(){return Y})),r.d(t,"getRoughCompassDirection",(function(){return oe})),r.d(t,"getSpeed",(function(){return ae})),r.d(t,"isDecimal",(function(){return y})),r.d(t,"isPointInLine",(function(){return se})),r.d(t,"isPointInPolygon",(function(){return le})),r.d(t,"isPointNearLine",(function(){return ue})),r.d(t,"isPointWithinRadius",(function(){return ce})),r.d(t,"isSexagesimal",(function(){return m})),r.d(t,"isValidCoordinate",(function(){return k})),r.d(t,"isValidLatitude",(function(){return I})),r.d(t,"isValidLongitude",(function(){return E})),r.d(t,"orderByDistance",(function(){return q})),r.d(t,"sexagesimalToDecimal",(function(){return _})),r.d(t,"toDecimal",(function(){return C})),r.d(t,"toRad",(function(){return j})),r.d(t,"toDeg",(function(){return N})),r.d(t,"wktToPolygon",(function(){return pe})),r.d(t,"sexagesimalPattern",(function(){return n})),r.d(t,"earthRadius",(function(){return i})),r.d(t,"MINLAT",(function(){return o})),r.d(t,"MAXLAT",(function(){return a})),r.d(t,"MINLON",(function(){return l})),r.d(t,"MAXLON",(function(){return u})),r.d(t,"longitudeKeys",(function(){return c})),r.d(t,"latitudeKeys",(function(){return d})),r.d(t,"altitudeKeys",(function(){return h})),r.d(t,"distanceConversion",(function(){return p})),r.d(t,"timeConversion",(function(){return f})),r.d(t,"areaConversion",(function(){return g}));var n=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/,i=6378137,o=-90,a=90,l=-180,u=180,c=["lng","lon","longitude",0],d=["lat","latitude",1],h=["alt","altitude","elevation","elev",2],p={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},f={m:60,h:3600,d:86400},g={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};g.sqm=g.m2,g.sqkm=g.km2,g.sqft=g.ft2,g.sqyd=g.yd2,g.sqin=g.in2;var v=s((function(e,t){return t.reduce((function(t,r){if(null==e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,r)&&void 0!==r&&void 0===t?(t=r,r):t}),void 0)}),"m"),y=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"v"),m=s((function(e){return n.test(e.toString().trim())}),"p"),_=s((function(e){var t=new RegExp(n).exec(e);if(null==t)throw new Error("Given value is not in sexagesimal format");var r=Number(t[2])/60||0,i=Number(t[4])/3600||0,o=parseFloat(t[1])+r+i;return["S","W"].includes(t[7])?-o:o}),"y");function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(b,"b"),s(w,"M"),s(M,"O");var S=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:d,altitude:h},r=v(e,t.longitude),n=v(e,t.latitude),i=v(e,t.altitude);return w({latitude:n,longitude:r},i?{altitude:i}:{})}),"S"),I=s((function e(t){return y(t)?!(parseFloat(t)>a||t<o):!!m(t)&&e(_(t))}),"t"),E=s((function e(t){return y(t)?!(parseFloat(t)>u||t<l):!!m(t)&&e(_(t))}),"t"),k=s((function(e){var t=S(e),r=t.latitude,n=t.longitude;if(Array.isArray(e)&&e.length>=2)return E(e[0])&&I(e[1]);if(void 0===r||void 0===n)return!1;var i=e[n],o=e[r];return void 0!==o&&void 0!==i&&!1!==I(o)&&!1!==E(i)}),"j");function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(O,"w"),s(T,"x"),s(x,"E");var C=s((function e(t){if(y(t))return Number(t);if(m(t))return _(t);if(k(t)){var r=S(t);return Array.isArray(t)?t.map((function(t,r){return[0,1].includes(r)?e(t):t})):T(T(T({},t),r.latitude&&x({},r.latitude,e(t[r.latitude]))),r.longitude&&x({},r.longitude,e(t[r.longitude])))}return Array.isArray(t)?t.map((function(t){return k(t)?e(t):t})):t}),"t"),A=s((function(e,t){var r=v(e,d);if(null!=r){var n=e[r];return!0===t?n:C(n)}}),"A"),P=s((function(e,t){var r=v(e,c);if(null!=r){var n=e[r];return!0===t?n:C(n)}}),"I"),j=s((function(e){return e*Math.PI/180}),"W"),N=s((function(e){return 180*e/Math.PI}),"D"),F=s((function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=A(e),o=P(e),a=t/n,s=j(r),c=j(i),d=j(o),h=Math.asin(Math.sin(c)*Math.cos(a)+Math.cos(c)*Math.sin(a)*Math.cos(s)),p=d+Math.atan2(Math.sin(s)*Math.sin(a)*Math.cos(c),Math.cos(a)-Math.sin(c)*Math.sin(h)),f=N(p);return(f<l||f>u)&&(p=(p+3*Math.PI)%(2*Math.PI)-Math.PI,f=N(p)),{latitude:N(h),longitude:f}}),"F"),R=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=g[t];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"C"),L=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=p[t];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"k"),D=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(t){case"kmh":return e*f.h*p.km;case"mph":return e*f.h*p.mi;default:return e}}),"T");function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(B,"q"),s(U,"$");var V=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"B"),z=s((function(e){var t=B(e.toString().split("."),2),r=t[0],n=t[1],i=Math.abs(Number(r)),o=V(60*Number("0."+(n||0))),a=Math.floor(o),s=V(60*(o%a||0));return i+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(s.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"R"),W=s((function(e){return e>1?1:e<-1?-1:e}),"X"),G=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n=A(e),o=P(e),a=A(t),s=P(t),l=Math.acos(W(Math.sin(j(a))*Math.sin(j(n))+Math.cos(j(a))*Math.cos(j(n))*Math.cos(j(o)-j(s))))*i;return Math.round(l/r)*r}),"_"),q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G;return r="function"==typeof r?r:G,t.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"K"),$=s((function(e,t){return q(e,t)[0]}),"Y"),H=s((function(e){var t=0;if(e.length>2){for(var r,n,o,a=0;a<e.length;a++){a===e.length-2?(r=e.length-2,n=e.length-1,o=0):a===e.length-1?(r=e.length-1,n=0,o=1):(r=a,n=a+1,o=a+2);var s=P(e[r]),l=A(e[n]),u=P(e[o]);t+=(j(u)-j(s))*Math.sin(j(l))}t=t*i*i/2}return Math.abs(t)}),"Z"),K=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,t){var r=A(t),n=P(t);return{maxLat:Math.max(r,e.maxLat),minLat:Math.min(r,e.minLat),maxLng:Math.max(n,e.maxLng),minLng:Math.min(n,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),X=s((function(e,t){var r,n,s=A(e),c=P(e),d=j(s),h=j(c),p=t/i,f=d-p,g=d+p,v=j(a),y=j(o),m=j(u),_=j(l);if(f>y&&g<v){var b=Math.asin(Math.sin(p)/Math.cos(d));(r=h-b)<_&&(r+=2*Math.PI),(n=h+b)>m&&(n-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),r=_,n=m;return[{latitude:N(f),longitude:N(r)},{latitude:N(g),longitude:N(n)}]}),"V"),Z=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var t=e.length,r=e.reduce((function(e,t){var r=j(A(t)),n=j(P(t));return{X:e.X+Math.cos(r)*Math.cos(n),Y:e.Y+Math.cos(r)*Math.sin(n),Z:e.Z+Math.sin(r)}}),{X:0,Y:0,Z:0}),n=r.X/t,i=r.Y/t,o=r.Z/t;return{longitude:N(Math.atan2(i,n)),latitude:N(Math.atan2(o,Math.sqrt(n*n+i*i)))}}),"U"),J=s((function(e){var t=K(e),r=t.minLat+(t.maxLat-t.minLat)/2,n=t.minLng+(t.maxLng-t.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(n.toFixed(6))}}),"z"),Y=s((function(e,t){var r=j(P(t))-j(P(e)),n=Math.log(Math.tan(j(A(t))/2+Math.PI/4)/Math.tan(j(A(e))/2+Math.PI/4));return Math.abs(r)>Math.PI&&(r=r>0?-1*(2*Math.PI-r):2*Math.PI+r),(N(Math.atan2(r,n))+360)%360}),"H"),Q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Y,n="function"==typeof r?r(e,t):Y(e,t);if(isNaN(n))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(n/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"}}),"J"),ee=s((function(e,t,r){var n=G(t,e),i=G(e,r),o=G(t,r),a=Math.acos(W((n*n+o*o-i*i)/(2*n*o))),s=Math.acos(W((i*i+o*o-n*n)/(2*i*o)));return a>Math.PI/2?n:s>Math.PI/2?i:Math.sin(a)*n}),"Q"),te=s((function(e,t){var r=A(t),n=P(t),i=A(e),o=P(e);return(N(Math.atan2(Math.sin(j(n)-j(o))*Math.cos(j(r)),Math.cos(j(i))*Math.sin(j(r))-Math.sin(j(i))*Math.cos(j(r))*Math.cos(j(n)-j(o))))+360)%360}),"tt");function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}s(re,"nt");var ne=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G;return e.reduce((function(e,r){return"object"===re(e)&&null!==e.last&&(e.distance+=t(r,e.last)),e.last=r,e}),{last:null,distance:0}).distance}),"rt"),ie=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n,o,a,s,l,u,c,d=A(e),h=P(e),p=A(t),f=P(t),g=6356752.314245,v=1/298.257223563,y=j(f-h),m=Math.atan((1-v)*Math.tan(j(parseFloat(d)))),_=Math.atan((1-v)*Math.tan(j(parseFloat(p)))),b=Math.sin(m),w=Math.cos(m),M=Math.sin(_),S=Math.cos(_),I=y,E=100;do{var k=Math.sin(I),O=Math.cos(I);if(0===(u=Math.sqrt(S*k*(S*k)+(w*M-b*S*O)*(w*M-b*S*O))))return 0;n=b*M+w*S*O,o=Math.atan2(u,n),l=n-2*b*M/(s=1-(a=w*S*k/u)*a),isNaN(l)&&(l=0);var T=v/16*s*(4+v*(4-3*s));c=I,I=y+(1-T)*v*a*(o+T*u*(l+T*n*(2*l*l-1)))}while(Math.abs(I-c)>1e-12&&--E>0);if(0===E)return NaN;var x=s*(i*i-g*g)/(g*g),C=1+x/16384*(4096+x*(x*(320-175*x)-768)),N=x/1024*(256+x*(x*(74-47*x)-128)),F=N*u*(l+N/4*(n*(2*l*l-1)-N/6*l*(4*u*u-3)*(4*l*l-3))),R=g*C*(o-F);return Math.round(R/r)*r}),"et"),oe=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}),"it"),ae=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G,n=r(e,t),i=Number(t.time)-Number(e.time),o=n/i*1e3;return o}),"ot"),se=s((function(e,t,r){return G(t,e)+G(e,r)===G(t,r)}),"ut"),le=s((function(e,t){for(var r=!1,n=t.length,i=-1,o=n-1;++i<n;o=i)(P(t[i])<=P(e)&&P(e)<P(t[o])||P(t[o])<=P(e)&&P(e)<P(t[i]))&&A(e)<(A(t[o])-A(t[i]))*(P(e)-P(t[i]))/(P(t[o])-P(t[i]))+A(t[i])&&(r=!r);return r}),"at"),ue=s((function(e,t,r,n){return ee(e,t,r)<n}),"ct"),ce=s((function(e,t,r){return G(e,t)<r}),"ft");function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return he(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(de,"st"),s(he,"lt");var pe=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 t=de(e.split(" "),2),r=t[0],n=t[1];return{longitude:parseFloat(r),latitude:parseFloat(n)}}))}),"dt")}])},"object"==typeof e&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof e?e.geolib=n():r.geolib=n()})),sn=se(((e,t)=>{var r,n,i,o,a,l,u,c,d,h,p,f,g,v,m,_,b,w,M,S,I,E,k,O,T;y(),function(e){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function n(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(r,n){return e[r]=t?t(r,n):n}}"function"==typeof define&&define.amd?define("tslib",["exports"],(function(t){e(n(r,n(t)))})):"object"==typeof t&&"object"==typeof t.exports?e(n(r,n(t.exports))):e(n(r)),s(n,"createExporter")}((function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])};r=s((function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),s(n,"__"),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),"__extends"),n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=s((function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),"__rest"),o=s((function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}),"__decorate"),a=s((function(e,t){return function(r,n){t(r,n,e)}}),"__param"),l=s((function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}),"__metadata"),u=s((function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}),"__awaiter"),c=s((function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}),"__generator"),d=s((function(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&T(t,e,r)}),"__exportStar"),T=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},h=s((function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}),"__values"),p=s((function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}),"__read"),f=s((function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}),"__spread"),g=s((function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}),"__spreadArrays"),v=s((function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}),"__spreadArray"),m=s((function(e){return this instanceof m?(this.v=e,this):new m(e)}),"__await"),_=s((function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof m?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}),"__asyncGenerator"),b=s((function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}),"__asyncDelegator"),w=s((function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}),"__asyncValues"),M=s((function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}),"__makeTemplateObject");var y=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};S=s((function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&T(t,e,r);return y(t,e),t}),"__importStar"),I=s((function(e){return e&&e.__esModule?e:{default:e}}),"__importDefault"),E=s((function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}),"__classPrivateFieldGet"),k=s((function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}),"__classPrivateFieldSet"),O=s((function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}),"__classPrivateFieldIn"),e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",l),e("__awaiter",u),e("__generator",c),e("__exportStar",d),e("__createBinding",T),e("__values",h),e("__read",p),e("__spread",f),e("__spreadArrays",g),e("__spreadArray",v),e("__await",m),e("__asyncGenerator",_),e("__asyncDelegator",b),e("__asyncValues",w),e("__makeTemplateObject",M),e("__importStar",S),e("__importDefault",I),e("__classPrivateFieldGet",E),e("__classPrivateFieldSet",k),e("__classPrivateFieldIn",O)}))})),Bt=se(((e,t)=>{var r,n,i,o,a,l,u,c,d,h,p,f,g,v,m,_,b,w,M,S,I,E,k,O,T;y(),function(e){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function n(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(r,n){return e[r]=t?t(r,n):n}}"function"==typeof define&&define.amd?define("tslib",["exports"],(function(t){e(n(r,n(t)))})):"object"==typeof t&&"object"==typeof t.exports?e(n(r,n(t.exports))):e(n(r)),s(n,"createExporter")}((function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])};r=s((function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),s(n,"__"),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),"__extends"),n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=s((function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),"__rest"),o=s((function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}),"__decorate"),a=s((function(e,t){return function(r,n){t(r,n,e)}}),"__param"),l=s((function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}),"__metadata"),u=s((function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}),"__awaiter"),c=s((function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}),"__generator"),d=s((function(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&T(t,e,r)}),"__exportStar"),T=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},h=s((function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}),"__values"),p=s((function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}),"__read"),f=s((function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}),"__spread"),g=s((function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}),"__spreadArrays"),v=s((function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}),"__spreadArray"),m=s((function(e){return this instanceof m?(this.v=e,this):new m(e)}),"__await"),_=s((function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof m?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}),"__asyncGenerator"),b=s((function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}),"__asyncDelegator"),w=s((function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}),"__asyncValues"),M=s((function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}),"__makeTemplateObject");var y=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};S=s((function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&T(t,e,r);return y(t,e),t}),"__importStar"),I=s((function(e){return e&&e.__esModule?e:{default:e}}),"__importDefault"),E=s((function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}),"__classPrivateFieldGet"),k=s((function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}),"__classPrivateFieldSet"),O=s((function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}),"__classPrivateFieldIn"),e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",l),e("__awaiter",u),e("__generator",c),e("__exportStar",d),e("__createBinding",T),e("__values",h),e("__read",p),e("__spread",f),e("__spreadArrays",g),e("__spreadArray",v),e("__await",m),e("__asyncGenerator",_),e("__asyncDelegator",b),e("__asyncValues",w),e("__makeTemplateObject",M),e("__importStar",S),e("__importDefault",I),e("__classPrivateFieldGet",E),e("__classPrivateFieldSet",k),e("__classPrivateFieldIn",O)}))})),Cd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.ServerZone=void 0,(t=e.ServerZone||(e.ServerZone={})).US="US",t.EU="EU"})),Ad=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SpecialEventType=e.RevenueProperty=e.IdentifyOperation=void 0,(t=e.IdentifyOperation||(e.IdentifyOperation={})).SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll",function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(e.RevenueProperty||(e.RevenueProperty={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(e.SpecialEventType||(e.SpecialEventType={}))})),Nd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=void 0,(t=e.LogLevel||(e.LogLevel={}))[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})),Ld=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.PluginType=void 0,(t=e.PluginType||(e.PluginType={})).BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})),Rd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Status=void 0,(t=e.Status||(e.Status={})).Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})),Dd=se((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=void 0,(t=e.TransportType||(e.TransportType={})).XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})),ft=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=e.Status=e.PluginType=e.LogLevel=e.RevenueProperty=e.IdentifyOperation=e.SpecialEventType=e.ServerZone=void 0;var t=Cd();Object.defineProperty(e,"ServerZone",{enumerable:!0,get:function(){return t.ServerZone}});var r=Ad();Object.defineProperty(e,"SpecialEventType",{enumerable:!0,get:function(){return r.SpecialEventType}}),Object.defineProperty(e,"IdentifyOperation",{enumerable:!0,get:function(){return r.IdentifyOperation}}),Object.defineProperty(e,"RevenueProperty",{enumerable:!0,get:function(){return r.RevenueProperty}});var n=Nd();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return n.LogLevel}});var i=Ld();Object.defineProperty(e,"PluginType",{enumerable:!0,get:function(){return i.PluginType}});var o=Rd();Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return o.Status}});var a=Dd();Object.defineProperty(e,"TransportType",{enumerable:!0,get:function(){return a.TransportType}})})),ti=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.EU_AMPLITUDE_BATCH_SERVER_URL=e.AMPLITUDE_BATCH_SERVER_URL=e.EU_AMPLITUDE_SERVER_URL=e.AMPLITUDE_SERVER_URL=e.STORAGE_PREFIX=e.AMPLITUDE_PREFIX=e.UNSET_VALUE=void 0,e.UNSET_VALUE="-",e.AMPLITUDE_PREFIX="AMP",e.STORAGE_PREFIX="".concat(e.AMPLITUDE_PREFIX,"_unsent"),e.AMPLITUDE_SERVER_URL="https://api2.amplitude.com/2/httpapi",e.EU_AMPLITUDE_SERVER_URL="https://api.eu.amplitude.com/2/httpapi",e.AMPLITUDE_BATCH_SERVER_URL="https://api2.amplitude.com/batch",e.EU_AMPLITUDE_BATCH_SERVER_URL="https://api.eu.amplitude.com/batch"})),ll=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isValidProperties=e.isValidObject=void 0;var t=Bt(),r=s((function(t){if(Object.keys(t).length>1e3)return!1;for(var r in t){var n=t[r];if(!(0,e.isValidProperties)(r,n))return!1}return!0}),"isValidObject");e.isValidObject=r;var n=s((function(r,n){var i,o;if("string"!=typeof r)return!1;if(Array.isArray(n)){var a=!0;try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;if(Array.isArray(u))return!1;if("object"==typeof u)a=a&&(0,e.isValidObject)(u);else if(!["number","string"].includes(typeof u))return!1;if(!a)return!1}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}else{if(null==n)return!1;if("object"==typeof n)return(0,e.isValidObject)(n);if(!["number","string","boolean"].includes(typeof n))return!1}return!0}),"isValidProperties");e.isValidProperties=n})),ul=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var t=Bt(),r=ft(),n=ti(),i=ll(),o=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return t.__assign({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(r.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(r.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(r.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(r.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(r.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(r.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(r.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(r.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(r.IdentifyOperation.UNSET,e,n.UNSET_VALUE),this},e.prototype.clearAll=function(){return this._properties={},this._properties[r.IdentifyOperation.CLEAR_ALL]=n.UNSET_VALUE,this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[r.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===r.IdentifyOperation.ADD?"number"==typeof n:e===r.IdentifyOperation.UNSET||e===r.IdentifyOperation.REMOVE||(0,i.isValidProperties)(t,n))},e}();e.Identify=o})),cl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createRevenueEvent=e.createGroupEvent=e.createGroupIdentifyEvent=e.createIdentifyEvent=e.createTrackEvent=void 0;var t=Bt(),r=ft(),n=ul(),i=s((function(e,r,n){var i="string"==typeof e?{event_type:e}:e;return t.__assign(t.__assign(t.__assign({},i),n),r&&{event_properties:r})}),"createTrackEvent");e.createTrackEvent=i;var o=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent");e.createIdentifyEvent=o;var a=s((function(e,n,i,o){var a;return t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[e]=n,a)})}),"createGroupIdentifyEvent");e.createGroupIdentifyEvent=a;var l=s((function(e,i,o){var a,s=new n.Identify;return s.set(e,i),t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[e]=i,a)})}),"createGroupEvent");e.createGroupEvent=l;var u=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");e.createRevenueEvent=u})),Za=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.buildResult=void 0;var t=ft(),r=s((function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=t.Status.Unknown),{event:e,code:r,message:n}}),"buildResult");e.buildResult=r})),Fd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var t=Bt(),r=ft(),n=Za(),i=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,e.setup(r)];case 1:return t.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(r){t.queue.push([e,r]),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 t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,_,b,w;return t.__generator(this,(function(M){switch(M.label){case 0:if(!e)return[2];i=t.__read(e,1),o=i[0],a=t.__read(e,2),s=a[1],l=this.plugins.filter((function(e){return e.type===r.PluginType.BEFORE})),M.label=1;case 1:M.trys.push([1,6,7,8]),u=t.__values(l),c=u.next(),M.label=2;case 2:return c.done?[3,5]:[4,c.value.execute(t.__assign({},o))];case 3:o=M.sent(),M.label=4;case 4:return c=u.next(),[3,2];case 5:return[3,8];case 6:return d=M.sent(),m={error:d},[3,8];case 7:try{c&&!c.done&&(_=u.return)&&_.call(u)}finally{if(m)throw m.error}return[7];case 8:h=this.plugins.filter((function(e){return e.type===r.PluginType.ENRICHMENT})),M.label=9;case 9:M.trys.push([9,14,15,16]),p=t.__values(h),f=p.next(),M.label=10;case 10:return f.done?[3,13]:[4,f.value.execute(t.__assign({},o))];case 11:o=M.sent(),M.label=12;case 12:return f=p.next(),[3,10];case 13:return[3,16];case 14:return g=M.sent(),b={error:g},[3,16];case 15:try{f&&!f.done&&(w=p.return)&&w.call(p)}finally{if(b)throw b.error}return[7];case 16:return v=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),y=v.map((function(e){var r=t.__assign({},o);return e.execute(r).catch((function(e){return(0,n.buildResult)(r,0,String(e))}))})),Promise.all(y).then((function(e){var r=t.__read(e,1)[0];s(r)})),[2]}}))}))},e.prototype.flush=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,n,i,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return o.apply(e)})))];case 1:return t.sent(),n=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),i=n.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return t.sent(),[2]}}))}))},e}();e.Timeline=i})),dl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CLIENT_NOT_INITIALIZED=e.INVALID_API_KEY=e.MISSING_API_KEY_MESSAGE=e.OPT_OUT_MESSAGE=e.MAX_RETRIES_EXCEEDED_MESSAGE=e.UNEXPECTED_ERROR_MESSAGE=e.SUCCESS_MESSAGE=void 0,e.SUCCESS_MESSAGE="Event tracked successfully",e.UNEXPECTED_ERROR_MESSAGE="Unexpected error occurred",e.MAX_RETRIES_EXCEEDED_MESSAGE="Event rejected due to exceeded retry count",e.OPT_OUT_MESSAGE="Event skipped due to optOut config",e.MISSING_API_KEY_MESSAGE="Event rejected due to missing API key",e.INVALID_API_KEY="Invalid API key",e.CLIENT_NOT_INITIALIZED="Client not initialized"})),qd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.AmplitudeCore=void 0;var t=Bt(),r=cl(),n=Fd(),i=Za(),o=dl(),a=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 n.Timeline,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s;return t.__generator(this,(function(l){switch(l.label){case 0:r=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,6,7,8]),n=t.__values(r),i=n.next(),l.label=2;case 2:return i.done?[3,5]:[4,(0,i.value)()];case 3:l.sent(),l.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),a={error:o},[3,8];case 7:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var i=(0,r.createTrackEvent)(e,t,n);return this.dispatch(i)},e.prototype.identify=function(e,t){var n=(0,r.createIdentifyEvent)(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,i){var o=(0,r.createGroupIdentifyEvent)(e,t,n,i);return this.dispatch(o)},e.prototype.setGroup=function(e,t,n){var i=(0,r.createGroupEvent)(e,t,n);return this.dispatch(i)},e.prototype.revenue=function(e,t){var n=(0,r.createRevenueEvent)(e,t);return this.dispatch(n)},e.prototype.add=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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((0,i.buildResult)(e,0,o.CLIENT_NOT_INITIALIZED));this.process(e).then(t)},e.prototype.dispatch=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r=this;return t.__generator(this,(function(t){return this.config?[2,this.process(e)]:[2,new Promise((function(t){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,t))}))]}))}))},e.prototype.process=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n,a;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.config.optOut?[2,(0,i.buildResult)(e,0,o.OPT_OUT_MESSAGE)]:[4,this.timeline.push(e)];case 1:return 200===(a=t.sent()).code?this.config.loggerProvider.log(a.message):this.config.loggerProvider.error(a.message),[2,a];case 2:return r=t.sent(),n=String(r),this.config.loggerProvider.error(n),[2,a=(0,i.buildResult)(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=Boolean(e):this.q.push(this.setOptOut.bind(this,Boolean(e)))},e.prototype.flush=function(){return this.timeline.flush()},e}();e.AmplitudeCore=a})),Vd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Revenue=void 0;var t=Bt(),r=ft(),n=ll(),i=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(0,n.isValidObject)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?t.__assign({},this.properties):{};return e[r.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[r.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[r.RevenueProperty.REVENUE_PRICE]=this.price,e[r.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[r.RevenueProperty.REVENUE]=this.revenue,e},e}();e.Revenue=i})),Ud=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.chunk=void 0;var t=s((function(e,t){var r=Math.max(t,1);return e.reduce((function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");e.chunk=t})),hl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var t=ft(),r="Amplitude Logger ",n=function(){function e(){this.logLevel=t.LogLevel.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=t.LogLevel.None},e.prototype.enable=function(e){void 0===e&&(e=t.LogLevel.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Verbose||console.log("".concat(r,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Warn||console.warn("".concat(r,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Error||console.error("".concat(r,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Debug||console.log("".concat(r,"[Debug]: ").concat(e.join(" ")))},e}();e.Logger=n})),fl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createServerConfig=e.getServerUrl=e.Config=e.getDefaultConfig=void 0;var t=ft(),r=ti(),n=hl(),i=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:t.LogLevel.Warn,loggerProvider:new n.Logger,optOut:!1,serverUrl:r.AMPLITUDE_SERVER_URL,serverZone:t.ServerZone.US,useBatch:!1}}),"getDefaultConfig");e.getDefaultConfig=i;var o=function(){function t(t){var r,n,i;this._optOut=!1;var o=(0,e.getDefaultConfig)();this.apiKey=t.apiKey,this.flushIntervalMillis=t.flushIntervalMillis||o.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||o.flushQueueSize,this.loggerProvider=t.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=t.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.optOut=null!==(n=t.optOut)&&void 0!==n?n:o.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||o.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=null!==(i=t.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=(0,e.createServerConfig)(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return s(t,"Config"),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}();e.Config=o;var a=s((function(e,n){return e===t.ServerZone.EU?n?r.EU_AMPLITUDE_BATCH_SERVER_URL:r.EU_AMPLITUDE_SERVER_URL:n?r.AMPLITUDE_BATCH_SERVER_URL:r.AMPLITUDE_SERVER_URL}),"getServerUrl");e.getServerUrl=a;var l=s((function(r,n,i){if(void 0===r&&(r=""),void 0===n&&(n=(0,e.getDefaultConfig)().serverZone),void 0===i&&(i=(0,e.getDefaultConfig)().useBatch),r)return{serverUrl:r,serverZone:void 0};var o=[t.ServerZone.US,t.ServerZone.EU].includes(n)?n:(0,e.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,e.getServerUrl)(o,i)}}),"createServerConfig");e.createServerConfig=l})),Gd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Destination=void 0;var t=Bt(),r=ft(),n=dl(),i=ti(),o=Ud(),a=Za(),l=fl(),u=function(){function e(){this.name="amplitude",this.type=r.PluginType.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){var n,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return this.config=e,this.storageKey="".concat(i.STORAGE_PREFIX,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(r=this.config.storageProvider)||void 0===r?void 0:r.get(this.storageKey)];case 1:return n=t.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return o.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(r){var n={event:e,attempts:0,callback:function(e){return r(e)},timeout:0};t.addToQueue(n)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,n.MAX_RETRIES_EXCEEDED_MESSAGE),!1)}));i.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),t.__awaiter(this,void 0,void 0,(function(){var r,n,i,a=this;return t.__generator(this,(function(t){switch(t.label){case 0:return r=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?r.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=(0,o.chunk)(r,this.config.flushQueueSize),[4,Promise.all(i.map((function(t){return a.send(t,e)})))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(e,r){return void 0===r&&(r=!0),t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u;return t.__generator(this,(function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,n.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:e.map((function(e){var r=e.event;r.extra;return t.__rest(r,["extra"])})),options:{min_id_length:this.config.minIdLength}},c.label=1;case 1:return c.trys.push([1,3,,4]),o=(0,l.createServerConfig)(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(o,i)];case 2:if(null===(a=c.sent()))return this.fulfillRequest(e,0,n.UNEXPECTED_ERROR_MESSAGE),[2];if(!r){if("body"in a){s="";try{s=JSON.stringify(a.body,null,2)}catch(e){}this.fulfillRequest(e,a.statusCode,"".concat(a.status,": ").concat(s))}else this.fulfillRequest(e,a.statusCode,a.status);return[2]}return this.handleReponse(a,e),[3,4];case 3:return u=c.sent(),this.fulfillRequest(e,0,String(u)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case r.Status.Success:this.handleSuccessResponse(e,t);break;case r.Status.Invalid:this.handleInvalidResponse(e,t);break;case r.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case r.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,n.SUCCESS_MESSAGE)},e.prototype.handleInvalidResponse=function(e,r){var i=this;if(e.body.missingField||e.body.error.startsWith(n.INVALID_API_KEY))this.fulfillRequest(r,e.statusCode,e.body.error);else{var o=t.__spreadArray(t.__spreadArray(t.__spreadArray(t.__spreadArray([],t.__read(Object.values(e.body.eventsWithInvalidFields)),!1),t.__read(Object.values(e.body.eventsWithMissingFields)),!1),t.__read(Object.values(e.body.eventsWithInvalidIdLengths)),!1),t.__read(e.body.silencedEvents),!1).flat(),a=new Set(o),s=r.filter((function(t,r){if(!a.has(r))return!0;i.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(s),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,r){1!==r.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,t.__spreadArray([],t.__read(r),!1))):this.fulfillRequest(r,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,s=new Set(i),l=new Set(o),u=new Set(a),c=r.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&l.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(c),!1))},e.prototype.handleOtherReponse=function(e){var r=this;this.addToQueue.apply(this,t.__spreadArray([],t.__read(e.map((function(e){return e.timeout=e.attempts*r.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,r){this.saveEvents(),e.forEach((function(e){return e.callback((0,a.buildResult)(e.event,t,r))}))},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}();e.Destination=u})),Hd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.returnWrapper=void 0;var t=Bt(),r=s((function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return{promise:e.apply(void 0,t.__spreadArray([],t.__read(r),!1))}}}),"returnWrapper");e.returnWrapper=r})),$d=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.debugWrapper=e.getClientStates=e.getValueByStringPath=e.getClientLogConfig=e.getStacktrace=void 0;var t=Bt(),r=ft(),n=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace");e.getStacktrace=n;var i=s((function(e){return function(){var r=t.__assign({},e.config);return{logger:r.loggerProvider,logLevel:r.logLevel}}}),"getClientLogConfig");e.getClientLogConfig=i;var o=s((function(e,r){var n,i;r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=t.__values(r.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e}),"getValueByStringPath");e.getValueByStringPath=o;var a=s((function(r,n){return function(){var i,o,a={};try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=(0,e.getValueByStringPath)(r,u)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}}),"getClientStates");e.getClientStates=a;var l=s((function(t,n,i,o,a){return void 0===a&&(a=null),function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var u=i(),c=u.logger,d=u.logLevel;if(d&&d<r.LogLevel.Debug||!d||!c)return t.apply(a,s);var h={type:"invoke public method",name:n,args:s,stacktrace:(0,e.getStacktrace)(1),time:{start:(new Date).toISOString()},states:{}};o&&h.states&&(h.states.before=o());var p=t.apply(a,s);return p&&p.promise?p.promise.then((function(){o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))})):(o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))),p}}),"debugWrapper");e.debugWrapper=l})),Kd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var t=s((function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e.UUID)}),"UUID");e.UUID=t})),Xd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MemoryStorage=void 0;var t=Bt(),r=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.get(e)];case 1:return[2,(r=t.sent())?JSON.stringify(r):void 0]}}))}))},e.prototype.set=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.set(e,r),[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();e.MemoryStorage=r})),Yd=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransport=void 0;var t=ft(),r=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,_,b,w,M,S;if("object"!=typeof e)return null;var I=e.code||0,E=this.buildStatus(I);switch(E){case t.Status.Success:return{status:E,statusCode:I,body:{eventsIngested:null!==(r=e.events_ingested)&&void 0!==r?r:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(i=e.server_upload_time)&&void 0!==i?i:0}};case t.Status.Invalid:return{status:E,statusCode:I,body:{error:null!==(o=e.error)&&void 0!==o?o:"",missingField:null!==(a=e.missing_field)&&void 0!==a?a:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(d=e.exceeded_daily_quota_devices)&&void 0!==d?d:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(g=e.throttled_events)&&void 0!==g?g:[]}};case t.Status.PayloadTooLarge:return{status:E,statusCode:I,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case t.Status.RateLimit:return{status:E,statusCode:I,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(_=e.throttled_devices)&&void 0!==_?_:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(M=e.exceeded_daily_quota_users)&&void 0!==M?M:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case t.Status.Timeout:default:return{status:E,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?t.Status.Success:429===e?t.Status.RateLimit:413===e?t.Status.PayloadTooLarge:408===e?t.Status.Timeout:e>=400&&e<500?t.Status.Invalid:e>=500?t.Status.Failed:t.Status.Unknown},e}();e.BaseTransport=r})),Kt=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createIdentifyEvent=e.BaseTransport=e.MemoryStorage=e.UUID=e.getClientStates=e.getClientLogConfig=e.debugWrapper=e.returnWrapper=e.AMPLITUDE_PREFIX=e.Logger=e.Config=e.Destination=e.Revenue=e.Identify=e.AmplitudeCore=void 0;var t=qd();Object.defineProperty(e,"AmplitudeCore",{enumerable:!0,get:function(){return t.AmplitudeCore}});var r=ul();Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return r.Identify}});var n=Vd();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return n.Revenue}});var i=Gd();Object.defineProperty(e,"Destination",{enumerable:!0,get:function(){return i.Destination}});var o=fl();Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return o.Config}});var a=hl();Object.defineProperty(e,"Logger",{enumerable:!0,get:function(){return a.Logger}});var s=ti();Object.defineProperty(e,"AMPLITUDE_PREFIX",{enumerable:!0,get:function(){return s.AMPLITUDE_PREFIX}});var l=Hd();Object.defineProperty(e,"returnWrapper",{enumerable:!0,get:function(){return l.returnWrapper}});var u=$d();Object.defineProperty(e,"debugWrapper",{enumerable:!0,get:function(){return u.debugWrapper}}),Object.defineProperty(e,"getClientLogConfig",{enumerable:!0,get:function(){return u.getClientLogConfig}}),Object.defineProperty(e,"getClientStates",{enumerable:!0,get:function(){return u.getClientStates}});var c=Kd();Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return c.UUID}});var d=Xd();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:function(){return d.MemoryStorage}});var h=Yd();Object.defineProperty(e,"BaseTransport",{enumerable:!0,get:function(){return h.BaseTransport}});var p=cl();Object.defineProperty(e,"createIdentifyEvent",{enumerable:!0,get:function(){return p.createIdentifyEvent}})})),Un=se(((e,t)=>{var r,n,i,o,a,l,u,c,d,h,p,f,g,v,m,_,b,w,M,S,I,E,k,O,T;y(),function(e){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function n(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(r,n){return e[r]=t?t(r,n):n}}"function"==typeof define&&define.amd?define("tslib",["exports"],(function(t){e(n(r,n(t)))})):"object"==typeof t&&"object"==typeof t.exports?e(n(r,n(t.exports))):e(n(r)),s(n,"createExporter")}((function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])};r=s((function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),s(n,"__"),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),"__extends"),n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i=s((function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}),"__rest"),o=s((function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}),"__decorate"),a=s((function(e,t){return function(r,n){t(r,n,e)}}),"__param"),l=s((function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}),"__metadata"),u=s((function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}),"__awaiter"),c=s((function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}),"__generator"),d=s((function(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&T(t,e,r)}),"__exportStar"),T=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},h=s((function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}),"__values"),p=s((function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}),"__read"),f=s((function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}),"__spread"),g=s((function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}),"__spreadArrays"),v=s((function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}),"__spreadArray"),m=s((function(e){return this instanceof m?(this.v=e,this):new m(e)}),"__await"),_=s((function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof m?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}),"__asyncGenerator"),b=s((function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}),"__asyncDelegator"),w=s((function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}),"__asyncValues"),M=s((function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}),"__makeTemplateObject");var y=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};S=s((function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&T(t,e,r);return y(t,e),t}),"__importStar"),I=s((function(e){return e&&e.__esModule?e:{default:e}}),"__importDefault"),E=s((function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}),"__classPrivateFieldGet"),k=s((function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}),"__classPrivateFieldSet"),O=s((function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}),"__classPrivateFieldIn"),e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",o),e("__param",a),e("__metadata",l),e("__awaiter",u),e("__generator",c),e("__exportStar",d),e("__createBinding",T),e("__values",h),e("__read",p),e("__spread",f),e("__spreadArrays",g),e("__spreadArray",v),e("__await",m),e("__asyncGenerator",_),e("__asyncDelegator",b),e("__asyncValues",w),e("__makeTemplateObject",M),e("__importStar",S),e("__importDefault",I),e("__classPrivateFieldGet",E),e("__classPrivateFieldSet",k),e("__classPrivateFieldIn",O)}))})),mo=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=void 0;var t=s((function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0}),"getGlobalScope");e.getGlobalScope=t})),yl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeURIComponent=e.getQueryParams=void 0;var t=mo(),r=s((function(){var r,n=(0,t.getGlobalScope)();return(null===(r=null==n?void 0:n.location)||void 0===r?void 0:r.search)?n.location.search.substring(1).split("&").filter(Boolean).reduce((function(t,r){var n=r.split("=",2),i=(0,e.tryDecodeURIComponent)(n[0]),o=(0,e.tryDecodeURIComponent)(n[1]);return o&&(t[i]=o),t}),{}):{}}),"getQueryParams");e.getQueryParams=r;var n=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}}),"tryDecodeURIComponent");e.tryDecodeURIComponent=n})),go=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MKTG=e.BASE_CAMPAIGN=e.EMPTY_VALUE=e.WBRAID=e.TWCLID=e.TTCLID=e.MSCLKID=e.KO_CLICK_ID=e.GCLID=e.GBRAID=e.FBCLID=e.DCLID=e.UTM_TERM=e.UTM_SOURCE=e.UTM_MEDIUM=e.UTM_ID=e.UTM_CONTENT=e.UTM_CAMPAIGN=void 0,e.UTM_CAMPAIGN="utm_campaign",e.UTM_CONTENT="utm_content",e.UTM_ID="utm_id",e.UTM_MEDIUM="utm_medium",e.UTM_SOURCE="utm_source",e.UTM_TERM="utm_term",e.DCLID="dclid",e.FBCLID="fbclid",e.GBRAID="gbraid",e.GCLID="gclid",e.KO_CLICK_ID="ko_click_id",e.MSCLKID="msclkid",e.TTCLID="ttclid",e.TWCLID="twclid",e.WBRAID="wbraid",e.EMPTY_VALUE="EMPTY",e.BASE_CAMPAIGN={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},e.MKTG="MKTG"})),bl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignParser=void 0;var t=Un(),r=yl(),n=go(),i=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,t.__assign(t.__assign(t.__assign(t.__assign({},n.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=(0,r.getQueryParams)();return{utm_campaign:e[n.UTM_CAMPAIGN],utm_content:e[n.UTM_CONTENT],utm_id:e[n.UTM_ID],utm_medium:e[n.UTM_MEDIUM],utm_source:e[n.UTM_SOURCE],utm_term:e[n.UTM_TERM]}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!==(t=null===(e=r.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=(0,r.getQueryParams)();return(e={})[n.DCLID]=t[n.DCLID],e[n.FBCLID]=t[n.FBCLID],e[n.GBRAID]=t[n.GBRAID],e[n.GCLID]=t[n.GCLID],e[n.KO_CLICK_ID]=t[n.KO_CLICK_ID],e[n.MSCLKID]=t[n.MSCLKID],e[n.TTCLID]=t[n.TTCLID],e[n.TWCLID]=t[n.TWCLID],e[n.WBRAID]=t[n.WBRAID],e},e}();e.CampaignParser=i})),yo=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getOldCookieName=e.getCookieName=void 0;var t=Kt(),r=s((function(e,r,n){return void 0===r&&(r=""),void 0===n&&(n=10),[t.AMPLITUDE_PREFIX,r,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName");e.getCookieName=r;var n=s((function(e){return"".concat(t.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName");e.getOldCookieName=n})),kp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignTracker=void 0;var t=Un(),r=Kt(),n=yo(),i=bl(),o=go(),a=function(){function e(e,t){var r,a;this.storage=t.storage,this.storageKey=(0,n.getCookieName)(e,o.MKTG),this.parser=new i.CampaignParser,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=Boolean(t.disabled),this.trackNewCampaigns=Boolean(t.trackNewCampaigns),this.trackPageViews=Boolean(t.trackPageViews),this.excludeReferrers=null!==(r=t.excludeReferrers)&&void 0!==r?r:[],"undefined"!=typeof location&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(a=t.initialEmptyValue)&&void 0!==a?a:o.EMPTY_VALUE}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,r,n){void 0===n&&(n=!1);e.referrer;var i=e.referring_domain,o=t.__rest(e,["referrer","referring_domain"]),a=r||{},s=(a.referrer,a.referring_domain),u=t.__rest(a,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var c=JSON.stringify(o)!==JSON.stringify(u),d=n?l(i||"")!==l(s||""):i!==s;return!r||c||d},e.prototype.saveCampaignToStorage=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 n=this,i=t.__assign(t.__assign({},o.BASE_CAMPAIGN),e),a=Object.entries(i).reduce((function(e,r){var i=t.__read(r,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),a||n.initialEmptyValue),a?e.set(o,a):e.unset(o)}),new r.Identify),s={event_type:"Page View",event_properties:{page_title:"undefined"!=typeof document&&document.title||"",page_location:"undefined"!=typeof location&&location.href||"",page_path:"undefined"!=typeof location&&location.pathname||""}};return t.__assign(t.__assign({},(0,r.createIdentifyEvent)(a)),this.trackPageViews&&s)},e.prototype.send=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n;return t.__generator(this,(function(t){switch(t.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return r=t.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=t.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(r,n))return[2];this.onNewCampaign(r)}return[4,this.track(this.createCampaignEvent(r))];case 3:return t.sent(),[4,this.saveCampaignToStorage(r)];case 4:return t.sent(),[2]}}))}))},e}();e.CampaignTracker=a;var l=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain")})),Mp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CookieStorage=void 0;var t=Un(),r=mo(),n=function(){function e(e){this.options=t.__assign({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e(this.options),o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=t.sent()))return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch(e){}return[2,JSON.parse(r)]}catch(e){return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(t){return i=(0,r.getGlobalScope)(),o=null!==(n=null==i?void 0:i.document.cookie.split("; "))&&void 0!==n?n:[],(a=o.find((function(t){return 0===t.indexOf(e+"=")})))?[2,a.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){var o,a,s,l,u,c;return t.__generator(this,(function(t){try{o=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,s=void 0,(a=null!==n?o:-1)&&((l=new Date).setTime(l.getTime()+24*a*60*60*1e3),s=l),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(u+="; expires=".concat(s.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),(c=(0,r.getGlobalScope)())&&(c.document.cookie=u)}catch(e){}return[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2]}))}))},e}();e.CookieStorage=n})),Tp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SessionManager=void 0;var t=Un(),r=yo(),n=function(){function e(e,t){this.storage=e,this.storageKey=(0,r.getCookieName)(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return r=this,[4,this.storage.get(this.storageKey)];case 1:return r.cache=null!==(e=t.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=t.__assign(t.__assign({},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}();e.SessionManager=n})),xp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.FetchTransport=void 0;var t=Un(),r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),s(r,"FetchTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n,i;return t.__generator(this,(function(t){switch(t.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(r),method:"POST"},[4,fetch(e,n)];case 1:return[4,t.sent().json()];case 2:return i=t.sent(),[2,this.buildResponse(i)]}}))}))},r}(Kt().BaseTransport);e.FetchTransport=r})),Ip=se(((e,t)=>{var r,n;y(),r=e,n=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return n(null==t&&r.path)}},r.exports),r.exports}function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}s(r,"createCommonjsModule"),s(n,"commonjsRequire");var i=r((function(e,r){!function(t,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",S="ASUS",I="BlackBerry",E="Browser",k="Chrome",O="Firefox",T="Google",x="Huawei",C="LG",A="Microsoft",P="Motorola",j="Opera",N="Samsung",F="Sony",R="Xiaomi",L="Zebra",D="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),V=s((function(e,t){return typeof e===l&&-1!==z(t).indexOf(z(e))}),"has"),z=s((function(e){return e.toLowerCase()}),"lowerize"),W=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),G=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),$=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(V(t[r][i],e))return"?"===r?n:r}else if(V(t[r],e))return"?"===r?n:r;return e}),"strMapper"),H={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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"+E]],[/\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 "+E],p],[/\bfocus\/([\w\.]+)/i],[p,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+E]],[/fxios\/([-\w\.]+)/i],[p,[c,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+E]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+E],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,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,k+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+E]],[/(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,$,{"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,O+" 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,z]],[/((?: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/,"",z]],[/(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,z]]],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,[h,N],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,N],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,x],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,x],[d,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," "],[h,R],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,R],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,C],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,C],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,T],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,T],[d,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,[h,F],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,F],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,L],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,L],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,F],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,N],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,C],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,k+"cast"],[h,T],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,F],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,G],[u,G],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,L],[d,_]],[/(quest( 2)?)/i],[u,[h,D],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,$,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,$,H]],[/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,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,k+"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]]},X=s((function(e,r){if(typeof e===a&&(r=e,e=n),!(this instanceof X))return new X(e,r).getResult();var i=e||(typeof t!==o&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:""),s=r?B(K,r):K;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=W(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?G(e,275):e,this},this.setUA(i),this}),"UAParser");X.VERSION="0.7.31",X.BROWSER=U([c,p,"major"]),X.CPU=U([f]),X.DEVICE=U([u,h,d,g,v,m,y,_,b]),X.ENGINE=X.OS=U([c,p]),e.exports&&(r=e.exports=X),r.UAParser=X;var Z=typeof t!==o&&(t.jQuery||t.Zepto);if(Z&&!Z.ua){var J=new X;Z.ua=J.getResult(),Z.ua.get=function(){return J.getUA()},Z.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var r in t)Z.ua[r]=t[r]}}}("object"==typeof window?window:t)})),o=function(){function e(){this.ua=new i.UAParser("undefined"!=typeof navigator?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:u(),platform:"Web",os:a(this.ua),deviceModel:l(this.ua)}},e}(),a=s((function(e){var t,r;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(r=e.browser)||void 0===r?void 0:r.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),l=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),u=s((function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),c=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}(),d=s((function(){return d=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),d.apply(this,arguments)}),"__assign"),h=s((function(e,t){var r=typeof e;if(r!==typeof t)return!1;for(var n=0,i=["string","number","boolean","undefined"];n<i.length;n++)if(i[n]===r)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),a=Array.isArray(t);if(o!==a)return!1;if(!o||!a){var s=Object.keys(e).sort(),l=Object.keys(t).sort();if(!h(s,l))return!1;var u=!0;return Object.keys(e).forEach((function(r){h(e[r],t[r])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!h(e[c],t[c]))return!1;return!0}),"isEqual");Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var p=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=d({},this.identity.userProperties),r=d(d({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},updateUserProperties:function(e){for(var t=r.userProperties||{},n=0,i=Object.entries(e);n<i.length;n++){var o=i[n],a=o[0],s=o[1];switch(a){case"$set":for(var l=0,u=Object.entries(s);l<u.length;l++){var c=u[l],d=c[0],h=c[1];t[d]=h}break;case"$unset":for(var p=0,f=Object.keys(s);p<f.length;p++)delete t[d=f[p]];break;case"$clearAll":t={}}}return r.userProperties=t,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return d({},this.identity)},e.prototype.setIdentity=function(e){var t=d({},this.identity);this.identity=d({},e),h(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}(),f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,g=function(){function e(){this.identityStore=new p,this.eventBridge=new c,this.applicationContextProvider=new o}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return f.analyticsConnectorInstances||(f.analyticsConnectorInstances={}),f.analyticsConnectorInstances[t]||(f.analyticsConnectorInstances[t]=new e),f.analyticsConnectorInstances[t]},e}();e.AnalyticsConnector=g,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&void 0!==t?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n((r="undefined"!=typeof globalThis?globalThis:r||self).Experiment={})})),Ml=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getAnalyticsConnector=void 0;var t=Ip(),r=s((function(){return t.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");e.getAnalyticsConnector=r})),Sp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityEventSender=void 0;var t=Un(),r=ft(),n=Ml(),i=function(){function e(){this.name="identity",this.type=r.PluginType.BEFORE,this.identityStore=(0,n.getAnalyticsConnector)().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){return(r=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();e.IdentityEventSender=i})),jp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguage=void 0;var t=s((function(){var e,t,r,n;if("undefined"==typeof navigator)return"";var i=navigator.userLanguage;return null!==(n=null!==(r=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==r?r:i)&&void 0!==n?n:""}),"getLanguage");e.getLanguage=t})),Gn=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=e.BASE_CAMPAIGN=e.getLanguage=e.IdentityEventSender=e.getAnalyticsConnector=e.FetchTransport=e.SessionManager=e.CookieStorage=e.getOldCookieName=e.getCookieName=e.getQueryParams=e.CampaignTracker=e.CampaignParser=void 0;var t=bl();Object.defineProperty(e,"CampaignParser",{enumerable:!0,get:function(){return t.CampaignParser}});var r=kp();Object.defineProperty(e,"CampaignTracker",{enumerable:!0,get:function(){return r.CampaignTracker}});var n=yl();Object.defineProperty(e,"getQueryParams",{enumerable:!0,get:function(){return n.getQueryParams}});var i=yo();Object.defineProperty(e,"getCookieName",{enumerable:!0,get:function(){return i.getCookieName}}),Object.defineProperty(e,"getOldCookieName",{enumerable:!0,get:function(){return i.getOldCookieName}});var o=Mp();Object.defineProperty(e,"CookieStorage",{enumerable:!0,get:function(){return o.CookieStorage}});var a=Tp();Object.defineProperty(e,"SessionManager",{enumerable:!0,get:function(){return a.SessionManager}});var s=xp();Object.defineProperty(e,"FetchTransport",{enumerable:!0,get:function(){return s.FetchTransport}});var l=Ml();Object.defineProperty(e,"getAnalyticsConnector",{enumerable:!0,get:function(){return l.getAnalyticsConnector}});var u=Sp();Object.defineProperty(e,"IdentityEventSender",{enumerable:!0,get:function(){return u.IdentityEventSender}});var c=jp();Object.defineProperty(e,"getLanguage",{enumerable:!0,get:function(){return c.getLanguage}});var d=go();Object.defineProperty(e,"BASE_CAMPAIGN",{enumerable:!0,get:function(){return d.BASE_CAMPAIGN}});var h=mo();Object.defineProperty(e,"getGlobalScope",{enumerable:!0,get:function(){return h.getGlobalScope}})})),Tl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceProxy=e.convertProxyObjectToRealObject=e.runQueuedFunctions=void 0;var t=s((function(t,r){(0,e.convertProxyObjectToRealObject)(t,r)}),"runQueuedFunctions");e.runQueuedFunctions=t;var r=s((function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var l=s.apply(e,o);"function"==typeof a&&a(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject");e.convertProxyObjectToRealObject=r;var n=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");e.isInstanceProxy=n})),Cp=se(((e,t)=>{y(),function(r,n){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",S="ASUS",I="BlackBerry",E="Browser",k="Chrome",O="Firefox",T="Google",x="Huawei",C="LG",A="Microsoft",P="Motorola",j="Opera",N="Samsung",F="Sony",R="Xiaomi",L="Zebra",D="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),V=s((function(e,t){return typeof e===l&&-1!==z(t).indexOf(z(e))}),"has"),z=s((function(e){return e.toLowerCase()}),"lowerize"),W=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),G=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),$=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(V(t[r][i],e))return"?"===r?n:r}else if(V(t[r],e))return"?"===r?n:r;return e}),"strMapper"),H={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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"+E]],[/\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 "+E],p],[/\bfocus\/([\w\.]+)/i],[p,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+E]],[/fxios\/([-\w\.]+)/i],[p,[c,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+E]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+E],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,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,k+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+E]],[/(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,$,{"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,O+" 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,z]],[/((?: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/,"",z]],[/(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,z]]],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,[h,N],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,N],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,x],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,x],[d,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," "],[h,R],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,R],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,C],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,C],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,T],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,T],[d,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,[h,F],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,F],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,L],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,L],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,F],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,N],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,C],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,k+"cast"],[h,T],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,F],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,G],[u,G],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,L],[d,_]],[/(quest( 2)?)/i],[u,[h,D],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,$,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,$,H]],[/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,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,k+"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]]},X=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof X))return new X(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?B(K,t):K;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=W(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?G(e,275):e,this},this.setUA(i),this}),"UAParser");X.VERSION="0.7.31",X.BROWSER=U([c,p,"major"]),X.CPU=U([f]),X.DEVICE=U([u,h,d,g,v,m,y,_,b]),X.ENGINE=X.OS=U([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=X),e.UAParser=X):typeof define===i&&define.amd?define((function(){return X})):typeof r!==o&&(r.UAParser=X);var Z=typeof r!==o&&(r.jQuery||r.Zepto);if(Z&&!Z.ua){var J=new X;Z.ua=J.getResult(),Z.ua.get=function(){return J.getUA()},Z.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var r in t)Z.ua[r]=t[r]}}}("object"==typeof window?window:e)})),Ap=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.6.8"})),Np=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=sn(),r=ft(),n=t.__importDefault(Cp()),i=Kt(),o=Gn(),a=Ap(),l=function(){function e(){var e;this.name="context",this.type=r.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(a.VERSION),"undefined"!=typeof navigator&&(e=navigator.userAgent),this.uaResult=new n.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 t.__awaiter(this,void 0,void 0,(function(){var r,n,a,s,l;return t.__generator(this,(function(u){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),r=(new Date).getTime(),n=this.uaResult.browser.name,a=this.uaResult.browser.version,s=this.uaResult.device.model||this.uaResult.os.name,l=this.uaResult.device.vendor,[2,t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:a}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:l}),this.config.trackingOptions.deviceModel&&{device_model:s}),this.config.trackingOptions.language&&{language:(0,o.getLanguage)()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:(0,i.UUID)(),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}();e.Context=l})),xl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorage=void 0;var t=sn(),r=Gn(),n=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e,o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(r=t.sent())?[2,JSON.parse(r)]:[2,void 0];case 2:return t.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,(null===(n=(0,r.getGlobalScope)())||void 0===n?void 0:n.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(i=(0,r.getGlobalScope)())||void 0===i||i.localStorage.setItem(e,JSON.stringify(n))}catch(e){}return[2]}))}))},e.prototype.remove=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(n=(0,r.getGlobalScope)())||void 0===n||n.localStorage.removeItem(e)}catch(e){}return[2]}))}))},e.prototype.reset=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(e=(0,r.getGlobalScope)())||void 0===e||e.localStorage.clear()}catch(e){}return[2]}))}))},e}();e.LocalStorage=n})),Lp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.XHRTransport=void 0;var t=sn(),r=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.__extends(r,e),s(r,"XHRTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,i){"undefined"==typeof XMLHttpRequest&&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,r=JSON.parse(e),a=n.buildResponse(r);t(a)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(r))}))]}))}))},r}(Kt().BaseTransport);e.XHRTransport=r})),Rp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SendBeaconTransport=void 0;var t=sn(),r=Gn(),n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),s(n,"SendBeaconTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var i=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,o){var a=(0,r.getGlobalScope)();if(!(null==a?void 0:a.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(n);return t(a.navigator.sendBeacon(e,JSON.stringify(n))?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(e){o(e)}}))]}))}))},n}(Kt().BaseTransport);e.SendBeaconTransport=n})),Fp=se((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.getTopLevelDomain=e.createTransport=e.createDeviceId=e.createEventsStorage=e.createFlexibleStorage=e.createCookieStorage=e.useBrowserConfig=e.BrowserConfig=e.getDefaultConfig=void 0;var r=sn(),n=ft(),i=Kt(),o=Gn(),a=xl(),l=Lp(),u=Rp(),c=s((function(){var e=new i.MemoryStorage;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new o.SessionManager(e,""),sessionTimeout:18e5,storageProvider:new i.MemoryStorage,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new o.FetchTransport}}),"getDefaultConfig");e.getDefaultConfig=c;var d=function(t){function n(n,i,o){var a,s,l,u,c,d,h,p,f,g,v,y,m=this,_=(0,e.getDefaultConfig)();return(m=t.call(this,r.__assign(r.__assign({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},o),{apiKey:n,storageProvider:null!==(a=null==o?void 0:o.storageProvider)&&void 0!==a?a:_.storageProvider,transportProvider:null!==(s=null==o?void 0:o.transportProvider)&&void 0!==s?s:_.transportProvider}))||this).cookieStorage=null!==(l=null==o?void 0:o.cookieStorage)&&void 0!==l?l:_.cookieStorage,m.sessionManager=null!==(u=null==o?void 0:o.sessionManager)&&void 0!==u?u:_.sessionManager,m.sessionTimeout=null!==(c=null==o?void 0:o.sessionTimeout)&&void 0!==c?c:_.sessionTimeout,m.appVersion=null==o?void 0:o.appVersion,m.attribution=null==o?void 0:o.attribution,m.cookieExpiration=null!==(d=null==o?void 0:o.cookieExpiration)&&void 0!==d?d:_.cookieExpiration,m.cookieSameSite=null!==(h=null==o?void 0:o.cookieSameSite)&&void 0!==h?h:_.cookieSameSite,m.cookieSecure=null!==(p=null==o?void 0:o.cookieSecure)&&void 0!==p?p:_.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(f=null==o?void 0:o.disableCookies)&&void 0!==f?f:_.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:_.domain,m.lastEventTime=null!==(v=m.lastEventTime)&&void 0!==v?v:null==o?void 0:o.lastEventTime,m.optOut=Boolean(null==o?void 0:o.optOut),m.partnerId=null==o?void 0:o.partnerId,m.sessionId=null==o?void 0:o.sessionId,m.trackingOptions=null!==(y=null==o?void 0:o.trackingOptions)&&void 0!==y?y:_.trackingOptions,m.userId=i,m}return r.__extends(n,t),s(n,"BrowserConfig"),Object.defineProperty(n.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(Boolean(e))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),n}(i.Config);e.BrowserConfig=d;var h=s((function(n,i,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,h,p,f,g,v,y,m,_,b,w,M,S;return r.__generator(this,(function(I){switch(I.label){case 0:return t=(0,e.getDefaultConfig)(),null!==(_=null==a?void 0:a.domain)&&void 0!==_?(l=_,[3,3]):[3,1];case 1:return[4,(0,e.getTopLevelDomain)()];case 2:l=I.sent(),I.label=3;case 3:return s=l,[4,(0,e.createCookieStorage)(r.__assign(r.__assign({},a),{domain:s}))];case 4:return u=I.sent(),c=(0,o.getCookieName)(n),[4,u.get(c)];case 5:return h=I.sent(),p=(0,o.getQueryParams)(),[4,new o.SessionManager(u,n).load()];case 6:return f=I.sent(),g=d.bind,v=[void 0,n,null!=i?i:null==h?void 0:h.userId],y=[r.__assign({},a)],m={cookieStorage:u,sessionManager:f,deviceId:(0,e.createDeviceId)(null==h?void 0:h.deviceId,null==a?void 0:a.deviceId,p.deviceId),domain:s,optOut:null!==(b=null==a?void 0:a.optOut)&&void 0!==b?b:Boolean(null==h?void 0:h.optOut)},[4,u.get(c)];case 7:return m.sessionId=null!==(M=null===(w=I.sent())||void 0===w?void 0:w.sessionId)&&void 0!==M?M:null==a?void 0:a.sessionId,[4,(0,e.createEventsStorage)(a)];case 8:return[2,new(g.apply(d,v.concat([r.__assign.apply(void 0,y.concat([(m.storageProvider=I.sent(),m.trackingOptions=r.__assign(r.__assign({},t.trackingOptions),null==a?void 0:a.trackingOptions),m.transportProvider=null!==(S=null==a?void 0:a.transportProvider)&&void 0!==S?S:(0,e.createTransport)(null==a?void 0:a.transport),m)]))])))]}}))}))}),"useBrowserConfig");e.useBrowserConfig=h;var p=s((function(n,i){return void 0===i&&(i=(0,e.getDefaultConfig)()),r.__awaiter(t,void 0,void 0,(function(){var t,o,a;return r.__generator(this,(function(s){switch(s.label){case 0:return t=r.__assign(r.__assign({},i),n),o=null==n?void 0:n.cookieStorage,(a=!o)?[3,2]:[4,o.isEnabled()];case 1:a=!s.sent(),s.label=2;case 2:return a?[2,(0,e.createFlexibleStorage)(t)]:[2,o]}}))}))}),"createCookieStorage");e.createCookieStorage=p;var f=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:return t=new o.CookieStorage({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 a.LocalStorage).isEnabled()]:[3,4];case 3:r.sent()||(t=new i.MemoryStorage),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage");e.createFlexibleStorage=f;var g=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,o,s,l,u;return r.__generator(this,(function(c){switch(c.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];c.label=1;case 1:c.trys.push([1,7,8,9]),t=r.__values([null==e?void 0:e.storageProvider,new a.LocalStorage]),n=t.next(),c.label=2;case 2:return n.done?[3,6]:(i=n.value,(o=i)?[4,i.isEnabled()]:[3,4]);case 3:o=c.sent(),c.label=4;case 4:if(o)return[2,i];c.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return s=c.sent(),l={error:s},[3,9];case 8:try{n&&!n.done&&(u=t.return)&&u.call(t)}finally{if(l)throw l.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage");e.createEventsStorage=g;var v=s((function(e,t,r){return t||r||e||(0,i.UUID)()}),"createDeviceId");e.createDeviceId=v;var m=s((function(t){return t===n.TransportType.XHR?new l.XHRTransport:t===n.TransportType.SendBeacon?new u.SendBeaconTransport:(0,e.getDefaultConfig)().transportProvider}),"createTransport");e.createTransport=m;var _=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,a,s,l,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,(new o.CookieStorage).isEnabled()];case 1:if(!r.sent()||!e&&"undefined"==typeof location)return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),i=[],a="AMP_TLDTEST",s=n.length-2;s>=0;--s)i.push(n.slice(s).join("."));s=0,r.label=2;case 2:return s<i.length?(l=i[s],u={domain:"."+l},[4,(c=new o.CookieStorage(u)).set(a,1)]):[3,7];case 3:return r.sent(),[4,c.get(a)];case 4:return r.sent()?[4,c.remove(a)]:[3,6];case 5:return r.sent(),[2,"."+l];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");e.getTopLevelDomain=_})),qp=se((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.parseTime=e.parseOldCookies=void 0;var r=sn(),n=Gn(),i=xl(),o=s((function(o,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,d,h,p,f;return r.__generator(this,(function(g){switch(g.label){case 0:return[4,(t=new n.CookieStorage).isEnabled()];case 1:return(!g.sent()||(null==a?void 0:a.disableCookies))&&(t=new i.LocalStorage),[4,t.isEnabled()];case 2:return g.sent()?(s=(0,n.getOldCookieName)(o),[4,t.getRaw(s)]):[2,{optOut:!1}];case 3:return(l=g.sent())?[4,t.remove(s)]:[2,{optOut:!1}];case 4:return g.sent(),u=r.__read(l.split("."),5),c=u[0],d=u[1],h=u[2],p=u[3],f=u[4],[2,{deviceId:c,userId:(0,e.decode)(d),sessionId:(0,e.parseTime)(p),lastEventTime:(0,e.parseTime)(f),optOut:Boolean(h)}]}}))}))}),"parseOldCookies");e.parseOldCookies=o;var a=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime");e.parseTime=a;var l=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}}),"decode");e.decode=l})),Cl=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=e.AmplitudeBrowser=void 0;var t=sn(),r=Kt(),n=Gn(),i=Tl(),o=Np(),a=Fp(),l=qp(),u=function(e){function u(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(u,e),s(u,"AmplitudeBrowser"),u.prototype.init=function(i,s,u){var c,d,h;return void 0===i&&(i=""),t.__awaiter(this,void 0,void 0,(function(){var p,f,g,v,y=this;return t.__generator(this,(function(m){switch(m.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,(0,l.parseOldCookies)(i,u)]);case 1:return p=m.sent(),[4,(0,a.useBrowserConfig)(i,s||p.userId,t.__assign(t.__assign({},u),{deviceId:null!==(c=p.deviceId)&&void 0!==c?c:null==u?void 0:u.deviceId,sessionId:null!==(d=p.sessionId)&&void 0!==d?d:null==u?void 0:u.sessionId,optOut:null!==(h=null==u?void 0:u.optOut)&&void 0!==h?h:p.optOut,lastEventTime:p.lastEventTime}))];case 2:return f=m.sent(),[4,e.prototype._init.call(this,f)];case 3:return m.sent(),g=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),g=!0),(v=(0,n.getAnalyticsConnector)()).eventBridge.setEventReceiver((function(e){y.track(e.eventType,e.eventProperties)})),v.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new o.Context)];case 4:return m.sent(),[4,this.add(new n.IdentityEventSender)];case 5:return m.sent(),[4,this.add(new r.Destination)];case 6:return m.sent(),this.initializing=!1,[4,this.runAttributionStrategy(f.attribution,g)];case 7:return m.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return m.sent(),[2]}}))}))},u.prototype.runAttributionStrategy=function(e,r){return void 0===r&&(r=!1),t.__awaiter(this,void 0,void 0,(function(){var i,o,s;return t.__generator(this,(function(l){switch(l.label){case 0:return i=this.track.bind(this),o=this.setSessionId.bind(this,Date.now()),[4,(0,a.createFlexibleStorage)(this.config)];case 1:return s=l.sent(),[4,new n.CampaignTracker(this.config.apiKey,t.__assign(t.__assign({},e),{storage:s,track:i,onNewCampaign:o})).send(r)];case 2:return l.sent(),[2]}}))}))},u.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},u.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},u.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},u.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},u.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId((0,r.UUID)())},u.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},u.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},u.prototype.setTransport=function(e){this.config?this.config.transportProvider=(0,a.createTransport)(e):this.q.push(this.setTransport.bind(this,e))},u.prototype.identify=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Identify,o)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},u.prototype.groupIdentify=function(t,n,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new r.Identify,s)}return e.prototype.groupIdentify.call(this,t,n,o,a)},u.prototype.revenue=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Revenue,o)}return e.prototype.revenue.call(this,t,n)},u}(r.AmplitudeCore);e.AmplitudeBrowser=u;var c=s((function(){var e=new u;return{init:(0,r.debugWrapper)((0,r.returnWrapper)(e.init.bind(e)),"init",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),add:(0,r.debugWrapper)((0,r.returnWrapper)(e.add.bind(e)),"add",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),remove:(0,r.debugWrapper)((0,r.returnWrapper)(e.remove.bind(e)),"remove",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),track:(0,r.debugWrapper)((0,r.returnWrapper)(e.track.bind(e)),"track",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),logEvent:(0,r.debugWrapper)((0,r.returnWrapper)(e.logEvent.bind(e)),"logEvent",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),identify:(0,r.debugWrapper)((0,r.returnWrapper)(e.identify.bind(e)),"identify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,r.debugWrapper)((0,r.returnWrapper)(e.groupIdentify.bind(e)),"groupIdentify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),setGroup:(0,r.debugWrapper)((0,r.returnWrapper)(e.setGroup.bind(e)),"setGroup",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),revenue:(0,r.debugWrapper)((0,r.returnWrapper)(e.revenue.bind(e)),"revenue",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),flush:(0,r.debugWrapper)((0,r.returnWrapper)(e.flush.bind(e)),"flush",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),getUserId:(0,r.debugWrapper)(e.getUserId.bind(e),"getUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),setUserId:(0,r.debugWrapper)(e.setUserId.bind(e),"setUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),getDeviceId:(0,r.debugWrapper)(e.getDeviceId.bind(e),"getDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),setDeviceId:(0,r.debugWrapper)(e.setDeviceId.bind(e),"setDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),reset:(0,r.debugWrapper)(e.reset.bind(e),"reset",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId","config.deviceId"])),getSessionId:(0,r.debugWrapper)(e.getSessionId.bind(e),"getSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setSessionId:(0,r.debugWrapper)(e.setSessionId.bind(e),"setSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setOptOut:(0,r.debugWrapper)(e.setOptOut.bind(e),"setOptOut",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setTransport:(0,r.debugWrapper)(e.setTransport.bind(e),"setTransport",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"]))}}),"createInstance");e.createInstance=c,e.default=(0,e.createInstance)()})),Wp=se((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Types=e.Identify=e.Revenue=e.runQueuedFunctions=e.track=e.setUserId=e.setTransport=e.setSessionId=e.setOptOut=e.setGroup=e.setDeviceId=e.revenue=e.reset=e.remove=e.logEvent=e.init=e.identify=e.groupIdentify=e.getUserId=e.getSessionId=e.getDeviceId=e.flush=e.add=e.createInstance=void 0;var t=sn(),r=t.__importDefault(Cl()),n=Cl();Object.defineProperty(e,"createInstance",{enumerable:!0,get:function(){return n.createInstance}}),e.add=r.default.add,e.flush=r.default.flush,e.getDeviceId=r.default.getDeviceId,e.getSessionId=r.default.getSessionId,e.getUserId=r.default.getUserId,e.groupIdentify=r.default.groupIdentify,e.identify=r.default.identify,e.init=r.default.init,e.logEvent=r.default.logEvent,e.remove=r.default.remove,e.reset=r.default.reset,e.revenue=r.default.revenue,e.setDeviceId=r.default.setDeviceId,e.setGroup=r.default.setGroup,e.setOptOut=r.default.setOptOut,e.setSessionId=r.default.setSessionId,e.setTransport=r.default.setTransport,e.setUserId=r.default.setUserId,e.track=r.default.track;var i=Tl();Object.defineProperty(e,"runQueuedFunctions",{enumerable:!0,get:function(){return i.runQueuedFunctions}});var o=Kt();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return o.Revenue}}),Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}}),e.Types=t.__importStar(ft())})),Eh=se(((e,t)=>{y();var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",v="[object Set]",m="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",M=/^\[object .+?Constructor\]$/,S=/^(?: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[w]=I[l]=I[u]=I[c]=I[d]=I[h]=I[p]=I[g]=I[v]=I[m]=I[_]=!1;var E="object"==typeof global&&global&&global.Object===Object&&global,k="object"==typeof self&&self&&self.Object===Object&&self,O=E||k||Function("return this")(),T="object"==typeof e&&e&&!e.nodeType&&e,x=T&&"object"==typeof t&&t&&!t.nodeType&&t,C=x&&x.exports===T,A=C&&E.process,P=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),j=P&&P.isTypedArray;function N(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function F(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function R(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function L(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}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 V(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function z(e,t){return function(r){return e(t(r))}}function W(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}s(N,"arrayFilter"),s(F,"arrayPush"),s(R,"arraySome"),s(L,"baseTimes"),s(D,"baseUnary"),s(B,"cacheHas"),s(U,"getValue"),s(V,"mapToArray"),s(z,"overArg"),s(W,"setToArray");var G,q=Array.prototype,$=Function.prototype,H=Object.prototype,K=O["__core-js_shared__"],X=$.toString,Z=H.hasOwnProperty,J=(G=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Y=H.toString,Q=RegExp("^"+X.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=C?O.Buffer:void 0,te=O.Symbol,re=O.Uint8Array,ne=H.propertyIsEnumerable,ie=q.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,le=z(Object.keys,Object),ue=ct(O,"DataView"),ce=ct(O,"Map"),de=ct(O,"Promise"),he=ct(O,"Set"),pe=ct(O,"WeakMap"),fe=ct(Object,"create"),ge=_t(ue),ve=_t(ce),ye=_t(de),me=_t(he),_e=_t(pe),be=te?te.prototype:void 0,we=be?be.valueOf:void 0;function Me(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Se(){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 Ee(e){var t=this.__data__;if(fe){var n=t[e];return n===r?void 0:n}return Z.call(t,e)?t[e]:void 0}function ke(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)}function Oe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&void 0===t?r:t,this}function Te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(){this.__data__=[],this.size=0}function Ce(e){var t=this.__data__,r=Ze(t,e);return!(r<0)&&(r==t.length-1?t.pop():ie.call(t,r,1),--this.size,!0)}function Ae(e){var t=this.__data__,r=Ze(t,e);return r<0?void 0:t[r][1]}function Pe(e){return Ze(this.__data__,e)>-1}function je(e,t){var r=this.__data__,n=Ze(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Fe(){this.size=0,this.__data__={hash:new Me,map:new(ce||Te),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 r=ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ue(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Ne;++t<r;)this.add(e[t])}function Ve(e){return this.__data__.set(e,r),this}function ze(e){return this.__data__.has(e)}function We(e){var t=this.__data__=new Te(e);this.size=t.size}function Ge(){this.__data__=new Te,this.size=0}function qe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function $e(e){return this.__data__.get(e)}function He(e){return this.__data__.has(e)}function Ke(e,t){var r=this.__data__;if(r instanceof Te){var n=r.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ne(n)}return r.set(e,t),this.size=r.size,this}function Xe(e,t){var r=Mt(e),n=!r&&wt(e),i=!r&&!n&&It(e),o=!r&&!n&&!i&&Ct(e),a=r||n||i||o,s=a?L(e.length,String):[],l=s.length;for(var u in e)(t||Z.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&s.push(u);return s}function Ze(e,t){for(var r=e.length;r--;)if(bt(e[r][0],t))return r;return-1}function Je(e,t,r){var n=t(e);return Mt(e)?n:F(n,r(e))}function Ye(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?dt(e):mt(e)}function Qe(e){return xt(e)&&Ye(e)==i}function et(e,t,r,n,i){return e===t||(null==e||null==t||!xt(e)&&!xt(t)?e!=e&&t!=t:tt(e,t,r,n,et,i))}function tt(e,t,r,n,a,s){var l=Mt(e),u=Mt(t),c=l?o:pt(e),d=u?o:pt(t),h=(c=c==i?p:c)==p,f=(d=d==i?p:d)==p,g=c==d;if(g&&It(e)){if(!It(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new We),l||Ct(e)?ot(e,t,r,n,a,s):at(e,t,c,r,n,a,s);if(!(1&r)){var v=h&&Z.call(e,"__wrapped__"),y=f&&Z.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,_=y?t.value():t;return s||(s=new We),a(m,_,r,n,s)}}return!!g&&(s||(s=new We),st(e,t,r,n,a,s))}function rt(e){return!(!Tt(e)||vt(e))&&(kt(e)?Q:M).test(_t(e))}function nt(e){return xt(e)&&Ot(e.length)&&!!I[Ye(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var r in Object(e))Z.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ot(e,t,r,n,i,o){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,h=2&r?new Ue:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var p=e[c],f=t[c];if(n)var g=a?n(f,p,c,t,e,o):n(p,f,c,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!R(t,(function(e,t){if(!B(h,t)&&(p===e||i(p,e,r,n,o)))return h.push(t)}))){d=!1;break}}else if(p!==f&&!i(p,f,r,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function at(e,t,r,n,i,o,s){switch(r){case w: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 re(e),new re(t)));case a:case l:case h:return bt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var c=V;case v:var p=1&n;if(c||(c=W),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;n|=2,s.set(e,t);var y=ot(c(e),c(t),n,i,o,s);return s.delete(e),y;case"[object Symbol]":if(we)return we.call(e)==we.call(t)}return!1}function st(e,t,r,n,i,o){var a=1&r,s=lt(e),l=s.length;if(l!=lt(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:Z.call(t,c)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var h=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var f=e[c=s[u]],g=t[c];if(n)var v=a?n(g,f,c,t,e,o):n(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,r,n,o):v)){h=!1;break}p||(p="constructor"==c)}if(h&&!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)&&(h=!1)}return o.delete(e),o.delete(t),h}function lt(e){return Je(e,At,ht)}function ut(e,t){var r=e.__data__;return gt(t)?r["string"==typeof t?"string":"hash"]:r.map}function ct(e,t){var r=U(e,t);return rt(r)?r:void 0}function dt(e){var t=Z.call(e,oe),r=e[oe];try{e[oe]=void 0;var n=!0}catch(e){}var i=Y.call(e);return n&&(t?e[oe]=r:delete e[oe]),i}s(Me,"Hash"),s(Se,"hashClear"),s(Ie,"hashDelete"),s(Ee,"hashGet"),s(ke,"hashHas"),s(Oe,"hashSet"),Me.prototype.clear=Se,Me.prototype.delete=Ie,Me.prototype.get=Ee,Me.prototype.has=ke,Me.prototype.set=Oe,s(Te,"ListCache"),s(xe,"listCacheClear"),s(Ce,"listCacheDelete"),s(Ae,"listCacheGet"),s(Pe,"listCacheHas"),s(je,"listCacheSet"),Te.prototype.clear=xe,Te.prototype.delete=Ce,Te.prototype.get=Ae,Te.prototype.has=Pe,Te.prototype.set=je,s(Ne,"MapCache"),s(Fe,"mapCacheClear"),s(Re,"mapCacheDelete"),s(Le,"mapCacheGet"),s(De,"mapCacheHas"),s(Be,"mapCacheSet"),Ne.prototype.clear=Fe,Ne.prototype.delete=Re,Ne.prototype.get=Le,Ne.prototype.has=De,Ne.prototype.set=Be,s(Ue,"SetCache"),s(Ve,"setCacheAdd"),s(ze,"setCacheHas"),Ue.prototype.add=Ue.prototype.push=Ve,Ue.prototype.has=ze,s(We,"Stack"),s(Ge,"stackClear"),s(qe,"stackDelete"),s($e,"stackGet"),s(He,"stackHas"),s(Ke,"stackSet"),We.prototype.clear=Ge,We.prototype.delete=qe,We.prototype.get=$e,We.prototype.has=He,We.prototype.set=Ke,s(Xe,"arrayLikeKeys"),s(Ze,"assocIndexOf"),s(Je,"baseGetAllKeys"),s(Ye,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(rt,"baseIsNative"),s(nt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(at,"equalByTag"),s(st,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(dt,"getRawTag");var ht=ae?function(e){return null==e?[]:(e=Object(e),N(ae(e),(function(t){return ne.call(e,t)})))}:Pt,pt=Ye;function ft(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||S.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!!J&&J in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||H)}function mt(e){return Y.call(e)}function _t(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function bt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=w||ce&&pt(new ce)!=d||de&&pt(de.resolve())!=f||he&&pt(new he)!=v||pe&&pt(new pe)!=_)&&(pt=s((function(e){var t=Ye(e),r=t==p?e.constructor:void 0,n=r?_t(r):"";if(n)switch(n){case ge:return w;case ve:return d;case ye:return f;case me:return v;case _e:return _}return t}),"getTag")),s(ft,"isIndex"),s(gt,"isKeyable"),s(vt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(_t,"toSource"),s(bt,"eq");var wt=Qe(function(){return arguments}())?Qe:function(e){return xt(e)&&Z.call(e,"callee")&&!ne.call(e,"callee")},Mt=Array.isArray;function St(e){return null!=e&&Ot(e.length)&&!kt(e)}s(St,"isArrayLike");var It=se||jt;function Et(e,t){return et(e,t)}function kt(e){if(!Tt(e))return!1;var t=Ye(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ot(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Tt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xt(e){return null!=e&&"object"==typeof e}s(Et,"isEqual"),s(kt,"isFunction"),s(Ot,"isLength"),s(Tt,"isObject"),s(xt,"isObjectLike");var Ct=j?D(j):nt;function At(e){return St(e)?Xe(e):it(e)}function Pt(){return[]}function jt(){return!1}s(At,"keys"),s(Pt,"stubArray"),s(jt,"stubFalse"),t.exports=Et})),tf=se(((e,t)=>{y();var r="__lodash_hash_undefined__",n=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 d="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||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&&d.process,_=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch(e){}}(),b=_&&_.isTypedArray;function w(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function M(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function S(e){return function(t){return e(t)}}function I(e,t){return null==e?void 0:e[t]}function E(e,t){return function(r){return e(t(r))}}s(w,"apply"),s(M,"baseTimes"),s(S,"baseUnary"),s(I,"getValue"),s(E,"overArg");var k,O=Array.prototype,T=Function.prototype,x=Object.prototype,C=p["__core-js_shared__"],A=T.toString,P=x.hasOwnProperty,j=(k=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",N=x.toString,F=A.call(Object),R=RegExp("^"+A.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=v?p.Buffer:void 0,D=p.Symbol,B=p.Uint8Array,U=L?L.allocUnsafe:void 0,V=E(Object.getPrototypeOf,Object),z=Object.create,W=x.propertyIsEnumerable,G=O.splice,q=D?D.toStringTag:void 0,$=function(){try{var e=$e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=L?L.isBuffer:void 0,K=Math.max,X=Date.now,Z=$e(p,"Map"),J=$e(Object,"create"),Y=function(){function e(){}return s(e,"object"),function(t){if(!gt(t))return{};if(z)return z(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(){this.__data__=J?J(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function re(e){var t=this.__data__;if(J){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0}function ne(e){var t=this.__data__;return J?void 0!==t[e]:P.call(t,e)}function ie(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=J&&void 0===t?r:t,this}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ae(){this.__data__=[],this.size=0}function se(e){var t=this.__data__,r=ke(t,e);return!(r<0)&&(r==t.length-1?t.pop():G.call(t,r,1),--this.size,!0)}function le(e){var t=this.__data__,r=ke(t,e);return r<0?void 0:t[r][1]}function ue(e){return ke(this.__data__,e)>-1}function ce(e,t){var r=this.__data__,n=ke(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function de(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function he(){this.size=0,this.__data__={hash:new Q,map:new(Z||oe),string:new Q}}function pe(e){var t=qe(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return qe(this,e).get(e)}function ge(e){return qe(this,e).has(e)}function ve(e,t){var r=qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?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 _e(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function be(e){return this.__data__.get(e)}function we(e){return this.__data__.has(e)}function Me(e,t){var r=this.__data__;if(r instanceof oe){var n=r.__data__;if(!Z||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new de(n)}return r.set(e,t),this.size=r.size,this}function Se(e,t){var r=ut(e),n=!r&<(e),i=!r&&!n&&ht(e),o=!r&&!n&&!i&&mt(e),a=r||n||i||o,s=a?M(e.length,String):[],l=s.length;for(var u in e)(t||P.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Xe(u,l)))&&s.push(u);return s}function Ie(e,t,r){(void 0!==r&&!st(e[t],r)||void 0===r&&!(t in e))&&Oe(e,t,r)}function Ee(e,t,r){var n=e[t];(!P.call(e,t)||!st(n,r)||void 0===r&&!(t in e))&&Oe(e,t,r)}function ke(e,t){for(var r=e.length;r--;)if(st(e[r][0],t))return r;return-1}function Oe(e,t,r){"__proto__"==t&&$?$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(re,"hashGet"),s(ne,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=re,Q.prototype.has=ne,Q.prototype.set=ie,s(oe,"ListCache"),s(ae,"listCacheClear"),s(se,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=ae,oe.prototype.delete=se,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(de,"MapCache"),s(he,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),de.prototype.clear=he,de.prototype.delete=pe,de.prototype.get=fe,de.prototype.has=ge,de.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(_e,"stackDelete"),s(be,"stackGet"),s(we,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=_e,ye.prototype.get=be,ye.prototype.has=we,ye.prototype.set=Me,s(Se,"arrayLikeKeys"),s(Ie,"assignMergeValue"),s(Ee,"assignValue"),s(ke,"assocIndexOf"),s(Oe,"baseAssignValue");var Te=Ge();function xe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?He(e):tt(e)}function Ce(e){return vt(e)&&xe(e)==i}function Ae(e){return!(!gt(e)||Ye(e))&&(pt(e)?R:l).test(at(e))}function Pe(e){return vt(e)&&ft(e.length)&&!!c[xe(e)]}function je(e){if(!gt(e))return et(e);var t=Qe(e),r=[];for(var n in e)"constructor"==n&&(t||!P.call(e,n))||r.push(n);return r}function Ne(e,t,r,n,i){e!==t&&Te(t,(function(o,a){if(i||(i=new ye),gt(o))Fe(e,t,a,r,Ne,n,i);else{var s=n?n(nt(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Ie(e,a,s)}}),bt)}function Fe(e,t,r,n,i,o,a){var s=nt(e,r),l=nt(t,r),u=a.get(l);if(u)Ie(e,r,u);else{var c=o?o(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var h=ut(l),p=!h&&ht(l),f=!h&&!p&&mt(l);c=l,h||p||f?ut(s)?c=s:dt(s)?c=Ve(s):p?(d=!1,c=De(l,!0)):f?(d=!1,c=Ue(l,!0)):c=[]:yt(l)||lt(l)?(c=s,lt(s)?c=_t(s):(!gt(s)||pt(s))&&(c=Ke(l))):d=!1}d&&(a.set(l,c),i(c,l,n,o,a),a.delete(l)),Ie(e,r,c)}}function Re(e,t){return it(rt(e,t,St),e+"")}s(xe,"baseGetTag"),s(Ce,"baseIsArguments"),s(Ae,"baseIsNative"),s(Pe,"baseIsTypedArray"),s(je,"baseKeysIn"),s(Ne,"baseMerge"),s(Fe,"baseMergeDeep"),s(Re,"baseRest");var Le=$?function(e,t){return $(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:St;function De(e,t){if(t)return e.slice();var r=e.length,n=U?U(r):new e.constructor(r);return e.copy(n),n}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function Ue(e,t){var r=t?Be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ve(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function ze(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),i?Oe(r,s,l):Ee(r,s,l)}return r}function We(e){return Re((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&Ze(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t}))}function Ge(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}function qe(e,t){var r=e.__data__;return Je(t)?r["string"==typeof t?"string":"hash"]:r.map}function $e(e,t){var r=I(e,t);return Ae(r)?r:void 0}function He(e){var t=P.call(e,q),r=e[q];try{e[q]=void 0;var n=!0}catch(e){}var i=N.call(e);return n&&(t?e[q]=r:delete e[q]),i}function Ke(e){return"function"!=typeof e.constructor||Qe(e)?{}:Y(V(e))}function Xe(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&u.test(e))&&e>-1&&e%1==0&&e<t}function Ze(e,t,r){if(!gt(r))return!1;var n=typeof t;return!!("number"==n?ct(r)&&Xe(t,r.length):"string"==n&&t in r)&&st(r[t],e)}function Je(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ye(e){return!!j&&j in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||x)}function et(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}function tt(e){return N.call(e)}function rt(e,t,r){return t=K(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=K(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),w(e,this,s)}}function nt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(De,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(Ue,"cloneTypedArray"),s(Ve,"copyArray"),s(ze,"copyObject"),s(We,"createAssigner"),s(Ge,"createBaseFor"),s(qe,"getMapData"),s($e,"getNative"),s(He,"getRawTag"),s(Ke,"initCloneObject"),s(Xe,"isIndex"),s(Ze,"isIterateeCall"),s(Je,"isKeyable"),s(Ye,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(rt,"overRest"),s(nt,"safeGet");var it=ot(Le);function ot(e){var t=0,r=0;return function(){var n=X(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function at(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function st(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(at,"toSource"),s(st,"eq");var lt=Ce(function(){return arguments}())?Ce:function(e){return vt(e)&&P.call(e,"callee")&&!W.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function dt(e){return vt(e)&&ct(e)}s(ct,"isArrayLike"),s(dt,"isArrayLikeObject");var ht=H||It;function pt(e){if(!gt(e))return!1;var t=xe(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<=n}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)||xe(e)!=a)return!1;var t=V(e);if(null===t)return!0;var r=P.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&A.call(r)==F}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=b?S(b):Pe;function _t(e){return ze(e,bt(e))}function bt(e){return ct(e)?Se(e,!0):je(e)}s(_t,"toPlainObject"),s(bt,"keysIn");var wt=We((function(e,t,r){Ne(e,t,r)}));function Mt(e){return function(){return e}}function St(e){return e}function It(){return!1}s(Mt,"constant"),s(St,"identity"),s(It,"stubFalse"),t.exports=wt})),nf=se(((e,t)=>{y(),function(r,n){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",_="wearable",b="embedded",w="Amazon",M="Apple",S="ASUS",I="BlackBerry",E="Browser",k="Chrome",O="Firefox",T="Google",x="Huawei",C="LG",A="Microsoft",P="Motorola",j="Opera",N="Samsung",F="Sharp",R="Sony",L="Xiaomi",D="Zebra",B="Facebook",U=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),V=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),z=s((function(e,t){return typeof e===l&&-1!==W(t).indexOf(W(e))}),"has"),W=s((function(e){return e.toLowerCase()}),"lowerize"),G=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),q=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)}),"trim"),$=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),H=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(z(t[r][i],e))return"?"===r?n:r}else if(z(t[r],e))return"?"===r?n:r;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"},X={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,j+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,j]],[/(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"+E]],[/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 "+E],p],[/\bfocus\/([\w\.]+)/i],[p,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+E]],[/fxios\/([-\w\.]+)/i],[p,[c,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+E]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+E],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,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,k+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+E]],[/(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,H,{"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,O+" 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,W]],[/((?: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/,"",W]],[/(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,W]]],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,[h,N],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,N],[d,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/(macintosh);/i],[u,[h,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,x],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,x],[d,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," "],[h,L],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,L],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,C],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,C],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,T],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,T],[d,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,[h,R],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,R],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,I],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,F],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,D],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,D],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,R],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,N],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,C],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,k+"cast"],[h,T],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,F],[d,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,R],[d,m]],[/(mitv-\w{5}) bui/i],[u,[h,L],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,q],[u,q],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,_]],[/droid.+; (glass) \d/i],[u,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,D],[d,_]],[/(quest( 2)?)/i],[u,[h,B],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,H,K]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,H,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,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,k+"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]]},Z=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof Z))return new Z(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?U(X,t):X;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,$.call(e,i,s.browser),e.major=G(e.version),e},this.getCPU=function(){var e={};return e[f]=n,$.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,$.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,$.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,$.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?q(e,350):e,this},this.setUA(i),this}),"UAParser");Z.VERSION="0.7.33",Z.BROWSER=V([c,p,"major"]),Z.CPU=V([f]),Z.DEVICE=V([u,h,d,g,v,m,y,_,b]),Z.ENGINE=Z.OS=V([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=Z),e.UAParser=Z):typeof define===i&&define.amd?define((function(){return Z})):typeof r!==o&&(r.UAParser=Z);var J=typeof r!==o&&(r.jQuery||r.Zepto);if(J&&!J.ua){var Y=new Z;J.ua=Y.getResult(),J.ua.get=function(){return Y.getUA()},J.ua.set=function(e){Y.setUA(e);var t=Y.getResult();for(var r in t)J.ua[r]=t[r]}}}("object"==typeof window?window:e)})),Mf=se(((e,t)=>{y(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))})),Of=se(((e,t)=>{y();var r="%[a-f0-9]{2}",n=new RegExp("("+r+")|([^%]+?)","gi"),i=new RegExp("("+r+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function a(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(n)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=i.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=a(r[0]);n!==r[0]&&(t[r[0]]=n)}r=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(t){return l(e)}}})),jf=se(((e,t)=>{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 r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}})),Cf=se(((e,t)=>{y(),t.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var a=n[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(r[a]=s)}return r}})),Bf=se((e=>{y();var t=Mf(),r=Of(),n=jf(),i=Cf(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[",i,"]"].join("")]:[...r,[d(t,e),"[",d(i,e),"]=",d(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[]"].join("")]:[...r,[d(t,e),"[]=",d(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[d(r,e),t,d(i,e)].join("")]:[[n,d(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,d(t,e)]:[...r,[d(t,e),"=",d(n,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&h(r,e).includes(e.arrayFormatSeparator);r=o?h(r,e):r;let a=i||o?r.split(e.arrayFormatSeparator).map((t=>h(t,e))):null===r?r:h(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r&&h(r,e));let o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>h(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,r){return r.encode?r.strict?t(e):encodeURIComponent(e):e}function h(e,t){return t.decode?r(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="",r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),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 _(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=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,a]=n(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:h(a,t),r(h(e,t),a,i)}for(let e of Object.keys(i)){let r=i[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else i[e]=m(r,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let r=i[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=p(r):e[t]=r,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(d,"encode"),s(h,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(v,"extract"),s(m,"parseValue"),s(_,"parse"),e.extract=v,e.parse=_,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=s((r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r]),"shouldFilter"),n=l(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((r=>{let i=e[r];return void 0===i?"":null===i?d(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?d(r,t)+"[]":i.reduce(n(r),[]).join("&"):d(r,t)+"="+d(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,i]=n(e,"#");return Object.assign({url:r.split("?")[0]||"",query:_(v(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);let n=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,r);l&&(l=`?${l}`);let u=g(t.url);return t.fragmentIdentifier&&(u=`#${r[a]?d(t.fragmentIdentifier,r):t.fragmentIdentifier}`),`${n}${l}${u}`},e.pick=(t,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,n);return e.stringifyUrl({url:o,query:i(s,r),fragmentIdentifier:l},n)},e.exclude=(t,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return e.pick(t,i,n)}})),Hf=se(((e,t)=>{var r,n;y(),r=e,n=function(){"use strict";var e=s((function(){return e=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),e.apply(this,arguments)}),"__assign");function t(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}s(t,"__values"),s(r,"__read");var n,i="KEYS",o="VALUES",a="",l=function(){function e(e,t){var r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}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=u(this._path),t=e.node,r=e.keys;if(u(r)===a)return{done:!1,value:this.result()};var n=t.get(u(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=u(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 u(t)})).filter((function(e){return e!==a})).join("")},e.prototype.value=function(){return u(this._path).node.get(a)},e.prototype.result=function(){switch(this._type){case o:return this.value();case i:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),u=s((function(e){return e[e.length-1]}),"last$1"),c=s((function(e,t,r){var n=new Map;if(void 0===t)return n;for(var i=t.length+1,o=i+r,a=new Uint8Array(o*i).fill(r+1),s=0;s<i;++s)a[s]=s;for(var l=1;l<o;++l)a[l*i]=l;return d(e,t,r,n,a,1,i,""),n}),"fuzzySearch"),d=s((function(e,r,n,i,o,s,l,u){var c,h,p=s*l;try{e:for(var f=t(e.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v===a){var y=o[p-1];y<=n&&i.set(u,[e.get(v),y])}else{for(var m=s,_=0;_<v.length;++_,++m){for(var b=v[_],w=l*m,M=w-l,S=o[w],I=Math.max(0,m-n-1),E=Math.min(l-1,m+n),k=I;k<E;++k){var O=b!==r[k],T=o[M+k]+ +O,x=o[M+k+1]+1,C=o[w+k]+1,A=o[w+k+1]=Math.min(T,x,C);A<S&&(S=A)}if(S>n)continue e}d(e.get(v),r,n,i,o,m,l,u+v)}}}catch(e){c={error:e}}finally{try{g&&!g.done&&(h=f.return)&&h.call(f)}finally{if(c)throw c.error}}}),"recurse"),h=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(n){var i,o;if(!n.startsWith(this._prefix))throw new Error("Mismatched prefix");var s=r(p(this._tree,n.slice(this._prefix.length)),2),l=s[0],u=s[1];if(void 0===l){var c=r(_(u),2),d=c[0],h=c[1];try{for(var f=t(d.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v!==a&&v.startsWith(h)){var y=new Map;return y.set(v.slice(h.length),d.get(v)),new e(y,n)}}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}return new e(l,n)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,v(this._tree,e)},e.prototype.entries=function(){return new l(this,"ENTRIES")},e.prototype.forEach=function(e){var n,i;try{for(var o=t(this),a=o.next();!a.done;a=o.next()){var s=r(a.value,2);e(s[0],s[1],this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.fuzzyGet=function(e,t){return c(this._tree,e,t)},e.prototype.get=function(e){var t=f(this._tree,e);return void 0!==t?t.get(a):void 0},e.prototype.has=function(e){var t=f(this._tree,e);return void 0!==t&&t.has(a)},e.prototype.keys=function(){return new l(this,i)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,g(this._tree,e).set(a,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 r=g(this._tree,e);return r.set(a,t(r.get(a))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var r=g(this._tree,e),n=r.get(a);return void 0===n&&r.set(a,n=t()),n},e.prototype.values=function(){return new l(this,o)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(n){var i,o,a=new e;try{for(var s=t(n),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1];a.set(c,d)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),p=s((function(e,r,n){var i,o;if(void 0===n&&(n=[]),0===r.length||null==e)return[e,n];try{for(var s=t(e.keys()),l=s.next();!l.done;l=s.next()){var u=l.value;if(u!==a&&r.startsWith(u))return n.push([e,u]),p(e.get(u),r.slice(u.length),n)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n.push([e,r]),p(void 0,"",n)}),"trackDown"),f=s((function(e,r){var n,i;if(0===r.length||null==e)return e;try{for(var o=t(e.keys()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!==a&&r.startsWith(l))return f(e.get(l),r.slice(l.length))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"lookup"),g=s((function(e,r){var n,i,o=r.length;e:for(var s=0;e&&s<o;){try{for(var l=(n=void 0,t(e.keys())),u=l.next();!u.done;u=l.next()){var c=u.value;if(c!==a&&r[s]===c[0]){for(var d=Math.min(o-s,c.length),h=1;h<d&&r[s+h]===c[h];)++h;var p=e.get(c);if(h===c.length)e=p;else{var f=new Map;f.set(c.slice(h),p),e.set(r.slice(s,s+h),f),e.delete(c),e=f}s+=h;continue e}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}var g=new Map;return e.set(r.slice(s),g),g}return e}),"createPath"),v=s((function(e,t){var n=r(p(e,t),2),i=n[0],o=n[1];if(void 0!==i)if(i.delete(a),0===i.size)y(o);else if(1===i.size){var s=r(i.entries().next().value,2),l=s[0],u=s[1];m(o,l,u)}}),"remove"),y=s((function(e){if(0!==e.length){var t=r(_(e),2),n=t[0],i=t[1];if(n.delete(i),0===n.size)y(e.slice(0,-1));else if(1===n.size){var o=r(n.entries().next().value,2),s=o[0],l=o[1];s!==a&&m(e.slice(0,-1),s,l)}}}),"cleanup"),m=s((function(e,t,n){if(0!==e.length){var i=r(_(e),2),o=i[0],a=i[1];o.set(a+t,n),o.delete(a)}}),"merge"),_=s((function(e){return e[e.length-1]}),"last"),b="or",w=function(){function n(t){if(null==(null==t?void 0:t.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=e(e(e({},k),t),{searchOptions:e(e({},O),t.searchOptions||{})}),this._index=new h,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(n,"MiniSearch"),n.prototype.add=function(e){var r,n,i,o,a=this._options,s=a.extractField,l=a.tokenize,u=a.processTerm,c=a.fields,d=a.idField,h=s(e,d);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));var p=this.addDocumentId(h);this.saveStoredFields(p,e);try{for(var f=t(c),g=f.next();!g.done;g=f.next()){var v=g.value,y=s(e,v);if(null!=y){var m=l(y.toString(),v),_=this._fieldIds[v],b=new Set(m).size;this.addFieldLength(p,_,this._documentCount-1,b);try{for(var w=(i=void 0,t(m)),M=w.next();!M.done;M=w.next()){var S=u(M.value,v);S&&this.addTerm(_,p,S)}}catch(e){i={error:e}}finally{try{M&&!M.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},n.prototype.addAll=function(e){var r,n;try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},n.prototype.addAllAsync=function(e,t){var r=this;void 0===t&&(t={});var n=t.chunkSize,i=void 0===n?10:n,o={chunk:[],promise:Promise.resolve()},a=e.reduce((function(e,t,n){var o=e.chunk,a=e.promise;return o.push(t),(n+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return r.addAll(o)}))}:{chunk:o,promise:a}}),o),s=a.chunk;return a.promise.then((function(){return r.addAll(s)}))},n.prototype.remove=function(e){var n,i,o,a,s,l,u=this._options,c=u.tokenize,d=u.processTerm,h=u.extractField,p=u.fields,f=u.idField,g=h(e,f);if(null==g)throw new Error('MiniSearch: document does not have ID field "'.concat(f,'"'));try{for(var v=t(this._documentIds),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),_=m[0];if(g===m[1]){try{for(var b=(o=void 0,t(p)),w=b.next();!w.done;w=b.next()){var M=w.value,S=h(e,M);if(null!=S){var I=c(S.toString(),M),E=this._fieldIds[M],k=new Set(I).size;this.removeFieldLength(_,E,this._documentCount,k);try{for(var O=(s=void 0,t(I)),T=O.next();!T.done;T=O.next()){var x=d(T.value,M);x&&this.removeTerm(E,_,x)}}catch(e){s={error:e}}finally{try{T&&!T.done&&(l=O.return)&&l.call(O)}finally{if(s)throw s.error}}}}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return this._storedFields.delete(_),this._documentIds.delete(_),this._fieldLength.delete(_),void(this._documentCount-=1)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(g,": it is not in the index"))},n.prototype.removeAll=function(e){var r,n;if(e)try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.remove(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},n.prototype.search=function(e,n){var i,o;void 0===n&&(n={});var a=this.executeQuery(e,n),s=[];try{for(var l=t(a),u=l.next();!u.done;u=l.next()){var c=r(u.value,2),d=c[0],h=c[1],p=h.score,f=h.terms,g=h.match,v=f.length,y={id:this._documentIds.get(d),score:p*v,terms:Object.keys(g),match:g};Object.assign(y,this._storedFields.get(d)),(null==n.filter||n.filter(y))&&s.push(y)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return s.sort(A),s},n.prototype.autoSuggest=function(n,i){var o,a,s,l;void 0===i&&(i={}),i=e(e({},T),i);var u=new Map;try{for(var c=t(this.search(n,i)),d=c.next();!d.done;d=c.next()){var h=d.value,p=h.score,f=(w=h.terms).join(" ");null!=(_=u.get(f))?(_.score+=p,_.count+=1):u.set(f,{score:p,terms:w,count:1})}}catch(e){o={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var g=[];try{for(var v=t(u),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),_=m[0],b=m[1],w=(p=b.score,b.terms),M=b.count;g.push({suggestion:_,terms:w,score:p/M})}}catch(e){s={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}return g.sort(A),g},Object.defineProperty(n.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),n.loadJSON=function(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return n.loadJS(JSON.parse(e),t)},n.getDefault=function(e){if(k.hasOwnProperty(e))return M(k,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},n.loadJS=function(e,i){var o,a,s,l,u=e.index,c=e.documentCount,d=e.nextId,p=e.documentIds,f=e.fieldIds,g=e.fieldLength,v=e.averageFieldLength,y=e.storedFields,m=e.serializationVersion;if(1!==m&&2!==m)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var _=new n(i);_._documentCount=c,_._nextId=d,_._documentIds=j(p),_._fieldIds=f,_._fieldLength=j(g),_._avgFieldLength=v,_._storedFields=j(y),_._index=new h;try{for(var b=t(u),w=b.next();!w.done;w=b.next()){var M=r(w.value,2),S=M[0],I=M[1],E=new Map;try{for(var k=(s=void 0,t(Object.keys(I))),O=k.next();!O.done;O=k.next()){var T=O.value,x=I[T];1===m&&(x=x.ds),E.set(parseInt(T,10),j(x))}}catch(e){s={error:e}}finally{try{O&&!O.done&&(l=k.return)&&l.call(k)}finally{if(s)throw s.error}}_._index.set(S,E)}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}return _},n.prototype.executeQuery=function(t,r){var n=this;if(void 0===r&&(r={}),"string"!=typeof t){var i=e(e(e({},r),t),{queries:void 0}),o=t.queries.map((function(e){return n.executeQuery(e,i)}));return this.combineResults(o,t.combineWith)}var a=this._options,s=a.tokenize,l=a.processTerm,u=a.searchOptions,c=e(e({tokenize:s,processTerm:l},u),r),d=c.tokenize,h=c.processTerm,p=d(t).map((function(e){return h(e)})).filter((function(e){return!!e})).map(E(c)).map((function(e){return n.executeQuerySpec(e,c)}));return this.combineResults(p,c.combineWith)},n.prototype.executeQuerySpec=function(n,i){var o,a,s,l,u,c,d=e(e({},this._options.searchOptions),i),h=(d.fields||this._options.fields).reduce((function(t,r){var n;return e(e({},t),((n={})[r]=M(t,r)||1,n))}),d.boost||{}),p=d.boostDocument,f=d.weights,g=d.maxFuzzy,v=e(e({},O.weights),f),y=v.fuzzy,m=v.prefix,_=this._index.get(n.term),b=this.termResults(n.term,n.term,1,_,h,p);if(n.prefix&&(u=this._index.atPrefix(n.term)),n.fuzzy){var w=!0===n.fuzzy?.2:n.fuzzy,S=w<1?Math.min(g,Math.round(n.term.length*w)):w;S&&(c=this._index.fuzzyGet(n.term,S))}if(u)try{for(var I=t(u),E=I.next();!E.done;E=I.next()){var k=r(E.value,2),T=k[0],x=k[1];if(j=T.length-n.term.length){null==c||c.delete(T);var C=m*T.length/(T.length+.3*j);this.termResults(n.term,T,C,x,h,p,b)}}}catch(e){o={error:e}}finally{try{E&&!E.done&&(a=I.return)&&a.call(I)}finally{if(o)throw o.error}}if(c)try{for(var A=t(c.keys()),P=A.next();!P.done;P=A.next()){T=P.value;var j,N=r(c.get(T),2),F=N[0];(j=N[1])&&(C=y*T.length/(T.length+j),this.termResults(n.term,T,C,F,h,p,b))}}catch(e){s={error:e}}finally{try{P&&!P.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}return b},n.prototype.combineResults=function(e,t){if(void 0===t&&(t=b),0===e.length)return new Map;var r=t.toLowerCase();return e.reduce(S[r])||new Map},n.prototype.toJSON=function(){var e,n,i,o,a=[];try{for(var s=t(this._index),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1],h={};try{for(var p=(i=void 0,t(d)),f=p.next();!f.done;f=p.next()){var g=r(f.value,2),v=g[0],y=g[1];h[v]=Object.fromEntries(y)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}a.push([c,h])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}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:a,serializationVersion:2}},n.prototype.termResults=function(e,r,n,i,o,a,s){var l,u,c,d,h;if(void 0===s&&(s=new Map),null==i)return s;try{for(var p=t(Object.keys(o)),f=p.next();!f.done;f=p.next()){var g=f.value,v=o[g],y=this._fieldIds[g],m=i.get(y);if(null!=m){var _=m.size,b=this._avgFieldLength[y];try{for(var w=(c=void 0,t(m.keys())),S=w.next();!S.done;S=w.next()){var E=S.value,k=a?a(this._documentIds.get(E),r):1;if(k){var O=m.get(E),T=this._fieldLength.get(E)[y],C=n*v*k*I(O,_,this._documentCount,T,b),A=s.get(E);if(A){A.score+=C,x(A.terms,e);var P=M(A.match,r);P?P.push(g):A.match[r]=[g]}else s.set(E,{score:C,terms:[e],match:(h={},h[r]=[g],h)})}}}catch(e){c={error:e}}finally{try{S&&!S.done&&(d=w.return)&&d.call(w)}finally{if(c)throw c.error}}}}}catch(e){l={error:e}}finally{try{f&&!f.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}return s},n.prototype.addTerm=function(e,t,r){var n=this._index.fetch(r,P),i=n.get(e);if(null==i)(i=new Map).set(t,1),n.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},n.prototype.removeTerm=function(e,t,r){if(this._index.has(r)){var n=this._index.fetch(r,P),i=n.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,r):i.get(t)<=1?i.size<=1?n.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(r).size&&this._index.delete(r)}else this.warnDocumentChanged(t,e,r)},n.prototype.warnDocumentChanged=function(e,r,n){var i,o;if(null!=console&&null!=console.warn)try{for(var a=t(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var l=s.value;if(this._fieldIds[l]===r)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(l,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},n.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},n.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},n.prototype.addFieldLength=function(e,t,r,n){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=n;var o=(this._avgFieldLength[t]||0)*r+n;this._avgFieldLength[t]=o/(r+1)},n.prototype.removeFieldLength=function(e,t,r,n){var i=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=i/(r-1)},n.prototype.saveStoredFields=function(e,r){var n,i,o=this._options,a=o.storeFields,s=o.extractField;if(null!=a&&0!==a.length){var l=this._storedFields.get(e);null==l&&this._storedFields.set(e,l={});try{for(var u=t(a),c=u.next();!c.done;c=u.next()){var d=c.value,h=s(r,d);void 0!==h&&(l[d]=h)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}},n}(),M=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),S=((n={}).or=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.get(s);if(null==l)e.set(s,r.get(s));else{var u=r.get(s),c=u.score,d=u.terms,h=u.match;l.score=l.score+c,l.match=Object.assign(l.match,h),C(l.terms,d)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n.and=function(e,r){var n,i,o=new Map;try{for(var a=t(r.keys()),s=a.next();!s.done;s=a.next()){var l=s.value,u=e.get(l);if(null!=u){var c=r.get(l),d=c.score,h=c.terms,p=c.match;C(u.terms,h),o.set(l,{score:u.score+d,terms:u.terms,match:Object.assign(u.match,p)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},n.and_not=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;e.delete(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n),I=s((function(e,t,r,n,i){return Math.log(1+(r-t+.5)/(t+.5))*(.5+2.2*e/(e+1.2*(1-.7+.7*n/i)))}),"calcBM25Score"),E=s((function(e){return function(t,r,n){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,r,n):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,r,n):!0===e.prefix}}}),"termToQuerySpec"),k={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(N)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},O={combineWith:b,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},T={prefix:function(e,t,r){return t===r.length-1}},x=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),C=s((function(e,r){var n,i;try{for(var o=t(r),a=o.next();!a.done;a=o.next()){var s=a.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),A=s((function(e,t){var r=e.score;return t.score-r}),"byScore"),P=s((function(){return new Map}),"createMap"),j=s((function(e){var r,n,i=new Map;try{for(var o=t(Object.keys(e)),a=o.next();!a.done;a=o.next()){var s=a.value;i.set(parseInt(s,10),e[s])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}),"objectToNumericMap"),N=/[\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;return w},"object"==typeof e&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define(n):(r="undefined"!=typeof globalThis?globalThis:r||self).MiniSearch=n()}));cm(exports,{Mappedin:()=>Ln,MappedinDestinationSet:()=>xt,OfflineSearch:()=>Ia,getVenue:()=>Sc,getVenueBundle:()=>jc,initialize:()=>yk}),y(),y();var Xf=xn(Nc());y(),y(),y();var Rc=xn(Lc());y();var Fs=class{constructor({origin:e,destination:t,vortex:r,elevationDelta:n=0,distance:i=0,angle:o=0}){let a,s;if(m(this,"origin"),m(this,"destination"),m(this,"vortex"),m(this,"distance"),m(this,"angle"),m(this,"weight"),this.origin=e,this.destination=t,this.vortex=r,this.distance=i,this.angle=o,r?(this.distance=0,this.angle=0,a=void 0!==r.weight&&r.weight>0?r.weight:"elevator"===r.type?2e3:1e3,s=r.multiplier&&r.multiplier>=1?r.multiplier:1,this.weight=n*s+a):(a=t.weight&&t.weight>=0?t.weight:0,s=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*s+a),isNaN(this.angle))throw new Error("nan angle")}};s(Fs,"Edge");var za=Fs;y();var Bs="mi-debug",hm={loggingEnabled(){var e;return"development"===L.env.NODE_ENV||"dev"===L.env.NODE_ENV||"test"===L.env.NODE_ENV||"true"===(null==(e=globalThis.sessionStorage)?void 0:e.getItem(Bs))},log(...e){this.loggingEnabled()&&console.log("[MappedInJS]",...e)},warn(...e){this.loggingEnabled()&&console.warn("[MappedInJS]",...e)},error(...e){console.error("[MappedInJS]",...e)},assert(...e){this.loggingEnabled()&&console.assert(...e)},time(e){this.loggingEnabled()&&console.time(e)},timeEnd(e){this.loggingEnabled()&&console.timeEnd(e)}},te=hm;function fm(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale||1);try{if(!e.georeference)throw new Error(`map ${e.name||e.shortName||e.id} does not have a georeference field`);if(e.georeference.length<3)throw new Error(`map ${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],r=e.georeference[2],n=(0,Rc.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:r.target.x,longitude:r.target.y}),i=t.control.x-r.control.x,o=t.control.y-r.control.y;return Math.sqrt(i*i+o*o)/n}catch(e){return te.error(e),1}}function mm(e,t){let r=e.x-t.x,n=e.y-t.y;return(Math.atan2(n,r)+2.5*Math.PI)%(2*Math.PI)}s(fm,"getMapScale"),s(mm,"getAngle");var qs=class{constructor({nodes:e,vortexes:t,maps:r,showVortexNames:n=!1}){m(this,"edges"),m(this,"nodesById"),m(this,"mapsById"),this.edges={},this.mapsById=r.map((e=>({...e,_scale:fm(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:n?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})=>{let r=this.nodesById[t];return new za({angle:mm(e,r),destination:r,distance:this.getDistance(e,r),origin:e})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let r=this.nodesById[e.nodes[t]];if(t++,null==r)continue;let n=t;for(;n<e.nodes.length;){let t=this.nodesById[e.nodes[n]];if(n++,null==t)continue;let i=this.mapsById[r.map].elevation||0,o=this.mapsById[t.map].elevation||0,a=Math.abs(i-o);this.edges[r.id].push(new za({destination:t,elevationDelta:a,origin:r,vortex:e})),this.edges[t.id].push(new za({destination:r,elevationDelta:a,origin:t,vortex:e}))}}}))}aStar(e,t,r){let n=e.map((e=>this.nodesById[e])).filter((e=>e)),i=t.map((e=>this.nodesById[e])).filter((e=>e));if(0===n.length||0===i.length)return[];let o=[],a={},s={};for(n.forEach((e=>{let t=this.getShortestEuclideanDistance(e,i);o.push({origin:e,priority:t}),a[e.id]=null,s[e.id]=0})),o.sort(((e,t)=>e.priority-t.priority));o.length>0;){let e=o[0];if(i.includes(e.origin)){let t=[],r=a[e.origin.id];for(;null!=r;){t.push(r);let e=a[r.origin.id];r=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let n=t.vortex&&!1===t.vortex.accessible;if(r&&(n||!1===t.origin.accessible||!1===t.destination.accessible))continue;let l=s[e.origin.id]+t.weight;if(null==s[t.destination.id]||l<s[t.destination.id]){s[t.destination.id]=l;let e=l+this.getShortestEuclideanDistance(t.destination,i);o.push({origin:t.destination,priority:e}),a[t.destination.id]=t}}o.splice(0,1),o.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let r,n=e.x-t.x,i=e.y-t.y,o=n*n+i*i;return r=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/r}getShortestEuclideanDistance(e,t){return t.reduce(((t,r)=>{let n=this.getDistance(e,r);return Math.min(t,n)}),Number.MAX_VALUE)}};s(qs,"NavigationGraph");var et,gt,En,Vs=qs;function gm(e){switch(e){case En.DOWN:case En.UP:return`${e} `;default:return""}}y(),y(),function(e){e.DEPARTURE="Departure",e.TAKEVORTEX="TakeVortex",e.EXITVORTEX="ExitVortex",e.TURN="Turn",e.ARRIVAL="Arrival"}(et||(et={})),function(e){e.STRAIGHT="Straight",e.RIGHT="Right",e.SLIGHTRIGHT="SlightRight",e.LEFT="Left",e.SLIGHTLEFT="SlightLeft"}(gt||(gt={})),function(e){e.UP="up",e.DOWN="down",e.NONE="none"}(En||(En={})),s(gm,"vortexDirectionTest");var Us=class{constructor({origin:e,action:t,distance:r,atLocation:n,instruction:i}){m(this,"node"),m(this,"instruction"),m(this,"action"),m(this,"atLocation"),m(this,"type"),m(this,"distance",0),this.node=e,this.action=t,this.distance=r||0,this.atLocation=n,this.instruction="",i?this.instruction=i:(null!=t&&t.type===et.DEPARTURE?this.instruction=null!=n?`Depart from ${n.name}`:"Depart from current location":null!=t&&t.type===et.ARRIVAL?this.instruction=null!=n?`Arrive at ${n.name}`:"Arrive at destination":null!=t&&t.type===et.TAKEVORTEX?this.instruction=`Take ${n&&n.name} ${gm(t.direction)}to ${t.toMap.name}`:null!=t&&t.type===et.EXITVORTEX?this.instruction=`Exit ${n&&n.name} at ${t.toMap.name}`:null!=t&&t.bearing===gt.RIGHT?this.instruction="Turn right":null!=t&&t.bearing===gt.SLIGHTRIGHT?this.instruction="Turn slightly right":null!=t&&t.bearing===gt.STRAIGHT?this.instruction="Head straight":null!=t&&t.bearing===gt.SLIGHTLEFT?this.instruction="Turn slightly left":null!=t&&t.bearing===gt.LEFT&&(this.instruction="Turn left"),null!=t&&t.type===et.TURN&&n&&(this.instruction+=` at ${n.name}`))}};s(Us,"Directive");var Fa,In=Us;(Fa||(Fa={})).NO_VALID_PATH="No Valid Path Available";var Ba=.1*Math.PI;function qa(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(qa,"differenceBetweenAngles");var Gs=class{constructor({locations:e,nodes:t,vortexes:r,maps:n,showVortexNames:i}){m(this,"graph"),m(this,"locationsByNodeId"),this.graph=new Vs({maps:n,nodes:t,showVortexNames:i,vortexes:r}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((r=>{e[r.node]=t})),t.polygons&&t.polygons.forEach((r=>{r.entrances&&r.entrances.forEach((r=>{e[r]=t}))})),e)),{})}getClosestLocationInRay(e,t=.5*Math.PI,r=10){let n=0,i=0,o=e;for(;Math.abs(n)<t&&i<r;){let e=this.graph.edges[o.destination.id],a=null,s=0;for(let t of e)if(t.distance>0)if(null!=a){let e=-qa(o.angle,t.angle);Math.abs(e)<Math.abs(s)&&(a=t,s=e)}else a=t,s=-qa(o.angle,t.angle);if(null==a)return null;{if(Math.abs(s)>=t||(n+=s,i+=a.distance,Math.abs(n)>=t||i>r))return null;let e=this.locationsByNodeId[a.destination.id];if(null!=e)return e;o=a}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:r,departFrom:n,arriveAt:i}){let o=this.graph.aStar(e,t,r);if(0===o.length)return{distance:0,instructions:[new In({distance:0,instruction:Fa.NO_VALID_PATH})],path:[]};let a=0,s=new Array(o.length+1);for(let e=0;e<o.length;e++)s[e]=o[e].origin;s[o.length]=o[o.length-1].destination;let l=[],u=null,c=null,d=0,h=0;for(let e=0;e<o.length;e++){let t=o[e],r=t.origin,s=t.destination;if(a+=t.distance,d+=(null==c?void 0:c.distance)||0,0===e&&l.push(new In({action:{type:et.DEPARTURE},atLocation:n,distance:0,origin:r})),null!=t.vortex){let e=this.graph.mapsById[r.map],n=this.graph.mapsById[s.map],i=En.NONE;if(null!=e.elevation&&null!=n.elevation){let t=e.elevation-n.elevation;t>0?i=En.DOWN:t<0&&(i=En.UP)}l.push(new In({action:{direction:i,fromMap:e,toMap:n,type:et.TAKEVORTEX},atLocation:t.vortex,distance:d,origin:r})),h+=d,d=0}else if(null!=u&&null!=c)if(null!=c.vortex){let e=this.graph.mapsById[u.map],t=this.graph.mapsById[c.destination.map];l.push(new In({action:{fromMap:e,toMap:t,type:et.EXITVORTEX},atLocation:c.vortex,distance:d,origin:r})),h+=d,d=0}else{let e=this.graph.edges[r.id].filter((e=>e.destination!==u&&e.destination!==t.destination));if(e.length>0){let n=-qa(c.angle,t.angle),i=e.reduce(((e,r)=>{let n=-qa(t.angle,r.angle);return Math.min(e,Math.abs(n))}),Math.PI);if(Math.abs(n)>=Ba||Math.abs(i)<=Ba){let e;e=n<=-Math.PI/4?gt.RIGHT:n<=-Ba?gt.SLIGHTRIGHT:n<=Ba?gt.STRAIGHT:n<=Math.PI/4?gt.SLIGHTLEFT:gt.LEFT;let t=this.locationsByNodeId[r.id];if(t||(t=this.getClosestLocationInRay(c,.5*Math.PI,10)),null!=t){let n=new In({action:{bearing:e,referencePosition:"At",type:et.TURN},atLocation:t,distance:d,origin:r});n.type=e,l.push(n)}else l.push(new In({action:{bearing:e,referencePosition:"At",type:et.TURN},distance:d,origin:r}));h+=d,d=0}}}e===o.length-1&&(l.push(new In({action:{type:et.ARRIVAL},atLocation:i,distance:a-h<0?0:a-h,origin:t.destination})),h+=d,d=0),u=r,c=t}let p=[],f=null;for(let e=l.length-1;e>=0;e--){let t=l[e],{action:r}=t;r&&r.type===et.TAKEVORTEX?(f=t.node,p.unshift(t)):r&&r.type===et.TURN&&null!=f?this.graph.getDistance(t.node,f)>5&&p.unshift(t):p.unshift(t)}return{distance:a,instructions:p,path:s}}};s(Gs,"Navigator");var Ws=Gs;function Hs(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return Dc(this.cover(t,r),t,r,e)}function Dc(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o,a,s,l,u,c,d,h,p=e._root,f={data:n},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=r>=(a=(v+m)/2))?v=a:m=a,i=p,!(p=p[d=c<<1|u]))return i[d]=f,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&r===l)return f.next=p,i?i[d]=f:e._root=f,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(v+m)/2))?v=a:m=a}while((d=c<<1|u)==(h=(l>=a)<<1|s>=o));return i[h]=p,i[d]=f,e}function zc(e){var t,r,n,i,o=e.length,a=new Array(o),s=new Array(o),l=1/0,u=1/0,c=-1/0,d=-1/0;for(r=0;r<o;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(i=+this._y.call(null,t))||(a[r]=n,s[r]=i,n<l&&(l=n),n>c&&(c=n),i<u&&(u=i),i>d&&(d=i));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),r=0;r<o;++r)Dc(this,a[r],s[r],e[r]);return this}function $s(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a,s,l=i-r||1,u=this._root;r>e||e>=i||n>t||t>=o;)switch(s=(t<n)<<1|e<r,a=new Array(4),a[s]=u,u=a,l*=2,s){case 0:i=r+l,o=n+l;break;case 1:r=i-l,o=n+l;break;case 2:i=r+l,n=o-l;break;case 3:r=i-l,n=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function Ks(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Xs(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 rt(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function Ys(e,t,r){var n,i,o,a,s,l,u,c=this._x0,d=this._y0,h=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new rt(g,c,d,h,p)),null==r?r=1/0:(c=e-r,d=t-r,h=e+r,p=t+r,r*=r);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<c||(s=l.y1)<d))if(g.length){var v=(i+a)/2,y=(o+s)/2;f.push(new rt(g[3],v,y,a,s),new rt(g[2],i,y,v,s),new rt(g[1],v,o,a,y),new rt(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),_=t-+this._y.call(null,g.data),b=m*m+_*_;if(b<r){var w=Math.sqrt(r=b);c=e-w,d=t-w,h=e+w,p=t+w,n=g.data}}return n}function Js(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,i,o,a,s,l,u,c,d,h,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>=(s=(f+v)/2))?f=s:v=s,(c=a>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[d=c<<1|u]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,h=d)}for(;p.data!==e;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)}function Fc(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function Zs(){return this._root}function Qs(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function el(e){var t,r,n,i,o,a,s=[],l=this._root;for(l&&s.push(new rt(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,n=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var u=(n+o)/2,c=(i+a)/2;(r=l[3])&&s.push(new rt(r,u,c,o,a)),(r=l[2])&&s.push(new rt(r,n,c,u,a)),(r=l[1])&&s.push(new rt(r,u,i,o,c)),(r=l[0])&&s.push(new rt(r,n,i,u,c))}return this}function tl(e){var t,r=[],n=[];for(this._root&&r.push(new rt(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,l=t.x1,u=t.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&r.push(new rt(o,a,s,c,d)),(o=i[1])&&r.push(new rt(o,c,s,l,d)),(o=i[2])&&r.push(new rt(o,a,d,c,u)),(o=i[3])&&r.push(new rt(o,c,d,l,u))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function Bc(e){return e[0]}function nl(e){return arguments.length?(this._x=e,this):this._x}function qc(e){return e[1]}function rl(e){return arguments.length?(this._y=e,this):this._y}function $r(e,t,r){var n=new il(null==t?Bc:t,null==r?qc:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function il(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function Vc(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}y(),y(),y(),y(),s(Hs,"default"),s(Dc,"add"),s(zc,"addAll"),y(),s($s,"default"),y(),s(Ks,"default"),y(),s(Xs,"default"),y(),y(),s(rt,"default"),s(Ys,"default"),y(),s(Js,"default"),s(Fc,"removeAll"),y(),s(Zs,"default"),y(),s(Qs,"default"),y(),s(el,"default"),y(),s(tl,"default"),y(),s(Bc,"defaultX"),s(nl,"default"),y(),s(qc,"defaultY"),s(rl,"default"),s($r,"quadtree"),s(il,"Quadtree"),s(Vc,"leaf_copy");var ht=$r.prototype=il.prototype;ht.copy=function(){var e,t,r=new il(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=Vc(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=Vc(t));return r},ht.add=Hs,ht.addAll=zc,ht.cover=$s,ht.data=Ks,ht.extent=Xs,ht.find=Ys,ht.remove=Js,ht.removeAll=Fc,ht.root=Zs,ht.size=Qs,ht.visit=el,ht.visitAfter=tl,ht.x=nl,ht.y=rl;var $t,tt,qn=class{constructor(e){F(this,$t,void 0),m(this,"categories"),m(this,"locations"),m(this,"vortexes"),m(this,"maps"),m(this,"nodes"),m(this,"polygons"),m(this,"events"),m(this,"mapGroups"),m(this,"locationStates"),m(this,"rankings"),F(this,tt,{}),V(this,$t,e)}get polygonsByMapId(){if(g(this,tt).polygonsByMapId)return g(this,tt).polygonsByMapId;let e,t={};for(let r=0,n=g(this,$t).polygons.length;r<n;++r)e=g(this,$t).polygons[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return g(this,tt).polygonsByMapId=r,g(this,tt).polygonsByMapId}get nodesByMapId(){if(g(this,tt).nodesByMapId)return g(this,tt).nodesByMapId;let e,t={};for(let r=0,n=g(this,$t).nodes.length;r<n;++r)e=g(this,$t).nodes[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return g(this,tt).nodesByMapId=r,g(this,tt).nodesByMapId}findNearestNodeOnMap(e,t){var r;if(g(this,tt).nodeTreesByMap||(g(this,tt).nodeTreesByMap=new Map),!g(this,tt).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=$r();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),g(this,tt).nodeTreesByMap.set(e,n)}return g(this,tt).nodeTreesByMap.get(e).find(t.x,t.y)}get locationsByMapId(){if(g(this,tt).locationsByMapId)return g(this,tt).locationsByMapId;let e,t={};for(let r=0,n=g(this,$t).locations.length;r<n;++r){e=g(this,$t).locations[r];for(let r=0,n=e.polygons.length;r<n;++r)t[e.polygons[r].map.id]||(t[e.polygons[r].map.id]=[]),t[e.polygons[r].map.id].push(e)}let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return g(this,tt).locationsByMapId=r,g(this,tt).locationsByMapId}static create(e){return qn.instances.has(e)||qn.instances.set(e,new qn(e)),qn.instances.get(e)}static clear(){qn.instances.clear()}},Va=qn;s(Va,"MappedinCache"),$t=new WeakMap,tt=new WeakMap,m(Va,"instances",new Map);var Tt=Va;y(),y(),y(),y();var Uc=" ",ct=class{static get separator(){return Uc}static set separator(e){Uc=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 r=null;switch(t.length){case 3:r=t[0]/1+t[1]/60+t[2]/3600;break;case 2:r=t[0]/1+t[1]/60;break;case 1:r=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(r=-r),Number(r)}static toDms(e,t="d",r){if(isNaN(e)||"string"==typeof e&&""==e.trim()||"boolean"==typeof e||e==1/0||null==e)return null;if(void 0===r)switch(t){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:t="d",r=4}e=Math.abs(e);let n=null,i=null,o=null,a=null;switch(t){default:case"d":case"deg":i=e.toFixed(r),i<100&&(i="0"+i),i<10&&(i="0"+i),n=i+"°";break;case"dm":case"deg+min":i=Math.floor(e),o=(60*e%60).toFixed(r),60==o&&(o=(0).toFixed(r),i++),i=("000"+i).slice(-3),o<10&&(o="0"+o),n=i+"°"+ct.separator+o+"′";break;case"dms":case"deg+min+sec":i=Math.floor(e),o=Math.floor(3600*e/60)%60,a=(3600*e%60).toFixed(r),60==a&&(a=(0).toFixed(r),o++),60==o&&(o=0,i++),i=("000"+i).slice(-3),o=("00"+o).slice(-2),a<10&&(a="0"+a),n=i+"°"+ct.separator+o+"′"+ct.separator+a+"″"}return n}static toLat(e,t,r){let n=ct.toDms(ct.wrap90(e),t,r);return null===n?"–":n.slice(1)+ct.separator+(e<0?"S":"N")}static toLon(e,t,r){let n=ct.toDms(ct.wrap180(e),t,r);return null===n?"–":n+ct.separator+(e<0?"W":"E")}static toBrng(e,t,r){let n=ct.toDms(ct.wrap360(e),t,r);return null===n?"–":n.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(r.thousands,"⁜").replace(r.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",r.decimal).replace("⁜",r.thousands)}static compassPoint(e,t=3){if(![1,2,3].includes(Number(t)))throw new RangeError(`invalid precision ‘${t}’`);e=ct.wrap360(e);let r=4*2**(t-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(e*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(ct,"Dms"),Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var Ae=ct,He=Math.PI,me=class{constructor(e,t){if(isNaN(e))throw new TypeError(`invalid lat ‘${e}’`);if(isNaN(t))throw new TypeError(`invalid lon ‘${t}’`);this._lat=Ae.wrap90(Number(e)),this._lon=Ae.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?Ae.wrap90(Ae.parse(e)):Ae.wrap90(Number(e)),isNaN(this._lat))throw new TypeError(`invalid lat ‘${e}’`)}set latitude(e){if(this._lat=isNaN(e)?Ae.wrap90(Ae.parse(e)):Ae.wrap90(Number(e)),isNaN(this._lat))throw new TypeError(`invalid latitude ‘${e}’`)}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?Ae.wrap180(Ae.parse(e)):Ae.wrap180(Number(e)),isNaN(this._lon))throw new TypeError(`invalid lon ‘${e}’`)}set lng(e){if(this._lon=isNaN(e)?Ae.wrap180(Ae.parse(e)):Ae.wrap180(Number(e)),isNaN(this._lon))throw new TypeError(`invalid lng ‘${e}’`)}set longitude(e){if(this._lon=isNaN(e)?Ae.wrap180(Ae.parse(e)):Ae.wrap180(Number(e)),isNaN(this._lon))throw new TypeError(`invalid longitude ‘${e}’`)}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...e){if(0==e.length)throw new TypeError("invalid (empty) point");if(null===e[0]||null===e[1])throw new TypeError("invalid (null) point");let t,r;if(2==e.length&&([t,r]=e,t=Ae.wrap90(Ae.parse(t)),r=Ae.wrap180(Ae.parse(r)),isNaN(t)||isNaN(r)))throw new TypeError(`invalid point ‘${e.toString()}’`);if(1==e.length&&"string"==typeof e[0]&&([t,r]=e[0].split(","),t=Ae.wrap90(Ae.parse(t)),r=Ae.wrap180(Ae.parse(r)),isNaN(t)||isNaN(r)))throw new TypeError(`invalid point ‘${e[0]}’`);if(1==e.length&&"object"==typeof e[0]){let n=e[0];if("Point"==n.type&&Array.isArray(n.coordinates)?[r,t]=n.coordinates:(null!=n.latitude&&(t=n.latitude),null!=n.lat&&(t=n.lat),null!=n.longitude&&(r=n.longitude),null!=n.lng&&(r=n.lng),null!=n.lon&&(r=n.lon),t=Ae.wrap90(Ae.parse(t)),r=Ae.wrap180(Ae.parse(r))),isNaN(t)||isNaN(r))throw new TypeError(`invalid point ‘${JSON.stringify(e[0])}’`)}if(isNaN(t)||isNaN(r))throw new TypeError(`invalid point ‘${e.toString()}’`);return new me(t,r)}distanceTo(e,t=6371e3){if(e instanceof me||(e=me.parse(e)),isNaN(t))throw new TypeError(`invalid radius ‘${t}’`);let r=t,n=this.lat.toRadians(),i=this.lon.toRadians(),o=e.lat.toRadians(),a=o-n,s=e.lon.toRadians()-i,l=Math.sin(a/2)*Math.sin(a/2)+Math.cos(n)*Math.cos(o)*Math.sin(s/2)*Math.sin(s/2);return r*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}initialBearingTo(e){if(e instanceof me||(e=me.parse(e)),this.equals(e))return NaN;let t=this.lat.toRadians(),r=e.lat.toRadians(),n=(e.lon-this.lon).toRadians(),i=Math.cos(t)*Math.sin(r)-Math.sin(t)*Math.cos(r)*Math.cos(n),o=Math.sin(n)*Math.cos(r),a=Math.atan2(o,i).toDegrees();return Ae.wrap360(a)}finalBearingTo(e){e instanceof me||(e=me.parse(e));let t=e.initialBearingTo(this)+180;return Ae.wrap360(t)}midpointTo(e){e instanceof me||(e=me.parse(e));let t=this.lat.toRadians(),r=this.lon.toRadians(),n=e.lat.toRadians(),i=(e.lon-this.lon).toRadians(),o=Math.cos(t),a=0,s=Math.sin(t),l={x:o+Math.cos(n)*Math.cos(i),y:a+Math.cos(n)*Math.sin(i),z:s+Math.sin(n)},u=Math.atan2(l.z,Math.sqrt(l.x*l.x+l.y*l.y)),c=r+Math.atan2(l.y,l.x),d=u.toDegrees(),h=c.toDegrees();return new me(d,h)}intermediatePointTo(e,t){if(e instanceof me||(e=me.parse(e)),this.equals(e))return new me(this.lat,this.lon);let r=this.lat.toRadians(),n=this.lon.toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),a=i-r,s=o-n,l=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(s/2)*Math.sin(s/2),u=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),c=Math.sin((1-t)*u)/Math.sin(u),d=Math.sin(t*u)/Math.sin(u),h=c*Math.cos(r)*Math.cos(n)+d*Math.cos(i)*Math.cos(o),p=c*Math.cos(r)*Math.sin(n)+d*Math.cos(i)*Math.sin(o),f=c*Math.sin(r)+d*Math.sin(i),g=Math.atan2(f,Math.sqrt(h*h+p*p)),v=Math.atan2(p,h),y=g.toDegrees(),m=v.toDegrees();return new me(y,m)}destinationPoint(e,t,r=6371e3){let n=e/r,i=Number(t).toRadians(),o=this.lat.toRadians(),a=this.lon.toRadians(),s=Math.sin(o)*Math.cos(n)+Math.cos(o)*Math.sin(n)*Math.cos(i),l=Math.asin(s),u=Math.sin(i)*Math.sin(n)*Math.cos(o),c=Math.cos(n)-Math.sin(o)*s,d=a+Math.atan2(u,c),h=l.toDegrees(),p=d.toDegrees();return new me(h,p)}static intersection(e,t,r,n){if(e instanceof me||(e=me.parse(e)),r instanceof me||(r=me.parse(r)),isNaN(t))throw new TypeError(`invalid brng1 ‘${t}’`);if(isNaN(n))throw new TypeError(`invalid brng2 ‘${n}’`);let i=e.lat.toRadians(),o=e.lon.toRadians(),a=r.lat.toRadians(),s=r.lon.toRadians(),l=Number(t).toRadians(),u=Number(n).toRadians(),c=a-i,d=s-o,h=2*Math.asin(Math.sqrt(Math.sin(c/2)*Math.sin(c/2)+Math.cos(i)*Math.cos(a)*Math.sin(d/2)*Math.sin(d/2)));if(Math.abs(h)<Number.EPSILON)return new me(e.lat,e.lon);let p=(Math.sin(a)-Math.sin(i)*Math.cos(h))/(Math.sin(h)*Math.cos(i)),f=(Math.sin(i)-Math.sin(a)*Math.cos(h))/(Math.sin(h)*Math.cos(a)),g=Math.acos(Math.min(Math.max(p,-1),1)),v=Math.acos(Math.min(Math.max(f,-1),1)),y=l-(Math.sin(s-o)>0?g:2*He-g),m=(Math.sin(s-o)>0?2*He-v:v)-u;if(0==Math.sin(y)&&0==Math.sin(m)||Math.sin(y)*Math.sin(m)<0)return null;let _=-Math.cos(y)*Math.cos(m)+Math.sin(y)*Math.sin(m)*Math.cos(h),b=Math.atan2(Math.sin(h)*Math.sin(y)*Math.sin(m),Math.cos(m)+Math.cos(y)*_),w=Math.asin(Math.min(Math.max(Math.sin(i)*Math.cos(b)+Math.cos(i)*Math.sin(b)*Math.cos(l),-1),1)),M=o+Math.atan2(Math.sin(l)*Math.sin(b)*Math.cos(i),Math.cos(b)-Math.sin(i)*Math.sin(w)),S=w.toDegrees(),I=M.toDegrees();return new me(S,I)}crossTrackDistanceTo(e,t,r=6371e3){e instanceof me||(e=me.parse(e)),t instanceof me||(t=me.parse(t));let n=r;if(this.equals(e))return 0;let i=e.distanceTo(this,n)/n,o=e.initialBearingTo(this).toRadians(),a=e.initialBearingTo(t).toRadians();return Math.asin(Math.sin(i)*Math.sin(o-a))*n}alongTrackDistanceTo(e,t,r=6371e3){e instanceof me||(e=me.parse(e)),t instanceof me||(t=me.parse(t));let n=r;if(this.equals(e))return 0;let i=e.distanceTo(this,n)/n,o=e.initialBearingTo(this).toRadians(),a=e.initialBearingTo(t).toRadians(),s=Math.asin(Math.sin(i)*Math.sin(o-a));return Math.acos(Math.cos(i)/Math.abs(Math.cos(s)))*Math.sign(Math.cos(a-o))*n}maxLatitude(e){let t=Number(e).toRadians(),r=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(r))).toDegrees()}static crossingParallels(e,t,r){if(e.equals(t))return null;let n=Number(r).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),a=t.lat.toRadians(),s=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.sin(s),u=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.cos(s)-Math.cos(i)*Math.sin(a)*Math.cos(n),c=Math.cos(i)*Math.cos(a)*Math.sin(n)*Math.sin(s);if(c*c>l*l+u*u)return null;let d=Math.atan2(-u,l),h=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+d+h,f=(o+d-h).toDegrees(),g=p.toDegrees();return{lon1:Ae.wrap180(f),lon2:Ae.wrap180(g)}}rhumbDistanceTo(e,t=6371e3){e instanceof me||(e=me.parse(e));let r=t,n=this.lat.toRadians(),i=e.lat.toRadians(),o=i-n,a=Math.abs(e.lon-this.lon).toRadians();Math.abs(a)>He&&(a=a>0?-(2*He-a):2*He+a);let s=Math.log(Math.tan(i/2+He/4)/Math.tan(n/2+He/4)),l=Math.abs(s)>1e-11?o/s:Math.cos(n);return Math.sqrt(o*o+l*l*a*a)*r}rhumbBearingTo(e){if(e instanceof me||(e=me.parse(e)),this.equals(e))return NaN;let t=this.lat.toRadians(),r=e.lat.toRadians(),n=(e.lon-this.lon).toRadians();Math.abs(n)>He&&(n=n>0?-(2*He-n):2*He+n);let i=Math.log(Math.tan(r/2+He/4)/Math.tan(t/2+He/4)),o=Math.atan2(n,i).toDegrees();return Ae.wrap360(o)}rhumbDestinationPoint(e,t,r=6371e3){let n=this.lat.toRadians(),i=this.lon.toRadians(),o=Number(t).toRadians(),a=e/r,s=a*Math.cos(o),l=n+s;Math.abs(l)>He/2&&(l=l>0?He-l:-He-l);let u=Math.log(Math.tan(l/2+He/4)/Math.tan(n/2+He/4)),c=Math.abs(u)>1e-11?s/u:Math.cos(n),d=i+a*Math.sin(o)/c,h=l.toDegrees(),p=d.toDegrees();return new me(h,p)}rhumbMidpointTo(e){e instanceof me||(e=me.parse(e));let t=this.lat.toRadians(),r=this.lon.toRadians(),n=e.lat.toRadians(),i=e.lon.toRadians();Math.abs(i-r)>He&&(r+=2*He);let o=(t+n)/2,a=Math.tan(He/4+t/2),s=Math.tan(He/4+n/2),l=Math.tan(He/4+o/2),u=((i-r)*Math.log(l)+r*Math.log(s)-i*Math.log(a))/Math.log(s/a);isFinite(u)||(u=(r+i)/2);let c=o.toDegrees(),d=u.toDegrees();return new me(c,d)}static areaOf(e,t=6371e3){let r=t,n=e[0].equals(e[e.length-1]);n||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let r=e[t].lat.toRadians(),n=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(r/2)+Math.tan(n/2)),1+Math.tan(r/2)*Math.tan(n/2))}s(e)&&(o=Math.abs(o)-2*He);let a=Math.abs(o*r*r);return n||e.pop(),a;function s(e){let t=0,r=e[0].initialBearingTo(e[1]);for(let n=0;n<e.length-1;n++){let i=e[n].initialBearingTo(e[n+1]),o=e[n].finalBearingTo(e[n+1]);t+=(i-r+540)%360-180,t+=(o-i+540)%360-180,r=o}return t+=(e[0].initialBearingTo(e[1])-r+540)%360-180,Math.abs(t)<90}}equals(e){return e instanceof me||(e=me.parse(e)),!(Math.abs(this.lat-e.lat)>Number.EPSILON||Math.abs(this.lon-e.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 ‘${e}’`);if("n"==e)return null==t&&(t=4),`${this.lat.toFixed(t)},${this.lon.toFixed(t)}`;return`${Ae.toLat(this.lat,e,t)}, ${Ae.toLon(this.lon,e,t)}`}};s(me,"LatLonSpherical"),y(),y(),y();var xt=class{constructor(e){m(this,"destinations",[]),this.destinations=e}};s(xt,"MappedinDestinationSet"),y();var Kr,an,sr=class{constructor(e,t){F(this,Kr,void 0),F(this,an,void 0),m(this,"distance",0),m(this,"path",[]),m(this,"instructions",[]),V(this,an,e),V(this,Kr,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,r,n,i,o,a,s,l,u,c,d,h;let p={...e,action:{...e.action},atLocation:(null==(t=e.atLocation)?void 0:t.id)?null==(n=null==(r=g(this,an))?void 0:r._vortexesById)?void 0:n[e.atLocation.id]:void 0,node:(null==(i=e.node)?void 0:i.id)?null==(a=null==(o=g(this,an))?void 0:o._nodesById)?void 0:a[e.node.id]:void 0};return((null==(s=p.action)?void 0:s.type)===et.TAKEVORTEX||(null==(l=p.action)?void 0:l.type)===et.EXITVORTEX)&&(p.action.fromMap=null==(c=g(this,an)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],p.action.toMap=null==(h=g(this,an)._mapsById)?void 0:h[null==(d=p.action)?void 0:d.toMap.id]),p})),this.path=t.path.map((e=>{var t,r;return null==(r=null==(t=g(this,an))?void 0:t._nodesById)?void 0:r[e.id]}))}toJSON(){return g(this,Kr)}};s(sr,"MappedinDirections"),Kr=new WeakMap,an=new WeakMap;var On,on=class{constructor(e){F(this,On,void 0),V(this,On,e)}directionsTo(e,t){if(e instanceof xt){let r=[],n=this;for(let i=0;i<e.destinations.length;i++){let o=e.destinations[i],a=Xr(n),s=Xr(o),l=g(this,On).navigator.getDirections({originIds:a,destinationNodeIds:s,accessible:(null==t?void 0:t.accessible)||!1}),u=new sr(g(this,On),l);r.push(u),n=o}return r}{let r=Xr(this),n=Xr(e),i=g(this,On).navigator.getDirections({originIds:r,destinationNodeIds:n,accessible:(null==t?void 0:t.accessible)||!1});return new sr(g(this,On),i)}}distanceTo(e,t){let r=this.directionsTo(e,t);return(null==r?void 0:r.distance)||0}};s(on,"MappedinNavigatable"),On=new WeakMap,y();var No=xn(Wp()),Al={production:"40ead723d18886045e302513245edb27",development:""},fr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},hi=class{constructor(e){this.event_properties=e,m(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(hi,"AnalyticsCategorySelectedCall");var fi=class{constructor(e){this.event_properties=e,m(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(fi,"AnalyticsLocationSelectedCall");var Nl=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Nl,"BlueDotDisableCall");var Ll=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Ll,"BlueDotEnableCall");var Rl=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(Rl,"BlueDotOffCall");var Dl=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Dl,"BlueDotOnCall");var zl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(zl,"CameraAnimateCall");var Fl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Fl,"CameraCancelAnimationCall");var Bl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Bl,"CameraFocusOnCall");var ql=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(ql,"CameraGetSafeAreaInsetsCall");var Vl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Vl,"CameraInteractionDisableCall");var Ul=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Ul,"CameraInteractionEnableCall");var Gl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Gl,"CameraSetCall");var Wl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(Wl,"CameraSetSafeAreaInsetsCall");var Hl=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Hl,"CameraTranslateCall");var $l=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s($l,"FlatLabelsAddCall");var Kl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Kl,"FlatLabelsLabelAllLocationsCall");var Xl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(Xl,"FlatLabelsRemoveCall");var Yl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(Yl,"FlatLabelsRemoveAllCall");var Jl=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(Jl,"FlatLabelsSetAppearanceCall");var Zl=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(Zl,"FloatingLabelsAddCall");var Ql=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(Ql,"FloatingLabelsLabelAllLocationsCall");var eu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(eu,"FloatingLabelsRemoveCall");var tu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(tu,"FloatingLabelsRemoveAllCall");var nu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(nu,"FloatingLabelsResetPriorityCall");var ru=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(ru,"FloatingLabelsSetAppearanceCall");var iu=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(iu,"FloatingLabelsSetPriorityCall");var mi=class{constructor(e){this.event_properties=e,m(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(mi,"GlobalGetVenueCall");var Lo=class{constructor(e){this.event_properties=e,m(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(Lo,"GlobalGetVenueMvfCall");var au=class{constructor(e){this.event_properties=e,m(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(au,"GlobalShowVenueCall");var ou=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(ou,"JourneyClearCall");var su=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(su,"JourneyDrawCall");var lu=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(lu,"JourneySetStepCall");var uu=class{constructor(e){this.event_properties=e,m(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(uu,"MappedinGetCollectionItemByIdCall");var cu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(cu,"MappedinCoordinateAbsoluteDistanceToCall");var du=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(du,"MappedinCoordinateNearestNodeCall");var gi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(gi,"MappedinLocationCloneCall");var vi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(vi,"MappedinLocationDirectionsToCall");var yi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(yi,"MappedinLocationDistanceToCall");var pu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(pu,"MappedinMapCreateCoordinateCall");var hu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(hu,"MappedinMapCreateCoordinateByXyCall");var fu=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(fu,"MappedinMapGetNorthCall");var bi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(bi,"MappedinNodeDirectionsToCall");var _i=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(_i,"MappedinNodeDistanceToCall");var wi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(wi,"MappedinPolygonDirectionsToCall");var ki=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(ki,"MappedinPolygonDistanceToCall");var Mi=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(Mi,"MappedinVenueMetadataRead");var mu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(mu,"MapViewAddInteractivePolygonCall");var gu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(gu,"MapViewAddInteractivePolygonsForAllLocationsCall");var vu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(vu,"MapViewClearPolygonColorCall");var yu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(yu,"MapViewCreateCustomTooltipCall");var bu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(bu,"MapViewCreateMarkerCall");var _u=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(_u,"MapViewCreateTooltipCall");var wu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(wu,"MapViewDestroyCall");var ku=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(ku,"MapViewDisableImageFlippingForAllPolygonsCall");var Mu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Mu,"MapViewDrawPathCall");var Tu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Tu,"MapViewEnableImageFlippingForAllLocationsCall");var xu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(xu,"MapViewEnableImageFlippingForPolygonCall");var Eu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(Eu,"MapViewGetNearestNodeByScreenCoordinatesCall");var Iu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Iu,"MapViewGetPolygonAtCoordinateCall");var Ou=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Ou,"MapViewGetPrimaryLocationForPolygonCall");var Su=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Su,"MapViewLabelAllLocationsCall");var ju=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(ju,"MapViewRemoveAllInteractivePolygonsCall");var Pu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Pu,"MapViewRemoveAllMarkersCall");var Cu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Cu,"MapViewRemoveAllPathsCall");var Au=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Au,"MapViewRemoveAllTooltipsCall");var Nu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Nu,"MapViewRemoveInteractivePolygonCall");var Lu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(Lu,"MapViewRemoveMarkerCall");var Ru=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Ru,"MapViewRemovePathCall");var Du=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Du,"MapViewRemoveTooltipCall");var zu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(zu,"MapViewSetBackgroundColorCall");var Fu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(Fu,"MapViewSetHoverColorCall");var Bu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(Bu,"MapViewSetMapCall");var qu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(qu,"MapViewSetPolygonColorCall");var Vu=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(Vu,"MapViewSetStateCall");var Uu=class{constructor(e){this.event_properties=e,m(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(Uu,"MetricsMapLoadEvent");var Ti=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(Ti,"OfflineSearchAddQueryCall");var xi=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(xi,"OfflineSearchConstructorCall");var Ei=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(Ei,"OfflineSearchSearchCall");var Ii=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(Ii,"OfflineSearchSuggestCall");var Ro=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),Gu=class{constructor(){m(this,"disabled",!1),m(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,r;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."),Ro();let n=null;if(e.client&&"apiKey"in e.client?n=e.client.apiKey:"environment"in e&&(n=Al[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(n)return this.amplitude=No.createInstance(),this.amplitude.init(n,void 0,{...fr,...null==(r=e.client)?void 0:r.configuration});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return Ro()}identify(e,t,r){if(!this.isInitializedAndEnabled())return Ro();e&&(r={...r,user_id:e});let n=new No.Identify,i=t;if(null!=i)for(let[e,t]of Object.entries(i))n.set(e,t);return this.amplitude.identify(n,r)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):Ro()}analyticsCategorySelectedCall(e,t){return this.track(new hi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new fi(e),t)}blueDotDisableCall(e,t){return this.track(new Nl(e),t)}blueDotEnableCall(e,t){return this.track(new Ll(e),t)}blueDotOffCall(e,t){return this.track(new Rl(e),t)}blueDotOnCall(e,t){return this.track(new Dl(e),t)}cameraAnimateCall(e,t){return this.track(new zl(e),t)}cameraCancelAnimationCall(e,t){return this.track(new Fl(e),t)}cameraFocusOnCall(e,t){return this.track(new Bl(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new ql(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Vl(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Ul(e),t)}cameraSetCall(e,t){return this.track(new Gl(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Wl(e),t)}cameraTranslateCall(e,t){return this.track(new Hl(e),t)}flatLabelsAddCall(e,t){return this.track(new $l(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Kl(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Xl(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Yl(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Jl(e),t)}floatingLabelsAddCall(e,t){return this.track(new Zl(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Ql(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new eu(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new tu(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new nu(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new ru(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new iu(e),t)}globalGetVenueCall(e,t){return this.track(new mi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new Lo(e),t)}globalShowVenueCall(e,t){return this.track(new au(e),t)}journeyClearCall(e,t){return this.track(new ou(e),t)}journeyDrawCall(e,t){return this.track(new su(e),t)}journeySetStepCall(e,t){return this.track(new lu(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new uu(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new cu(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new du(e),t)}mappedinLocationCloneCall(e,t){return this.track(new gi(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new vi(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new yi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new pu(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new hu(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new fu(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new bi(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new _i(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new wi(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new ki(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new Mi(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new mu(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new gu(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new vu(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new yu(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new bu(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new _u(e),t)}mapViewDestroyCall(e,t){return this.track(new wu(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new ku(e),t)}mapViewDrawPathCall(e,t){return this.track(new Mu(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new Tu(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new xu(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new Eu(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new Iu(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new Ou(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new Su(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new ju(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new Pu(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new Cu(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new Au(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new Nu(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new Lu(e),t)}mapViewRemovePathCall(e,t){return this.track(new Ru(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new Du(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new zu(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new Fu(e),t)}mapViewSetMapCall(e,t){return this.track(new Bu(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new qu(e),t)}mapViewSetStateCall(e,t){return this.track(new Vu(e),t)}metricsMapLoadEvent(e,t){return this.track(new Uu(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new Ti(e),t)}offlineSearchConstructorCall(e,t){return this.track(new xi(e),t)}offlineSearchSearchCall(e,t){return this.track(new Ei(e),t)}offlineSearchSuggestCall(e,t){return this.track(new Ii(e),t)}};s(Gu,"Ampli");var Oi=new Gu;y();var lf=xn(Eh()),uf=xn(tf()),cf=xn(nf());y(),y(),y();var Zn,Ut,Gt,pc=[0,4,6,8,10],mn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let r=0;r<e.length;r++)r>0&&0==(3&r)&&(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;let r=e.map((e=>e.toString(16).padStart(2,"0")));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],pc.map(((e,t)=>r.slice(e,t===pc.length-1?void 0:pc[t+1]).join(""))).join("-")}),"randomId"),rf="mi-session-data",af="mi-local-data",hc=class{constructor(){F(this,Ut,void 0),F(this,Gt,void 0);try{let e=sessionStorage.getItem(rf);V(this,Ut,e?JSON.parse(e):{id:mn()})}catch{V(this,Ut,{id:mn()})}try{let e=localStorage.getItem(af);V(this,Gt,e?JSON.parse(e):{deviceId:mn()})}catch{V(this,Gt,{deviceId:mn()})}g(this,Ut).id||(g(this,Ut).id=mn()),g(this,Gt).deviceId||(g(this,Gt).deviceId=mn())}static getInstance(){return g(this,Zn)||V(this,Zn,new hc),g(this,Zn)}static ___clearInstance(){V(this,Zn,void 0)}saveSessionData(e,t){g(this,Ut)[e]=t;try{return sessionStorage.setItem(rf,JSON.stringify(g(this,Ut))),!0}catch{return!1}}loadSessionData(e){let t=g(this,Ut)[e];if(null!=t)return t}saveLocalData(e,t){g(this,Gt)[e]=t;try{return localStorage.setItem(af,JSON.stringify(g(this,Gt))),!0}catch{return!1}}loadLocalData(e){let t=g(this,Gt)[e];if(null!=t)return t}},wr=hc;function of(e){return/^[\da-f]{24}$/i.test(e)}function rs(){return wr.getInstance().loadLocalData("deviceId")}function is(){return wr.getInstance().loadSessionData("id")}s(wr,"SafeStorage"),Zn=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,F(wr,Zn,void 0),s(of,"isGatewayKey"),s(rs,"getDeviceID"),s(is,"getSessionID");var gn,Qn,Wt,kr,Yt,as,bw,os,_w,qi,df,Vi,pf,Ht,sf="5.2.2",gw="https://api2.amplitude.com/2/httpapi",vw="https://api2.amplitude.com/batch",yw="__unspecified__",fc={branch:"main",version:"0",source:"websdk"},Rt=class{constructor(){if(F(this,as),F(this,os),F(this,qi),F(this,Vi),F(this,Wt,{}),F(this,kr,!1),F(this,Yt,void 0),F(this,Ht,s((async e=>{kw(e.type)&&(window.removeEventListener("visibilitychange",g(this,Ht)),window.removeEventListener("pagehide",g(this,Ht)),window.removeEventListener("beforeunload",g(this,Ht)),window.removeEventListener("unload",g(this,Ht)),await this.sendAllPendingEvents())}),"#handlePageUnload")),!Oi.isLoaded){let{promise:e}=Oi.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",g(this,Ht)),window.addEventListener("beforeunload",g(this,Ht)),window.addEventListener("unload",g(this,Ht)),window.addEventListener("visibilitychange",g(this,Ht))}))}null==g(Rt,Qn)&&V(Rt,Qn,sf),null!=navigator.userAgent&&V(this,Yt,new cf.UAParser(navigator.userAgent).getResult())}static setContext(e){V(Rt,gn,e)}static setVersion(e){V(Rt,Qn,e)}addPendingEvent(e){var t;if(null==g(Rt,gn))return void te.warn("No context defined for product analytics! Event will not be tracked.");let r=e.event_type;if(!ut(this,os,_w).call(this,e))return;null==e.event_properties&&(e.event_properties={});let n=g(this,Wt)[r];(0,uf.default)(e.event_properties,null!=(t=null==n?void 0:n.event_properties)?t:{}),g(this,Wt)[r]=e}async sendAllPendingEvents(){if(null==g(Rt,gn))return void te.warn("No context defined for product analytics! No events will be sent.");if(Object.keys(g(this,Wt)).length<1)return;if(g(this,kr))return void te.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let e=[];for(let t in g(this,Wt)){let r=g(this,Wt)[t],n=ut(this,qi,df).call(this,r);null!=n&&e.push(n)}if(!(e.length<1))try{V(this,kr,!0),200===(await ut(this,Vi,pf).call(this,vw,e)).status&&V(this,Wt,{})}catch(e){te.warn("Error sending batch product analytics!",e)}finally{V(this,kr,!1)}}async sendEventNow(e){if(null==g(Rt,gn))return void te.warn("No context defined for product analytics! No events will be sent.");let t=ut(this,qi,df).call(this,e);if(null!=t)try{await ut(this,Vi,pf).call(this,gw,[t])}catch(e){te.warn("Error sending single product analytics event!",e)}}},Bi=Rt;s(Bi,"ProductAnalytics"),gn=new WeakMap,Qn=new WeakMap,Wt=new WeakMap,kr=new WeakMap,Yt=new WeakMap,as=new WeakSet,bw=s((function(e){let t=e.event_type;return null!=g(this,Wt)[t]}),"#isEventTypePending"),os=new WeakSet,_w=s((function(e){if(!ut(this,as,bw).call(this,e))return!0;let t=e.event_type,r=g(this,Wt)[t];return!(0,lf.default)(r.event_properties,e.event_properties)}),"#didEventPropertiesChange"),qi=new WeakSet,df=s((function(e){var t,r,n,i,o,a,s,l,u,c,d,h,p,f,v,y,m;if(null!=g(Rt,gn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&te.warn("Error processing product analytics event! Unspecified venue slug",e),null==fr.plan&&te.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(r=Oi.client.getSessionId())?r:is(),device_id:null!=(n=Oi.client.getDeviceId())?n:rs(),plan:{branch:null!=(o=null==(i=fr.plan)?void 0:i.branch)?o:fc.branch,version:null!=(s=null==(a=fr.plan)?void 0:a.version)?s:fc.version,source:null!=(u=null==(l=fr.plan)?void 0:l.source)?u:fc.source},os_name:null==(c=g(this,Yt))?void 0:c.browser.name,os_version:null==(d=g(this,Yt))?void 0:d.browser.version,device_manufacturer:null==(h=g(this,Yt))?void 0:h.device.vendor,device_model:null==(p=g(this,Yt))?void 0:p.device.model,event_properties:{...e.event_properties,context:g(Rt,gn),sdk_version:g(Rt,Qn),browser_name:null==(f=g(this,Yt))?void 0:f.browser.name,browser_version:null==(v=g(this,Yt))?void 0:v.browser.version,venue:null!=(m=null==(y=e.event_properties)?void 0:y.venue)?m:yw},time:e.time}}),"#makeBatchFormattedEvent"),Vi=new WeakSet,pf=s((async function(e,t){return await er()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Al.production,events:t})})}),"#batchSend"),Ht=new WeakMap,F(Bi,gn,void 0),F(Bi,Qn,void 0);var ww=new Bi,Xe=ww;function kw(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(kw,"areWeLeavingThePage");var Mw=0,Tw="9999-12-31T00:00:00.000Z";function xw(e,t,r=new Date){if(!e.states)return;let n=r||new Date,i=e.states.find((e=>{let t=new Date(e.start||Mw),r=new Date(e.end||Tw);return t<n&&r>n}));return i?t.find((e=>e.value===i.type)):void 0}s(xw,"getCurrentLocationState");var St,Nn,jt,Ui,Gi,Wi,Hi=class extends on{constructor(e,t){super(e),F(this,St,void 0),F(this,Nn,void 0),F(this,jt,{}),m(this,"states"),m(this,"id",""),m(this,"name",""),m(this,"type",""),m(this,"description"),m(this,"sortOrder"),m(this,"logo"),m(this,"phone"),m(this,"social"),m(this,"color"),m(this,"shortName"),m(this,"detailsUrl"),m(this,"tags"),m(this,"externalId"),m(this,"showLabelWhenImagePresent"),m(this,"showSmartLabelWhenImagePresent"),m(this,"picture"),m(this,"operationHours"),m(this,"siblingGroups"),m(this,"gallery"),F(this,Ui,void 0),F(this,Gi,[]),F(this,Wi,void 0),V(this,St,e),V(this,Nn,t);let r=Object.assign({},t);delete r.categories,Object.assign(this,r)}get polygons(){let e=g(this,jt).polygons;if(void 0!==e)return e;let t=[],r=g(this,Ui),n=g(this,St)._polygonsById;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&i.geometry.visible&&t.push(i)}return g(this,jt).polygons=t,t}set polygons(e){V(this,Ui,e)}get nodes(){let e=g(this,jt).nodes;if(void 0!==e)return e;let t=[],r=g(this,Gi),n=g(this,St)._nodesById;if(r)for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return g(this,jt).nodes=t,t}set nodes(e){V(this,Gi,e)}get parent(){let e=g(this,jt).parent;if(void 0!==e)return e;let t,r=g(this,St)._locationsById,n=g(this,Wi);return void 0!==n&&(t=r[n]),g(this,jt).parent=t,t}set parent(e){V(this,Wi,e)}get categories(){let e=g(this,jt).categories;if(void 0!==e)return e;let t=[];return g(this,Nn).categories.forEach((e=>{let r=g(this,St).getCollectionItemById(yn.CATEGORY,e);r&&t.push(r)})),g(this,jt).categories=t,t}get state(){return xw(this,g(this,St).locationStates)}clone(){let e=g(this,St).venue.slug;return Xe.addPendingEvent(new gi({venue:e})),new Hi(g(this,St),g(this,Nn))}get nodeOperationHours(){let e=g(this,jt).nodeOperationHours;if(void 0!==e)return e;if(null==this.nodes)return{};let t=g(this,Nn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return g(this,jt).nodeOperationHours=t,t}static hydrate(e,t){return e.map((e=>new Hi(t,e)))}static async fetch(e){let t=e.options.things.locations.slice();e.options.things.categories&&Je(t,"categories"),e.options.things.nodes&&Je(t,"nodes"),e.options.things.polygons&&Je(t,"polygons"),e.options.things.locationStates&&Je(t,"states");let r={fields:t,venue:e.options.venue};try{let t=await Ye(e.options,"location",r);return e.options.includeHidden||(t=t.filter((e=>!e.hidden))),t.map((t=>new Hi(e,t)))}catch(e){return te.error("Fetch Locations:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=g(this,St).venue.slug,i=new vi({with_destination_set:r||void 0,venue:n});return Xe.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=g(this,St).venue.slug;return Xe.addPendingEvent(new yi({venue:r})),super.distanceTo(e,t)}toJSON(){let e=g(this,Nn);return delete e.color,e}},vn=Hi;s(vn,"MappedinLocation"),St=new WeakMap,Nn=new WeakMap,jt=new WeakMap,Ui=new WeakMap,Gi=new WeakMap,Wi=new WeakMap,y();var Jt,Mr,Dt,$i,ss=class extends on{constructor(e,t){super(e),F(this,Jt,void 0),F(this,Mr,void 0),F(this,Dt,{}),m(this,"geometry"),m(this,"perspectives"),m(this,"image"),m(this,"holes"),m(this,"textures"),m(this,"material"),m(this,"label"),m(this,"id",""),m(this,"layer"),m(this,"layerId"),m(this,"name"),m(this,"externalId"),m(this,"vertexes"),m(this,"canvasBounds"),F(this,$i,void 0),V(this,Jt,e),V(this,Mr,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=g(this,Dt).map;if(void 0!==e)return e;let t=g(this,Jt).getCollectionItemById(yn.MAP,g(this,Mr).map);return g(this,Dt).map=t,t}get locations(){var e,t;let r=g(this,Dt).locations;if(void 0!==r)return r;let n=[],i=null!=(t=null==(e=Tt.instances.get(g(this,Jt)))?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],r=t.polygons;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e)if(r[e].id===o){n.push(t);break}}return g(this,Dt).locations=n,n}get entrances(){let e=g(this,Dt).entrances;if(void 0!==e)return e;let t=[],r=g(this,$i),n=g(this,Jt)._nodesById;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return g(this,Dt).entrances=t,t}return[]}set entrances(e){V(this,$i,e)}get rank(){let e=g(this,Dt).rank;if(void 0!==e)return e;let{rankings:t}=g(this,Jt);if(!t||!t.polygons)return null;let r=t.polygons.find((e=>e.polygonId===this.id));return r?(g(this,Dt).rank={score:r.score,node:r.entranceNodeId},{score:r.score,node:r.entranceNodeId}):(g(this,Dt).rank=null,null)}static hydrate(e,t){return e.map((e=>new ss(t,e)))}static async fetch(e){let t=e.options.things.polygons.slice();e.options.things.maps&&Je(t,"map"),e.options.things.nodes&&Je(t,"entrances");let r={fields:t,venue:e.options.venue};try{return(await Ye(e.options,"polygon",r)).filter((e=>e.geometry.visible)).map((t=>new ss(e,t)))}catch(e){return te.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=g(this,Jt).venue.slug,i=new wi({with_destination_set:r||void 0,venue:n});return Xe.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=g(this,Jt).venue.slug;return Xe.addPendingEvent(new ki({venue:r})),super.distanceTo(e,t)}toJSON(){return g(this,Mr)}},tr=ss;function hf(e){return/^[\da-f]{24}$/i.test(e)}function ff(e,t=!1){let r="";if(null!=e){let n="?",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],a=e[o];null!=a&&(r+=`${n+encodeURIComponent(o)}=${encodeURIComponent(a)}`,n="&")}}return r}function Ew(e,t,r,n=!1){var i,o;return n?`${e.supplementaryUrl}${t}?venue=${r.venue||r.slug}`:(null==(i=e.baseUrl)?void 0:i.includes("gateway"))?`${e.baseUrl}${t}/${r.venue||r.slug}${ff(r,null==(o=e.baseUrl)?void 0:o.includes("gateway"))}`:e.baseUrl+t+ff(r)}async function Ye(e,t,r,n=!1){return mc(e,t,r,n,!0)}async function mc(e,t,r,n=!1,i=!1){let o=Ew(e,t,r,n),a=await gc(e,o,n);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}async function gc(e,t,r=!1){let n={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};r&&delete n.language,n.language&&(t+=`&lang=${encodeURIComponent(n.language)}`);let{headers:i}=e;i["Content-Type"]="text/json",e.authorization&&(i.Authorization=e.authorization),n.language&&(i["Accept-Language"]=n.language);let o={method:"GET",headers:i},a=await er()(t,o);if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);return a.json()}function Je(e,t){e.indexOf(t)<0&&e.push(t)}function mf([e,t],[r,n]){let i=new me(e,t),o=new me(r,n);return i.distanceTo(o)}function gf(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let r=e.georeference[0],n=e.georeference[2],i=new me(r.target.x,r.target.y),o=new me(n.target.x,n.target.y),a=i.distanceTo(o),s=r.control.x-n.control.x,l=r.control.y-n.control.y;t=Math.sqrt(s*s+l*l)/a}catch(r){t=1,te.warn(r),te.warn(`Couldn't georeference ${e.name||e.shortName||e.id}. Probably not enough geocoordinates.`)}return t}function Xr(e){var t;return e instanceof tr?e.entrances.map((e=>e.id)):e instanceof vn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function vf(e){let t={},{maps:r,images:n,scenes:i,polygons:o}=e;if(null!=n)try{let e=Object.keys(n).map((e=>fetch(`data:image/png;base64,${n[e]}`).then((e=>e.blob())).then((r=>{t[e]=r})).catch((e=>{te.error(e)}))));await Promise.all(e)}catch(e){te.error(e)}return r.forEach((e=>{var r;!(null==(r=e.scene)?void 0:r.polygons)&&!i[e.id]||(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=n&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var r,n;if((null==(r=null==e?void 0:e.image)?void 0:r.url)&&(null==(n=null==e?void 0:e.image)?void 0:n.url)){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}}))))})),null!=n&&o.forEach((e=>{var r;if(null==(r=null==e?void 0:e.image)?void 0:r.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function ls(e,t,r){let n;return function(){let i=this,o=arguments,a=s((function(){n=null,r||e.apply(i,o)}),"later"),l=r&&!n;clearTimeout(n),n=setTimeout(a,t),l&&e.apply(i,o)}}s(tr,"MappedinPolygon"),Jt=new WeakMap,Mr=new WeakMap,Dt=new WeakMap,$i=new WeakMap,s(hf,"isGatewayKey"),s(ff,"stringifyQuery"),s(Ew,"buildUrl"),s(Ye,"getArray"),s(mc,"getObject"),s(gc,"generateAPIRequest"),s(Je,"addToSet"),s(mf,"getDistanceBetweenLatLon"),s(gf,"getMapScale"),s(Xr,"getNodesForNavigatable"),s(vf,"populateBundledImagesAsBlobs"),s(ls,"debounce");var Ki,Xi,Yi,us=class{constructor(e,t){F(this,Ki,void 0),F(this,Xi,{}),F(this,Yi,void 0),m(this,"name"),m(this,"externalId"),m(this,"parents"),m(this,"id"),m(this,"icon"),this.id=t.id,V(this,Yi,t),V(this,Ki,e),Object.assign(this,t)}get locations(){var e;let t=g(this,Xi).locations;if(void 0!==t)return t;let r=[],{locations:n}=g(this,Ki),{id:i}=this;for(let t=0,o=n.length;t<o;++t){let o=n[t],a=o.categories;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if((null==(e=a[t])?void 0:e.id)===i){r.push(o);break}}return g(this,Xi).locations=r,r}static hydrate(e,t){return e.map((e=>new us(t,e)))}static async fetch(e){let t={fields:e.options.things.categories,venue:e.options.venue};try{return(await Ye(e.options,"category",t)).map((t=>new us(e,t)))}catch(e){return te.error("Fetch Categories:",e),[]}}toJSON(){return g(this,Yi)}},nr=us;s(nr,"MappedinCategory"),Ki=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,y();var Zi,Tr,Qi,cs=class{constructor(e,t){F(this,Zi,void 0),F(this,Tr,void 0),F(this,Qi,{}),m(this,"id",""),m(this,"type",""),m(this,"name",""),m(this,"description"),m(this,"image"),m(this,"startDate"),m(this,"endDate"),m(this,"showDate"),V(this,Tr,t),V(this,Zi,e),Object.assign(this,t)}location(){let e=g(this,Qi).location;if(void 0!==e)return e;let t,r=g(this,Zi)._locationsById,n=g(this,Tr).location;if(null!=n){let e=r[n];null!=e&&(t=e)}return g(this,Qi).location=t,t}static hydrate(e,t){return e.map((e=>new cs(t,e)))}static async fetch(e){let t=e.options.things.events.slice();e.options.things.locations&&Je(t,"location");let r={fields:t,venue:e.options.venue,activeAtOrAfter:Date.now()};try{return(await Ye(e.options,"event",r)).map((t=>new cs(e,t)))}catch(e){return te.error("Fetch Events:",e),[]}}toJSON(){return g(this,Tr)}},Ji=cs;s(Ji,"MappedinEvent"),Zi=new WeakMap,Tr=new WeakMap,Qi=new WeakMap,y();var ea,ps=class{constructor(e){F(this,ea,void 0),m(this,"id",""),m(this,"name",""),m(this,"value",""),V(this,ea,e),Object.assign(this,e)}static hydrate(e){return e.map((e=>new ps(e)))}static async fetch(e){let t={fields:e.options.things.locationStates.slice(),venue:e.options.venue};try{return(await Ye(e.options,"location-state",t)).map((e=>new ps(e)))}catch(e){return te.error("Fetch Location States:",e),[]}}toJSON(){return g(this,ea)}},ds=ps;s(ds,"MappedinLocationState"),ea=new WeakMap,y(),y();var ta,yf,na,bf,ra,ia,hs,Iw,fs,Ow,Zt,Qt,en,tn,xr=class{constructor(e){F(this,ta),F(this,na),F(this,hs),F(this,fs),m(this,"map"),F(this,ra,{}),F(this,ia,void 0),F(this,Zt,void 0),F(this,Qt,void 0),F(this,en,void 0),F(this,tn,void 0);let{map:t,mappedin:r}=e;null!=e.lat&&null!=e.lon&&(V(this,Zt,e.lat),V(this,Qt,e.lon)),null!=e.x&&null!=e.y&&(V(this,en,e.x),V(this,tn,e.y)),this.map=t,V(this,ia,r)}get x(){return ut(this,na,bf).call(this,"x")}get y(){return ut(this,na,bf).call(this,"y")}get lat(){return ut(this,ta,yf).call(this,"lat")}get lon(){return ut(this,ta,yf).call(this,"lon")}absoluteDistanceTo(e){return mf([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=g(this,ra).nearestNode;if(void 0!==e)return e;let t=Tt.instances.get(g(this,ia)).findNearestNodeOnMap(this.map.id,this);return g(this,ra).nearestNode=t,t}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};s(xr,"MappedinCoordinate"),ta=new WeakSet,yf=s((function(e){if(g(this,Zt)&&g(this,Qt))return g(this,"lat"===e?Zt:Qt);if(null!=g(this,en)&&null!=g(this,tn)){let[t,r]=ut(this,fs,Ow).call(this,g(this,en),g(this,tn));return V(this,Zt,t),V(this,Qt,r),g(this,"lat"===e?Zt:Qt)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),na=new WeakSet,bf=s((function(e){if(g(this,en)&&g(this,tn))return g(this,"x"===e?en:tn);if(null!=g(this,Zt)&&null!=g(this,Qt)){let[t,r]=ut(this,hs,Iw).call(this,g(this,Zt),g(this,Qt));return V(this,en,t),V(this,tn,r),g(this,"x"===e?en:tn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),ra=new WeakMap,ia=new WeakMap,hs=new WeakSet,Iw=s((function(e,t){let r=this.map.georeference[0],n=new me(r.target.x,r.target.y),i=new me(e,t),o=n.distanceTo(i),a=(n.finalBearingTo(i)+360)%360*Math.PI/180||0,s=o*(1/this.map.scale),l=a+this.map.getNorth(),u=Math.sin(l)*s,c=Math.cos(l)*s;return[r.control.x+u,r.control.y-c]}),"#latLonToXY"),fs=new WeakSet,Ow=s((function(e,t){let r,n=this.map.georeference[0],i=new me(n.target.x,n.target.y),o=e-n.control.x,a=n.control.y-t,s=Math.atan2(o,a);r=0===o&&0===a?0:0===o?a:o/Math.sin(s);let l=s-this.map.getNorth(),u=r/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),Zt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap;var nn,oa,sa,ms=class{constructor(e,t){F(this,nn,void 0),F(this,oa,{}),F(this,sa,void 0),m(this,"id",""),m(this,"group",""),m(this,"name",""),m(this,"shortName",""),m(this,"elevation",0),m(this,"scale",0),m(this,"layers"),m(this,"x_scale"),m(this,"perspectiveId"),m(this,"scene"),m(this,"width",0),m(this,"height",0),m(this,"georeference",[]),m(this,"_scale",0),V(this,nn,e),V(this,sa,t),Object.assign(this,t),this._scale=gf(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,r;return null!=(r=null==(t=null==(e=Tt.instances.get(g(this,nn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?r:[]}get locations(){var e,t,r;return null!=(r=null==(t=null==(e=Tt.instances.get(g(this,nn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?r:[]}get nodes(){var e,t,r;return null!=(r=null==(t=null==(e=Tt.instances.get(g(this,nn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?r:[]}get mapGroup(){let e=g(this,oa).mapGroup;if(void 0!==e)return e;let t=this.group,r=t&&g(this,nn)._mapGroupsById[t]||null;return g(this,oa).mapGroup=r,r}createCoordinateByXY(e,t){return new xr({x:e,y:t,map:this,mappedin:g(this,nn)})}createCoordinate(e,t){return new xr({lat:e,lon:t,map:this,mappedin:g(this,nn)})}getNorth(){let e;try{let t=this.georeference[0],r=this.georeference[2],n=new me(t.target.x,t.target.y),i=new me(r.target.x,r.target.y);e=-((n.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(r.control.y-t.control.y,r.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,te.warn(t),te.warn(`Couldn't georeference ${this.name||this.shortName||this.id}. Probably not enough geocoordinates.`)}return e}static hydrate(e,t){return e.map((e=>new ms(t,e)))}static async fetch(e){let t=e.options.things.maps.slice();e.options.perspective&&Je(t,"perspectives"),e.options.things.mapGroups&&Je(t,"group"),Je(t,"elevation"),Je(t,"x_scale"),Je(t,"scale"),Je(t,"georeference");let r={fields:t,perspective:e.options.perspective,venue:e.options.venue};try{let i=await Ye(e.options,"map",r),o=s((e=>{let t=n.layers.find((t=>t.id===e));t?t.visible=!0:n.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let r=0,a=i.length;r<a;++r){var n=i[r];if(n){let e=n.perspective;null!=e&&(n.perspectiveId=e.id,t.indexOf("scene")>-1&&(n.scene=e.scene),e.layers?(n.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(o)):n.layers.forEach((e=>{e.visible=!0}))),delete n.perspective}i[r]=new ms(e,n)}return i}catch(e){return te.error("Fetch Maps:",e),[]}}toJSON(){return g(this,sa)}},aa=ms;s(aa,"MappedinMap"),nn=new WeakMap,oa=new WeakMap,sa=new WeakMap,y();var ua,Er,ca,gs=class{constructor(e,t){F(this,ua,void 0),F(this,Er,void 0),F(this,ca,{}),m(this,"id",""),m(this,"name",""),V(this,Er,t),V(this,ua,e),Object.assign(this,t)}get maps(){let e=g(this,ca).maps;if(void 0!==e)return e;let t=[],{maps:r}=g(this,ua),{id:n}=g(this,Er);for(let e=0,i=r.length;e<i;++e){let i=r[e];i.group===n&&t.push(i)}return g(this,ca).maps=t,t}static hydrate(e,t){return e.map((e=>new gs(t,e)))}static async fetch(e){let t={fields:e.options.things.mapGroups.slice(),venue:e.options.venue};try{return(await Ye(e.options,"map-group",t)).map((t=>new gs(e,t)))}catch(e){return te.error("Fetch Map Groups:",e),[]}}toJSON(){return g(this,Er)}},la=gs;s(la,"MappedinMapGroup"),ua=new WeakMap,Er=new WeakMap,ca=new WeakMap,y();var zt,Ir,lt,pa,vs=class extends on{constructor(e,t){super(e),F(this,zt,void 0),F(this,Ir,void 0),F(this,lt,{}),m(this,"id",""),m(this,"x",0),m(this,"y",0),m(this,"operationHours"),m(this,"externalId"),F(this,pa,void 0),V(this,zt,e),V(this,Ir,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=g(this,lt).map;if(void 0!==e)return e;let t=g(this,zt).getCollectionItemById(yn.MAP,g(this,Ir).map);return g(this,lt).map=t,t}get lat(){var e;let t=g(this,lt).cachedLatLon;if(null!=t)return t.lat;let r=null==(e=g(this,zt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return g(this,lt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),g(this,lt).cachedLatLon.lat}get lon(){var e;let t=g(this,lt).cachedLatLon;if(null!=t)return t.lon;let r=null==(e=g(this,zt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return g(this,lt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),g(this,lt).cachedLatLon.lon}get paths(){let e=g(this,lt).paths;if(void 0!==e)return e;let t=[],r=g(this,zt)._nodesById,n=g(this,pa);if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return g(this,lt).paths=t,t}set paths(e){V(this,pa,e)}get locations(){var e,t,r;let n=g(this,lt).locations;if(void 0!==n)return n;let i=[],o=null!=(r=null==(t=null==(e=Tt.instances.get(g(this,zt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],r=t.nodes;if(Array.isArray(r))for(let e=0,n=r.length;e<n;++e)if(r[e].id===a){i.push(t);break}}return g(this,lt).locations=i,i}get polygon(){var e,t,r;let n=g(this,lt).polygon;if(void 0!==n)return n;let i,o=null!=(r=null==(t=null==(e=Tt.instances.get(g(this,zt)))?void 0:e.polygonsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e];t.entrances.map((e=>e.id)).includes(a)&&(i=t)}return g(this,lt).polygon=i,i}static hydrate(e,t){return e.map((e=>new vs(t,e)))}static async fetch(e){let t=e.options.things.nodes.slice();e.options.things.maps&&Je(t,"map"),["weight","multiplier","accessible"].forEach((function(e){Je(t,e)}));let r={fields:t,venue:e.options.venue};try{return(await Ye(e.options,"node",r)).map((t=>new vs(e,t)))}catch(e){return te.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=g(this,zt).venue.slug,i=new bi({with_destination_set:r||void 0,venue:n});return Xe.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=g(this,zt).venue.slug;return Xe.addPendingEvent(new _i({venue:r})),super.distanceTo(e,t)}toJSON(){return g(this,Ir)}},da=vs;s(da,"MappedinNode"),zt=new WeakMap,Ir=new WeakMap,lt=new WeakMap,pa=new WeakMap,y();var fa,ys=class{constructor(e){F(this,fa,void 0),m(this,"polygons",[]),V(this,fa,e),Object.assign(this,e)}static hydrate(e){return new ys(e)}static async fetch(e){try{let t=await mc(e.options,"smart-labels/polygon-label-ranking",{venue:e.options.venue},!0);return new ys(t)}catch(e){return te.error("Fetch Rankings:",e),null}}toJSON(){return g(this,fa)}},ha=ys;s(ha,"MappedinRankings"),fa=new WeakMap,y();var ma,_s=class{constructor(e){m(this,"id",""),F(this,ma,void 0),V(this,ma,e),Object.assign(this,e)}static hydrate(e){return e.map((e=>new _s(e)))}static async fetch(e){let t={fields:e.options.things.themes.slice(),venue:e.options.venue};try{return(await Ye(e.options,"apollo-theme",t)).map((e=>new _s(e)))}catch(e){return te.error("Fetch Theme:",e),[]}}toJSON(){return g(this,ma)}},bs=_s;s(bs,"MappedinTheme"),ma=new WeakMap,y();var va,ya,ba,Or,ws=class{constructor(e,t){F(this,va,void 0),F(this,ya,void 0),F(this,ba,void 0),F(this,Or,{}),m(this,"defaultMap",""),m(this,"address",""),m(this,"city",""),m(this,"countrycode",""),m(this,"externalId",""),m(this,"id",""),m(this,"latitude"),m(this,"logo"),m(this,"longitude"),m(this,"name",""),m(this,"operationHours"),m(this,"postal",""),m(this,"slug",""),m(this,"state",""),m(this,"telephone",""),m(this,"tzid",""),m(this,"tzidOverride",""),m(this,"utcOffset",""),m(this,"website",""),V(this,ya,e),V(this,va,t),Object.assign(this,t)}get metadata(){return Xe.addPendingEvent(new Mi({venue:this.slug})),g(this,ba)}set metadata(e){V(this,ba,e)}static hydrate(e,t){return new ws(t,e)}static async fetch(e){let t={fields:e.options.things.venue,slug:e.options.venue,limit:1};try{let r=await Ye(e.options,"venue",t);return new ws(e,r[0])}catch(e){return te.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==g(this,Or).isMultiBuilding){let e=g(this,ya).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),r=e.length!==t.size;g(this,Or).isMultiBuilding=r}return g(this,Or).isMultiBuilding}toJSON(){return g(this,va)}},ga=ws;s(ga,"MappedinVenue"),va=new WeakMap,ya=new WeakMap,ba=new WeakMap,Or=new WeakMap,y();var wa,ks=class{constructor(e){m(this,"id",""),F(this,wa,void 0),m(this,"name"),m(this,"type"),m(this,"weight"),m(this,"multiplier"),V(this,wa,e),Object.assign(this,e)}static hydrate(e){return e.map((e=>new ks(e)))}static async fetch(e){let t=e.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){Je(t,e)}));let r={fields:t,venue:e.options.venue};try{return(await Ye(e.options,"vortex",r)).map((e=>new ks(e)))}catch(e){return te.error("Fetch Vortexes:",e),[]}}toJSON(){return g(this,wa)}},_a=ks;function Sw(e,t){let r=[];return e.features.forEach((e=>{var n,i;let o=[];null==(n=e.properties.spaces)||n.forEach((e=>{if("id"in e){let r;r=t.get(e.id),r&&o.push(...r)}else null==o||o.push({id:e.node,level:""})}));let a=o.map((e=>({node:"n_"+e.id,map:e.level}))),s=null==(i=e.properties.spaces)?void 0:i.filter((e=>"id"in e)),l=(e.properties.hours||[]).map((e=>({...e,"@type":"OpeningHoursSpecification",dayOfWeek:[e.dayOfWeek.replace("http://schema.org/","")]}))),u={...e.properties,polygons:s||[],nodes:a||[],description:e.properties.description||"",logo:e.properties.logo||{},picture:e.properties.picture||{},phone:e.properties.phone||{},social:e.properties.social||{},externalId:e.properties.externalId||"",states:e.properties.states||[],siblingGroups:e.properties.siblingGroups||[],operationHours:l};delete u.spaces,r.push(u)})),r}function jw(e){let t=new Set;return e.features.forEach((e=>{var r;null==(r=e.properties.states)||r.forEach((e=>{t.add(e.type)}))})),Array.from(t).map((e=>({id:e,name:e,value:e})))}function Pw(e){let t=[];return e.features.forEach((e=>{let r={...e.properties,icon:e.properties.picture};delete r.picture,t.push(r)})),t}function Cw(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;return e.features.forEach((e=>{let o;o="MultiPolygon"===e.geometry.type?e.geometry.coordinates[0].flat():e.geometry.coordinates[0],o.forEach((e=>{t=Math.min(t,e[1]),n=Math.max(n,e[1]),r=Math.min(r,e[0]),i=Math.max(i,e[0])}))})),{id:e.features[0].properties.id,minLat:t,minLong:r,maxLat:n,maxLong:i}}function Aw(e,t,r){let n=r.createGeoreferences(),i=[];return e.features.forEach((e=>{let o=new Set;t.forEach((e=>{e.layer&&o.add(e.layer)}));let a=[...o].map((e=>({id:e,visible:!0}))),s=1/r.mapScale,l={...e.properties,georeference:n,shortName:e.properties.abbreviation||"",scene:{polygons:t},scale:s,x_scale:s,group:e.properties.building,layers:a,width:r.widthInMapUnits,height:r.heightInMapUnits};i.push(l)})),i}s(_a,"MappedinVortex"),wa=new WeakMap,y(),s(Sw,"convertLocations"),s(jw,"convertLocationStates"),s(Pw,"convertCategories"),s(Cw,"getMapExtent"),s(Aw,"convertMaps");var vc=class{constructor(e){m(this,"mapExtent"),m(this,"stretchRatio"),m(this,"midLat"),m(this,"midLong"),m(this,"mapUnitRatio",1e6),m(this,"latDistance"),m(this,"longDistance"),m(this,"mapScale"),m(this,"widthInMapUnits"),m(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:r,maxLat:n,maxLong:i}=e,o=(t+n)/2,a=(r+i)/2,s=new me(o,i),l=new me(o,r),u=new me(t,a),c=new me(n,a);this.latDistance=u.distanceTo(c),this.longDistance=s.distanceTo(l);let d=this.latDistance/this.longDistance,h=(n-t)/(i-r);this.stretchRatio=d/h,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-r)*this.mapUnitRatio,this.heightInMapUnits=(n-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1];return{x:(e[0]-this.midLong)*this.mapUnitRatio,y:(this.midLat-t)*this.mapUnitRatio*this.stretchRatio}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:r,maxLong:n}=this.mapExtent;return[[e,t],[e,n],[r,n],[r,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};function Nw(e,t){let r=[];return e.features.forEach((e=>{let n=t.convert(e.geometry.coordinates),i=(e.properties.neighbors||[]).map((t=>({node:t,map:e.properties.level}))),o=e.properties.level,a={...e.properties,x:n.x,y:n.y,paths:i,map:o,externalId:e.properties.externalId||""};r.push(a)})),r}s(vc,"CoordinateConverter"),s(Nw,"convertNodes");var _f=s(((e,t,r,n,i)=>{let o=[];return e.features.forEach((e=>{if(!e.geometry.coordinates[0].forEach)return;let a=[];"entrances"in e.properties&&(a=e.properties.entrances.map((e=>({id:"n_"+e.id,node:"n_"+e.id,map:e.level}))));let s,l=r[e.properties.id],u=t.find((e=>e.id===l)),c=e.geometry.coordinates[0].map((e=>i.convert(e))),d=n.find((t=>t.polygonId===e.properties.id)),h=Math.max(i.widthInMapUnits,i.heightInMapUnits)/1e3;if(d){let e=i.convert([d.position[0],d.position[1]]),t=d.size.x,r=d.size.y,n=i.mapScale,o=r*n,a=t*n/h/d.viewBox.width,l=o/h/d.viewBox.height;s={url:null==u?void 0:u.image,visible:!!(null==u?void 0:u.image),viewBox:d.viewBox,scale:{x:a,y:l},position:{x:e.x,y:e.y},rotation:d.rotation,useLocalScaling:!1,_isAbsolutelyPositioned:!0}}let p={...e.properties,entrances:a,map:e.properties.level,externalId:e.properties.externalId||"",geometry:{visible:!0,position:{x:0,y:0,z:((null==u?void 0:u.altitude)||0)*i.mapScale/h},scale:{x:1,y:1,z:((null==u?void 0:u.height)||1)*i.mapScale/h}},material:{color:(null==u?void 0:u.color)||"#000000"},image:s,vertexes:c};o.push(p)})),o}),"generateMappedinPolygons");function Lw(e,t,r,n,i,o){let a=_f(e,r,n,i,o),s=_f(t,r,n,i,o);return a.concat(s)}function Rw(e){let t=new Map;return e.forEach((e=>{e.features.forEach((e=>{let{destinations:r}=e.properties;if(0===r.length)return;let n=r[0].split("-")[0],i=t.get(n),o=r.map((e=>e.split("-")[1])).map((e=>"n_"+e));if(i)i.nodes.push(...o);else{let{name:r,type:i,weight:a,multiplier:s,accessible:l}=e.properties,u={id:n,nodes:o,name:r,type:i,weight:a,multiplier:s,accessible:l};t.set(n,u)}}))})),Array.from(t.values())}function Dw(e){let t=[];return e.features.forEach((e=>{let r={...e.properties};t.push(r)})),t}function wf(e){let t=Array.from(e.connection.values()),r=Array.from(e.level.values()),n=e.building,i=e.category,o=e.style,a=e.location,s=e.imageInstance,l=e.polygonStyle,u={},c=[],d=new Map;r.forEach((t=>{let r=t.features[0].properties.id,n=Cw(t),i=new vc(n);d.set(r,i);let a=e.obstruction.get(r),h=e.space.get(r),p=s.get(r),f=l.get(r);u[r]=Lw(h,a,o,f,p,i);let g=e.node.get(r);c.push(...Nw(g,i))}));let h=Object.values(u).flat(),p=Rw(t),f=r.map((e=>{let t=e.features[0].properties.id,r=d.get(t);return Aw(e,u[t],r)})).flat(),g=new Map;Array.from(e.space.values()).forEach((e=>{e.features.forEach((e=>{g.set(e.properties.id,e.properties.entrances)}))}));let v=Dw(n),y=Sw(a,g),m=Pw(i),_=jw(a),b=e.manifest.features[0].properties.name,w=e.manifest.features[0].geometry.coordinates[0],M=e.manifest.features[0].geometry.coordinates[1],S=e.imageBinaries;return{locations:y,categories:m,nodes:c,maps:f,polygons:h,vortexes:p,mapGroups:v,locationStates:_,themes:[],venue:{name:b,latitude:M,longitude:w},imageBinaries:S}}s(Lw,"convertPolygons"),s(Rw,"convertVortexes"),s(Dw,"convertMapGroups"),s(wf,"convertMVFToMappedin"),y();var Vf,Uf,Ma,Sr,jr,Ta,Pr,Cr,Ar,rr,xa,Nr,Lr,Ea,Rr,qf=xn(Bf()),$w=null==(Uf=null==(Vf=L)?void 0:Vf.env)?void 0:Uf.npm_package_version,_c=["websdk","web","webv2"],wc="websdk",kc=class{constructor(e){var t;F(this,Ma,void 0),F(this,Sr,void 0),F(this,jr,void 0),F(this,Ta,void 0),F(this,Pr,void 0),F(this,Cr,void 0),F(this,Ar,void 0),F(this,rr,void 0),F(this,xa,void 0),F(this,Nr,void 0),F(this,Lr,void 0),F(this,Ea,void 0),F(this,Rr,void 0),V(this,rr,e.clientId),V(this,xa,e.clientSecret),V(this,Nr,e.accessToken),V(this,Ar,e.noAuth||!1);let r="https://api-gateway.mappedin.com/track-analytics/a/";!g(this,Ar)&&g(this,rr)&&!of(g(this,rr))&&(r="https://web-proxy.mappedin.com/a/"),V(this,jr,r),V(this,jr,g(this,jr)+(e.venue+"/")),V(this,Rr,e.venue),V(this,Sr,!1),V(this,Ma,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),V(this,Ta,_c.find((t=>t===e.context))||_c[0]),V(this,Pr,rs()),V(this,Cr,is()),V(this,Lr,new Set),V(this,Ea,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=this.getDirections.bind(this)}track(e,t){if(g(this,Ma))return;let r={...t,g:g(this,Sr)},n=g(this,jr)+e+"?"+qf.default.stringify(r),i={"mi-context":wc||g(this,Ta),"mi-session":g(this,Cr),"mi-device":g(this,Pr),"mappedin-sdk-version":$w,"mappedin-platform-version":g(this,Ea)};g(this,Nr)?i.Authorization=`Bearer ${g(this,Nr)}`:g(this,Ar)||(i.Authorization=`Basic ${btoa(`${g(this,rr)}:${g(this,xa)}`)}`),er()(n,{method:"GET",mode:"cors",headers:i})}locationSelected(e){let t=e.id||e;Xe.addPendingEvent(new fi({venue:g(this,Rr)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;Xe.addPendingEvent(new hi({venue:g(this,Rr)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,r,n){this.track("load-mapview",{type:e,force:t,benchmark:r||-1,reason:n||"success"})}getDirections(e,t){let r={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",r)}getSessionID(){return g(this,Cr)}getDeviceID(){return g(this,Pr)}setGeolocationMode(e){V(this,Sr,e)}trackBlueDotEvent(e){e&&Object.values(kc.BLUEDOT_EVENT).includes(e)&&!g(this,Lr).has(e)?(this.track(e),g(this,Lr).add(e)):te.warn(`Ignored unsupported blue dot event: "${e}".`)}trackSearch(e){null!=e&&this.track("query-search",e)}trackSearchSuggest(e){null!=e&&this.track("query-suggest",e)}static setContext(e){let t=_c.find((t=>t===e));t&&(wc=t)}static clearContext(){wc=void 0}},Ms=kc;s(Ms,"Analytics"),Ma=new WeakMap,Sr=new WeakMap,jr=new WeakMap,Ta=new WeakMap,Pr=new WeakMap,Cr=new WeakMap,Ar=new WeakMap,rr=new WeakMap,xa=new WeakMap,Nr=new WeakMap,Lr=new WeakMap,Ea=new WeakMap,Rr=new WeakMap,m(Ms,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var yn,ka=Ms,Gf={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",things:{},venue:""};!function(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"}(yn||(yn={}));var Rn,zr,Dr={categories:nr,locations:vn,vortexes:_a,maps:aa,nodes:da,polygons:tr,venue:ga,events:Ji,mapGroups:la,themes:bs,locationStates:ds,rankings:ha},Ln=class{constructor(e){m(this,"perspective"),m(this,"things"),m(this,"options"),F(this,Rn,void 0),F(this,zr,""),m(this,"updatedAt"),m(this,"categories",[]),m(this,"locations",[]),m(this,"vortexes",[]),m(this,"maps",[]),m(this,"nodes",[]),m(this,"polygons",[]),m(this,"venue",{}),m(this,"events",[]),m(this,"mapGroups",[]),m(this,"themes",[]),m(this,"locationStates",[]),m(this,"rankings"),m(this,"_categoriesById"),m(this,"_locationsById"),m(this,"_vortexesById"),m(this,"_mapsById"),m(this,"_nodesById"),m(this,"_polygonsById"),m(this,"_eventsById"),m(this,"_mapGroupsById"),m(this,"_locationStatesById"),m(this,"_locationRankingsById"),m(this,"_rankingsById"),m(this,"_categoriesByExternalId"),m(this,"_locationsByExternalId"),m(this,"_vortexesByExternalId"),m(this,"_mapsByExternalId"),m(this,"_nodesByExternalId"),m(this,"_polygonsByExternalId"),m(this,"_eventsByExternalId"),m(this,"_mapGroupsByExternalId"),m(this,"_locationStatesByExternalId"),m(this,"_locationRankingsByExternalId"),m(this,"_rankingsByExternalId"),m(this,"images"),m(this,"imageBinaries"),m(this,"scenes"),m(this,"analytics"),m(this,"navigator"),this.options=e,V(this,Rn,Tt.create(this));let t=new ka({...e,testMode:!(null==e?void 0:e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Bs,"true")}})}generateGetters(e){try{for(let t=0,r=e.length;t<r;++t){let r=e[t];Array.isArray(this[r])&&(Object.defineProperty(this,`_${r}ByExternalId`,{get(){let e=g(this,Rn)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.externalId]=e)),g(this,Rn)[r]=t,t}}),Object.defineProperty(this,`_${r}ById`,{get(){let e=g(this,Rn)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.id]=e)),g(this,Rn)[r]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let r=`_${e}ByExternalId`,n=this[`_${e}ById`];return null!=n&&null!=n[t]||(n=this[r],null!=n&&null!=n[t])?n[t]:null}async hydrateFromMVF(e){let t=wf(e);return this.hydrate(t)}async hydrate(e,t){let r;if("string"==typeof e)try{V(this,zr,e),r=JSON.parse(e)}catch(e){return void te.error("Unable to parse JSON",e)}else r=e,V(this,zr,JSON.stringify(r));let n=Object.keys(r);for(let e=0,t=n.length;e<t;++e){let t=n[e],i=r[t];null!=Dr[t]&&"function"==typeof Dr[t].hydrate&&(this[t]=Dr[t].hydrate(i,this))}t&&await vf(r);let{images:i,scenes:o,imageBinaries:a}=r;this.images=i,this.scenes=o,this.imageBinaries=a,this.generateGetters(n),this.initNavigator()}async fetch(){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),hf(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:e}=this.options,t=[],r=Object.keys(e);for(let e=0,n=r.length;e<n;++e){let n=r[e];Dr[n]&&t.push(Dr[n].fetch(this).then((e=>(this[n]=e,Promise.resolve()))))}return this.generateGetters(r),Promise.all(t).then((()=>{this.initNavigator()}))}initNavigator(){this.navigator=new Ws({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()))})}toJSON(){var e;let t={};for(let e in Dr)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let r={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(r.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete r.locationRankings,r}toString(){return g(this,zr)||JSON.stringify(this.toJSON())}};s(Ln,"Mappedin"),Rn=new WeakMap,zr=new WeakMap,y();var Wf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent"],categories:["name","color","sortOrder","parents"],maps:["name","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};y();var ir=xn(Hf());y();var Kw=["0","1","2","3","4","5","6","7","8","9"],Xw=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],Yw=["0","1","2","3","4","5","6","7","8","9"],Jw=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],qx=[...Kw,...Xw,...Yw,...Jw],$f=["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 Zw=32,wt=!1,Qw=120,xc=0,Ts=class{constructor(e){m(this,"_callback"),m(this,"_frameCount"),m(this,"_ordering"),m(this,"_supersededBy"),m(this,"name"),m(this,"_remainingFrameCount"),m(this,"_lastFrameTime"),m(this,"userdata"),this._callback=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,wt&&te.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(Ts,"FrameUpdate");var _n=class{constructor(e){if(m(this,"_postponed"),m(this,"userdata"),m(this,"_priority"),m(this,"_group"),m(this,"name"),m(this,"_lastFrameTime"),m(this,"_callback"),m(this,"_complete"),m(this,"_scheduled"),m(this,"_cancelled"),null!=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,wt&&te.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(_n,"FrameTask");var xs=class{constructor(e){m(this,"_postponed"),m(this,"_onComplete"),m(this,"_priority"),m(this,"userdata"),m(this,"name"),m(this,"_tasks"),m(this,"_scheduledTasks"),m(this,"_scheduled"),m(this,"_cancelled"),this._onComplete=null!=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,wt&&te.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(xs,"FrameTaskGroup");var Ec=class{constructor(e){m(this,"_maxMillisecondsPerFrame"),m(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:Zw,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(Ec,"RealTimeTimer");var Es=class{constructor(e){var t;m(this,"_raf"),m(this,"_timer"),m(this,"_performance"),m(this,"_scheduledUpdatesByOrdering"),m(this,"_scheduledTasksByPriority"),m(this,"_postponedTasks"),m(this,"_requestAnimationFrameHandle"),m(this,"_updatesToRunThisFrame"),m(this,"_lastFrameTime",0),m(this,"_updatesRunLastFrame"),this._timer=null!=(null==e?void 0:e.timer)?e.timer:new Ec,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new Fr,this._scheduledTasksByPriority=new Fr,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),wt&&te.log("task scheduler instantiated"),(null==(t=globalThis.MappedinDebug)?void 0: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 Fr,this._scheduledTasksByPriority=new Fr,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),wt&&te.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){let t;this._timer.beginFrame(),this._performance&&(t=performance.now());let r=!1;wt&&(0===xc&&(r=!0),++xc,xc%=Qw);let n=this._scheduledUpdatesByOrdering.keys();for(let e=n.length-1;e>=0;--e){let t=n[e];for(let e of this._scheduledUpdatesByOrdering.get(t).values())this._updatesToRunThisFrame.push(e),r&&te.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&&te.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&&te.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()-t),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(e){let t,r=this._scheduledTasksByPriority.popFromMaxKey(),n=null;te.assert(void 0!==r),Object.getPrototypeOf(r)===xs.prototype&&(n=r,r=n._popTask()),te.assert(void 0!==r),te.assert(Object.getPrototypeOf(r)===_n.prototype),this._performance&&(t=performance.now()),r._callback(e),r._complete=!0,this._performance&&(r._lastFrameTime=performance.now()-t),wt&&te.log("task completed",r.name),null!=n&&(n.isComplete()?(n.clear(),n._onComplete(),wt&&te.log("group completed",n.name)):this._scheduledTasksByPriority.insert(n._priority,n))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===xs)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,wt&&te.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),wt&&te.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)===_n.prototype?e._cancelled=!0:"clear"in e&&e.clear(),wt&&te.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)===_n.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)===_n.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,wt&&te.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)===_n.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)===_n.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),wt&&te.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===_n.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,wt&&te.log("task priority changed",e.name,t)}};s(Es,"TaskScheduler");var Fr=class{constructor(){m(this,"_map"),m(this,"_size"),m(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(te.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,r={[Symbol.iterator]:()=>r,next:()=>{if(null==t){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values()}let r=t.next();for(;r.done;){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values(),r=t.next()}return r}};return r}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return te.assert(e===this._size),e}};s(Fr,"Multimap");var Dn,Ft,zn,rn,Ze,Oa,Sa,qr,ja,Vr,kn,Is,Os,Fn,Pa,Ss,js,Ps,pk,Ca,Aa,Na,Ic,wn=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),Br="",ek=.09,tk=1,nk=.025,rk=.5,ik=5e-4,ak=5e-4,ok=.01,sk=.05,Kf=1,lk=.01,uk=.2,ck={MappedinCategory:"categories",MappedinLocation:"locations"},dk={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:$f,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===L.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:ek,PRIMARY_INDEX_WEIGHT:tk,SECONDARY_INDEX_WEIGHT:nk,CATEGORY_NAME_WEIGHT:rk,LOCATION_NAME_WEIGHT:Kf,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:ik,CATEGORY_LOCATION_TAGS_WEIGHT:ak,CATEGORY_LOCATION_NAME_WEIGHT:ok,PRIMARY_INDEX_TAGS_NAME_WEIGHT:sk,LOCATION_DEFAULT_RANK:Kf,RATIO_OF_FUZZY_TO_EXACT:lk,RATIO_OF_PREFIX_TO_EXACT:uk}},Ia=class{constructor(e,t){var r,n,i;F(this,Ps),F(this,Dn,void 0),F(this,Ft,void 0),F(this,zn,void 0),F(this,rn,void 0),F(this,Ze,void 0),F(this,Oa,new Es({performance:!0})),F(this,Sa,void 0),F(this,qr,void 0),F(this,ja,new Map),F(this,Vr,0),F(this,kn,s((e=>{Ds(this,Vr)._++,g(this,Oa).scheduleUpdate(new Ts({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),Ds(this,Vr)._--,0===g(this,Vr)&&g(this,Pa).call(this)}}))}),"#addTask")),F(this,Is,s((e=>{var t,r,n;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=g(this,Ze).constants,s=o;(null==(t=g(this,Ze))?void 0:t.useLocationRank)&&(s=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,r;return(null==(t=e.rank)?void 0:t.score)?null==(r=e.rank)?void 0:r.score:o})),o):o),g(this,kn).call(this,(()=>{g(this,Ft).add({name:wn(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:s})})),(null==(r=g(this,Ze))?void 0:r.searchTags)&&Array.isArray(e.tags)&&e.tags.forEach((t=>{g(this,Ft).add({name:"",tag:wn(t),id:"MappedinLocation_"+e.id,weight:a,rank:s})})),(null==(n=g(this,Ze))?void 0:n.searchDescriptions)&&g(this,kn).call(this,(()=>g(this,zn).add({description:wn(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:s})))}),"#processLocation")),F(this,Os,s((e=>{var t,r;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:n,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=g(this,Ze).constants;g(this,kn).call(this,(()=>g(this,Ft).add({name:wn(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:a})));let s=e.locations.reduce(((e,t)=>e+` ${Br} `+t.name),"")+` ${Br}`;if((null==(t=g(this,Ze))?void 0:t.searchDescriptionsInCategories)&&e.locations.forEach((t=>{null!=t.description&&g(this,kn).call(this,(()=>g(this,rn).add({id:"MappedinCategory_"+e.id,"category.locations.description":wn(t.description),ref:t.name,weight:n})))})),null==(r=g(this,Ze))?void 0:r.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var r;return e+(null==(r=t.tags)?void 0:r.reduce(((e,t)=>e+` ${Br} `+t),""))+` ${Br}`}),"");g(this,kn).call(this,(()=>g(this,rn).add({"category.locations.tags":wn(t),id:"MappedinCategory_"+e.id,weight:i})))}g(this,kn).call(this,(()=>g(this,rn).add({"category.locations.name":wn(s),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),F(this,Fn,void 0),F(this,Pa,void 0),F(this,Ss,s((e=>{var t;let r=e.score,{object:n,id:i,weight:o,rank:a}=e,[s,l]=i.split("_"),u=n||g(this,Dn).getCollectionItemById(ck[s],l);return a&&(null==(t=g(this,Ze))?void 0:t.useLocationRank)&&(r+=a),o&&(r*=o),{score:r,type:s,object:u}}),"#processSearchResult")),F(this,js,s(((e,t)=>{for(let r in e.match)e.match[r].forEach((n=>{let i=e.ref||e[n]||t.object[n];if("category.locations.tags"===n||"category.locations.name"===n){let t=new RegExp(`[^${Br}]* `+r+` [^${Br}]*`,"ig").exec(e[n]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:r,weight:e.weight,matchesOn:n,value:i})}))}),"#addMatches")),F(this,Ca,void 0),F(this,Aa,void 0),F(this,Na,void 0),V(this,qr,new ka({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),V(this,Ze,{...dk,...t}),V(this,Dn,e),V(this,Sa,new Set(null==(r=g(this,Ze))?void 0:r.stopWords));let o=g(this,Dn).venue.slug,{PRIMARY_INDEX_FUZZYNESS:a,PRIMARY_INDEX_WEIGHT:l,CATEGORY_NAME_WEIGHT:u,RATIO_OF_FUZZY_TO_EXACT:c,RATIO_OF_PREFIX_TO_EXACT:d,PRIMARY_INDEX_TAGS_NAME_WEIGHT:h}=g(this,Ze).constants,p=["object","query","weight","tag","rank"],f={fields:["query","name","tag"],storeFields:p,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:a},boost:{name:l,query:l,tag:h},weights:{fuzzy:c,prefix:d},boostDocument:e=>e.includes("MappedinLocation")?l:e.includes("MappedinCategory")?u:l},v={fields:["description"],storeFields:p,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var r;return(null==(r=g(this,Sa))?void 0:r.has(e.toLowerCase()))?null:e.toLowerCase()}},y={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...p,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(V(this,Fn,new Promise((e=>{V(this,Pa,e)}))),null==(n=g(this,Ze))?void 0:n.jsonIndex){let{primary:e,secondary:t,extra:r}=JSON.parse(null==(i=g(this,Ze))?void 0:i.jsonIndex);V(this,Ft,ir.default.loadJS(e,f)),V(this,zn,ir.default.loadJS(t,v)),V(this,rn,ir.default.loadJS(r,y))}else V(this,Ft,new ir.default(f)),V(this,zn,new ir.default(v)),V(this,rn,new ir.default(y)),g(this,Dn).locations.forEach(g(this,Is)),g(this,Dn).categories.forEach(g(this,Os));g(this,Oa).update(performance.now()),V(this,Ca,ls(((e,t)=>{g(this,qr).trackSearchSuggest({query:e,hits:t}),Xe.addPendingEvent(new Ii({venue:o}))}),300)),V(this,Aa,ls(((e,t)=>{g(this,qr).trackSearch({query:e,hits:t}),Xe.addPendingEvent(new Ei({venue:o}))}),300)),V(this,Na,ls((()=>{Xe.addPendingEvent(new Ti({venue:o}))}),300)),Xe.addPendingEvent(new xi({search_descriptions:g(this,Ze).searchDescriptions,search_tags:g(this,Ze).searchTags,search_descriptions_in_categories:g(this,Ze).searchDescriptionsInCategories,search_tags_in_categories:g(this,Ze).searchTagsInCategories,use_location_rank:g(this,Ze).useLocationRank,venue:o}))}async suggest(e){await g(this,Fn);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:r,PRIMARY_INDEX_TAGS_NAME_WEIGHT:n,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=g(this,Ze).constants,a=g(this,Ft).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:r,query:r,tag:n},weights:{fuzzy:i,prefix:o}});return g(this,Ca).call(this,e,a.length),{total:a.length,hits:a.map((e=>({text:e.suggestion})))}}async search(e){await g(this,Fn);let t=ut(this,Ps,pk).call(this,e);return g(this,Aa).call(this,e,t.length),t}async toJSON(){return await g(this,Fn),JSON.stringify({primary:g(this,Ft),secondary:g(this,zn),extra:g(this,rn)})}async addQuery(e){let t,r,{query:n,object:i,weight:o=1}=e;await g(this,Fn),t=i instanceof vn?"MappedinLocation":i instanceof nr?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?r=t+"_"+i.id:"string"==typeof i.id?r="Custom_"+i.id:(r=g(this,ja).get(i),r||(r="Custom_"+mn(),g(this,ja).set(i,r))),g(this,Ft).add({id:r,weight:o,object:i,query:wn(n)}),g(this,Na).call(this)}};s(Ia,"OfflineSearch"),Dn=new WeakMap,Ft=new WeakMap,zn=new WeakMap,rn=new WeakMap,Ze=new WeakMap,Oa=new WeakMap,Sa=new WeakMap,qr=new WeakMap,ja=new WeakMap,Vr=new WeakMap,kn=new WeakMap,Is=new WeakMap,Os=new WeakMap,Fn=new WeakMap,Pa=new WeakMap,Ss=new WeakMap,js=new WeakMap,Ps=new WeakSet,pk=s((function(e){let t=[],r=wn(e);t=[...g(this,Ft).search(r),...g(this,zn).search(r),...g(this,rn).search(r)].sort(((e,t)=>t.score-e.score));let n={};for(let e of t){let t=g(this,Ss).call(this,e);n[e.id]?n[e.id].score+=t.score:n[e.id]={...t,matches:[]},g(this,js).call(this,e,n[e.id])}return Object.keys(n).map((e=>({...n[e],matches:n[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),Ca=new WeakMap,Aa=new WeakMap,Na=new WeakMap,y(),function(e){e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY"}(Ic||(Ic={}));var Yf=globalThis.fetch;function er(){if(null==Yf)throw new Error("fetch is not available in your environment. Pass your own function into `setFetch` (node-fetch, etc)");return Yf}s(er,"isomorphicFetch");var Zf,Qf,hk=null==(Qf=null==(Zf=L)?void 0:Zf.env)?void 0:Qf.npm_package_version;globalThis.btoa||(globalThis.btoa=Xf.encode);var fk=["ar"];function Oc(e){let t={...Gf,things:Wf,...e};return t.headers={...t.headers,"mappedin-sdk-version":hk},e.platformString&&(t.headers={...t.headers,"mappedin-platform-version":e.platformString}),t.noAuth||(t.accessToken?t.authorization=`Bearer ${t.accessToken}`:t.clientId&&t.clientSecret&&(t.authorization=`Basic ${globalThis.btoa(`${t.clientId}:${t.clientSecret}`)}`)),t}async function Sc(e){let t=Oc({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,...e}}),r="public/1/"+(t.useDraftData?"draft/":""),n=new Ln({...t,baseUrl:t.baseUrl+r});return await n.fetch(),Xe.addPendingEvent(new mi({venue:t.venue})),n}s(Oc,"parseOptions"),s(Sc,"getVenue");var Jf={shouldPopulateBundledImagesAsBlobs:!(void 0!==globalThis.navigator&&"ReactNative"==globalThis.navigator.product)};async function jc(e){let t=Oc({baseUrl:"https://api-gateway.mappedin.com/",...Jf,...e}),{url:r,updated_at:n}=await mk(e),i=await er()(r,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error(`Unrecognized format ${a}`);let s=new Ln(t);return await s.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),s.updatedAt=n,s}async function mk(e){let t=Oc({baseUrl:"https://api-gateway.mappedin.com/",...Jf,...e}),{version:r,venue:n}=e,i=`${e.bundleBaseUri||t.baseUrl+`exports/legacy${null!=t.language&&fk.includes(t.language)?"-"+t.language:""}/1/bundle`}?venue=${n}&version=1.0.0`;return t.language=void 0,await gc(t,i)}s(jc,"getVenueBundle"),s(mk,"getVenueBundleURL");var gk=!1;function vk(e){e.things=e.things||{},e.things.venue=e.things.venue||[],e.things.venue.push("slug","defaultMap"),e.things.nodes=e.things.nodes||[],e.things.nodes.push("x","y","paths","map"),e.things.polygons=e.things.polygons||[],e.things.locations=e.things.locations||[],e.things.locations.push("sortOrder","parent","showLabelWhenImagePresent","hidden"),e.things.maps=e.things.maps||[],e.things.maps.push("height","width","georeference"),e.perspective=e.perspective3D||e.perspective||void 0,e.things.maps.push("scene","layers"),e.things.polygons.push("canvasBounds","map","image","perspectives","material","holes","label","geometry"),gk&&e.things.polygons.push("layer","geometry","vertexes")}s(vk,"parseOptions");var yk=s((function(e){return null==e.mapView&&(e.mapView={}),new Promise((function(t,r){function n(n,i){if(n)r(n);else{let n={};try{e.firstMapSelector&&(e.mapView=e.mapView||{},e.mapView.firstMap=e.firstMapSelector(i))}catch(e){te.error("Failure in firstMapSelector! Loading default map instead."),te.error(e),r(e)}n.venue=i,t(n)}}s(n,"handleInit"),vk(e.venue),e.venue.useVenueBundle?jc(e.venue).then((e=>n(null,e))).catch((e=>n(e,null))):Sc(e.venue).then((e=>n(null,e))).catch((e=>n(e,null)))}))}),"initialize");
|