@ledgerhq/connect-kit 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +3 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/umd/index.js
CHANGED
@@ -170,7 +170,7 @@ t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,h=
|
|
170
170
|
color: #BBB0FF;
|
171
171
|
cursor: pointer;
|
172
172
|
`;var gt=function(e,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},gt(e,t)};function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}gt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var vt=function(){return vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vt.apply(this,arguments)};function mt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function _t(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function bt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var wt=function(){function e(){this.callbacks={}}return e.prototype.on=function(e,t){return this.callbacks[e]?this.callbacks[e].push(t):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!==(n=this.callbacks[e])&&void 0!==n?n:[]).filter((function(e){return e!==t}));return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach((function(e){e.apply(n,r)})),this},e}(),Et=function(e,t){return Et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Et(e,t)};function St(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Et(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ot=function(){return Ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ot.apply(this,arguments)};function xt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function It(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function Rt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function kt(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}"function"==typeof SuppressedError&&SuppressedError;var Ct=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return St(t,e),t}(Error);function Pt(e){return"string"==typeof e}function At(e){return"number"==typeof e}function Nt(e){return"function"==typeof e}function Tt(e){return null!=e}function Mt(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var Lt="is not a string",jt="is not an object",Ut="is nil";function Dt(e,t){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),t);e.then((function(e){return clearTimeout(i),n(e)})).catch(r)}))}function zt(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return Dt(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)})).catch((function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")})).then((function(){return e}))}for(var Ft,Bt="onRemoveFromFuture",Ht=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return St(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map((function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)}));return this.queue=this.queue.sort((function(t,n){return e.getAttempts(t)-e.getAttempts(n)})),r},t.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var n=this.updateAttempts(e);if(n>this.maxAttempts||this.includes(e))return!1;var r=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,o=void 0===i?2:i,s=e.attempt,a=e.maxTimeout,u=void 0===a?1/0:a;return Math.min(t*r*Math.pow(o,s),u)}({attempt:n-1});return setTimeout((function(){t.queue.push(e),t.future=t.future.filter((function(t){return t.id!==e.id})),t.emit(Bt)}),r),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find((function(t){return t.id===e.id})))||Boolean(this.future.find((function(t){return t.id===e.id})))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(wt),qt=256,Vt=[];qt--;)Vt[qt]=(qt+256).toString(16).substring(1);function $t(){var e,t=0,n="";if(!Ft||qt+16>256){for(Ft=Array(t=256);t--;)Ft[t]=256*Math.random()|0;t=qt=0}for(;t<16;t++)e=Ft[qt+t],n+=6==t?Vt[15&e|64]:8==t?Vt[63&e|128]:Vt[e],1&t&&t>1&&t<11&&(n+="-");return qt++,n}var Wt=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce((function(e,t){var n,r,i,o=Ot(Ot({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete o.time;var s=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),Ot(Ot({},e),((n={})[s]=o,n))}),{});console.table?console.table(e):console.log(e)}else this.logs.forEach((function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")}));this._logs=[]},e}(),Kt=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map((function(e){return Ot(Ot({},e),{tags:e.tags.join(",")})}));console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map((function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t}))},e}(),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Kt),Yt=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},Qt=function(){function e(e,t,n,r){void 0===t&&(t=$t()),void 0===n&&(n=new Gt),void 0===r&&(r=new Wt),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new Yt({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return kt(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function Jt(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];if(void 0===r)return Promise.resolve(e);var i=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}}))}))}((function(){return r.apply(t,[e])})).then((function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e})).catch((function(n){if(n instanceof Yt&&"middleware_cancellation"===n.type)throw n;return n instanceof Yt?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)}));return i}function Xt(e,t){return Jt(e,t).then((function(t){if(t instanceof Qt)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var Zt=function(e){function t(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,o=e();return"object"==typeof(t=o)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(Bt,(function(){o.scheduleFlush(0)})),o}return St(t,e),t.prototype.register=function(e,t,n){return xt(this,void 0,void 0,(function(){var r=this;return It(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(t.load(e,n)).then((function(){r.plugins.push(t)})).catch((function(n){if("destination"===t.type)return r.failedInitializations.push(t.name),console.warn(t.name,n),void e.log("warn","Failed to load destination",{plugin:t.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},t.prototype.deregister=function(e,t,n){return xt(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]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(e){return e.name!==t.name})),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}}))}))},t.prototype.dispatch=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]}))}))},t.prototype.subscribeToDelivery=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)}))]}))}))},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout((function(){t.flush().then((function(){setTimeout((function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)}),0)}))}),e))},t.prototype.deliver=function(e){return xt(this,void 0,void 0,(function(){var t,n,r,i;return It(this,(function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=o.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},t.prototype.enqueuRetry=function(e,t){return!(e instanceof Yt&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return xt(this,void 0,void 0,(function(){var e,t;return It(this,(function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t,n,r=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(o=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),i=(t="type",n={},r.forEach((function(e){var r,i=void 0;if("string"==typeof t){var o=e[t];i="string"!=typeof o?JSON.stringify(o):o}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=Rt(Rt([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n),o=i.before,s=void 0===o?[]:o,a=i.enrichment,u=void 0===a?[]:a,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:s,enrichment:u,destinations:l,after:void 0===f?[]:f}},t.prototype.flushOne=function(e){var t,n;return xt(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,l,f,h,d,p,g,y;return It(this,(function(v){switch(v.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,o=r.enrichment,s=0,a=i,v.label=1;case 1:return s<a.length?(u=a[s],[4,Xt(e,u)]):[3,4];case 2:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,u),v.label=3;case 3:return s++,[3,1];case 4:c=0,l=o,v.label=5;case 5:return c<l.length?(f=l[c],[4,Jt(e,f)]):[3,8];case 6:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,f),v.label=7;case 7:return c++,[3,5];case 8:return d=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),p=d.destinations,g=d.after,[4,new Promise((function(t,n){setTimeout((function(){var r=p.map((function(t){return Jt(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return v.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=g.map((function(t){return Jt(e,t)})),[4,Promise.all(y)];case 10:return v.sent(),[2,e]}}))}))},t}(wt);function en(e,t,n,r){return xt(this,void 0,void 0,(function(){var i,o;return It(this,(function(s){switch(s.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=s.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=s.sent(),s.label=4;case 4:return(null==r?void 0:r.callback)?[4,zt(o,r.callback,(a=i,u=r.timeout,c=Date.now()-a,Math.max((null!=u?u:300)-c,0)))]:[3,6];case 5:o=s.sent(),s.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}var a,u,c}))}))}function tn(e,t,n,r){var i,o=[e,t,n,r],s=Mt(e)?e.event:e;if(!s||!Pt(s))throw new Error("Event missing");var a=Mt(e)?null!==(i=e.properties)&&void 0!==i?i:{}:Mt(t)?t:{},u={};return Nt(n)||(u=null!=n?n:{}),Mt(e)&&!Nt(t)&&(u=null!=t?t:{}),[s,a,u,o.find(Nt)]}function nn(e,t,n,r,i){var o,s,a=null,u=null,c=[e,t,n,r,i],l=c.filter(Pt);void 0!==l[0]&&void 0!==l[1]&&(a=l[0],u=l[1]),1===l.length&&(a=null,u=l[0]);var f=c.find(Nt),h=c.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),d=null!==(o=h[0])&&void 0!==o?o:{},p=null!==(s=h[1])&&void 0!==s?s:{};return[a,u,d,p,f]}var rn=function(e){return function(){for(var t,n,r,i,o,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u;u=null!==(r=null!==(t=s.find(Pt))&&void 0!==t?t:null===(n=s.find(At))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var c=s.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),l=null!==(i=c[0])&&void 0!==i?i:{},f=null!==(o=c[1])&&void 0!==o?o:{},h=s.find(Nt);return[u,l,f,h]}};function on(e,t,n,r){At(e)&&(e=e.toString()),At(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(Pt),s=o[0],a=void 0===s?e:s,u=o[1],c=void 0===u?null:u,l=i.filter(Mt)[0];return[a,c,void 0===l?{}:l,i.find(Nt)]}function sn(){return"undefined"!=typeof window}function an(){return!sn()}function un(){return!sn()||window.navigator.onLine}function cn(){return!un()}function ln(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){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:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)}))}var fn=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},hn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=fn();return(n&&n.fetch||ln).apply(void 0,e)},dn="1.53.3";/*! js-cookie v3.0.1 | MIT */
|
173
|
-
function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=pn({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",pn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,pn({},this.attributes,t))},withConverter:function(t){return e(pn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function vn(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(gn.set(i,"1",s),gn.get(i))return gn.remove(i,s),o}catch(e){return}}}function mn(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var _n={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},bn=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},Object.defineProperty(e.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),e}(),wn=function(e){function t(n){void 0===n&&(n=t.defaults);var r=e.call(this)||this;return r.options=vt(vt({},t.defaults),n),r}return yt(t,e),t.available=function(){try{var e="ajs_cookies_check";gn.set(e,"test");var t=document.cookie.includes(e);return gn.remove(e),t}catch(e){return!1}},Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:vn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(e){try{var t=gn.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(e){return null}},t.prototype.set=function(e,t){"string"==typeof t?gn.set(e,t,this.opts()):null===t?gn.remove(e,this.opts()):gn.set(e,JSON.stringify(t),this.opts())},t.prototype.remove=function(e){return gn.remove(e,this.opts())},Object.defineProperty(t.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),t}(bn),En=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.available=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t.prototype.get=function(e){try{var t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(t){return En(e,"unavailable"),null}},t.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){En(e,"full")}},t.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){En(e,"unavailable")}},Object.defineProperty(t.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),t}(bn),On=function(){function e(e,t){this.storageOptions=t,this.enabledStores=e}return e.prototype.getStores=function(e){var t=this,n=[];return this.enabledStores.filter((function(t){return!e||(null==e?void 0:e.includes(t))})).forEach((function(e){var r=t.storageOptions[e];void 0!==r&&n.push(r)})),n},e.prototype.getAndSync=function(e,t){var n=this.get(e,t),r="number"==typeof n?n.toString():n;return this.set(e,r,t),r},e.prototype.get=function(e,t){for(var n=null,r=0,i=this.getStores(t);r<i.length;r++){if(n=i[r].get(e))return n}return null},e.prototype.set=function(e,t,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(e,t)}},e.prototype.clear=function(e,t){for(var n=0,r=this.getStores(t);n<r.length;n++){r[n].remove(e)}},e}();function xn(e){return{cookie:wn.available()?new wn(e):void 0,localStorage:Sn.available()?new Sn:void 0,memory:new bn}}var In,Rn=function(){function e(e,t){void 0===e&&(e=_n);var n,r,i,o,s=this;this.options={},this.id=function(e){if(s.options.disable)return null;var t=s.identityStore.getAndSync(s.idKey);void 0!==e&&(s.identityStore.set(s.idKey,e),e!==t&&null!==t&&null!==e&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_n.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(s.options.disable)return null;if(void 0===e){var r=null!==(t=s.identityStore.getAndSync(s.anonKey))&&void 0!==t?t:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=e?e:$t()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(e){var t;if(!s.options.disable)return null===e&&(e={}),e&&s.traitsStore.set(s.traitsKey,null!=e?e:{}),null!==(t=s.traitsStore.get(s.traitsKey))&&void 0!==t?t:{}},this.options=e,this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:_n.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:_n.localStorage.key,this.anonKey="ajs_anonymous_id";var a=!0===e.disable,u=!1!==e.persist,c=a?[]:u?["localStorage","cookie","memory"]:["memory"],l=xn(t);e.localStorageFallbackDisabled&&(c=c.filter((function(e){return"localStorage"!==e}))),this.identityStore=new On(c,l),this.legacyUserStore=new On(c.filter((function(e){return"localStorage"!==e&&"memory"!==e})),l),this.traitsStore=new On(c.filter((function(e){return"cookie"!==e})),l);var f=this.legacyUserStore.get(_n.cookie.oldKey);f&&"object"==typeof f&&(f.id&&this.id(f.id),f.traits&&this.traits(f.traits)),mn(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=vt(vt({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_n,e}(),kn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Cn=function(e){function t(t,n){void 0===t&&(t=kn);var r=e.call(this,t,n)||this;return r.anonymousId=function(e){},mn(r),r}return yt(t,e),t}(Rn);var Pn="npm";function An(){return Pn}function Nn(e,t,n){var r=new On(n?[]:["cookie"],xn(function(){if(In)return In;var e=vn(window.location.href);return In={expires:31536e6,secure:!1,path:"/"},e&&(In.domain=e),In}())),i=r.get("s:context.referrer"),o=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=vt(vt({},t.referrer),o)),r.set("s:context.referrer",o))}function Tn(e,t,n,r){var i,o,s,a,u,c,l=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var f=t.context,h="string"==typeof(null===(s=f.page)||void 0===s?void 0:s.search)?null===(a=f.page)||void 0===a?void 0:a.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,f.userAgent=navigator.userAgent;var d=navigator.userLanguage||navigator.language;if(void 0===f.locale&&void 0!==d&&(f.locale=d),!f.library){var p=An();f.library="web"===p?{name:"analytics.js",version:"next-".concat(dn)}:{name:"analytics.js",version:"npm:next-".concat(dn)}}h&&!f.campaign&&(f.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.substr(4);"campaign"===s&&(s="name"),e[s]=yn(o)}return e}),{})}(h)),Nn(h,f,null!==(u=e.options.disableClientPersistence)&&void 0!==u&&u),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var g=e.queue.failedInitializations||[];g.length>0&&(t._metadata={failedInitializations:g});var y=[],v=[];for(var m in r){var _=r[m];"Segment.io"===m&&y.push(m),"bundled"===_.bundlingStatus&&y.push(m),"unbundled"===_.bundlingStatus&&v.push(m)}for(var b=0,w=(null==n?void 0:n.unbundledIntegrations)||[];b<w.length;b++){var E=w[b];v.includes(E)||v.push(E)}var S=null!==(c=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==c?c:{},O=[];y.sort().forEach((function(e){var t;(null!==(t=S[e])&&void 0!==t?t:[]).forEach((function(e){O.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=vt(vt({},t._metadata),{bundled:y.sort(),unbundled:v.sort(),bundledIds:O}));var x=function(){var e=gn.get("_ga");if(e&&e.startsWith("amp"))return e}();return x&&(f.amp={id:x}),t}var Mn="api.segment.io/v1";function Ln(e){console.error("Error sending segment performance metrics",e)}var jn,Un=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Mn,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,a=function(){s||(s=!0,o.flush().catch(Ln),s=!1,setTimeout(a,o.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:vt(vt({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(dn):"npm:next-".concat(dn)})}}(e,t,An());this.queue.push(n),e.includes("error")&&this.flush().catch(Ln)}},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var e=this;return _t(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ln(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return mt(this,void 0,void 0,(function(){var e,t,n;return _t(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,hn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.initRemoteMetrics=function(e){jn=new Un(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==jn||jn.increment(t,null!=r?r:[])},t}(Kt),zn=function(e){function t(t,n){return e.call(this,t,n,new Dn)||this}return yt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Qt),Fn={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function s(e){var t,r,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),l=u;return r!==e&&(l=t(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(c(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(c(e),t)},p.hashBinary=function(e,t){var n=u(o(e));return t?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=f(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?d(n):n},p}()}(Fn);var Bn=Fn.exports,Hn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{event:e,type:"track",properties:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,s={type:"page",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(s.category=e,s.properties=null!==(o=s.properties)&&void 0!==o?o:{},s.properties.category=e),null!==t&&(s.name=t),this.normalize(vt(vt({},this.baseEvent()),s))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(vt(vt({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"group",traits:t,options:vt({},n),integrations:vt({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:vt({},n),integrations:vt({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(vt(vt({},i),this.baseEvent())):this.normalize(vt(vt({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(e){"context"!==e&&(i.includes(e)?kt(u,e,o[e]):kt(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return vt(vt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=vt(vt({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),s=this.context(e),a=s[0],u=s[1];e.options;var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["options"]),l=vt(vt(vt({timestamp:new Date},c),{context:a,integrations:o}),u),f="ajs-next-"+Bn.hash(JSON.stringify(l)+$t());return vt(vt({},l),{messageId:f})},e}(),qn={getItem:function(){},setItem:function(){},removeItem:function(){}};try{qn=sn()&&window.localStorage?window.localStorage:qn}catch(e){console.warn("Unable to access localStorage",e)}function Vn(e){var t=qn.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new zn(e.event,e.id)}))}function $n(e){var t=qn.getItem(e);return t?JSON.parse(t):{}}function Wn(e){qn.removeItem(e)}function Kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=qn.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return qn.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void qn.removeItem(r);!s&&n<3?setTimeout((function(){Kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Gn=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),s=[],a={};return Kn(n,(function(){try{s=Vn(i),a=$n(o),Wn(i),Wn(o),r.queue=bt(bt([],s,!0),r.queue,!0),r.seen=vt(vt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=bt(bt([],r.queue,!0),r.future,!0);try{Kn(n,(function(){!function(e,t){var n=Vn(e),r=bt(bt([],t,!0),n,!0).reduce((function(e,t){var n;return vt(vt({},e),((n={})[t.id]=t,n))}),{});qn.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=$n(e);qn.setItem(e,JSON.stringify(vt(vt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return yt(t,e),t}(Ht),Yn=function(e){function t(t){return e.call(this,"string"==typeof t?new Gn(4,t):t)||this}return yt(t,e),t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return cn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Zt),Qn="This is being deprecated and will be not be available in future releases of Analytics JS",Jn=fn(),Xn=null==Jn?void 0:Jn.analytics;function Zn(){console.warn(Qn)}var er=function(e){function t(t,n,r,i,o){var s,a,u,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Zn,c.addIntegrationMiddleware=Zn,c.listeners=Zn,c.addEventListener=Zn,c.removeAllListeners=Zn,c.removeListener=Zn,c.removeEventListener=Zn,c.hasListeners=Zn,c.add=Zn,c.addIntegration=Zn;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;return c.settings=t,c.settings.timeout=null!==(a=c.settings.timeout)&&void 0!==a?a:300,c.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new Ht(r,[]):new Gn(r,e);return new Yn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c._universalStorage=new On(f?["memory"]:["localStorage","cookie","memory"],xn(l)),c._user=null!=i?i:new Rn(f?vt(vt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Cn(f?vt(vt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Hn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},mn(c),c}return yt(t,e),Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=tn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=rn(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),s=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=rn(this._group).apply(void 0,t),i=r[0],o=r[1],s=r[2],a=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,s,this.integrations);return this._dispatch(l,a).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=on.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return mt(this,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=new zn(e),cn()&&!this.options.retryQueue?[2,n]:[2,en(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return mt(this,void 0,void 0,(function(){var t=this;return _t(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(t,void 0,void 0,(function(){var t,n,r;return _t(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return Ji}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()})).forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return sl}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Qn),window.analytics=null!=Xn?Xn:this,this},t.prototype.normalize=function(e){return console.warn(Qn),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Qn),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return dn},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(e){return console.warn(Qn),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return console.warn(Qn),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Qn),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Qn);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(wt);function tr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(J){}var nr,rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=function(){var e=function(){var e;return null!=nr?nr:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=rr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},or=function(){var e=ir();return"".concat(e,"/next-integrations")};function sr(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],o=t[1];return vt(vt({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return vt(vt({},e),((n={})[i]=vt(vt({},o),r[i]),n))}),{})}function ar(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function ur(){var e=ar();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function cr(e){void 0===e&&(e="");var t=ar();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function lr(e){var t=e.event;t.context=t.context||{};var n,r,i={path:ur(),referrer:document.referrer,search:location.search,title:document.title,url:cr(location.search)},o=void 0;return"page"===t.type&&(o=t.properties&&(n=t.properties,r=Object.keys(i),Object.assign.apply(Object,bt([{}],r.map((function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t})),!1))),t.properties=vt(vt(vt({},i),t.properties),t.name?{name:t.name}:{})),t.context.page=vt(vt(vt({},i),o),t.context.page),e}var fr={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:lr,alias:lr,track:lr,identify:lr,group:lr};function hr(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function dr(e,t){var n=hr(e);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(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,a=Object.entries(null!=t?t:{});s<a.length;s++){var u=a[s],c=u[0],l=u[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(e)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function pr(e){var t=hr(e);return void 0!==t&&t.remove(),Promise.resolve()}var gr={},yr={},vr={},mr={exports:{}};!function(e){function t(e){return function(t,n,r,o){var s,a=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in t){var e=a(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];return null==i?void(u=!0):n.length?void(t=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mr);var _r=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var br=_r(mr.exports);function wr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return br.default(n,"address."+e)||br.default(n,e)||(t?br.default(n,"address."+t):null)||(t?br.default(n,t):null)||br.default(r,"address."+e)||br.default(r,e)||(t?br.default(r,"address."+t):null)||(t?br.default(r,t):null)}}vr.default=function(e){e.zip=wr("postalCode","zip"),e.country=wr("country"),e.street=wr("street"),e.state=wr("state"),e.city=wr("city"),e.region=wr("region")};var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.clone=void 0,Er.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var Or={Salesforce:!0};Sr.default=function(e){return!Or[e]};var xr={},Ir=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;xr.parse=function(e){var t=[1,5,6,7,11,12],n=Ir.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[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 s=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(s)},xr.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Ir.test(e))};var Rr={},kr=/\d{13}/;Rr.is=function(e){return kr.test(e)},Rr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Cr={},Pr=/\d{10}/;Cr.is=function(e){return Pr.test(e)},Cr.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var Ar=xr,Nr=Rr,Tr=Cr,Mr=Object.prototype.toString;var Lr=function(e){return t=e,"[object Date]"===Mr.call(t)?e:function(e){return"[object Number]"===Mr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):Ar.is(e)?Ar.parse(e):Nr.is(e)?Nr.parse(e):Tr.is(e)?Tr.parse(e):new Date(e);var t,n};var jr=xr,Ur=Dr;function Dr(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=Dr(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=Dr(n,t)})),e}(e,t):jr.is(e,t)?jr.parse(e):e}var zr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.Facade=void 0;var Fr=zr(vr),Br=Er,Hr=zr(Sr),qr=zr(Lr),Vr=zr(mr.exports),$r=zr(Ur);function Wr(e,t){t=t||{},this.raw=Br.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Br.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?qr.default(e.timestamp):new Date,t.traverse&&$r.default(e),this.opts=t,this.obj=e}yr.Facade=Wr;var Kr=Wr.prototype;function Gr(e){return Br.clone(e)}Kr.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=Vr.default(n,t.join("."))),this.opts.clone?Gr(n):n):n},Kr.field=function(e){var t=this.obj[e];return this.opts.clone?Gr(t):t},Wr.proxy=function(e){return function(){return this.proxy(e)}},Wr.field=function(e){return function(){return this.field(e)}},Wr.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?Br.clone(n):n]),n||[]}},Wr.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},Kr.json=function(){var e=this.opts.clone?Br.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},Kr.rawEvent=function(){return this.raw},Kr.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Br.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||Vr.default(r,e);return"object"!=typeof i&&(i=Vr.default(this.options(),e)),"object"==typeof i?i:{}}},Kr.context=Kr.options,Kr.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&Hr.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},Kr.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Kr.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},Kr.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Kr.sessionId=Kr.anonymousId,Kr.groupId=Wr.proxy("options.groupId"),Kr.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},Kr.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},Kr.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},Kr.userAgent=Wr.proxy("context.userAgent"),Kr.timezone=Wr.proxy("context.timezone"),Kr.timestamp=Wr.field("timestamp"),Kr.channel=Wr.field("channel"),Kr.ip=Wr.proxy("context.ip"),Kr.userId=Wr.field("userId"),Fr.default(Kr);var Yr={},Qr={exports:{}};"function"==typeof Object.create?Qr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Jr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Alias=void 0;var Xr=Jr(Qr.exports),Zr=yr;function ei(e,t){Zr.Facade.call(this,e,t)}Yr.Alias=ei,Xr.default(ei,Zr.Facade),ei.prototype.action=function(){return"alias"},ei.prototype.type=ei.prototype.action,ei.prototype.previousId=function(){return this.field("previousId")||this.field("from")},ei.prototype.from=ei.prototype.previousId,ei.prototype.userId=function(){return this.field("userId")||this.field("to")},ei.prototype.to=ei.prototype.userId;var ti={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});var ri=/.+\@.+\..+/;ni.default=function(e){return ri.test(e)};var ii=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.Group=void 0;var oi=ii(Qr.exports),si=ii(ni),ai=ii(Lr),ui=yr;function ci(e,t){ui.Facade.call(this,e,t)}ti.Group=ci,oi.default(ci,ui.Facade);var li=ci.prototype;li.action=function(){return"group"},li.type=li.action,li.groupId=ui.Facade.field("groupId"),li.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return ai.default(e)},li.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return si.default(t)?t:void 0},li.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},li.name=ui.Facade.proxy("traits.name"),li.industry=ui.Facade.proxy("traits.industry"),li.employees=ui.Facade.proxy("traits.employees"),li.properties=function(){return this.field("traits")||this.field("properties")||{}};var fi={},hi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Identify=void 0;var di=yr,pi=hi(mr.exports),gi=hi(Qr.exports),yi=hi(ni),vi=hi(Lr),mi=function(e){return e.trim()};function _i(e,t){di.Facade.call(this,e,t)}fi.Identify=_i,gi.default(_i,di.Facade);var bi=_i.prototype;bi.action=function(){return"identify"},bi.type=bi.action,bi.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return yi.default(t)?t:void 0},bi.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return vi.default(e)},bi.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return vi.default(e)},bi.companyName=function(){return this.proxy("traits.company.name")},bi.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mi(e);var t=this.firstName(),n=this.lastName();return t&&n?mi(t+" "+n):void 0},bi.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");return"string"==typeof t?mi(t).split(" ")[0]:void 0},bi.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mi(t).indexOf(" ");if(-1!==n)return mi(t.substr(n+1))}},bi.uid=function(){return this.userId()||this.username()||this.email()},bi.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bi.age=function(){var e=this.birthday(),t=pi.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bi.avatar=function(){var e=this.traits();return pi.default(e,"avatar")||pi.default(e,"photoUrl")||pi.default(e,"avatarUrl")},bi.position=function(){var e=this.traits();return pi.default(e,"position")||pi.default(e,"jobTitle")},bi.username=di.Facade.proxy("traits.username"),bi.website=di.Facade.one("traits.website"),bi.websites=di.Facade.multi("traits.website"),bi.phone=di.Facade.one("traits.phone"),bi.phones=di.Facade.multi("traits.phone"),bi.address=di.Facade.proxy("traits.address"),bi.gender=di.Facade.proxy("traits.gender"),bi.birthday=di.Facade.proxy("traits.birthday");var wi={},Ei=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Track=void 0;var Si=Ei(Qr.exports),Oi=yr,xi=fi,Ii=Ei(ni),Ri=Ei(mr.exports);function ki(e,t){Oi.Facade.call(this,e,t)}wi.Track=ki,Si.default(ki,Oi.Facade);var Ci=ki.prototype;Ci.action=function(){return"track"},Ci.type=Ci.action,Ci.event=Oi.Facade.field("event"),Ci.value=Oi.Facade.proxy("properties.value"),Ci.category=Oi.Facade.proxy("properties.category"),Ci.id=Oi.Facade.proxy("properties.id"),Ci.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Ci.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Ci.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Ci.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Ci.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Ci.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Ci.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Ci.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Ci.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Ci.sku=Oi.Facade.proxy("properties.sku"),Ci.tax=Oi.Facade.proxy("properties.tax"),Ci.name=Oi.Facade.proxy("properties.name"),Ci.price=Oi.Facade.proxy("properties.price"),Ci.total=Oi.Facade.proxy("properties.total"),Ci.repeat=Oi.Facade.proxy("properties.repeat"),Ci.coupon=Oi.Facade.proxy("properties.coupon"),Ci.shipping=Oi.Facade.proxy("properties.shipping"),Ci.discount=Oi.Facade.proxy("properties.discount"),Ci.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Ci.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Ci.description=Oi.Facade.proxy("properties.description"),Ci.plan=Oi.Facade.proxy("properties.plan"),Ci.subtotal=function(){var e=Ri.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},Ci.products=function(){var e=this.properties(),t=Ri.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Ci.quantity=function(){return(this.obj.properties||{}).quantity||1},Ci.currency=function(){return(this.obj.properties||{}).currency||"USD"},Ci.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ci.query=Oi.Facade.proxy("options.query"),Ci.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},Ci.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Ci.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return Ii.default(t)?t:void 0},Ci.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},Ci.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Ci.identify=function(){var e=this.json();return e.traits=this.traits(),new xi.Identify(e,this.opts)};var Pi={},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Page=void 0;var Ni=Ai(Qr.exports),Ti=yr,Mi=wi,Li=Ai(ni);function ji(e,t){Ti.Facade.call(this,e,t)}Pi.Page=ji,Ni.default(ji,Ti.Facade);var Ui=ji.prototype;Ui.action=function(){return"page"},Ui.type=Ui.action,Ui.category=Ti.Facade.field("category"),Ui.name=Ti.Facade.field("name"),Ui.title=Ti.Facade.proxy("properties.title"),Ui.path=Ti.Facade.proxy("properties.path"),Ui.url=Ti.Facade.proxy("properties.url"),Ui.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ui.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},Ui.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Li.default(t)?t:void 0},Ui.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Ui.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Ui.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Mi.Track(t,this.opts)};var Di={},zi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.Screen=void 0;var Fi=zi(Qr.exports),Bi=Pi,Hi=wi;function qi(e,t){Bi.Page.call(this,e,t)}Di.Screen=qi,Fi.default(qi,Bi.Page),qi.prototype.action=function(){return"screen"},qi.prototype.type=qi.prototype.action,qi.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},qi.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Hi.Track(t,this.opts)};var Vi={},$i=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.Delete=void 0;var Wi=$i(Qr.exports),Ki=yr;function Gi(e,t){Ki.Facade.call(this,e,t)}function Yi(e,t){var n=new gr.Facade(e,t);return"track"===e.type&&(n=new gr.Track(e,t)),"identify"===e.type&&(n=new gr.Identify(e,t)),"page"===e.type&&(n=new gr.Page(e,t)),"alias"===e.type&&(n=new gr.Alias(e,t)),"group"===e.type&&(n=new gr.Group(e,t)),"screen"===e.type&&(n=new gr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Qi(e,t,n){return mt(this,void 0,void 0,(function(){function r(t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:Yi(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return s.sent(),r||null===i||(i.integrations=vt(vt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return _t(this,(function(e){switch(e.label){case 0:i=Yi(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(a=s[o],[4,r(i,a)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}Vi.Delete=Gi,Wi.default(Gi,Ki.Facade),Gi.prototype.type=function(){return"delete"},function(e){var t=l&&l.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=yr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yr;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=ti;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=fi;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=wi;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Pi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Di;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Vi;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:s.Track,Page:a.Page,Screen:u.Screen,Delete:c.Delete})}(gr);var Ji=Object.freeze({__proto__:null,applyDestinationMiddleware:Qi,sourceMiddlewarePlugin:function(e,t){function n(n){return mt(this,void 0,void 0,(function(){var r;return _t(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:Yi(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Yt({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),Xi=function(){function e(e,t){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=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Qi(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Yt({retry:!1,reason:"dropped by destination middleware"})),[2,new zn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return mt(t,void 0,void 0,(function(){var t;return _t(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function Zi(e,t,n,r,i){var o,s,a;return mt(this,void 0,void 0,(function(){var u,c,l,f,h=this;return _t(this,(function(d){switch(d.label){case 0:return u=[],c=ir(),l=null!==(s=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==s?s:[],f=(null!==(a=e.remotePlugins)&&void 0!==a?a:[]).map((function(e){return mt(h,void 0,void 0,(function(){var o,s,a,f,h,d,p,g,y;return _t(this,(function(v){switch(v.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];v.label=1;case 1:if(v.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];s=e.url.split("/"),a=s[s.length-2],f=e.url.replace(a,btoa(a).replace(/=/g,"")),v.label=2;case 2:return v.trys.push([2,4,,6]),[4,dr(f.replace(o,c))];case 3:return v.sent(),[3,6];case 4:return v.sent(),[4,dr(e.url.replace(o,c))];case 5:return v.sent(),[3,6];case 6:return[3,9];case 7:return[4,dr(e.url.replace(o,c))];case 8:v.sent(),v.label=9;case 9:return h=e.libraryName,"function"!=typeof window[h]?[3,11]:[4,(0,window[h])(vt(vt({},e.settings),n[e.name]))];case 10:d=v.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(p=Array.isArray(d)?d:[d]),g=l.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new Xi(e.creationName,t);g.length&&i&&"destination"===t.type&&n.addMiddleware(i),u.push(n)})),v.label=11;case 11:return[3,13];case 12:return y=v.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,u.filter(Boolean)]}}))}))}var eo=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},to=500;function no(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function ro(e,t){var n,r,i,o=[],s=!1,a=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,u=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function c(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey;return hn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:t,writeKey:r})})}}function l(){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return eo((function(e){if((s=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){no(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(c);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(n){return o.push(t),e=o.length>=a||function(e){return no(e)>=to-50}(o),[2,e||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}var io=function(e,t){return mt(void 0,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return _t(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function oo(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&!cn()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function so(e,t,n,r){var i=this;e||setTimeout((function(){return mt(i,void 0,void 0,(function(){var e,i;return _t(this,(function(o){switch(o.label){case 0:return e=!0,[4,oo(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function ao(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function uo(e,t,n){var r,i,o;return mt(this,void 0,void 0,(function(){function s(r){return mt(this,void 0,void 0,(function(){var i,o;return _t(this,(function(s){return cn()?(u.push(r),so(l,u,v,so),[2,r]):(c.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=Yi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,s=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,g.dispatch("".concat(d,"/").concat(i),Tn(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),so(l,u,v,so),r})).finally((function(){c.delete(r)}))])}))}))}var a,u,c,l,f,h,d,p,g,y,v;return _t(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()})),a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new Ht(e.queue.queue.maxAttempts,[]):new Gn(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),c=new Set,l=!1,f=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Mn,h=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,g="batching"===(null==p?void 0:p.strategy)?ro(f,p.config):(m=null==p?void 0:p.config,{dispatch:function(e,t){return hn(e,{keepalive:null==m?void 0:m.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ao(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:s,identify:s,page:s,alias:s,group:s,screen:s},u.todo&&so(l,u,v,so),[2,v]}var m}))}))}function co(e){var t,n=e.event;!function(e){if(!Tt(e))throw new Ct("Event",Ut);if("object"!=typeof e)throw new Ct("Event",jt)}(n),function(e){if(!Pt(e.type))throw new Ct(".type",Lt)}(n),"track"===n.type&&function(e){if(!Pt(e.event))throw new Ct(".event",Lt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!Mt(r))throw new Ct(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!Tt(n))throw new Ct(t,Ut);if(!Pt(n))throw new Ct(t,Lt)}(n),e}var lo={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:co,identify:co,page:co,alias:co,group:co,screen:co},fo=function(e,t,n){n.getCalls(e).forEach((function(e){mo(t,e).catch(console.error)}))},ho=function(e,t){return mt(void 0,void 0,void 0,(function(){var n,r,i;return _t(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,mo(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},po=fo.bind(void 0,"on"),go=fo.bind(void 0,"setAnonymousId"),yo=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){mo(e,t).catch(console.error)}),0)}))},vo=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function mo(e,t){return mt(this,void 0,void 0,(function(){var n,r;return _t(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(o=n)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var o}))}))}var _o=function(){function e(e){var t=this;this._preInitBuffer=new vo,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=dn,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function bo(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var wo,Eo,So=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(bo)},Oo=null!==(wo=(Eo=fn()).__SEGMENT_INSPECTOR__)&&void 0!==wo?wo:Eo.__SEGMENT_INSPECTOR__={};function xo(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(n){switch(n.label){case 0:return t.push.apply(t,So()),[4,ho(e,t)];case 1:return n.sent(),t.push.apply(t,So()),yo(e,t),t.clear(),[2]}}))}))}function Io(e,t,n,r,i,o,s){var a,u,c;return mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E=this;return _t(this,(function(S){switch(S.label){case 0:return function(e){var t,n,r;return"test"!==tr().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return hd})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return f=S.sent(),[3,3];case 2:f=void 0,S.label=3;case 3:return l=f,O=t,"test"!==tr().NODE_ENV&&Object.keys(O.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return _d})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,s)}))]:[3,5];case 4:return d=S.sent(),[3,6];case 5:d=[],S.label=6;case 6:return h=d,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return bd})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return wd})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return g=S.sent(),[3,11];case 10:g=void 0,S.label=11;case 11:return p=g,y=sr(t,i),[4,Zi(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return v=S.sent(),m=bt(bt(bt([lo,fr],o,!0),h,!0),v,!0),p&&m.push(p),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(b=(_=m).push,[4,uo(n,y["Segment.io"],t.integrations)]);case 13:b.apply(_,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,m)];case 15:return w=S.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Ed})).then((function(e){var r=e.remoteMiddlewares;return mt(E,void 0,void 0,(function(){var e,o;return _t(this,(function(s){switch(s.label){case 0:return[4,r(w,t,i.obfuscate)];case 1:return e=s.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:S.sent(),S.label=17;case 17:return[2,w]}var O}))}))}function Ro(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return _t(this,(function(w){switch(w.label){case 0:return e.cdnURL&&(x=e.cdnURL,window.analytics&&(window.analytics._cdn=x),nr=x),null===(r=e.cdnSettings)||void 0===r?[3,1]:(f=r,[3,3]);case 1:return[4,(E=e.writeKey,S=e.cdnURL,O=null!=S?S:ir(),hn("".concat(O,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:f=w.sent(),w.label=3;case 3:return l=f,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=vt({retryQueue:h},t),function(e){var t;null===(t=Oo.attach)||void 0===t||t.call(Oo,e)}(p=new er(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],Dn.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,So()),go(e,t),po(e,t)}(p,n),[4,Io(e.writeKey,l,p,d,t,g,y)];case 4:return v=w.sent(),m=null!==(u=window.location.search)&&void 0!==u?u:"",_=null!==(c=window.location.hash)&&void 0!==c?c:"",(b=m.length?m:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(b).catch(console.error)]:[3,6];case 5:w.sent(),w.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,xo(p,n)];case 7:return w.sent(),[2,[p,v]]}var E,S,O,x}))}))}var ko=function(e){function t(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),s=o.promise,a=o.resolve;return i=e.call(this,(function(e){return s.then((function(t){return Ro(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return yt(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(_o);let Co;const Po=new Uint8Array(16);function Ao(){if(!Co&&(Co="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Co(Po)}var No=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function Mo(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}function Lo(e){if(!function(e){return"string"==typeof e&&No.test(e)}(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function jo(e,t,n){function r(e,r,i,o){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Lo(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return Mo(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Uo(e){return 14+(e+64>>>9<<4)+1}function Do(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function zo(e,t,n,r,i,o){return Do((s=Do(Do(t,e),Do(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Fo(e,t,n,r,i,o,s){return zo(t&n|~t&r,e,t,i,o,s)}function Bo(e,t,n,r,i,o,s){return zo(t&r|n&~r,e,t,i,o,s)}function Ho(e,t,n,r,i,o,s){return zo(t^n^r,e,t,i,o,s)}function qo(e,t,n,r,i,o,s){return zo(n^(t|~r),e,t,i,o,s)}jo("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Uo(t)-1]=t;let n=1732584193,r=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const s=n,a=r,u=i,c=o;n=Fo(n,r,i,o,e[t],7,-680876936),o=Fo(o,n,r,i,e[t+1],12,-389564586),i=Fo(i,o,n,r,e[t+2],17,606105819),r=Fo(r,i,o,n,e[t+3],22,-1044525330),n=Fo(n,r,i,o,e[t+4],7,-176418897),o=Fo(o,n,r,i,e[t+5],12,1200080426),i=Fo(i,o,n,r,e[t+6],17,-1473231341),r=Fo(r,i,o,n,e[t+7],22,-45705983),n=Fo(n,r,i,o,e[t+8],7,1770035416),o=Fo(o,n,r,i,e[t+9],12,-1958414417),i=Fo(i,o,n,r,e[t+10],17,-42063),r=Fo(r,i,o,n,e[t+11],22,-1990404162),n=Fo(n,r,i,o,e[t+12],7,1804603682),o=Fo(o,n,r,i,e[t+13],12,-40341101),i=Fo(i,o,n,r,e[t+14],17,-1502002290),r=Fo(r,i,o,n,e[t+15],22,1236535329),n=Bo(n,r,i,o,e[t+1],5,-165796510),o=Bo(o,n,r,i,e[t+6],9,-1069501632),i=Bo(i,o,n,r,e[t+11],14,643717713),r=Bo(r,i,o,n,e[t],20,-373897302),n=Bo(n,r,i,o,e[t+5],5,-701558691),o=Bo(o,n,r,i,e[t+10],9,38016083),i=Bo(i,o,n,r,e[t+15],14,-660478335),r=Bo(r,i,o,n,e[t+4],20,-405537848),n=Bo(n,r,i,o,e[t+9],5,568446438),o=Bo(o,n,r,i,e[t+14],9,-1019803690),i=Bo(i,o,n,r,e[t+3],14,-187363961),r=Bo(r,i,o,n,e[t+8],20,1163531501),n=Bo(n,r,i,o,e[t+13],5,-1444681467),o=Bo(o,n,r,i,e[t+2],9,-51403784),i=Bo(i,o,n,r,e[t+7],14,1735328473),r=Bo(r,i,o,n,e[t+12],20,-1926607734),n=Ho(n,r,i,o,e[t+5],4,-378558),o=Ho(o,n,r,i,e[t+8],11,-2022574463),i=Ho(i,o,n,r,e[t+11],16,1839030562),r=Ho(r,i,o,n,e[t+14],23,-35309556),n=Ho(n,r,i,o,e[t+1],4,-1530992060),o=Ho(o,n,r,i,e[t+4],11,1272893353),i=Ho(i,o,n,r,e[t+7],16,-155497632),r=Ho(r,i,o,n,e[t+10],23,-1094730640),n=Ho(n,r,i,o,e[t+13],4,681279174),o=Ho(o,n,r,i,e[t],11,-358537222),i=Ho(i,o,n,r,e[t+3],16,-722521979),r=Ho(r,i,o,n,e[t+6],23,76029189),n=Ho(n,r,i,o,e[t+9],4,-640364487),o=Ho(o,n,r,i,e[t+12],11,-421815835),i=Ho(i,o,n,r,e[t+15],16,530742520),r=Ho(r,i,o,n,e[t+2],23,-995338651),n=qo(n,r,i,o,e[t],6,-198630844),o=qo(o,n,r,i,e[t+7],10,1126891415),i=qo(i,o,n,r,e[t+14],15,-1416354905),r=qo(r,i,o,n,e[t+5],21,-57434055),n=qo(n,r,i,o,e[t+12],6,1700485571),o=qo(o,n,r,i,e[t+3],10,-1894986606),i=qo(i,o,n,r,e[t+10],15,-1051523),r=qo(r,i,o,n,e[t+1],21,-2054922799),n=qo(n,r,i,o,e[t+8],6,1873313359),o=qo(o,n,r,i,e[t+15],10,-30611744),i=qo(i,o,n,r,e[t+6],15,-1560198380),r=qo(r,i,o,n,e[t+13],21,1309151649),n=qo(n,r,i,o,e[t+4],6,-145523070),o=qo(o,n,r,i,e[t+11],10,-1120210379),i=qo(i,o,n,r,e[t+2],15,718787259),r=qo(r,i,o,n,e[t+9],21,-343485551),n=Do(n,s),r=Do(r,a),i=Do(i,u),o=Do(o,c)}return[n,r,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(Uo(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var Vo={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $o(e,t,n){if(Vo.randomUUID&&!t&&!e)return Vo.randomUUID();const r=(e=e||{}).random||(e.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Mo(r)}function Wo(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ko(e,t){return e<<t|e>>>32-t}jo("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,i=Math.ceil(r/16),o=new Array(i);for(let t=0;t<i;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=Ko(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],s=n[1],a=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),o=Ko(i,5)+Wo(n,s,a,u)+c+t[n]+r[e]>>>0;c=u,u=a,a=Ko(s,30)>>>0,s=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));let Go=null;const Yo={};function Qo(){const e=m.exports.useCallback(((e={},t={})=>c(this,void 0,void 0,(function*(){if(Go)return;{const n=ko.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=m.exports.useCallback((e=>c(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=m.exports.useCallback((()=>c(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.track(e,n,Go.globalOptions)}))),[]),page:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.page(e,n,Go.globalOptions)}))),[]),addStepToFlow:t,sendUserFlow:n}}let Jo=e=>{};const Xo=({onClose:e,children:t})=>{const{sendUserFlow:n,addStepToFlow:r}=Qo(),[i,o]=m.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()},a=e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()};return i?y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(tt,{}),y.exports.jsx(ot,Object.assign({id:"ModalWrapper",onClick:a},{children:y.exports.jsxs(st,{children:[y.exports.jsxs(ct,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),y.exports.jsx(at,Object.assign({onClick:s},{children:y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),y.exports.jsx(y.exports.Fragment,{children:t})]})}))]}):null};var Zo,es,ts,ns,rs={exports:{}},is={},os={exports:{}},ss={};function as(){return es||(es=1,function(e){e.exports=(Zo||(Zo=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>i(u,n))c<o&&0>i(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else{if(!(c<o&&0>i(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(u,i)}i=n(c)}}function b(e){if(g=!1,_(e),!p)if(null!==n(u))p=!0,N(w);else{var t=n(c);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,v(x),x=-1),d=!0;var o=h;try{for(_(i),f=n(u);null!==f&&(!(f.expirationTime>i)||t&&!k());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(u)&&r(u),_(i)}else r(u);f=n(u)}if(null!==f)var l=!0;else{var y=n(c);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,x=-1,I=5,R=-1;function k(){return!(e.unstable_now()-R<I)}function C(){if(null!==O){var t=e.unstable_now();R=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof m)E=function(){m(C)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=C,E=function(){A.postMessage(null)}}else E=function(){y(C,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){x=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(c,r),null===n(u)&&r===n(c)&&(g?(v(x),x=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(u,r),p||d||(p=!0,N(w))),r},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ss)),ss)}(os)),os.exports}
|
173
|
+
function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=pn({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",pn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,pn({},this.attributes,t))},withConverter:function(t){return e(pn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function vn(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(gn.set(i,"1",s),gn.get(i))return gn.remove(i,s),o}catch(e){return}}}function mn(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var _n={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},bn=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},Object.defineProperty(e.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),e}(),wn=function(e){function t(n){void 0===n&&(n=t.defaults);var r=e.call(this)||this;return r.options=vt(vt({},t.defaults),n),r}return yt(t,e),t.available=function(){try{var e="ajs_cookies_check";gn.set(e,"test");var t=document.cookie.includes(e);return gn.remove(e),t}catch(e){return!1}},Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:vn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(e){try{var t=gn.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(e){return null}},t.prototype.set=function(e,t){"string"==typeof t?gn.set(e,t,this.opts()):null===t?gn.remove(e,this.opts()):gn.set(e,JSON.stringify(t),this.opts())},t.prototype.remove=function(e){return gn.remove(e,this.opts())},Object.defineProperty(t.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),t}(bn),En=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.available=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t.prototype.get=function(e){try{var t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(t){return En(e,"unavailable"),null}},t.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){En(e,"full")}},t.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){En(e,"unavailable")}},Object.defineProperty(t.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),t}(bn),On=function(){function e(e,t){this.storageOptions=t,this.enabledStores=e}return e.prototype.getStores=function(e){var t=this,n=[];return this.enabledStores.filter((function(t){return!e||(null==e?void 0:e.includes(t))})).forEach((function(e){var r=t.storageOptions[e];void 0!==r&&n.push(r)})),n},e.prototype.getAndSync=function(e,t){var n=this.get(e,t),r="number"==typeof n?n.toString():n;return this.set(e,r,t),r},e.prototype.get=function(e,t){for(var n=null,r=0,i=this.getStores(t);r<i.length;r++){if(n=i[r].get(e))return n}return null},e.prototype.set=function(e,t,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(e,t)}},e.prototype.clear=function(e,t){for(var n=0,r=this.getStores(t);n<r.length;n++){r[n].remove(e)}},e}();function xn(e){return{cookie:wn.available()?new wn(e):void 0,localStorage:Sn.available()?new Sn:void 0,memory:new bn}}var In,Rn=function(){function e(e,t){void 0===e&&(e=_n);var n,r,i,o,s=this;this.options={},this.id=function(e){if(s.options.disable)return null;var t=s.identityStore.getAndSync(s.idKey);void 0!==e&&(s.identityStore.set(s.idKey,e),e!==t&&null!==t&&null!==e&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_n.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(s.options.disable)return null;if(void 0===e){var r=null!==(t=s.identityStore.getAndSync(s.anonKey))&&void 0!==t?t:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=e?e:$t()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(e){var t;if(!s.options.disable)return null===e&&(e={}),e&&s.traitsStore.set(s.traitsKey,null!=e?e:{}),null!==(t=s.traitsStore.get(s.traitsKey))&&void 0!==t?t:{}},this.options=e,this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:_n.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:_n.localStorage.key,this.anonKey="ajs_anonymous_id";var a=!0===e.disable,u=!1!==e.persist,c=a?[]:u?["localStorage","cookie","memory"]:["memory"],l=xn(t);e.localStorageFallbackDisabled&&(c=c.filter((function(e){return"localStorage"!==e}))),this.identityStore=new On(c,l),this.legacyUserStore=new On(c.filter((function(e){return"localStorage"!==e&&"memory"!==e})),l),this.traitsStore=new On(c.filter((function(e){return"cookie"!==e})),l);var f=this.legacyUserStore.get(_n.cookie.oldKey);f&&"object"==typeof f&&(f.id&&this.id(f.id),f.traits&&this.traits(f.traits)),mn(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=vt(vt({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_n,e}(),kn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Cn=function(e){function t(t,n){void 0===t&&(t=kn);var r=e.call(this,t,n)||this;return r.anonymousId=function(e){},mn(r),r}return yt(t,e),t}(Rn);var Pn="npm";function An(){return Pn}function Nn(e,t,n){var r=new On(n?[]:["cookie"],xn(function(){if(In)return In;var e=vn(window.location.href);return In={expires:31536e6,secure:!1,path:"/"},e&&(In.domain=e),In}())),i=r.get("s:context.referrer"),o=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=vt(vt({},t.referrer),o)),r.set("s:context.referrer",o))}function Tn(e,t,n,r){var i,o,s,a,u,c,l=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var f=t.context,h="string"==typeof(null===(s=f.page)||void 0===s?void 0:s.search)?null===(a=f.page)||void 0===a?void 0:a.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,f.userAgent=navigator.userAgent;var d=navigator.userLanguage||navigator.language;if(void 0===f.locale&&void 0!==d&&(f.locale=d),!f.library){var p=An();f.library="web"===p?{name:"analytics.js",version:"next-".concat(dn)}:{name:"analytics.js",version:"npm:next-".concat(dn)}}h&&!f.campaign&&(f.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.substr(4);"campaign"===s&&(s="name"),e[s]=yn(o)}return e}),{})}(h)),Nn(h,f,null!==(u=e.options.disableClientPersistence)&&void 0!==u&&u),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var g=e.queue.failedInitializations||[];g.length>0&&(t._metadata={failedInitializations:g});var y=[],v=[];for(var m in r){var _=r[m];"Segment.io"===m&&y.push(m),"bundled"===_.bundlingStatus&&y.push(m),"unbundled"===_.bundlingStatus&&v.push(m)}for(var b=0,w=(null==n?void 0:n.unbundledIntegrations)||[];b<w.length;b++){var E=w[b];v.includes(E)||v.push(E)}var S=null!==(c=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==c?c:{},O=[];y.sort().forEach((function(e){var t;(null!==(t=S[e])&&void 0!==t?t:[]).forEach((function(e){O.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=vt(vt({},t._metadata),{bundled:y.sort(),unbundled:v.sort(),bundledIds:O}));var x=function(){var e=gn.get("_ga");if(e&&e.startsWith("amp"))return e}();return x&&(f.amp={id:x}),t}var Mn="api.segment.io/v1";function Ln(e){console.error("Error sending segment performance metrics",e)}var jn,Un=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Mn,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,a=function(){s||(s=!0,o.flush().catch(Ln),s=!1,setTimeout(a,o.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:vt(vt({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(dn):"npm:next-".concat(dn)})}}(e,t,An());this.queue.push(n),e.includes("error")&&this.flush().catch(Ln)}},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var e=this;return _t(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ln(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return mt(this,void 0,void 0,(function(){var e,t,n;return _t(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,hn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.initRemoteMetrics=function(e){jn=new Un(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==jn||jn.increment(t,null!=r?r:[])},t}(Kt),zn=function(e){function t(t,n){return e.call(this,t,n,new Dn)||this}return yt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Qt),Fn={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function s(e){var t,r,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),l=u;return r!==e&&(l=t(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(c(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(c(e),t)},p.hashBinary=function(e,t){var n=u(o(e));return t?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=f(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?d(n):n},p}()}(Fn);var Bn=Fn.exports,Hn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{event:e,type:"track",properties:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,s={type:"page",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(s.category=e,s.properties=null!==(o=s.properties)&&void 0!==o?o:{},s.properties.category=e),null!==t&&(s.name=t),this.normalize(vt(vt({},this.baseEvent()),s))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(vt(vt({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"group",traits:t,options:vt({},n),integrations:vt({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:vt({},n),integrations:vt({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(vt(vt({},i),this.baseEvent())):this.normalize(vt(vt({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(e){"context"!==e&&(i.includes(e)?kt(u,e,o[e]):kt(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return vt(vt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=vt(vt({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),s=this.context(e),a=s[0],u=s[1];e.options;var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["options"]),l=vt(vt(vt({timestamp:new Date},c),{context:a,integrations:o}),u),f="ajs-next-"+Bn.hash(JSON.stringify(l)+$t());return vt(vt({},l),{messageId:f})},e}(),qn={getItem:function(){},setItem:function(){},removeItem:function(){}};try{qn=sn()&&window.localStorage?window.localStorage:qn}catch(e){console.warn("Unable to access localStorage",e)}function Vn(e){var t=qn.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new zn(e.event,e.id)}))}function $n(e){var t=qn.getItem(e);return t?JSON.parse(t):{}}function Wn(e){qn.removeItem(e)}function Kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=qn.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return qn.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void qn.removeItem(r);!s&&n<3?setTimeout((function(){Kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Gn=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),s=[],a={};return Kn(n,(function(){try{s=Vn(i),a=$n(o),Wn(i),Wn(o),r.queue=bt(bt([],s,!0),r.queue,!0),r.seen=vt(vt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=bt(bt([],r.queue,!0),r.future,!0);try{Kn(n,(function(){!function(e,t){var n=Vn(e),r=bt(bt([],t,!0),n,!0).reduce((function(e,t){var n;return vt(vt({},e),((n={})[t.id]=t,n))}),{});qn.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=$n(e);qn.setItem(e,JSON.stringify(vt(vt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return yt(t,e),t}(Ht),Yn=function(e){function t(t){return e.call(this,"string"==typeof t?new Gn(4,t):t)||this}return yt(t,e),t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return cn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Zt),Qn="This is being deprecated and will be not be available in future releases of Analytics JS",Jn=fn(),Xn=null==Jn?void 0:Jn.analytics;function Zn(){console.warn(Qn)}var er=function(e){function t(t,n,r,i,o){var s,a,u,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Zn,c.addIntegrationMiddleware=Zn,c.listeners=Zn,c.addEventListener=Zn,c.removeAllListeners=Zn,c.removeListener=Zn,c.removeEventListener=Zn,c.hasListeners=Zn,c.add=Zn,c.addIntegration=Zn;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;return c.settings=t,c.settings.timeout=null!==(a=c.settings.timeout)&&void 0!==a?a:300,c.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new Ht(r,[]):new Gn(r,e);return new Yn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c._universalStorage=new On(f?["memory"]:["localStorage","cookie","memory"],xn(l)),c._user=null!=i?i:new Rn(f?vt(vt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Cn(f?vt(vt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Hn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},mn(c),c}return yt(t,e),Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=tn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=rn(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),s=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=rn(this._group).apply(void 0,t),i=r[0],o=r[1],s=r[2],a=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,s,this.integrations);return this._dispatch(l,a).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=on.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return mt(this,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=new zn(e),cn()&&!this.options.retryQueue?[2,n]:[2,en(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return mt(this,void 0,void 0,(function(){var t=this;return _t(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(t,void 0,void 0,(function(){var t,n,r;return _t(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return Ji}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()})).forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return sl}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Qn),window.analytics=null!=Xn?Xn:this,this},t.prototype.normalize=function(e){return console.warn(Qn),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Qn),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return dn},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(e){return console.warn(Qn),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return console.warn(Qn),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Qn),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Qn);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(wt);function tr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(J){}var nr,rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=function(){var e=function(){var e;return null!=nr?nr:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=rr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},or=function(){var e=ir();return"".concat(e,"/next-integrations")};function sr(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],o=t[1];return vt(vt({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return vt(vt({},e),((n={})[i]=vt(vt({},o),r[i]),n))}),{})}function ar(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function ur(){var e=ar();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function cr(e){void 0===e&&(e="");var t=ar();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function lr(e){var t=e.event;t.context=t.context||{};var n,r,i={path:ur(),referrer:document.referrer,search:location.search,title:document.title,url:cr(location.search)},o=void 0;return"page"===t.type&&(o=t.properties&&(n=t.properties,r=Object.keys(i),Object.assign.apply(Object,bt([{}],r.map((function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t})),!1))),t.properties=vt(vt(vt({},i),t.properties),t.name?{name:t.name}:{})),t.context.page=vt(vt(vt({},i),o),t.context.page),e}var fr={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:lr,alias:lr,track:lr,identify:lr,group:lr};function hr(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function dr(e,t){var n=hr(e);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(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,a=Object.entries(null!=t?t:{});s<a.length;s++){var u=a[s],c=u[0],l=u[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(e)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function pr(e){var t=hr(e);return void 0!==t&&t.remove(),Promise.resolve()}var gr={},yr={},vr={},mr={exports:{}};!function(e){function t(e){return function(t,n,r,o){var s,a=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in t){var e=a(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];return null==i?void(u=!0):n.length?void(t=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mr);var _r=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var br=_r(mr.exports);function wr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return br.default(n,"address."+e)||br.default(n,e)||(t?br.default(n,"address."+t):null)||(t?br.default(n,t):null)||br.default(r,"address."+e)||br.default(r,e)||(t?br.default(r,"address."+t):null)||(t?br.default(r,t):null)}}vr.default=function(e){e.zip=wr("postalCode","zip"),e.country=wr("country"),e.street=wr("street"),e.state=wr("state"),e.city=wr("city"),e.region=wr("region")};var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.clone=void 0,Er.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var Or={Salesforce:!0};Sr.default=function(e){return!Or[e]};var xr={},Ir=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;xr.parse=function(e){var t=[1,5,6,7,11,12],n=Ir.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[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 s=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(s)},xr.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Ir.test(e))};var Rr={},kr=/\d{13}/;Rr.is=function(e){return kr.test(e)},Rr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Cr={},Pr=/\d{10}/;Cr.is=function(e){return Pr.test(e)},Cr.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var Ar=xr,Nr=Rr,Tr=Cr,Mr=Object.prototype.toString;var Lr=function(e){return t=e,"[object Date]"===Mr.call(t)?e:function(e){return"[object Number]"===Mr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):Ar.is(e)?Ar.parse(e):Nr.is(e)?Nr.parse(e):Tr.is(e)?Tr.parse(e):new Date(e);var t,n};var jr=xr,Ur=Dr;function Dr(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=Dr(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=Dr(n,t)})),e}(e,t):jr.is(e,t)?jr.parse(e):e}var zr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.Facade=void 0;var Fr=zr(vr),Br=Er,Hr=zr(Sr),qr=zr(Lr),Vr=zr(mr.exports),$r=zr(Ur);function Wr(e,t){t=t||{},this.raw=Br.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Br.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?qr.default(e.timestamp):new Date,t.traverse&&$r.default(e),this.opts=t,this.obj=e}yr.Facade=Wr;var Kr=Wr.prototype;function Gr(e){return Br.clone(e)}Kr.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=Vr.default(n,t.join("."))),this.opts.clone?Gr(n):n):n},Kr.field=function(e){var t=this.obj[e];return this.opts.clone?Gr(t):t},Wr.proxy=function(e){return function(){return this.proxy(e)}},Wr.field=function(e){return function(){return this.field(e)}},Wr.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?Br.clone(n):n]),n||[]}},Wr.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},Kr.json=function(){var e=this.opts.clone?Br.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},Kr.rawEvent=function(){return this.raw},Kr.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Br.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||Vr.default(r,e);return"object"!=typeof i&&(i=Vr.default(this.options(),e)),"object"==typeof i?i:{}}},Kr.context=Kr.options,Kr.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&Hr.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},Kr.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Kr.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},Kr.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Kr.sessionId=Kr.anonymousId,Kr.groupId=Wr.proxy("options.groupId"),Kr.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},Kr.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},Kr.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},Kr.userAgent=Wr.proxy("context.userAgent"),Kr.timezone=Wr.proxy("context.timezone"),Kr.timestamp=Wr.field("timestamp"),Kr.channel=Wr.field("channel"),Kr.ip=Wr.proxy("context.ip"),Kr.userId=Wr.field("userId"),Fr.default(Kr);var Yr={},Qr={exports:{}};"function"==typeof Object.create?Qr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Jr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Alias=void 0;var Xr=Jr(Qr.exports),Zr=yr;function ei(e,t){Zr.Facade.call(this,e,t)}Yr.Alias=ei,Xr.default(ei,Zr.Facade),ei.prototype.action=function(){return"alias"},ei.prototype.type=ei.prototype.action,ei.prototype.previousId=function(){return this.field("previousId")||this.field("from")},ei.prototype.from=ei.prototype.previousId,ei.prototype.userId=function(){return this.field("userId")||this.field("to")},ei.prototype.to=ei.prototype.userId;var ti={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});var ri=/.+\@.+\..+/;ni.default=function(e){return ri.test(e)};var ii=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.Group=void 0;var oi=ii(Qr.exports),si=ii(ni),ai=ii(Lr),ui=yr;function ci(e,t){ui.Facade.call(this,e,t)}ti.Group=ci,oi.default(ci,ui.Facade);var li=ci.prototype;li.action=function(){return"group"},li.type=li.action,li.groupId=ui.Facade.field("groupId"),li.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return ai.default(e)},li.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return si.default(t)?t:void 0},li.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},li.name=ui.Facade.proxy("traits.name"),li.industry=ui.Facade.proxy("traits.industry"),li.employees=ui.Facade.proxy("traits.employees"),li.properties=function(){return this.field("traits")||this.field("properties")||{}};var fi={},hi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Identify=void 0;var di=yr,pi=hi(mr.exports),gi=hi(Qr.exports),yi=hi(ni),vi=hi(Lr),mi=function(e){return e.trim()};function _i(e,t){di.Facade.call(this,e,t)}fi.Identify=_i,gi.default(_i,di.Facade);var bi=_i.prototype;bi.action=function(){return"identify"},bi.type=bi.action,bi.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return yi.default(t)?t:void 0},bi.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return vi.default(e)},bi.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return vi.default(e)},bi.companyName=function(){return this.proxy("traits.company.name")},bi.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mi(e);var t=this.firstName(),n=this.lastName();return t&&n?mi(t+" "+n):void 0},bi.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");return"string"==typeof t?mi(t).split(" ")[0]:void 0},bi.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mi(t).indexOf(" ");if(-1!==n)return mi(t.substr(n+1))}},bi.uid=function(){return this.userId()||this.username()||this.email()},bi.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bi.age=function(){var e=this.birthday(),t=pi.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bi.avatar=function(){var e=this.traits();return pi.default(e,"avatar")||pi.default(e,"photoUrl")||pi.default(e,"avatarUrl")},bi.position=function(){var e=this.traits();return pi.default(e,"position")||pi.default(e,"jobTitle")},bi.username=di.Facade.proxy("traits.username"),bi.website=di.Facade.one("traits.website"),bi.websites=di.Facade.multi("traits.website"),bi.phone=di.Facade.one("traits.phone"),bi.phones=di.Facade.multi("traits.phone"),bi.address=di.Facade.proxy("traits.address"),bi.gender=di.Facade.proxy("traits.gender"),bi.birthday=di.Facade.proxy("traits.birthday");var wi={},Ei=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Track=void 0;var Si=Ei(Qr.exports),Oi=yr,xi=fi,Ii=Ei(ni),Ri=Ei(mr.exports);function ki(e,t){Oi.Facade.call(this,e,t)}wi.Track=ki,Si.default(ki,Oi.Facade);var Ci=ki.prototype;Ci.action=function(){return"track"},Ci.type=Ci.action,Ci.event=Oi.Facade.field("event"),Ci.value=Oi.Facade.proxy("properties.value"),Ci.category=Oi.Facade.proxy("properties.category"),Ci.id=Oi.Facade.proxy("properties.id"),Ci.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Ci.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Ci.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Ci.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Ci.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Ci.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Ci.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Ci.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Ci.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Ci.sku=Oi.Facade.proxy("properties.sku"),Ci.tax=Oi.Facade.proxy("properties.tax"),Ci.name=Oi.Facade.proxy("properties.name"),Ci.price=Oi.Facade.proxy("properties.price"),Ci.total=Oi.Facade.proxy("properties.total"),Ci.repeat=Oi.Facade.proxy("properties.repeat"),Ci.coupon=Oi.Facade.proxy("properties.coupon"),Ci.shipping=Oi.Facade.proxy("properties.shipping"),Ci.discount=Oi.Facade.proxy("properties.discount"),Ci.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Ci.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Ci.description=Oi.Facade.proxy("properties.description"),Ci.plan=Oi.Facade.proxy("properties.plan"),Ci.subtotal=function(){var e=Ri.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},Ci.products=function(){var e=this.properties(),t=Ri.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Ci.quantity=function(){return(this.obj.properties||{}).quantity||1},Ci.currency=function(){return(this.obj.properties||{}).currency||"USD"},Ci.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ci.query=Oi.Facade.proxy("options.query"),Ci.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},Ci.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Ci.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return Ii.default(t)?t:void 0},Ci.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},Ci.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Ci.identify=function(){var e=this.json();return e.traits=this.traits(),new xi.Identify(e,this.opts)};var Pi={},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Page=void 0;var Ni=Ai(Qr.exports),Ti=yr,Mi=wi,Li=Ai(ni);function ji(e,t){Ti.Facade.call(this,e,t)}Pi.Page=ji,Ni.default(ji,Ti.Facade);var Ui=ji.prototype;Ui.action=function(){return"page"},Ui.type=Ui.action,Ui.category=Ti.Facade.field("category"),Ui.name=Ti.Facade.field("name"),Ui.title=Ti.Facade.proxy("properties.title"),Ui.path=Ti.Facade.proxy("properties.path"),Ui.url=Ti.Facade.proxy("properties.url"),Ui.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ui.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},Ui.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Li.default(t)?t:void 0},Ui.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Ui.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Ui.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Mi.Track(t,this.opts)};var Di={},zi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.Screen=void 0;var Fi=zi(Qr.exports),Bi=Pi,Hi=wi;function qi(e,t){Bi.Page.call(this,e,t)}Di.Screen=qi,Fi.default(qi,Bi.Page),qi.prototype.action=function(){return"screen"},qi.prototype.type=qi.prototype.action,qi.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},qi.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Hi.Track(t,this.opts)};var Vi={},$i=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.Delete=void 0;var Wi=$i(Qr.exports),Ki=yr;function Gi(e,t){Ki.Facade.call(this,e,t)}function Yi(e,t){var n=new gr.Facade(e,t);return"track"===e.type&&(n=new gr.Track(e,t)),"identify"===e.type&&(n=new gr.Identify(e,t)),"page"===e.type&&(n=new gr.Page(e,t)),"alias"===e.type&&(n=new gr.Alias(e,t)),"group"===e.type&&(n=new gr.Group(e,t)),"screen"===e.type&&(n=new gr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Qi(e,t,n){return mt(this,void 0,void 0,(function(){function r(t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:Yi(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return s.sent(),r||null===i||(i.integrations=vt(vt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return _t(this,(function(e){switch(e.label){case 0:i=Yi(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(a=s[o],[4,r(i,a)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}Vi.Delete=Gi,Wi.default(Gi,Ki.Facade),Gi.prototype.type=function(){return"delete"},function(e){var t=l&&l.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=yr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yr;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=ti;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=fi;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=wi;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Pi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Di;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Vi;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:s.Track,Page:a.Page,Screen:u.Screen,Delete:c.Delete})}(gr);var Ji=Object.freeze({__proto__:null,applyDestinationMiddleware:Qi,sourceMiddlewarePlugin:function(e,t){function n(n){return mt(this,void 0,void 0,(function(){var r;return _t(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:Yi(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Yt({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),Xi=function(){function e(e,t){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=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Qi(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Yt({retry:!1,reason:"dropped by destination middleware"})),[2,new zn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return mt(t,void 0,void 0,(function(){var t;return _t(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function Zi(e,t,n,r,i){var o,s,a;return mt(this,void 0,void 0,(function(){var u,c,l,f,h=this;return _t(this,(function(d){switch(d.label){case 0:return u=[],c=ir(),l=null!==(s=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==s?s:[],f=(null!==(a=e.remotePlugins)&&void 0!==a?a:[]).map((function(e){return mt(h,void 0,void 0,(function(){var o,s,a,f,h,d,p,g,y;return _t(this,(function(v){switch(v.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];v.label=1;case 1:if(v.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];s=e.url.split("/"),a=s[s.length-2],f=e.url.replace(a,btoa(a).replace(/=/g,"")),v.label=2;case 2:return v.trys.push([2,4,,6]),[4,dr(f.replace(o,c))];case 3:return v.sent(),[3,6];case 4:return v.sent(),[4,dr(e.url.replace(o,c))];case 5:return v.sent(),[3,6];case 6:return[3,9];case 7:return[4,dr(e.url.replace(o,c))];case 8:v.sent(),v.label=9;case 9:return h=e.libraryName,"function"!=typeof window[h]?[3,11]:[4,(0,window[h])(vt(vt({},e.settings),n[e.name]))];case 10:d=v.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(p=Array.isArray(d)?d:[d]),g=l.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new Xi(e.creationName,t);g.length&&i&&"destination"===t.type&&n.addMiddleware(i),u.push(n)})),v.label=11;case 11:return[3,13];case 12:return y=v.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,u.filter(Boolean)]}}))}))}var eo=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},to=500;function no(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function ro(e,t){var n,r,i,o=[],s=!1,a=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,u=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function c(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey;return hn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:t,writeKey:r})})}}function l(){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return eo((function(e){if((s=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){no(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(c);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(n){return o.push(t),e=o.length>=a||function(e){return no(e)>=to-50}(o),[2,e||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}var io=function(e,t){return mt(void 0,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return _t(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function oo(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&!cn()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function so(e,t,n,r){var i=this;e||setTimeout((function(){return mt(i,void 0,void 0,(function(){var e,i;return _t(this,(function(o){switch(o.label){case 0:return e=!0,[4,oo(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function ao(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function uo(e,t,n){var r,i,o;return mt(this,void 0,void 0,(function(){function s(r){return mt(this,void 0,void 0,(function(){var i,o;return _t(this,(function(s){return cn()?(u.push(r),so(l,u,v,so),[2,r]):(c.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=Yi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,s=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,g.dispatch("".concat(d,"/").concat(i),Tn(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),so(l,u,v,so),r})).finally((function(){c.delete(r)}))])}))}))}var a,u,c,l,f,h,d,p,g,y,v;return _t(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()})),a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new Ht(e.queue.queue.maxAttempts,[]):new Gn(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),c=new Set,l=!1,f=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Mn,h=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,g="batching"===(null==p?void 0:p.strategy)?ro(f,p.config):(m=null==p?void 0:p.config,{dispatch:function(e,t){return hn(e,{keepalive:null==m?void 0:m.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ao(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:s,identify:s,page:s,alias:s,group:s,screen:s},u.todo&&so(l,u,v,so),[2,v]}var m}))}))}function co(e){var t,n=e.event;!function(e){if(!Tt(e))throw new Ct("Event",Ut);if("object"!=typeof e)throw new Ct("Event",jt)}(n),function(e){if(!Pt(e.type))throw new Ct(".type",Lt)}(n),"track"===n.type&&function(e){if(!Pt(e.event))throw new Ct(".event",Lt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!Mt(r))throw new Ct(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!Tt(n))throw new Ct(t,Ut);if(!Pt(n))throw new Ct(t,Lt)}(n),e}var lo={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:co,identify:co,page:co,alias:co,group:co,screen:co},fo=function(e,t,n){n.getCalls(e).forEach((function(e){mo(t,e).catch(console.error)}))},ho=function(e,t){return mt(void 0,void 0,void 0,(function(){var n,r,i;return _t(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,mo(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},po=fo.bind(void 0,"on"),go=fo.bind(void 0,"setAnonymousId"),yo=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){mo(e,t).catch(console.error)}),0)}))},vo=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function mo(e,t){return mt(this,void 0,void 0,(function(){var n,r;return _t(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(o=n)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var o}))}))}var _o=function(){function e(e){var t=this;this._preInitBuffer=new vo,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=dn,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function bo(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var wo,Eo,So=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(bo)},Oo=null!==(wo=(Eo=fn()).__SEGMENT_INSPECTOR__)&&void 0!==wo?wo:Eo.__SEGMENT_INSPECTOR__={};function xo(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(n){switch(n.label){case 0:return t.push.apply(t,So()),[4,ho(e,t)];case 1:return n.sent(),t.push.apply(t,So()),yo(e,t),t.clear(),[2]}}))}))}function Io(e,t,n,r,i,o,s){var a,u,c;return mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E=this;return _t(this,(function(S){switch(S.label){case 0:return function(e){var t,n,r;return"test"!==tr().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return hd})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return f=S.sent(),[3,3];case 2:f=void 0,S.label=3;case 3:return l=f,O=t,"test"!==tr().NODE_ENV&&Object.keys(O.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return _d})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,s)}))]:[3,5];case 4:return d=S.sent(),[3,6];case 5:d=[],S.label=6;case 6:return h=d,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return bd})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return wd})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return g=S.sent(),[3,11];case 10:g=void 0,S.label=11;case 11:return p=g,y=sr(t,i),[4,Zi(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return v=S.sent(),m=bt(bt(bt([lo,fr],o,!0),h,!0),v,!0),p&&m.push(p),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(b=(_=m).push,[4,uo(n,y["Segment.io"],t.integrations)]);case 13:b.apply(_,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,m)];case 15:return w=S.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Ed})).then((function(e){var r=e.remoteMiddlewares;return mt(E,void 0,void 0,(function(){var e,o;return _t(this,(function(s){switch(s.label){case 0:return[4,r(w,t,i.obfuscate)];case 1:return e=s.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:S.sent(),S.label=17;case 17:return[2,w]}var O}))}))}function Ro(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return _t(this,(function(w){switch(w.label){case 0:return e.cdnURL&&(x=e.cdnURL,window.analytics&&(window.analytics._cdn=x),nr=x),null===(r=e.cdnSettings)||void 0===r?[3,1]:(f=r,[3,3]);case 1:return[4,(E=e.writeKey,S=e.cdnURL,O=null!=S?S:ir(),hn("".concat(O,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:f=w.sent(),w.label=3;case 3:return l=f,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=vt({retryQueue:h},t),function(e){var t;null===(t=Oo.attach)||void 0===t||t.call(Oo,e)}(p=new er(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],Dn.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,So()),go(e,t),po(e,t)}(p,n),[4,Io(e.writeKey,l,p,d,t,g,y)];case 4:return v=w.sent(),m=null!==(u=window.location.search)&&void 0!==u?u:"",_=null!==(c=window.location.hash)&&void 0!==c?c:"",(b=m.length?m:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(b).catch(console.error)]:[3,6];case 5:w.sent(),w.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,xo(p,n)];case 7:return w.sent(),[2,[p,v]]}var E,S,O,x}))}))}var ko=function(e){function t(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),s=o.promise,a=o.resolve;return i=e.call(this,(function(e){return s.then((function(t){return Ro(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return yt(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(_o);let Co;const Po=new Uint8Array(16);function Ao(){if(!Co&&(Co="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Co(Po)}var No=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function Mo(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}function Lo(e){if(!function(e){return"string"==typeof e&&No.test(e)}(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function jo(e,t,n){function r(e,r,i,o){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Lo(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return Mo(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Uo(e){return 14+(e+64>>>9<<4)+1}function Do(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function zo(e,t,n,r,i,o){return Do((s=Do(Do(t,e),Do(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Fo(e,t,n,r,i,o,s){return zo(t&n|~t&r,e,t,i,o,s)}function Bo(e,t,n,r,i,o,s){return zo(t&r|n&~r,e,t,i,o,s)}function Ho(e,t,n,r,i,o,s){return zo(t^n^r,e,t,i,o,s)}function qo(e,t,n,r,i,o,s){return zo(n^(t|~r),e,t,i,o,s)}jo("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Uo(t)-1]=t;let n=1732584193,r=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const s=n,a=r,u=i,c=o;n=Fo(n,r,i,o,e[t],7,-680876936),o=Fo(o,n,r,i,e[t+1],12,-389564586),i=Fo(i,o,n,r,e[t+2],17,606105819),r=Fo(r,i,o,n,e[t+3],22,-1044525330),n=Fo(n,r,i,o,e[t+4],7,-176418897),o=Fo(o,n,r,i,e[t+5],12,1200080426),i=Fo(i,o,n,r,e[t+6],17,-1473231341),r=Fo(r,i,o,n,e[t+7],22,-45705983),n=Fo(n,r,i,o,e[t+8],7,1770035416),o=Fo(o,n,r,i,e[t+9],12,-1958414417),i=Fo(i,o,n,r,e[t+10],17,-42063),r=Fo(r,i,o,n,e[t+11],22,-1990404162),n=Fo(n,r,i,o,e[t+12],7,1804603682),o=Fo(o,n,r,i,e[t+13],12,-40341101),i=Fo(i,o,n,r,e[t+14],17,-1502002290),r=Fo(r,i,o,n,e[t+15],22,1236535329),n=Bo(n,r,i,o,e[t+1],5,-165796510),o=Bo(o,n,r,i,e[t+6],9,-1069501632),i=Bo(i,o,n,r,e[t+11],14,643717713),r=Bo(r,i,o,n,e[t],20,-373897302),n=Bo(n,r,i,o,e[t+5],5,-701558691),o=Bo(o,n,r,i,e[t+10],9,38016083),i=Bo(i,o,n,r,e[t+15],14,-660478335),r=Bo(r,i,o,n,e[t+4],20,-405537848),n=Bo(n,r,i,o,e[t+9],5,568446438),o=Bo(o,n,r,i,e[t+14],9,-1019803690),i=Bo(i,o,n,r,e[t+3],14,-187363961),r=Bo(r,i,o,n,e[t+8],20,1163531501),n=Bo(n,r,i,o,e[t+13],5,-1444681467),o=Bo(o,n,r,i,e[t+2],9,-51403784),i=Bo(i,o,n,r,e[t+7],14,1735328473),r=Bo(r,i,o,n,e[t+12],20,-1926607734),n=Ho(n,r,i,o,e[t+5],4,-378558),o=Ho(o,n,r,i,e[t+8],11,-2022574463),i=Ho(i,o,n,r,e[t+11],16,1839030562),r=Ho(r,i,o,n,e[t+14],23,-35309556),n=Ho(n,r,i,o,e[t+1],4,-1530992060),o=Ho(o,n,r,i,e[t+4],11,1272893353),i=Ho(i,o,n,r,e[t+7],16,-155497632),r=Ho(r,i,o,n,e[t+10],23,-1094730640),n=Ho(n,r,i,o,e[t+13],4,681279174),o=Ho(o,n,r,i,e[t],11,-358537222),i=Ho(i,o,n,r,e[t+3],16,-722521979),r=Ho(r,i,o,n,e[t+6],23,76029189),n=Ho(n,r,i,o,e[t+9],4,-640364487),o=Ho(o,n,r,i,e[t+12],11,-421815835),i=Ho(i,o,n,r,e[t+15],16,530742520),r=Ho(r,i,o,n,e[t+2],23,-995338651),n=qo(n,r,i,o,e[t],6,-198630844),o=qo(o,n,r,i,e[t+7],10,1126891415),i=qo(i,o,n,r,e[t+14],15,-1416354905),r=qo(r,i,o,n,e[t+5],21,-57434055),n=qo(n,r,i,o,e[t+12],6,1700485571),o=qo(o,n,r,i,e[t+3],10,-1894986606),i=qo(i,o,n,r,e[t+10],15,-1051523),r=qo(r,i,o,n,e[t+1],21,-2054922799),n=qo(n,r,i,o,e[t+8],6,1873313359),o=qo(o,n,r,i,e[t+15],10,-30611744),i=qo(i,o,n,r,e[t+6],15,-1560198380),r=qo(r,i,o,n,e[t+13],21,1309151649),n=qo(n,r,i,o,e[t+4],6,-145523070),o=qo(o,n,r,i,e[t+11],10,-1120210379),i=qo(i,o,n,r,e[t+2],15,718787259),r=qo(r,i,o,n,e[t+9],21,-343485551),n=Do(n,s),r=Do(r,a),i=Do(i,u),o=Do(o,c)}return[n,r,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(Uo(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var Vo={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $o(e,t,n){if(Vo.randomUUID&&!t&&!e)return Vo.randomUUID();const r=(e=e||{}).random||(e.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Mo(r)}function Wo(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ko(e,t){return e<<t|e>>>32-t}jo("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,i=Math.ceil(r/16),o=new Array(i);for(let t=0;t<i;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=Ko(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],s=n[1],a=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),o=Ko(i,5)+Wo(n,s,a,u)+c+t[n]+r[e]>>>0;c=u,u=a,a=Ko(s,30)>>>0,s=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));let Go=null;const Yo={};function Qo(){const e=m.exports.useCallback(((e={},t={})=>c(this,void 0,void 0,(function*(){if(Go)return;{const n=ko.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9",cdnURL:"https://proxyseg.api.live.ledger.com/"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=m.exports.useCallback((e=>c(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=m.exports.useCallback((()=>c(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.track(e,n,Go.globalOptions)}))),[]),page:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.page(e,n,Go.globalOptions)}))),[]),addStepToFlow:t,sendUserFlow:n}}let Jo=e=>{};const Xo=({onClose:e,children:t})=>{const{sendUserFlow:n,addStepToFlow:r}=Qo(),[i,o]=m.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()},a=e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()};return i?y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(tt,{}),y.exports.jsx(ot,Object.assign({id:"ModalWrapper",onClick:a},{children:y.exports.jsxs(st,{children:[y.exports.jsxs(ct,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),y.exports.jsx(at,Object.assign({onClick:s},{children:y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),y.exports.jsx(y.exports.Fragment,{children:t})]})}))]}):null};var Zo,es,ts,ns,rs={exports:{}},is={},os={exports:{}},ss={};function as(){return es||(es=1,function(e){e.exports=(Zo||(Zo=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>i(u,n))c<o&&0>i(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else{if(!(c<o&&0>i(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(u,i)}i=n(c)}}function b(e){if(g=!1,_(e),!p)if(null!==n(u))p=!0,N(w);else{var t=n(c);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,v(x),x=-1),d=!0;var o=h;try{for(_(i),f=n(u);null!==f&&(!(f.expirationTime>i)||t&&!k());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(u)&&r(u),_(i)}else r(u);f=n(u)}if(null!==f)var l=!0;else{var y=n(c);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,x=-1,I=5,R=-1;function k(){return!(e.unstable_now()-R<I)}function C(){if(null!==O){var t=e.unstable_now();R=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof m)E=function(){m(C)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=C,E=function(){A.postMessage(null)}}else E=function(){y(C,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){x=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(c,r),null===n(u)&&r===n(c)&&(g?(v(x),x=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(u,r),p||d||(p=!0,N(w))),r},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ss)),ss)}(os)),os.exports}
|
174
174
|
/**
|
175
175
|
* @license React
|
176
176
|
* react-dom.production.min.js
|