PageSourceSearch

https://www.plataforma10.com.br/_next/static/chunks/0hzmfrearpkvx.js

js plataforma10.com.br collected 2026-10-08 20:28:17 UTC 218,396 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,422284,(e,t,r)=>{var n=Object.prototype.hasOwnProperty;function i(e){return"[Throws: "+(e?e.message:"?")+"]"}function o(e){var t=[];return function e(r){if(null===r||"object"!=typeof r)return r;if(-1!==t.indexOf(r))return"[Circular]";if(t.push(r),"function"==typeof r.toJSON)try{var o=e(r.toJSON());return t.pop(),o}catch(e){return i(e)}if(Array.isArray(r)){var a=r.map(e);return t.pop(),a}var s=Object.keys(r).reduce(function(t,o){return t[o]=e(function(e,t){if(n.call(e,t))try{return e[t]}catch(e){return i(e)}return e[t]}(r,o)),t},{});return t.pop(),s}(e)}t.exports=function(e,t,r){return JSON.stringify(o(e),t,r)},t.exports.ensureProperties=o},460953,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Observable=void 0;let n=e=>!!Symbol[e],i=e=>n(e)?Symbol[e]:"@@"+e,o=i("iterator"),a=i("observable"),s=i("species");function u(e,t){let r=e[t];if(null!=r){if("function"!=typeof r)throw TypeError(r+" is not a function");return r}}function l(e){let t=e.constructor;return void 0!==t&&null===(t=t[s])&&(t=void 0),void 0!==t?t:m}function c(e){c.log?c.log(e):setTimeout(()=>{throw e})}function d(e){Promise.resolve().then(()=>{try{e()}catch(e){c(e)}})}function f(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=u(t,"unsubscribe");e&&e.call(t)}}catch(e){c(e)}}function p(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function g(e,t,r){e._state="running";let n=e._observer;try{let i=u(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(p(e),i)i.call(n,r);else throw r;break;case"complete":p(e),i&&i.call(n)}}catch(e){c(e)}"closed"===e._state?f(e):"running"===e._state&&(e._state="ready")}function h(e,t,r){if("closed"!==e._state){if("buffering"===e._state)return void e._queue.push({type:t,value:r});if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:r}],d(()=>(function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(g(e,t[r].type,t[r].value),"closed"!==e._state);++r);}})(e));return}g(e,t,r)}}class v{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let r=this,n={get closed(){return"closed"===r._state},next(e){h(r,"next",e)},error(e){h(r,"error",e)},complete(){h(r,"complete")}};try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(p(this),f(this))}}class m{constructor(e){if(!(this instanceof m))throw TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new v(e,this._subscriber)}forEach(e){return new Promise((t,r)=>{if("function"!=typeof e)return void r(TypeError(e+" is not a function"));function n(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,n)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t})})}map(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return new(l(this))(t=>this.subscribe({next(r){try{r=e(r)}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return new(l(this))(t=>this.subscribe({next(r){try{if(!e(r))return}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw TypeError(e+" is not a function");let t=l(this),r=arguments.length>1,n=!1,i=arguments[1],o=i;return new t(t=>this.subscribe({next(i){let a=!n;if(n=!0,!a||r)try{o=e(o,i)}catch(e){return t.error(e)}else o=i},error(e){t.error(e)},complete(){if(!n&&!r)return t.error(TypeError("Cannot reduce an empty sequence"));t.next(o),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=l(this);return new t(r=>{let n,i=0;return!function o(a){n=a.subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){i===e.length?(n=void 0,r.complete()):o(t.from(e[i++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}})}flatMap(e){if("function"!=typeof e)throw TypeError(e+" is not a function");let t=l(this);return new t(r=>{let n=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return r.error(e)}let a=t.from(i).subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){let e=n.indexOf(a);e>=0&&n.splice(e,1),o()}});n.push(a)},error(e){r.error(e)},complete(){o()}});function o(){i.closed&&0===n.length&&r.complete()}return()=>
1{n.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[a](){return this}static from(e){let t="function"==typeof this?this:m;if(null==e)throw TypeError(e+" is not an object");let r=u(e,a);if(r){let n=r.call(e);if(Object(n)!==n)throw TypeError(n+" is not an object");return n instanceof m&&n.constructor===t?n:new t(e=>n.subscribe(e))}if(n("iterator")&&(r=u(e,o)))return new t(t=>{d(()=>{if(!t.closed){for(let n of r.call(e))if(t.next(n),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{d(()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}})});throw TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:m)(t=>{d(()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}})})}static get[s](){return this}}r.Observable=m,Object.defineProperty(m,Symbol("extensions"),{value:{symbol:a,hostReportError:c},configurable:!0})},881243,(e,t,r)=>{t.exports=e.r(460953).Observable},283690,748815,436370,37745,e=>{"use strict";let t;var r,n,i,o,a,s,u,l,c,d,f,p,g,h,v,m,_,y,b,w,E,S,T,k,A,I,P,x,C,O,R,D,N,L,M,U,j,F,q=e.i(290571);(r=b||(b={}))[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Verbose=3]="Verbose",r[r.Debug=4]="Debug";var B=function(e){return void 0===e&&(e=0),(Error().stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},H=function(e){return function(){var t=(0,q.__assign)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},V=function(e,t){var r,n;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,q.__values)(t.split(".")),o=i.next();!o.done;o=i.next()){var a=o.value;if(!(a in e))return;e=e[a]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},z=function(e,t){return function(){var r,n,i={};try{for(var o=(0,q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;i[s]=V(e,s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},$=function(e,t,r,n,i){return void 0===i&&(i=null),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=r(),u=s.logger,l=s.logLevel;if(l&&l<b.Debug||!l||!u)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:B(1),time:{start:new Date().toISOString()},states:{}};n&&c.states&&(c.states.before=n());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){n&&c.states&&(c.states.after=n()),c.time&&(c.time.end=new Date().toISOString()),u.debug(JSON.stringify(c,null,2))}):(n&&c.states&&(c.states.after=n()),c.time&&(c.time.end=new Date().toISOString()),u.debug(JSON.stringify(c,null,2))),d}};(n=w||(w={})).SET="$set",n.SET_ONCE="$setOnce",n.ADD="$add",n.APPEND="$append",n.PREPEND="$prepend",n.REMOVE="$remove",n.PREINSERT="$preInsert",n.POSTINSERT="$postInsert",n.UNSET="$unset",n.CLEAR_ALL="$clearAll",(i=E||(E={})).IDENTIFY="$identify",i.GROUP_IDENTIFY="$groupidentify",i.REVENUE="revenue_amount";var W="".concat("AMP","_unsent"),J="$default_instance",K="https://api2.amplitude.com/2/httpapi",G="https://api.eu.amplitude.com/2/httpapi",Y="https://api2.amplitude.com/batch",X="https://api.eu.amplitude.com/batch",Q="dclid",Z="fbclid",ee="gbraid",et="gclid",er="ko_click_id",en="li_fat_id",ei="msclkid",eo="rdt_cid",ea="ttclid",es="twclid",eu="wbraid",el={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},ec=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],ed=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var r=e[t];if(!ef(t,r))return!1}return!0},ef=function(e,t){var r,n;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=(0,q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&ed(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else if(null==t)return!1;else if("object"==typeof t)return ed(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},ep=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,q.__assign)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(S.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(S.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(S.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(S.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(S.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(S.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(S.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(S.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(S.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[S.CLEAR_ALL]="-",this}
1,e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,r){return!(void 0!==this._properties[S.CLEAR_ALL]||this._propertySet.has(t))&&(e===S.ADD?"number"==typeof r:e===S.UNSET||e===S.REMOVE||ef(t,r))},e}();(o=S||(S={})).SET="$set",o.SET_ONCE="$setOnce",o.ADD="$add",o.APPEND="$append",o.PREPEND="$prepend",o.REMOVE="$remove",o.PREINSERT="$preInsert",o.POSTINSERT="$postInsert",o.UNSET="$unset",o.CLEAR_ALL="$clearAll";var eg=[S.CLEAR_ALL,S.UNSET,S.SET,S.SET_ONCE,S.ADD,S.APPEND,S.PREPEND,S.PREINSERT,S.POSTINSERT,S.REMOVE];e.s(["Identify",0,ep,"OrderedIdentifyOperations",0,eg],748815),(a=T||(T={})).Unknown="unknown",a.Skipped="skipped",a.Success="success",a.RateLimit="rate_limit",a.PayloadTooLarge="payload_too_large",a.Invalid="invalid",a.Failed="failed",a.Timeout="Timeout",a.SystemError="SystemError";var eh=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=T.Unknown),{event:e,code:t,message:r}},ev=function(){var t="ampIntegrationContext";return"u">typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g},em=(0,q.__spreadArray)([],(0,q.__read)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),e_=function(e){var t,r=ev();if(!(null==(t=null==r?void 0:r.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e_);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,(0,q.__spreadArray)([],(0,q.__read)(n.entries()),!1).map(function(e){var t=(0,q.__read)(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(em[n]):em[n]}).join("")},ey=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var r,n;return(0,q.__awaiter)(this,void 0,void 0,function(){var i;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(void 0===e.name&&(e.name=e_(),this.loggerProvider.warn("Plugin name is undefined.\n      Generating a random UUID for plugin name: ".concat(e.name,".\n      Set a name for the plugin to prevent it from being added multiple times."))),i=e.name,this.pluginStatus.has(i))return this.loggerProvider.warn("Plugin with name ".concat(i," already exists, skipping registration")),[2];return e.type=null!=(r=e.type)?r:"enrichment",this.pluginStatus.set(i,"locked"),[4,null==(n=e.setup)?void 0:n.call(e,t,this.client)];case 1:if(o.sent(),"locked"!==this.pluginStatus.get(i))return[2];return this.plugins.push(e),this.pluginStatus.set(i,"installed"),[2]}})})},e.prototype.deregister=function(e,t){var r;return(0,q.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(this.pluginStatus.delete(e),-1===(n=this.plugins.findIndex(function(t){return t.name===e})))return t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2];return i=this.plugins[n],this.plugins.splice(n,1),[4,null==(r=i.teardown)?void 0:r.call(i)];case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),this.applying=!1,this.plugins.map(function(e){var t;return null==(t=e.teardown)?void 0:t.call(e)}),this.plugins=[],this.pluginStatus.clear(),this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(r){t.queue.push([e,r]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a,s,u,l,c,d,f,p,g,h;return(0,q.__generator)(this,function(v){switch(v.label){case 0:if(!e)return[2];t=(0,q.__read)(e,1)[0],r=(0,q.__read)(e,2)[1],this.loggerProvider.log("Timeline.apply: Initial event",t),n=this.plugins.filter(function(e){return"before"===e.type}),v.label=1;case 1:v.trys.push([1,6,7,8]),o=(i=(0,q.__values)(n)).next(),v.label=2;case 2:if(o.done)return[3,5];if(!(a=o.value).execute)return[3,4];return[4,a.execute((0,q.__assign)({},t))];case 3:if(null===(s=v.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),v.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return f={error:v.sent()},[3,8];
1case 7:try{o&&!o.done&&(p=i.return)&&p.call(i)}finally{if(f)throw f.error}return[7];case 8:u=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),v.label=9;case 9:v.trys.push([9,14,15,16]),c=(l=(0,q.__values)(u)).next(),v.label=10;case 10:if(c.done)return[3,13];if(!(a=c.value).execute)return[3,12];return[4,a.execute((0,q.__assign)({},t))];case 11:if(null===(s=v.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),v.label=12;case 12:return c=l.next(),[3,10];case 13:return[3,16];case 14:return g={error:v.sent()},[3,16];case 15:try{c&&!c.done&&(h=l.return)&&h.call(l)}finally{if(g)throw g.error}return[7];case 16:return d=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(t))),Promise.all(d.map(function(e){var r=(0,q.__assign)({},t);return e.execute(r).catch(function(e){return eh(r,0,String(e))})})).then(function(e){var n=(0,q.__read)(e,1)[0]||eh(t,100,"Event not tracked, no destination plugins on the instance");r(n)}),[2]}})})},e.prototype.flush=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,q.__generator)(this,function(r){switch(r.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return r.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return r.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onIdentityChanged)||r.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onSessionIdChanged)||r.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onOptOutChanged)||r.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a;return(0,q.__generator)(this,function(s){switch(s.label){case 0:s.trys.push([0,7,8,9]),r=(t=(0,q.__values)(this._optOutListeners)).next(),s.label=1;case 1:if(r.done)return[3,6];n=r.value,s.label=2;case 2:return s.trys.push([2,4,,5]),[4,n(e)];case 3:return s.sent(),[3,5];case 4:return i=s.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return r=t.next(),[3,1];case 6:return[3,9];case 7:return o={error:s.sent()},[3,9];case 8:try{r&&!r.done&&(a=t.return)&&a.call(t)}finally{if(o)throw o.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null==(t=e.onReset)||t.call(e)})},e}(),eb=function(e,t){return(0,q.__assign)((0,q.__assign)({},t),{event_type:E.IDENTIFY,user_properties:e.getUserProperties()})},ew=function(e,t,r,n){var i;return(0,q.__assign)((0,q.__assign)({},n),{event_type:E.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:((i={})[e]=t,i)})},eE=function(e,t,r){var n,i=new ep;return i.set(e,t),(0,q.__assign)((0,q.__assign)({},r),{event_type:E.IDENTIFY,user_properties:i.getUserProperties(),groups:((n={})[e]=t,n)})},eS=function(e){return{promise:e||Promise.resolve()}},eT=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new ey(this),this.name=e}return e.prototype._init=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a;return(0,q.__generator)(this,function(s){switch(s.label){case 0:t=this[e],this[e]=[],s.label=1;case 1:s.trys.push([1,8,9,10]),n=(r=(0,q.__values)(t)).next(),s.label=2;case 2:if(n.done)return[3,7];if(!((i=(0,n.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return s.sent(),[3,6];case 4:return[4,i];case 5:s.sent(),s.label=6;case 6:return n=r.next(),[3,2];case 7:return[3,10];case 8:return o={error:s.sent()},[3,10];case 9:try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(o)throw o.error}
1return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:s.sent(),s.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,r){var n=(0,q.__assign)((0,q.__assign)((0,q.__assign)({},"string"==typeof e?{event_type:e}:e),r),t&&{event_properties:t});return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),eS(this.dispatch(n))},e.prototype.identify=function(e,t){var r=eb(e,t);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),eS(this.dispatch(r))},e.prototype.groupIdentify=function(e,t,r,n){var i=ew(e,t,r,n);return eS(this.dispatch(i))},e.prototype.setGroup=function(e,t,r){var n=eE(e,t,r);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),eS(this.dispatch(n))},e.prototype.revenue=function(e,t){var r=(0,q.__assign)((0,q.__assign)({},t),{event_type:E.REVENUE,event_properties:e.getEventProperties()});return eS(this.dispatch(r))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),eS())},e.prototype._addPlugin=function(e){return eS(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),eS())},e.prototype._removePlugin=function(e){return eS(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(eh(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t=this;return(0,q.__generator)(this,function(r){return this.isReady?[2,this.process(e)]:[2,new Promise(function(r){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,r))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,r=null!=(t=this.userProperties)?t:{},n=(0,q.__assign)({},r);if(void 0===e)return n;var i={};return Object.keys(e).forEach(function(t){Object.values(w).includes(t)||(i[t]=e[t])}),eg.forEach(function(t){if(Object.keys(e).includes(t)){var r=e[t];switch(t){case w.CLEAR_ALL:Object.keys(n).forEach(function(e){delete n[e]});break;case w.UNSET:Object.keys(r).forEach(function(e){delete n[e]});break;case w.SET:Object.assign(n,r)}}}),Object.assign(n,i),n},e.prototype.process=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r;return(0,q.__generator)(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),this.config.optOut)return[2,eh(e,0,"Event skipped due to optOut config")];return e.event_type===E.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)];case 1:return 200===(t=n.sent()).code?this.config.loggerProvider.log(t.message):100===t.code?this.config.loggerProvider.warn(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return r=String(n.sent()),this.config.loggerProvider.error(r),[2,t=eh(e,0,r)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,!!e))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=!!e,this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return eS(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});return void 0===t?void this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e)):t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),ek=function(e,t){var r=Math.max(t,1);return e.reduce(function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e},[])},eA="Amplitude Logger ",eI=function(){function e(){this.logLevel=b.None}return e.prototype.disable=function(){this.logLevel=b.None},e.prototype.enable=function(e){void 0===e&&(e=b.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<b.Verbose||console.log("".concat(eA,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<b.Warn||console.warn("".concat(eA,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<b.Error||console.error("".concat(eA,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<b.Debug||console.log("".concat(eA,"[Debug]: ").concat(e.join(" ")))},e}(),eP=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:J,logLevel:b.Warn,loggerProvider:new eI,offline:!1,optOut:!1,serverUrl:K,serverZone:"US",useBatch:!1}},ex=function(){function e(e){this._optOut=!1;var t,r,n,i,o=eP();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!=(r=e.logLevel)?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!=(n=e.optOut)?n:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=eC(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
1,enumerable:!1,configurable:!0}),e}(),eC=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=eP().serverZone),void 0===r&&(r=eP().useBatch),e)return{serverUrl:e,serverZone:void 0};var n,i=["US","EU"].includes(t)?t:eP().serverZone;return{serverZone:i,serverUrl:(n=r,"EU"===i?n?X:G:n?Y:K)}},eO=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function eR(e){return e>=200&&e<300}var eD=new Set([K,G,Y,X]);function eN(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var eL=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return(0,q.__awaiter)(this,void 0,void 0,function(){var r,n=this;return(0,q.__generator)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(W,"_").concat(this.config.apiKey.substring(0,10)),[4,null==(t=this.config.storageProvider)?void 0:t.get(this.storageKey)];case 1:return(r=i.sent())&&r.length>0&&Promise.all(r.map(function(e){return n.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=e_()),new Promise(function(r){t.queue.push({event:e,attempts:0,callback:function(e){return r(e)},timeout:0}),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n=this;return(0,q.__generator)(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2];if(this.flushId)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2];return this.flushId=this.scheduleId,this.resetSchedule(),t=[],r=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):r.push(e)}),[4,ek(t,this.config.flushQueueSize).reduce(function(t,r){return(0,q.__awaiter)(n,void 0,void 0,function(){return(0,q.__generator)(this,function(n){switch(n.label){case 0:return[4,t];case 1:return n.sent(),[4,this.send(r,e)];case 2:return[2,n.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){var r;return void 0===t&&(t=!0),(0,q.__awaiter)(this,void 0,void 0,function(){var n,i,o,a,s;return(0,q.__generator)(this,function(u){var l,c,d;switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,q.__rest)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new eO,u.label=1;case 1:return u.trys.push([1,3,,4]),l=i=eC(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,void 0===(c=this.config.enableRequestBodyCompression)&&(c=!1),o=!!eD.has(l)||c,[4,this.config.transportProvider.send(i,n,o)];case 2:if(null===(a=u.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in a?this.fulfillRequest(e,a.statusCode,"".concat(a.status,": ").concat(eN(a))):this.fulfillRequest(e,a.statusCode,a.status),[2];return this.handleResponse(a,e),[3,4];case 3:return s=(d=u.sent())instanceof Error?d.message:String(d),this.config.loggerProvider.error(s),null==(r=this.diagnosticsClient)||r.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:s,stack_trace:B()}),this.handleResponse({status:T.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){eR(e.statusCode)||null==(r=this.diagnosticsClient)||r.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:eN(e),stack_trace:B()});var r,n=e.status;switch(n){case T.Success:this.handleSuccessResponse(e,t);break;case T.Invalid:this.handleInvalidResponse(e,t);break;case T.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case T.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(n,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var r=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))return void this.fulfillRequest(t,e.statusCode,e.body.error);var n=new Set((0,q.__spreadArray)((0,q.__spreadArray)((0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,q.__read)(Object.values(e.body.eventsWithMissingFields)),!1),(0,q.__read)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,q.__read)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){return!n.has(i)||void r.fulfillRequest([t],e.statusCode,e.body.error)});i.length>0&&this.config.loggerProvider.warn(eN(e));
1var o=this.removeEventsExceedFlushMaxRetries(i);this.scheduleEvents(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length)return void this.fulfillRequest(t,e.statusCode,e.body.error);this.config.loggerProvider.warn(eN(e)),this.config.flushQueueSize/=2;var r=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(r)},e.prototype.handleRateLimitResponse=function(e,t){var r=this,n=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,a=new Set(n),s=new Set(i),u=new Set(o),l=t.filter(function(t,n){return t.event.user_id&&a.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)?void r.fulfillRequest([t],e.statusCode,e.body.error):(u.has(n)&&(t.timeout=r.throttleTimeout),!0)});l.length>0&&this.config.loggerProvider.warn(eN(e));var c=this.removeEventsExceedFlushMaxRetries(l);this.scheduleEvents(c)},e.prototype.handleOtherResponse=function(e){var t=this,r=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),n=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(n)},e.prototype.fulfillRequest=function(e,t,r){var n,i,o;eR(t)?null==(o=this.diagnosticsClient)||o.increment("analytics.events.sent",e.length):(null==(n=this.diagnosticsClient)||n.increment("analytics.events.dropped",e.length),null==(i=this.diagnosticsClient)||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:r,stack_trace:B()})),this.removeEvents(e),e.forEach(function(e){return e.callback(eh(e.event,t,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),eM=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));ed(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?(0,q.__assign)({},this.properties):{};return e[k.REVENUE_PRODUCT_ID]=this.productId,e[k.REVENUE_QUANTITY]=this.quantity,e[k.REVENUE_PRICE]=this.price,e[k.REVENUE_TYPE]=this.revenueType,e[k.REVENUE_CURRENCY]=this.currency,e[k.REVENUE]=this.revenue,e[k.RECEIPT]=this.receipt,e[k.RECEIPT_SIG]=this.receiptSig,e},e}();(s=k||(k={})).REVENUE_PRODUCT_ID="$productId",s.REVENUE_QUANTITY="$quantity",s.REVENUE_PRICE="$price",s.REVENUE_TYPE="$revenueType",s.REVENUE_CURRENCY="$currency",s.REVENUE="$revenue",s.RECEIPT="$receipt",s.RECEIPT_SIG="$receiptSig";var eU=e.i(304230),ej=function(e){return void 0===e&&(e=J),eU.AnalyticsConnector.getInstance(e)},eF=function(e,t){ej(t).identityStore.editIdentity().setUserId(e).commit()},eq=function(e,t){ej(t).identityStore.editIdentity().setDeviceId(e).commit()},eB=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},eH=function(){function e(){this.name="identity",this.type="before",this.identityStore=ej().identityStore}return e.prototype.execute=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return e.instanceName&&(this.identityStore=ej(e.instanceName).identityStore),[2]})})},e}(),eV=function(){var e,t=ev();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(
1Boolean).reduce(function(e,t){var r=t.split("=",2),n=ez(r[0]),i=ez(r[1]);return i&&(e[n]=i),e},{}):{}},ez=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},e$=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var r=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}(),eW=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=n||("US"===r?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new e$(e,t)}return e.prototype.subscribe=function(e,t,r){var n=e_(),i={id:n,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),n},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return -1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,q.__generator)(this,function(r){switch(r.label){case 0:if(this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5)return this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2];return[4,this.getOrCreateFetchPromise()];case 1:return e=r.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(r){t.sendCallback(r,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||(this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null})):this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null})),this.fetchPromise},e.prototype.subscribeAll=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,q.__generator)(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),r=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,r])];case 1:return void 0!==(n=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(n))),null!==n.remoteConfig?this.sendCallback(e,n,"cache"):this.logger.debug("Remote config client skips sending c
1allback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return(0,q.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:r=new Promise(function(e,r){setTimeout(function(){r("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),r])];case 2:return n=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,n,"remote"),this.storage.setConfig(n),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(n=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,n,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,n,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,r){var n;e.lastCallback=new Date,n=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(n,r,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),(0,q.__awaiter)(this,void 0,void 0,function(){var r,n,i,o,a,s,u=this;return(0,q.__generator)(this,function(l){switch(l.label){case 0:r=t/e,n={remoteConfig:null,lastFetch:new Date},i=function(n){var i,a,s,l,c,d;return(0,q.__generator)(this,function(f){switch(f.label){case 0:i=!0,a=new AbortController,s=setTimeout(function(){return a.abort()},t),f.label=1;case 1:return f.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:a.signal})];case 2:if((l=f.sent()).ok)return[3,4];return[4,l.text()];case 3:return c=f.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(l.status,": ").concat(c)),401===l.status||403===l.status?(o.logger.error("Remote config client fetch failed with ".concat(l.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):l.status>=400&&l.status<500&&429!==l.status&&(i=!1),[3,6];case 4:return[4,l.json()];case 5:return[2,{value:{remoteConfig:f.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(d=f.sent())instanceof Error&&"AbortError"===d.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),d),[3,9];case 8:return clearTimeout(s),[7];case 9:if(!i)return[2,"break"];if(!(n<e-1))return[3,11];return[4,new Promise(function(e){return setTimeout(e,u.getJitterDelay(r))})];case 10:f.sent(),f.label=11;case 11:return[2]}})},o=this,a=0,l.label=1;case 1:if(!(a<e))return[3,4];return[5,i(a)];case 2:if("object"==typeof(s=l.sent()))return[2,s.value];if("break"===s)return[3,4];l.label=3;case 3:return a++,[3,1];case 4:return[2,n]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),r=new URLSearchParams;return r.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(r.toString())},e.CONFIG_GROUP="browser",e}(),eJ="tags",eK="counters",eG="histograms",eY="events",eX="internal",eQ="last_flush_timestamp",eZ=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return(null==(e=ev())?void 0:e.indexedDB)!==void 0},e.prototype.getDB=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,r){var n=indexedDB.open(e.dbName,1);n.onerror=function(){e.dbPromise=null,r(Error("Failed to open IndexedDB"))},n.onsuccess=function(){var r=n.result;r.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},r.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),r.close()},t(r)},n.onupgradeneeded=function(t){var r=t.target.result;e.createTables(r)}})},e.prototype.createTables=function(e){e.objectStoreNames.contains(eJ)||e.createObjectStore(eJ,{keyPath:"key"}),e.objectStoreNames.contains(eK)||e.createObjectStore(eK,{keyPath:"key"}),e.objectStoreNames.contains(eG)||e.createObjectStore(eG,{keyPath:"key"}),e.objectStoreNames.contains(eY)||e.createObjectStore(eY,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1}),e.objectStoreNames.contains(eX)||e.createObjectStore(eX,{keyPath:"key"})},e.prototype.setTags=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(o.tr
1ys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([eJ],"readwrite")).objectStore(eJ),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tags",e),n()},o.forEach(function(e){var t=(0,q.__read)(e,2),n=t[0],o=t[1];r.put({key:n,value:o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tag",n,o,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",n),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([eK],"readwrite")).objectStore(eK),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to increment counters",e),n()},o.forEach(function(e){var t=(0,q.__read)(e,2),n=t[0],o=t[1],a=r.get(n);a.onsuccess=function(){var e=a.result,t=e?e.value:0;r.put({key:n,value:t+o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},a.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",n),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([eG],"readwrite")).objectStore(eG),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),n()},o.forEach(function(e){var t=(0,q.__read)(e,2),n=t[0],o=t[1],a=r.get(n);a.onsuccess=function(){var e,t=a.result;e=t?{key:n,count:t.count+o.count,min:Math.min(t.min,o.min),max:Math.max(t.max,o.max),sum:t.sum+o.sum}:{key:n,count:o.count,min:o.min,max:o.max,sum:o.sum},r.put(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},a.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===e.length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([eY],"readwrite")).objectStore(eY),[2,new Promise(function(n){t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event records",e),n()};var o=r.count();o.onsuccess=function(){var t=Math.max(0,10-o.result);t<e.length&&i.logger.debug("DiagnosticsStorage: Only added ".concat(t," of ").concat(e.length," events due to storage limit")),e.slice(0,t).forEach(function(e){r.add(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},o.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",n),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return(0,q.__awaiter)(this,void 0,void 0,function(){var r,n,i;return(0,q.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=(r=o.sent().transaction([eX],"readwrite")).objectStore(eX),[2,new Promise(function(i,o){r.onabort=function(){return o(Error("Failed to set internal value"))};var a=n.put({key:e,value:t});a.onsuccess=function(){return i()},a.onerror=function(){return o(Error("Failed to set internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",i),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=(t=i.sent().transaction([eX],"readonly")).objectStore(eX),[2,new Promise(function(n,i){t.onabort=function(){return i(Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return n(o.result)},o.onerror=function(){return i(Error("Failed to get internal value"))}})];case 2:return n=i.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",n),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getInternal(eQ)];case 1:return[2,(e=r.sent())?parseInt(e.value,10):void 0];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.setInternal(eQ,e.toString())];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).clear();i.onsuccess=function(){return r()},i.onerror=function(){return n(Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,o,a;return(0,q.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=s.sent().transaction([eJ,eK,eG,eY],"readwrite"),[4,Promise.all([this.getAllFromStore(e,eJ),this.getAllFromStore(e,eK),this.getAllFromStore(e,eG),this.getAllFromStore(e,eY)])];case 2:return r=(t=q.__read.apply(void 0,[s.sent(),4]))[0],n=t[1],i=t[2],o=t[3],[4,Promise.all([this.clearTable(e,eK),this.clearTable(e,eG),this.clearTable(e,eY)])];case 3:return s.sent(),[2,{tags:r,counters:n,histogramStats:i,events:o}];case 4:return a=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",a),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).getAll();i.onsuccess=function(){return r(i.result)},i.onerror=function(){return n(Error("Failed to get all from ".concat(t)))}})},e}(),e0=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t}
1,e1=function(e,t){return 31*Math.abs(e0(e.toString()))%1e5/1e5<t},e2=function(){var e=ev();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]},e3=function(e){var t=ev();if(t&&"function"==typeof t.addEventListener){var r=function(t){e.recordEvent("sdk.error.uncaught",(0,q.__assign)({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,n=null==t?void 0:t.stack,i=e4({filename:e.filename,stack:n});i&&r({type:"error",message:e.message,stack:n,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,n=e.reason instanceof Error?e.reason:void 0,i=null==n?void 0:n.stack,o=e5(i),a=e4({filename:o,stack:i});a&&r({type:"unhandledrejection",message:null!=(t=null==n?void 0:n.message)?t:e6(e.reason),stack:i,filename:o,errorName:null==n?void 0:n.name,metadata:{isTrusted:e.isTrusted,matchReason:a}})},!0)}},e4=function(e){var t,r,n=e2();if(0!==n.length)try{for(var i=(0,q.__values)(n),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.filename&&e.filename.includes(a))return"filename";if(e.stack&&e.stack.includes(a))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e5=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},e6=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},e8=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===r?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(n,null,2)),this.config=(0,q.__assign)({enabled:!0,sampleRate:0},n),this.startTimestamp=Date.now(),this.shouldTrack=e1(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,eZ.isSupported()?this.storage=new eZ(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),e3(this))}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");this.inMemoryTags[e]=t,this.startTimersIfNeeded()}},e.prototype.increment=function(e,t){if(void 0===t&&(t=1),this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");var r=this.inMemoryHistograms[e];r?(r.count+=1,r.min=Math.min(r.min,t),r.max=Math.max(r.max,t),r.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=10)return void this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},3e5))},e.prototype.saveAllDataToStorage=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t,r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];return e=(0,q.__assign)({},this.inMemoryTags),t=(0,q.__assign)({},this.inMemoryCounters),r=(0,q.__assign)({},this.inMemoryHistograms),n=(0,q.__spreadArray)([],(0,q.__read)(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(r),this.storage.addEventRecords(n)])];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,o,a,s,u,l;return(0,q.__generator)(this,function(c){switch(c.label){case 0:if(!this.storage)return[2];return[4,this.saveAllDataToStorage()];case 1:return c.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:if(t=(e=c.sent()).tags,r=e.counters,n=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),a={},r.forEach(function(e){a[e.key]=e.value}),s={}
1,n.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),u=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(a).length&&0===Object.keys(s).length&&0===u.length)return[2];return l={tags:o,histogram:s,counters:a,events:u},this.fetch(l),[2]}})})},e.prototype.fetch=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),!ev())throw Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:if(!r.sent().ok)return this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2];return this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t,r;return(0,q.__generator)(this,function(n){switch(n.label){case 0:if(!this.storage)return[2];return e=Date.now(),[4,this.storage.getLastFlushTimestamp()];case 1:if(-1===(t=n.sent()||-1))return this.storage.setLastFlushTimestamp(e),this._setFlushTimer(3e5),[2];return(r=e-t)>=3e5?this._flush():this._setFlushTimer(3e5-r),[2]}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=e1(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),e7=e.i(422284),e9=e7.default||e7,te=function(e,t){var r,n,i;return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1&&("string"!=typeof(null==(n=null==(r=null==(i=ev())?void 0:i.chrome)?void 0:r.runtime)?void 0:n.id)||!!(null==e?void 0:e[t]))},tt=function(e){return te(e,"attribution")},tr=function(e){return te(e,"formInteractions")},tn=function(e){return te(e,"pageViews")},ti=function(e){return te(e,"sessions")},to=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},ta=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},ts=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},tu=function(e){if("object"==typeof e.autocapture){var t=e.autocapture.performanceTracking;if(!0===t)return{mainThreadBlock:!0};if("object"==typeof t&&null!==t)return t}},tl=function(e){if(ta(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},tc=function(e){if(ts(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},td=function(e){var t;if(to(e.autocapture)){var r=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?r=e.autocapture.networkTracking:e.networkTrackingOptions&&(r=e.networkTrackingOptions),(0,q.__assign)((0,q.__assign)({},r),{captureRules:null==(t=null==r?void 0:r.captureRules)?void 0:t.map(function(t){var r,n,i;if((null==(r=t.urls)?void 0:r.length)&&(null==(n=t.hosts)?void 0:n.length)){var o=JSON.stringify(t.hosts),a=JSON.stringify(t.urls);return null==(i=e.loggerProvider)||i.warn("Found network capture rule with both urls='".concat(a,"' and hosts='").concat(o,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),(0,q.__assign)((0,q.__assign)({},t),{hosts:void 0})}return t})})}},tf=function(e){var t,r=function(){return!1},n=void 0,i=e.pageCounter;return tn(e.defaultTracking)&&(r=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:r,trackHistoryChanges:n,eventType:t,pageCounter:i}},tp=function(e){if(tr(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions},tg=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var u=s.apply(e,o);"function"==typeof a&&a(null==u?void 0:u.promise)}}return e},th=function(e){return e&&void 0!==e._q},tv=function(){if("u"<typeof navigator)return"";var e,t,r,n,i=navigator.userLanguage;return null!=(n=null!=(r=null!=(t=null==(e=navigator.languages)?void 0:e[0])?t:navigator.language)?r:i)?n:""},tm="2.42.3",t_="amplitude-ts",ty=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(t_,"/").concat(tm),"u">typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,r;return(0,q.__awaiter)(this,void 0,void 0,function(){var n,i,o;return(0,q.__generator)(this,function(a){return n=new Date().getTime(),i=null!=(t=this.config.lastEventId)?t:-1,o=null!=(r=e.event_id)?r:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=n),[2,(0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:n},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:tv()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:e_(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:o,library:this.library,user_agent:this.userAgent})]})})},e}(),tb=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:return[4,this.get(e)];case 1:return[2,(t=r.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),tw=function(){var e,t=ev();return null==(e=null==t?void 0:t.navigator)?void 0:e.locks},tE=function(){function e(e,t){void 0===t&&(t={}),this.options=(0,q.__assign)({},e),this.config=t}return e.prototype.isEnabled=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,q.__generator)(this,function(o){switch(o.label){case 0:return t="AMP_TEST",r=new e((0,q.__assign)({},this.options)),n=String(Date.now()),[4,r.transaction(t,function(e){var r,o;try{e.set(n);var a=e.get()===n;return!a&&i.config.diagnosticsClient&&(null==(r=i.config.diagnosticsClient)||r.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:n,sync:!0})),a}catch(e){if(i.config.diagnosticsClient){var s=e instanceof Error?e.message:String(e);null==(o=i.config.diagnosticsClient)||o.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:n,error:s,sync:!0})}return!1}
1finally{e.set(null)}})];case 1:return[2,o.sent()]}})})},e.prototype.get=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:return[4,this.getRaw(e)];case 1:return t=r.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var r=tk(t);if(void 0===r)return void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t));return JSON.parse(r)}catch(r){console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t));return}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,r;return(0,q.__awaiter)(this,void 0,void 0,function(){var n,i,o,a,s,u,l,c;return(0,q.__generator)(this,function(d){switch(d.label){case 0:n=ev(),d.label=1;case 1:if(d.trys.push([1,4,,5]),!(i=null==n?void 0:n.cookieStore))return[3,3];return[4,i.getAll(e)];case 2:if(o=d.sent()){o.length>1&&(null==(t=this.config.diagnosticsClient)||t.recordEvent("cookies.duplicate",{cookies:o.map(function(e){return e.domain})}),null==(r=this.config.diagnosticsClient)||r.increment("cookies.duplicate.occurrence.cookieStore"));try{for(s=(a=(0,q.__values)(o)).next();!s.done;s=a.next())if(u=s.value,tA(u.domain,this.options.domain))return[2,u.value]}catch(e){l={error:e}}finally{try{s&&!s.done&&(c=a.return)&&c.call(a)}finally{if(l)throw l.error}}}d.label=3;case 3:return[3,5];case 4:return d.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,r,n=this,i=ev(),o=(null!=(r=null==(t=null==i?void 0:i.document)?void 0:t.cookie.split("; "))?r:[]).filter(function(t){return 0===t.indexOf(e+"=")}),a=void 0,s=this.config.duplicateResolverFn;if("function"==typeof s&&o.length>1&&(a=o.find(function(t){var r;try{var i=s(t.substring(e.length+1));return i||null==(r=n.config.diagnosticsClient)||r.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),a||(a=o[0]),a)return a.substring(e.length+1)},e.prototype.set=function(e,t){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var r;try{var n=null!=(r=this.options.expirationDays)?r:0,i=null!==t?n:-1,o=void 0;if(i){var a=new Date;a.setTime(a.getTime()+24*i*36e5),o=a}var s="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t))));o&&(s+="; expires=".concat(o.toUTCString())),s+="; path=/",this.options.domain&&(s+="; domain=".concat(this.options.domain)),this.options.secure&&(s+="; Secure"),this.options.sameSite&&(s+="; SameSite=".concat(this.options.sameSite));var u=ev();(null==u?void 0:u.document)&&(u.document.cookie=s)}catch(t){var l=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(l))}},e.prototype.remove=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return[2]})})},e.isDomainWritable=function(t){return(0,q.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];r="AMP_TLDTEST",n=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n.transaction(r,function(r){if(e.cachedTlds[t])return!0;try{r.set(1);var n=!!r.get();return n&&(e.cachedTlds[t]=!0),n}finally{r.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return(0,q.__awaiter)(this,void 0,void 0,function(){var r,n,i=this;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(r=tw(),n=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!r)return[2,n()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.request("com.amplitude:cookie-lock:".concat(e),n)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,n()];case 4:return[2]}})})},e.cachedTlds={},e}(),tS=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},tT=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},tk=function(e){var t;return null!=(t=tS(e))?t:tT(e)},tA=function(e,t){if(""===e&&""===t)return!0;
1if(!e||!t)return!1;var r=e.startsWith(".")?e.substring(1):e,n=t.startsWith(".")?t.substring(1):t;return r.toLowerCase()===n.toLowerCase()},tI=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),["AMP",t,e.substring(0,r)].filter(Boolean).join("_")},tP=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),r=new e(this.storage),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return i.sent(),[4,r.get(n)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=r.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var r;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(n){try{null==(r=this.storage)||r.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),tx=function(e){function t(t){var r,n,i,o=this;try{i=null==(r=ev())?void 0:r.localStorage}catch(e){null==(n=null==t?void 0:t.loggerProvider)||n.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return(0,q.__extends)(t,e),t.prototype.set=function(t,r){var n;return(0,q.__awaiter)(this,void 0,void 0,function(){var i;return(0,q.__generator)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(r)&&r.length>1e3))return[3,2];return i=r.length-1e3,[4,e.prototype.set.call(this,t,r.slice(0,1e3))];case 1:return o.sent(),null==(n=this.loggerProvider)||n.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,r)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(tP),tC=function(e){function t(){var t;return e.call(this,null==(t=ev())?void 0:t.sessionStorage)||this}return(0,q.__extends)(t,e),t}(tP),tO=function(){function e(){}return e.prototype.send=function(e,t,r){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,r,n,i,o,a,s,u,l,c,d,f,p,g,h,v,m,_,y,b,w,E,S=e.code||0,k=this.buildStatus(S);switch(k){case T.Success:return{status:k,statusCode:S,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(r=e.payload_size_bytes)?r:0,serverUploadTime:null!=(n=e.server_upload_time)?n:0}};case T.Invalid:return{status:k,statusCode:S,body:{error:null!=(i=e.error)?i:"",missingField:null!=(o=e.missing_field)?o:"",eventsWithInvalidFields:null!=(a=e.events_with_invalid_fields)?a:{},eventsWithMissingFields:null!=(s=e.events_with_missing_fields)?s:{},eventsWithInvalidIdLengths:null!=(u=e.events_with_invalid_id_lengths)?u:{},epsThreshold:null!=(l=e.eps_threshold)?l:0,exceededDailyQuotaDevices:null!=(c=e.exceeded_daily_quota_devices)?c:{},silencedDevices:null!=(d=e.silenced_devices)?d:[],silencedEvents:null!=(f=e.silenced_events)?f:[],throttledDevices:null!=(p=e.throttled_devices)?p:{},throttledEvents:null!=(g=e.throttled_events)?g:[]}};case T.PayloadTooLarge:return{status:k,statusCode:S,body:{error:null!=(h=e.error)?h:""}};case T.RateLimit:return{status:k,statusCode:S,body:{error:null!=(v=e.error)?v:"",epsThreshold:null!=(m=e.eps_threshold)?m:0,throttledDevices:null!=(_=e.throttled_devices)?_:{},throttledUsers:null!=(y=e.throttled_users)?y:{},exceededDailyQuotaDevices:null!=(b=e.exceeded_daily_quota_devices)?b:{},exceededDailyQuotaUsers:null!=(w=e.exceeded_daily_quota_users)?w:{},throttledEvents:null!=(E=e.throttled_events)?E:[]}};case T.Timeout:default:return{status:k,statusCode:S}}},e.prototype.buildStatus=function(e){return eR(e)?T.Success:429===e?T.RateLimit:413===e?T.PayloadTooLarge:408===e?T.Timeout:e>
1=400&&e<500?T.Invalid:e>=500?T.Failed:T.Unknown},e}();function tR(){return"u">typeof CompressionStream}function tD(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,new Response(new Blob([e]).stream().pipeThrough(new t("gzip"))).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})}var tN=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.state={done:4},r.customHeaders=t,r}return(0,q.__extends)(t,e),t.prototype.send=function(e,t,r){return void 0===r&&(r=!1),(0,q.__awaiter)(this,void 0,void 0,function(){var n=this;return(0,q.__generator)(this,function(i){return[2,new Promise(function(i,o){"u"<typeof XMLHttpRequest&&o(Error("XHRTransport is not supported."));var a=new XMLHttpRequest;a.open("POST",e,!0),a.onreadystatechange=function(){if(a.readyState===n.state.done){var e=a.responseText;try{i(n.buildResponse(JSON.parse(e)))}catch(e){i(n.buildResponse({code:a.status}))}}};var s={"Content-Type":"application/json",Accept:"*/*"},u=JSON.stringify(t),l=r&&u.length>=2048&&tR(),c=function(e){var t,r;s=(0,q.__assign)((0,q.__assign)({},n.customHeaders),s);try{for(var i=(0,q.__values)(Object.entries(s)),o=i.next();!o.done;o=i.next()){var u=(0,q.__read)(o.value,2),l=u[0],c=u[1];a.setRequestHeader(l,c)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}a.send(e)};(0,q.__awaiter)(n,void 0,void 0,function(){var e;return(0,q.__generator)(this,function(t){switch(t.label){case 0:if(!l)return[3,2];return[4,tD(u)];case 1:return(e=t.sent())?(s["Content-Encoding"]="gzip",c(e)):c(u),[3,3];case 2:c(u),t.label=3;case 3:return[2]}})}).catch(o)})]})})},t}(tO),tL=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.customHeaders=t,r}return(0,q.__extends)(t,e),t.prototype.send=function(e,t,r){return void 0===r&&(r=!1),(0,q.__awaiter)(this,void 0,void 0,function(){var n,i,o,a,s,u,l;return(0,q.__generator)(this,function(c){switch(c.label){case 0:if("u"<typeof fetch)throw Error("FetchTransport is not supported");if(n=JSON.stringify(t),i=r&&n.length>=2048&&tR(),o=n,a={"Content-Type":"application/json",Accept:"*/*"},!i)return[3,2];return[4,tD(n)];case 1:(s=c.sent())&&(a["Content-Encoding"]="gzip",o=s),c.label=2;case 2:return[4,fetch(e,{headers:a=(0,q.__assign)((0,q.__assign)({},this.customHeaders),a),body:o,method:"POST"})];case 3:return[4,(u=c.sent()).text()];case 4:l=c.sent();try{return[2,this.buildResponse(JSON.parse(l))]}catch(e){return[2,this.buildResponse({code:u.status})]}}})})},t}(tO),tM=function(e){function t(){return e.call(this)||this}return(0,q.__extends)(t,e),t.prototype.send=function(e,t,r){return void 0===r&&(r=!1),(0,q.__awaiter)(this,void 0,void 0,function(){var r=this;return(0,q.__generator)(this,function(n){return[2,new Promise(function(n,i){var o=ev();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var a=JSON.stringify(t);if(o.navigator.sendBeacon(e,a))return n(r.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:a.length,server_upload_time:Date.now()}));return n(r.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tO),tU=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tj=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},tF="[Amplitude]",tq="".concat(tF," Form Started"),tB="".concat(tF," Form Submitted"),tH="".concat(tF," File Downloaded"),tV="session_start",tz="session_end",t$="".concat(tF," File Extension"),tW="".concat(tF," File Name"),tJ="".concat(tF," Link ID"),tK="".concat(tF," Link Text"),tG="".concat(tF," Link URL"),tY="".concat(tF," Form ID"),tX="".concat(tF," Form Name"),tQ="".concat(tF," Form Destination"),tZ="cookie",t0={always:"always",ifEmptyCampaign:"ifEmptyCampaign"},t1=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},t2=function(e,t,r,n,i,o){void 0===i&&(i=!0),e.referrer;var a=e.referring_domain,s=(0,q.__rest)(e,["referrer","referring_domain"]),u=t||{},l=(u.referrer,u.referring_domain),c=(0,q.__rest)(u,["referrer","referring_domain"]),d=r.excludeInternalReferrers;if(d){var f=t6(d,n);if(!(f instanceof TypeError)&&e.referring_domain&&re(e.referring_domain,o)){if
1("always"===f)return t8(f,e.referring_domain,n),!1;else if("ifEmptyCampaign"===f&&Object.values((0,q.__assign)((0,q.__assign)({},e),{referring_domain:void 0,referrer:void 0})).every(function(e){return!e}))return t8(f,e.referring_domain,n),!1}}if(t3(r.excludeReferrers,e.referring_domain))return n.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&Object.values(e).every(function(e){return!e})&&t)return n.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var p=JSON.stringify(s)!==JSON.stringify(c),g=t1(a||"")!==t1(l||""),h=!t||p||g;return h?n.debug("This is a new campaign. An $identify event will be sent."):n.debug("This is not a new campaign because it's the same as the previous one."),h},t3=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},t4=function(e,t){var r=t.startsWith(".")?t:".".concat(t);return!!(e.startsWith(".")?e:".".concat(e)).endsWith(r)},t5=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},t6=function(e,t){if(!0===e)return t0.always;if("object"==typeof e){var r=e.condition;if("string"==typeof r&&Object.keys(t0).includes(r))return r;if(void 0===r)return t0.always}var n="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(n),TypeError(n)};function t8(e,t,r){var n="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?r.debug(n):"ifEmptyCampaign"===e&&r.debug("".concat(n," with empty campaign parameters"))}var t7=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],t9=function(e){var t,r,n=e||(null==(r=null==(t=ev())?void 0:t.location)?void 0:r.hostname);if(!n)return"";var i=n.split("."),o=i[i.length-1],a=i[i.length-2];return(t7.find(function(e){return n.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],a=i[i.length-3]),a)?"".concat(a,".").concat(o):o},re=function(e,t){var r=ev();return!!r&&t4(e,(t||"").trim()||t9(r.location.hostname))},rt=function(e){function t(t,r,n,i,o,a,s,u,l,c,d,f,p,g,h,v,m,_,y,w,E,S,T,k,A,I,P,x,C,O,R,D,N,L,M,U,j,F,q,B,H,V,z,$){void 0===n&&(n=new tb),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===l&&(l=5),void 0===c&&(c=30),void 0===d&&(d=tZ),void 0===v&&(v=new eI),void 0===m&&(m=b.Warn),void 0===y&&(y=!1),void 0===w&&(w=!1),void 0===T&&(T=""),void 0===k&&(k="US"),void 0===P&&(P=18e5),void 0===x&&(x=new tx({loggerProvider:v})),void 0===C&&(C={ipAddress:!0,language:!0,platform:!0}),void 0===O&&(O="fetch"),void 0===R&&(R=!1),void 0===D&&(D=!0),void 0===F&&(F=!0),void 0===q&&(q=0),void 0===z&&(z=!1);var W,J=this;(J=e.call(this,{apiKey:t,storageProvider:x,transportProvider:ri(O)})||this).apiKey=t,J.appVersion=r,J.cookieOptions=i,J.defaultTracking=o,J.autocapture=a,J.flushIntervalMillis=u,J.flushMaxRetries=l,J.flushQueueSize=c,J.identityStorage=d,J.ingestionMetadata=f,J.instanceName=p,J.loggerProvider=v,J.logLevel=m,J.minIdLength=_,J.offline=y,J.partnerId=E,J.plan=S,J.serverUrl=T,J.serverZone=k,J.sessionTimeout=P,J.storageProvider=x,J.trackingOptions=C,J.transport=O,J.useBatch=R,J.fetchRemoteConfig=D,J.networkTrackingOptions=U,J.identify=j,J.enableDiagnostics=F,J.diagnosticsSampleRate=q,J.diagnosticsClient=B,J.remoteConfig=H,J.topLevelDomain=V,J.enableRequestBodyCompression=z,J.customEnrichment=$,J.version=tm,J._optOut=!1,J._cookieStorage=n,J.deviceId=s,J.lastEventId=g,J.lastEventTime=h,J.optOut=w,J.deferredSessionId=I,J.sessionId=A,J.pageCounter=L,J.userId=N,J.debugLogsEnabled=M,J.loggerProvider.enable(M?b.Debug:J.logLevel),J.networkTrackingOptions=U,J.identify=j,J.enableDiagnostics=F,J.diagnosticsSampleRate=q,J.diagnosticsClient=B;var K=null!=(W=null==H?void 0:H.fetchRemoteConfig)?W:D;return J.remoteConfig=J.remoteConfig||{},J.remoteConfig.fetchRemoteConfig=K,J.fetchRemoteConfig=K,J.topLevelDomain=V||t9(),J}return(0,q.__extends)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof tE&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(tI(this.apiKey),e)},t}(ex),rr=function(e,t,r){switch(void 0===e&&(e=tZ),void 0===t&&(t={}),e){case"localStorage":return new tx;case"sessionStorage":return new tC;case"none":return new tb;default:return new tE((0,q.__assign)((0,q.__assign)({},t),{expirationDays:t.expiration}),r)}},rn=function(e){var t,r;return void 0===e&&(e={}),(null==(t=e.remoteConfig)?void 0:t.fetchRemoteConfig)===!0||(null==(r=e.remoteConfig)?void 0:r.fetchRemoteConfig)!==!1&&!1!==e.fetchRemoteConfig},ri=function(e){var t="object"==typeof e?e.type:e,r="object"==typeof e?e.headers:void 0;return"xhr"===t?new tN(r):"beacon"===t?new tM:new tL(r)},ro="*****",ra=/\b(?:\d[ -]*?){13,16}\b/,rs=/(\d{3}-?\d{2}-?\d{4})/g,ru=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,rl=function(e,t){if(void 0===t&&(t=[]),"string"!=typeof e)return"";var r,n,i=e;i=(i=(i=i.replace(ra,ro)).replace(rs,ro)).replace(ru,ro);try{for(var o=(0,q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;try{i=i.replace(s,ro)}catch(e){}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},rc=function(e){if("u"<typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute("data-amp-mask")?ro:e?e(document.title):document.title};(u=A||(A={})).SET="$set",u.SET_ONCE="$setOnce",u.ADD="$add",u.APPEND="$append",u.PREPEND="$prepend",u.REMOVE="$remove",u.PREINSERT="$preInsert",u.POSTINSERT="$postInsert",u.UNSET="$unset",u.CLEAR_ALL="$clearAll",(l=I||(I={})).IDENTIFY="$identify",l.GROUP_IDENTIFY="$groupidentify",l.REVENUE="revenue_amount";var rd=function(){var t="ampIntegrationContext";return"u">typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g},rf=function(){var e,t=rd();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(
1Boolean).reduce(function(e,t){var r=t.split("=",2),n=rp(r[0]),i=rp(r[1]);return i&&(e[n]=i),e},{}):{}},rp=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},rg="dclid",rh="fbclid",rv="gbraid",rm="gclid",r_="ko_click_id",ry="li_fat_id",rb="msclkid",rw="rdt_cid",rE="ttclid",rS="twclid",rT="wbraid",rk={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},rA=function(){function e(){}return e.prototype.parse=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return[2,(0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)({},rk),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=rf();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!=(t=null==(e=r.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=rf();return(e={})[rg]=t[rg],e[rh]=t[rh],e[rv]=t[rv],e[rm]=t[rm],e[r_]=t[r_],e[ry]=t[ry],e[rb]=t[rb],e[rw]=t[rw],e[rE]=t[rE],e[rS]=t[rS],e[rT]=t[rT],e},e}(),rI=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),r=new e(this.storage),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return i.sent(),[4,r.get(n)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=r.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var r;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(n){try{null==(r=this.storage)||r.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),rP=(0,q.__spreadArray)([],(0,q.__read)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),rx=function(e){var t,r=rd();if(!(null==(t=null==r?void 0:r.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,rx);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,(0,q.__spreadArray)([],(0,q.__read)(n.entries()),!1).map(function(e){var t=(0,q.__read)(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(rP[n]):rP[n]}).join("")},rC=function(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=n)}return t},rO="AMP_PAGE_VIEW",rR=function(e){void 0===e&&(e={});var t,r,n,i=rd(),o=void 0,a=!1,s=e.trackOn,u=e.trackHistoryChanges,l=e.eventType,c=void 0===l?"[Amplitude] Page Viewed":l,d=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==o||o.error("Malformed URI sequence: ",e)}return t},f=function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var t,r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:return t=d("u">typeof location&&location.href||""),n={event_type:c},r=[{}],[4,rD()];case 1:return[2,(n.event_properties=q.__assign.apply(void 0,[q.__assign.apply(void 0,r.concat([i.sent()])),{"[Amplitude] Page Domain":"u">typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"u">typeof location&&d(location.pathname)||"","[Amplitude] Page Title":rc(rl),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),n)]}})})},p=function(){return void 0===s||"function"==typeof s&&s()},g="u">typeof location?location.href:null,h=function(){(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,r,i,a,s;return(0,q.__generator)(this,function(l){switch(l.label){case 0:if(r=rL(u,e=location.href,g||"")&&p(),g=e,!r)return[3,4];if(i=void 0,n&&(i=rx(),n.set(rO,{pageViewId:i})),null==o||o.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return s=(a=t).track,[4,f(i)];case 2:s.apply(a,[l.sent()]),l.label=3;case 3:l.label=4;case 4:return[2]}})})};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var u,l,c;return(0,q.__generator)(this,function(d){switch(d.label){case 0:if(t=s,r=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),a=!0,i){try{n=new rI(i.sessionStorage)}catch(e){null==o||o.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",h),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,r){var n=(0,q.__read)(r,3),i=n[0],o=n[1],s=n[2];e.apply(t,[i,o,s]),a&&h()}})}if(!p())return[3,2];return o.log("Tracking page view event"),u=void 0,n&&(u=rx(),n.set(rO,{pageViewId:u})),c=(l=t).track,[4,f(u)];case 1:c.apply(l,[d.sent()]),d.label=2;case 2:return[2]}})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var t,i,a;return(0,q.__generator)(this,function(u){switch(u.label){case 0:if(!("attribution"===s&&rN(e)))return[3,4];
1if(null==o||o.log("Enriching campaign event to page view event with campaign parameters"),t=void 0,!n)return[3,2];return[4,n.get(rO)];case 1:t=null==(i=u.sent())?void 0:i.pageViewId,u.label=2;case 2:return[4,f(t)];case 3:e.event_type=(a=u.sent()).event_type,e.event_properties=(0,q.__assign)((0,q.__assign)({},e.event_properties),a.event_properties),u.label=4;case 4:return r&&e.event_type===c&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=(0,q.__assign)((0,q.__assign)({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return i&&(i.removeEventListener("popstate",h),a=!1),[2]})})}}},rD=function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,q.__generator)(this,function(t){switch(t.label){case 0:return e=rC,[4,new rA().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},rN=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,r=t[A.SET]||{},n=t[A.UNSET]||{},i=(0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(Object.keys(r)),!1),(0,q.__read)(Object.keys(n)),!1);return Object.keys(rk).every(function(e){return i.includes(e)})}return!1},rL=function(e,t,r){if("pathOnly"!==e)return t!==r;if(""==r)return!0;var n=new URL(t),i=new URL(r);return n.origin+n.pathname!==i.origin+i.pathname},rM=function(){var e,t,r=[],n=function(e,t,n){e.addEventListener(t,n),r.push({element:e,type:t,handler:n})},i=function(){r.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),r=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(r,i){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var o,a;return(0,q.__generator)(this,function(s){return t=tp(r),o=function(){if(!i)return void r.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");if("u">typeof document){var o=new WeakSet,a=function(e){if(!o.has(e)){o.add(e);var a=!1;n(e,"change",function(){var t,r=rj(e);a||i.track(tq,((t={})[tY]=rU(e.id),t[tX]=rU(e.name),t[tQ]=r,t)),a=!0}),n(e,"submit",function(n){var o,s,u=rj(e);if(a||i.track(tq,((o={})[tY]=rU(e.id),o[tX]=rU(e.name),o[tQ]=u,o)),a=!0,(null==t?void 0:t.shouldTrackSubmit)!==void 0)if("function"==typeof t.shouldTrackSubmit&&"u">typeof SubmitEvent&&n instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(n))return}catch(e){r.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else r.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(tB,((s={})[tY]=rU(e.id),s[tX]=rU(e.name),s[tQ]=u,s)),a=!1})}};Array.from(document.getElementsByTagName("form")).forEach(a),"u">typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&a(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(a)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?o():(a=ev())?a.addEventListener("load",o):r.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return null==e||e.disconnect(),i(),[2]})})}}},rU=function(e){if("string"==typeof e)return e},rj=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},rF=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,n){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var i,o;return(0,q.__generator)(this,function(a){return i=function(){if(!n)return void t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");if("u">typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),a=null==i?void 0:i[1];a&&r(e,"click",function(){var r;a&&n.track(tH,((r={})[t$]=a,r[tW]=t.pathname,r[tJ]=e.id,r[tK]=e.text,r[tG]=e.href,r))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;
1Array.from(document.getElementsByTagName("a")).forEach(i),"u">typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=ev())?o.addEventListener("load",i):t.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},rq=!1,rB=function(e){rq||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n  defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),rq=!0)},rH=function(){var e=ev(),t=[],r=function(r,n){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(r,n),t.push({type:r,handler:n}))},n=function(){t.forEach(function(t){var r=t.type,n=t.handler;null==e||e.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(n){return"u"<typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,r("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),r("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return n(),[2]})})}}};function rV(e,t,r){var n,i,o=[];try{for(var a=(0,q.__values)(null!=t?t:[]),s=a.next();!s.done;s=a.next()){var u=s.value;try{o.push(new RegExp(u))}catch(e){r.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return e.concat(o)}var rz=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],r$="data-amp-track-",rW=["div","span","h1","h2","h3","h4","h5","h6"],rJ="https://app.amplitude.com",rK={US:rJ,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},rG="__AMPLITUDE_MESSENGER_INSTANCE__",rY="__AMPLITUDE_MESSENGER__",rX=function(){function e(e){var t=(void 0===e?{}:e).origin;this[P]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=void 0===t?rJ:t}return e.prototype.notify=function(e){var t,r,n,i;null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(n=window.opener)?void 0:n.postMessage)||i.call(n,e,this.endpoint)},e.prototype.sendRequest=function(e,t,r){var n=this;void 0===r&&(r={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){n.requestCallbacks[i]={resolve:t,reject:a},n.notify(o),r.timeout>0&&setTimeout(function(){a(Error("".concat(e," timed out (id: ").concat(i,")"))),delete n.requestCallbacks[i]},r.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.registerActionHandler=function(e,t){this.actionHandlers.has(e)&&(null==(o=null==(i=this.logger)?void 0:i.warn)||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var r,n,i,o,a=this.pendingMessages.get(e);if(a){this.pendingMessages.delete(e);try{for(var s=(0,q.__values)(a),u=s.next();!u.done;u=s.next()){var l=u.value;t(l)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}},e.prototype.loadScriptOnce=function(e){return(0,q.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,q.__generator)(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];r=(document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,r){var n;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){r({status:!1,message:"Failed to load the script ".concat(e)})}),null==(n=document.head)||n.appendChild(i)}catch(e){r(e)}})).then(function(){}),this.scriptLoadPromises.set(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r];case 2:return i.sent(),[3,4];case 3:throw n=i.sent(),this.scriptLoadPromises.delete(e),n;case 4:return[2]}})})},e.prototype.setup=function(e){var t,r,n=this,i=void 0===e?{}:e,o=i.logger,a=i.endpoint;o&&(this.logger=o),a&&this.endpoint===rJ&&(this.endpoint=a),this.isSetup||(this.isSetup=!0,null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Setting up messenger"),this.messageHandler=function(e){if(null==(r=null==(t=n.logger)?void 0:t.debug)||r.call(t,"Message received: ",JSON.stringify(e)),n.endpoint===e.origin){var t,r,i,o,a,s=e.data,u=null==s?void 0:s.action;if(u)if("id"in s&&s.id)null==(o=null==(i=n.logger)?void 0:i.debug)||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),n.handleResponse(s);else{if("ping"===u)return void n.notify({action:"pong"});var l=n.actionHandlers.get(u);if(l)l(s.data);else{var c=null!=(a=n.pendingMessages.get(u))?a:[];c.push(s.data),n.pendingMessages.set(u,c)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=ev();(null==e?void 0:e[rY])===this&&delete e[rY]},e}();P=rG;var rQ="__AMPLITUDE_BACKGROUND_CAPTURE__",rZ=e.i(881243);function r0(e,t){return new rZ.default(function(r){e.subscribe({next:function(e){t(e).then(function(e){return r.next(e)}).catch(function(e){return r.error(e)})},error:function(e){r.error(e)},complete:function(){r.complete()}})})}function r1(e,t){return new rZ.default(function(r){var n=!1,i=new Set,o=function(){var e,t;n=!0;try{for(var r=(0,q.__values)(i),o=r.next();!o.done;o=r.next()){var a=o.value;try{a.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.clear()},a=function(e){var t=e.subscribe({next:function(e){n||r.next(e)},error:function(e){n||(n=!0,r.error(e),o())},complete:function(){i.delete(t),n||0!==i.size||(r.complete(),o(),n=!0)}});i.add(t)};return a(e),a(t),o})}function r2(e){var t=new Set,r=null;function n(){null==r||r.unsubscribe(),r=null,t.clear()}return new rZ.default(function(i){return t.add(i),null===r&&(r=e.subscribe({next:function(e){try{for(var r,n,i,o=(0,q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;null==(i=s.next)||i.call(s,e)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},error:function(e){try{for(var r,i,o,a=(0,q.__values)(t),s=a.next();!s.done;s=a.next()){var u=s.value;null==(o=u.error)||o.call(u,e)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}n()},complete:function(){try{for(var e,r,i,o=(0,q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;null==(i=s.complete)||i.call(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}n()}})),function(){t.delete(i),0===t.size&&r&&(r.unsubscribe(),r=null)}})}var r3="1.27.1",r4="[Amplitude] Element Clicked",r5="[Amplitude] Element Tag",r6="[Amplitude] Element Text",r8="[Amplitude] Page URL",r7="[Amplitude] Viewport Height",r9="[Amplitude] Viewport Width",ne="[Amplitude] Page View ID",nt="data-amp-mask-attributes",nr=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nn=function(e,t){var r=e;try{r=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return r},ni=["input","select","textarea"],no=function(e,t){var r,n=null==(r=null==window?void 0:window.getComputedStyle)?void 0:r.call(window,e);return(null==n?void 0:n.getPropertyValue("cursor"))==="pointer"&&"click"===t},na=function(e){var t=e.pageUrlAllowlist,r=e.pageUrlExcludelist;return!(r&&r.length>0&&nr(window.location.href,r))&&!!nr(window.location.href,t)},ns=function(e,t,r){return void 0===r&&(r=!1),function(n,i){var o,a,s=e.shouldTrackEventResolver,u=null==(a=null==(o=null==i?void 0:i.tagName)?void 0:o.toLowerCase)?void 0:a.call(o);if(!u)return!1;if(s)return s(n,i);if(!na(e))return!1;var l=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}var c=no(i,n);if(r&&c)return!0;
1if(t&&!t.some(function(e){var t;return!!(null==(t=null==i?void 0:i.matches)?void 0:t.call(i,e))}))return!1;switch(u){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:if(c)return!0;return"click"===n}}},nu=function(e){var t,r,n,i=null==(r=null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase)?void 0:r.call(t),o=e instanceof HTMLElement&&(null==(n=e.getAttribute("contenteditable"))?void 0:n.toLowerCase())==="true";return!ni.includes(i)&&!o},nl=function(e){return Object.keys(e).reduce(function(t,r){var n=e[r];return null!=n&&("object"!=typeof n||0!==Object.keys(n).length)&&("string"!=typeof n||0!==n.trim().length)&&(t[r]=n),t},{})},nc=function(){var e;try{var t=ev(),r=null==(e=null==t?void 0:t.sessionStorage)?void 0:e.getItem("AMP_PAGE_VIEW");if(!r)return;var n=JSON.parse(r);if("string"==typeof n.pageViewId)return n.pageViewId}catch(e){}},nd=function(e,t){return e?t.some(function(t){var r;return null==(r=null==e?void 0:e.matches)?void 0:r.call(e,t)})?e:nd(null==e?void 0:e.parentElement,t):null},nf=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor};(c=x||(x={}))[c.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",c[c.MIDDLE=1]="MIDDLE",c[c.RIGHT=2]="RIGHT";var np="__AMPLITUDE_VISUAL_TAGGING__",ng=rZ,nh=ev(),nv=null==nh?void 0:nh.console,nm={},n_={},ny=!1,nb=function(e,t){if(!nv||"function"!=typeof nv[e]||!n_[e]&&(n_[e]=nv[e],nv[e]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{if(nm[e]&&!ny){ny=!0;var n=nm[e];n&&n.forEach(function(r){try{r(e,t)}catch(e){}})}}catch(e){}return ny=!1,n_[e].apply(nv,t)},0))return Error("Console override failed");nm[e]?nm[e].push(t):nm[e]=[t]},nw=function(e){var t,r;try{for(var n=(0,q.__values)(Object.values(nm)),i=n.next();!i.done;i=n.next())for(var o=i.value,a=o.length-1;a>=0;a--)if(o[a]===e){o.splice(a,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},nE=ev(),nS=function(){return new ng.default(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},nT=function(e){return void 0===e&&(e="click"),new ng.default(function(t){var r,n=function(e){t.next(e)};return null==(r=ev())||r.document.addEventListener(e,n,{capture:!0}),function(){var t;null==(t=ev())||t.document.removeEventListener(e,n,{capture:!0})}})},nk=function(){var e=r1(new ng.default(function(e){var t=function(t){if(t instanceof ErrorEvent){var r={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?r=(0,q.__assign)((0,q.__assign)({},r),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(r.message=t.error),e.next(r)}};return nE.addEventListener("error",t),function(){nE.removeEventListener("error",t)}}),new ng.default(function(e){var t=function(t){var r={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(r.message=t.reason.message,r.stack=t.reason.stack):"string"==typeof t.reason&&(r.message=t.reason),e.next(r)};return nE.addEventListener("unhandledrejection",t),function(){nE.removeEventListener("unhandledrejection",t)}}));return r1(e,new ng.default(function(e){var t=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=void 0;Array.isArray(r[0])&&"string"==typeof r[0][0]&&(i=r[0][0]),e.next({kind:"console",message:i})};return nb("error",t),function(){nw(t)}}))},nA=function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){console.error("Error matching event to filter",e)}return!1},nI=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var r=document.documentElement;if(e.scope&&t&&(r=t.closest(e.scope)),r&&e.selector)return r.querySelector(e.selector);return r}}catch(e){}},nP=function(e,t,r){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var n=r.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=n}})},nx={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},nC=function(e){var t,r,n,i,o=Object.values(nx).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var a=(0,q.__values)(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{try{for(var l=(n=void 0,(0,q.__values)(u.definition)),c=l.next();!c.done;c=l.next()){var d=nx[c.value.event_type];d&&o[d].add(u.id)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return o},nO=function(e){var t,r,n,i,o=new Map;try{for(var a=(0,q.__values)(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{for(var l=(n=void 0,(0,q.__values)(u.conditions)),c=l.next();!c.done;c=l.next()){var d=c.value;if("LABELED_EVENT"===d.type){var f=d.match.eventId,p=o.get(f);p||(p=[],o.set(f,p)),p.push(u)}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return o},nR=function(e,t){var r,n,i,o,a=new Set;try{for(var s=(0,q.__values)(e),u=s.next();!u.done;u=s.next()){var l=u.value,c=t.get(l.id);if(c)try{for(var d=(i=void 0,(0,q.__values)(c)),f=d.next();!f.done;f=d.next()){var p=f.value;a.add(p)}}catch(e){i={error:e}}
1finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return Array.from(a)},nD=function(){function e(e,t,r,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=r,this.options=n}return e.prototype.evaluate=function(e){var t,r,n=this.options.pageActions;if(!n)return e;var i=nR(Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return n.labeledEvents[e]}).filter(function(t){return t.definition.some(function(t){return nx[t.event_type]===e.type&&t.filters.every(function(t){return nA(e,t)})})}),this.labeledEventToTriggerMap);try{for(var o=(0,q.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value;nP(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=r},e}(),nN="data-amp-mask",nL="*****",nM=/\b(?:\d[ -]*?){13,16}\b/,nU=/(\d{3}-?\d{2}-?\d{4})/g,nj=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,nF=function(e,t){if(void 0===t&&(t=[]),"string"!=typeof e)return"";var r,n,i=e;i=(i=(i=i.replace(nM,nL)).replace(nU,nL)).replace(nj,nL);try{for(var o=(0,q.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;try{i=i.replace(s,nL)}catch(e){}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},nq=function(e){if("u"<typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(nN)?nL:e?e(document.title):document.title},nB=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",nt,nN]),nH=["type"],nV=["svg","path","g"],nz=["password","hidden"],n$=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),nW=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var r=[],n=e;n;){var i=nJ(n,!!t,n===e);if(!i||(r.push(i),i.optimized))break;n=n.parentElement}return r.reverse(),r.join(" > ")},nJ=function(e,t,r){if(e.nodeType!==Node.ELEMENT_NODE)return null;var n,i,o=e.getAttribute("id");if(t){if(o)return new n$(c(o),!0);var a=e.tagName.toLowerCase();if("body"===a||"head"===a||"html"===a)return new n$(a,!0)}var s=e.tagName.toLowerCase();if(o)return new n$(s+c(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new n$(s,!0);function l(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function c(e){return"#"+CSS.escape(e)}for(var d=l(e),f=!1,p=!1,g=-1,h=-1,v=u.children,m=0;v&&(-1===g||!p)&&m<v.length;++m){var _=v[m];if(_.nodeType===Node.ELEMENT_NODE){if(h+=1,_===e){g=h;continue}if(!p&&_.tagName.toLowerCase()===s){f=!0;var y=new Set(d);if(!y.size){p=!0;continue}for(var b=l(_),w=0;w<b.length;++w){var E=b[w];if(y.has(E)&&(y.delete(E),!y.size)){p=!0;break}}}}}var S=s;if(r&&"input"===s.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(S+="[type="+CSS.escape(e.getAttribute("type")||"")+"]"),p)S+=":nth-child("+String(g+1)+")";else if(f)try{for(var T=(0,q.__values)(d),k=T.next();!k.done;k=T.next()){var A=k.value;S+="."+CSS.escape(A.slice(1))}}catch(e){n={error:e}}finally{try{k&&!k.done&&(i=T.return)&&i.call(T)}finally{if(n)throw n.error}}return new n$(S,!1)},nK=function(e,t){var r,n,i,o=this;this.replaceSensitiveString=function(e){return nF(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,r,n,i,a=performance.now(),s=[];if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;
1t.push(e);for(var r=e.parentElement;r&&"HTML"!==r.tagName;)t.push(r),r=r.parentElement;return t}(e),l=new Map,c=u.length-1;c>=0;c--){var d=u[c];if(d){var f,p=(f=d.getAttribute(nt))?f.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[],g=c===u.length-1?[]:null!=(n=l.get(u[c+1]))?n:new Set,h=new Set((0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(g),!1),(0,q.__read)(p),!1));l.set(d,h)}}s=u.map(function(e){var t;return function(e,t){if(null===e)return null;var r,n,i,o,a,s,u=String(e.tagName).toLowerCase(),l={tag:u},c=Array.from(null!=(o=null==(i=e.parentElement)?void 0:i.children)?o:[]);c.length&&(l.index=c.indexOf(e),l.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null==(s=null==(a=e.previousElementSibling)?void 0:a.tagName)?void 0:s.toLowerCase();d&&(l.prevSib=String(d));var f=e.getAttribute("id");f&&(l.id=String(f));var p=Array.from(e.classList);p.length&&(l.classes=p);var g={},h=Array.from(e.attributes).filter(function(e){return!nB.has(e.name)}),v=!nu(e);if(!nz.includes(String(e.getAttribute("type")))&&!nV.includes(u))try{for(var m=(0,q.__values)(h),_=m.next();!_.done;_=m.next()){var y=_.value;if(!v||nH.includes(y.name)){if(t.has(y.name)){g[y.name]=nL;continue}g[y.name]=String(y.value).substring(0,128)}}}catch(e){r={error:e}}finally{try{_&&!_.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}return Object.keys(g).length&&(l.attrs=g),l}(e,null!=(t=l.get(e))?t:new Set)});var v=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var r=(0,q.__read)(t,2),n=r[0],i=r[1];e.attrs&&(e.attrs[n]=o.replaceSensitiveString(i))})};try{for(var m=(0,q.__values)(s),_=m.next();!_.done;_=m.next()){var y=_.value;v(y)}}catch(e){t={error:e}}finally{try{_&&!_.done&&(r=m.return)&&r.call(m)}finally{if(t)throw t.error}}var b=performance.now();return null==(i=o.diagnosticsClient)||i.recordHistogram("autocapturePlugin.getHierarchy",b-a),s},this.getNearestLabel=function(e){var t,r=e.parentElement;if(!r)return"";try{t=r.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(r)},this.getElementPath=function(e){if(!e)return"";var t,r=performance.now(),n=nW(e),i=performance.now();return null==(t=o.diagnosticsClient)||t.recordHistogram("autocapturePlugin.getElementPath",i-r),n},this.getEventProperties=function(e,t,r){var n,i,a,s,u=null==(a=null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase)?void 0:a.call(i),l="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},c=o.getHierarchy(t),d=null==(s=c[0])?void 0:s.attrs,f=o.getNearestLabel(t),p=Object.entries(null!=d?d:{}).reduce(function(e,t){var n=(0,q.__read)(t,2),i=n[0],o=n[1];if(i.startsWith(r)){var a=i.replace(r,"");a&&(e[a]=o||"")}return e},{}),g=((n={})["[Amplitude] Element Hierarchy"]=c,n[r5]=u,n[r6]=o.getText(t),n["[Amplitude] Element Position Left"]=null==l.left?null:Math.round(l.left),n["[Amplitude] Element Position Top"]=null==l.top?null:Math.round(l.top),n["[Amplitude] Element Attributes"]=p,n["[Amplitude] Element Path"]=o.getElementPath(t),n["[Amplitude] Element Parent Label"]=f,n[r8]=nn(window.location.href.split("?")[0]),n["[Amplitude] Page Title"]=nq(o.replaceSensitiveString),n[r7]=window.innerHeight,n[r9]=window.innerWidth,n),h=nc();if(h&&(g[ne]=h),g["[Amplitude] Element ID"]=t.getAttribute("id")||"",g["[Amplitude] Element Class"]=t.getAttribute("class"),g["[Amplitude] Element Aria Label"]=null==d?void 0:d["aria-label"],"a"===u&&"click"===e&&t instanceof HTMLAnchorElement){var v=t.href.substring(0,128);g["[Amplitude] Element Href"]=o.replaceSensitiveString(v)}return nl(g)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,r,n,i){void 0===i&&(i=!1);var a=o.addTypeAndTimestamp(e,t);if(("click"===a.type||"change"===a.type)&&null!==a.event.target){if(i&&no(a.event.target,a.type))return a.closestTrackedAncestor=a.event.target,a.targetElementProperties=o.getEventProperties(a.type,a.closestTrackedAncestor,n),a;var s=nd(a.event.target,r);s&&(a.closestTrackedAncestor=s,a.targetElementProperties=o.getEventProperties(a.type,s,n))}return a},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var r=nI(e,t);if(r){if("TEXT"===e.elementExtractType)return o.getText(r);if("ATTRIBUTE"===e.elementExtractType&&e.attribute)return r.getAttribute(e.attribute)}}},this.getTextWithMaskedDescendants=function(e){var t,r,n="[".concat(nN,"], [contenteditable]");if(!e.querySelector(n))return e.innerText;var i="",a=Array.from(e.childNodes);try{for(var s=(0,q.__values)(a),u=s.next();!u.done;u=s.next()){var l=u.value;if(l.nodeType===Node.TEXT_NODE){i+=l.textContent||"";continue}if(l instanceof Element){if(l.hasAttribute(nN)||l.hasAttribute("contenteditable")){i+=nL;continue}i+=o.getTextWithMaskedDescendants(l)}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(nN,"]")))return nL;var t="";return t=e.querySelector("[".concat(nN,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveStr
1ing(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){if(!e)return{};var t,r,n,i=null==(n=null==(r=null==e?void 0:e.tagName)?void 0:r.toLowerCase)?void 0:n.call(r);return nl(((t={})[r5]=i,t[r6]=o.getText(e),t[r8]=window.location.href.split("?")[0],t))},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var a=null!=(i=e.maskTextRegex)?i:[],s=[];try{for(var u=(0,q.__values)(a),l=u.next();!l.done;l=u.next()){var c=l.value;if(s.length>=25)break;if(c instanceof RegExp)s.push(c);else if("pattern"in c&&"string"==typeof c.pattern)try{s.push(RegExp(c.pattern,"i"))}catch(e){}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}this.additionalMaskTextPatterns=s},ng=rZ;(d=C||(C={})).ClickObservable="clickObservable",d.ChangeObservable="changeObservable",d.NavigateObservable="navigateObservable",d.MutationObservable="mutationObservable",d.ScrollObservable="scrollObservable",d.ExposureObservable="exposureObservable",d.BrowserErrorObservable="browserErrorObservable",d.SelectionObservable="selectionObservable",d.MouseMoveObservable="mouseMoveObservable";var nG=function(e,t){void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",r3);var r,n,i,o,a,s,u,l,c,d,f,p,g,h=e.dataAttributePrefix,v=void 0===h?r$:h,m=e.visualTaggingOptions,_=void 0===m?{enabled:!0}:m;e.cssSelectorAllowlist=null!=(r=e.cssSelectorAllowlist)?r:rz,e.actionClickAllowlist=null!=(n=e.actionClickAllowlist)?n:rW,e.debounceTime=null!=(i=e.debounceTime)?i:0;var y=(null==(o=e.viewportContentUpdated)?void 0:o.enabled)!==!1,b=null!=(u=null!=(s=null==(a=e.viewportContentUpdated)?void 0:a.exposureDuration)?s:e.exposureDuration)?u:150;e.viewportContentUpdated=(0,q.__assign)((0,q.__assign)({},e.viewportContentUpdated),{exposureDuration:b}),e.pageUrlExcludelist=null==(l=e.pageUrlExcludelist)?void 0:l.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(e){console.warn("Invalid regex pattern: ".concat(t.pattern),e)}return e},[]);var w="@amplitude/plugin-autocapture-browser",E=[],S=new nK(e,t),T=new Set,k=new Set,A=function(){var t,r,n,i=r2(nT().map(function(t){return S.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,v)})),o=r2(new ng.default(function(t){var r,n=function(r){var n=S.addAdditionalEventProperties(r,"change",e.cssSelectorAllowlist,v);t.next(n)};return null==(r=ev())||r.document.addEventListener("change",n,{capture:!0}),function(){var e;return null==(e=ev())?void 0:e.document.removeEventListener("change",n)}}));window.navigation&&(n=r2(new ng.default(function(t){var r=function(r){var n=S.addAdditionalEventProperties(r,"navigate",e.cssSelectorAllowlist,v);t.next(n)};return window.navigation.addEventListener("navigate",r),function(){window.navigation.removeEventListener("navigate",r)}})));var a=r2(nS().map(function(t){return S.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,v)})),s=new ng.default(function(e){var t,r=function(t){e.next(t)};return null==(t=ev())||t.addEventListener("scroll",r),function(){var e;null==(e=ev())||e.removeEventListener("scroll",r)}}),u=(t=e.cssSelectorAllowlist,new ng.default(function(e){var r,n=ev();if(!(null==n?void 0:n.IntersectionObserver))return function(){};var i=new IntersectionObserver(function(t){t.forEach(function(t){e.next(t)})},{root:null,rootMargin:"0px",threshold:1}),o=t.join(",");(null!=(r=null==n?void 0:n.document.querySelectorAll(o))?r:[]).forEach(function(e){i.observe(e)});var s=a.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){e instanceof Element&&(e.matches(o)&&i.observe(e),e.querySelectorAll(o).forEach(function(e){i.observe(e)}))})})});return function(){s.unsubscribe(),i.disconnect()}}));return(r={})[C.ChangeObservable]=o,r[C.ClickObservable]=i,r[C.MutationObservable]=a,r[C.NavigateObservable]=n,r[C.ScrollObservable]=s,r[C.ExposureObservable]=u,r},I=nC(Object.values(null!=(d=null==(c=e.pageActions)?void 0:c.labeledEvents)?d:{})),P=nO(null!=(p=null==(f=e.pageActions)?void 0:f.triggers)?p:[]),x=new nD(I,P,S,e),O=function(t){var r,n;t&&(e.pageActions=(0,q.__assign)((0,q.__assign)({},e.pageActions),t),I=nC(Object.values(null!=(r=e.pageActions.labeledEvents)?r:{})),P=nO(null!=(n=e.pageActions.triggers)?n:[]),x.update(I,P,e))};return{name:w,type:"enrichment",setup:function(t,r){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,a,s,u,l,c,d,f,p,h,m,I,P,R,D,N,L,M,U;return(0,q.__generator)(this,function(j){if("u"<typeof document)return[2];if(n=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(e){O(e)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),o=ns(e,e.cssSelectorAllowlist),a=ns(e,e.actionClickAllowlist),B=(F={allObservables:s=A(),amplitude:r,shouldTrackEvent:o,evaluateTriggers:x.evaluate.bind(x)}).amplitude,H=F.allObservables,V=F.shouldTrackEvent,z=F.evaluateTriggers,u=H.clickObservable.filter(nf).filter(function(e){return V("click",e.closestTrackedAncestor)}).map(function(e){return z(e)}).subscribe(function(e){null==B||B.track(r4,e.targetElementProperties)}),E.push(u),W=($={allObservables:s,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return S.getEventProperties.apply(S,(0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(e),!1),[v],!1))},amplitude:r,shouldTrackEvent:o,evaluateTriggers:x.evaluate.bind(x)}).amplitude,J=$.allObservables,K=$.getEventProperties,G=$.shouldTrackEvent,Y=$.evaluateTriggers,l=J.changeObservable.filter(nf).filter(function(e){return G("change",e.closestTrackedAncestor)}).map(function(e){return Y(e)}).subscribe(function(e){null==W||W.track("[Amplitude] Element Changed",K("change",e.closestTrackedAncestor))}),E.push(l),Q=(X={allObservables:s,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return S.getEventProperties.apply(S,(0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(e),!1),[v],!1))},amplitude:r,shouldTrackEvent:o,shouldTrackActionClick:a}).amplitude,Z=X.allObservables,ee=X.options,et=X.getEventProperties,er=X.shouldTrackEvent,en=X.shouldTrackActionClick,ei=Z.clickObservable,eo=Z.mutationObservable,ea=Z.navigateObservable,es=ei.filter(function(e){return!er("click",e.closestTrackedAncestor)}).map(function(e){var t=nd(e.event.target,ee.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=et(e.type,e.closestTrackedAncestor)),e}).filter(nf).filter(function(e){return en("click",e.closestTrackedAncestor)}),eu=ea?r1(eo,ea):eo,el=r1(es,eu),ec=null,ed=null,(c=r0(el,function(e){if(ec&&(clearTimeout(ec),ec=null),"click"===e.type)ed=e,ec=setTimeout(function(){ec=null,ed=null},500);else if(ed){var t=ed;return ed=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==Q||Q.track(r4,et("click",e.closestTrackedAncestor)))}))&&E.push(c),(ef={allObservables:s,amplitude:r}).amplitude,ep=ef.allObservables.scrollObservable,eg={maxX:0,maxY:0},eh=ep.subscribe(function(){var e,t,r,n,i=ev(),o=Math.floor(null!=(t=null!=(e=null==i?void 0:i.scrollX)?e:null==i?void 0:i.pageXOffset)?t:0),a=Math.floor(null!=(n=null!=(r=null==i?void 0:i.scrollY)?r:null==i?void 0:i.pageYOffset)?
1n:0);eg.maxX=Math.max(eg.maxX,o),eg.maxY=Math.max(eg.maxY,a)}),d={unsubscribe:function(){eh.unsubscribe()},getState:function(){return eg},reset:function(){eg.maxX=0,eg.maxY=0}},E.push(d),f={},p=ev(),h=function(e){e&&n||(setTimeout(function(){n=!1},100),n=!0,function(e){var t,r,n,i,o,a,s=e.amplitude,u=e.scrollTracker,l=e.currentElementExposed,c=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,p=e.lastScroll,g=u.getState(),h=ev(),v=null!=(r=null==h?void 0:h.innerWidth)?r:0,m=null!=(n=null==h?void 0:h.innerHeight)?n:0,_=((t={})[r8]=nn(null!=(a=null==(o=null==(i=null==h?void 0:h.location)?void 0:i.href)?void 0:o.split("?")[0])?a:""),t["[Amplitude] Max Page X"]=g.maxX+v,t["[Amplitude] Max Page Y"]=g.maxY+m,t[r7]=m,t[r9]=v,t["[Amplitude] Element Exposed"]=Array.from(l),t),y=nc();if(y&&(_[ne]=y),0===l.size&&g.maxX===p.maxX&&g.maxY===p.maxY){f&&(u.reset(),c.clear(),null==d||d.reset());return}null==s||s.track("[Amplitude] Viewport Content Updated",_),p.maxX=g.maxX,p.maxY=g.maxY,l.clear(),f&&(u.reset(),c.clear(),null==d||d.reset())}({amplitude:r,scrollTracker:d,currentElementExposed:k,elementExposedForPage:T,exposureTracker:f.exposure,isPageEnd:e,lastScroll:i}))},m=function(e){!T.has(e)&&(T.add(e),k.add(e),JSON.stringify(Array.from(k)).length>=18e3&&h(!1))},y&&(e_=(em={allObservables:s,onExposure:m,dataExtractor:S,exposureDuration:b}).allObservables,ey=em.onExposure,eb=em.dataExtractor,eE=void 0===(ew=em.exposureDuration)?150:ew,eS=new Map,eT=new Map,ek=e_.exposureObservable.subscribe(function(e){var t=e.target;if(e.isIntersecting){if(!eS.get(t)){var r=setTimeout(function(){eS.set(t,!0),ey(eb.getElementPath(t)),eT.set(t,null)},eE);eT.set(t,r)}}else if(!e.isIntersecting&&e.intersectionRatio<1){var r=eT.get(t);r&&(clearTimeout(r),eT.set(t,null))}}),f.exposure={unsubscribe:function(){ek.unsubscribe()},reset:function(){eT.forEach(function(e){e&&clearTimeout(e)}),eT.clear(),eS.clear()}},f.exposure&&E.push(f.exposure),I=function(){h(!0)},null==p||p.addEventListener("beforeunload",I),g=function(){null==p||p.removeEventListener("beforeunload",I)},E.push({unsubscribe:function(){return g()}}),(P=s[C.NavigateObservable])?E.push(P.subscribe(function(){h(!0)})):p&&(R=function(){h(!0)},p.addEventListener("popstate",R),D=p.history.pushState,p.history&&D&&(p.history.pushState=new Proxy(D,{apply:function(e,t,r){var n=(0,q.__read)(r,3),i=n[0],o=n[1],a=n[2];e.apply(t,[i,o,a]),h(!0)}})),E.push({unsubscribe:function(){p.removeEventListener("popstate",R),p.history&&D&&(p.history.pushState=D)}}))),null==(U=null==t?void 0:t.loggerProvider)||U.log("".concat(w," has been successfully added.")),window.opener&&_.enabled){var F,B,H,V,z,$,W,J,K,G,Y,X,Q,Z,ee,et,er,en,ei,eo,ea,es,eu,el,ec,ed,ef,ep,eg,eh,em,e_,ey,eb,ew,eE,eS,eT,ek;if(N=e.cssSelectorAllowlist,L=e.actionClickAllowlist,function(e,t){if(!0!==e[np]){e[np]=!0;var r=t.dataExtractor,n=t.isElementSelectable,i=t.cssSelectorAllowlist,o=t.actionClickAllowlist,a=null,s=function(t){e.notify({action:"element-selected",data:t})},u=function(t,r){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:r}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:r})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var l;a=null==(l=null==window?void 0:window.amplitudeVisualTaggingSelector)?void 0:l.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!n||n((null==t?void 0:t.actionType)||"click",e)},onTrack:u,onSelect:s,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:i,actionClickAllowlist:o,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:r3}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null==(t=e.logger)||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null==(e=null==a?void 0:a.close)||e.call(a)})}}(M=function(){var e=ev(),t=null==e?void 0:e[rY];if("object"==typeof t&&null!==t&&rG in t&&!0===t[rG])return t;var r=new rX(void 0);return e&&(e[rY]=r),r}(),{dataExtractor:S,isElementSelectable:ns(e,(0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(N),!1),(0,q.__read)(L),!1)),cssSelectorAllowlist:N,actionClickAllowlist:L}),!0!==M[rQ]){M[rQ]=!0;var eA="https://cdn.amplitude.com/libs/background-capture-1.0.0-alpha.3.js.gz",eI=null,eP=function(e,t){var r,n;"background-capture-complete"===e&&(null==(n=null==(r=M.logger)?void 0:r.debug)||n.call(r,"Backgroun
1d capture complete"),M.notify({action:"background-capture-complete",data:t}))};M.registerActionHandler("initialize-background-capture",function(){null==(t=null==(e=M.logger)?void 0:e.debug)||t.call(e,"Initializing background capture (external script)");var e,t,r=new URL(eA,M.endpoint).toString();M.loadScriptOnce(r).then(function(){var e,t,r;null==(t=null==(e=M.logger)?void 0:e.debug)||t.call(e,"Background capture script loaded (external)"),eI=null==(r=null==window?void 0:window.amplitudeBackgroundCapture)?void 0:r.call(window,{messenger:M,onBackgroundCapture:eP}),M.notify({action:"background-capture-loaded"})}).catch(function(){var e;null==(e=M.logger)||e.warn("Failed to initialize background capture")})}),M.registerActionHandler("close-background-capture",function(){var e;null==(e=null==eI?void 0:eI.close)||e.call(eI),eI=null})}M.setup((0,q.__assign)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:rK[t.serverZone]}))}return[2]})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,q.__generator)(this,function(i){try{for(t=(e=(0,q.__values)(E)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(r)throw r.error}}return[2]})})}}},ng=rZ,nY=(0,q.__spreadArray)(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],(0,q.__read)(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),nX=["*"],nQ=["mutation","navigate"];function nZ(e,t){var r,n,i,o,a=t.event,s=a.pageX,u=a.pageY;e.yMin=Math.min(null!=(r=e.yMin)?r:u,u),e.yMax=Math.max(null!=(n=e.yMax)?n:u,u),e.xMin=Math.min(null!=(i=e.xMin)?i:s,s),e.xMax=Math.max(null!=(o=e.xMax)?o:s,s),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function n0(e){if(0===e.length)return null;var t=e[0],r=e[e.length-1];return{rageClickEvent:(0,q.__assign)({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}var ng=rZ;(f=O||(O={})).INCREASING="increasing",f.DECREASING="decreasing",(p=R||(R={})).X="x",p.Y="y";var n1=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new ng.default(function(e){var r=null,n=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};if(null===r){r=o;return}o.x>r.x?(n===O.DECREASING&&e.next(R.X),n=O.INCREASING):o.x<r.x&&(n===O.INCREASING&&e.next(R.X),n=O.DECREASING),o.y>r.y?(i===O.DECREASING&&e.next(R.Y),i=O.INCREASING):o.y<r.y&&(i===O.INCREASING&&e.next(R.Y),i=O.DECREASING),r=o})})};function n2(e){var t=e.changes,r=e.changesThreshold,n=e.thresholdMs;return!(t.length<r)&&t[t.length-1]-t[0]<n}function n3(e){e.changes=[],e.startTime=void 0}function n4(e){for(var t=e.changes,r=e.thresholdMs,n=0,i=t[t.length-1];n<t.length&&!(i-t[n]<r);n++);0!==n&&(e.startTime=t[n],e.changes.splice(0,n))}var n5=function(e){var t=e.mouseDirectionChangeObservable,r=e.directionChanges,n=void 0===r?20:r,i=e.thresholdMs,o=void 0===i?2e3:i;return new ng.default(function(e){var r={changes:[],changesThreshold:n,thresholdMs:o},i={changes:[],changesThreshold:n,thresholdMs:o},a=void 0,s=null;function u(){void 0!==a&&(e.next(a),a=void 0,null!==s&&clearTimeout(s),n3(r),n3(i))}return t.subscribe(function(e){null!==s&&clearTimeout(s),t=e===R.X?r:i,n=+Date.now(),t.startTime=t.startTime||n,l=t.changes,c=t.changesThreshold,l.push(n),l.length>c&&l.shift();var t,n,l,c,d=function(e,t){var r=void 0;if(n2(e)&&(r=e.startTime),n2(t)){var n=t.startTime;n&&(!r||n<r)&&(r=n)}return r}(r,i);return d?(a=a||d,s=setTimeout(function(){u(),s=null},o)):u(),n4(r),n4(i),function(){null!==s&&(clearTimeout(s),s=null)}})})},n6=function(e){var t=e.amplitude,r=e.options,n=e.allObservables,i=e.directionChanges,o=e.thresholdMs;return n5({mouseDirectionChangeObservable:n1({allWindowObservables:n}),directionChanges:void 0===i?20:i,thresholdMs:void 0===o?2e3:o}).subscribe(function(e){na(r)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function n8(e,t,r,n){if(!n)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:r}var n7=function(e){void 0===e&&(e={});var t,r="@amplitude/plugin-frustration-browser",n=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var o=!1!==e.deadClicks&&null!==e.deadClicks,a=!1!==e.rageClicks&&null!==e.rageClicks,s=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(s=!1);var u=n8(e,"rageClicks",nX,a),l=n8(e,"deadClicks",nY,o),c=n8(e,"errorClicks",nY,i),d=null!=(t=e.dataAttributePrefix)?t:r$,f=new nK(e),p=(0,q.__spreadArray)([],(0,q.__read)(new Set((0,q.__spreadArray)((0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(u),!1),(0,q.__read)(l),!1),(0,q.__read)(c),!1))),!1),g=function(){var e,t,r=r2(nT("pointerdown").map(function(e){return f.addAdditionalEventProperties(e,"click",p,d,!0)})),n=r2(nk().map(function(e){return f.addTypeAndTimestamp(e,"error")})),i=r2(nS().map(function(e){return f.addAdditionalEventProperties(e,"mutation",p,d)}));window.navigation&&(t=r2(new ng.default(function(e){var t=function(t){e.next((0,q.__assign)((0,q.__assign)({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return f.addAdditionalEventProperties(e,"navigate",p,d)})));var o=r2(new ng.default(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){var r=void 0,n=void 0;try{if(r=t.selectionStart,n=t.selectionEnd,r===n)return}catch(e){return}return e.next()}var i=window.getSelection();if(i&&!i.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),a=r2(new ng.default(function(e){var t=function(t){e.next(t)},r={capture:!0};return nE.document.addEventListener("mousemove",t,r),function(){nE.document.removeEventListener("mousemove",t,r)}}));return(e={})[C.ClickObservable]=r,e[C.MutationObservable]=i,e[C.NavigateObservable]=t,e[C.BrowserErrorObservable]=n,e[C.SelectionObservable]=o,e[C.MouseMoveObservable]=a,e};return{name:r,type:"enrichment",setup:function(t,p){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var h,v,m,_,y,b,w,E;return(0,q.__generator)(this,function(S){var T,k,A,I,P,C,O,R,D,N,L,M,U,j,F,B,H,V,z,$,W,J;return"u"<typeof document?[2]:(h=g(),a&&(v=function(e){var t=this,r=e.amplitude,n=e.allObservables,i=e.shouldTrackRageClick,o=n.clickObservable,a=n.selectionObservable,s=[],u={},l=null;function c(e){s=[],u={},e&&(nZ(u,e),s.push(e))}var d=r0(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return(0,q.__awaiter)(t,void 0,void 0,function(){var t;return(0,q.__generator)(this,function(r){var n,i,o,a;return(nZ(u,e),t=null,0===s.length||(n=s).length>0&&n[n.length-1].closestTrackedAncestor!==e.closestTrackedAncestor||(o=Math.max(0,(i=s).length-4+1),a=i[o],e.timestamp-a.timestamp>=1e3)||u.isOutOfBounds)?(l&&(t=n0(s)),c(e)):s.push(e),(l&&(clearTimeout(l.timerId),l.resolve(t),l=null),s.length>=4)?[2,new Promise(function(e){l={resolve:e,timerId:setTimeout(function(){e(n0(s))},1e3)}})]:[2,null]})})}),f=null==a?void 0:a.subscribe(function(){c()}),p=d.subscribe(function(e){null!==e&&r.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){p.unsubscribe(),null==f||f.unsubscribe()}}}({allObservables:h,amplitude:p,shouldTrackRageClick:ns(e,u)}),n.push(v)),o&&(k=(T={amplitude:p,allObservables:h,getEventProperties:function(e,t){return f.getEventProperties(e,t,d)},shouldTrackDeadClick:ns(e,l)}).amplitude,A=T.allObservables,I=T.getEventProperties,P=T.shouldTrackDeadClick,C=A.clickObservable,O=A.mutationObservable,R=A.navigateObservable,D=C.filter(function(e){return nf(e)&&P("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===x.LEFT_OR_TOUCH_CONTACT}),N=R?r1(O,R):O,L=r1(D,N),M=null,m=r0(L,function(e){if(M&&nQ.includes(e.type))clearTimeout(
1M),M=null;else if("click"===e.type)return M?Promise.resolve(null):new Promise(function(t){M=setTimeout(function(){t(e),M=null},3e3)});return Promise.resolve(null)}).subscribe(function(e){if(e){var t={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};k.track("[Amplitude] Dead Click",(0,q.__assign)((0,q.__assign)({},I("click",e.closestTrackedAncestor)),t),{time:e.timestamp})}}),n.push(m)),i&&(j=(U={amplitude:p,allObservables:h,shouldTrackErrorClick:ns(e,c)}).amplitude,F=U.allObservables,B=U.shouldTrackErrorClick,H=F.clickObservable,V=F.browserErrorObservable,z=H.filter(function(e){return nf(e)&&B("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===x.LEFT_OR_TOUCH_CONTACT}),$=null,W=null,J=function(){null!==$&&(clearTimeout($),$=null),W=null},_=r1(z,V).subscribe(function(e){var t;if("click"===e.type){J(),W=e,$=setTimeout(J,2e3);return}"error"===e.type&&W&&(j.track("[Amplitude] Error Click",(0,q.__assign)(((t={})["[Amplitude] Kind"]=e.event.kind,t["[Amplitude] Message"]=e.event.message,t["[Amplitude] Stack"]=e.event.stack,t["[Amplitude] Filename"]=e.event.filename,t["[Amplitude] Line Number"]=e.event.lineNumber,t["[Amplitude] Column Number"]=e.event.columnNumber,t),W.targetElementProperties)),J())}),n.push(_)),s&&(y=void 0,b=void 0,"object"==typeof e.thrashedCursor&&(y=e.thrashedCursor.directionChanges,b=e.thrashedCursor.threshold,y&&y<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(y," is below the minimum of ").concat(5,", setting to ").concat(5)),y=5),b&&b>4e3&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(b," is above the maximum of ").concat(4e3,", setting to ").concat(4e3)),b=4e3)),w=n6({amplitude:p,options:e,allObservables:h,directionChanges:y,thresholdMs:b}),n.push(w)),null==(E=null==t?void 0:t.loggerProvider)||E.log("".concat(r," has been successfully added.")),[2])})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,i;return(0,q.__generator)(this,function(o){try{for(t=(e=(0,q.__values)(n)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}};function n9(e,t){var r=e.startTime+e.duration;return t.filter(function(t){return t.startTime<r&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})}var ie=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",r=[],n=!0===e.mainThreadBlock||"object"==typeof e.mainThreadBlock&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var a,s,u;return(0,q.__generator)(this,function(l){return"u"<typeof document||(n&&(a=100,"object"==typeof e.mainThreadBlock&&void 0!==e.mainThreadBlock.durationThreshold&&(a=e.mainThreadBlock.durationThreshold),s=function(e){var t=e.amplitude,r=e.options,n=e.durationThreshold,i=void 0===n?100:n,o=function(){if("u"<typeof PerformanceObserver)return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch(e){}return null}();if(!o)return{unsubscribe:function(){}};var a=[],s=new PerformanceObserver(function(e){var t,r,n=performance.now();try{for(var i=(0,q.__values)(e.getEntries()),o=i.next();!o.done;o=i.next()){var s=o.value;a.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}for(var u=n-1e4;a.length>0&&a[0].startTime<u;)a.shift()});try{s.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var n,s;try{for(var u=(0,q.__values)(e.getEntries()),l=u.next();!l.done;l=u.next()){var c=l.value;if(!na(r))return;if(!(c.duration<i)){var d="long-animation-frame"===o?function(e,t){var r,n=n9(e,t),i=null!=(r=e.scripts)?r:[],o=i.map(function(e){return e.sourceURL}
1).filter(Boolean),a=i.map(function(e){return e.sourceFunctionName}).filter(Boolean),s=i.map(function(e){return e.sourceCharPosition}).filter(function(e){return"number"==typeof e&&e>=0}),u=i.map(function(e){return e.invokerType}).filter(Boolean),l=i.map(function(e){return e.invoker}).filter(Boolean);return(0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)({"[Amplitude] Main Thread Block Source":"long-animation-frame","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.blockingDuration,"[Amplitude] Main Thread Block Start Time":e.startTime},n.length>0&&{"[Amplitude] Main Thread Block Measures":n}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":i.length}),o.length>0&&{"[Amplitude] Main Thread Block Script URLs":o}),a.length>0&&{"[Amplitude] Main Thread Block Script Functions":a}),s.length>0&&{"[Amplitude] Main Thread Block Script Positions":s}),u.length>0&&{"[Amplitude] Main Thread Block Invoker Types":u}),l.length>0&&{"[Amplitude] Main Thread Block Invokers":l})}(c,a):function(e,t){var r,n=n9(e,t),i=null!=(r=e.attribution)?r:[];return(0,q.__assign)((0,q.__assign)({"[Amplitude] Main Thread Block Source":"long-task","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.duration,"[Amplitude] Main Thread Block Start Time":e.startTime},n.length>0&&{"[Amplitude] Main Thread Block Measures":n}),i.length>0&&{"[Amplitude] Main Thread Block Attribution":i.map(function(e){return e.name})})}(c,a);t.track("[Amplitude] Main Thread Block",d)}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(n)throw n.error}}});try{u.observe({entryTypes:[o]})}catch(e){return s.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),s.disconnect()}}}({amplitude:o,options:e,durationThreshold:a}),r.push(s)),null==(u=null==i?void 0:i.loggerProvider)||u.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,i;return(0,q.__generator)(this,function(o){try{for(t=(e=(0,q.__values)(r)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return[2]})})}}},it=function(){var t="ampIntegrationContext";return"u">typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g},ir=(0,q.__spreadArray)([],(0,q.__read)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),ii=function(e){var t,r=it();if(!(null==(t=null==r?void 0:r.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,ii);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,(0,q.__spreadArray)([],(0,q.__read)(n.entries()),!1).map(function(e){var t=(0,q.__read)(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(ir[n]):ir[n]}).join("")};function io(e,t,r){e&&function e(t){var r,n,i=t.json,o=t.targetObject,a=t.allowlist,s=t.excludelist,u=t.ancestors,l=t.parentObject,c=t.targetKey;o||(o=i);var d=Object.keys(o);try{for(var f=(0,q.__values)(d),p=f.next();!p.done;p=f.next()){var g,h=p.value,v=(0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(u),!1),[h],!1);(g=o[h],"string"==typeof g||"number"==typeof g||"boolean"==typeof g||null==g)?(!is(v,a)||is(v,s))&&delete o[h]:e({json:i,targetObject:o[h],allowlist:a,excludelist:s,ancestors:v,parentObject:o,targetKey:h})}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}0===Object.keys(o).length&&l&&c&&delete l[c]}({json:e,allowlist:t.map(ia),excludelist:r.map(ia),ancestors:[]})}function ia(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function is(e,t){return t.some(function(t){return function e(t,r,n,i){if(void 0===n&&(n=0),void 0===i&&(i=0),i===r.length)return n===t.length;if(n===t.length){for(;i<r.length&&"**"===r[i];)i++;return i===r.length}var o=r[i];if("**"===o){if(i+1===r.length)return!0;for(var a=n;a<=t.length;a++)if(e(t,r,a,i+1))return!0;return!1}return("*"===o||o===t[n])&&e(t,r,n+1,i+1)}(e,t)})}var iu=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],il=["authorization","cookie","set-cookie"],ic=function(){function e(e){this.request=e}return e.prototype.headers=function(e){void 0===e&&(e=[]);var t,r,n=this.request.headers,i={};if(Array.isArray(n))n.forEach(function(e){var t=(0,q.__read)(e,2),r=t[0],n=t[1];i[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){i[t]=e});else if("object"==typeof n&&null!==n)try{for(var o=(0,q.__values)(Object.entries(n)),a=o.next();!a.done;a=o.next()){var s=(0,q.__read)(a.value,2),u=s[0],l=s[1];i[u]=l}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i_(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=it();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=ip(t,100),this._bodySize}}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){return 0===e.length?[2,null]:[2,iv(this.body,e,t)]})})},e}(),id=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),i_(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return ip(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){return 0===e.length?[2,null]:[2,iv(this.body,e,t)]})})},e}();function ip(e,t){var r,n,i,o,a=it(),s=null==a?void 0:a.TextEncoder;if(s){if("string"==typeof e)o=e,i=new s().encode(o).length;else if(e instanceof Blob)i=(o=e).size;else if(e instanceof URLSearchParams)o=e,i=new s().encode(o.toString()).length;else if(ArrayBuffer.isView(e))i=(o=e).byteLength;else if(e instanceof ArrayBuffer)i=(o=e).byteLength;else if(e instanceof FormData){var u=0,l=0;try{for(var c=(0,q.__values)(e.entries()),d=c.next();!d.done;d=c.next()){var f=(0,q.__read)(d.value,2),p=f[0],g=f[1];if(u+=p.length,"string"==typeof g)u+=new s().encode(g).length;else{if(!(g instanceof Blob))return;u+=g.size}if(++l>=t)return}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}i=u}else if(e instanceof ReadableStream){o=e;return}return i}}var ig=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null==(t=null==r?void 0:r.forEach)||t.call(r,function(e,t){n[t]=e}),i_(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(void 0!==this._bodySize)return this._bodySize;var e,t,r=null==(t=null==(e=this.response.headers)?void 0:e.get)?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){switch(e.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this.clonedResponse.text(),new Promise(function(e){return setTimeout(function(){return e(null)},500)})])];case 2:return[2,e.sent()];case 3:return e.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(r){switch(r.label){case 0:if(0===e.length)return[2,null];return[4,this.text()];case 1:return[2,iv(r.sent(),e,t)]}})})},e}(),ih=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){if(void 0===e&&(e=[]),!this.headersString)return{};var t,r,n={},i=this.headersString.split("\r\n");try{for(var o=(0,q.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value,u=(0,q.__read)(s.split(": "),2),l=u[0],c=u[1];l&&c&&(n[l]=c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i_(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,q.__awaiter)(this,void 0,void 0,function(){var r;return(0,q.__generator)(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(io(r,e,t),[2,r]):[2,null]})})},e}();function iv(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return io(n,t,r),n}catch(e){return null}}(g=D||(D={})).REDACT="redact",g.REMOVE="remove";var im="[REDACTED]",i_=function(e,t){var r,n,i=t.allow,o=void 0===i?[]:i,a=t.strategy,s=void 0===a?D.REMOVE:a,u=(0,q.__spreadArray)([],(0,q.__read)(il),!1),l={};try{for(var c=(0,q.__values)(Object.keys(e)),d=c.next();!d.done;d=c.next()){var f=d.value;!function(t){var r=t.toLowerCase();u.find(function(e){return e.toLowerCase()===r})?s===D.REDACT&&(l[t]=im):o.find(function(e){return e.toLowerCase()===r})?l[t]=e[t]:s===D.REDACT&&(l[t]=im)}(f)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return l},iy=function(){function e(e,t,r,n,i,o,a,s,u,l,c){void 0===a&&(a=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=i,this.requestWrapper=o,this.status=a,this.duration=s,this.responseWrapper=u,this.error=l,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,r,n;
1return Object.fromEntries(Object.entries({type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null==(e=this.requestWrapper)?void 0:e.headers((0,q.__spreadArray)([],(0,q.__read)(iu),!1)),requestBodySize:null==(t=this.requestWrapper)?void 0:t.bodySize,responseHeaders:null==(r=this.responseWrapper)?void 0:r.headers((0,q.__spreadArray)([],(0,q.__read)(iu),!1)),responseBodySize:null==(n=this.responseWrapper)?void 0:n.bodySize}).filter(function(e){var t=(0,q.__read)(e,2);return void 0!==(t[0],t[1])}))},e}(),ib=function(e,t){void 0===t&&(t=ii()),this.callback=e,this.id=t};function iw(e){try{e()}catch(e){}}var iE=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=it();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=it();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,i,o,a,s,u,l,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null==(i=null==(n=null==(r=this.globalScope)?void 0:r.XMLHttpRequest)?void 0:n.prototype)?void 0:i.open,p=null==(s=null==(a=null==(o=this.globalScope)?void 0:o.XMLHttpRequest)?void 0:a.prototype)?void 0:s.send,g=null==(c=null==(l=null==(u=this.globalScope)?void 0:u.XMLHttpRequest)?void 0:l.prototype)?void 0:c.setRequestHeader;f&&p&&g&&this.observeXhr(f,p,g);var h=null==(d=this.globalScope)?void 0:d.fetch;h&&this.observeFetch(h),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){try{r.callback(e)}catch(e){iw(function(){var r;null==(r=t.logger)||r.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,i,o,a){if(void 0!==o&&void 0!==a){var s,u,l,c,d="GET";if("object"==typeof t&&null!==t&&"url"in t&&"method"in t?(u=t.url,d=t.method):u=null==(s=null==t?void 0:t.toString)?void 0:s.call(t),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==r?void 0:r.method)||d,n&&(l=n.status),i&&(c={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},l=0);var p=Math.floor(performance.now()-a),g=Math.floor(o+p),h=new iy(e,d,o,o,u,r,l,p,n,c,g);this.triggerEventCallbacks(h)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null==(e=Date.now)?void 0:e.call(Date),durationStart:null==(t=null==performance?void 0:performance.now)?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(r,n){return(0,q.__awaiter)(t,void 0,void 0,function(){var t,i,o,a=this;return(0,q.__generator)(this,function(s){switch(s.label){case 0:try{t=this.getTimestamps()}catch(e){iw(function(){var t;return null==(t=a.logger)?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}s.label=1;case 1:return s.trys.push([1,3,,4]),[4,e(r,n)];case 2:return i=s.sent(),[3,4];case 3:return o=s.sent(),[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,n?new ic(n):void 0,i?new ig(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){iw(function(){var t;return null==(t=a.logger)?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var r;try{if("json"===e.responseType){if(null==(r=t.globalScope)?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){r instanceof Error&&"InvalidStateError"===r.name&&iw(function(){var r;return null==(r=t.logger)?void 0:r.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))})}return null}},e.prototype.observeXhr=function(t,r,n){if(this.globalScope&&t&&r){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=(0,q.__read)(r,2),a=i[0],s=i[1];try{this.$$AmplitudeAnalyticsEvent=(0,q.__assign)({method:a,url:null==(e=null==s?void 0:s.toString)?void 0:e.call(s),headers:{}},o.getTimestamps())}catch(e){iw(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,r)},i.send=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this,a=e.createXhrJsonParser(this,o),s=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),r=new ih(i.status,e,t?parseInt(t,10):void 0,a),n=i.$$AmplitudeAnalyticsEvent.headers,l=new id(s,n);u.status=i.status,o.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},l,r,void 0,u.startTime,u.durationStart)}catch(e){iw(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),r.apply(i,t)},i.setRequestHeader=function(e,t){try{var r=this.$$AmplitudeAnalyticsEvent;r&&(r.headers[e]=t)}catch(e){iw(function(){var t;return null==(t=o.logger)?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}n.apply(this,[e,t])}}},e}()),iS="[Amplitude] Network Request",ng=rZ,iT="500-599";function ik(e,t){return RegExp("^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$").test(e)}function iA(e,t){var r,n,i=t.split(",");try{for(var o=(0,q.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value,u=(0,q.__read)(s.split("-").map(Number),2),l=u[0],c=u[1];if(e===l&&void 0===c||e>=l&&e<=c)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}function iI(e){var t;if(e)try{var r=null==(t=it())?void 0:t.location.href,n=new URL(e,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),a=n.href,s=n.host;n.hash="",n.search="";var u=n.href;return{query:i,fragment:o,href:a,hrefWithoutQueryOrHash:u,host:s}}catch(e){return}}function iP(e){return"object"!=typeof e||null===e?e?(0,q.__spreadArray)([],(0,q.__read)(iu),!1):void 0:0!==e.length?e:void 0}function ix(e){var t,r,n;return!(null==(t=null==e?void 0:e.allowlist)?void 0:t.length)&&!(null==(r=null==e?void 0:e.blocklist)?void 0:r.length)&&!(null==(n=null==e?void 0:e.excludelist)?void 0:n.length)}(N||(N={})).NetworkObservable="networkObservable";var iC=function(e){void 0===e&&(e={});var t,r="@amplitude/plugin-network-capture-browser",n=function(){var e,r=new ng.default(function(e){var r=new ib(function(t){var r={event:t,timestamp:Date.now(),type:"network"};e.next(r)});return iE.subscribe(r,t),function(){iE.unsubscribe(r)}});return(e={})[N.NetworkObservable]=r,e};return{name:r,type:"enrichment",setup:function(i,o){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var a;return(0,q.__generator)(this,function(s){var u,l,c,d,f;return"u"<typeof document?[2]:(a=n(),t=null==i?void 0:i.loggerProvider,l=(u={allObservables:a,networkTrackingOptions:e,amplitude:o,loggerProvider:t}).allObservables,c=u.networkTrackingOptions,d=u.amplitude,f=u.loggerProvider,L=l.networkObservable.filter(function(e){return function(e,t){void 0===t&&(t={});var r,n,i=iI(e.url);if(!i)return!1;var o=i.host;return!(!1!==t.ignoreAmplitudeRequests&&(ik(o,"*.amplitude.com")||ik(o,"amplitude.com"))||(null==(r=t.ignoreHosts)?void 0:r.find(function(e){return ik(o,e)})))&&(!!t.captureRules||void 0===e.status||!!iA(e.status,iT))&&(!t.captureRules||((0,q.__spreadArray)([],(0,q.__read)(t.captureRules),!1).reverse().find(function(t){if(n=function(e,t,r,n,i){var o;if(!e.hosts||e.hosts.find(function(e){return ik(t,e)})){if((!n||!e.urls||!(o=e.urls)||!o.length||o.some(function(e){return"string"==typeof e?n===e:n.match(e)}))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return(!r&&0!==r||!!iA(r,e.statusCodeRange||iT))&&!0}}(t,o,e.status,e.url,e.method)){var r=iP(t.responseHeaders);if(e.responseWrapper&&r){var i=e.responseWrapper.headers(r);i&&(e.responseHeaders=i)}var a=iP(t.requestHeaders);if(e.requestWrapper&&a){var s=e.requestWrapper.headers(a);s&&(e.requestHeaders=s)}if(e.responseWrapper&&t.responseBody&&!ix(t.responseBody)){var u=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,u)}if(e.requestWrapper&&t.requestBody&&!ix(t.requestBody)){var u=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,u)}}return void 0!==n}),!!n))&&!(e.requestWrapper&&function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===iS}))return!0}catch(e){}return!1}(o,e.requestWrapper))}(e.event,c)}).subscribe(function(e){var t,r,n,i=e.event,o=iI(i.url);if(o){var a=null==(r=i.responseWrapper)?void 0:r.bodySize,s=null==(n=i.requestWrapper)?void 0:n.bodySize;!function(e,t,r,n){(0,q.__awaiter)(this,void 0,void 0,function(){var i,o,a;return(0,q.__generator)(this,function(s){switch(s.label){case 0:if(!(t.requestBodyJson||t.responseBodyJson))return[3,2];return[4,Promise.all([t.requestBodyJson,t.responseBodyJson])];case 1:if(o=(i=q.__read.apply(void 0,[s.sent(),2]))[0],a=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==n||n.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==n||n.debug("Failed to stringify response body")}s.label=2;case 2:return null==r||r.track(iS,e),[2]}})})}(((t={})["[Amplitude] URL"]=o.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=o.query,t["[Amplitude] URL Fragment"]=o.fragment,t["[Amplitude] Request Method"]=i.method,t["[Amplitude] Status Code"]=i.status,t["[Amplitude] Start Time"]=i.startTime,t["[Amplitude] Completion Time"]=i.endTime,t["[Amplitude] Duration"]=i.duration,t["[Amplitude] Request Body Size"]=s,t["[Amplitude] Response Body Size"]=a,t["[Amplitude] Request Type"]=i.type,t["[Amplitude] Request Headers"]=i.requestHeaders,t["[Amplitude] Response Headers"]=i.responseHeaders,t),i,d,f)}}),null==t||t.log("".concat(r," has been successfully added.")),[2])})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return L.unsubscribe(),[2]})})}}},iO=function(){var t="ampIntegrationContext";return"u">typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g},iR=function(e,t){var r=e;try{r=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return r};let iD=-1,iN=e=>{addEventListener("pageshow",t=>{t.persisted&&(iD=t.timeStamp,e(t))},!0)},iL=(e,t,r,n)=>{let i,o;return a=>{let s;t.value>=0&&(a||n)&&((o=t.value-(i??0))||void 0===i)&&(i=t.value,t.delta=o,s=t.value,t.rating=s>r[1]?"poor":s>r[0]?"needs-improvement":"good",e(t))}},iM=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},iU=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ij=()=>{let e=iU();return e?.activationStart??0},iF=(e,t=-1)=>{let r=iU(),n="navigate";return iD>=0?n="back-forward-cache":r&&(document.prerendering||ij()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,navigationType:n}},iq=new WeakMap;function iB(e,t){return iq.get(e)||iq.set(e,new t),iq.get(e)}class iH{t;i=0;o=[];h(e){if(e.hadRecentInput)return;let t=this.o[0],r=this.o.at(-1);this.i&&t&&r&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}let iV=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},iz=e=>{let t=!1;return()=>{t||(e(),t=!0)}},i$=-1,iW=new Set,iJ=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,iK=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(let e of iW)e();isFinite(i$)||(i$="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",iK,!0))}},iG=()=>{if(i$<0){let e=ij();i$=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime)??iJ(),addEventListener("visibilitychange",iK,!0),addEventListener("prerenderingchange",iK,!0),iN(()=>{setTimeout(()=>{i$=iJ()})})}return{get firstHiddenTime(){return i$},onHidden(e){iW.add(e)}}},iY=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},iX=[1800,3e3],iQ=(e,t={})=>{iY(()=>{let r=iG(),n,i=iF("FCP"),o=iV("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<r.firstHiddenTime&&(i.value=Math.max(t.startTime-ij(),0),i.entries.push(t),n(!0)))});o&&(n=iL(e,i,iX,t.reportAllChanges),iN(r=>{n=iL(e,i=iF("FCP"),iX,t.reportAllChanges),iM(()=>{i.value=performance.now()-r.timeStamp,n(!0)})}))})},iZ=[.1,.25],i0=0,i1=1/0,i2=0,i3=e=>{for(let t of e)t.interactionId&&(i1=Math.min(i1,t.interactionId),i0=(i2=Math.max(i2,t.interactionId))?(i2-i1)/7+1:0)},i4=()=>t?i0:performance.interactionCount??0,i5=0;class i6{u=[];l=new Map;m;p;v(){i5=i4(),this.u.length=0,this.l.clear()}L(){let e=Math.min(this.u.length-1,Math.floor((i4()-i5)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;let t=this.u.at(-1),r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>t.P){if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((e,t)=>
1t.P-e.P),this.u.length>10)for(let e of this.u.splice(10))this.l.delete(e.id);this.p?.(r)}}}let i8=e=>{let t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(addEventListener("visibilitychange",e=iz(e),{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},i7=[200,500];class i9{m;h(e){this.m?.(e)}}let oe=[2500,4e3],ot=[800,1800],or=e=>{document.prerendering?iY(()=>or(e)):"complete"!==document.readyState?addEventListener("load",()=>or(e),!0):setTimeout(e)};function on(e){var t,r;return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor((r=(null==(t=e.entries[0])?void 0:t.startTime)||0,performance.timeOrigin+r)),navigationStart:Math.floor(performance.timeOrigin)}}var oi=function(){var e=null,r=iO(),n=null==r?void 0:r.document,i=null==r?void 0:r.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(r,o){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var a,s;return(0,q.__generator)(this,function(u){return void 0===n||(a=iR((null==i?void 0:i.href)||"",r.loggerProvider),s={"[Amplitude] Page Domain":(null==i?void 0:i.hostname)||"","[Amplitude] Page Location":a,"[Amplitude] Page Path":iR((null==i?void 0:i.pathname)||"",r.loggerProvider),"[Amplitude] Page Title":"u">typeof document&&document.title||"","[Amplitude] Page URL":iR(a.split("?")[0],r.loggerProvider)},((e,t={})=>{iY(()=>{let r=iG(),n,i=iF("LCP"),o=iB(t,i9),a=e=>{for(let a of(t.reportAllChanges||(e=e.slice(-1)),e))o.h(a),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-ij(),0),i.entries=[a],n())},s=iV("largest-contentful-paint",a);if(s){n=iL(e,i,oe,t.reportAllChanges);let r=iz(()=>{a(s.takeRecords()),s.disconnect(),n(!0)}),o=e=>{e.isTrusted&&(i8(r),removeEventListener(e.type,o,{capture:!0}))};for(let e of["keydown","click","visibilitychange"])addEventListener(e,o,{capture:!0});iN(r=>{n=iL(e,i=iF("LCP"),oe,t.reportAllChanges),iM(()=>{i.value=performance.now()-r.timeStamp,n(!0)})})}})})(function(e){s["[Amplitude] LCP"]=on(e)}),iQ(function(e){s["[Amplitude] FCP"]=on(e)}),((e,r={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;let n=iG();iY(()=>{"interactionCount"in performance||t||(t=iV("event",i3,{type:"event",buffered:!0,durationThreshold:0}));let i,o=iF("INP"),a=iB(r,i6),s=e=>{i8(()=>{for(let t of e)a.h(t);let t=a.L();t&&t.P!==o.value&&(o.value=t.P,o.entries=t.entries,i())})},u=iV("event",s,{durationThreshold:r.durationThreshold??40});i=iL(e,o,i7,r.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(u.takeRecords()),i(!0)}),iN(()=>{a.v(),i=iL(e,o=iF("INP"),i7,r.reportAllChanges)}))})})(function(e){s["[Amplitude] INP"]=on(e)}),((e,t={})=>{let r=iG();iQ(iz(()=>{let n,i=iF("CLS",0),o=iB(t,iH),a=e=>{for(let t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,n())},s=iV("layout-shift",a);s&&(n=iL(e,i,iZ,t.reportAllChanges),r.onHidden(()=>{a(s.takeRecords()),n(!0)}),iN(()=>{o.i=0,n=iL(e,i=iF("CLS",0),iZ,t.reportAllChanges),iM(()=>n())}),setTimeout(n))}))})(function(e){s["[Amplitude] CLS"]=on(e)}),((e,t={})=>{let r=iF("TTFB"),n=iL(e,r,ot,t.reportAllChanges);or(()=>{let i=iU();i&&(r.value=Math.max(i.responseStart-ij(),0),r.entries=[i],n(!0),iN(()=>{(n=iL(e,r=iF("TTFB",0),ot,t.reportAllChanges))(!0)}))})})(function(e){s["[Amplitude] TTFB"]=on(e)}),e=function(){"hidden"===n.visibilityState&&e&&(o.track("[Amplitude] Web Vitals",s),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},oo=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),["AMP",t,e.substring(0,r)].filter(Boolean).join("_")},oa=function(){function e(){}return e.prototype.parse=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return[2,(0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)({},el),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=eV();
1return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!=(t=null==(e=r.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=eV();return(e={})[Q]=t[Q],e[Z]=t[Z],e[ee]=t[ee],e[et]=t[et],e[er]=t[er],e[en]=t[en],e[ei]=t[ei],e[eo]=t[eo],e[ea]=t[ea],e[es]=t[es],e[eu]=t[eu],e},e}(),os=function(){function e(e,t){var r;this.shouldTrackNewCampaign=!1,this.options=(0,q.__assign)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:t5((null==(r=t.cookieOptions)?void 0:r.domain)||t.topLevelDomain),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=oo(t.apiKey,"MKTG"),this.webExpStorageKey=oo(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=el,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,this.topLevelDomain=t.topLevelDomain,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,q.__generator)(this,function(r){switch(r.label){case 0:if(this.options.optOut)return[2];return[4,this.fetchCampaign()];case 1:if(t=q.__read.apply(void 0,[r.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||eB(this.sessionTimeout,this.lastEventTime),!t2(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){var e;return(0,q.__generator)(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:if(!(e=t.sent()))return[3,3];return[4,this.storage.remove(this.webExpStorageKey)];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||new oa().parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,r,n=(t=this.currentCampaign,r=this.options,eb(Object.entries((0,q.__assign)((0,q.__assign)({},el),t)).reduce(function(e,t){var n,i=(0,q.__read)(t,2),o=i[0],a=i[1];return(e.setOnce("initial_".concat(o),null!=(n=null!=a?a:r.initialEmptyValue)?n:"EMPTY"),a)?e.set(o,a):e.unset(o)},new ep)));return e&&(n.event_id=e),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),ou=function(){var t="ampIntegrationContext";return"u">typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g},ol=function(){var e,t=ou();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var r=t.split("=",2),n=oc(r[0]),i=oc(r[1]);return i&&(e[n]=i),e},{}):{}},oc=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},od="dclid",of="fbclid",op="gbraid",og="gclid",oh="ko_click_id",ov="li_fat_id",om="msclkid",o_="rdt_cid",oy="ttclid",ob="twclid",ow="wbraid",oE={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},oS=function(){function e(){}return e.prototype.parse=function(){return(0,q.__awaiter)(this,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return[2,(0,q.__assign)((0,q.__assign)((0,q.__assign)((0,q.__assign)({},oE),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=ol();
1return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!=(t=null==(e=r.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=ol();return(e={})[od]=t[od],e[of]=t[of],e[op]=t[op],e[og]=t[og],e[oh]=t[oh],e[ov]=t[ov],e[om]=t[om],e[o_]=t[o_],e[oy]=t[oy],e[ob]=t[ob],e[ow]=t[ow],e},e}(),oT=function(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=n)}return t};(h=M||(M={})).SET="$set",h.SET_ONCE="$setOnce",h.ADD="$add",h.APPEND="$append",h.PREPEND="$prepend",h.REMOVE="$remove",h.PREINSERT="$preInsert",h.POSTINSERT="$postInsert",h.UNSET="$unset",h.CLEAR_ALL="$clearAll",(v=U||(U={})).IDENTIFY="$identify",v.GROUP_IDENTIFY="$groupidentify",v.REVENUE="revenue_amount";var ok=new Set([U.IDENTIFY,U.GROUP_IDENTIFY]),oA=function(e){void 0===e&&(e={});var t,r,n,i,o,a,s,u=null!=(t=e.fallbackAttributionEvent)&&t,l=ou(),c={},d=!1,f=!1,p=function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(e){switch(e.label){case 0:return[4,new oS().parse()];case 1:return c=oT(e.sent()),u&&(null==n||n.log("Tracking attribution fallback event."),null==r||r.track("[Amplitude] Attribution",c)),[2]}})})},g=function(){p()},h=function(e){return new Proxy(e,{apply:function(e,t,r){Reflect.apply(e,t,r),d&&g()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(u){switch(u.label){case 0:return r=t,n=e.loggerProvider,d=!0,n.log("Installing event property attribution tracking."),[4,p()];case 1:if(u.sent(),!l)return[2];if(l.addEventListener("popstate",g),!f){if(i=Reflect.get(l.history,"pushState"),o=Reflect.get(l.history,"replaceState"),!i||!o)return[2];a=h(i),l.history.pushState=a,s=h(o),l.history.replaceState=s,f=!0}return[2]}})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return ok.has(e.event_type)||(e.event_properties=(0,q.__assign)((0,q.__assign)({},c),e.event_properties)),[2,e]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t;return(0,q.__generator)(this,function(r){return l&&(l.removeEventListener("popstate",g),e=Reflect.get(l.history,"pushState"),t=Reflect.get(l.history,"replaceState"),f&&e===a&&i&&(l.history.pushState=i),f&&t===s&&o&&(l.history.replaceState=o)),d=!1,f=!1,i=void 0,o=void 0,a=void 0,s=void 0,c={},[2]})})}}},oI="AMP_CURRENT_PAGE",oP="AMP_PREVIOUS_PAGE",ox="AMP_URL_INFO";(m=j||(j={})).Direct="direct",m.Internal="internal",m.External="external";var oC=new Set([E.IDENTIFY,E.GROUP_IDENTIFY,E.REVENUE]),oO=function(e){var t=(void 0===e?{}:e).internalDomains,r=void 0===t?[]:t,n=ev(),i=void 0,o=!1,a=void 0,s=!1,u=!1,l=function(e){var t;try{var r=nn(e,a);t=new URL(r).hostname}catch(e){null==a||a.error("Could not parse URL: ",e)}return t},c=function(e){var t="u">typeof location&&location.hostname||"",n=e?l(e):void 0;if(!n)return j.Direct;var i=r.some(function(e){return -1!==t.indexOf(e)}),o=r.some(function(e){return -1!==n.indexOf(e)});return t===n||o&&i?j.Internal:j.External},d=function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,a;return(0,q.__generator)(this,function(s){switch(s.label){case 0:if(!(i&&o))return[3,3];return[4,i.get(ox)];case 1:return e=s.sent(),t=nn("u">typeof location&&location.href||""),r=(null==e?void 0:e[oI])||"",n=void 0,n=t===r?(null==e?void 0:e[oP])||"":r||document.referrer||"",[4,i.set(ox,((a={})[oI]=t,a[oP]=n,a))];case 2:s.sent(),s.label=3;case 3:return[2]}})})},f=function(){d()};return{name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var t,r,c,p,g,h,v,m;return(0,q.__generator)(this,function(_){switch(_.label){case 0:if((a=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),u=!0,!n)return[3,7];try{i=new tP(n.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:if(o=null!=(m=_.sent())&&m,!(i&&o))return[3,6];return r=(t="u">typeof document&&document.referrer||"")?l(t):void 0,c="u">typeof location&&location.hostname||"",p=nn("u">typeof location&&location.href||""),[4,i.get(ox)];case 2:if(h=(null==(g=_.sent())?void 0:g[oI])||"",!(r&&r!==c&&h!==p))return[3,4];return[4,i.set(ox,((v={})[oI]=p,v[oP]=t,v))];case 3:return _.sent(),[3,6];case 4:return[4,d()];case 5:_.sent(),_.label=6;case 6:n.addEventListener("popstate",f),s||(n.history.pushState=new Proxy(n.history.pushState,{apply:function(e,t,r){var n=(0,q.__read)(r,3),i=n[0],o=n[1],a=n[2];e.apply(t,[i,o,a]),u&&f()}}),n.history.replaceState=new Proxy(n.history.replaceState,{apply:function(e,t,r){var n=(0,q.__read)(r,3),i=n[0],o=n[1],a=n[2];e.apply(t,[i,o,a]),u&&f()}}),s=!0),_.label=7;case 7:return[2]}})})},execute:function(e){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var t,r,n;return(0,q.__generator)(this,function(a){switch(a.label){case 0:if(t=nn("u">typeof location&&location.href||""),!(i&&o))return[3,2];return[4,i.get(ox)];case 1:if(n=(null==(r=a.sent())?void 0:r[oP])||"",oC.has(e.event_type))return[2,e];e.event_properties=(0,q.__assign)((0,q.__assign)({},e.event_properties||{}),{"[Amplitude] Page Domain":oR(e,"[Amplitude] Page Domain","u">typeof location&&location.hostname||""),"[Amplitude] Page Location":oR(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":oR(e,"[Amplitude] Page Path","u">typeof location&&nn(location.pathname)||""),"[Amplitude] Page Title":oR(e,"[Amplitude] Page Title",nq(nF)),"[Amplitude] Page URL":oR(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":n,"[Amplitude] Previous Page Type":c(n)}),a.label=2;case 2:return[2,e]}})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(e){switch(e.label){case 0:if(n&&(n.removeEventListener("popstate",f),u=!1),!(i&&o))return[3,2];return[4,i.set(ox,{})];case 1:e.sent(),e.label=2;case 2:return[2]}})})}}};function oR(e,t,r){return(e.event_properties||(e.event_properties={}),void 0===e.event_properties[t])?r:e.event_properties[t]}var oD=function(){var e,t,r;function n(t){if(t)try{var r=Function("return "+t)();if("function"==typeof r)return r;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}return{name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var o,a;return(0,q.__generator)(this,function(s){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null==(a=i.remoteConfig)?void 0:a.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){r=e&&"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body?n(e.body||""):n("")}),t=function(){var e;return null==(e=i.remoteConfigClient)?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return(0,q.__awaiter)(void 0,void 0,void 0,function(){var n;return(0,q.__generator)(this,function(i){if(r)try{return[2,null!=(n=r(t))?n:null]}catch(t){null==e||e.error("Could not execute custom enrichment function",t)}return[2,t]})})},teardown:function(){return(0,q.__awaiter)(void 0,void 0,void 0,function(){return(0,q.__generator)(this,function(e){return t&&t(),[2]})})}}},oN="userProperty",oL="eventProperty",oM=function(e){return e===oN||e===oL},oU=function(e){var t=(0,q.__spreadArray)([],(0,q.__read)(new Set((Array.isArray(e)?e:[e]).filter(oM))),!1);return t.length>0?t:[oN]},oj=function(e,t){return oU(e.trackingMethod).includes(t)},oF=function(e){return oj(e,oN)};let oq={init:$((_=new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return(0,q.__extends)(t,e),t.prototype.init=function(e,t,r){var n,i;return void 0===e&&(e=""),arguments.length>2?(n=t,i=r):"string"==typeof t?(n=t,i=void 0):(n=null==t?void 0:t.userId,i=t),eS(this._init((0,q.__assign)((0,q.__assign)({},i),{userId:n,apiKey:e})))},t.prototype._init=function(t){var r,n,i,o,a,s,u,l;return(0,q.__awaiter)(this,void 0,void 0,function(){var c,d,f,p,g,h,v,m,_,y,w,E,S,T,k=this;return(0,q.__generator)(this,function(A){var I,P,x,C,O,R,D,N,L;switch(A.label){case 0:if(this.initializing)return[2];if(this.initializing=!0,c=rn(t),d=null!=(r=t.loggerProvider)?r:new eI,t.loggerProvider||d.enable(null!=(n=t.logLevel)?n:b.Warn),f=null!=(i=t.serverZone)?i:"US",g=this._diagnosticsSampleRate,h=null==(o=t.enableDiagnostics)||o,!c)return[3,2];return p=new eW(t.apiKey,d,f,null==(a=t.remoteConfig)?void 0:a.serverUrl),[4,new Promise(function(e){null==p||p.subscribe("configs.diagnostics.browserSDK","all",function(t,r,n){if(d.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:r,lastFetch:n},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(g=i);var o=t.enabled;"boolean"==typeof o&&(h=o)}e()})})];case 1:A.sent(),A.label=2;case 2:return(v=new e8(t.apiKey,d,f,{enabled:h,sampleRate:g})).setTag("library","".concat(t_,"/").concat(tm)),"u">typeof navigator&&v.setTag("user_agent",navigator.userAgent),[4,(I=t.apiKey,P=t,x=this,C=v,O={loggerProvider:d,serverZone:f,enableDiagnostics:h,diagnosticsSampleRate:g},void 0===P&&(P={}),(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,a,s,u,l,c,d,f,p,g,h,v,m,_,y,b,w,E,S,T,k,A,R,D,N,L,M,U,j,F,B,H,V,z,$,W,J,K,G,Y,X,Q,Z,ee,et,er;return(0,q.__generator)(this,function(en){var ei,eo,ea,es;switch(en.label){case 0:if(e=P.identityStorage||tZ,t="",!(e===tZ&&!(null==(w=P.cookieOptions)?void 0:w.domain)&&(null==(E=P.cookieOptions)?void 0:E.domain)!==""))return[3,2];return[4,(ei=void 0,eo=C,(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,a;return(0,q.__generator)(this,function(s){switch(s.label){case 0:return[4,new tE(void 0,{diagnosticsClient:eo}).isEnabled()];case 1:if(!s.sent()||!ei&&("u"<typeof location||!location.hostname)||1===(t=(e=null!=ei?ei:location.hostname).split(".")).length)return[2,""];for(r=[],n=1,t7.find(function(t){return e.endsWith(".".concat(t))})&&(n=2),i=t.length-n-1;i>=0;--i)r.push(t.slice(i).join("."));i=0,s.label=2;case 2:if(!(i<r.length))return[3,7];o=r[i],s.label=3;
1case 3:return s.trys.push([3,5,,6]),[4,tE.isDomainWritable(o)];case 4:if(s.sent())return[2,"."+o];return[3,6];case 5:return a=s.sent(),eo&&eo.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(o),error:a instanceof Error?a.message:String(a)}),[3,6];case 6:return i++,[3,2];case 7:return eo&&eo.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(e)}),[2,""]}})}))];case 1:t=en.sent(),en.label=2;case 2:return r=(0,q.__assign)({domain:null!=(T=null==(S=P.cookieOptions)?void 0:S.domain)?T:t,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},P.cookieOptions),n={duplicateResolverFn:function(e){var t=tk(e);return!!t&&tA(JSON.parse(t).cookieDomain,r.domain)},diagnosticsClient:C},[4,(ea=i=rr(P.identityStorage,r,n),void 0===(es=null==(A=null==(k=P.cookieOptions)?void 0:k.upgrade)||A)&&(es=!0),(0,q.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,a,s,u;return(0,q.__generator)(this,function(l){switch(l.label){case 0:return e="".concat("amp","_").concat(I.substring(0,6)),[4,ea.getRaw(e)];case 1:if(!(t=l.sent()))return[2,{optOut:!1}];if(!es)return[3,3];return[4,ea.remove(e)];case 2:l.sent(),l.label=3;case 3:return n=(r=(0,q.__read)(t.split("."),6))[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],[2,{deviceId:n,userId:tj(i),sessionId:tU(a),lastEventId:tU(u),lastEventTime:tU(s),optOut:!!o}]}})}))];case 3:return o=en.sent(),[4,i.get(tI(I))];case 4:return a=en.sent(),l=!(u=(s=eV()).ampTimestamp?Number(s.ampTimestamp):void 0)||Date.now()<u,c=null!=(M=null!=(L=null!=(N=null!=(R=P.deviceId)?R:l?null!=(D=s.ampDeviceId)?D:s.deviceId:void 0)?N:null==a?void 0:a.deviceId)?L:o.deviceId)?M:e_(),d=null!=(U=null==a?void 0:a.lastEventId)?U:o.lastEventId,f=null!=(j=null==a?void 0:a.lastEventTime)?j:o.lastEventTime,p=null!=(B=null!=(F=P.optOut)?F:null==a?void 0:a.optOut)?B:o.optOut,g=null!=(H=null==a?void 0:a.sessionId)?H:o.sessionId,h=null==a?void 0:a.deferredSessionId,v=null!=(z=null!=(V=P.userId)?V:null==a?void 0:a.userId)?z:o.userId,x.previousSessionDeviceId=null!=($=null==a?void 0:a.deviceId)?$:o.deviceId,x.previousSessionUserId=null!=(W=null==a?void 0:a.userId)?W:o.userId,m={ipAddress:null==(K=null==(J=P.trackingOptions)?void 0:J.ipAddress)||K,language:null==(Y=null==(G=P.trackingOptions)?void 0:G.language)||Y,platform:null==(Q=null==(X=P.trackingOptions)?void 0:X.platform)||Q},_=null==a?void 0:a.pageCounter,y=null==a?void 0:a.debugLogsEnabled,void 0!==P.autocapture&&(P.defaultTracking=P.autocapture),[4,(b=new rt(I,P.appVersion,i,r,P.defaultTracking,P.autocapture,c,P.flushIntervalMillis,P.flushMaxRetries,P.flushQueueSize,e,P.ingestionMetadata,P.instanceName,d,f,null!=(Z=null==O?void 0:O.loggerProvider)?Z:P.loggerProvider,P.logLevel,P.minIdLength,P.offline,p,P.partnerId,P.plan,P.serverUrl,null!=(ee=null==O?void 0:O.serverZone)?ee:P.serverZone,g,h,P.sessionTimeout,P.storageProvider,m,P.transport,P.useBatch,P.fetchRemoteConfig,v,_,y,P.networkTrackingOptions,P.identify,null!=(et=null==O?void 0:O.enableDiagnostics)?et:P.enableDiagnostics,null!=(er=null==O?void 0:O.diagnosticsSampleRate)?er:x._diagnosticsSampleRate,C,P.remoteConfig,t,P.enableRequestBodyCompression,P.customEnrichment)).storageProvider.isEnabled()];case 5:return en.sent()||(b.loggerProvider.warn("Storage provider ".concat(b.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),b.storageProvider=new tb),[2,b]}})}))];case 3:if(m=A.sent(),!(c&&p))return[3,5];return[4,new Promise(function(e){null==p||p.subscribe("configs.analyticsSDK.browserSDK","all",function(t,r,n){m.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:r,lastFetch:n},null,2)),t&&function(e,t){if(e){!function e(t){if("object"==typeof t&&null!==t&&!Array.isArray(t)){var r,n,i,o,a,s,u,l,c,d,f,p,g=Object.keys(t);try{for(var h=(0,q.__values)(g),v=h.next();!v.done;v=h.next()){var m=v.value;try{var _=t[m];"boolean"==typeof(null==_?void 0:_.enabled)&&(_.enabled?(delete _.enabled,0===Object.keys(_).length&&(t[m]=!0)):t[m]=!1),e(_)}catch(e){}}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}
1try{if(null==(c=null==(l=null==(u=t.autocapture)?void 0:u.networkTracking)?void 0:l.captureRules)?void 0:c.length)try{for(var y=(0,q.__values)(t.autocapture.networkTracking.captureRules),b=y.next();!b.done;b=y.next()){var w=b.value;try{for(var E=(a=void 0,(0,q.__values)(["responseHeaders","requestHeaders"])),S=E.next();!S.done;S=E.next()){var T=S.value,k=null!=(d=w[T])?d:{},A=k.captureSafeHeaders,I=k.allowlist;if(A||I){if(void 0!==I&&!Array.isArray(I)){delete w[T];continue}w[T]=(0,q.__spreadArray)((0,q.__spreadArray)([],(0,q.__read)(A?ec:[]),!1),(0,q.__read)(null!=I?I:[]),!1)}}}catch(e){a={error:e}}finally{try{S&&!S.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{b&&!b.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}}catch(e){}var P=null==(f=t.autocapture)?void 0:f.frustrationInteractions;P&&(P.rageClick&&(P.rageClicks=P.rageClick,delete P.rageClick),P.deadClick&&(P.deadClicks=P.deadClick,delete P.deadClick));try{var x=null==(p=t.autocapture)?void 0:p.elementInteractions;if(x&&"object"==typeof x&&(!0===x.viewportContentUpdated&&(x.viewportContentUpdated={}),!1===x.viewportContentUpdated&&(x.viewportContentUpdated={enabled:!1}),void 0!==x.exposureDuration)){var C=x.viewportContentUpdated;void 0===C?x.viewportContentUpdated={exposureDuration:x.exposureDuration}:"object"==typeof C&&void 0===C.exposureDuration&&!1!==C.enabled&&(C.exposureDuration=x.exposureDuration),delete x.exposureDuration}}catch(e){}}}(e);try{var r,n,i,o,a,s,u;if(t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e)),e&&"autocapture"in e){if("boolean"==typeof e.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture&&null!==e.autocapture){var l=(0,q.__assign)({},e.autocapture);if(void 0===t.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture.elementInteractions&&null!==e.autocapture.elementInteractions&&(null==(i=e.autocapture.elementInteractions.pageUrlAllowlistRegex)?void 0:i.length)){l.elementInteractions=(0,q.__assign)({},e.autocapture.elementInteractions);var c=l.elementInteractions,d=null!=(o=c.pageUrlAllowlist)?o:[],f=e.autocapture.elementInteractions.pageUrlAllowlistRegex;c.pageUrlAllowlist=rV(d,f,t),delete c.pageUrlAllowlistRegex}if("object"==typeof e.autocapture.networkTracking&&null!==e.autocapture.networkTracking&&(null==(a=e.autocapture.networkTracking.captureRules)?void 0:a.length)){l.networkTracking=(0,q.__assign)({},e.autocapture.networkTracking);var p=null!=(s=l.networkTracking.captureRules)?s:[];try{for(var g=(0,q.__values)(p),h=g.next();!h.done;h=g.next()){var v=h.value;v.urls=rV(null!=(u=v.urls)?u:[],v.urlsRegex,t),delete v.urlsRegex}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=(0,q.__assign)({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},l)),"object"==typeof t.autocapture&&(t.autocapture=(0,q.__assign)((0,q.__assign)({},t.autocapture),l))}t.defaultTracking=t.autocapture}"customEnrichment"in e&&null!==e.customEnrichment&&!1!==t.customEnrichment&&(t.customEnrichment=e.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}(t,m),e()})})];case 4:A.sent(),A.label=5;case 5:return[4,e.prototype._init.call(this,m)];case 6:if(A.sent(),this.logBrowserOptions(m),this.config.remoteConfigClient=p,_=tt((R=this.config).defaultTracking)&&R.defaultTracking&&"object"==typeof R.defaultTracking&&R.defaultTracking.attribution&&"object"==typeof R.defaultTracking.attribution?(0,q.__assign)({},R.defaultTracking.attribution):{},!(tt(this.config.defaultTracking)&&oF(_)))return[3,8];return this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,q.__awaiter)(k,void 0,void 0,function(){return(0,q.__generator)(this,function(t){switch(t.label){case 0:if(e)return[3,2];return this.webAttribution=new os(_,this.config),[4,this.webAttribution.init()];case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new os(_,this.config),[4,this.webAttribution.init()];case 7:A.sent(),A.label=8;case 8:if(E=!(!(w=(y=eV()).ampTimestamp?Number(y.ampTimestamp):void 0)||Date.now()<w)||Number.isNaN(Number(y.ampSessionId))?void 0:Number(y.ampSessionId),-1!==(S=this.config.deferredSessionId)||this.config.optOut||(S=Date.now()),this.setSessionId(null!=(l=null!=(u=null!=(s=t.sessionId)?s:E)?u:S)?l:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,q.__awaiter)(k,void 0,void 0,function(){return(0,q.__generator)(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(T=ej(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,10];return[4,this.add(rH()).promise];case 9:A.sent(),A.label=10;case 10:return[4,this.add(new eL({diagnosticsClient:v})).promise];
1case 11:return A.sent(),[4,this.add(new ty).promise];case 12:return A.sent(),[4,this.add(new eH).promise];case 13:if(A.sent(),rB(this.config),!te(this.config.defaultTracking,"fileDownloads"))return[3,15];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(rF()).promise];case 14:A.sent(),A.label=15;case 15:if(!tr(this.config.defaultTracking))return[3,17];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(rM()).promise];case 16:A.sent(),A.label=17;case 17:if(!tn(this.config.defaultTracking))return[3,20];if(this.config.optOut)return[3,19];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(rR(tf(this.config))).promise];case 18:return A.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return(0,q.__awaiter)(k,void 0,void 0,function(){return(0,q.__generator)(this,function(t){switch(t.label){case 0:if(e)return[2];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(rR(tf(this.config))).promise];case 1:return t.sent(),[2]}})})}),A.label=20;case 20:if(!(tt(this.config.defaultTracking)&&oj(_,oL)))return[3,22];return this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(oA(_)).promise];case 21:A.sent(),A.label=22;case 22:if(!ta(this.config.autocapture))return[3,24];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(nG(tl(this.config),{diagnosticsClient:v})).promise];case 23:A.sent(),A.label=24;case 24:if(!ts(this.config.autocapture))return[3,26];return this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(n7(tc(this.config))).promise];case 25:A.sent(),A.label=26;case 26:if(!to(this.config.autocapture))return[3,28];return this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(iC(td(this.config))).promise];case 27:A.sent(),A.label=28;case 28:if(!("boolean"==typeof(D=this.config.autocapture)?D:"object"==typeof D&&!0===D.webVitals))return[3,30];return this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(oi()).promise];case 29:A.sent(),A.label=30;case 30:if("object"!=typeof(N=this.config.autocapture)||!0!==N.performanceTracking&&"object"!=typeof N.performanceTracking)return[3,32];return this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(ie(tu(this.config))).promise];case 31:A.sent(),A.label=32;case 32:if(!te(this.config.autocapture,"pageUrlEnrichment"))return[3,34];return this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(oO()).promise];case 33:A.sent(),A.label=34;case 34:if(!("boolean"==typeof(L=this.config.customEnrichment)?L:"object"==typeof L&&null!==L&&!1!==L.enabled))return[3,36];return this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(oD()).promise];case 35:A.sent(),A.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return A.sent(),T.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},r=t.time,n=(0,q.__rest)(t,["time"]);k.track(e.eventType,n,"number"==typeof r?{time:r}:void 0)}),[2]}})})},t.prototype.getUserId=function(){var e;return null==(e=this.config)?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),eF(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),eq(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(e_()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null==(e=this.config)?void 0:e.deviceId,userId:null==(t=this.config)?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var t,r,n,i=new ep,o=null!=(n=e.userProperties)?n:{};try{for(var a=(0,q.__values)(Object.entries(o)),s=a.next();!s.done;s=a.next()){var u=(0,q.__read)(s.value,2),l=u[0],c=u[1];i.set(l,c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null==(e=this.config)?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null==(e=this.config)?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,r=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),eS(Prom
vendor: 1,103 bytes, line 1
1ise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,eS(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return eS(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var n=this.getSessionId();n!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!=(t=this.config.lastEventId)?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,ti(this.config.defaultTracking)&&(n&&i&&r.push(this.track(tz,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:n,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++o,r);return this.config.identify&&r.push(this.track(eb(this.config.identify)).promise),ti(this.config.defaultTracking)&&r.push(this.track(tV,void 0,{event_id:a?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,eS(Prom
1ise.all(r))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=ri(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,r){if(th(t)){var n=t._q;t._q=[],t=tg(new ep,n)}return(null==r?void 0:r.user_id)&&this.setUserId(r.user_id),(null==r?void 0:r.device_id)&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,t,r)},t.prototype.groupIdentify=function(t,r,n,i){if(th(n)){var o=n._q;n._q=[],n=tg(new ep,o)}return e.prototype.groupIdentify.call(this,t,r,n,i)},t.prototype.revenue=function(t,r){if(th(t)){var n=t._q;t._q=[],t=tg(new eM,n)}return e.prototype.revenue.call(this,t,r)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!oF(this.webAttribution.options))return!1;var r=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(r).promise):this.track(r),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,q.__awaiter)(this,void 0,void 0,function(){var r,n,i;return(0,q.__generator)(this,function(o){return r=Date.now(),n=eB(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==tV&&t.event_type!==tz&&(!t.session_id||t.session_id===this.getSessionId())&&(n||i?(this.setSessionId(r),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):n||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,q.__assign)((0,q.__assign)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",e9(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){if(!(e>1)&&!(e<0)&&!this.config){this._diagnosticsSampleRate=e;return}},t}(eT))).init.bind(_),"init",H(_),z(_,["config"])),add:$(_.add.bind(_),"add",H(_),z(_,["config.apiKey","timeline.plugins"])),remove:$(_.remove.bind(_),"remove",H(_),z(_,["config.apiKey","timeline.plugins"])),track:$(_.track.bind(_),"track",H(_),z(_,["config.apiKey","timeline.queue.length"])),logEvent:$(_.logEvent.bind(_),"logEvent",H(_),z(_,["config.apiKey","timeline.queue.length"])),identify:$(_.identify.bind(_),"identify",H(_),z(_,["config.apiKey","timeline.queue.length"])),groupIdentify:$(_.groupIdentify.bind(_),"groupIdentify",H(_),z(_,["config.apiKey","timeline.queue.length"])),setGroup:$(_.setGroup.bind(_),"setGroup",H(_),z(_,["config.apiKey","timeline.queue.length"])),revenue:$(_.revenue.bind(_),"revenue",H(_),z(_,["config.apiKey","timeline.queue.length"])),flush:$(_.flush.bind(_),"flush",H(_),z(_,["config.apiKey","timeline.queue.length"])),getUserId:$(_.getUserId.bind(_),"getUserId",H(_),z(_,["config","config.userId"])),setUserId:$(_.setUserId.bind(_),"setUserId",H(_),z(_,["config","config.userId"])),getDeviceId:$(_.getDeviceId.bind(_),"getDeviceId",H(_),z(_,["config","config.deviceId"])),setDeviceId:$(_.setDeviceId.bind(_),"setDeviceId",H(_),z(_,["config","config.deviceId"])),reset:$(_.reset.bind(_),"reset",H(_),z(_,["config","config.userId","config.deviceId"])),getSessionId:$(_.getSessionId.bind(_),"getSessionId",H(_),z(_,["config"])),setSessionId:$(_.setSessionId.bind(_),"setSessionId",H(_),z(_,["config"])),extendSession:$(_.extendSession.bind(_),"extendSession",H(_),z(_,["config"])),setOptOut:$(_.setOptOut.bind(_),"setOptOut",H(_),z(_,["config"])),setTransport:$(_.setTransport.bind(_),"setTransport",H(_),z(_,["config"])),getIdentity:$(_.getIdentity.bind(_),"getIdentity",H(_),z(_,["config"])),setIdentity:$(_.setIdentity.bind(_),"setIdentity",H(_),z(_,["config","config.userId","config.deviceId"])),getOptOut:$(_.getOptOut.bind(_),"getOptOut",H(_),z(_,["config"])),_setDiagnosticsSampleRate:$(_._setDiagnosticsSampleRate.bind(_),"_setDiagnosticsSampleRate",H(_),z(_,["config"]))};e.s([],641521),e.i(641521),(y=F||(F={})).US="US",y.EU="EU",y.STAGING="STAGING",e.s(["DEFAULT_ACTION_CLICK_ALLOWLIST",0,rW,"DEFAULT_CSS_SELECTOR_ALLOWLIST",0,rz,"DEFAULT_DATA_ATTRIBUTE_PREFIX",0,r$,"EXCLUDE_INTERNAL_REFERRERS_CONDITIONS",0,t0,"IdentifyOperation",0,w,"LogLevel",0,b,"OfflineDisabled",0,null,"RevenueProperty",0,k,"ServerZone",0,F,"SpecialEventType",0,E],991973),e.i(991973);var oB=oq.add,oH=(oq.extendSession,oq.flush),oV=(oq.getDeviceId,oq.getIdentity,oq.getOptOut,oq.getSessionId,oq.getUserId,oq.groupIdentify,oq.identify),oz=oq.init,o$=(oq.logEvent,oq.remove),oW=oq.reset,oJ=(oq.revenue,oq.setDeviceId,oq.setGroup,oq.setIdentity,oq.setOptOut,oq.setSessionId,oq.setTransport,oq.setUserId),oK=oq.track;oq._setDiagnosticsSampleRate,e.s(["add",0,oB,"flush",0,oH,"identify",0,oV,"init",0,oz,"remove",0,o$,"reset",0,oW,"setUserId",0,oJ,"track",0,oK],436370);var oG=e.i(713975);function oY({providerCountryId:e}){return e===oG.CountrySearchIdStopsTypeEnum.ARGENTINA}e.s(["isArInlineCheckoutActive",0,function({siteCountry:e,providerCountryId:t}){return e===oG.CountryTypeEnum.ARGENTINA&&oY({providerCountryId:t})},"isArInlineCheckoutEligible",0,oY],37745);let oX="@amplitude/plugin-session-replay-browser",oQ=0;e.s(["SESSION_REPLAY_PLUGIN_NAME",0,oX,"getSessionReplayRemovalGeneration",0,()=>oQ,"isCheckoutPanPath",0,e=>!!e&&e.includes("/checkout/finalizar-compra"),"isPanCapableCheckout",0,({providerCountryId:e})=>null==e||oY({providerCountryId:e}),"removeSessionReplayPlugin",0,()=>{oQ+=1;try{o$(oX)}catch{}},"shouldRestoreCheckoutSessionReplay",0,(e,t)=>e&&!!t],283690)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.