@local-logic/sdks-app 1.0.0-beta.65 → 1.0.0-beta.67
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/dist/assets/{auto-track-legacy.bcbecbf8.js → auto-track-legacy.f9840683.js} +1 -1
- package/dist/assets/{auto-track.243da627.js → auto-track.f73c34a7.js} +1 -1
- package/dist/assets/{chevron_right-legacy.c94205d1.js → chevron_right-legacy.4a96f715.js} +1 -1
- package/dist/assets/{chevron_right.ed021687.js → chevron_right.427d77f6.js} +1 -1
- package/dist/assets/{index-legacy.8c3f4d82.js → index-legacy.0d90becf.js} +4 -4
- package/dist/assets/{index-legacy.9b2b6e12.js → index-legacy.211144f2.js} +1 -1
- package/dist/assets/{index-legacy.12dc81c1.js → index-legacy.3b49d3a5.js} +1 -1
- package/dist/assets/{index-legacy.3055f688.js → index-legacy.45d65bd6.js} +1 -1
- package/dist/assets/{index-legacy.c489e13e.js → index-legacy.45d7b5c7.js} +1 -1
- package/dist/assets/{index-legacy.0b1c2bb2.js → index-legacy.631596f5.js} +1 -1
- package/dist/assets/{index-legacy.625673e9.js → index-legacy.6ed29dcf.js} +1 -1
- package/dist/assets/{index-legacy.415cee9b.js → index-legacy.b87ca0ca.js} +1 -1
- package/dist/assets/{index-legacy.6eb621a2.js → index-legacy.c10a590c.js} +6 -6
- package/dist/assets/{index.d07e0117.js → index.4b5f7238.js} +1 -1
- package/dist/assets/index.603b7e8b.js +1 -0
- package/dist/assets/{index.78e59a55.js → index.689aa908.js} +204 -204
- package/dist/assets/{index.a829928a.js → index.9c7a418d.js} +1 -1
- package/dist/assets/{index.59c286d1.js → index.aad70e37.js} +1 -1
- package/dist/assets/{index.59699164.js → index.adca6e84.js} +1 -1
- package/dist/assets/{index.3b922ccc.js → index.c9949bba.js} +1 -1
- package/dist/assets/{index.fcbca47f.js → index.e77bdb0c.js} +11 -11
- package/dist/assets/{index.661181da.js → index.fd288973.js} +1 -1
- package/dist/assets/{index.umd-legacy.ea5626e0.js → index.umd-legacy.77e7f5f5.js} +1 -1
- package/dist/assets/{index.umd.6358a889.js → index.umd.3636b63d.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +3 -3
- package/dist/assets/index.95642d9d.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){var t,e,n,r,i,o,a,u,s,c,l,f,p,d,h,v,y,g,m,b,w,x,_,I,S,C;function k(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||L(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function P(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function j(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */j=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(k){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===l)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(k){return{type:"throw",arg:k}}}t.wrap=s;var l={};function f(){}function p(){}function d(){}var h={};u(h,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(h=y);var g=d.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==B(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,u(g,"constructor",d),u(d,"constructor",p),p.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function M(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void n(c)}u.done?e(s):Promise.resolve(s).then(r,i)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){M(o,r,i,a,u,"next",t)}function u(t){M(o,r,i,a,u,"throw",t)}a(void 0)}))}}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(s){u=!0,i=s}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}(t,e)||L(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){if(t){if("string"==typeof t)return T(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,e):void 0}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?F(Object(n),!0).forEach((function(e){q(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(t,e,n){return e&&z(t.prototype,e),n&&z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}System.register(["./chevron_right-legacy.c94205d1.js","./index-legacy.8c3f4d82.js"],(function(M,L){"use strict";var T,F,z,U,G,V,K,W,J,Z,H,$,Y,Q,X,tt,et,nt,rt,it,ot,at,ut,st,ct,lt,ft,pt,dt,ht,vt,yt,gt,mt,bt,wt,xt,_t,It,St,Ct,kt,Ot,Pt,jt,Mt,Et,At,Lt,Tt,Ft,Nt,Dt;return{setters:[function(t){T=t.u,F=t.p,z=t.s,U=t.M,G=t.a,V=t.$,K=t.b,W=t.c,J=t.d,Z=t.S,H=t.e,$=t.f,Y=t.g,Q=t.m,X=t.N,tt=t.P},function(t){et=t._,nt=t.a,rt=t.b,it=t.c,ot=t.d,at=t.e,ut=t.f,st=t.g,ct=t.R,lt=t.r,ft=t.w,pt=t.j,dt=t.B,ht=t.h,vt=t.u,yt=t.i,gt=t.p,mt=t.s,bt=t.y,wt=t.F,xt=t.k,_t=t.l,It=t.I,St=t.m,Ct=t.n,kt=t.N,Ot=t.X,Pt=t.U,jt=t.A,Mt=t.x,Et=t.O,At=t.o,Lt=t.q,Tt=t.C,Ft=t.t,Nt=t.v,Dt=t.z}],execute:function(){function zt(t){return"string"==typeof t}function Rt(t){return"number"==typeof t}function qt(t){return"function"==typeof t}function Bt(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}M({a:Ht,b:ti,e:function(){return!Qt()},h:br,i:te,j:Xt,l:Qr,m:Vr,n:$t,o:ye,u:function(t){var e=Yr(t);void 0!==e&&e.remove();return Promise.resolve()}});var Ut=function(t){function e(e,n){var r=t.call(this,n)||this;return r.field=e,r}return et(e,t),e}(Error);function Gt(t){var e,n=t&&t.event&&t.event.type,r=t.event;if(void 0===r)throw new Ut("event","Event is missing");if(!zt(n))throw new Ut("event","Event is not a string");if("track"===n&&!zt(r.event))throw new Ut("event","Event is not a string");var i=null!==(e=r.properties)&&void 0!==e?e:r.traits;if("alias"!==n&&!Bt(i))throw new Ut("properties","properties is not an object");if(!function(t){var e,n,r;return zt(null!==(r=null!==(n=null!==(e=t.userId)&&void 0!==e?e:t.anonymousId)&&void 0!==n?n:t.groupId)&&void 0!==r?r:t.previousId)}(r))throw new Ut("userId","Missing userId or anonymousId");return t}var Vt={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:Gt,identify:Gt,page:Gt,alias:Gt,group:Gt,screen:Gt};function Kt(t,e,n,r){var i,o=[t,e,n,r],a=Bt(t)?t.event:t;if(!a||!zt(a))throw new Error("Event missing");var u=Bt(t)?null!==(i=t.properties)&&void 0!==i?i:{}:Bt(e)?e:{},s={};return Bt(e)&&!qt(n)&&(s=null!=n?n:{}),Bt(t)&&!qt(e)&&(s=null!=e?e:{}),[a,u,s,o.find(qt)]}function Wt(t,e,n,r,i){var o,a,u=null,s=null,c=[t,e,n,r,i],l=c.filter(zt);void 0!==l[0]&&void 0!==l[1]&&(u=l[0],s=l[1]),1===l.length&&(u=null,s=l[0]);var f=c.find(qt),p=c.filter((function(t){return null===s?Bt(t):Bt(t)||null===t})),d=null!==(o=p[0])&&void 0!==o?o:{},h=null!==(a=p[1])&&void 0!==a?a:{};return[u,s,d,h,f]}var Jt=function(t){return function(){for(var e,n,r,i,o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var s=null;s=null!==(r=null!==(e=a.find(zt))&&void 0!==e?e:null===(n=a.find(Rt))||void 0===n?void 0:n.toString())&&void 0!==r?r:t.id();var c=a.filter((function(t){return null===s?Bt(t):Bt(t)||null===t})),l=null!==(i=c[0])&&void 0!==i?i:{},f=null!==(o=c[1])&&void 0!==o?o:{},p=a.find(qt);return[s,l,f,p]}};function Zt(t,e,n,r){Rt(t)&&(t=t.toString()),Rt(e)&&(e=e.toString());var i=[t,e,n,r],o=i.filter(zt),a=o[0],u=void 0===a?t:a,s=o[1],c=void 0===s?null:s,l=i.filter(Bt)[0];return[u,c,void 0===l?{}:l,i.find(qt)]}function Ht(t){return Promise.resolve(t)}function $t(t,e){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),e);t.then((function(t){return clearTimeout(i),n(t)})).catch(r)}))}function Yt(t,e,n,r){var i;return(i=n,new Promise((function(t){return setTimeout(t,i)}))).then((function(){return $t(function(){try{return Ht(e(t))}catch(n){return Promise.reject(n)}}(),null!=r?r:1e3)})).catch((function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")})).then((function(){return t}))}function Qt(){return"undefined"!=typeof window}function Xt(){return!Qt()||window.navigator.onLine}function te(){return!Xt()}for(var ee,ne=256,re=[];ne--;)re[ne]=(ne+256).toString(16).substring(1);function ie(){var t,e=0,n="";if(!ee||ne+16>256){for(ee=Array(e=256);e--;)ee[e]=256*Math.random()|0;e=ne=0}for(;e<16;e++)t=ee[ne+e],n+=6==e?re[15&t|64]:8==e?re[63&t|128]:re[t],1&e&&e>1&&e<11&&(n+="-");return ne++,n}function oe(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,u=t;o<a&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)u=u[i]=o===a?n:B(r=u[i])===B(e)?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}var ae=Object.freeze(Object.defineProperty({__proto__:null,dset:oe},Symbol.toStringTag,{value:"Module"}));M("d",ae);var ue=function(){function t(){var t=this;this._logs=[],this.log=function(e,n,r){var i=new Date;t._logs.push({level:e,message:n,time:i,extras:r})}}return Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce((function(t,e){var n,r,i,o=nt(nt({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete o.time;var a=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[a]&&(a="".concat(a,"-").concat(Math.random())),nt(nt({},t),((n={})[a]=o,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),se=ue,ce=function(){function t(t){this.metrics=[],this.remoteMetrics=t}return t.prototype.increment=function(t,e,n){var r;void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()}),null===(r=this.remoteMetrics)||void 0===r||r.increment(t,null!=n?n:[])},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map((function(t){return nt(nt({},t),{tags:t.tags.join(",")})}));console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map((function(t){return{m:t.metric,v:t.value,t:t.tags,k:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),le=ce;function fe(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],u={},s=function t(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:t,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return u[t.toLowerCase()]},has:function(t){return t.toLowerCase()in u}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),u[e]=u[e]?u[e]+","+n:n})),n(s())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}var pe="1.44.0";/*! js-cookie v3.0.1 | MIT */function de(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var he,ve=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=de({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var u=decodeURIComponent(o[0]);if(r[u]=e.read(a,u),t===u)break}catch(s){}}return t?r[t]:r}},remove:function(t,e){r(t,"",de({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,de({},this.attributes,e))},withConverter:function(e){return t(de({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function ye(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(xr){return t}}function ge(t){var e=function(t){try{return new URL(t)}catch(xr){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(ve.set(i,"1",a),ve.get(i))return ve.remove(i,a),o}catch(u){return}}}function me(t,e,n){var r=ve.get("s:context.referrer"),i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t);r=r?JSON.parse(r):void 0,(i=null!=i?i:r)&&(e&&(e.referrer=nt(nt({},e.referrer),i)),n||ve.set("s:context.referrer",JSON.stringify(i),function(){if(he)return he;var t=ge(window.location.href);return he={expires:31536e6,secure:!1,path:"/"},t&&(he.domain=t),he}()))}function be(t,e,n,r){var i,o,a,u,s=t.user(),c=window.location.search;e.context=null!==(o=null!==(i=e.context)&&void 0!==i?i:e.options)&&void 0!==o?o:{};var l=e.context,f=e.anonymousId;delete e.options,e.writeKey=null==n?void 0:n.apiKey,l.userAgent=window.navigator.userAgent;var p=navigator.userLanguage||navigator.language;if(void 0===l.locale&&void 0!==p&&(l.locale=p),!l.library){l.library={name:"analytics.js",version:"npm:next-".concat(pe)}}c&&!l.campaign&&(l.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.substr(4);"campaign"===a&&(a="name"),t[a]=ye(o)}return t}),{})}(c)),me(c,l,null!==(a=t.options.disableClientPersistence)&&void 0!==a&&a),e.userId=e.userId||s.id(),e.anonymousId=s.anonymousId(f),e.sentAt=new Date;var d=t.queue.failedInitializations||[];d.length>0&&(e._metadata={failedInitializations:d});var h=[],v=[];for(var y in r){var g=r[y];"Segment.io"===y&&h.push(y),"bundled"===g.bundlingStatus&&h.push(y),"unbundled"===g.bundlingStatus&&v.push(y)}for(var m=0,b=(null==n?void 0:n.unbundledIntegrations)||[];m<b.length;m++){var w=b[m];v.includes(w)||v.push(w)}var x=null!==(u=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==u?u:{},_=[];h.sort().forEach((function(t){var e;(null!==(e=x[t])&&void 0!==e?e:[]).forEach((function(t){_.push(t)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(e._metadata=nt(nt({},e._metadata),{bundled:h.sort(),unbundled:v.sort(),bundledIds:_}));var I=function(){var t=ve.get("_ga");if(t&&t.startsWith("amp"))return t}();return I&&(l.amp={id:I}),e}function we(t){console.error("Error sending segment performance metrics",t)}var xe,_e=function(){function t(t){var e,n,r,i,o=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:"api.segment.io/v1",this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var a=!1;!function t(){a||(a=!0,o.flush().catch(we),a=!1,setTimeout(t,o.flushTimer))}()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});n.library="analytics.js";n.library_version="npm:next-".concat(pe),this.queue.push({type:"Counter",metric:t,value:1,tags:n}),t.includes("error")&&this.flush().catch(we)}},t.prototype.flush=function(){return rt(this,void 0,void 0,(function(){var t=this;return it(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){we(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return rt(this,void 0,void 0,(function(){var t,e;return it(this,(function(n){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},[2,fe("https://".concat(this.host,"/m"),{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}(),Ie=M("C",(function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""})),Se=M("k",function(){function t(t,e){this.logger=new se,this.cancel=function(t){if(t)throw t;throw new Ie({reason:"Context Cancel"})},this._attempts=0,this._event=t,this._id=null!=e?e:ie(),this.stats=new le(xe)}return t.initMetrics=function(t){xe=new _e(t)},t.system=function(){return new t({type:"track",event:"system"})},t.prototype.isSame=function(t){return t._id===this._id},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this._event},set:function(t){this._event=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attempts",{get:function(){return this._attempts},set:function(t){this._attempts=t},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this._event.integrations)||void 0===n?void 0:n[r]))return this._event}return oe(this._event,t,e),this._event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this._event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()),Ce=function(){function t(){this.callbacks={}}return t.prototype.on=function(t,e){return this.callbacks[t]?this.callbacks[t].push(e):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this;return this.on(t,(function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)})),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter((function(t){return t!==e}));return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=null!==(e=this.callbacks[t])&&void 0!==e?e:[];return o.forEach((function(t){t.apply(n,r)})),this},t}(),ke=M("c",{}),Oe={},Pe={},je={exports:{}};!function(t){function e(t){return function(e,n,r,o){var a,u=o&&function(t){return"function"==typeof t}(o.normalizer)?o.normalizer:i;n=u(n);for(var s=!1;!s;)c();function c(){for(a in e){var t=u(a);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[a];return null==i?void(s=!0):n.length?void(e=i):void(s=!0)}}}a=void 0,s=!0}if(a)return null==e?e:t(e,a,r)}}function n(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function r(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function i(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}t.exports=e((function(t,e){if(t.hasOwnProperty(e))return t[e]})),t.exports.find=t.exports,t.exports.replace=function(t,n,i,o){return e(r).call(this,t,n,i,o),t},t.exports.del=function(t,r,i){return e(n).call(this,t,r,null,i),t}}(je);var Me=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pe,"__esModule",{value:!0});var Ee=Me(je.exports);function Ae(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return Ee.default(n,"address."+t)||Ee.default(n,t)||(e?Ee.default(n,"address."+e):null)||(e?Ee.default(n,e):null)||Ee.default(r,"address."+t)||Ee.default(r,t)||(e?Ee.default(r,"address."+e):null)||(e?Ee.default(r,e):null)}}Pe.default=function(t){t.zip=Ae("postalCode","zip"),t.country=Ae("country"),t.street=Ae("street"),t.state=Ae("state"),t.city=Ae("city"),t.region=Ae("region")};var Le={};Object.defineProperty(Le,"__esModule",{value:!0}),Le.clone=void 0,Le.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e};var Te={};Object.defineProperty(Te,"__esModule",{value:!0});var Fe={Salesforce:!0};Te.default=function(t){return!Fe[t]};var Ne={},De=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;Ne.parse=function(t){var e=[1,5,6,7,11,12],n=De.exec(t),r=0;if(!n)return new Date(t);for(var i,o=0;i=e[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(a)},Ne.is=function(t,e){return"string"==typeof t&&((!e||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&De.test(t))};var ze={},Re=/\d{13}/;ze.is=function(t){return Re.test(t)},ze.parse=function(t){return t=parseInt(t,10),new Date(t)};var qe={},Be=/\d{10}/;qe.is=function(t){return Be.test(t)},qe.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)};var Ue=Ne,Ge=ze,Ve=qe,Ke=Object.prototype.toString;var We=function(t){return e=t,"[object Date]"===Ke.call(e)?t:function(t){return"[object Number]"===Ke.call(t)}(t)?new Date((n=t)<315576e5?1e3*n:n):Ue.is(t)?Ue.parse(t):Ge.is(t)?Ge.parse(t):Ve.is(t)?Ve.parse(t):new Date(t);var e,n};var Je=Ne,Ze=He;function He(t,e){return void 0===e&&(e=!0),t&&"object"===B(t)?function(t,e){return Object.keys(t).forEach((function(n){t[n]=He(t[n],e)})),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach((function(n,r){t[r]=He(n,e)})),t}(t,e):Je.is(t,e)?Je.parse(t):t}var $e=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.Facade=void 0;var Ye=$e(Pe),Qe=Le,Xe=$e(Te),tn=$e(We),en=$e(je.exports),nn=$e(Ze);function rn(t,e){e=e||{},this.raw=Qe.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=Qe.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?tn.default(t.timestamp):new Date,e.traverse&&nn.default(t),this.opts=e,this.obj=t}Oe.Facade=rn;var on=rn.prototype;function an(t){return Qe.clone(t)}on.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=en.default(n,e.join("."))),this.opts.clone?an(n):n):n},on.field=function(t){var e=this.obj[t];return this.opts.clone?an(e):e},rn.proxy=function(t){return function(){return this.proxy(t)}},rn.field=function(t){return function(){return this.field(t)}},rn.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?Qe.clone(n):n]),n||[]}},rn.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},on.json=function(){var t=this.opts.clone?Qe.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},on.rawEvent=function(){return this.raw},on.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?Qe.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||en.default(r,t);return"object"!==B(i)&&(i=en.default(this.options(),t)),"object"===B(i)?i:{}}},on.context=on.options,on.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&Xe.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},on.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},on.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},on.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},on.sessionId=on.anonymousId,on.groupId=rn.proxy("options.groupId"),on.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},on.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},on.device=function(){var t=this.proxy("context.device");"object"===B(t)&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},on.userAgent=rn.proxy("context.userAgent"),on.timezone=rn.proxy("context.timezone"),on.timestamp=rn.field("timestamp"),on.channel=rn.field("channel"),on.ip=rn.proxy("context.ip"),on.userId=rn.field("userId"),Ye.default(on);var un={},sn={exports:{}};"function"==typeof Object.create?sn.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:sn.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}};var cn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(un,"__esModule",{value:!0}),un.Alias=void 0;var ln=cn(sn.exports),fn=Oe;function pn(t,e){fn.Facade.call(this,t,e)}un.Alias=pn,ln.default(pn,fn.Facade),pn.prototype.action=function(){return"alias"},pn.prototype.type=pn.prototype.action,pn.prototype.previousId=function(){return this.field("previousId")||this.field("from")},pn.prototype.from=pn.prototype.previousId,pn.prototype.userId=function(){return this.field("userId")||this.field("to")},pn.prototype.to=pn.prototype.userId;var dn={},hn={};Object.defineProperty(hn,"__esModule",{value:!0});var vn=/.+\@.+\..+/;hn.default=function(t){return vn.test(t)};var yn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dn,"__esModule",{value:!0}),dn.Group=void 0;var gn=yn(sn.exports),mn=yn(hn),bn=yn(We),wn=Oe;function xn(t,e){wn.Facade.call(this,t,e)}dn.Group=xn,gn.default(xn,wn.Facade);var _n=xn.prototype;_n.action=function(){return"group"},_n.type=_n.action,_n.groupId=wn.Facade.field("groupId"),_n.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return bn.default(t)},_n.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return mn.default(e)?e:void 0},_n.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},_n.name=wn.Facade.proxy("traits.name"),_n.industry=wn.Facade.proxy("traits.industry"),_n.employees=wn.Facade.proxy("traits.employees"),_n.properties=function(){return this.field("traits")||this.field("properties")||{}};var In={},Sn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(In,"__esModule",{value:!0}),In.Identify=void 0;var Cn=Oe,kn=Sn(je.exports),On=Sn(sn.exports),Pn=Sn(hn),jn=Sn(We),Mn=function(t){return t.trim()};function En(t,e){Cn.Facade.call(this,t,e)}In.Identify=En,On.default(En,Cn.Facade);var An=En.prototype;An.action=function(){return"identify"},An.type=An.action,An.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},An.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return Pn.default(e)?e:void 0},An.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return jn.default(t)},An.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return jn.default(t)},An.companyName=function(){return this.proxy("traits.company.name")},An.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return Mn(t);var e=this.firstName(),n=this.lastName();return e&&n?Mn(e+" "+n):void 0},An.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return Mn(t);var e=this.proxy("traits.name");return"string"==typeof e?Mn(e).split(" ")[0]:void 0},An.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return Mn(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=Mn(e).indexOf(" ");if(-1!==n)return Mn(e.substr(n+1))}},An.uid=function(){return this.userId()||this.username()||this.email()},An.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},An.age=function(){var t=this.birthday(),e=kn.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},An.avatar=function(){var t=this.traits();return kn.default(t,"avatar")||kn.default(t,"photoUrl")||kn.default(t,"avatarUrl")},An.position=function(){var t=this.traits();return kn.default(t,"position")||kn.default(t,"jobTitle")},An.username=Cn.Facade.proxy("traits.username"),An.website=Cn.Facade.one("traits.website"),An.websites=Cn.Facade.multi("traits.website"),An.phone=Cn.Facade.one("traits.phone"),An.phones=Cn.Facade.multi("traits.phone"),An.address=Cn.Facade.proxy("traits.address"),An.gender=Cn.Facade.proxy("traits.gender"),An.birthday=Cn.Facade.proxy("traits.birthday");var Ln={},Tn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Track=void 0;var Fn=Tn(sn.exports),Nn=Oe,Dn=In,zn=Tn(hn),Rn=Tn(je.exports);function qn(t,e){Nn.Facade.call(this,t,e)}Ln.Track=qn,Fn.default(qn,Nn.Facade);var Bn=qn.prototype;Bn.action=function(){return"track"},Bn.type=Bn.action,Bn.event=Nn.Facade.field("event"),Bn.value=Nn.Facade.proxy("properties.value"),Bn.category=Nn.Facade.proxy("properties.category"),Bn.id=Nn.Facade.proxy("properties.id"),Bn.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Bn.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Bn.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Bn.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Bn.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Bn.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Bn.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Bn.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Bn.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Bn.sku=Nn.Facade.proxy("properties.sku"),Bn.tax=Nn.Facade.proxy("properties.tax"),Bn.name=Nn.Facade.proxy("properties.name"),Bn.price=Nn.Facade.proxy("properties.price"),Bn.total=Nn.Facade.proxy("properties.total"),Bn.repeat=Nn.Facade.proxy("properties.repeat"),Bn.coupon=Nn.Facade.proxy("properties.coupon"),Bn.shipping=Nn.Facade.proxy("properties.shipping"),Bn.discount=Nn.Facade.proxy("properties.discount"),Bn.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Bn.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Bn.description=Nn.Facade.proxy("properties.description"),Bn.plan=Nn.Facade.proxy("properties.plan"),Bn.subtotal=function(){var t=Rn.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},Bn.products=function(){var t=this.properties(),e=Rn.default(t,"products");return Array.isArray(e)?e.filter((function(t){return null!==t})):[]},Bn.quantity=function(){return(this.obj.properties||{}).quantity||1},Bn.currency=function(){return(this.obj.properties||{}).currency||"USD"},Bn.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Bn.query=Nn.Facade.proxy("options.query"),Bn.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{}){var r=null==this[n]?this.proxy("properties."+n):this[n]();null!=r&&(e[t[n]]=r,delete e[n])}return e},Bn.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Bn.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return zn.default(e)?e:void 0},Bn.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(!t)return;if("number"==typeof t)return t;if("string"!=typeof t)return;if(t=t.replace(/\$/g,""),t=parseFloat(t),!isNaN(t))return t}(t)},Bn.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},Bn.identify=function(){var t=this.json();return t.traits=this.traits(),new Dn.Identify(t,this.opts)};var Un={},Gn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Un,"__esModule",{value:!0}),Un.Page=void 0;var Vn=Gn(sn.exports),Kn=Oe,Wn=Ln,Jn=Gn(hn);function Zn(t,e){Kn.Facade.call(this,t,e)}Un.Page=Zn,Vn.default(Zn,Kn.Facade);var Hn=Zn.prototype;Hn.action=function(){return"page"},Hn.type=Hn.action,Hn.category=Kn.Facade.field("category"),Hn.name=Kn.Facade.field("name"),Hn.title=Kn.Facade.proxy("properties.title"),Hn.path=Kn.Facade.proxy("properties.path"),Hn.url=Kn.Facade.proxy("properties.url"),Hn.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Hn.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t){var o=null==this[i]?this.proxy("properties."+i):this[i]();null!=o&&(e[t[i]]=o,i!==t[i]&&delete e[i])}return e},Hn.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return Jn.default(e)?e:void 0},Hn.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},Hn.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},Hn.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new Wn.Track(e,this.opts)};var $n={},Yn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($n,"__esModule",{value:!0}),$n.Screen=void 0;var Qn=Yn(sn.exports),Xn=Un,tr=Ln;function er(t,e){Xn.Page.call(this,t,e)}$n.Screen=er,Qn.default(er,Xn.Page),er.prototype.action=function(){return"screen"},er.prototype.type=er.prototype.action,er.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},er.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new tr.Track(e,this.opts)};var nr={},rr=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.Delete=void 0;var ir=rr(sn.exports),or=Oe;function ar(t,e){or.Facade.call(this,t,e)}nr.Delete=ar,ir.default(ar,or.Facade),ar.prototype.type=function(){return"delete"},function(t){var e=ot&&ot.__assign||function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0;var n=Oe;Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=un;Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=dn;Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=In;Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Ln;Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var u=Un;Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return u.Page}});var s=$n;Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return s.Screen}});var c=nr;Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return c.Delete}}),t.default=e(e({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:u.Page,Screen:s.Screen,Delete:c.Delete})}(ke);var ur={exports:{}};!function(t,e){t.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,a,u,s,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(a[2],16),s=parseInt(a[1],16)||0,o[14]=u,o[15]=s,n(l,o),l}function a(t){var e,r,o,a,u,s,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,i(t.subarray(e-64,e)));for(r=(t=e-64<c?t.subarray(e-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(a[2],16),s=parseInt(a[1],16)||0,o[14]=u,o[15]=s,n(l,o),l}function u(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function s(t){var e;for(e=0;e<t.length;e+=1)t[e]=u(t[e]);return t.join("")}function c(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function f(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function p(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function d(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return s(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,u,s=this.byteLength,c=e(n,s),l=s;return r!==t&&(l=e(r,s)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),a=new Uint8Array(o),u=new Uint8Array(this,c,i),a.set(u),o)}}(),h.prototype.append=function(t){return this.appendBinary(c(t)),this},h.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},h.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=s(this._hash),t&&(n=d(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(t,e){var r,i,o,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,t),a=0;a<16;a+=1)t[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},h.hash=function(t,e){return h.hashBinary(c(t),e)},h.hashBinary=function(t,e){var n=s(o(t));return e?d(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(t){var e,r=p(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=s(this._hash),t&&(n=d(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var t=h.prototype.getState.call(this);return t.buff=f(t.buff),t},h.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),h.prototype.setState.call(this,t)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(t,e){var n=s(a(new Uint8Array(t)));return e?d(n):n},h}()}(ur);var sr=ur.exports,cr=function(){function t(t){this.user=t}return t.prototype.track=function(t,e,n,r){return this.normalize(nt(nt({},this.baseEvent()),{event:t,type:"track",properties:e,options:nt({},n),integrations:nt({},r)}))},t.prototype.page=function(t,e,n,r,i){var o,a={type:"page",properties:nt({},n),options:nt({},r),integrations:nt({},i)};return null!==t&&(a.category=t,a.properties=null!==(o=a.properties)&&void 0!==o?o:{},a.properties.category=t),null!==e&&(a.name=e),this.normalize(nt(nt({},this.baseEvent()),a))},t.prototype.screen=function(t,e,n,r,i){var o={type:"screen",properties:nt({},n),options:nt({},r),integrations:nt({},i)};return null!==t&&(o.category=t),null!==e&&(o.name=e),this.normalize(nt(nt({},this.baseEvent()),o))},t.prototype.identify=function(t,e,n,r){return this.normalize(nt(nt({},this.baseEvent()),{type:"identify",userId:t,traits:e,options:nt({},n),integrations:nt({},r)}))},t.prototype.group=function(t,e,n,r){return this.normalize(nt(nt({},this.baseEvent()),{type:"group",traits:e,options:nt({},n),integrations:nt({},r),groupId:t}))},t.prototype.alias=function(t,e,n,r){var i={userId:t,type:"alias",options:nt({},n),integrations:nt({},r)};return null!==e&&(i.previousId=e),void 0===t?this.normalize(nt(nt({},i),this.baseEvent())):this.normalize(nt(nt({},this.baseEvent()),i))},t.prototype.baseEvent=function(){var t={integrations:{},options:{}},e=this.user;return e.id()&&(t.userId=e.id()),e.anonymousId()&&(t.anonymousId=e.anonymousId()),t},t.prototype.context=function(t){var e,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(e=t.options)&&void 0!==e?e:{};delete o.integrations;var a=Object.keys(o),u=null!==(r=null===(n=t.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},s={};return a.forEach((function(t){"context"!==t&&(i.includes(t)?oe(s,t,o[t]):oe(u,t,o[t]))})),[u,s]},t.prototype.normalize=function(t){var e,n,r=Object.keys(null!==(e=t.integrations)&&void 0!==e?e:{}).reduce((function(e,n){var r,i;return nt(nt({},e),((r={})[n]=Boolean(null===(i=t.integrations)||void 0===i?void 0:i[n]),r))}),{}),i=nt(nt({},r),null===(n=t.options)||void 0===n?void 0:n.integrations),o=this.context(t),a=o[0],u=o[1];t.options;var s=at(t,["options"]),c=nt(nt(nt({timestamp:new Date},s),{context:a,integrations:i}),u),l="ajs-next-"+sr.hash(JSON.stringify(c)+ie());return nt(nt({},c),{messageId:l})},t}();var lr="onRemoveFromFuture",fr=M("P",function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return et(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map((function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t){var e=this;if(0===this.getAttempts(t))return this.push(t)[0];var n=this.updateAttempts(t);if(n>this.maxAttempts||this.includes(t))return!1;var r=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,a=t.attempt,u=t.maxTimeout,s=void 0===u?1/0:u;return Math.min(e*r*Math.pow(o,a),s)}({attempt:n-1});return setTimeout((function(){e.queue.push(t),e.future=e.future.filter((function(e){return e.id!==t.id})),e.emit(lr)}),r),this.future.push(t),!0},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find((function(e){return e.id===t.id})))||Boolean(this.future.find((function(e){return e.id===t.id})))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(Ce)),pr={getItem:function(){},setItem:function(){},removeItem:function(){}};try{pr=Qt()&&window.localStorage?window.localStorage:pr}catch(wa){console.warn("Unable to access localStorage",wa)}function dr(t){var e=pr.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new Se(t.event,t.id)}))}function hr(t){var e=pr.getItem(t);return e?JSON.parse(e):{}}function vr(t){pr.removeItem(t)}function yr(t,e,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(t,":lock"),i=pr.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(t){return(new Date).getTime()>t}(o);if(a)return pr.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void pr.removeItem(r);!a&&n<3?setTimeout((function(){yr(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var gr=M("f",function(t){function e(e,n){var r=t.call(this,e,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),a=[],u={};return yr(n,(function(){try{a=dr(i),u=hr(o),vr(i),vr(o),r.queue=ut(ut([],a,!0),r.queue,!0),r.seen=nt(nt({},u),r.seen)}catch(wa){console.error(wa)}})),document.addEventListener("pagehide",(function(){if(r.todo>0){var t=ut(ut([],r.queue,!0),r.future,!0);try{yr(n,(function(){!function(t,e){var n=dr(t),r=ut(ut([],e,!0),n,!0).reduce((function(t,e){var n;return nt(nt({},t),((n={})[e.id]=e,n))}),{});pr.setItem(t,JSON.stringify(Object.values(r)))}(i,t),function(t,e){var n=hr(t);pr.setItem(t,JSON.stringify(nt(nt({},n),e)))}(o,r.seen)}))}catch(wa){console.error(wa)}}})),r}return et(e,t),e}(fr)),mr=function(t){return"object"===B(t)&&null!==t&&"then"in t&&"function"==typeof t.then};function br(t,e){var n="action"in e?e.action.name:e.name;t.log("debug","plugin",{plugin:n});var r=(new Date).getTime(),i=e[t.event.type];if(void 0===i)return Promise.resolve(t);var o=function(t){return rt(this,void 0,void 0,(function(){var e;return it(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}}))}))}((function(){return i.apply(e,[t])})).then((function(t){var e=(new Date).getTime()-r;return t.stats.gauge("plugin_time",e,["plugin:".concat(n)]),t})).catch((function(e){if(e instanceof Ie&&"middleware_cancellation"===e.type)throw e;return e instanceof Ie?(t.log("warn",e.type,{plugin:n,error:e}),e):(t.log("error","plugin Error",{plugin:n,error:e}),t.stats.increment("plugin_error",1,["plugin:".concat(n)]),e)}));return o}function wr(t,e){return br(t,e).then((function(e){if(e instanceof Se)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}var xr,_r,Ir=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},Sr=null!==(xr=(_r=Ir()).__SEGMENT_INSPECTOR__)&&void 0!==xr?xr:_r.__SEGMENT_INSPECTOR__={},Cr=function(t){function e(e){var n,r,i,o=t.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e=t();return mr(e)&&(1==++i&&(n=new Promise((function(t){return r=t}))),e.finally((function(){return 0==--i&&r()}))),e}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=null!=e?e:new gr(4,"event-queue"),o.queue.on(lr,(function(){o.scheduleFlush(0)})),o}return et(e,t),e.prototype.register=function(t,e,n){return rt(this,void 0,void 0,(function(){var r=this;return it(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(e.load(t,n)).then((function(){r.plugins.push(e)})).catch((function(n){if("destination"===e.type)return r.failedInitializations.push(e.name),console.warn(e.name,n),void t.log("warn","Failed to load destination",{plugin:e.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},e.prototype.deregister=function(t,e,n){return rt(this,void 0,void 0,(function(){var r;return it(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==e.name})),[3,4];case 3:return r=i.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:r}),[3,4];case 4:return[2]}}))}))},e.prototype.dispatch=function(t){return rt(this,void 0,void 0,(function(){var e;return it(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]}))}))},e.prototype.subscribeToDelivery=function(t){return rt(this,void 0,void 0,(function(){var e=this;return it(this,(function(n){return[2,new Promise((function(n){e.on("flush",(function r(i,o){i.isSame(t)&&(e.off("flush",r),n(i))}))}))]}))}))},e.prototype.dispatchSingle=function(t){return rt(this,void 0,void 0,(function(){var e=this;return it(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch((function(n){return n instanceof Ie&&!1===n.retry?(t.setFailedDelivery({reason:n}),t):e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)}))]}))}))},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},e.prototype.deliver=function(t){return rt(this,void 0,void 0,(function(){var e,n,r;return it(this,(function(i){switch(i.label){case 0:return[4,this.criticalTasks.done()];case 1:i.sent(),e=Date.now(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=i.sent(),n=Date.now()-e,t.stats.gauge("delivered",n),t.log("debug","Delivered",t.event),[2,t];case 4:throw r=i.sent(),t.log("error","Failed to deliver",r),t.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},e.prototype.enqueuRetry=function(t,e){return!(t instanceof Ie&&!1===t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return rt(this,void 0,void 0,(function(){var t,e;return it(this,(function(n){switch(n.label){case 0:if(0===this.queue.length||!Xt())return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}}))}))},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n,r=this.plugins.filter((function(e){var n,r,i;if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach((function(e){void 0!==t[e]&&(o=t[e])})),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===e.name||t.All)})),i=(e="type",n={},r.forEach((function(t){var r,i=void 0;if("string"==typeof e){var o=t[e];i="string"!=typeof o?JSON.stringify(o):o}else e instanceof Function&&(i=e(t));void 0!==i&&(n[i]=ut(ut([],null!==(r=n[i])&&void 0!==r?r:[],!0),[t],!1))})),n),o=i.before,a=void 0===o?[]:o,u=i.enrichment,s=void 0===u?[]:u,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:a,enrichment:s,destinations:l,after:void 0===f?[]:f}},e.prototype.flushOne=function(t){var e,n,r,i;return rt(this,void 0,void 0,(function(){var o,a,u,s,c,l,f,p,d,h,v,y,g,m;return it(this,(function(b){switch(b.label){case 0:if(!this.isReady())throw new Error("Not ready");o=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),a=o.before,u=o.enrichment,s=0,c=a,b.label=1;case 1:return s<c.length?(l=c[s],[4,wr(t,l)]):[3,4];case 2:(h=b.sent())instanceof Se&&(t=h),b.label=3;case 3:return s++,[3,1];case 4:f=0,p=u,b.label=5;case 5:return f<p.length?(d=p[f],[4,br(t,d)]):[3,8];case 6:(h=b.sent())instanceof Se&&(t=h),b.label=7;case 7:return f++,[3,5];case 8:return null===(n=Sr.enriched)||void 0===n||n.call(Sr,t),v=this.availableExtensions(null!==(r=t.event.integrations)&&void 0!==r?r:{}),y=v.destinations,g=v.after,[4,new Promise((function(e,n){setTimeout((function(){var r=y.map((function(e){return br(t,e)}));Promise.all(r).then(e).catch(n)}),0)}))];case 9:return b.sent(),t.stats.increment("message_delivered"),null===(i=Sr.delivered)||void 0===i||i.call(Sr,t,["segment.io"]),m=g.map((function(e){return br(t,e)})),[4,Promise.all(m)];case 10:return b.sent(),[2,t]}}))}))},e}(Ce);function kr(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}var Or={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Pr=function(){function t(){this.cache={}}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){return this.cache[t]=e,e},t.prototype.remove=function(t){delete this.cache[t]},t}(),jr=function(t){function e(n){void 0===n&&(n=e.defaults);var r=t.call(this)||this;return r.options=nt(nt({},e.defaults),n),r}return et(e,t),e.available=function(){var t=window.navigator.cookieEnabled;return t||(ve.set("ajs:cookies","test"),t=document.cookie.includes("ajs:cookies"),ve.remove("ajs:cookies")),t},Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:ge(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){try{var e=ve.get(t);if(!e)return null;try{return JSON.parse(e)}catch(n){return e}}catch(n){return null}},e.prototype.set=function(t,e){return"string"==typeof e?ve.set(t,e,this.opts()):null===e?ve.remove(t,this.opts()):ve.set(t,JSON.stringify(e),this.opts()),e},e.prototype.remove=function(t){return ve.remove(t,this.opts())},e}(Pr),Mr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.get=function(t){return null},e.set=function(t,e){return null},e.remove=function(t){},e}return et(e,t),e}(Pr),Er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return et(e,t),e.available=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(e){return!1}},e.prototype.get=function(t){var e=localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(n){return JSON.parse(JSON.stringify(e))}return null},e.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(xr){console.warn("Unable to set ".concat(t," in localStorage, storage may be full."))}return e},e.prototype.remove=function(t){return localStorage.removeItem(t)},e}(Pr),Ar=function(){function t(t,e){void 0===t&&(t=Or);var n,r,i,o,a=this;this.options={},this.id=function(t){var e,n;if(a.options.disable)return null;var r=a.chainGet(a.idKey);void 0!==t&&(a.trySet(a.idKey,t),t!==r&&null!==r&&null!==t&&a.anonymousId(null));return null!==(n=null!==(e=a.chainGet(a.idKey))&&void 0!==e?e:a.cookies.get(Or.cookie.oldKey))&&void 0!==n?n:null},this.anonymousId=function(t){var e,n;if(a.options.disable)return null;if(void 0===t){var r=null!==(e=a.chainGet(a.anonKey))&&void 0!==e?e:null===(n=a.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(a.trySet(a.anonKey,null),a.chainGet(a.anonKey)):(a.trySet(a.anonKey,null!=t?t:ie()),a.chainGet(a.anonKey))},this.traits=function(t){var e,n;if(!a.options.disable)return null===t&&(t={}),t&&(a.mem.set(a.traitsKey,null!=t?t:{}),a.localStorage.set(a.traitsKey,null!=t?t:{})),null!==(n=null!==(e=a.localStorage.get(a.traitsKey))&&void 0!==e?e:a.mem.get(a.traitsKey))&&void 0!==n?n:{}},this.options=t,this.cookieOptions=e,this.idKey=null!==(r=null===(n=t.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:Or.cookie.key,this.traitsKey=null!==(o=null===(i=t.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:Or.localStorage.key,this.anonKey="ajs_anonymous_id";var u=!0===t.disable,s=!1!==t.persist;this.localStorage=u||t.localStorageFallbackDisabled||!s||!Er.available()?new Mr:new Er,this.cookies=!u&&s&&jr.available()?new jr(e):new Mr,this.mem=u?new Mr:new Pr;var c=this.cookies.get(Or.cookie.oldKey);c&&(c.id&&this.id(c.id),c.traits&&this.traits(c.traits)),kr(this)}return t.prototype.chainGet=function(t){var e,n,r,i=null!==(r=null!==(n=null!==(e=this.localStorage.get(t))&&void 0!==e?e:this.cookies.get(t))&&void 0!==n?n:this.mem.get(t))&&void 0!==r?r:null;return this.trySet(t,"number"==typeof i?i.toString():i)},t.prototype.trySet=function(t,e){return this.localStorage.set(t,e),this.cookies.set(t,e),this.mem.set(t,e),e},t.prototype.chainClear=function(t){this.localStorage.remove(t),this.cookies.remove(t),this.mem.remove(t)},t.prototype.legacySIO=function(){var t=this.cookies.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();null!==n&&n!==t||(e=nt(nt({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.chainClear(this.idKey),this.chainClear(this.anonKey),this.chainClear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.defaults=Or,t}(),Lr={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Tr=function(t){function e(e,n){void 0===e&&(e=Lr);var r=t.call(this,e,n)||this;return r.anonymousId=function(t){},kr(r),r}return et(e,t),e}(Ar),Fr="This is being deprecated and will be not be available in future releases of Analytics JS",Nr=Ir(),Dr=null==Nr?void 0:Nr.analytics;function zr(){console.warn(Fr)}var Rr=function(t){function e(e,n,r,i,o){var a,u,s,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=zr,c.addIntegrationMiddleware=zr,c.listeners=zr,c.addEventListener=zr,c.removeAllListeners=zr,c.removeListener=zr,c.removeEventListener=zr,c.hasListeners=zr,c.add=zr,c.addIntegration=zr;var l=null==n?void 0:n.cookie,f=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;return c.settings=e,c.settings.timeout=null!==(u=c.settings.timeout)&&void 0!==u?u:300,c.queue=null!=r?r:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var n=t?4:1,r=e?new fr(n,[]):new gr(n,"event-queue");return new Cr(r)}(null==n?void 0:n.retryQueue,f),c._user=null!=i?i:new Ar(f?nt(nt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Tr(f?nt(nt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new cr(c._user),c.integrations=null!==(s=null==n?void 0:n.integrations)&&void 0!==s?s:{},c.options=null!=n?n:{},kr(c),c}return et(e,t),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u=this;return it(this,(function(s){return e=Kt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.track(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return u.emit("track",n,t.event.properties,t.event.options),t}))]}))}))},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u,s=this;return it(this,(function(c){return e=Wt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=this.eventFactory.page(n,r,i,o,this.integrations),[2,this.dispatch(u,a).then((function(t){return s.emit("page",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u=this;return it(this,(function(s){return e=Jt(this._user).apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],this._user.identify(n,r),a=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this.dispatch(a,o).then((function(t){return u.emit("identify",t.event.userId,t.event.traits,t.event.options),t}))]}))}))},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)return this._group;var r=Jt(this._group).apply(void 0,e),i=r[0],o=r[1],a=r[2],u=r[3];this._group.identify(i,o);var s=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(s,c,a,this.integrations);return this.dispatch(l,u).then((function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e}))},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u=this;return it(this,(function(s){return e=Zt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.alias(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return u.emit("alias",n,r,t.event.options),t}))]}))}))},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u,s=this;return it(this,(function(c){return e=Wt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this.dispatch(u,a).then((function(t){return s.emit("screen",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.bcbecbf8.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.bcbecbf8.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.bcbecbf8.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.bcbecbf8.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r=this;return it(this,(function(i){switch(i.label){case 0:return e=Se.system(),n=t.map((function(t){return r.queue.register(e,t,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r=this;return it(this,(function(i){switch(i.label){case 0:return e=Se.system(),n=t.map((function(t){return rt(r,void 0,void 0,(function(){var n;return it(this,(function(r){return n=this.queue.plugins.find((function(e){return e.name===t})),n?[2,this.queue.deregister(e,n,this)]:(e.log("warn","plugin ".concat(t," not found")),[2])}))}))})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset()},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype.dispatch=function(t,e){var n;return rt(this,void 0,void 0,(function(){var r,i,o,a,u;return it(this,(function(s){switch(s.label){case 0:return r=new Se(t),null===(n=Sr.triggered)||void 0===n||n.call(Sr,r),te()&&!this.options.retryQueue?[2,r]:(i=Date.now(),this.queue.isEmpty()?[4,this.queue.dispatchSingle(r)]:[3,2]);case 1:return o=s.sent(),[3,4];case 2:return[4,this.queue.dispatch(r)];case 3:o=s.sent(),s.label=4;case 4:return a=Date.now()-i,u=this.settings.timeout,e?[4,Yt(o,e,Math.max((null!=u?u:300)-a,0),u)]:[3,6];case 5:o=s.sent(),s.label=6;case 6:return this._debug&&o.flush(),[2,o]}}))}))},e.prototype.addSourceMiddleware=function(t){return rt(this,void 0,void 0,(function(){var e=this;return it(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return rt(e,void 0,void 0,(function(){var e,n,r;return it(this,(function(i){switch(i.label){case 0:return[4,st((function(){return Promise.resolve().then((function(){return ei}))}),void 0)];case 1:return e=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(t){if("destination"===t.type)return n[t.name]=!0})),r=e(t,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.queue.plugins.filter((function(e){return e.name.toLowerCase()===t.toLowerCase()}));return r.forEach((function(t){t.addMiddleware.apply(t,e)})),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return rt(this,void 0,void 0,(function(){return it(this,(function(e){switch(e.label){case 0:return[4,st((function(){return L.import("./index-legacy.415cee9b.js")}),void 0)];case 1:return[2,(0,e.sent().queryString)(this,t)]}}))}))},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),rt(this,void 0,void 0,(function(){return it(this,(function(e){return[2,Promise.all(this.queue.plugins.map((function(t){return t.ready?t.ready():Promise.resolve()}))).then((function(e){return t(e),e}))]}))}))},e.prototype.noConflict=function(){return console.warn(Fr),window.analytics=null!=Dr?Dr:this,this},e.prototype.normalize=function(t){return console.warn(Fr),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Fr),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return pe},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return rt(this,void 0,void 0,(function(){return it(this,(function(t){return console.warn(Fr),[2,Promise.resolve(this)]}))}))},e.prototype.pageview=function(t){return rt(this,void 0,void 0,(function(){return it(this,(function(e){switch(e.label){case 0:return console.warn(Fr),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}}))}))},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Fr),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Fr),this.queue.plugins.filter((function(t){return"destination"===t.type})).reduce((function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)}),{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(Ce);function qr(){return"undefined"!=typeof process&&process.env?process.env:{}}var Br,Ur=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,Gr=function(){var t=function(){var t;return null!=Br?Br:null===(t=window.analytics)||void 0===t?void 0:t._cdn}();if(t)return t;var e,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(t){var n,r=null!==(n=t.getAttribute("src"))&&void 0!==n?n:"",i=Ur.exec(r);i&&i[1]&&(e=i[1])})),e);return n||"https://cdn.segment.com"};M("g",(function(){var t=Gr();return"".concat(t,"/next-integrations")}));function Vr(t,e){var n,r=Object.entries(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,e){var n,r,i=e[0],o=e[1];return"object"===B(o)?nt(nt({},t),((n={})[i]=o,n)):nt(nt({},t),((r={})[i]={},r))}),{});return Object.entries(t.integrations).reduce((function(t,e){var n,i=e[0],o=e[1];return nt(nt({},t),((n={})[i]=nt(nt({},o),r[i]),n))}),{})}function Kr(){var t=document.getElementsByTagName("link"),e="";return Array.prototype.slice.call(t).forEach((function(t){"canonical"===t.getAttribute("rel")&&(e=t.getAttribute("href"))})),e}function Wr(){var t=Kr();if(!t)return window.location.pathname;var e=document.createElement("a");return e.href=t,e.pathname.startsWith("/")?e.pathname:"/"+e.pathname}function Jr(t){void 0===t&&(t="");var e=Kr();if(e)return e.includes("?")?e:"".concat(e).concat(t);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function Zr(){return{path:Wr(),referrer:document.referrer,search:location.search,title:document.title,url:Jr(location.search)}}function Hr(t){var e,n=t.event;n.context=n.context||{};var r=Zr(),i=null!==(e=n.properties)&&void 0!==e?e:{};return Object.keys(r).forEach((function(t){i[t]&&(r[t]=i[t])})),n.context.page&&(r=Object.assign({},r,n.context.page)),n.context=Object.assign({},n.context,{page:r}),t.event=n,t}var $r={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:function(t){return t.event.properties=Object.assign({},Zr(),t.event.properties),t.event.name&&(t.event.properties.name=t.event.name),Hr(t)},alias:Hr,track:Hr,identify:Hr,group:Hr};function Yr(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(e){return e.src===t}))}function Qr(t,e){var n=Yr(t);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(t,e){n.addEventListener("load",(function(){return t(n)})),n.addEventListener("error",(function(t){return e(t)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var a=0,u=Object.entries(null!=e?e:{});a<u.length;a++){var s=u[a],c=s[0],l=s[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function Xr(t,e){var n=new ke.Facade(t,e);return"track"===t.type&&(n=new ke.Track(t,e)),"identify"===t.type&&(n=new ke.Identify(t,e)),"page"===t.type&&(n=new ke.Page(t,e)),"alias"===t.type&&(n=new ke.Alias(t,e)),"group"===t.type&&(n=new ke.Group(t,e)),"screen"===t.type&&(n=new ke.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}function ti(t,e,n){return rt(this,void 0,void 0,(function(){function r(e,n){return rt(this,void 0,void 0,(function(){var r,i,o;return it(this,(function(a){switch(a.label){case 0:return r=!1,i=null,[4,Ht(n({payload:Xr(e,{clone:!0,traverse:!1}),integration:t,next:function(t){r=!0,null===t&&(i=null),t&&(i=t.obj)}}))];case 1:return a.sent(),r||null===i||(i.integrations=nt(nt({},e.integrations),((o={})[t]=!1,o))),[2,i]}}))}))}var i,o,a,u,s;return it(this,(function(t){switch(t.label){case 0:i=function(t){return JSON.parse(JSON.stringify(t))}(e),o=0,a=n,t.label=1;case 1:return o<a.length?(u=a[o],[4,r(i,u)]):[3,4];case 2:if(null===(s=t.sent()))return[2,null];i=s,t.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}var ei=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:ti,sourceMiddlewarePlugin:function(t,e){function n(n){return rt(this,void 0,void 0,(function(){var r;return it(this,(function(i){switch(i.label){case 0:return r=!1,[4,Ht(t({payload:Xr(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){r=!0,t&&(n.event=t.obj)}}))];case 1:if(i.sent(),!r)throw new Ie({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,identify:n,alias:n,group:n}}},Symbol.toStringTag,{value:"Module"})),ni=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return rt(this,void 0,void 0,(function(){var e;return it(this,(function(n){switch(n.label){case 0:return[4,ti(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new Ie({retry:!1,reason:"dropped by destination middleware"})),[2,new Se(e)]}}))}))},t.prototype._createMethod=function(t){var e=this;return function(n){return rt(e,void 0,void 0,(function(){var e;return it(this,(function(r){switch(r.label){case 0:return this.action[t]?[4,this.transform(n)]:[2,n];case 1:return e=r.sent(),[4,this.action[t](e)];case 2:return r.sent(),[2,n]}}))}))}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},t.prototype.load=function(t,e){return this.action.load(t,e)},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();function ri(t,e,n,r,i){var o,a,u;return rt(this,void 0,void 0,(function(){var s,c,l,f,p=this;return it(this,(function(d){switch(d.label){case 0:return s=[],c=Gr(),l=null!==(a=null===(o=t.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==a?a:[],f=(null!==(u=t.remotePlugins)&&void 0!==u?u:[]).map((function(t){return rt(p,void 0,void 0,(function(){var o,a,u,f,p,d,h,v;return it(this,(function(y){switch(y.label){case 0:if(!1===e.All&&!e[t.name]||!1===e[t.name])return[2];y.label=1;case 1:if(y.trys.push([1,12,,13]),!r)return[3,7];o=t.url.split("/"),a=o[o.length-2],u=t.url.replace(a,btoa(a).replace(/=/g,"")),y.label=2;case 2:return y.trys.push([2,4,,6]),[4,Qr(u.replace("https://cdn.segment.com",c))];case 3:return y.sent(),[3,6];case 4:return y.sent(),[4,Qr(t.url.replace("https://cdn.segment.com",c))];case 5:return y.sent(),[3,6];case 6:return[3,9];case 7:return[4,Qr(t.url.replace("https://cdn.segment.com",c))];case 8:y.sent(),y.label=9;case 9:return f=t.libraryName,"function"!=typeof window[f]?[3,11]:[4,Ht((0,window[f])(nt(nt({},t.settings),n[t.name])))];case 10:p=y.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach((function(t){e.forEach((function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))}))}))}(d=Array.isArray(p)?p:[p]),h=l.filter((function(e){return e.destinationName===t.creationName})),d.forEach((function(e){var n=new ni(t.creationName,e);h.length&&i&&"destination"===e.type&&n.addMiddleware(i),s.push(n)})),y.label=11;case 11:return[3,13];case 12:return v=y.sent(),console.warn("Failed to load Remote Plugin",v),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,s.filter(Boolean)]}}))}))}var ii=fe;"undefined"!=typeof window&&(ii=window.fetch||fe);function oi(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}function ai(t,e){var n,r,i,o,a,u=[],s=!1,c=null!==(n=null==e?void 0:e.size)&&void 0!==n?n:10,l=null!==(r=null==e?void 0:e.timeout)&&void 0!==r?r:5e3;function f(e){var n;if(0!==e.length){var r=null===(n=e[0])||void 0===n?void 0:n.writeKey;return ii("https://".concat(t,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:e,writeKey:r})})}}function p(){return rt(this,void 0,void 0,(function(){var t;return it(this,(function(e){return u.length?(t=u,u=[],[2,f(t)]):[2]}))}))}return o=function(){if(s=!0,u.length){var t=function(t){var e=[],n=0;return t.forEach((function(t){oi(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(u).map(f);Promise.all(t).catch(console.error)}},a=!1,document.addEventListener("pagehide",(function(){a||(a=!0,o())})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0,o()}else a=!1})),{dispatch:function(t,e){return rt(this,void 0,void 0,(function(){var t;return it(this,(function(n){return u.push(e),t=u.length>=c||function(t){return oi(t)>=450}(u),[2,t||s?p():void(i||(i=setTimeout((function(){i=void 0,p().catch(console.error)}),l)))]}))}))}}}var ui=fe;"undefined"!=typeof window&&(ui=window.fetch||fe);var si=M("p",(function(t,e){return rt(void 0,void 0,void 0,(function(){var n;return it(this,(function(r){return n=function(r){return rt(void 0,void 0,void 0,(function(){var i;return it(this,(function(o){switch(o.label){case 0:return t(r)?(i=n,[4,e()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))}));function ci(t,e){return rt(this,void 0,void 0,(function(){var n,r=this;return it(this,(function(i){switch(i.label){case 0:return n=[],te()?[2,e]:[4,si((function(){return e.length>0&&!te()}),(function(){return rt(r,void 0,void 0,(function(){var r,i;return it(this,(function(o){switch(o.label){case 0:return(r=e.pop())?[4,br(r,t)]:[2];case 1:return i=o.sent(),i instanceof Se||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}function li(t,e,n,r){var i=this;t||setTimeout((function(){return rt(i,void 0,void 0,(function(){var t,i;return it(this,(function(o){switch(o.label){case 0:return t=!0,[4,ci(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}}))}))}),5e3*Math.random())}function fi(t,e,n){var r,i,o,a,u=t.options.disableClientPersistence?new fr(t.queue.queue.maxAttempts,[]):new gr(t.queue.queue.maxAttempts,"dest-Segment.io"),s=null!==(r=null==e?void 0:e.apiHost)&&void 0!==r?r:"api.segment.io/v1",c=null!==(i=null==e?void 0:e.protocol)&&void 0!==i?i:"https",l="".concat(c,"://").concat(s),f="batching"===(null===(o=null==e?void 0:e.deliveryStrategy)||void 0===o?void 0:o.strategy)?ai(s,null===(a=null==e?void 0:e.deliveryStrategy)||void 0===a?void 0:a.config):{dispatch:function(t,e){return ui(t,{headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}};function p(r){return rt(this,void 0,void 0,(function(){var i,o;return it(this,(function(a){return te()?(u.push(r),li(false,u,d,li),[2,r]):(i=r.event.type.charAt(0),o=Xr(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,o)),[2,f.dispatch("".concat(l,"/").concat(i),be(t,o,e,n)).then((function(){return r})).catch((function(t){return"error"!==t.type&&"Failed to fetch"!==t.message||(u.push(r),li(false,u,d,li)),r}))])}))}))}var d={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:p,identify:p,page:p,alias:p,group:p};return d}var pi=function(t,e,n){n.getCalls(t).forEach((function(t){gi(e,t).catch(console.error)}))},di=function(t,e){return rt(void 0,void 0,void 0,(function(){var n,r,i;return it(this,(function(o){switch(o.label){case 0:n=0,r=e.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,gi(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},hi=pi.bind(globalThis,"on"),vi=pi.bind(globalThis,"setAnonymousId"),yi=function(){function t(){this._value={}}return t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this._value))},t.prototype.getCalls=function(t){var e;return null!==(e=this._value[t])&&void 0!==e?e:[]},t.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach((function(e){t._value[e.method]?t._value[e.method].push(e):t._value[e.method]=[e]})),this},t.prototype.clear=function(){return this._value={},this},t}();function gi(t,e){return rt(this,void 0,void 0,(function(){var n,r;return it(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,n=t[e.method].apply(t,e.args),mr(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return e.resolve(n),[3,4];case 3:return r=i.sent(),e.reject(r),[3,4];case 4:return[2]}}))}))}var mi=function(){function t(t){var e=this;this._preInitBuffer=new yi,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=pe,this._promise=t(this._preInitBuffer),this._promise.then((function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r})).catch((function(){}))}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){e._preInitBuffer.push({method:t,args:r,resolve:n,reject:i,called:!1})}))}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.push({method:t,args:r,resolve:function(){},reject:console.error,called:!1}),e)}},t}();function bi(t){var e=t[0],n=t.slice(1);return{method:e,resolve:function(){},reject:console.error,args:n,called:!1}}var wi=function(){var t=window.analytics;if(!Array.isArray(t))return[];var e=t.splice(0,t.length);return e.map(bi)};function xi(t,e){return rt(this,void 0,void 0,(function(){return it(this,(function(n){switch(n.label){case 0:return e.push.apply(e,wi()),[4,di(t,e)];case 1:return n.sent(),e.push.apply(e,wi()),function(t,e){e.toArray().forEach((function(e){setTimeout((function(){gi(t,e).catch(console.error)}),0)}))}(t,e),e.clear(),[2]}}))}))}function _i(t,e,n,r,i){var o,a,u;return rt(this,void 0,void 0,(function(){var s,c,l,f,p,d,h,v,y,g,m=this;return it(this,(function(b){switch(b.label){case 0:return function(t){var e,n,r;return"test"!==qr().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,st((function(){return L.import("./index-legacy.6eb621a2.js")}),void 0).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return c=b.sent(),[3,3];case 2:c=void 0,b.label=3;case 3:return s=c,w=t,"test"!==qr().NODE_ENV&&Object.keys(w.integrations).length>1?[4,st((function(){return L.import("./index-legacy.9b2b6e12.js")}),void 0).then((function(r){return r.ajsDestinations(t,e.integrations,n,s)}))]:[3,5];case 4:return f=b.sent(),[3,6];case 5:f=[],b.label=6;case 6:return l=f,t.legacyVideoPluginsEnabled?[4,st((function(){return L.import("./index-legacy.3055f688.js")}),void 0).then((function(t){return t.loadLegacyVideoPlugins(e)}))]:[3,8];case 7:b.sent(),b.label=8;case 8:return(null===(o=n.plan)||void 0===o?void 0:o.track)?[4,st((function(){return L.import("./index-legacy.0b1c2bb2.js")}),void 0).then((function(e){var r;return e.schemaFilter(null===(r=n.plan)||void 0===r?void 0:r.track,t)}))]:[3,10];case 9:return d=b.sent(),[3,11];case 10:d=void 0,b.label=11;case 11:return p=d,h=Vr(t,r),[4,ri(t,e.integrations,h,r.obfuscate,s).catch((function(){return[]}))];case 12:return v=b.sent(),y=ut(ut(ut([Vt,$r],i,!0),l,!0),v,!0),p&&y.push(p),!1===(null===(a=n.integrations)||void 0===a?void 0:a.All)&&!n.integrations["Segment.io"]||n.integrations&&!1===n.integrations["Segment.io"]||y.push(fi(e,h["Segment.io"],t.integrations)),[4,e.register.apply(e,y)];case 13:return g=b.sent(),Object.entries(null!==(u=t.enabledMiddleware)&&void 0!==u?u:{}).some((function(t){return t[1]}))?[4,st((function(){return L.import("./index-legacy.625673e9.js")}),void 0).then((function(n){var i=n.remoteMiddlewares;return rt(m,void 0,void 0,(function(){var n,o;return it(this,(function(a){switch(a.label){case 0:return[4,i(g,t,r.obfuscate)];case 1:return n=a.sent(),o=n.map((function(t){return e.addSourceMiddleware(t)})),[2,Promise.all(o)]}}))}))}))]:[3,15];case 14:b.sent(),b.label=15;case 15:return[2,g]}var w}))}))}function Ii(t,e,n){var r,i,o,a,u,s;return void 0===e&&(e={}),rt(this,void 0,void 0,(function(){var c,l,f,p,d,h,v,y,g,m;return it(this,(function(b){switch(b.label){case 0:return t.cdnURL&&(I=t.cdnURL,window.analytics&&(window.analytics._cdn=I),Br=I),null===(r=t.cdnSettings)||void 0===r?[3,1]:(l=r,[3,3]);case 1:return[4,(w=t.writeKey,x=t.cdnURL,_=null!=x?x:Gr(),fe("".concat(_,"/v1/projects/").concat(w,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:l=b.sent(),b.label=3;case 3:return f=null===(o=null===(i=(c=l).integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,p=nt({retryQueue:f},e),d=new Rr(t,p),h=null!==(a=t.plugins)&&void 0!==a?a:[],Se.initMetrics(c.metrics),function(t,e){e.push.apply(e,wi()),vi(t,e),hi(t,e)}(d,n),[4,_i(c,d,p,e,h)];case 4:return v=b.sent(),y=null!==(u=window.location.search)&&void 0!==u?u:"",g=null!==(s=window.location.hash)&&void 0!==s?s:"",(m=y.length?y:g.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,d.queryString(m).catch(console.error)]:[3,6];case 5:b.sent(),b.label=6;case 6:return d.initialized=!0,d.emit("initialize",t,e),e.initialPageview&&d.page().catch(console.error),[4,xi(d,n)];case 7:return b.sent(),[2,[d,v]]}var w,x,_,I}))}))}var Si=function(t){function e(e){return t.call(this,e)||this}return et(e,t),e.load=function(t,e){return void 0===e&&(e={}),new this((function(n){return Ii(t,e,n)}))},e.standalone=function(t,n){return e.load({writeKey:t},n).then((function(t){return t[0]}))},e}(mi),Ci=new(function(){function t(){D(this,t),q(this,"analytics",void 0),this.analytics=Si.load({writeKey:"c0SISxJpICLXxstkrSppa4uxwYzBQbqf"})}return R(t,[{key:"trackPageLoad",value:function(){this.analytics.page()}},{key:"trackEvent",value:function(t,e){this.analytics.track(t,{event_data:e,environment:"production"})}}]),t}()),ki=function(t){return t.LC_VIEWED="LC-Viewed",t.LC_CATEGORY_CLICK="LC-Category-Clicked",t.LC_CATEGORY_VIEW="LC-Category-Viewed",t.LC_SCORE_CLICK="LC-Score-Clicked",t.LC_SCORE_VIEW="LC-Score-Viewed",t.LC_TRANSPORT_MODE_CLICK="LC-Transportation-Method-Clicked",t.LC_LONG_DESCRIPTION_CLICK="LC-Long-Description-Clicked",t.LC_LONG_DESCRIPTION_VIEW="LC-Long-Description-Viewed",t.LC_POI_CLICK="LC-POI-Clicked",t.LC_POI_VIEW="LC-POI-Viewed",t.LC_LIST_VIEW_CLICK="LC-List-View-Clicked",t.LC_MAP_VIEW_CLICK="LC-Map-View-Clicked",t.LC_SCORES_LIST_SCROLL="LC-Scores-List-Scroll",t.LC_COMMUTE_CALC_CLICK="LC-Commute-Calc-Clicked",t.LC_COMMUTE_CALC_VIEW="LC-Commute-Calc-Viewed",t.LC_COMMUTE_CALCULATE_CLICK="LC-Commute-Calc-Calculate-Clicked",t.LC_ATTRIBUTION_CLICK="LC-Attribution-Clicked",t}(ki||{}),Oi=ct.createContext({}),Pi=function(){return lt.exports.useContext(Oi)},ji=function(t,e){switch(e.type){case"CATEGORY":return N(N({},t),{},{activeCategory:e.value});case"SCORE":var n=dt.find((function(n){return""===e.value?n.value===t.activeCategory:n.scores.includes(e.value)})).value;return{activeCategory:n,activeScoreByCategory:N(N({},t.activeScoreByCategory),{},q({},n,e.value))}}},Mi=function(t){var e=t.children,n=window.innerWidth<ft.screenSizes.mobileL?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},r=A(lt.exports.useReducer(ji,n),2),i=r[0],o=r[1],a=A(lt.exports.useState(),2),u=a[0],s=a[1],c=A(lt.exports.useState(),2),l=c[0],f=c[1];lt.exports.useEffect((function(){u&&Ci.trackEvent(ki.LC_POI_VIEW,{poi_name:null==u?void 0:u.name,poi_info:null==u?void 0:u.address})}),[u]);var p=i.activeCategory;lt.exports.useEffect((function(){Ci.trackEvent(ki.LC_CATEGORY_VIEW,p)}),[p]);var d=i.activeScoreByCategory[p];lt.exports.useEffect((function(){""!==d&&Ci.trackEvent(ki.LC_SCORE_VIEW,d)}),[d]);var h=function(t){o({type:"SCORE",value:t})},v=function(t){o({type:"CATEGORY",value:t})},y=lt.exports.useMemo((function(){return{activeScore:d,setActiveScore:h,activeCategory:p,setActiveCategory:v,activePOI:u,setActivePOI:s,hoveredPOI:l,setHoveredPOI:f}}),[d,h,p,v,u,s,l,f]);return pt(Oi.Provider,{value:y,children:e})};function Ei(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Ai(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Li(t[0])||!Li(t[1]))throw new Error("coordinates must contain numbers");return Ei({type:"Point",coordinates:t},e,n)}function Li(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function Ti(t,e,n){if(null!==t)for(var r,i,o,a,u,s,c,l,f=0,p=0,d=t.type,h="FeatureCollection"===d,v="Feature"===d,y=h?t.features.length:1,g=0;g<y;g++){u=(l=!!(c=h?t.features[g].geometry:v?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var m=0;m<u;m++){var b=0,w=0;if(null!==(a=l?c.geometries[m]:c)){s=a.coordinates;var x=a.type;switch(f=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(s,p,g,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<s.length;r++){if(!1===e(s[r],p,g,b,w))return!1;p++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<s.length;r++){for(i=0;i<s[r].length-f;i++){if(!1===e(s[r][i],p,g,b,w))return!1;p++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(r=0;r<s.length;r++){for(w=0,i=0;i<s[r].length;i++){for(o=0;o<s[r][i].length-f;o++){if(!1===e(s[r][i][o],p,g,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Ti(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Fi(t){var e=[1/0,1/0,-1/0,-1/0];return Ti(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}Fi.default=Fi;var Ni=/^\s+|\s+$/g,Di=/^[-+]0x[0-9a-f]+$/i,zi=/^0b[01]+$/i,Ri=/^0o[0-7]+$/i,qi=parseInt,Bi="object"==B(ot)&&ot&&ot.Object===Object&&ot,Ui="object"==("undefined"==typeof self?"undefined":B(self))&&self&&self.Object===Object&&self,Gi=Bi||Ui||Function("return this")(),Vi=Object.prototype.toString,Ki=Math.max,Wi=Math.min,Ji=function(){return Gi.Date.now()};function Zi(t){var e=B(t);return!!t&&("object"==e||"function"==e)}function Hi(t){return"symbol"==B(t)||function(t){return!!t&&"object"==B(t)}(t)&&"[object Symbol]"==Vi.call(t)}function $i(t){if("number"==typeof t)return t;if(Hi(t))return NaN;if(Zi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ni,"");var n=zi.test(t);return n||Ri.test(t)?qi(t.slice(2),n?2:8):Di.test(t)?NaN:+t}var Yi=function(t,e,n){var r,i,o,a,u,s,c=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function h(t){return c=t,u=setTimeout(y,e),l?d(t):a}function v(t){var n=t-s;return void 0===s||n>=e||n<0||f&&t-c>=o}function y(){var t=Ji();if(v(t))return g(t);u=setTimeout(y,function(t){var n=e-(t-s);return f?Wi(n,o-(t-c)):n}(t))}function g(t){return u=void 0,p&&r?d(t):(r=i=void 0,a)}function m(){var t=Ji(),n=v(t);if(r=arguments,i=this,s=t,n){if(void 0===u)return h(s);if(f)return u=setTimeout(y,e),d(s)}return void 0===u&&(u=setTimeout(y,e)),a}return e=$i(e)||0,Zi(n)&&(l=!!n.leading,o=(f="maxWait"in n)?Ki($i(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),m.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=s=i=u=void 0},m.flush=function(){return void 0===u?a:g(Ji())},m};function Qi(){var t,e=ht().client,n=vt().sdkState,r=yt(n.options,250),i=Pi().activeScore,o=i?gt[i]:void 0,a=N(N({},lt.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{limit:10,radius:2e3,include:o});return T(F.list(a),E(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getPois(a));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!(a&&null!==(t=a.include)&&void 0!==t&&t.length&&a.lat&&a.lng)})}function Xi(){var t=ht().client,e=vt().sdkState,n=yt(e.options,250),r=Pi().activeScore,i="high_schools"===r||"primary_schools"===r,o=N(N({},lt.exports.useMemo((function(){return!(null==n||!n.marker)?n.marker:{lat:null==n?void 0:n.lat,lng:null==n?void 0:n.lng}}),[n])),{},{limit:10,radius:2e3});return T(z.list(o),E(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getSchools(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o&&!!o.lat&&!!o.lng&&i})}var to=ct.createContext({}),eo=function(){return lt.exports.useContext(to)},no=function(t){var e=t.children,n=t.mapRef,r=t.mapPadding;return pt(to.Provider,{value:{mapRef:n,mapPadding:r},children:e})};function ro(t,e,n,r,i,o){if(!(i-r<=n)){var a=r+i>>1;io(t,e,a,r,i,o%2),ro(t,e,n,r,a-1,o+1),ro(t,e,n,a+1,i,o+1)}}function io(t,e,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,u=n-r+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(u-a/2<0?-1:1);io(t,e,n,Math.max(r,Math.floor(n-u*c/a+l)),Math.min(i,Math.floor(n+(a-u)*c/a+l)),o)}var f=e[2*n+o],p=r,d=i;for(oo(t,e,r,n),e[2*i+o]>f&&oo(t,e,r,i);p<d;){for(oo(t,e,p,d),p++,d--;e[2*p+o]<f;)p++;for(;e[2*d+o]>f;)d--}e[2*r+o]===f?oo(t,e,r,d):oo(t,e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}function oo(t,e,n,r){ao(t,n,r),ao(e,2*n,2*r),ao(e,2*n+1,2*r+1)}function ao(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function uo(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}var so,co=function(t){return t[0]},lo=function(t){return t[1]},fo=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:co,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:lo,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;D(this,t),this.nodeSize=i,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,u=this.ids=new a(e.length),s=this.coords=new o(2*e.length),c=0;c<e.length;c++)u[c]=c,s[2*c]=n(e[c]),s[2*c+1]=r(e[c]);ro(u,s,i,0,u.length-1,0)}return R(t,[{key:"range",value:function(t,e,n,r){return function(t,e,n,r,i,o,a){for(var u,s,c=[0,t.length-1,0],l=[];c.length;){var f=c.pop(),p=c.pop(),d=c.pop();if(p-d<=a)for(var h=d;h<=p;h++)u=e[2*h],s=e[2*h+1],u>=n&&u<=i&&s>=r&&s<=o&&l.push(t[h]);else{var v=Math.floor((d+p)/2);u=e[2*v],s=e[2*v+1],u>=n&&u<=i&&s>=r&&s<=o&&l.push(t[v]);var y=(f+1)%2;(0===f?n<=u:r<=s)&&(c.push(d),c.push(v-1),c.push(y)),(0===f?i>=u:o>=s)&&(c.push(v+1),c.push(p),c.push(y))}}return l}(this.ids,this.coords,t,e,n,r,this.nodeSize)}},{key:"within",value:function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],u=[],s=i*i;a.length;){var c=a.pop(),l=a.pop(),f=a.pop();if(l-f<=o)for(var p=f;p<=l;p++)uo(e[2*p],e[2*p+1],n,r)<=s&&u.push(t[p]);else{var d=Math.floor((f+l)/2),h=e[2*d],v=e[2*d+1];uo(h,v,n,r)<=s&&u.push(t[d]);var y=(c+1)%2;(0===c?n-i<=h:r-i<=v)&&(a.push(f),a.push(d-1),a.push(y)),(0===c?n+i>=h:r+i>=v)&&(a.push(d+1),a.push(l),a.push(y))}}return u}(this.ids,this.coords,t,e,n,this.nodeSize)}}]),t}(),po={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},ho=Math.fround||(so=new Float32Array(1),function(t){return so[0]=+t,so[0]}),vo=function(){function t(e){D(this,t),this.options=Io(Object.create(po),e),this.trees=new Array(this.options.maxZoom+1)}return R(t,[{key:"load",value:function(t){var e=this.options,n=e.log,r=e.minZoom,i=e.maxZoom,o=e.nodeSize;n&&console.time("total time");var a="prepare ".concat(t.length," points");n&&console.time(a),this.points=t;for(var u=[],s=0;s<t.length;s++)t[s].geometry&&u.push(go(t[s],s));this.trees[i+1]=new fo(u,So,Co,o,Float32Array),n&&console.timeEnd(a);for(var c=i;c>=r;c--){var l=+Date.now();u=this._cluster(u,c),this.trees[c]=new fo(u,So,Co,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",c,u.length,+Date.now()-l)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),u=this.getClusters([-180,r,i,o],e);return a.concat(u)}var s,c=this.trees[this._limitZoom(e)],l=[],f=P(c.range(wo(n),xo(o),wo(i),xo(r)));try{for(f.s();!(s=f.n()).done;){var p=s.value,d=c.points[p];l.push(d.numPoints?mo(d):this.points[d.index])}}catch(wa){f.e(wa)}finally{f.f()}return l}},{key:"getChildren",value:function(t){var e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[e];if(!o)throw new Error(r);var a,u=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],c=P(i.within(o.x,o.y,u));try{for(c.s();!(a=c.n()).done;){var l=a.value,f=i.points[l];f.parentId===t&&s.push(f.numPoints?mo(f):this.points[f.index])}}catch(wa){c.e(wa)}finally{c.f()}if(0===s.length)throw new Error(r);return s}},{key:"getLeaves",value:function(t,e,n){e=e||10,n=n||0;var r=[];return this._appendLeaves(r,t,e,n,0),r}},{key:"getTile",value:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options,a=o.extent,u=o.radius/a,s=(n-u)/i,c=(n+1+u)/i,l={features:[]};return this._addTileFeatures(r.range((e-u)/i,s,(e+1+u)/i,c),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-u/i,s,1,c),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,s,u/i,c),r.points,-1,n,i,l),l.features.length?l:null}},{key:"getClusterExpansionZoom",value:function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}},{key:"_appendLeaves",value:function(t,e,n,r,i){var o,a=P(this.getChildren(e));try{for(a.s();!(o=a.n()).done;){var u=o.value,s=u.properties;if(s&&s.cluster?i+s.point_count<=r?i+=s.point_count:i=this._appendLeaves(t,s.cluster_id,n,r,i):i<r?i++:t.push(u),t.length===n)break}}catch(wa){a.e(wa)}finally{a.f()}return i}},{key:"_addTileFeatures",value:function(t,e,n,r,i,o){var a,u=P(t);try{for(u.s();!(a=u.n()).done;){var s=e[a.value],c=s.numPoints,l=void 0,f=void 0,p=void 0;if(c)l=bo(s),f=s.x,p=s.y;else{var d=this.points[s.index];l=d.properties,f=wo(d.geometry.coordinates[0]),p=xo(d.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(f*i-n)),Math.round(this.options.extent*(p*i-r))]],tags:l},v=void 0;c?v=s.id:this.options.generateId?v=s.index:this.points[s.index].id&&(v=this.points[s.index].id),void 0!==v&&(h.id=v),o.features.push(h)}}catch(wa){u.e(wa)}finally{u.f()}}},{key:"_limitZoom",value:function(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}},{key:"_cluster",value:function(t,e){for(var n=[],r=this.options,i=r.radius,o=r.extent,a=r.reduce,u=r.minPoints,s=i/(o*Math.pow(2,e)),c=0;c<t.length;c++){var l=t[c];if(!(l.zoom<=e)){l.zoom=e;var f,p=this.trees[e+1],d=p.within(l.x,l.y,s),h=l.numPoints||1,v=h,y=P(d);try{for(y.s();!(f=y.n()).done;){var g=f.value,m=p.points[g];m.zoom>e&&(v+=m.numPoints||1)}}catch(wa){y.e(wa)}finally{y.f()}if(v>h&&v>=u){var b,w=l.x*h,x=l.y*h,_=a&&h>1?this._map(l,!0):null,I=(c<<5)+(e+1)+this.points.length,S=P(d);try{for(S.s();!(b=S.n()).done;){var C=b.value,k=p.points[C];if(!(k.zoom<=e)){k.zoom=e;var O=k.numPoints||1;w+=k.x*O,x+=k.y*O,k.parentId=I,a&&(_||(_=this._map(l,!0)),a(_,this._map(k)))}}}catch(wa){S.e(wa)}finally{S.f()}l.parentId=I,n.push(yo(w/v,x/v,I,v,_))}else if(n.push(l),v>1){var j,M=P(d);try{for(M.s();!(j=M.n()).done;){var E=j.value,A=p.points[E];A.zoom<=e||(A.zoom=e,n.push(A))}}catch(wa){M.e(wa)}finally{M.f()}}}}return n}},{key:"_getOriginId",value:function(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function(t){return(t-this.points.length)%32}},{key:"_map",value:function(t,e){if(t.numPoints)return e?Io({},t.properties):t.properties;var n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?Io({},r):r}}]),t}();function yo(t,e,n,r,i){return{x:ho(t),y:ho(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function go(t,e){var n=A(t.geometry.coordinates,2),r=n[0],i=n[1];return{x:ho(wo(r)),y:ho(xo(i)),zoom:1/0,index:e,parentId:-1}}function mo(t){return{type:"Feature",id:t.id,properties:bo(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),_o(t.y)]}};var e}function bo(t){var e=t.numPoints,n=e>=1e4?"".concat(Math.round(e/1e3),"k"):e>=1e3?"".concat(Math.round(e/100)/10,"k"):e;return Io(Io({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function wo(t){return t/360+.5}function xo(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function _o(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function Io(t,e){for(var n in e)t[n]=e[n];return t}function So(t){return t.x}function Co(t){return t.y}var ko=Object.prototype.hasOwnProperty;function Oo(t,e,n){var r,i=P(t.keys());try{for(i.s();!(r=i.n()).done;)if(Po(n=r.value,e))return n}catch(wa){i.e(wa)}finally{i.f()}}function Po(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Po(t[r],e[r]););return-1===r}if(n===Set){if(t.size!==e.size)return!1;var o,a=P(t);try{for(a.s();!(o=a.n()).done;){if((i=r=o.value)&&"object"===B(i)&&!(i=Oo(e,i)))return!1;if(!e.has(i))return!1}}catch(wa){a.e(wa)}finally{a.f()}return!0}if(n===Map){if(t.size!==e.size)return!1;var u,s=P(t);try{for(s.s();!(u=s.n()).done;){if((i=(r=u.value)[0])&&"object"===B(i)&&!(i=Oo(e,i)))return!1;if(!Po(r[1],e.get(i)))return!1}}catch(wa){s.e(wa)}finally{s.f()}return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return-1===r}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return-1===r}if(!n||"object"===B(t)){for(n in r=0,t){if(ko.call(t,n)&&++r&&!ko.call(e,n))return!1;if(!(n in e)||!Po(t[n],e[n]))return!1}return Object.keys(e).length===r}}return t!=t&&e!=e}function jo(t,e){return lt.exports.useEffect(t,(n=e,r=lt.exports.useRef(n),i=lt.exports.useRef(0),Po(n,r.current)||(r.current=n,i.current+=1),lt.exports.useMemo((function(){return r.current}),[i.current])));var n,r,i}var Mo=mt.div(t||(t=O(["\n border-radius: 50%;\n background: linear-gradient(\n to top,\n ",",\n ","\n );\n color: ",";\n height: ","px;\n width: ","px;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n font-family: ",";\n font-size: ","px;\n border: 2px solid #fff;\n box-shadow: ",";\n cursor: default;\n"])),bt["--ll-color-primary-variant1"],bt["--ll-color-primary"],bt["--ll-color-on-primary"],(function(t){return t.diameter}),(function(t){return t.diameter}),bt["--ll-font-family"],(function(t){return t.diameter/2.5}),bt["--ll-shadow-small"]),Eo=function(t){var e=t.cluster,n=t.pointsCount,r=t.onClick,i=e.properties.point_count;return pt(Mo,{diameter:20+i/n*25,onClick:function(){return r&&r(e)},children:e.properties.point_count})};var Ao=ct.memo((function(t){var e,n=t.rect,r=t.zoom,i=t.mapRef,o=t.points,a=t.isMobile,u=t.activePOI,s=t.hoveredPOI,c=t.isMapMoving,l=t.setActivePOI,f=null==i||null===(e=i.current)||void 0===e?void 0:e.getMap().getBounds().toArray().flat(),p=function(t){var e=t.points,n=t.bounds,r=t.zoom,i=t.options,o=lt.exports.useRef(),a=lt.exports.useRef(),u=lt.exports.useState([]),s=u[0],c=u[1],l=Math.round(r);return jo((function(){o.current&&Po(a.current,e)&&Po(o.current.options,i)||(o.current=new vo(i),o.current.load(e)),n&&c(o.current.getClusters(n,l)),a.current=e}),[e,n,l,i]),{clusters:s,supercluster:o.current}}({points:o,bounds:f,zoom:r,options:{radius:50,maxZoom:18}}),d=p.clusters,h=p.supercluster;return pt(wt,{children:d.map((function(t,e){var r=A(t.geometry.coordinates,2),f=r[0],p=r[1];if(function(t){return void 0!==t.properties.cluster}(t))return pt(U,{latitude:p,longitude:f,children:pt(Eo,{cluster:t,pointsCount:o.length,onClick:function(){var e,n=Math.min(h.getClusterExpansionZoom(t.id),20);null===(e=i.current)||void 0===e||e.flyTo({zoom:n,center:[f,p],duration:1e3,essential:!0})}})},"cluster-".concat(t.id));var d=t.properties,v=d.poi,y=d.type,g=u===v,m=s===v;return pt(U,{latitude:v.lat,longitude:v.lng,style:{zIndex:g?1:0},children:xt(_t.Root,{options:{type:y,poi:v,isOpen:!c&&g,isHovered:m,side:"top",size:["rapid_transit_stations"].includes(y)?"medium":"small",collisionPadding:a?{top:n.height+32,bottom:2*It,left:2*It,right:2*It}:{left:n.width+32,right:2*It,top:2*It,bottom:2*It}},onChange:function(t){"open-change"===t.type&&(t.data?setTimeout((function(){l(v)}),0):g&&l(void 0))},children:[pt(_t.Marker,{}),pt(_t.Content,{})]})},"".concat(v.name,"-").concat(v.lat,"-").concat(v.lng,"-").concat(e))}))})}));Ao.displayName="Markers";var Lo=function(t){return lt.exports.createElement("svg",N({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),lt.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"}))},To=function(t){return lt.exports.createElement("svg",N({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),lt.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))};function Fo(t){var e=ht().client,n=vt().sdkState,r=yt(n.options,250),i=N(N({},lt.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{geographyLevels:["20","30"],locationScoresRounding:!1,include:t});return T(G.list(i),E(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getScores(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i})}var No=mt.div(e||(e=O(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),bt["--ll-spacing-small"],bt["--ll-spacing-medium"],bt["--ll-color-surface"]),Do=mt.div(n||(n=O(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),bt["--ll-spacing-medium"],bt["--ll-spacing-medium"]),zo=function(){var t,e,n=vt().sdkState,r=Pi(),i=r.activeCategory,o=r.activeScore,a=Fo(dt.find((function(t){return t.value===i})).scores),u=a.data,s=a.isLoading;return o&&null!=u&&u.location[o]?s?pt("div",{children:"Loading"}):pt(St.Root,{options:{score:o,scoresData:u},children:xt(No,{children:[xt(Do,{children:[pt(St.Badge,{}),pt(St.BarChart,{options:{locationIcon:"pin"===(null===(t=n.options)||void 0===t||null===(e=t.marker)||void 0===e?void 0:e.icon)?Lo:To}})]}),pt(St.Description,{})]})}):null},Ro=mt.div(r||(r=O(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),bt["--ll-spacing-x-small"],bt["--ll-spacing-medium"]),qo=mt.button(i||(i=O(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: none;\n border: none;\n min-width: 60px;\n padding: 0;\n margin: 0 8px;\n flex-shrink: 0;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:last-child {\n margin-right: 0;\n }\n"]))),Bo=mt.div(o||(o=O(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),bt["--ll-color-background"]),Uo=mt.div(a||(a=O(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),Go=mt.div(u||(u=O(["\n margin: 0 2px;\n"]))),Vo=function(t){var e=t.category,n=Fo(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Pi(),u=a.activeScore,s=a.setActiveScore,c=a.setActiveCategory;return pt(Ro,{children:e.scores.map((function(t){var n=t===u,a=n?"--ll-color-primary":"--ll-color-disabled";return i||o?pt(Go,{children:pt(Ct,{height:"44px",width:"60px"})},t):pt(St.Root,{options:{score:t,scoresData:r},children:xt(qo,{onClick:function(){c(e.value),s(t)},children:[pt(St.Icon,{options:{color:a,height:28,width:28}}),pt(Uo,{children:pt(St.Title,{options:{variant:"caption1",color:a,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),pt(Bo,{children:pt(St.Badge,{options:{variant:"small",isPrimary:n}})})]})},t)}))})},Ko=mt.div(s||(s=O(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),bt["--ll-spacing-x-small"],bt["--ll-spacing-medium"],bt["--ll-spacing-xx-small"],bt["--ll-spacing-medium"]),Wo=mt.div(c||(c=O(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),bt["--ll-color-background"],bt["--ll-color-border"]),Jo=ct.forwardRef((function(t,e){var n=Pi(),r=n.activeCategory,i=n.setActiveCategory;return xt(Wo,{ref:e,children:[pt(Ko,{children:xt(kt.Root,{value:r,onValueChange:function(t){return i(t)},children:[pt(kt.Trigger,{size:"large",children:pt(Ot.Root,{options:{scoreCategory:r},children:pt(Ot.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),pt(kt.Content,{children:dt.map((function(t){return pt(Ot.Root,{options:{scoreCategory:t.value},children:pt(kt.Item,{value:t.value,children:pt(Ot.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},t.value)}))})]})}),pt(Vo,{category:dt.find((function(t){return t.value===r}))}),pt(zo,{})]})}));Jo.displayName="MobileScores";var Zo=Pt({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),Ho=Pt({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),$o=mt(V)(l||(l=O(["\n margin: 0;\n z-index: 1;\n position: relative;\n margin: 0 calc(-1 * ",");\n padding: 0 ",";\n\n &:hover {\n background-color: ",";\n box-shadow: ",";\n }\n"])),bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],bt["--ll-color-surface"],bt["--ll-shadow-small"]),Yo=mt(K)(f||(f=O(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),bt["--ll-spacing-x-small"]),Qo=mt(W)(p||(p=O(["\n background-color: ",";\n position: relative;\n overflow: hidden;\n margin-left: calc(-1 * ",");\n margin-right: calc(-1 * ",');\n\n [data-state="open"] & {\n animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n [data-state="closed"] & {\n animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n"])),bt["--ll-color-surface"],bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],Zo,Ho),Xo=mt.div(d||(d=O(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),bt["--ll-spacing-medium"],bt["--ll-color-border"],bt["--ll-color-border"]),ta=mt.span(h||(h=O(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),Yo);mt.div(v||(v=O(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var ea=mt.div(y||(y=O(["\n margin: "," 0;\n"])),bt["--ll-spacing-small"]),na=mt.div(g||(g=O(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),bt["--ll-spacing-large"]),ra=function(t){var e=t.score,n=Xi(),r=n.data,i=n.isLoading,o=Pi(),a=o.activePOI,u=o.setActivePOI,s=o.hoveredPOI,c=o.setHoveredPOI,l=eo(),f=l.mapRef,p=l.mapPadding;return i?pt(wt,{children:k(Array(10)).map((function(t,e){return pt(ea,{children:pt(Ct,{height:"34px",width:"100%"})},e)}))}):r?pt(jt.Root,{options:{type:"school",data:null==r?void 0:r[e],activePOI:a,hoveredPOI:s},onChange:function(t){if("poi-click"===t.type){var e=t.data;u(e);var n,r=window.innerWidth-p.left,i=window.innerWidth/2,o=r/2+p.left-i;if(e)null===(n=f.current)||void 0===n||n.easeTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[o,0]})}"poi-hover"===t.type&&c(t.data)}}):null},ia=ct.memo((function(t){var e=t.result,n=t.poi,r=Pi(),i=r.activePOI,o=r.setActivePOI,a=r.hoveredPOI,u=r.setHoveredPOI,s=eo(),c=s.mapRef,l=s.mapPadding;return e.data&&e.data[n]?pt(Mt.Content,{options:{value:n},children:pt(jt.Root,{options:{type:"poi",data:e.data[n],activePOI:i,hoveredPOI:a},onChange:function(t){if("poi-click"===t.type){var e=t.data;o(e);var n,r=window.innerWidth-l.left,i=window.innerWidth/2,a=r/2+l.left-i;if(e)null===(n=c.current)||void 0===n||n.flyTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===t.type&&u(t.data)}})},n):null}));ia.displayName="POI";var oa=ct.memo((function(t){var e=t.include,n=Qi();return n.isLoading&&e.length?pt(wt,{children:k(Array(10)).map((function(t,e){return pt(ea,{children:pt(Ct,{height:"34px",width:"100%"})},e)}))}):n.data?xt(Mt.Root,{options:{include:e},children:[pt(Mt.Tabs,{}),e.map((function(t){return pt(ia,{poi:t,result:n},t)}))]}):null}));oa.displayName="POIs";var aa=ct.memo((function(t){var e,n,r=t.score,i=t.isLoading,o=t.scoresData,a=vt().sdkState,u=Pi().activeScore,s=r===u;return i?pt(ea,{children:pt(Ct,{height:"34px",width:"100%"},r)}):null!=o&&o.location[r]?pt(J,{value:r,children:xt(St.Root,{options:{score:r,scoresData:o},onChange:function(t){"tooltip-toggle"===t.type&&t.data&&Ci.trackEvent(ki.LC_LONG_DESCRIPTION_VIEW,r)},children:[pt($o,{children:xt(Yo,{children:[pt(ta,{children:pt(Et,{SVGElement:Z,fill:bt["--ll-color-on-background-variant1"]})}),pt(At,{spacing:"--ll-spacing-small"}),pt(St.Icon,{}),pt(At,{spacing:"--ll-spacing-small"}),pt(St.Title,{}),pt(At,{}),pt(St.Badge,{options:{isPrimary:s}})]})}),pt(Qo,{children:xt(Xo,{children:[pt(St.Description,{}),pt(At,{vertical:!0,spacing:"--ll-spacing-small"}),pt(St.BarChart,{options:{locationIcon:"pin"===(null===(e=a.options)||void 0===e||null===(n=e.marker)||void 0===n?void 0:n.icon)?Lo:To}}),pt(na,{children:"high_schools"===r||"primary_schools"===r?pt(ra,{score:r}):pt(oa,{include:gt[r]})})]})})]})},r):null}));aa.displayName="Score";var ua=mt.div(m||(m=O(["\n padding: "," ",";\n"])),bt["--ll-spacing-small"],bt["--ll-spacing-medium"]),sa=mt.div(b||(b=O(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),ca=ct.memo((function(t){var e=t.tabContent,n=Fo(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Lt().translations;return xt(ua,{children:[xt(sa,{children:[pt(Tt.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),o&&!i&&pt(Ft,{size:"small"})]}),pt(At,{spacing:"--ll-spacing-small",vertical:!0}),!o&&!Object.keys((null==r?void 0:r.location)||{}).length&&pt(Nt,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),e.scores.map((function(t){return pt(aa,{score:t,isLoading:i,scoresData:r},t)}))]})}));ca.displayName="ScoreCategory";var la=ct.memo((function(t){var e=t.tabContent,n=Pi(),r=n.activeScore,i=n.setActiveScore;return lt.exports.useEffect((function(){i(e.scores[0])}),[]),pt(H,{value:r,onValueChange:function(t){i(t)},type:"single",collapsible:!0,children:pt(ca,{tabContent:e})})}));la.displayName="ScoreCategoryAccordion";var fa=mt.div(w||(w=O(["\n overflow-y: auto;\n"]))),pa=mt.div(x||(x=O(["\n position: absolute;\n top: ",";\n left: ",";\n width: 360px;\n max-height: calc(100% - 2 * ",");\n z-index: 1;\n border-radius: ",";\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n background-color: #fff;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],bt["--ll-border-radius-medium"],bt["--ll-color-background"],bt["--ll-color-border"]);mt.div(_||(_=O(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),bt["--ll-spacing-small"]);var da=mt.div(I||(I=O(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),bt["--ll-spacing-xx-small"],bt["--ll-color-border"]),ha=mt.div(S||(S=O(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),bt["--ll-spacing-small"],bt["--ll-color-background"]),va=function(){return pt(ha,{children:pt(Dt.Root,{})})},ya=ct.forwardRef((function(t,e){var n=Pi(),r=n.activeCategory,i=n.setActiveCategory;return pt(Tt.Root,{options:{currentTab:r},onChange:function(t){i(t.data)},children:xt(pa,{ref:e,children:[pt(da,{children:pt(Tt.Tabs,{})}),pt(fa,{children:dt.map((function(t){return pt(Tt.Content,{options:{value:t.value},children:pt(la,{tabContent:t},t.value)},t.value)}))}),pt(va,{})]})})}));ya.displayName="DesktopScores";var ga=mt.div(C||(C=O(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),ma=function(){var t,e,n,r=vt(),i=r.sdkState,o=r.setSdkState,a=Pi(),u=a.activeScore,s=a.activePOI,c=a.setActivePOI,l=a.hoveredPOI,f=function(){var t=A(lt.exports.useState(!1),2),e=t[0],n=t[1];return lt.exports.useLayoutEffect((function(){var t=function(){n(window.innerWidth<ft.screenSizes.mobileL)};return window.addEventListener("resize",Yi(t,250)),t(),function(){return window.removeEventListener("resize",t)}}),[]),e}(),p=Qi(),d=Xi(),h="night"===(null==i||null===(t=i.globalOptions)||void 0===t||null===(e=t.appearance)||void 0===e?void 0:e.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",v=A(lt.exports.useState(!1),2),y=v[0],g=v[1],m=lt.exports.useMemo((function(){var t,e;return"high_schools"!==u&&"primary_schools"!==u||d.isFetching?gt&&u&>[u]&&null!==(t=gt[u])&&void 0!==t&&t.length||p.isFetching?p.data:q({},u,[]):q({},u,(null==d||null===(e=d.data)||void 0===e?void 0:e[u])||[])}),[p.data,d.data,u]),b=lt.exports.useMemo((function(){return m?Object.entries(m).map((function(t){var e=A(t,2),n=e[0];return e[1].map((function(t){return Ai([t.lng,t.lat],{poi:t,type:n})}))})).flat().filter((function(t,e,n){return n.findIndex((function(e){return["lat","lng","name"].every((function(n){return e.properties.poi[n]===t.properties.poi[n]}))}))===e})):[]}),[m]),w=lt.exports.useMemo((function(){var t,e,n,r=(null==i||null===(t=i.options)||void 0===t?void 0:t.marker)&&Ai([null==i||null===(e=i.options)||void 0===e?void 0:e.marker.lng,null==i||null===(n=i.options)||void 0===n?void 0:n.marker.lat]);return[].concat(k(b),k(r?[r]:[]))}),[b,null==i||null===(n=i.options)||void 0===n?void 0:n.marker]),x=lt.exports.useRef(),_=A($(),2),I=_[0],S=_[1],C=lt.exports.useMemo((function(){return{top:25+S.height,bottom:25,left:25,right:25}}),[S.height]),O=lt.exports.useMemo((function(){return{top:50,bottom:50,left:S.width+32+50,right:50}}),[S.width]),P=f?C:O;return lt.exports.useEffect((function(){var t,e;if(w.length&&null!==(t=i.options)&&void 0!==t&&t.marker){var n,r,o,a=A(Fi((n=w.map((function(t){var e=t.geometry;return[e.coordinates[1],e.coordinates[0]]})),void 0===o&&(o={}),Ei({type:"MultiPoint",coordinates:n},r,o))),4),u=a[0],s=a[1],c=a[2],l=a[3];null==x||null===(e=x.current)||void 0===e||e.fitBounds([[s,u],[l,c]],{maxZoom:17,padding:P,duration:1e3})}}),[w,P]),i.options?pt(no,{mapRef:x,mapPadding:P,children:xt(ga,{children:[xt(Y,{ref:x,mapLib:Q,latitude:i.options.lat,longitude:i.options.lng,zoom:i.options.zoom,pitch:i.options.pitch,bearing:i.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(h,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(t){o(N(N({},i),{},{options:N(N({},i.options),{},{lat:t.viewState.latitude,lng:t.viewState.longitude,zoom:t.viewState.zoom,bearing:t.viewState.bearing,pitch:t.viewState.pitch})}))},cooperativeGestures:i.options.cooperativeGestures,onMoveStart:function(){return g(!0)},onMoveEnd:function(){return g(!1)},children:[pt(X,{showCompass:!0,style:{marginTop:f?16+S.height:16,marginRight:16}}),i.options.marker&&pt(tt,{marker:i.options.marker}),pt(Ao,{rect:S,zoom:i.options.zoom,mapRef:x,points:b,isMobile:f,activePOI:s,hoveredPOI:l,isMapMoving:y,setActivePOI:c}),pt(f?Jo:ya,{ref:I})]}),f&&pt(va,{})]})}):pt("div",{children:"No options provided."})},ba=Object.freeze(Object.defineProperty({__proto__:null,default:function(){return Ci.trackPageLoad(),pt(Mi,{children:pt(ma,{})})}},Symbol.toStringTag,{value:"Module"}));M("q",ba)}}}))}();
|
|
1
|
+
!function(){var t,e,n,r,i,o,a,u,s,c,l,f,p,d,h,v,y,g,m,b,w,x,_,I,S,C;function k(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||L(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function P(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function j(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */j=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(k){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===l)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(k){return{type:"throw",arg:k}}}t.wrap=s;var l={};function f(){}function p(){}function d(){}var h={};u(h,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(h=y);var g=d.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==B(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,u(g,"constructor",d),u(d,"constructor",p),p.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(s(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function M(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void n(c)}u.done?e(s):Promise.resolve(s).then(r,i)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){M(o,r,i,a,u,"next",t)}function u(t){M(o,r,i,a,u,"throw",t)}a(void 0)}))}}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(s){u=!0,i=s}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}(t,e)||L(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){if(t){if("string"==typeof t)return T(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,e):void 0}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?F(Object(n),!0).forEach((function(e){q(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(t,e,n){return e&&z(t.prototype,e),n&&z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}System.register(["./chevron_right-legacy.4a96f715.js","./index-legacy.0d90becf.js"],(function(M,L){"use strict";var T,F,z,U,G,V,K,W,J,Z,H,$,Y,Q,X,tt,et,nt,rt,it,ot,at,ut,st,ct,lt,ft,pt,dt,ht,vt,yt,gt,mt,bt,wt,xt,_t,It,St,Ct,kt,Ot,Pt,jt,Mt,Et,At,Lt,Tt,Ft,Nt,Dt;return{setters:[function(t){T=t.u,F=t.p,z=t.s,U=t.M,G=t.a,V=t.$,K=t.b,W=t.c,J=t.d,Z=t.S,H=t.e,$=t.f,Y=t.g,Q=t.m,X=t.N,tt=t.P},function(t){et=t._,nt=t.a,rt=t.b,it=t.c,ot=t.d,at=t.e,ut=t.f,st=t.g,ct=t.R,lt=t.r,ft=t.w,pt=t.j,dt=t.z,ht=t.L,vt=t.u,yt=t.h,gt=t.p,mt=t.s,bt=t.y,wt=t.F,xt=t.i,_t=t.k,It=t.I,St=t.l,Ct=t.m,kt=t.N,Ot=t.B,Pt=t.U,jt=t.A,Mt=t.x,Et=t.O,At=t.n,Lt=t.o,Tt=t.C,Ft=t.q,Nt=t.t,Dt=t.v}],execute:function(){function zt(t){return"string"==typeof t}function Rt(t){return"number"==typeof t}function qt(t){return"function"==typeof t}function Bt(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}M({a:Ht,b:ti,e:function(){return!Qt()},h:br,i:te,j:Xt,l:Qr,m:Vr,n:$t,o:ye,u:function(t){var e=Yr(t);void 0!==e&&e.remove();return Promise.resolve()}});var Ut=function(t){function e(e,n){var r=t.call(this,n)||this;return r.field=e,r}return et(e,t),e}(Error);function Gt(t){var e,n=t&&t.event&&t.event.type,r=t.event;if(void 0===r)throw new Ut("event","Event is missing");if(!zt(n))throw new Ut("event","Event is not a string");if("track"===n&&!zt(r.event))throw new Ut("event","Event is not a string");var i=null!==(e=r.properties)&&void 0!==e?e:r.traits;if("alias"!==n&&!Bt(i))throw new Ut("properties","properties is not an object");if(!function(t){var e,n,r;return zt(null!==(r=null!==(n=null!==(e=t.userId)&&void 0!==e?e:t.anonymousId)&&void 0!==n?n:t.groupId)&&void 0!==r?r:t.previousId)}(r))throw new Ut("userId","Missing userId or anonymousId");return t}var Vt={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:Gt,identify:Gt,page:Gt,alias:Gt,group:Gt,screen:Gt};function Kt(t,e,n,r){var i,o=[t,e,n,r],a=Bt(t)?t.event:t;if(!a||!zt(a))throw new Error("Event missing");var u=Bt(t)?null!==(i=t.properties)&&void 0!==i?i:{}:Bt(e)?e:{},s={};return Bt(e)&&!qt(n)&&(s=null!=n?n:{}),Bt(t)&&!qt(e)&&(s=null!=e?e:{}),[a,u,s,o.find(qt)]}function Wt(t,e,n,r,i){var o,a,u=null,s=null,c=[t,e,n,r,i],l=c.filter(zt);void 0!==l[0]&&void 0!==l[1]&&(u=l[0],s=l[1]),1===l.length&&(u=null,s=l[0]);var f=c.find(qt),p=c.filter((function(t){return null===s?Bt(t):Bt(t)||null===t})),d=null!==(o=p[0])&&void 0!==o?o:{},h=null!==(a=p[1])&&void 0!==a?a:{};return[u,s,d,h,f]}var Jt=function(t){return function(){for(var e,n,r,i,o,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var s=null;s=null!==(r=null!==(e=a.find(zt))&&void 0!==e?e:null===(n=a.find(Rt))||void 0===n?void 0:n.toString())&&void 0!==r?r:t.id();var c=a.filter((function(t){return null===s?Bt(t):Bt(t)||null===t})),l=null!==(i=c[0])&&void 0!==i?i:{},f=null!==(o=c[1])&&void 0!==o?o:{},p=a.find(qt);return[s,l,f,p]}};function Zt(t,e,n,r){Rt(t)&&(t=t.toString()),Rt(e)&&(e=e.toString());var i=[t,e,n,r],o=i.filter(zt),a=o[0],u=void 0===a?t:a,s=o[1],c=void 0===s?null:s,l=i.filter(Bt)[0];return[u,c,void 0===l?{}:l,i.find(qt)]}function Ht(t){return Promise.resolve(t)}function $t(t,e){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),e);t.then((function(t){return clearTimeout(i),n(t)})).catch(r)}))}function Yt(t,e,n,r){var i;return(i=n,new Promise((function(t){return setTimeout(t,i)}))).then((function(){return $t(function(){try{return Ht(e(t))}catch(n){return Promise.reject(n)}}(),null!=r?r:1e3)})).catch((function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")})).then((function(){return t}))}function Qt(){return"undefined"!=typeof window}function Xt(){return!Qt()||window.navigator.onLine}function te(){return!Xt()}for(var ee,ne=256,re=[];ne--;)re[ne]=(ne+256).toString(16).substring(1);function ie(){var t,e=0,n="";if(!ee||ne+16>256){for(ee=Array(e=256);e--;)ee[e]=256*Math.random()|0;e=ne=0}for(;e<16;e++)t=ee[ne+e],n+=6==e?re[15&t|64]:8==e?re[63&t|128]:re[t],1&e&&e>1&&e<11&&(n+="-");return ne++,n}function oe(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,u=t;o<a&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)u=u[i]=o===a?n:B(r=u[i])===B(e)?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}var ae=Object.freeze(Object.defineProperty({__proto__:null,dset:oe},Symbol.toStringTag,{value:"Module"}));M("d",ae);var ue=function(){function t(){var t=this;this._logs=[],this.log=function(e,n,r){var i=new Date;t._logs.push({level:e,message:n,time:i,extras:r})}}return Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce((function(t,e){var n,r,i,o=nt(nt({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete o.time;var a=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[a]&&(a="".concat(a,"-").concat(Math.random())),nt(nt({},t),((n={})[a]=o,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),se=ue,ce=function(){function t(t){this.metrics=[],this.remoteMetrics=t}return t.prototype.increment=function(t,e,n){var r;void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()}),null===(r=this.remoteMetrics)||void 0===r||r.increment(t,null!=n?n:[])},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map((function(t){return nt(nt({},t),{tags:t.tags.join(",")})}));console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map((function(t){return{m:t.metric,v:t.value,t:t.tags,k:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),le=ce;function fe(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],u={},s=function t(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:t,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return u[t.toLowerCase()]},has:function(t){return t.toLowerCase()in u}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),u[e]=u[e]?u[e]+","+n:n})),n(s())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}var pe="1.44.0";/*! js-cookie v3.0.1 | MIT */function de(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var he,ve=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=de({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var u=decodeURIComponent(o[0]);if(r[u]=e.read(a,u),t===u)break}catch(s){}}return t?r[t]:r}},remove:function(t,e){r(t,"",de({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,de({},this.attributes,e))},withConverter:function(e){return t(de({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function ye(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(xr){return t}}function ge(t){var e=function(t){try{return new URL(t)}catch(xr){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(ve.set(i,"1",a),ve.get(i))return ve.remove(i,a),o}catch(u){return}}}function me(t,e,n){var r=ve.get("s:context.referrer"),i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t);r=r?JSON.parse(r):void 0,(i=null!=i?i:r)&&(e&&(e.referrer=nt(nt({},e.referrer),i)),n||ve.set("s:context.referrer",JSON.stringify(i),function(){if(he)return he;var t=ge(window.location.href);return he={expires:31536e6,secure:!1,path:"/"},t&&(he.domain=t),he}()))}function be(t,e,n,r){var i,o,a,u,s=t.user(),c=window.location.search;e.context=null!==(o=null!==(i=e.context)&&void 0!==i?i:e.options)&&void 0!==o?o:{};var l=e.context,f=e.anonymousId;delete e.options,e.writeKey=null==n?void 0:n.apiKey,l.userAgent=window.navigator.userAgent;var p=navigator.userLanguage||navigator.language;if(void 0===l.locale&&void 0!==p&&(l.locale=p),!l.library){l.library={name:"analytics.js",version:"npm:next-".concat(pe)}}c&&!l.campaign&&(l.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.substr(4);"campaign"===a&&(a="name"),t[a]=ye(o)}return t}),{})}(c)),me(c,l,null!==(a=t.options.disableClientPersistence)&&void 0!==a&&a),e.userId=e.userId||s.id(),e.anonymousId=s.anonymousId(f),e.sentAt=new Date;var d=t.queue.failedInitializations||[];d.length>0&&(e._metadata={failedInitializations:d});var h=[],v=[];for(var y in r){var g=r[y];"Segment.io"===y&&h.push(y),"bundled"===g.bundlingStatus&&h.push(y),"unbundled"===g.bundlingStatus&&v.push(y)}for(var m=0,b=(null==n?void 0:n.unbundledIntegrations)||[];m<b.length;m++){var w=b[m];v.includes(w)||v.push(w)}var x=null!==(u=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==u?u:{},_=[];h.sort().forEach((function(t){var e;(null!==(e=x[t])&&void 0!==e?e:[]).forEach((function(t){_.push(t)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(e._metadata=nt(nt({},e._metadata),{bundled:h.sort(),unbundled:v.sort(),bundledIds:_}));var I=function(){var t=ve.get("_ga");if(t&&t.startsWith("amp"))return t}();return I&&(l.amp={id:I}),e}function we(t){console.error("Error sending segment performance metrics",t)}var xe,_e=function(){function t(t){var e,n,r,i,o=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:"api.segment.io/v1",this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var a=!1;!function t(){a||(a=!0,o.flush().catch(we),a=!1,setTimeout(t,o.flushTimer))}()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});n.library="analytics.js";n.library_version="npm:next-".concat(pe),this.queue.push({type:"Counter",metric:t,value:1,tags:n}),t.includes("error")&&this.flush().catch(we)}},t.prototype.flush=function(){return rt(this,void 0,void 0,(function(){var t=this;return it(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){we(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return rt(this,void 0,void 0,(function(){var t,e;return it(this,(function(n){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},[2,fe("https://".concat(this.host,"/m"),{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}(),Ie=M("C",(function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""})),Se=M("k",function(){function t(t,e){this.logger=new se,this.cancel=function(t){if(t)throw t;throw new Ie({reason:"Context Cancel"})},this._attempts=0,this._event=t,this._id=null!=e?e:ie(),this.stats=new le(xe)}return t.initMetrics=function(t){xe=new _e(t)},t.system=function(){return new t({type:"track",event:"system"})},t.prototype.isSame=function(t){return t._id===this._id},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this._event},set:function(t){this._event=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attempts",{get:function(){return this._attempts},set:function(t){this._attempts=t},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this._event.integrations)||void 0===n?void 0:n[r]))return this._event}return oe(this._event,t,e),this._event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this._event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()),Ce=function(){function t(){this.callbacks={}}return t.prototype.on=function(t,e){return this.callbacks[t]?this.callbacks[t].push(e):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this;return this.on(t,(function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)})),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter((function(t){return t!==e}));return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=null!==(e=this.callbacks[t])&&void 0!==e?e:[];return o.forEach((function(t){t.apply(n,r)})),this},t}(),ke=M("c",{}),Oe={},Pe={},je={exports:{}};!function(t){function e(t){return function(e,n,r,o){var a,u=o&&function(t){return"function"==typeof t}(o.normalizer)?o.normalizer:i;n=u(n);for(var s=!1;!s;)c();function c(){for(a in e){var t=u(a);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[a];return null==i?void(s=!0):n.length?void(e=i):void(s=!0)}}}a=void 0,s=!0}if(a)return null==e?e:t(e,a,r)}}function n(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function r(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function i(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}t.exports=e((function(t,e){if(t.hasOwnProperty(e))return t[e]})),t.exports.find=t.exports,t.exports.replace=function(t,n,i,o){return e(r).call(this,t,n,i,o),t},t.exports.del=function(t,r,i){return e(n).call(this,t,r,null,i),t}}(je);var Me=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pe,"__esModule",{value:!0});var Ee=Me(je.exports);function Ae(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return Ee.default(n,"address."+t)||Ee.default(n,t)||(e?Ee.default(n,"address."+e):null)||(e?Ee.default(n,e):null)||Ee.default(r,"address."+t)||Ee.default(r,t)||(e?Ee.default(r,"address."+e):null)||(e?Ee.default(r,e):null)}}Pe.default=function(t){t.zip=Ae("postalCode","zip"),t.country=Ae("country"),t.street=Ae("street"),t.state=Ae("state"),t.city=Ae("city"),t.region=Ae("region")};var Le={};Object.defineProperty(Le,"__esModule",{value:!0}),Le.clone=void 0,Le.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e};var Te={};Object.defineProperty(Te,"__esModule",{value:!0});var Fe={Salesforce:!0};Te.default=function(t){return!Fe[t]};var Ne={},De=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;Ne.parse=function(t){var e=[1,5,6,7,11,12],n=De.exec(t),r=0;if(!n)return new Date(t);for(var i,o=0;i=e[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(a)},Ne.is=function(t,e){return"string"==typeof t&&((!e||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&De.test(t))};var ze={},Re=/\d{13}/;ze.is=function(t){return Re.test(t)},ze.parse=function(t){return t=parseInt(t,10),new Date(t)};var qe={},Be=/\d{10}/;qe.is=function(t){return Be.test(t)},qe.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)};var Ue=Ne,Ge=ze,Ve=qe,Ke=Object.prototype.toString;var We=function(t){return e=t,"[object Date]"===Ke.call(e)?t:function(t){return"[object Number]"===Ke.call(t)}(t)?new Date((n=t)<315576e5?1e3*n:n):Ue.is(t)?Ue.parse(t):Ge.is(t)?Ge.parse(t):Ve.is(t)?Ve.parse(t):new Date(t);var e,n};var Je=Ne,Ze=He;function He(t,e){return void 0===e&&(e=!0),t&&"object"===B(t)?function(t,e){return Object.keys(t).forEach((function(n){t[n]=He(t[n],e)})),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach((function(n,r){t[r]=He(n,e)})),t}(t,e):Je.is(t,e)?Je.parse(t):t}var $e=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.Facade=void 0;var Ye=$e(Pe),Qe=Le,Xe=$e(Te),tn=$e(We),en=$e(je.exports),nn=$e(Ze);function rn(t,e){e=e||{},this.raw=Qe.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=Qe.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?tn.default(t.timestamp):new Date,e.traverse&&nn.default(t),this.opts=e,this.obj=t}Oe.Facade=rn;var on=rn.prototype;function an(t){return Qe.clone(t)}on.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=en.default(n,e.join("."))),this.opts.clone?an(n):n):n},on.field=function(t){var e=this.obj[t];return this.opts.clone?an(e):e},rn.proxy=function(t){return function(){return this.proxy(t)}},rn.field=function(t){return function(){return this.field(t)}},rn.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?Qe.clone(n):n]),n||[]}},rn.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},on.json=function(){var t=this.opts.clone?Qe.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},on.rawEvent=function(){return this.raw},on.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?Qe.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||en.default(r,t);return"object"!==B(i)&&(i=en.default(this.options(),t)),"object"===B(i)?i:{}}},on.context=on.options,on.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&Xe.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},on.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},on.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},on.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},on.sessionId=on.anonymousId,on.groupId=rn.proxy("options.groupId"),on.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},on.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},on.device=function(){var t=this.proxy("context.device");"object"===B(t)&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},on.userAgent=rn.proxy("context.userAgent"),on.timezone=rn.proxy("context.timezone"),on.timestamp=rn.field("timestamp"),on.channel=rn.field("channel"),on.ip=rn.proxy("context.ip"),on.userId=rn.field("userId"),Ye.default(on);var un={},sn={exports:{}};"function"==typeof Object.create?sn.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:sn.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}};var cn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(un,"__esModule",{value:!0}),un.Alias=void 0;var ln=cn(sn.exports),fn=Oe;function pn(t,e){fn.Facade.call(this,t,e)}un.Alias=pn,ln.default(pn,fn.Facade),pn.prototype.action=function(){return"alias"},pn.prototype.type=pn.prototype.action,pn.prototype.previousId=function(){return this.field("previousId")||this.field("from")},pn.prototype.from=pn.prototype.previousId,pn.prototype.userId=function(){return this.field("userId")||this.field("to")},pn.prototype.to=pn.prototype.userId;var dn={},hn={};Object.defineProperty(hn,"__esModule",{value:!0});var vn=/.+\@.+\..+/;hn.default=function(t){return vn.test(t)};var yn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dn,"__esModule",{value:!0}),dn.Group=void 0;var gn=yn(sn.exports),mn=yn(hn),bn=yn(We),wn=Oe;function xn(t,e){wn.Facade.call(this,t,e)}dn.Group=xn,gn.default(xn,wn.Facade);var _n=xn.prototype;_n.action=function(){return"group"},_n.type=_n.action,_n.groupId=wn.Facade.field("groupId"),_n.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return bn.default(t)},_n.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return mn.default(e)?e:void 0},_n.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},_n.name=wn.Facade.proxy("traits.name"),_n.industry=wn.Facade.proxy("traits.industry"),_n.employees=wn.Facade.proxy("traits.employees"),_n.properties=function(){return this.field("traits")||this.field("properties")||{}};var In={},Sn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(In,"__esModule",{value:!0}),In.Identify=void 0;var Cn=Oe,kn=Sn(je.exports),On=Sn(sn.exports),Pn=Sn(hn),jn=Sn(We),Mn=function(t){return t.trim()};function En(t,e){Cn.Facade.call(this,t,e)}In.Identify=En,On.default(En,Cn.Facade);var An=En.prototype;An.action=function(){return"identify"},An.type=An.action,An.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},An.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return Pn.default(e)?e:void 0},An.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return jn.default(t)},An.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return jn.default(t)},An.companyName=function(){return this.proxy("traits.company.name")},An.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return Mn(t);var e=this.firstName(),n=this.lastName();return e&&n?Mn(e+" "+n):void 0},An.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return Mn(t);var e=this.proxy("traits.name");return"string"==typeof e?Mn(e).split(" ")[0]:void 0},An.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return Mn(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=Mn(e).indexOf(" ");if(-1!==n)return Mn(e.substr(n+1))}},An.uid=function(){return this.userId()||this.username()||this.email()},An.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},An.age=function(){var t=this.birthday(),e=kn.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},An.avatar=function(){var t=this.traits();return kn.default(t,"avatar")||kn.default(t,"photoUrl")||kn.default(t,"avatarUrl")},An.position=function(){var t=this.traits();return kn.default(t,"position")||kn.default(t,"jobTitle")},An.username=Cn.Facade.proxy("traits.username"),An.website=Cn.Facade.one("traits.website"),An.websites=Cn.Facade.multi("traits.website"),An.phone=Cn.Facade.one("traits.phone"),An.phones=Cn.Facade.multi("traits.phone"),An.address=Cn.Facade.proxy("traits.address"),An.gender=Cn.Facade.proxy("traits.gender"),An.birthday=Cn.Facade.proxy("traits.birthday");var Ln={},Tn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Track=void 0;var Fn=Tn(sn.exports),Nn=Oe,Dn=In,zn=Tn(hn),Rn=Tn(je.exports);function qn(t,e){Nn.Facade.call(this,t,e)}Ln.Track=qn,Fn.default(qn,Nn.Facade);var Bn=qn.prototype;Bn.action=function(){return"track"},Bn.type=Bn.action,Bn.event=Nn.Facade.field("event"),Bn.value=Nn.Facade.proxy("properties.value"),Bn.category=Nn.Facade.proxy("properties.category"),Bn.id=Nn.Facade.proxy("properties.id"),Bn.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Bn.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Bn.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Bn.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Bn.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Bn.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Bn.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Bn.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Bn.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Bn.sku=Nn.Facade.proxy("properties.sku"),Bn.tax=Nn.Facade.proxy("properties.tax"),Bn.name=Nn.Facade.proxy("properties.name"),Bn.price=Nn.Facade.proxy("properties.price"),Bn.total=Nn.Facade.proxy("properties.total"),Bn.repeat=Nn.Facade.proxy("properties.repeat"),Bn.coupon=Nn.Facade.proxy("properties.coupon"),Bn.shipping=Nn.Facade.proxy("properties.shipping"),Bn.discount=Nn.Facade.proxy("properties.discount"),Bn.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Bn.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Bn.description=Nn.Facade.proxy("properties.description"),Bn.plan=Nn.Facade.proxy("properties.plan"),Bn.subtotal=function(){var t=Rn.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},Bn.products=function(){var t=this.properties(),e=Rn.default(t,"products");return Array.isArray(e)?e.filter((function(t){return null!==t})):[]},Bn.quantity=function(){return(this.obj.properties||{}).quantity||1},Bn.currency=function(){return(this.obj.properties||{}).currency||"USD"},Bn.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Bn.query=Nn.Facade.proxy("options.query"),Bn.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{}){var r=null==this[n]?this.proxy("properties."+n):this[n]();null!=r&&(e[t[n]]=r,delete e[n])}return e},Bn.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Bn.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return zn.default(e)?e:void 0},Bn.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(!t)return;if("number"==typeof t)return t;if("string"!=typeof t)return;if(t=t.replace(/\$/g,""),t=parseFloat(t),!isNaN(t))return t}(t)},Bn.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},Bn.identify=function(){var t=this.json();return t.traits=this.traits(),new Dn.Identify(t,this.opts)};var Un={},Gn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Un,"__esModule",{value:!0}),Un.Page=void 0;var Vn=Gn(sn.exports),Kn=Oe,Wn=Ln,Jn=Gn(hn);function Zn(t,e){Kn.Facade.call(this,t,e)}Un.Page=Zn,Vn.default(Zn,Kn.Facade);var Hn=Zn.prototype;Hn.action=function(){return"page"},Hn.type=Hn.action,Hn.category=Kn.Facade.field("category"),Hn.name=Kn.Facade.field("name"),Hn.title=Kn.Facade.proxy("properties.title"),Hn.path=Kn.Facade.proxy("properties.path"),Hn.url=Kn.Facade.proxy("properties.url"),Hn.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Hn.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t){var o=null==this[i]?this.proxy("properties."+i):this[i]();null!=o&&(e[t[i]]=o,i!==t[i]&&delete e[i])}return e},Hn.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return Jn.default(e)?e:void 0},Hn.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},Hn.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},Hn.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new Wn.Track(e,this.opts)};var $n={},Yn=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($n,"__esModule",{value:!0}),$n.Screen=void 0;var Qn=Yn(sn.exports),Xn=Un,tr=Ln;function er(t,e){Xn.Page.call(this,t,e)}$n.Screen=er,Qn.default(er,Xn.Page),er.prototype.action=function(){return"screen"},er.prototype.type=er.prototype.action,er.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},er.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new tr.Track(e,this.opts)};var nr={},rr=ot&&ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.Delete=void 0;var ir=rr(sn.exports),or=Oe;function ar(t,e){or.Facade.call(this,t,e)}nr.Delete=ar,ir.default(ar,or.Facade),ar.prototype.type=function(){return"delete"},function(t){var e=ot&&ot.__assign||function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0;var n=Oe;Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=un;Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=dn;Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=In;Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Ln;Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var u=Un;Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return u.Page}});var s=$n;Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return s.Screen}});var c=nr;Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return c.Delete}}),t.default=e(e({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:u.Page,Screen:s.Screen,Delete:c.Delete})}(ke);var ur={exports:{}};!function(t,e){t.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,a,u,s,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(a[2],16),s=parseInt(a[1],16)||0,o[14]=u,o[15]=s,n(l,o),l}function a(t){var e,r,o,a,u,s,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,i(t.subarray(e-64,e)));for(r=(t=e-64<c?t.subarray(e-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(a[2],16),s=parseInt(a[1],16)||0,o[14]=u,o[15]=s,n(l,o),l}function u(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function s(t){var e;for(e=0;e<t.length;e+=1)t[e]=u(t[e]);return t.join("")}function c(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function f(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function p(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function d(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return s(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,u,s=this.byteLength,c=e(n,s),l=s;return r!==t&&(l=e(r,s)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),a=new Uint8Array(o),u=new Uint8Array(this,c,i),a.set(u),o)}}(),h.prototype.append=function(t){return this.appendBinary(c(t)),this},h.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},h.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=s(this._hash),t&&(n=d(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(t,e){var r,i,o,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,t),a=0;a<16;a+=1)t[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},h.hash=function(t,e){return h.hashBinary(c(t),e)},h.hashBinary=function(t,e){var n=s(o(t));return e?d(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(t){var e,r=p(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=s(this._hash),t&&(n=d(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var t=h.prototype.getState.call(this);return t.buff=f(t.buff),t},h.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),h.prototype.setState.call(this,t)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(t,e){var n=s(a(new Uint8Array(t)));return e?d(n):n},h}()}(ur);var sr=ur.exports,cr=function(){function t(t){this.user=t}return t.prototype.track=function(t,e,n,r){return this.normalize(nt(nt({},this.baseEvent()),{event:t,type:"track",properties:e,options:nt({},n),integrations:nt({},r)}))},t.prototype.page=function(t,e,n,r,i){var o,a={type:"page",properties:nt({},n),options:nt({},r),integrations:nt({},i)};return null!==t&&(a.category=t,a.properties=null!==(o=a.properties)&&void 0!==o?o:{},a.properties.category=t),null!==e&&(a.name=e),this.normalize(nt(nt({},this.baseEvent()),a))},t.prototype.screen=function(t,e,n,r,i){var o={type:"screen",properties:nt({},n),options:nt({},r),integrations:nt({},i)};return null!==t&&(o.category=t),null!==e&&(o.name=e),this.normalize(nt(nt({},this.baseEvent()),o))},t.prototype.identify=function(t,e,n,r){return this.normalize(nt(nt({},this.baseEvent()),{type:"identify",userId:t,traits:e,options:nt({},n),integrations:nt({},r)}))},t.prototype.group=function(t,e,n,r){return this.normalize(nt(nt({},this.baseEvent()),{type:"group",traits:e,options:nt({},n),integrations:nt({},r),groupId:t}))},t.prototype.alias=function(t,e,n,r){var i={userId:t,type:"alias",options:nt({},n),integrations:nt({},r)};return null!==e&&(i.previousId=e),void 0===t?this.normalize(nt(nt({},i),this.baseEvent())):this.normalize(nt(nt({},this.baseEvent()),i))},t.prototype.baseEvent=function(){var t={integrations:{},options:{}},e=this.user;return e.id()&&(t.userId=e.id()),e.anonymousId()&&(t.anonymousId=e.anonymousId()),t},t.prototype.context=function(t){var e,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(e=t.options)&&void 0!==e?e:{};delete o.integrations;var a=Object.keys(o),u=null!==(r=null===(n=t.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},s={};return a.forEach((function(t){"context"!==t&&(i.includes(t)?oe(s,t,o[t]):oe(u,t,o[t]))})),[u,s]},t.prototype.normalize=function(t){var e,n,r=Object.keys(null!==(e=t.integrations)&&void 0!==e?e:{}).reduce((function(e,n){var r,i;return nt(nt({},e),((r={})[n]=Boolean(null===(i=t.integrations)||void 0===i?void 0:i[n]),r))}),{}),i=nt(nt({},r),null===(n=t.options)||void 0===n?void 0:n.integrations),o=this.context(t),a=o[0],u=o[1];t.options;var s=at(t,["options"]),c=nt(nt(nt({timestamp:new Date},s),{context:a,integrations:i}),u),l="ajs-next-"+sr.hash(JSON.stringify(c)+ie());return nt(nt({},c),{messageId:l})},t}();var lr="onRemoveFromFuture",fr=M("P",function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return et(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map((function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t){var e=this;if(0===this.getAttempts(t))return this.push(t)[0];var n=this.updateAttempts(t);if(n>this.maxAttempts||this.includes(t))return!1;var r=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,a=t.attempt,u=t.maxTimeout,s=void 0===u?1/0:u;return Math.min(e*r*Math.pow(o,a),s)}({attempt:n-1});return setTimeout((function(){e.queue.push(t),e.future=e.future.filter((function(e){return e.id!==t.id})),e.emit(lr)}),r),this.future.push(t),!0},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find((function(e){return e.id===t.id})))||Boolean(this.future.find((function(e){return e.id===t.id})))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(Ce)),pr={getItem:function(){},setItem:function(){},removeItem:function(){}};try{pr=Qt()&&window.localStorage?window.localStorage:pr}catch(wa){console.warn("Unable to access localStorage",wa)}function dr(t){var e=pr.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new Se(t.event,t.id)}))}function hr(t){var e=pr.getItem(t);return e?JSON.parse(e):{}}function vr(t){pr.removeItem(t)}function yr(t,e,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(t,":lock"),i=pr.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(t){return(new Date).getTime()>t}(o);if(a)return pr.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void pr.removeItem(r);!a&&n<3?setTimeout((function(){yr(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var gr=M("f",function(t){function e(e,n){var r=t.call(this,e,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),a=[],u={};return yr(n,(function(){try{a=dr(i),u=hr(o),vr(i),vr(o),r.queue=ut(ut([],a,!0),r.queue,!0),r.seen=nt(nt({},u),r.seen)}catch(wa){console.error(wa)}})),document.addEventListener("pagehide",(function(){if(r.todo>0){var t=ut(ut([],r.queue,!0),r.future,!0);try{yr(n,(function(){!function(t,e){var n=dr(t),r=ut(ut([],e,!0),n,!0).reduce((function(t,e){var n;return nt(nt({},t),((n={})[e.id]=e,n))}),{});pr.setItem(t,JSON.stringify(Object.values(r)))}(i,t),function(t,e){var n=hr(t);pr.setItem(t,JSON.stringify(nt(nt({},n),e)))}(o,r.seen)}))}catch(wa){console.error(wa)}}})),r}return et(e,t),e}(fr)),mr=function(t){return"object"===B(t)&&null!==t&&"then"in t&&"function"==typeof t.then};function br(t,e){var n="action"in e?e.action.name:e.name;t.log("debug","plugin",{plugin:n});var r=(new Date).getTime(),i=e[t.event.type];if(void 0===i)return Promise.resolve(t);var o=function(t){return rt(this,void 0,void 0,(function(){var e;return it(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}}))}))}((function(){return i.apply(e,[t])})).then((function(t){var e=(new Date).getTime()-r;return t.stats.gauge("plugin_time",e,["plugin:".concat(n)]),t})).catch((function(e){if(e instanceof Ie&&"middleware_cancellation"===e.type)throw e;return e instanceof Ie?(t.log("warn",e.type,{plugin:n,error:e}),e):(t.log("error","plugin Error",{plugin:n,error:e}),t.stats.increment("plugin_error",1,["plugin:".concat(n)]),e)}));return o}function wr(t,e){return br(t,e).then((function(e){if(e instanceof Se)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}var xr,_r,Ir=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},Sr=null!==(xr=(_r=Ir()).__SEGMENT_INSPECTOR__)&&void 0!==xr?xr:_r.__SEGMENT_INSPECTOR__={},Cr=function(t){function e(e){var n,r,i,o=t.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e=t();return mr(e)&&(1==++i&&(n=new Promise((function(t){return r=t}))),e.finally((function(){return 0==--i&&r()}))),e}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=null!=e?e:new gr(4,"event-queue"),o.queue.on(lr,(function(){o.scheduleFlush(0)})),o}return et(e,t),e.prototype.register=function(t,e,n){return rt(this,void 0,void 0,(function(){var r=this;return it(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(e.load(t,n)).then((function(){r.plugins.push(e)})).catch((function(n){if("destination"===e.type)return r.failedInitializations.push(e.name),console.warn(e.name,n),void t.log("warn","Failed to load destination",{plugin:e.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},e.prototype.deregister=function(t,e,n){return rt(this,void 0,void 0,(function(){var r;return it(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==e.name})),[3,4];case 3:return r=i.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:r}),[3,4];case 4:return[2]}}))}))},e.prototype.dispatch=function(t){return rt(this,void 0,void 0,(function(){var e;return it(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]}))}))},e.prototype.subscribeToDelivery=function(t){return rt(this,void 0,void 0,(function(){var e=this;return it(this,(function(n){return[2,new Promise((function(n){e.on("flush",(function r(i,o){i.isSame(t)&&(e.off("flush",r),n(i))}))}))]}))}))},e.prototype.dispatchSingle=function(t){return rt(this,void 0,void 0,(function(){var e=this;return it(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch((function(n){return n instanceof Ie&&!1===n.retry?(t.setFailedDelivery({reason:n}),t):e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)}))]}))}))},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},e.prototype.deliver=function(t){return rt(this,void 0,void 0,(function(){var e,n,r;return it(this,(function(i){switch(i.label){case 0:return[4,this.criticalTasks.done()];case 1:i.sent(),e=Date.now(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=i.sent(),n=Date.now()-e,t.stats.gauge("delivered",n),t.log("debug","Delivered",t.event),[2,t];case 4:throw r=i.sent(),t.log("error","Failed to deliver",r),t.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},e.prototype.enqueuRetry=function(t,e){return!(t instanceof Ie&&!1===t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return rt(this,void 0,void 0,(function(){var t,e;return it(this,(function(n){switch(n.label){case 0:if(0===this.queue.length||!Xt())return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}}))}))},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n,r=this.plugins.filter((function(e){var n,r,i;if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach((function(e){void 0!==t[e]&&(o=t[e])})),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===e.name||t.All)})),i=(e="type",n={},r.forEach((function(t){var r,i=void 0;if("string"==typeof e){var o=t[e];i="string"!=typeof o?JSON.stringify(o):o}else e instanceof Function&&(i=e(t));void 0!==i&&(n[i]=ut(ut([],null!==(r=n[i])&&void 0!==r?r:[],!0),[t],!1))})),n),o=i.before,a=void 0===o?[]:o,u=i.enrichment,s=void 0===u?[]:u,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:a,enrichment:s,destinations:l,after:void 0===f?[]:f}},e.prototype.flushOne=function(t){var e,n,r,i;return rt(this,void 0,void 0,(function(){var o,a,u,s,c,l,f,p,d,h,v,y,g,m;return it(this,(function(b){switch(b.label){case 0:if(!this.isReady())throw new Error("Not ready");o=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),a=o.before,u=o.enrichment,s=0,c=a,b.label=1;case 1:return s<c.length?(l=c[s],[4,wr(t,l)]):[3,4];case 2:(h=b.sent())instanceof Se&&(t=h),b.label=3;case 3:return s++,[3,1];case 4:f=0,p=u,b.label=5;case 5:return f<p.length?(d=p[f],[4,br(t,d)]):[3,8];case 6:(h=b.sent())instanceof Se&&(t=h),b.label=7;case 7:return f++,[3,5];case 8:return null===(n=Sr.enriched)||void 0===n||n.call(Sr,t),v=this.availableExtensions(null!==(r=t.event.integrations)&&void 0!==r?r:{}),y=v.destinations,g=v.after,[4,new Promise((function(e,n){setTimeout((function(){var r=y.map((function(e){return br(t,e)}));Promise.all(r).then(e).catch(n)}),0)}))];case 9:return b.sent(),t.stats.increment("message_delivered"),null===(i=Sr.delivered)||void 0===i||i.call(Sr,t,["segment.io"]),m=g.map((function(e){return br(t,e)})),[4,Promise.all(m)];case 10:return b.sent(),[2,t]}}))}))},e}(Ce);function kr(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}var Or={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Pr=function(){function t(){this.cache={}}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){return this.cache[t]=e,e},t.prototype.remove=function(t){delete this.cache[t]},t}(),jr=function(t){function e(n){void 0===n&&(n=e.defaults);var r=t.call(this)||this;return r.options=nt(nt({},e.defaults),n),r}return et(e,t),e.available=function(){var t=window.navigator.cookieEnabled;return t||(ve.set("ajs:cookies","test"),t=document.cookie.includes("ajs:cookies"),ve.remove("ajs:cookies")),t},Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:ge(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){try{var e=ve.get(t);if(!e)return null;try{return JSON.parse(e)}catch(n){return e}}catch(n){return null}},e.prototype.set=function(t,e){return"string"==typeof e?ve.set(t,e,this.opts()):null===e?ve.remove(t,this.opts()):ve.set(t,JSON.stringify(e),this.opts()),e},e.prototype.remove=function(t){return ve.remove(t,this.opts())},e}(Pr),Mr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.get=function(t){return null},e.set=function(t,e){return null},e.remove=function(t){},e}return et(e,t),e}(Pr),Er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return et(e,t),e.available=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(e){return!1}},e.prototype.get=function(t){var e=localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(n){return JSON.parse(JSON.stringify(e))}return null},e.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(xr){console.warn("Unable to set ".concat(t," in localStorage, storage may be full."))}return e},e.prototype.remove=function(t){return localStorage.removeItem(t)},e}(Pr),Ar=function(){function t(t,e){void 0===t&&(t=Or);var n,r,i,o,a=this;this.options={},this.id=function(t){var e,n;if(a.options.disable)return null;var r=a.chainGet(a.idKey);void 0!==t&&(a.trySet(a.idKey,t),t!==r&&null!==r&&null!==t&&a.anonymousId(null));return null!==(n=null!==(e=a.chainGet(a.idKey))&&void 0!==e?e:a.cookies.get(Or.cookie.oldKey))&&void 0!==n?n:null},this.anonymousId=function(t){var e,n;if(a.options.disable)return null;if(void 0===t){var r=null!==(e=a.chainGet(a.anonKey))&&void 0!==e?e:null===(n=a.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(a.trySet(a.anonKey,null),a.chainGet(a.anonKey)):(a.trySet(a.anonKey,null!=t?t:ie()),a.chainGet(a.anonKey))},this.traits=function(t){var e,n;if(!a.options.disable)return null===t&&(t={}),t&&(a.mem.set(a.traitsKey,null!=t?t:{}),a.localStorage.set(a.traitsKey,null!=t?t:{})),null!==(n=null!==(e=a.localStorage.get(a.traitsKey))&&void 0!==e?e:a.mem.get(a.traitsKey))&&void 0!==n?n:{}},this.options=t,this.cookieOptions=e,this.idKey=null!==(r=null===(n=t.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:Or.cookie.key,this.traitsKey=null!==(o=null===(i=t.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:Or.localStorage.key,this.anonKey="ajs_anonymous_id";var u=!0===t.disable,s=!1!==t.persist;this.localStorage=u||t.localStorageFallbackDisabled||!s||!Er.available()?new Mr:new Er,this.cookies=!u&&s&&jr.available()?new jr(e):new Mr,this.mem=u?new Mr:new Pr;var c=this.cookies.get(Or.cookie.oldKey);c&&(c.id&&this.id(c.id),c.traits&&this.traits(c.traits)),kr(this)}return t.prototype.chainGet=function(t){var e,n,r,i=null!==(r=null!==(n=null!==(e=this.localStorage.get(t))&&void 0!==e?e:this.cookies.get(t))&&void 0!==n?n:this.mem.get(t))&&void 0!==r?r:null;return this.trySet(t,"number"==typeof i?i.toString():i)},t.prototype.trySet=function(t,e){return this.localStorage.set(t,e),this.cookies.set(t,e),this.mem.set(t,e),e},t.prototype.chainClear=function(t){this.localStorage.remove(t),this.cookies.remove(t),this.mem.remove(t)},t.prototype.legacySIO=function(){var t=this.cookies.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();null!==n&&n!==t||(e=nt(nt({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.chainClear(this.idKey),this.chainClear(this.anonKey),this.chainClear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.defaults=Or,t}(),Lr={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Tr=function(t){function e(e,n){void 0===e&&(e=Lr);var r=t.call(this,e,n)||this;return r.anonymousId=function(t){},kr(r),r}return et(e,t),e}(Ar),Fr="This is being deprecated and will be not be available in future releases of Analytics JS",Nr=Ir(),Dr=null==Nr?void 0:Nr.analytics;function zr(){console.warn(Fr)}var Rr=function(t){function e(e,n,r,i,o){var a,u,s,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=zr,c.addIntegrationMiddleware=zr,c.listeners=zr,c.addEventListener=zr,c.removeAllListeners=zr,c.removeListener=zr,c.removeEventListener=zr,c.hasListeners=zr,c.add=zr,c.addIntegration=zr;var l=null==n?void 0:n.cookie,f=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;return c.settings=e,c.settings.timeout=null!==(u=c.settings.timeout)&&void 0!==u?u:300,c.queue=null!=r?r:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var n=t?4:1,r=e?new fr(n,[]):new gr(n,"event-queue");return new Cr(r)}(null==n?void 0:n.retryQueue,f),c._user=null!=i?i:new Ar(f?nt(nt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Tr(f?nt(nt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new cr(c._user),c.integrations=null!==(s=null==n?void 0:n.integrations)&&void 0!==s?s:{},c.options=null!=n?n:{},kr(c),c}return et(e,t),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u=this;return it(this,(function(s){return e=Kt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.track(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return u.emit("track",n,t.event.properties,t.event.options),t}))]}))}))},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u,s=this;return it(this,(function(c){return e=Wt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=this.eventFactory.page(n,r,i,o,this.integrations),[2,this.dispatch(u,a).then((function(t){return s.emit("page",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u=this;return it(this,(function(s){return e=Jt(this._user).apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],this._user.identify(n,r),a=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this.dispatch(a,o).then((function(t){return u.emit("identify",t.event.userId,t.event.traits,t.event.options),t}))]}))}))},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)return this._group;var r=Jt(this._group).apply(void 0,e),i=r[0],o=r[1],a=r[2],u=r[3];this._group.identify(i,o);var s=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(s,c,a,this.integrations);return this.dispatch(l,u).then((function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e}))},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u=this;return it(this,(function(s){return e=Zt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.alias(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return u.emit("alias",n,r,t.event.options),t}))]}))}))},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r,i,o,a,u,s=this;return it(this,(function(c){return e=Wt.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],u=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this.dispatch(u,a).then((function(t){return s.emit("screen",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.f9840683.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.f9840683.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.f9840683.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n;return it(this,(function(r){switch(r.label){case 0:return[4,st((function(){return L.import("./auto-track-legacy.f9840683.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,ut([this],t,!1))]}}))}))},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r=this;return it(this,(function(i){switch(i.label){case 0:return e=Se.system(),n=t.map((function(t){return r.queue.register(e,t,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return rt(this,void 0,void 0,(function(){var e,n,r=this;return it(this,(function(i){switch(i.label){case 0:return e=Se.system(),n=t.map((function(t){return rt(r,void 0,void 0,(function(){var n;return it(this,(function(r){return n=this.queue.plugins.find((function(e){return e.name===t})),n?[2,this.queue.deregister(e,n,this)]:(e.log("warn","plugin ".concat(t," not found")),[2])}))}))})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset()},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype.dispatch=function(t,e){var n;return rt(this,void 0,void 0,(function(){var r,i,o,a,u;return it(this,(function(s){switch(s.label){case 0:return r=new Se(t),null===(n=Sr.triggered)||void 0===n||n.call(Sr,r),te()&&!this.options.retryQueue?[2,r]:(i=Date.now(),this.queue.isEmpty()?[4,this.queue.dispatchSingle(r)]:[3,2]);case 1:return o=s.sent(),[3,4];case 2:return[4,this.queue.dispatch(r)];case 3:o=s.sent(),s.label=4;case 4:return a=Date.now()-i,u=this.settings.timeout,e?[4,Yt(o,e,Math.max((null!=u?u:300)-a,0),u)]:[3,6];case 5:o=s.sent(),s.label=6;case 6:return this._debug&&o.flush(),[2,o]}}))}))},e.prototype.addSourceMiddleware=function(t){return rt(this,void 0,void 0,(function(){var e=this;return it(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return rt(e,void 0,void 0,(function(){var e,n,r;return it(this,(function(i){switch(i.label){case 0:return[4,st((function(){return Promise.resolve().then((function(){return ei}))}),void 0)];case 1:return e=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(t){if("destination"===t.type)return n[t.name]=!0})),r=e(t,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.queue.plugins.filter((function(e){return e.name.toLowerCase()===t.toLowerCase()}));return r.forEach((function(t){t.addMiddleware.apply(t,e)})),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return rt(this,void 0,void 0,(function(){return it(this,(function(e){switch(e.label){case 0:return[4,st((function(){return L.import("./index-legacy.b87ca0ca.js")}),void 0)];case 1:return[2,(0,e.sent().queryString)(this,t)]}}))}))},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),rt(this,void 0,void 0,(function(){return it(this,(function(e){return[2,Promise.all(this.queue.plugins.map((function(t){return t.ready?t.ready():Promise.resolve()}))).then((function(e){return t(e),e}))]}))}))},e.prototype.noConflict=function(){return console.warn(Fr),window.analytics=null!=Dr?Dr:this,this},e.prototype.normalize=function(t){return console.warn(Fr),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Fr),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return pe},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return rt(this,void 0,void 0,(function(){return it(this,(function(t){return console.warn(Fr),[2,Promise.resolve(this)]}))}))},e.prototype.pageview=function(t){return rt(this,void 0,void 0,(function(){return it(this,(function(e){switch(e.label){case 0:return console.warn(Fr),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}}))}))},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Fr),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Fr),this.queue.plugins.filter((function(t){return"destination"===t.type})).reduce((function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)}),{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(Ce);function qr(){return"undefined"!=typeof process&&process.env?process.env:{}}var Br,Ur=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,Gr=function(){var t=function(){var t;return null!=Br?Br:null===(t=window.analytics)||void 0===t?void 0:t._cdn}();if(t)return t;var e,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(t){var n,r=null!==(n=t.getAttribute("src"))&&void 0!==n?n:"",i=Ur.exec(r);i&&i[1]&&(e=i[1])})),e);return n||"https://cdn.segment.com"};M("g",(function(){var t=Gr();return"".concat(t,"/next-integrations")}));function Vr(t,e){var n,r=Object.entries(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,e){var n,r,i=e[0],o=e[1];return"object"===B(o)?nt(nt({},t),((n={})[i]=o,n)):nt(nt({},t),((r={})[i]={},r))}),{});return Object.entries(t.integrations).reduce((function(t,e){var n,i=e[0],o=e[1];return nt(nt({},t),((n={})[i]=nt(nt({},o),r[i]),n))}),{})}function Kr(){var t=document.getElementsByTagName("link"),e="";return Array.prototype.slice.call(t).forEach((function(t){"canonical"===t.getAttribute("rel")&&(e=t.getAttribute("href"))})),e}function Wr(){var t=Kr();if(!t)return window.location.pathname;var e=document.createElement("a");return e.href=t,e.pathname.startsWith("/")?e.pathname:"/"+e.pathname}function Jr(t){void 0===t&&(t="");var e=Kr();if(e)return e.includes("?")?e:"".concat(e).concat(t);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function Zr(){return{path:Wr(),referrer:document.referrer,search:location.search,title:document.title,url:Jr(location.search)}}function Hr(t){var e,n=t.event;n.context=n.context||{};var r=Zr(),i=null!==(e=n.properties)&&void 0!==e?e:{};return Object.keys(r).forEach((function(t){i[t]&&(r[t]=i[t])})),n.context.page&&(r=Object.assign({},r,n.context.page)),n.context=Object.assign({},n.context,{page:r}),t.event=n,t}var $r={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:function(t){return t.event.properties=Object.assign({},Zr(),t.event.properties),t.event.name&&(t.event.properties.name=t.event.name),Hr(t)},alias:Hr,track:Hr,identify:Hr,group:Hr};function Yr(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(e){return e.src===t}))}function Qr(t,e){var n=Yr(t);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(t,e){n.addEventListener("load",(function(){return t(n)})),n.addEventListener("error",(function(t){return e(t)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var a=0,u=Object.entries(null!=e?e:{});a<u.length;a++){var s=u[a],c=s[0],l=s[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function Xr(t,e){var n=new ke.Facade(t,e);return"track"===t.type&&(n=new ke.Track(t,e)),"identify"===t.type&&(n=new ke.Identify(t,e)),"page"===t.type&&(n=new ke.Page(t,e)),"alias"===t.type&&(n=new ke.Alias(t,e)),"group"===t.type&&(n=new ke.Group(t,e)),"screen"===t.type&&(n=new ke.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}function ti(t,e,n){return rt(this,void 0,void 0,(function(){function r(e,n){return rt(this,void 0,void 0,(function(){var r,i,o;return it(this,(function(a){switch(a.label){case 0:return r=!1,i=null,[4,Ht(n({payload:Xr(e,{clone:!0,traverse:!1}),integration:t,next:function(t){r=!0,null===t&&(i=null),t&&(i=t.obj)}}))];case 1:return a.sent(),r||null===i||(i.integrations=nt(nt({},e.integrations),((o={})[t]=!1,o))),[2,i]}}))}))}var i,o,a,u,s;return it(this,(function(t){switch(t.label){case 0:i=function(t){return JSON.parse(JSON.stringify(t))}(e),o=0,a=n,t.label=1;case 1:return o<a.length?(u=a[o],[4,r(i,u)]):[3,4];case 2:if(null===(s=t.sent()))return[2,null];i=s,t.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}var ei=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:ti,sourceMiddlewarePlugin:function(t,e){function n(n){return rt(this,void 0,void 0,(function(){var r;return it(this,(function(i){switch(i.label){case 0:return r=!1,[4,Ht(t({payload:Xr(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){r=!0,t&&(n.event=t.obj)}}))];case 1:if(i.sent(),!r)throw new Ie({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,identify:n,alias:n,group:n}}},Symbol.toStringTag,{value:"Module"})),ni=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return rt(this,void 0,void 0,(function(){var e;return it(this,(function(n){switch(n.label){case 0:return[4,ti(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new Ie({retry:!1,reason:"dropped by destination middleware"})),[2,new Se(e)]}}))}))},t.prototype._createMethod=function(t){var e=this;return function(n){return rt(e,void 0,void 0,(function(){var e;return it(this,(function(r){switch(r.label){case 0:return this.action[t]?[4,this.transform(n)]:[2,n];case 1:return e=r.sent(),[4,this.action[t](e)];case 2:return r.sent(),[2,n]}}))}))}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},t.prototype.load=function(t,e){return this.action.load(t,e)},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();function ri(t,e,n,r,i){var o,a,u;return rt(this,void 0,void 0,(function(){var s,c,l,f,p=this;return it(this,(function(d){switch(d.label){case 0:return s=[],c=Gr(),l=null!==(a=null===(o=t.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==a?a:[],f=(null!==(u=t.remotePlugins)&&void 0!==u?u:[]).map((function(t){return rt(p,void 0,void 0,(function(){var o,a,u,f,p,d,h,v;return it(this,(function(y){switch(y.label){case 0:if(!1===e.All&&!e[t.name]||!1===e[t.name])return[2];y.label=1;case 1:if(y.trys.push([1,12,,13]),!r)return[3,7];o=t.url.split("/"),a=o[o.length-2],u=t.url.replace(a,btoa(a).replace(/=/g,"")),y.label=2;case 2:return y.trys.push([2,4,,6]),[4,Qr(u.replace("https://cdn.segment.com",c))];case 3:return y.sent(),[3,6];case 4:return y.sent(),[4,Qr(t.url.replace("https://cdn.segment.com",c))];case 5:return y.sent(),[3,6];case 6:return[3,9];case 7:return[4,Qr(t.url.replace("https://cdn.segment.com",c))];case 8:y.sent(),y.label=9;case 9:return f=t.libraryName,"function"!=typeof window[f]?[3,11]:[4,Ht((0,window[f])(nt(nt({},t.settings),n[t.name])))];case 10:p=y.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach((function(t){e.forEach((function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))}))}))}(d=Array.isArray(p)?p:[p]),h=l.filter((function(e){return e.destinationName===t.creationName})),d.forEach((function(e){var n=new ni(t.creationName,e);h.length&&i&&"destination"===e.type&&n.addMiddleware(i),s.push(n)})),y.label=11;case 11:return[3,13];case 12:return v=y.sent(),console.warn("Failed to load Remote Plugin",v),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,s.filter(Boolean)]}}))}))}var ii=fe;"undefined"!=typeof window&&(ii=window.fetch||fe);function oi(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}function ai(t,e){var n,r,i,o,a,u=[],s=!1,c=null!==(n=null==e?void 0:e.size)&&void 0!==n?n:10,l=null!==(r=null==e?void 0:e.timeout)&&void 0!==r?r:5e3;function f(e){var n;if(0!==e.length){var r=null===(n=e[0])||void 0===n?void 0:n.writeKey;return ii("https://".concat(t,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:e,writeKey:r})})}}function p(){return rt(this,void 0,void 0,(function(){var t;return it(this,(function(e){return u.length?(t=u,u=[],[2,f(t)]):[2]}))}))}return o=function(){if(s=!0,u.length){var t=function(t){var e=[],n=0;return t.forEach((function(t){oi(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(u).map(f);Promise.all(t).catch(console.error)}},a=!1,document.addEventListener("pagehide",(function(){a||(a=!0,o())})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0,o()}else a=!1})),{dispatch:function(t,e){return rt(this,void 0,void 0,(function(){var t;return it(this,(function(n){return u.push(e),t=u.length>=c||function(t){return oi(t)>=450}(u),[2,t||s?p():void(i||(i=setTimeout((function(){i=void 0,p().catch(console.error)}),l)))]}))}))}}}var ui=fe;"undefined"!=typeof window&&(ui=window.fetch||fe);var si=M("p",(function(t,e){return rt(void 0,void 0,void 0,(function(){var n;return it(this,(function(r){return n=function(r){return rt(void 0,void 0,void 0,(function(){var i;return it(this,(function(o){switch(o.label){case 0:return t(r)?(i=n,[4,e()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))}));function ci(t,e){return rt(this,void 0,void 0,(function(){var n,r=this;return it(this,(function(i){switch(i.label){case 0:return n=[],te()?[2,e]:[4,si((function(){return e.length>0&&!te()}),(function(){return rt(r,void 0,void 0,(function(){var r,i;return it(this,(function(o){switch(o.label){case 0:return(r=e.pop())?[4,br(r,t)]:[2];case 1:return i=o.sent(),i instanceof Se||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}function li(t,e,n,r){var i=this;t||setTimeout((function(){return rt(i,void 0,void 0,(function(){var t,i;return it(this,(function(o){switch(o.label){case 0:return t=!0,[4,ci(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}}))}))}),5e3*Math.random())}function fi(t,e,n){var r,i,o,a,u=t.options.disableClientPersistence?new fr(t.queue.queue.maxAttempts,[]):new gr(t.queue.queue.maxAttempts,"dest-Segment.io"),s=null!==(r=null==e?void 0:e.apiHost)&&void 0!==r?r:"api.segment.io/v1",c=null!==(i=null==e?void 0:e.protocol)&&void 0!==i?i:"https",l="".concat(c,"://").concat(s),f="batching"===(null===(o=null==e?void 0:e.deliveryStrategy)||void 0===o?void 0:o.strategy)?ai(s,null===(a=null==e?void 0:e.deliveryStrategy)||void 0===a?void 0:a.config):{dispatch:function(t,e){return ui(t,{headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}};function p(r){return rt(this,void 0,void 0,(function(){var i,o;return it(this,(function(a){return te()?(u.push(r),li(false,u,d,li),[2,r]):(i=r.event.type.charAt(0),o=Xr(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,o)),[2,f.dispatch("".concat(l,"/").concat(i),be(t,o,e,n)).then((function(){return r})).catch((function(t){return"error"!==t.type&&"Failed to fetch"!==t.message||(u.push(r),li(false,u,d,li)),r}))])}))}))}var d={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:p,identify:p,page:p,alias:p,group:p};return d}var pi=function(t,e,n){n.getCalls(t).forEach((function(t){gi(e,t).catch(console.error)}))},di=function(t,e){return rt(void 0,void 0,void 0,(function(){var n,r,i;return it(this,(function(o){switch(o.label){case 0:n=0,r=e.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,gi(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},hi=pi.bind(globalThis,"on"),vi=pi.bind(globalThis,"setAnonymousId"),yi=function(){function t(){this._value={}}return t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this._value))},t.prototype.getCalls=function(t){var e;return null!==(e=this._value[t])&&void 0!==e?e:[]},t.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach((function(e){t._value[e.method]?t._value[e.method].push(e):t._value[e.method]=[e]})),this},t.prototype.clear=function(){return this._value={},this},t}();function gi(t,e){return rt(this,void 0,void 0,(function(){var n,r;return it(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,n=t[e.method].apply(t,e.args),mr(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return e.resolve(n),[3,4];case 3:return r=i.sent(),e.reject(r),[3,4];case 4:return[2]}}))}))}var mi=function(){function t(t){var e=this;this._preInitBuffer=new yi,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=pe,this._promise=t(this._preInitBuffer),this._promise.then((function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r})).catch((function(){}))}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){e._preInitBuffer.push({method:t,args:r,resolve:n,reject:i,called:!1})}))}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.push({method:t,args:r,resolve:function(){},reject:console.error,called:!1}),e)}},t}();function bi(t){var e=t[0],n=t.slice(1);return{method:e,resolve:function(){},reject:console.error,args:n,called:!1}}var wi=function(){var t=window.analytics;if(!Array.isArray(t))return[];var e=t.splice(0,t.length);return e.map(bi)};function xi(t,e){return rt(this,void 0,void 0,(function(){return it(this,(function(n){switch(n.label){case 0:return e.push.apply(e,wi()),[4,di(t,e)];case 1:return n.sent(),e.push.apply(e,wi()),function(t,e){e.toArray().forEach((function(e){setTimeout((function(){gi(t,e).catch(console.error)}),0)}))}(t,e),e.clear(),[2]}}))}))}function _i(t,e,n,r,i){var o,a,u;return rt(this,void 0,void 0,(function(){var s,c,l,f,p,d,h,v,y,g,m=this;return it(this,(function(b){switch(b.label){case 0:return function(t){var e,n,r;return"test"!==qr().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,st((function(){return L.import("./index-legacy.c10a590c.js")}),void 0).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return c=b.sent(),[3,3];case 2:c=void 0,b.label=3;case 3:return s=c,w=t,"test"!==qr().NODE_ENV&&Object.keys(w.integrations).length>1?[4,st((function(){return L.import("./index-legacy.211144f2.js")}),void 0).then((function(r){return r.ajsDestinations(t,e.integrations,n,s)}))]:[3,5];case 4:return f=b.sent(),[3,6];case 5:f=[],b.label=6;case 6:return l=f,t.legacyVideoPluginsEnabled?[4,st((function(){return L.import("./index-legacy.45d65bd6.js")}),void 0).then((function(t){return t.loadLegacyVideoPlugins(e)}))]:[3,8];case 7:b.sent(),b.label=8;case 8:return(null===(o=n.plan)||void 0===o?void 0:o.track)?[4,st((function(){return L.import("./index-legacy.631596f5.js")}),void 0).then((function(e){var r;return e.schemaFilter(null===(r=n.plan)||void 0===r?void 0:r.track,t)}))]:[3,10];case 9:return d=b.sent(),[3,11];case 10:d=void 0,b.label=11;case 11:return p=d,h=Vr(t,r),[4,ri(t,e.integrations,h,r.obfuscate,s).catch((function(){return[]}))];case 12:return v=b.sent(),y=ut(ut(ut([Vt,$r],i,!0),l,!0),v,!0),p&&y.push(p),!1===(null===(a=n.integrations)||void 0===a?void 0:a.All)&&!n.integrations["Segment.io"]||n.integrations&&!1===n.integrations["Segment.io"]||y.push(fi(e,h["Segment.io"],t.integrations)),[4,e.register.apply(e,y)];case 13:return g=b.sent(),Object.entries(null!==(u=t.enabledMiddleware)&&void 0!==u?u:{}).some((function(t){return t[1]}))?[4,st((function(){return L.import("./index-legacy.6ed29dcf.js")}),void 0).then((function(n){var i=n.remoteMiddlewares;return rt(m,void 0,void 0,(function(){var n,o;return it(this,(function(a){switch(a.label){case 0:return[4,i(g,t,r.obfuscate)];case 1:return n=a.sent(),o=n.map((function(t){return e.addSourceMiddleware(t)})),[2,Promise.all(o)]}}))}))}))]:[3,15];case 14:b.sent(),b.label=15;case 15:return[2,g]}var w}))}))}function Ii(t,e,n){var r,i,o,a,u,s;return void 0===e&&(e={}),rt(this,void 0,void 0,(function(){var c,l,f,p,d,h,v,y,g,m;return it(this,(function(b){switch(b.label){case 0:return t.cdnURL&&(I=t.cdnURL,window.analytics&&(window.analytics._cdn=I),Br=I),null===(r=t.cdnSettings)||void 0===r?[3,1]:(l=r,[3,3]);case 1:return[4,(w=t.writeKey,x=t.cdnURL,_=null!=x?x:Gr(),fe("".concat(_,"/v1/projects/").concat(w,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:l=b.sent(),b.label=3;case 3:return f=null===(o=null===(i=(c=l).integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,p=nt({retryQueue:f},e),d=new Rr(t,p),h=null!==(a=t.plugins)&&void 0!==a?a:[],Se.initMetrics(c.metrics),function(t,e){e.push.apply(e,wi()),vi(t,e),hi(t,e)}(d,n),[4,_i(c,d,p,e,h)];case 4:return v=b.sent(),y=null!==(u=window.location.search)&&void 0!==u?u:"",g=null!==(s=window.location.hash)&&void 0!==s?s:"",(m=y.length?y:g.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,d.queryString(m).catch(console.error)]:[3,6];case 5:b.sent(),b.label=6;case 6:return d.initialized=!0,d.emit("initialize",t,e),e.initialPageview&&d.page().catch(console.error),[4,xi(d,n)];case 7:return b.sent(),[2,[d,v]]}var w,x,_,I}))}))}var Si=function(t){function e(e){return t.call(this,e)||this}return et(e,t),e.load=function(t,e){return void 0===e&&(e={}),new this((function(n){return Ii(t,e,n)}))},e.standalone=function(t,n){return e.load({writeKey:t},n).then((function(t){return t[0]}))},e}(mi),Ci=new(function(){function t(){D(this,t),q(this,"analytics",void 0),this.analytics=Si.load({writeKey:"c0SISxJpICLXxstkrSppa4uxwYzBQbqf"})}return R(t,[{key:"trackPageLoad",value:function(){this.analytics.page()}},{key:"trackEvent",value:function(t,e){this.analytics.track(t,{event_data:e,environment:"production"})}}]),t}()),ki=function(t){return t.LC_VIEWED="LC-Viewed",t.LC_CATEGORY_CLICK="LC-Category-Clicked",t.LC_CATEGORY_VIEW="LC-Category-Viewed",t.LC_SCORE_CLICK="LC-Score-Clicked",t.LC_SCORE_VIEW="LC-Score-Viewed",t.LC_TRANSPORT_MODE_CLICK="LC-Transportation-Method-Clicked",t.LC_LONG_DESCRIPTION_CLICK="LC-Long-Description-Clicked",t.LC_LONG_DESCRIPTION_VIEW="LC-Long-Description-Viewed",t.LC_POI_CLICK="LC-POI-Clicked",t.LC_POI_VIEW="LC-POI-Viewed",t.LC_LIST_VIEW_CLICK="LC-List-View-Clicked",t.LC_MAP_VIEW_CLICK="LC-Map-View-Clicked",t.LC_SCORES_LIST_SCROLL="LC-Scores-List-Scroll",t.LC_COMMUTE_CALC_CLICK="LC-Commute-Calc-Clicked",t.LC_COMMUTE_CALC_VIEW="LC-Commute-Calc-Viewed",t.LC_COMMUTE_CALCULATE_CLICK="LC-Commute-Calc-Calculate-Clicked",t.LC_ATTRIBUTION_CLICK="LC-Attribution-Clicked",t}(ki||{}),Oi=ct.createContext({}),Pi=function(){return lt.exports.useContext(Oi)},ji=function(t,e){switch(e.type){case"CATEGORY":return N(N({},t),{},{activeCategory:e.value});case"SCORE":var n=dt.find((function(n){return""===e.value?n.value===t.activeCategory:n.scores.includes(e.value)})).value;return{activeCategory:n,activeScoreByCategory:N(N({},t.activeScoreByCategory),{},q({},n,e.value))}}},Mi=function(t){var e=t.children,n=window.innerWidth<ft.screenSizes.mobileL?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},r=A(lt.exports.useReducer(ji,n),2),i=r[0],o=r[1],a=A(lt.exports.useState(),2),u=a[0],s=a[1],c=A(lt.exports.useState(),2),l=c[0],f=c[1];lt.exports.useEffect((function(){u&&Ci.trackEvent(ki.LC_POI_VIEW,{poi_name:null==u?void 0:u.name,poi_info:null==u?void 0:u.address})}),[u]);var p=i.activeCategory;lt.exports.useEffect((function(){Ci.trackEvent(ki.LC_CATEGORY_VIEW,p)}),[p]);var d=i.activeScoreByCategory[p];lt.exports.useEffect((function(){""!==d&&Ci.trackEvent(ki.LC_SCORE_VIEW,d)}),[d]);var h=function(t){o({type:"SCORE",value:t})},v=function(t){o({type:"CATEGORY",value:t})},y=lt.exports.useMemo((function(){return{activeScore:d,setActiveScore:h,activeCategory:p,setActiveCategory:v,activePOI:u,setActivePOI:s,hoveredPOI:l,setHoveredPOI:f}}),[d,h,p,v,u,s,l,f]);return pt(Oi.Provider,{value:y,children:e})};function Ei(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Ai(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Li(t[0])||!Li(t[1]))throw new Error("coordinates must contain numbers");return Ei({type:"Point",coordinates:t},e,n)}function Li(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function Ti(t,e,n){if(null!==t)for(var r,i,o,a,u,s,c,l,f=0,p=0,d=t.type,h="FeatureCollection"===d,v="Feature"===d,y=h?t.features.length:1,g=0;g<y;g++){u=(l=!!(c=h?t.features[g].geometry:v?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var m=0;m<u;m++){var b=0,w=0;if(null!==(a=l?c.geometries[m]:c)){s=a.coordinates;var x=a.type;switch(f=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(s,p,g,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<s.length;r++){if(!1===e(s[r],p,g,b,w))return!1;p++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<s.length;r++){for(i=0;i<s[r].length-f;i++){if(!1===e(s[r][i],p,g,b,w))return!1;p++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(r=0;r<s.length;r++){for(w=0,i=0;i<s[r].length;i++){for(o=0;o<s[r][i].length-f;o++){if(!1===e(s[r][i][o],p,g,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Ti(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Fi(t){var e=[1/0,1/0,-1/0,-1/0];return Ti(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}Fi.default=Fi;var Ni=/^\s+|\s+$/g,Di=/^[-+]0x[0-9a-f]+$/i,zi=/^0b[01]+$/i,Ri=/^0o[0-7]+$/i,qi=parseInt,Bi="object"==B(ot)&&ot&&ot.Object===Object&&ot,Ui="object"==("undefined"==typeof self?"undefined":B(self))&&self&&self.Object===Object&&self,Gi=Bi||Ui||Function("return this")(),Vi=Object.prototype.toString,Ki=Math.max,Wi=Math.min,Ji=function(){return Gi.Date.now()};function Zi(t){var e=B(t);return!!t&&("object"==e||"function"==e)}function Hi(t){return"symbol"==B(t)||function(t){return!!t&&"object"==B(t)}(t)&&"[object Symbol]"==Vi.call(t)}function $i(t){if("number"==typeof t)return t;if(Hi(t))return NaN;if(Zi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ni,"");var n=zi.test(t);return n||Ri.test(t)?qi(t.slice(2),n?2:8):Di.test(t)?NaN:+t}var Yi=function(t,e,n){var r,i,o,a,u,s,c=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function h(t){return c=t,u=setTimeout(y,e),l?d(t):a}function v(t){var n=t-s;return void 0===s||n>=e||n<0||f&&t-c>=o}function y(){var t=Ji();if(v(t))return g(t);u=setTimeout(y,function(t){var n=e-(t-s);return f?Wi(n,o-(t-c)):n}(t))}function g(t){return u=void 0,p&&r?d(t):(r=i=void 0,a)}function m(){var t=Ji(),n=v(t);if(r=arguments,i=this,s=t,n){if(void 0===u)return h(s);if(f)return u=setTimeout(y,e),d(s)}return void 0===u&&(u=setTimeout(y,e)),a}return e=$i(e)||0,Zi(n)&&(l=!!n.leading,o=(f="maxWait"in n)?Ki($i(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),m.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=s=i=u=void 0},m.flush=function(){return void 0===u?a:g(Ji())},m};function Qi(){var t,e=ht().client,n=vt().sdkState,r=yt(n.options,250),i=Pi().activeScore,o=i?gt[i]:void 0,a=N(N({},lt.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{limit:10,radius:2e3,include:o});return T(F.list(a),E(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getPois(a));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!(a&&null!==(t=a.include)&&void 0!==t&&t.length&&a.lat&&a.lng)})}function Xi(){var t=ht().client,e=vt().sdkState,n=yt(e.options,250),r=Pi().activeScore,i="high_schools"===r||"primary_schools"===r,o=N(N({},lt.exports.useMemo((function(){return!(null==n||!n.marker)?n.marker:{lat:null==n?void 0:n.lat,lng:null==n?void 0:n.lng}}),[n])),{},{limit:10,radius:2e3});return T(z.list(o),E(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getSchools(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o&&!!o.lat&&!!o.lng&&i})}var to=ct.createContext({}),eo=function(){return lt.exports.useContext(to)},no=function(t){var e=t.children,n=t.mapRef,r=t.mapPadding;return pt(to.Provider,{value:{mapRef:n,mapPadding:r},children:e})};function ro(t,e,n,r,i,o){if(!(i-r<=n)){var a=r+i>>1;io(t,e,a,r,i,o%2),ro(t,e,n,r,a-1,o+1),ro(t,e,n,a+1,i,o+1)}}function io(t,e,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,u=n-r+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(u-a/2<0?-1:1);io(t,e,n,Math.max(r,Math.floor(n-u*c/a+l)),Math.min(i,Math.floor(n+(a-u)*c/a+l)),o)}var f=e[2*n+o],p=r,d=i;for(oo(t,e,r,n),e[2*i+o]>f&&oo(t,e,r,i);p<d;){for(oo(t,e,p,d),p++,d--;e[2*p+o]<f;)p++;for(;e[2*d+o]>f;)d--}e[2*r+o]===f?oo(t,e,r,d):oo(t,e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}function oo(t,e,n,r){ao(t,n,r),ao(e,2*n,2*r),ao(e,2*n+1,2*r+1)}function ao(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function uo(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}var so,co=function(t){return t[0]},lo=function(t){return t[1]},fo=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:co,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:lo,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;D(this,t),this.nodeSize=i,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,u=this.ids=new a(e.length),s=this.coords=new o(2*e.length),c=0;c<e.length;c++)u[c]=c,s[2*c]=n(e[c]),s[2*c+1]=r(e[c]);ro(u,s,i,0,u.length-1,0)}return R(t,[{key:"range",value:function(t,e,n,r){return function(t,e,n,r,i,o,a){for(var u,s,c=[0,t.length-1,0],l=[];c.length;){var f=c.pop(),p=c.pop(),d=c.pop();if(p-d<=a)for(var h=d;h<=p;h++)u=e[2*h],s=e[2*h+1],u>=n&&u<=i&&s>=r&&s<=o&&l.push(t[h]);else{var v=Math.floor((d+p)/2);u=e[2*v],s=e[2*v+1],u>=n&&u<=i&&s>=r&&s<=o&&l.push(t[v]);var y=(f+1)%2;(0===f?n<=u:r<=s)&&(c.push(d),c.push(v-1),c.push(y)),(0===f?i>=u:o>=s)&&(c.push(v+1),c.push(p),c.push(y))}}return l}(this.ids,this.coords,t,e,n,r,this.nodeSize)}},{key:"within",value:function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],u=[],s=i*i;a.length;){var c=a.pop(),l=a.pop(),f=a.pop();if(l-f<=o)for(var p=f;p<=l;p++)uo(e[2*p],e[2*p+1],n,r)<=s&&u.push(t[p]);else{var d=Math.floor((f+l)/2),h=e[2*d],v=e[2*d+1];uo(h,v,n,r)<=s&&u.push(t[d]);var y=(c+1)%2;(0===c?n-i<=h:r-i<=v)&&(a.push(f),a.push(d-1),a.push(y)),(0===c?n+i>=h:r+i>=v)&&(a.push(d+1),a.push(l),a.push(y))}}return u}(this.ids,this.coords,t,e,n,this.nodeSize)}}]),t}(),po={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},ho=Math.fround||(so=new Float32Array(1),function(t){return so[0]=+t,so[0]}),vo=function(){function t(e){D(this,t),this.options=Io(Object.create(po),e),this.trees=new Array(this.options.maxZoom+1)}return R(t,[{key:"load",value:function(t){var e=this.options,n=e.log,r=e.minZoom,i=e.maxZoom,o=e.nodeSize;n&&console.time("total time");var a="prepare ".concat(t.length," points");n&&console.time(a),this.points=t;for(var u=[],s=0;s<t.length;s++)t[s].geometry&&u.push(go(t[s],s));this.trees[i+1]=new fo(u,So,Co,o,Float32Array),n&&console.timeEnd(a);for(var c=i;c>=r;c--){var l=+Date.now();u=this._cluster(u,c),this.trees[c]=new fo(u,So,Co,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",c,u.length,+Date.now()-l)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),u=this.getClusters([-180,r,i,o],e);return a.concat(u)}var s,c=this.trees[this._limitZoom(e)],l=[],f=P(c.range(wo(n),xo(o),wo(i),xo(r)));try{for(f.s();!(s=f.n()).done;){var p=s.value,d=c.points[p];l.push(d.numPoints?mo(d):this.points[d.index])}}catch(wa){f.e(wa)}finally{f.f()}return l}},{key:"getChildren",value:function(t){var e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[e];if(!o)throw new Error(r);var a,u=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],c=P(i.within(o.x,o.y,u));try{for(c.s();!(a=c.n()).done;){var l=a.value,f=i.points[l];f.parentId===t&&s.push(f.numPoints?mo(f):this.points[f.index])}}catch(wa){c.e(wa)}finally{c.f()}if(0===s.length)throw new Error(r);return s}},{key:"getLeaves",value:function(t,e,n){e=e||10,n=n||0;var r=[];return this._appendLeaves(r,t,e,n,0),r}},{key:"getTile",value:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options,a=o.extent,u=o.radius/a,s=(n-u)/i,c=(n+1+u)/i,l={features:[]};return this._addTileFeatures(r.range((e-u)/i,s,(e+1+u)/i,c),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-u/i,s,1,c),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,s,u/i,c),r.points,-1,n,i,l),l.features.length?l:null}},{key:"getClusterExpansionZoom",value:function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}},{key:"_appendLeaves",value:function(t,e,n,r,i){var o,a=P(this.getChildren(e));try{for(a.s();!(o=a.n()).done;){var u=o.value,s=u.properties;if(s&&s.cluster?i+s.point_count<=r?i+=s.point_count:i=this._appendLeaves(t,s.cluster_id,n,r,i):i<r?i++:t.push(u),t.length===n)break}}catch(wa){a.e(wa)}finally{a.f()}return i}},{key:"_addTileFeatures",value:function(t,e,n,r,i,o){var a,u=P(t);try{for(u.s();!(a=u.n()).done;){var s=e[a.value],c=s.numPoints,l=void 0,f=void 0,p=void 0;if(c)l=bo(s),f=s.x,p=s.y;else{var d=this.points[s.index];l=d.properties,f=wo(d.geometry.coordinates[0]),p=xo(d.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(f*i-n)),Math.round(this.options.extent*(p*i-r))]],tags:l},v=void 0;c?v=s.id:this.options.generateId?v=s.index:this.points[s.index].id&&(v=this.points[s.index].id),void 0!==v&&(h.id=v),o.features.push(h)}}catch(wa){u.e(wa)}finally{u.f()}}},{key:"_limitZoom",value:function(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}},{key:"_cluster",value:function(t,e){for(var n=[],r=this.options,i=r.radius,o=r.extent,a=r.reduce,u=r.minPoints,s=i/(o*Math.pow(2,e)),c=0;c<t.length;c++){var l=t[c];if(!(l.zoom<=e)){l.zoom=e;var f,p=this.trees[e+1],d=p.within(l.x,l.y,s),h=l.numPoints||1,v=h,y=P(d);try{for(y.s();!(f=y.n()).done;){var g=f.value,m=p.points[g];m.zoom>e&&(v+=m.numPoints||1)}}catch(wa){y.e(wa)}finally{y.f()}if(v>h&&v>=u){var b,w=l.x*h,x=l.y*h,_=a&&h>1?this._map(l,!0):null,I=(c<<5)+(e+1)+this.points.length,S=P(d);try{for(S.s();!(b=S.n()).done;){var C=b.value,k=p.points[C];if(!(k.zoom<=e)){k.zoom=e;var O=k.numPoints||1;w+=k.x*O,x+=k.y*O,k.parentId=I,a&&(_||(_=this._map(l,!0)),a(_,this._map(k)))}}}catch(wa){S.e(wa)}finally{S.f()}l.parentId=I,n.push(yo(w/v,x/v,I,v,_))}else if(n.push(l),v>1){var j,M=P(d);try{for(M.s();!(j=M.n()).done;){var E=j.value,A=p.points[E];A.zoom<=e||(A.zoom=e,n.push(A))}}catch(wa){M.e(wa)}finally{M.f()}}}}return n}},{key:"_getOriginId",value:function(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function(t){return(t-this.points.length)%32}},{key:"_map",value:function(t,e){if(t.numPoints)return e?Io({},t.properties):t.properties;var n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?Io({},r):r}}]),t}();function yo(t,e,n,r,i){return{x:ho(t),y:ho(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function go(t,e){var n=A(t.geometry.coordinates,2),r=n[0],i=n[1];return{x:ho(wo(r)),y:ho(xo(i)),zoom:1/0,index:e,parentId:-1}}function mo(t){return{type:"Feature",id:t.id,properties:bo(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),_o(t.y)]}};var e}function bo(t){var e=t.numPoints,n=e>=1e4?"".concat(Math.round(e/1e3),"k"):e>=1e3?"".concat(Math.round(e/100)/10,"k"):e;return Io(Io({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function wo(t){return t/360+.5}function xo(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function _o(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function Io(t,e){for(var n in e)t[n]=e[n];return t}function So(t){return t.x}function Co(t){return t.y}var ko=Object.prototype.hasOwnProperty;function Oo(t,e,n){var r,i=P(t.keys());try{for(i.s();!(r=i.n()).done;)if(Po(n=r.value,e))return n}catch(wa){i.e(wa)}finally{i.f()}}function Po(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Po(t[r],e[r]););return-1===r}if(n===Set){if(t.size!==e.size)return!1;var o,a=P(t);try{for(a.s();!(o=a.n()).done;){if((i=r=o.value)&&"object"===B(i)&&!(i=Oo(e,i)))return!1;if(!e.has(i))return!1}}catch(wa){a.e(wa)}finally{a.f()}return!0}if(n===Map){if(t.size!==e.size)return!1;var u,s=P(t);try{for(s.s();!(u=s.n()).done;){if((i=(r=u.value)[0])&&"object"===B(i)&&!(i=Oo(e,i)))return!1;if(!Po(r[1],e.get(i)))return!1}}catch(wa){s.e(wa)}finally{s.f()}return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return-1===r}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return-1===r}if(!n||"object"===B(t)){for(n in r=0,t){if(ko.call(t,n)&&++r&&!ko.call(e,n))return!1;if(!(n in e)||!Po(t[n],e[n]))return!1}return Object.keys(e).length===r}}return t!=t&&e!=e}function jo(t,e){return lt.exports.useEffect(t,(n=e,r=lt.exports.useRef(n),i=lt.exports.useRef(0),Po(n,r.current)||(r.current=n,i.current+=1),lt.exports.useMemo((function(){return r.current}),[i.current])));var n,r,i}var Mo=mt.div(t||(t=O(["\n border-radius: 50%;\n background: linear-gradient(\n to top,\n ",",\n ","\n );\n color: ",";\n height: ","px;\n width: ","px;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n font-family: ",";\n font-size: ","px;\n border: 2px solid #fff;\n box-shadow: ",";\n cursor: default;\n"])),bt["--ll-color-primary-variant1"],bt["--ll-color-primary"],bt["--ll-color-on-primary"],(function(t){return t.diameter}),(function(t){return t.diameter}),bt["--ll-font-family"],(function(t){return t.diameter/2.5}),bt["--ll-shadow-small"]),Eo=function(t){var e=t.cluster,n=t.pointsCount,r=t.onClick,i=e.properties.point_count;return pt(Mo,{diameter:20+i/n*25,onClick:function(){return r&&r(e)},children:e.properties.point_count})};var Ao=ct.memo((function(t){var e,n=t.rect,r=t.zoom,i=t.mapRef,o=t.points,a=t.isMobile,u=t.activePOI,s=t.hoveredPOI,c=t.isMapMoving,l=t.setActivePOI,f=null==i||null===(e=i.current)||void 0===e?void 0:e.getMap().getBounds().toArray().flat(),p=function(t){var e=t.points,n=t.bounds,r=t.zoom,i=t.options,o=lt.exports.useRef(),a=lt.exports.useRef(),u=lt.exports.useState([]),s=u[0],c=u[1],l=Math.round(r);return jo((function(){o.current&&Po(a.current,e)&&Po(o.current.options,i)||(o.current=new vo(i),o.current.load(e)),n&&c(o.current.getClusters(n,l)),a.current=e}),[e,n,l,i]),{clusters:s,supercluster:o.current}}({points:o,bounds:f,zoom:r,options:{radius:50,maxZoom:18}}),d=p.clusters,h=p.supercluster;return pt(wt,{children:d.map((function(t,e){var r=A(t.geometry.coordinates,2),f=r[0],p=r[1];if(function(t){return void 0!==t.properties.cluster}(t))return pt(U,{latitude:p,longitude:f,children:pt(Eo,{cluster:t,pointsCount:o.length,onClick:function(){var e,n=Math.min(h.getClusterExpansionZoom(t.id),20);null===(e=i.current)||void 0===e||e.flyTo({zoom:n,center:[f,p],duration:1e3,essential:!0})}})},"cluster-".concat(t.id));var d=t.properties,v=d.poi,y=d.type,g=u===v,m=s===v;return pt(U,{latitude:v.lat,longitude:v.lng,style:{zIndex:g?1:0},children:xt(_t.Root,{options:{type:y,poi:v,isOpen:!c&&g,isHovered:m,side:"top",size:["rapid_transit_stations"].includes(y)?"medium":"small",collisionPadding:a?{top:n.height+32,bottom:2*It,left:2*It,right:2*It}:{left:n.width+32,right:2*It,top:2*It,bottom:2*It}},onChange:function(t){"open-change"===t.type&&(t.data?setTimeout((function(){l(v)}),0):g&&l(void 0))},children:[pt(_t.Marker,{}),pt(_t.Content,{})]})},"".concat(v.name,"-").concat(v.lat,"-").concat(v.lng,"-").concat(e))}))})}));Ao.displayName="Markers";var Lo=function(t){return lt.exports.createElement("svg",N({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),lt.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"}))},To=function(t){return lt.exports.createElement("svg",N({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),lt.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))};function Fo(t){var e=ht().client,n=vt().sdkState,r=yt(n.options,250),i=N(N({},lt.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{geographyLevels:["20","30"],locationScoresRounding:!1,include:t});return T(G.list(i),E(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getScores(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i})}var No=mt.div(e||(e=O(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),bt["--ll-spacing-small"],bt["--ll-spacing-medium"],bt["--ll-color-surface"]),Do=mt.div(n||(n=O(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),bt["--ll-spacing-medium"],bt["--ll-spacing-medium"]),zo=function(){var t,e,n=vt().sdkState,r=Pi(),i=r.activeCategory,o=r.activeScore,a=Fo(dt.find((function(t){return t.value===i})).scores),u=a.data,s=a.isLoading;return o&&null!=u&&u.location[o]?s?pt("div",{children:"Loading"}):pt(St.Root,{options:{score:o,scoresData:u},children:xt(No,{children:[xt(Do,{children:[pt(St.Badge,{}),pt(St.BarChart,{options:{locationIcon:"pin"===(null===(t=n.options)||void 0===t||null===(e=t.marker)||void 0===e?void 0:e.icon)?Lo:To}})]}),pt(St.Description,{})]})}):null},Ro=mt.div(r||(r=O(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),bt["--ll-spacing-x-small"],bt["--ll-spacing-medium"]),qo=mt.button(i||(i=O(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: none;\n border: none;\n min-width: 60px;\n padding: 0;\n margin: 0 8px;\n flex-shrink: 0;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:last-child {\n margin-right: 0;\n }\n"]))),Bo=mt.div(o||(o=O(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),bt["--ll-color-background"]),Uo=mt.div(a||(a=O(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),Go=mt.div(u||(u=O(["\n margin: 0 2px;\n"]))),Vo=function(t){var e=t.category,n=Fo(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Pi(),u=a.activeScore,s=a.setActiveScore,c=a.setActiveCategory;return pt(Ro,{children:e.scores.map((function(t){var n=t===u,a=n?"--ll-color-primary":"--ll-color-disabled";return i||o?pt(Go,{children:pt(Ct,{height:"44px",width:"60px"})},t):pt(St.Root,{options:{score:t,scoresData:r},children:xt(qo,{onClick:function(){c(e.value),s(t)},children:[pt(St.Icon,{options:{color:a,height:28,width:28}}),pt(Uo,{children:pt(St.Title,{options:{variant:"caption1",color:a,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),pt(Bo,{children:pt(St.Badge,{options:{variant:"small",isPrimary:n}})})]})},t)}))})},Ko=mt.div(s||(s=O(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),bt["--ll-spacing-x-small"],bt["--ll-spacing-medium"],bt["--ll-spacing-xx-small"],bt["--ll-spacing-medium"]),Wo=mt.div(c||(c=O(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),bt["--ll-color-background"],bt["--ll-color-border"]),Jo=ct.forwardRef((function(t,e){var n=Pi(),r=n.activeCategory,i=n.setActiveCategory;return xt(Wo,{ref:e,children:[pt(Ko,{children:xt(kt.Root,{value:r,onValueChange:function(t){return i(t)},children:[pt(kt.Trigger,{size:"large",children:pt(Ot.Root,{options:{scoreCategory:r},children:pt(Ot.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),pt(kt.Content,{children:dt.map((function(t){return pt(Ot.Root,{options:{scoreCategory:t.value},children:pt(kt.Item,{value:t.value,children:pt(Ot.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},t.value)}))})]})}),pt(Vo,{category:dt.find((function(t){return t.value===r}))}),pt(zo,{})]})}));Jo.displayName="MobileScores";var Zo=Pt({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),Ho=Pt({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),$o=mt(V)(l||(l=O(["\n margin: 0;\n z-index: 1;\n position: relative;\n margin: 0 calc(-1 * ",");\n padding: 0 ",";\n\n &:hover {\n background-color: ",";\n box-shadow: ",";\n }\n"])),bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],bt["--ll-color-surface"],bt["--ll-shadow-small"]),Yo=mt(K)(f||(f=O(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),bt["--ll-spacing-x-small"]),Qo=mt(W)(p||(p=O(["\n background-color: ",";\n position: relative;\n overflow: hidden;\n margin-left: calc(-1 * ",");\n margin-right: calc(-1 * ",');\n\n [data-state="open"] & {\n animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n [data-state="closed"] & {\n animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n"])),bt["--ll-color-surface"],bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],Zo,Ho),Xo=mt.div(d||(d=O(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),bt["--ll-spacing-medium"],bt["--ll-color-border"],bt["--ll-color-border"]),ta=mt.span(h||(h=O(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),Yo);mt.div(v||(v=O(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var ea=mt.div(y||(y=O(["\n margin: "," 0;\n"])),bt["--ll-spacing-small"]),na=mt.div(g||(g=O(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),bt["--ll-spacing-large"]),ra=function(t){var e=t.score,n=Xi(),r=n.data,i=n.isLoading,o=Pi(),a=o.activePOI,u=o.setActivePOI,s=o.hoveredPOI,c=o.setHoveredPOI,l=eo(),f=l.mapRef,p=l.mapPadding;return i?pt(wt,{children:k(Array(10)).map((function(t,e){return pt(ea,{children:pt(Ct,{height:"34px",width:"100%"})},e)}))}):r?pt(jt.Root,{options:{type:"school",data:null==r?void 0:r[e],activePOI:a,hoveredPOI:s},onChange:function(t){if("poi-click"===t.type){var e=t.data;u(e);var n,r=window.innerWidth-p.left,i=window.innerWidth/2,o=r/2+p.left-i;if(e)null===(n=f.current)||void 0===n||n.easeTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[o,0]})}"poi-hover"===t.type&&c(t.data)}}):null},ia=ct.memo((function(t){var e=t.result,n=t.poi,r=Pi(),i=r.activePOI,o=r.setActivePOI,a=r.hoveredPOI,u=r.setHoveredPOI,s=eo(),c=s.mapRef,l=s.mapPadding;return e.data&&e.data[n]?pt(Mt.Content,{options:{value:n},children:pt(jt.Root,{options:{type:"poi",data:e.data[n],activePOI:i,hoveredPOI:a},onChange:function(t){if("poi-click"===t.type){var e=t.data;o(e);var n,r=window.innerWidth-l.left,i=window.innerWidth/2,a=r/2+l.left-i;if(e)null===(n=c.current)||void 0===n||n.flyTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===t.type&&u(t.data)}})},n):null}));ia.displayName="POI";var oa=ct.memo((function(t){var e=t.include,n=Qi();return n.isLoading&&e.length?pt(wt,{children:k(Array(10)).map((function(t,e){return pt(ea,{children:pt(Ct,{height:"34px",width:"100%"})},e)}))}):n.data?xt(Mt.Root,{options:{include:e},children:[pt(Mt.Tabs,{}),e.map((function(t){return pt(ia,{poi:t,result:n},t)}))]}):null}));oa.displayName="POIs";var aa=ct.memo((function(t){var e,n,r=t.score,i=t.isLoading,o=t.scoresData,a=vt().sdkState,u=Pi().activeScore,s=r===u;return i?pt(ea,{children:pt(Ct,{height:"34px",width:"100%"},r)}):null!=o&&o.location[r]?pt(J,{value:r,children:xt(St.Root,{options:{score:r,scoresData:o},onChange:function(t){"tooltip-toggle"===t.type&&t.data&&Ci.trackEvent(ki.LC_LONG_DESCRIPTION_VIEW,r)},children:[pt($o,{children:xt(Yo,{children:[pt(ta,{children:pt(Et,{SVGElement:Z,fill:bt["--ll-color-on-background-variant1"]})}),pt(At,{spacing:"--ll-spacing-small"}),pt(St.Icon,{}),pt(At,{spacing:"--ll-spacing-small"}),pt(St.Title,{}),pt(At,{}),pt(St.Badge,{options:{isPrimary:s}})]})}),pt(Qo,{children:xt(Xo,{children:[pt(St.Description,{}),pt(At,{vertical:!0,spacing:"--ll-spacing-small"}),pt(St.BarChart,{options:{locationIcon:"pin"===(null===(e=a.options)||void 0===e||null===(n=e.marker)||void 0===n?void 0:n.icon)?Lo:To}}),pt(na,{children:"high_schools"===r||"primary_schools"===r?pt(ra,{score:r}):pt(oa,{include:gt[r]})})]})})]})},r):null}));aa.displayName="Score";var ua=mt.div(m||(m=O(["\n padding: "," ",";\n"])),bt["--ll-spacing-small"],bt["--ll-spacing-medium"]),sa=mt.div(b||(b=O(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),ca=ct.memo((function(t){var e=t.tabContent,n=Fo(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Lt().translations;return xt(ua,{children:[xt(sa,{children:[pt(Tt.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),o&&!i&&pt(Ft,{size:"small"})]}),pt(At,{spacing:"--ll-spacing-small",vertical:!0}),!o&&!Object.keys((null==r?void 0:r.location)||{}).length&&pt(Nt,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),e.scores.map((function(t){return pt(aa,{score:t,isLoading:i,scoresData:r},t)}))]})}));ca.displayName="ScoreCategory";var la=ct.memo((function(t){var e=t.tabContent,n=Pi(),r=n.activeScore,i=n.setActiveScore;return lt.exports.useEffect((function(){i(e.scores[0])}),[]),pt(H,{value:r,onValueChange:function(t){i(t)},type:"single",collapsible:!0,children:pt(ca,{tabContent:e})})}));la.displayName="ScoreCategoryAccordion";var fa=mt.div(w||(w=O(["\n overflow-y: auto;\n"]))),pa=mt.div(x||(x=O(["\n position: absolute;\n top: ",";\n left: ",";\n width: 360px;\n max-height: calc(100% - 2 * ",");\n z-index: 1;\n border-radius: ",";\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n background-color: #fff;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],bt["--ll-spacing-medium"],bt["--ll-border-radius-medium"],bt["--ll-color-background"],bt["--ll-color-border"]);mt.div(_||(_=O(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),bt["--ll-spacing-small"]);var da=mt.div(I||(I=O(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),bt["--ll-spacing-xx-small"],bt["--ll-color-border"]),ha=mt.div(S||(S=O(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),bt["--ll-spacing-small"],bt["--ll-color-background"]),va=function(){return pt(ha,{children:pt(Dt.Root,{})})},ya=ct.forwardRef((function(t,e){var n=Pi(),r=n.activeCategory,i=n.setActiveCategory;return pt(Tt.Root,{options:{currentTab:r},onChange:function(t){i(t.data)},children:xt(pa,{ref:e,children:[pt(da,{children:pt(Tt.Tabs,{})}),pt(fa,{children:dt.map((function(t){return pt(Tt.Content,{options:{value:t.value},children:pt(la,{tabContent:t},t.value)},t.value)}))}),pt(va,{})]})})}));ya.displayName="DesktopScores";var ga=mt.div(C||(C=O(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),ma=function(){var t,e,n,r=vt(),i=r.sdkState,o=r.setSdkState,a=Pi(),u=a.activeScore,s=a.activePOI,c=a.setActivePOI,l=a.hoveredPOI,f=function(){var t=A(lt.exports.useState(!1),2),e=t[0],n=t[1];return lt.exports.useLayoutEffect((function(){var t=function(){n(window.innerWidth<ft.screenSizes.mobileL)};return window.addEventListener("resize",Yi(t,250)),t(),function(){return window.removeEventListener("resize",t)}}),[]),e}(),p=Qi(),d=Xi(),h="night"===(null==i||null===(t=i.globalOptions)||void 0===t||null===(e=t.appearance)||void 0===e?void 0:e.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",v=A(lt.exports.useState(!1),2),y=v[0],g=v[1],m=lt.exports.useMemo((function(){var t,e;return"high_schools"!==u&&"primary_schools"!==u||d.isFetching?gt&&u&>[u]&&null!==(t=gt[u])&&void 0!==t&&t.length||p.isFetching?p.data:q({},u,[]):q({},u,(null==d||null===(e=d.data)||void 0===e?void 0:e[u])||[])}),[p.data,d.data,u]),b=lt.exports.useMemo((function(){return m?Object.entries(m).map((function(t){var e=A(t,2),n=e[0];return e[1].map((function(t){return Ai([t.lng,t.lat],{poi:t,type:n})}))})).flat().filter((function(t,e,n){return n.findIndex((function(e){return["lat","lng","name"].every((function(n){return e.properties.poi[n]===t.properties.poi[n]}))}))===e})):[]}),[m]),w=lt.exports.useMemo((function(){var t,e,n,r=(null==i||null===(t=i.options)||void 0===t?void 0:t.marker)&&Ai([null==i||null===(e=i.options)||void 0===e?void 0:e.marker.lng,null==i||null===(n=i.options)||void 0===n?void 0:n.marker.lat]);return[].concat(k(b),k(r?[r]:[]))}),[b,null==i||null===(n=i.options)||void 0===n?void 0:n.marker]),x=lt.exports.useRef(),_=A($(),2),I=_[0],S=_[1],C=lt.exports.useMemo((function(){return{top:25+S.height,bottom:25,left:25,right:25}}),[S.height]),O=lt.exports.useMemo((function(){return{top:50,bottom:50,left:S.width+32+50,right:50}}),[S.width]),P=f?C:O;return lt.exports.useEffect((function(){var t,e;if(w.length&&null!==(t=i.options)&&void 0!==t&&t.marker){var n,r,o,a=A(Fi((n=w.map((function(t){var e=t.geometry;return[e.coordinates[1],e.coordinates[0]]})),void 0===o&&(o={}),Ei({type:"MultiPoint",coordinates:n},r,o))),4),u=a[0],s=a[1],c=a[2],l=a[3];null==x||null===(e=x.current)||void 0===e||e.fitBounds([[s,u],[l,c]],{maxZoom:17,padding:P,duration:1e3})}}),[w,P]),i.options?pt(no,{mapRef:x,mapPadding:P,children:xt(ga,{children:[xt(Y,{ref:x,mapLib:Q,latitude:i.options.lat,longitude:i.options.lng,zoom:i.options.zoom,pitch:i.options.pitch,bearing:i.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(h,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(t){o(N(N({},i),{},{options:N(N({},i.options),{},{lat:t.viewState.latitude,lng:t.viewState.longitude,zoom:t.viewState.zoom,bearing:t.viewState.bearing,pitch:t.viewState.pitch})}))},cooperativeGestures:i.options.cooperativeGestures,onMoveStart:function(){return g(!0)},onMoveEnd:function(){return g(!1)},children:[pt(X,{showCompass:!0,style:{marginTop:f?16+S.height:16,marginRight:16}}),i.options.marker&&pt(tt,{marker:i.options.marker}),pt(Ao,{rect:S,zoom:i.options.zoom,mapRef:x,points:b,isMobile:f,activePOI:s,hoveredPOI:l,isMapMoving:y,setActivePOI:c}),pt(f?Jo:ya,{ref:I})]}),f&&pt(va,{})]})}):pt("div",{children:"No options provided."})},ba=Object.freeze(Object.defineProperty({__proto__:null,default:function(){return Ci.trackPageLoad(),pt(Mi,{children:pt(ma,{})})}},Symbol.toStringTag,{value:"Module"}));M("q",ba)}}}))}();
|