PageSourceSearch

https://bitcraftonline.com/_next/static/chunks/pages/_app-5c9f0e18db24a822.js

js bitcraftonline.com collected 2026-10-03 19:54:47 UTC 298,159 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{45424:function(e,t,n){"use strict";let r;n.d(t,{S1:function(){return i6},j:function(){return i8}});var i,o,s,a,u,c,l,d,f,p,h,v,g,m,y,b,w,S,E,k,x,T,O,A,C,_,I,P,R=n(15767);(i=m||(m={}))[i.None=0]="None",i[i.Error=1]="Error",i[i.Warn=2]="Warn",i[i.Verbose=3]="Verbose",i[i.Debug=4]="Debug";var j=function(e){return void 0===e&&(e=0),(Error().stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},N=function(e){return function(){var t=(0,R.pi)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},D=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,R.XA)(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},L=function(e,t){return function(){var n,r,i={};try{for(var o=(0,R.XA)(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=D(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},M=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),u=a.logger,c=a.logLevel;if(c&&c<m.Debug||!c||!u)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:j(1),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))),d}},F=function(e){return{promise:e||Promise.resolve()}},U="Amplitude Logger ",G=function(){function e(){this.logLevel=m.None}return e.prototype.disable=function(){this.logLevel=m.None},e.prototype.enable=function(e){void 0===e&&(e=m.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Verbose||console.log("".concat(U,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Warn||console.warn("".concat(U,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Error||console.error("".concat(U,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Debug||console.log("".concat(U,"[Debug]: ").concat(e.join(" ")))},e}(),B=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 n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.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}(),J=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0},q=(0,R.ev)([],(0,R.CR)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),H=function(e){var t,n=J();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?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,H);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,(0,R.ev)([],(0,R.CR)(r.entries()),!1).map(function(e){var t=(0,R.CR)(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(q[r]):q[r]}).join("")}
1,$={INVALID_API_KEY:401,FORBIDDEN:403,RATE_LIMIT:429},z=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new B(e,t)}return e.prototype.subscribe=function(e,t,n){var r=H(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},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,R.mG)(this,void 0,void 0,function(){var e,t=this;return(0,R.Jh)(this,function(n){switch(n.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=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,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,R.mG)(this,void 0,void 0,function(){var t,n,r=this;return(0,R.Jh)(this,function(i){switch(i.label){case 0:return[4,Promise.race([t=this.getOrCreateFetchPromise().then(function(t){r.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),r.sendCallback(e,t,"remote"),r.storage.setConfig(t)}),this.storage.fetchConfig().then(function(e){return e})])];case 1:return void 0!==(n=i.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 i.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return(0,R.mG)(this,void 0,void 0,function(){var n,r;return(0,R.Jh)(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[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!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=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(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),(0,R.mG)(this,void 0,void 0,function(){var n,r,i,o,s,a,u=this;return(0,R.Jh)(this,function(c){switch(c.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,s,a,c,l,d;return(0,R.Jh)(this,function(f){switch(f.label){case 0:i=!0,s=new AbortController,a=setTimeout(function(){return s.abort()},t),f.label=1;case 1:return f.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:s.signal})];case 2:if((c=f.sent()).ok)return[3,4];return[4,c.text()];case 3:return l=f.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(c.status,": ").concat(l)),c.status===$.INVALID_API_KEY||c.status===$.FORBIDDEN?(o.logger.error("Remote config client fetch failed with ".concat(c.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):c.status>=400&&c.status<500&&c.status!==$.RATE_LIMIT&&(i=!1),[3,6];case 4:return[4,c.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(a),[7];case 9:if(!i)return[2,"break"];if(!(r<e-1))return[3,11];return[4,new Promise(function(e){return setTimeout(e,u.getJitterDelay(n))})];case 10:f.sent(),f.label=11;case 11:return[2]}})},o=this,s=0,c.label=1;case 1:if(!(s<e))return[3,4];return[5,i(s)];case 2:if("object"==typeof(a=c.sent()))return[2,a.value];if("break"===a)return[3,4];c.label=3;case 3:return s++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}(),V={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},X={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},W=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=J())||void 0===e?void 0:e.indexedDB)!==void 0},e.prototype.getDB=function(){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(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,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;
1n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){e.objectStoreNames.contains(V.TAGS)||e.createObjectStore(V.TAGS,{keyPath:"key"}),e.objectStoreNames.contains(V.COUNTERS)||e.createObjectStore(V.COUNTERS,{keyPath:"key"}),e.objectStoreNames.contains(V.HISTOGRAMS)||e.createObjectStore(V.HISTOGRAMS,{keyPath:"key"}),e.objectStoreNames.contains(V.EVENTS)||e.createObjectStore(V.EVENTS,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1}),e.objectStoreNames.contains(V.INTERNAL)||e.createObjectStore(V.INTERNAL,{keyPath:"key"})},e.prototype.setTags=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,R.Jh)(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 n=(t=o.sent().transaction([V.TAGS],"readwrite")).objectStore(V.TAGS),[2,new Promise(function(r){var o=Object.entries(e);t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tags",e),r()},o.forEach(function(e){var t=(0,R.CR)(e,2),r=t[0],o=t[1];n.put({key:r,value:o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tag",r,o,e)}})})];case 2:return r=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",r),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,R.Jh)(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 n=(t=o.sent().transaction([V.COUNTERS],"readwrite")).objectStore(V.COUNTERS),[2,new Promise(function(r){var o=Object.entries(e);t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to increment counters",e),r()},o.forEach(function(e){var t=(0,R.CR)(e,2),r=t[0],o=t[1],s=n.get(r);s.onsuccess=function(){var e=s.result,t=e?e.value:0;n.put({key:r,value:t+o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to update counter",r,e)}},s.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing counter",r,e)}})})];case 2:return r=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",r),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,R.Jh)(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 n=(t=o.sent().transaction([V.HISTOGRAMS],"readwrite")).objectStore(V.HISTOGRAMS),[2,new Promise(function(r){var o=Object.entries(e);t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),r()},o.forEach(function(e){var t=(0,R.CR)(e,2),r=t[0],o=t[1],s=n.get(r);s.onsuccess=function(){var e,t=s.result;e=t?{key:r,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:r,count:o.count,min:o.min,max:o.max,sum:o.sum},n.put(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",r,e)}},s.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",r,e)}})})];case 2:return r=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",r),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r,i=this;return(0,R.Jh)(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 n=(t=o.sent().transaction([V.EVENTS],"readwrite")).objectStore(V.EVENTS),[2,new Promise(function(r){t.oncomplete=function(){r()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event records",e),r()};var o=n.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){n.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 r=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",r),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return(0,R.mG)(this,void 0,void 0,function(){var n,r,i;return(0,R.Jh)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=(n=o.sent().transaction([V.INTERNAL],"readwrite")).objectStore(V.INTERNAL),[2,new Promise(function(i,o){n.onabort=function(){return o(Error("Failed to set internal value"))};var s=r.put({key:e,value:t});s.onsuccess=function(){return i()},s.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,R.mG)(this,void 0,void 0,function(){var t,n,r;return(0,R.Jh)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=(t=i.sent().transaction([V.INTERNAL],"readonly")).objectStore(V.INTERNAL),[2,new Promise(function(r,i){t.onabort=function(){return i(Error("Failed to get internal value"))};var o=n.get(e);o.onsuccess=function(){return r(o.result)},o.onerror=function(){return i(Error("Failed to get internal value"))}})];case 2:return r=i.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",r),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return(0,R.mG)(this,void 0,void 0,function(){var e,t;return(0,R.Jh)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(X.LAST_FLUSH_TIMESTAMP)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.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,R.mG)(this,void 0,void 0,function(){var t;return(0,R.Jh)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(X.LAST_FLUSH_TIMESTAMP,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.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(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return(0,R.mG)(this,void 0,void 0,function(){var e,t,n,r,i,o,s;return(0,R.Jh)(this,function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=a.sent().transaction([V.TAGS,V.COUNTERS,V.HISTOGRAMS,V.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(e,V.TAGS),this.getAllFromStore(e,V.COUNTERS),this.getAllFromStore(e,V.HISTOGRAMS),this.getAllFromStore(e,V.EVENTS)])];case 2:return n=(t=R.CR.apply(void 0,[a.sent(),4]))[0],r=t[1],i=t[2],o=t[3],[4,Promise.all([this.clearTable(e,V.COUNTERS),this.clearTable(e,V.HISTOGRAMS),this.clearTable(e,V.EVENTS)])];case 3:return a.sent(),[2,{tags:n,counters:r,histogramStats:i,events:o}];case 4:return s=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",s),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(Error("Failed to get all from ".concat(t)))}})},e}(),K=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}
1,Y=function(e,t){return 31*Math.abs(K(e.toString()))%1e5/1e5<t},Z=function(){var e=J();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]},Q=function(e){var t=J();if(t&&"function"==typeof t.addEventListener){var n=function(t){e.recordEvent("sdk.error.uncaught",(0,R.pi)({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,r=null==t?void 0:t.stack,i=ee({filename:e.filename,stack:r});i&&n({type:"error",message:e.message,stack:r,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,r=e.reason instanceof Error?e.reason:void 0,i=null==r?void 0:r.stack,o=et(i),s=ee({filename:o,stack:i});s&&n({type:"unhandledrejection",message:null!==(t=null==r?void 0:r.message)&&void 0!==t?t:en(e.reason),stack:i,filename:o,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:s}})},!0)}},ee=function(e){var t,n,r=Z();if(0!==r.length)try{for(var i=(0,R.XA)(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.filename&&e.filename.includes(s))return"filename";if(e.stack&&e.stack.includes(s))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},et=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},en=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},er=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===n?"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(r,null,2)),this.config=(0,R.pi)({enabled:!0,sampleRate:0},r),this.startTimestamp=Date.now(),this.shouldTrack=Y(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,W.isSupported()?this.storage=new W(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),Q(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){this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");return}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){this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");return}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){this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");return}var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.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){this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");return}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,R.mG)(this,void 0,void 0,function(){var e,t,n,r;return(0,R.Jh)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];return e=(0,R.pi)({},this.inMemoryTags),t=(0,R.pi)({},this.inMemoryCounters),n=(0,R.pi)({},this.inMemoryHistograms),r=(0,R.ev)([],(0,R.CR)(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(n),this.storage.addEventRecords(r)])];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return(0,R.mG)(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,c;return(0,R.Jh)(this,function(l){switch(l.label){case 0:if(!this.storage)return[2];return[4,this.saveAllDataToStorage()];case 1:return l.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:if(t=(e=l.sent()).tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),s={}
1,n.forEach(function(e){s[e.key]=e.value}),a={},r.forEach(function(e){a[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(s).length&&0===Object.keys(a).length&&0===u.length)return[2];return c={tags:o,histogram:a,counters:s,events:u},this.fetch(c),[2]}})})},e.prototype.fetch=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t;return(0,R.Jh)(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!J())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(!n.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=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return(0,R.mG)(this,void 0,void 0,function(){var e,t,n;return(0,R.Jh)(this,function(r){switch(r.label){case 0:if(!this.storage)return[2];return e=Date.now(),[4,this.storage.getLastFlushTimestamp()];case 1:if(-1===(t=r.sent()||-1))return this.storage.setLastFlushTimestamp(e),this._setFlushTimer(3e5),[2];return(n=e-t)>=3e5?this._flush():this._setFlushTimer(3e5-n),[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=Y(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),ei=function(){var e,t=J();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=eo(n[0]),i=eo(n[1]);return i&&(e[r]=i),e},{}):{}},eo=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},es=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:ea(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),ea=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},eu=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),ec=function(){return(ec=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function el(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ed(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var ef=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=el(["string","number","boolean","undefined"]),s=o.next();!s.done;s=o.next())if(s.value===i)return e===t}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;
1if(null==e||null==t||e.length!==t.length)return!1;var a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(a&&u){for(var c=0;c<e.length;c++)if(!ef(e[c],t[c]))return!1}else{if(!ef(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(n){ef(e[n],t[n])||(l=!1)}),l}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var ep=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=ec({},this.identity.userProperties),n=ec(ec({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,a,u=n.userProperties||{};try{for(var c=el(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=ed(l.value,2),f=d[0],p=d[1];switch(f){case"$set":try{for(var h=(i=void 0,el(Object.entries(p))),v=h.next();!v.done;v=h.next()){var g=ed(v.value,2),m=g[0],y=g[1];u[m]=y}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,el(Object.keys(p))),w=b.next();!w.done;w=b.next()){var m=w.value;delete u[m]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return ec({},this.identity)},e.prototype.setIdentity=function(e){var t=ec({},this.identity);this.identity=ec({},e),ef(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),eh="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:self,ev=function(){function e(){this.identityStore=new ep,this.eventBridge=new eu,this.applicationContextProvider=new es}return e.getInstance=function(t){return eh.analyticsConnectorInstances||(eh.analyticsConnectorInstances={}),eh.analyticsConnectorInstances[t]||(eh.analyticsConnectorInstances[t]=new e),eh.analyticsConnectorInstances[t]},e}(),eg="".concat("AMP","_unsent"),em="$default_instance",ey="https://api2.amplitude.com/2/httpapi",eb="https://api.eu.amplitude.com/2/httpapi",ew="https://api2.amplitude.com/batch",eS="https://api.eu.amplitude.com/batch",eE="dclid",ek="fbclid",ex="gbraid",eT="gclid",eO="ko_click_id",eA="li_fat_id",eC="msclkid",e_="rdt_cid",eI="ttclid",eP="twclid",eR="wbraid",ej={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},eN=["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=["authorization","cookie","set-cookie"],eL=function(e){return void 0===e&&(e=em),ev.getInstance(e)},eM=function(e,t){eL(t).identityStore.editIdentity().setUserId(e).commit()},eF=function(e,t){eL(t).identityStore.editIdentity().setDeviceId(e).commit()};(o=y||(y={})).Unknown="unknown",o.Skipped="skipped",o.Success="success",o.RateLimit="rate_limit",o.PayloadTooLarge="payload_too_large",o.Invalid="invalid",o.Failed="failed",o.Timeout="Timeout",o.SystemError="SystemError";var eU=function(e,t){var n=Math.max(t,1);return e.reduce(function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e},[])},eG=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=y.Unknown),{event:e,code:t,message:n}},eB=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:em,logLevel:m.Warn,loggerProvider:new G,offline:!1,optOut:!1,serverUrl:ey,serverZone:"US",useBatch:!1}},eJ=function(){function e(e){this._optOut=!1;var t,n,r,i,o=eB();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?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!==(n=e.logLevel)&&void 0!==n?n: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!==(r=e.optOut)&&void 0!==r?r: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)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=eq(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
1,enumerable:!1,configurable:!0}),e}(),eq=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=eB().serverZone),void 0===n&&(n=eB().useBatch),e)return{serverUrl:e,serverZone:void 0};var r,i=["US","EU"].includes(t)?t:eB().serverZone;return{serverZone:i,serverUrl:(r=n,"EU"===i?r?eS:eb:r?ew:ey)}},eH=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function e$(e){return e>=200&&e<300}var ez=new Set([ey,eb,ew,eS]);function eV(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var eX=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,R.mG)(this,void 0,void 0,function(){var n,r=this;return(0,R.Jh)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(eg,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=H()),new Promise(function(n){t.queue.push({event:e,attempts:0,callback:function(e){return n(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,R.mG)(this,void 0,void 0,function(){var t,n,r=this;return(0,R.Jh)(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=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),[4,eU(t,this.config.flushQueueSize).reduce(function(t,n){return(0,R.mG)(r,void 0,void 0,function(){return(0,R.Jh)(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){var n;return void 0===t&&(t=!0),(0,R.mG)(this,void 0,void 0,function(){var r,i,o,s,a;return(0,R.Jh)(this,function(u){var c,l,d;switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,R._T)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new eH,u.label=1;case 1:return u.trys.push([1,3,,4]),c=i=eq(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,void 0===(l=this.config.enableRequestBodyCompression)&&(l=!1),o=!!ez.has(c)||l,[4,this.config.transportProvider.send(i,r,o)];case 2:if(null===(s=u.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(eV(s))):this.fulfillRequest(e,s.statusCode,s.status),[2];return this.handleResponse(s,e),[3,4];case 3:return a=(d=u.sent())instanceof Error?d.message:String(d),this.config.loggerProvider.error(a),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:a,stack_trace:j()}),this.handleResponse({status:y.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){e$(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:eV(e),stack_trace:j()});var n,r=e.status;switch(r){case y.Success:this.handleSuccessResponse(e,t);break;case y.Invalid:this.handleInvalidResponse(e,t);break;case y.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case y.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' 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 n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key")){this.fulfillRequest(t,e.statusCode,e.body.error);return}var r=(0,R.ev)((0,R.ev)((0,R.ev)((0,R.ev)([],(0,R.CR)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,R.CR)(Object.values(e.body.eventsWithMissingFields)),!1),(0,R.CR)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,R.CR)(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(i.has(r)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return!0});o.length>0&&this.config.loggerProvider.warn(eV(e));
1var s=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(s)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length){this.fulfillRequest(t,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(eV(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),u=new Set(o),c=t.filter(function(t,r){if(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return u.has(r)&&(t.timeout=n.throttleTimeout),!0});c.length>0&&this.config.loggerProvider.warn(eV(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){var r,i,o;e$(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(r=this.diagnosticsClient)||void 0===r||r.increment("analytics.events.dropped",e.length),null===(i=this.diagnosticsClient)||void 0===i||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:j()})),this.removeEvents(e),e.forEach(function(e){return e.callback(eG(e.event,t,n))})},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}(),eW=function(){function e(){this.name="identity",this.type="before",this.identityStore=eL().identityStore}return e.prototype.execute=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t;return(0,R.Jh)(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return e.instanceName&&(this.identityStore=eL(e.instanceName).identityStore),[2]})})},e}(),eK=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!eY(t,n))return!1}return!0},eY=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=(0,R.XA)(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&eK(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else if(null==t)return!1;else if("object"==typeof t)return eK(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},eZ=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,R.pi)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(b.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(b.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(b.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(b.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(b.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(b.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(b.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(b.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(b.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[b.CLEAR_ALL]="-",this}
1,e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return!(void 0!==this._properties[b.CLEAR_ALL]||this._propertySet.has(t))&&(e===b.ADD?"number"==typeof n:e===b.UNSET||e===b.REMOVE||eY(t,n))},e}();(s=b||(b={})).SET="$set",s.SET_ONCE="$setOnce",s.ADD="$add",s.APPEND="$append",s.PREPEND="$prepend",s.REMOVE="$remove",s.PREINSERT="$preInsert",s.POSTINSERT="$postInsert",s.UNSET="$unset",s.CLEAR_ALL="$clearAll";var eQ=[b.CLEAR_ALL,b.UNSET,b.SET,b.SET_ONCE,b.ADD,b.APPEND,b.PREPEND,b.PREINSERT,b.POSTINSERT,b.REMOVE];(a=w||(w={})).SET="$set",a.SET_ONCE="$setOnce",a.ADD="$add",a.APPEND="$append",a.PREPEND="$prepend",a.REMOVE="$remove",a.PREINSERT="$preInsert",a.POSTINSERT="$postInsert",a.UNSET="$unset",a.CLEAR_ALL="$clearAll",(u=S||(S={})).IDENTIFY="$identify",u.GROUP_IDENTIFY="$groupidentify",u.REVENUE="revenue_amount";var e0=function(e,t,n){var r="string"==typeof e?{event_type:e}:e;return(0,R.pi)((0,R.pi)((0,R.pi)({},r),n),t&&{event_properties:t})},e1=function(e,t){return(0,R.pi)((0,R.pi)({},t),{event_type:S.IDENTIFY,user_properties:e.getUserProperties()})},e2=function(e,t,n,r){var i;return(0,R.pi)((0,R.pi)({},r),{event_type:S.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:((i={})[e]=t,i)})},e3=function(e,t,n){var r,i=new eZ;return i.set(e,t),(0,R.pi)((0,R.pi)({},n),{event_type:S.IDENTIFY,user_properties:i.getUserProperties(),groups:((r={})[e]=t,r)})},e4=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));eK(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?(0,R.pi)({},this.properties):{};return e[E.REVENUE_PRODUCT_ID]=this.productId,e[E.REVENUE_QUANTITY]=this.quantity,e[E.REVENUE_PRICE]=this.price,e[E.REVENUE_TYPE]=this.revenueType,e[E.REVENUE_CURRENCY]=this.currency,e[E.REVENUE]=this.revenue,e[E.RECEIPT]=this.receipt,e[E.RECEIPT_SIG]=this.receiptSig,e},e}();(c=E||(E={})).REVENUE_PRODUCT_ID="$productId",c.REVENUE_QUANTITY="$quantity",c.REVENUE_PRICE="$price",c.REVENUE_TYPE="$revenueType",c.REVENUE_CURRENCY="$currency",c.REVENUE="$revenue",c.RECEIPT="$receipt",c.RECEIPT_SIG="$receiptSig";var e5=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},e6=n(15637),e8=n.n(e6)()||e6,e9=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 n,r;return(0,R.mG)(this,void 0,void 0,function(){var i;return(0,R.Jh)(this,function(o){switch(o.label){case 0:if(void 0===e.name&&(e.name=H(),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!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(i,"locked"),[4,null===(r=e.setup)||void 0===r?void 0:r.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 n;return(0,R.mG)(this,void 0,void 0,function(){var r,i;return(0,R.Jh)(this,function(o){switch(o.label){case 0:if(this.pluginStatus.delete(e),-1===(r=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[r],this.plugins.splice(r,1),[4,null===(n=i.teardown)||void 0===n?void 0:n.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?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(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u,c,l,d,f,p,h,v;return(0,R.Jh)(this,function(g){switch(g.label){case 0:if(!e)return[2];t=(0,R.CR)(e,1)[0],n=(0,R.CR)(e,2)[1],this.loggerProvider.log("Timeline.apply: Initial event",t),r=this.plugins.filter(function(e){return"before"===e.type}),g.label=1;case 1:g.trys.push([1,6,7,8]),o=(i=(0,R.XA)(r)).next(),g.label=2;case 2:if(o.done)return[3,5];if(!(s=o.value).execute)return[3,4];return[4,s.execute((0,R.pi)({},t))];case 3:if(null===(a=g.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),n({event:t,code:0,message:""}),[2];t=a,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),g.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return f={error:g.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}),g.label=9;case 9:g.trys.push([9,14,15,16]),l=(c=(0,R.XA)(u)).next(),g.label=10;case 10:if(l.done)return[3,13];if(!(s=l.value).execute)return[3,12];return[4,s.execute((0,R.pi)({},t))];case 11:if(null===(a=g.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),n({event:t,code:0,message:""}),[2];t=a,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),g.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return h={error:g.sent()},[3,16];case 15:try{l&&!l.done&&(v=c.return)&&v.call(c)}finally{if(h)throw h.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 n=(0,R.pi)({},t);return e.execute(n).catch(function(e){return eG(n,0,String(e))})})).then(function(e){n((0,R.CR)(e,1)[0]||eG(t,100,"Event not tracked, no destination plugins on the instance"))}),[2]}})})},e.prototype.flush=function(){return(0,R.mG)(this,void 0,void 0,function(){var e,t=this;return(0,R.Jh)(this,function(n){switch(n.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return n.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return n.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 n;null===(n=t.onIdentityChanged)||void 0===n||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onSessionIdChanged)||void 0===n||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onOptOutChanged)||void 0===n||n.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r,i,o,s;return(0,R.Jh)(this,function(a){switch(a.label){case 0:a.trys.push([0,7,8,9]),n=(t=(0,R.XA)(this._optOutListeners)).next(),a.label=1;case 1:if(n.done)return[3,6];r=n.value,a.label=2;case 2:return a.trys.push([2,4,,5]),[4,r(e)];case 3:return a.sent(),[3,5];case 4:return i=a.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o={error:a.sent()},[3,9];case 8:try{n&&!n.done&&(s=t.return)&&s.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)||void 0===t||t.call(e)})},e}(),e7=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 e9(this),this.name=e}return e.prototype._init=function(e){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(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,R.mG)(this,void 0,void 0,function(){var t,n,r,i,o,s;return(0,R.Jh)(this,function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,8,9,10]),r=(n=(0,R.XA)(t)).next(),a.label=2;case 2:if(r.done)return[3,7];if(!((i=(0,r.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return a.sent(),[3,6];case 4:return[4,i];case 5:a.sent(),a.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return o={error:a.sent()},[3,10];case 9:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}
1return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:a.sent(),a.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=e0(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),F(this.dispatch(r))},e.prototype.identify=function(e,t){var n=e1(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),F(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=e2(e,t,n,r);return F(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=e3(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),F(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=(0,R.pi)((0,R.pi)({},t),{event_type:S.REVENUE,event_properties:e.getEventProperties()});return F(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),F())},e.prototype._addPlugin=function(e){return F(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)),F())},e.prototype._removePlugin=function(e){return F(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(eG(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t=this;return(0,R.Jh)(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,n=null!==(t=this.userProperties)&&void 0!==t?t:{},r=(0,R.pi)({},n);if(void 0===e)return r;var i={};return Object.keys(e).forEach(function(t){Object.values(w).includes(t)||(i[t]=e[t])}),eQ.forEach(function(t){if(Object.keys(e).includes(t)){var n=e[t];switch(t){case w.CLEAR_ALL:Object.keys(r).forEach(function(e){delete r[e]});break;case w.UNSET:Object.keys(n).forEach(function(e){delete r[e]});break;case w.SET:Object.assign(r,n)}}}),Object.assign(r,i),r},e.prototype.process=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n;return(0,R.Jh)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),this.config.optOut)return[2,eG(e,0,"Event skipped due to optOut config")];return e.event_type===S.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)];case 1:return 200===(t=r.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 n=String(r.sent()),this.config.loggerProvider.error(n),[2,t=eG(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!e));return}this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=!!e,this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return F(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0===t){this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e));return}return t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),te=function(e,t){var n,r,i;return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1&&("string"!=typeof(null===(r=null===(n=null==(i=J())?void 0:i.chrome)||void 0===n?void 0:n.runtime)||void 0===r?void 0:r.id)||!!(null==e?void 0:e[t]))},tt=function(e){return te(e,"attribution")},tn=function(e){return te(e,"formInteractions")},tr=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)},ts=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},ta=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;return!0===t?{mainThreadBlock:!0}:"object"==typeof t&&null!==t?t:void 0}},tc=function(e){if(ts(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},tl=function(e){if(ta(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 n=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.
vendor: 5,290 bytes, line 1
1networkTracking?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),(0,R.pi)((0,R.pi)({},n),{captureRules:null===(t=null==n?void 0:n.captureRules)||void 0===t?void 0:t.map(function(t){var n,r,i;if((null===(n=t.urls)||void 0===n?void 0:n.length)&&(null===(r=t.hosts)||void 0===r?void 0:r.length)){var o=JSON.stringify(t.hosts),s=JSON.stringify(t.urls);return null===(i=e.loggerProvider)||void 0===i||i.warn("Found network capture rule with both urls='".concat(s,"' and hosts='").concat(o,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),(0,R.pi)((0,R.pi)({},t),{hosts:void 0})}return t})})}},tf=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return tr(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},tp=function(e){if(tn(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions},th=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var u=a.apply(e,o);"function"==typeof s&&s(null==u?void 0:u.promise)}}return e},tv=function(e){return e&&void 0!==e._q},tg=function(){if("undefined"==typeof navigator)return"";var e,t,n,r,i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""},tm="2.42.5",ty="amplitude-ts",tb=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(ty,"/").concat(tm),"undefined"!=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,n;return(0,R.mG)(this,void 0,void 0,function(){var r,i,o;return(0,R.Jh)(this,function(s){return r=new Date().getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,o=null!==(n=e.event_id)&&void 0!==n?n:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=r),[2,(0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:tg()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:H(),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}(),tw=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t;return(0,R.Jh)(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),tS=function(){var e,t=J();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks},tE=function(){function e(e,t){void 0===t&&(t={}),this.options=(0,R.pi)({},e),this.config=t}return e.prototype.isEnabled=function(){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r,i,o=this;return(0,R.Jh)(this,function(s){switch(s.label){case 0:return t="AMP_TEST",n=(0,R.pi)({},this.options),r=new e(n),i=String(Date.now()),[4,r.transaction(t,function(e){var n,r;try{e.set(i);var s=e.get()===i;return!s&&o.config.diagnosticsClient&&(null===(n=o.config.diagnosticsClient)||void 0===n||n.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:i,sync:!0})),s}catch(e){if(o.config.diagnosticsClient){var a=e instanceof Error?e.message:String(e);null===(r=o.config.diagnosticsClient)||void 0===r||r.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:i,error:a,sync:!0})}return!1}
1finally{e.set(null)}})];case 1:return[2,s.sent()]}})})},e.prototype.get=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t;return(0,R.Jh)(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=tT(t);if(void 0===n){console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t));return}return JSON.parse(n)}catch(n){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,n;return(0,R.mG)(this,void 0,void 0,function(){var r,i,o,s,a,u,c,l;return(0,R.Jh)(this,function(d){switch(d.label){case 0:r=J(),d.label=1;case 1:if(d.trys.push([1,4,,5]),!(i=null==r?void 0:r.cookieStore))return[3,3];return[4,i.getAll(e)];case 2:if(o=d.sent()){o.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:o.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(a=(s=(0,R.XA)(o)).next();!a.done;a=s.next())if(u=a.value,tO(u.domain,this.options.domain))return[2,u.value]}catch(e){c={error:e}}finally{try{a&&!a.done&&(l=s.return)&&l.call(s)}finally{if(c)throw c.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,n,r=this,i=J(),o=(null!==(n=null===(t=null==i?void 0:i.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),s=void 0,a=this.config.duplicateResolverFn;if("function"==typeof a&&o.length>1&&(s=o.find(function(t){var n;try{var i=a(t.substring(e.length+1));return i||null===(n=r.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),s||(s=o[0]),s)return s.substring(e.length+1)},e.prototype.set=function(e,t){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,i=null!==t?r:-1,o=void 0;if(i){var s=new Date;s.setTime(s.getTime()+864e5*i),o=s}var a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t))));o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite));var u=J();(null==u?void 0:u.document)&&(u.document.cookie=a)}catch(t){var c=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}},e.prototype.remove=function(e){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(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,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return[2]})})},e.isDomainWritable=function(t){return(0,R.mG)(this,void 0,void 0,function(){var n,r,i;return(0,R.Jh)(this,function(o){switch(o.label){case 0:if(e.cachedTlds[t])return[2,!0];n={domain:"."+t},r="AMP_TLDTEST",i=new e(n),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,i.transaction(r,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!o.sent()];case 3:return o.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return(0,R.mG)(this,void 0,void 0,function(){var n,r,i=this;return(0,R.Jh)(this,function(o){switch(o.label){case 0:if(n=tS(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),tk=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},tx=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},tT=function(e){var t;return null!==(t=tk(e))&&void 0!==t?t:tx(e)},tO=function(e,t){if(""===e&&""===t)return!0;
1if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()},tA=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),["AMP",t,e.substring(0,n)].filter(Boolean).join("_")},tC=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r;return(0,R.Jh)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t;return(0,R.Jh)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return n.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,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),t_=function(e){function t(t){var n,r,i,o=this;try{i=null===(n=J())||void 0===n?void 0:n.localStorage}catch(e){null===(r=null==t?void 0:t.loggerProvider)||void 0===r||r.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,R.ZT)(t,e),t.prototype.set=function(t,n){var r;return(0,R.mG)(this,void 0,void 0,function(){var i;return(0,R.Jh)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(n)&&n.length>1e3))return[3,2];return i=n.length-1e3,[4,e.prototype.set.call(this,t,n.slice(0,1e3))];case 1:return o.sent(),null===(r=this.loggerProvider)||void 0===r||r.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,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(tC),tI=function(e){function t(){var t;return e.call(this,null===(t=J())||void 0===t?void 0:t.sessionStorage)||this}return(0,R.ZT)(t,e),t}(tC);function tP(){return"undefined"!=typeof CompressionStream}function tR(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n;return(0,R.Jh)(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]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})}var tj=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,n,r,i,o,s,a,u,c,l,d,f,p,h,v,g,m,b,w,S,E,k,x=e.code||0,T=this.buildStatus(x);switch(T){case y.Success:return{status:T,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case y.Invalid:return{status:T,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invali
1d_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(h=e.throttled_events)&&void 0!==h?h:[]}};case y.PayloadTooLarge:return{status:T,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case y.RateLimit:return{status:T,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(b=e.throttled_devices)&&void 0!==b?b:{},throttledUsers:null!==(w=e.throttled_users)&&void 0!==w?w:{},exceededDailyQuotaDevices:null!==(S=e.exceeded_daily_quota_devices)&&void 0!==S?S:{},exceededDailyQuotaUsers:null!==(E=e.exceeded_daily_quota_users)&&void 0!==E?E:{},throttledEvents:null!==(k=e.throttled_events)&&void 0!==k?k:[]}};case y.Timeout:default:return{status:T,statusCode:x}}},e.prototype.buildStatus=function(e){return e$(e)?y.Success:429===e?y.RateLimit:413===e?y.PayloadTooLarge:408===e?y.Timeout:e>=400&&e<500?y.Invalid:e>=500?y.Failed:y.Unknown},e}(),tN=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return(0,R.ZT)(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),(0,R.mG)(this,void 0,void 0,function(){var r=this;return(0,R.Jh)(this,function(i){return[2,new Promise(function(i,o){"undefined"==typeof XMLHttpRequest&&o(Error("XHRTransport is not supported."));var s=new XMLHttpRequest;s.open("POST",e,!0),s.onreadystatechange=function(){if(s.readyState===r.state.done){var e=s.responseText;try{i(r.buildResponse(JSON.parse(e)))}catch(e){i(r.buildResponse({code:s.status}))}}};var a={"Content-Type":"application/json",Accept:"*/*"},u=JSON.stringify(t),c=n&&u.length>=2048&&tP(),l=function(e){var t,n;a=(0,R.pi)((0,R.pi)({},r.customHeaders),a);try{for(var i=(0,R.XA)(Object.entries(a)),o=i.next();!o.done;o=i.next()){var u=(0,R.CR)(o.value,2),c=u[0],l=u[1];s.setRequestHeader(c,l)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}s.send(e)};(0,R.mG)(r,void 0,void 0,function(){var e;return(0,R.Jh)(this,function(t){switch(t.label){case 0:if(!c)return[3,2];return[4,tR(u)];case 1:return(e=t.sent())?(a["Content-Encoding"]="gzip",l(e)):l(u),[3,3];case 2:l(u),t.label=3;case 3:return[2]}})}).catch(o)})]})})},t}(tj),tD=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.customHeaders=t,n}return(0,R.ZT)(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),(0,R.mG)(this,void 0,void 0,function(){var r,i,o,s,a,u,c,l;return(0,R.Jh)(this,function(d){switch(d.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");if(r=JSON.stringify(t),i=n&&r.length>=2048&&tP(),o=r,s={"Content-Type":"application/json",Accept:"*/*"},!i)return[3,2];return[4,tR(r)];case 1:(a=d.sent())&&(s["Content-Encoding"]="gzip",o=a),d.label=2;case 2:return u={headers:s=(0,R.pi)((0,R.pi)({},this.customHeaders),s),body:o,method:"POST"},[4,fetch(e,u)];case 3:return[4,(c=d.sent()).text()];case 4:l=d.sent();try{return[2,this.buildResponse(JSON.parse(l))]}catch(e){return[2,this.buildResponse({code:c.status})]}return[2]}})})},t}(tj),tL=function(e){function t(){return e.call(this)||this}return(0,R.ZT)(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),(0,R.mG)(this,void 0,void 0,function(){var n=this;return(0,R.Jh)(this,function(r){return[2,new Promise(function(r,i){var o=J();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);if(o.navigator.sendBeacon(e,s))return r(n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}));return r(n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tj),tM=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tF=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},tU="[Amplitude]",tG="".concat(tU," Form Started"),tB="".concat(tU," Form Submitted"),tJ="".concat(tU," File Downloaded"),tq="session_start",tH="session_end",t$="".concat(tU," File Extension"),tz="".concat(tU," File Name"),tV="".concat(tU," Link ID"),tX="".concat(tU," Link Text"),tW="".concat(tU," Link URL"),tK="".concat(tU," Form ID"),tY="".concat(tU," Form Name"),tZ="".concat(tU," Form Destination"),tQ="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,n,r,i,o){void 0===i&&(i=!0),e.referrer;var s=e.referring_domain,a=(0,R._T)(e,["referrer","referring_domain"]),u=t||{},c=(u.referrer,u.referring_domain),l=(0,R._T)(u,["referrer","referring_domain"]),d=n.excludeInternalReferrers;if(d){var f=t6(d,r);if(!(f instanceof TypeError)&&e.referring_domain&&t7(e.referring_domain,o)&&("always"===f||"ifEmptyCampaign"===f&&Object.values((0,R.pi)((0,R.pi)({},e),{referring_domain:void 0,referrer:void 0})).every(function(e){return!e})))return function(e,t,n){var r="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?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))}(f,e.referring_domain,r),!1}if(t3(n.excludeReferrers,e.referring_domain))return r.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 r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var p=JSON.stringify(a)!==JSON.stringify(l),h=t1(s||"")!==t1(c||""),v=!t||p||h;return v?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),v},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 n=t.startsWith(".")?t:".".concat(t);return!!(e.startsWith(".")?e:".".concat(e)).endsWith(n)},t5=function(e){var t=e;
1return 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 n=e.condition;if("string"==typeof n&&Object.keys(t0).includes(n))return n;if(void 0===n)return t0.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),TypeError(r)},t8=["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,n,r=e||(null===(n=null===(t=J())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!r)return"";var i=r.split("."),o=i[i.length-1],s=i[i.length-2];return(t8.find(function(e){return r.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],s=i[i.length-3]),s)?"".concat(s,".").concat(o):o},t7=function(e,t){var n=J();return!!n&&t4(e,(t||"").trim()||t9(n.location.hostname))},ne=function(e){function t(t,n,r,i,o,s,a,u,c,l,d,f,p,h,v,g,y,b,w,S,E,k,x,T,O,A,C,_,I,P,R,j,N,D,L,M,F,U,B,J,q,H,$,z){void 0===r&&(r=new tw),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=tQ),void 0===g&&(g=new G),void 0===y&&(y=m.Warn),void 0===w&&(w=!1),void 0===S&&(S=!1),void 0===x&&(x=""),void 0===T&&(T="US"),void 0===C&&(C=18e5),void 0===_&&(_=new t_({loggerProvider:g})),void 0===I&&(I={ipAddress:!0,language:!0,platform:!0}),void 0===P&&(P="fetch"),void 0===R&&(R=!1),void 0===j&&(j=!0),void 0===U&&(U=!0),void 0===B&&(B=0),void 0===$&&($=!1);var V,X=this;(X=e.call(this,{apiKey:t,storageProvider:_,transportProvider:nr(P)})||this).apiKey=t,X.appVersion=n,X.cookieOptions=i,X.defaultTracking=o,X.autocapture=s,X.flushIntervalMillis=u,X.flushMaxRetries=c,X.flushQueueSize=l,X.identityStorage=d,X.ingestionMetadata=f,X.instanceName=p,X.loggerProvider=g,X.logLevel=y,X.minIdLength=b,X.offline=w,X.partnerId=E,X.plan=k,X.serverUrl=x,X.serverZone=T,X.sessionTimeout=C,X.storageProvider=_,X.trackingOptions=I,X.transport=P,X.useBatch=R,X.fetchRemoteConfig=j,X.networkTrackingOptions=M,X.identify=F,X.enableDiagnostics=U,X.diagnosticsSampleRate=B,X.diagnosticsClient=J,X.remoteConfig=q,X.topLevelDomain=H,X.enableRequestBodyCompression=$,X.customEnrichment=z,X.version=tm,X._optOut=!1,X._cookieStorage=r,X.deviceId=a,X.lastEventId=h,X.lastEventTime=v,X.optOut=S,X.deferredSessionId=A,X.sessionId=O,X.pageCounter=D,X.userId=N,X.debugLogsEnabled=L,X.loggerProvider.enable(L?m.Debug:X.logLevel),X.networkTrackingOptions=M,X.identify=F,X.enableDiagnostics=U,X.diagnosticsSampleRate=B,X.diagnosticsClient=J;var W=null!==(V=null==q?void 0:q.fetchRemoteConfig)&&void 0!==V?V:j;return X.remoteConfig=X.remoteConfig||{},X.remoteConfig.fetchRemoteConfig=W,X.fetchRemoteConfig=W,X.topLevelDomain=H||t9(),X}return(0,R.ZT)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},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())}
1,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(tA(this.apiKey),e)},t}(eJ),nt=function(e,t,n){switch(void 0===e&&(e=tQ),void 0===t&&(t={}),e){case"localStorage":return new t_;case"sessionStorage":return new tI;case"none":return new tw;default:return new tE((0,R.pi)((0,R.pi)({},t),{expirationDays:t.expiration}),n)}},nn=function(e){var t,n;return void 0===e&&(e={}),(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)===!0||(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)!==!1&&!1!==e.fetchRemoteConfig},nr=function(e){var t="object"==typeof e?e.type:e,n="object"==typeof e?e.headers:void 0;return"xhr"===t?new tN(n):"beacon"===t?new tL:new tD(n)},ni="data-amp-mask",no="*****",ns=/\b(?:\d[ -]*?){13,16}\b/,na=/(\d{3}-?\d{2}-?\d{4})/g,nu=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,nc=function(e,t){if(void 0===t&&(t=[]),"string"!=typeof e)return"";var n,r,i=e;i=(i=(i=i.replace(ns,no)).replace(na,no)).replace(nu,no);try{for(var o=(0,R.XA)(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,no)}catch(e){}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},nl=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(ni)?no:e?e(document.title):document.title},nd=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},nf=function(){function e(){}return e.prototype.parse=function(){return(0,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return[2,(0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)({},ej),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=ei();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,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=ei();return(e={})[eE]=t[eE],e[ek]=t[ek],e[ex]=t[ex],e[eT]=t[eT],e[eO]=t[eO],e[eA]=t[eA],e[eC]=t[eC],e[e_]=t[e_],e[eI]=t[eI],e[eP]=t[eP],e[eR]=t[eR],e},e}(),np="AMP_PAGE_VIEW",nh=function(e){void 0===e&&(e={});var t,n,r,i=J(),o=void 0,s=!1,a=e.trackOn,u=e.trackHistoryChanges,c=e.eventType,l=void 0===c?"[Amplitude] Page Viewed":c,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,R.mG)(void 0,void 0,void 0,function(){var t,n,r;return(0,R.Jh)(this,function(i){switch(i.label){case 0:return t=d("undefined"!=typeof location&&location.href||""),r={event_type:l},n=[{}],[4,nv()];case 1:return[2,(r.event_properties=R.pi.apply(void 0,[R.pi.apply(void 0,n.concat([i.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"undefined"!=typeof location&&d(location.pathname)||"","[Amplitude] Page Title":nl(nc),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),r)]}})})},p=function(){return void 0===a||"function"==typeof a&&a()},h="undefined"!=typeof location?location.href:null,v=function(){(0,R.mG)(void 0,void 0,void 0,function(){var e,n,i,s,a;return(0,R.Jh)(this,function(c){switch(c.label){case 0:if(n=nm(u,e=location.href,h||"")&&p(),h=e,!n)return[3,4];if(i=void 0,r&&(i=H(),r.set(np,{pageViewId:i})),null==o||o.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return a=(s=t).track,[4,f(i)];case 2:a.apply(s,[c.sent()]),c.label=3;case 3:c.label=4;case 4:return[2]}})})};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,a){return(0,R.mG)(void 0,void 0,void 0,function(){var u,c,l;return(0,R.Jh)(this,function(d){switch(d.label){case 0:if(t=a,n=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),s=!0,i){try{r=new tC(i.sessionStorage)}catch(e){null==o||o.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",v),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=(0,R.CR)(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),s&&v()}})}if(!p())return[3,2];return o.log("Tracking page view event"),u=void 0,r&&(u=H(),r.set(np,{pageViewId:u})),l=(c=t).track,[4,f(u)];case 1:l.apply(c,[d.sent()]),d.label=2;case 2:return[2]}})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){var t,i,s;return(0,R.Jh)(this,function(u){switch(u.label){case 0:if(!("attribution"===a&&ng(e)))return[3,4];
1if(null==o||o.log("Enriching campaign event to page view event with campaign parameters"),t=void 0,!r)return[3,2];return[4,r.get(np)];case 1:t=null==(i=u.sent())?void 0:i.pageViewId,u.label=2;case 2:return[4,f(t)];case 3:s=u.sent(),e.event_type=s.event_type,e.event_properties=(0,R.pi)((0,R.pi)({},e.event_properties),s.event_properties),u.label=4;case 4:return n&&e.event_type===l&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=(0,R.pi)((0,R.pi)({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return i&&(i.removeEventListener("popstate",v),s=!1),[2]})})}}},nv=function(){return(0,R.mG)(void 0,void 0,void 0,function(){var e;return(0,R.Jh)(this,function(t){switch(t.label){case 0:return e=nd,[4,new nf().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},ng=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[w.SET]||{},r=t[w.UNSET]||{},i=(0,R.ev)((0,R.ev)([],(0,R.CR)(Object.keys(n)),!1),(0,R.CR)(Object.keys(r)),!1);return Object.keys(ej).every(function(e){return i.includes(e)})}return!1},nm=function(e,t,n){if("pathOnly"===e){if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname}return t!==n},ny=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})},i=function(){n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return(0,R.mG)(void 0,void 0,void 0,function(){var o,s;return(0,R.Jh)(this,function(a){return t=tp(n),o=function(){if(!i){n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if("undefined"!=typeof document){var o=new WeakSet,s=function(e){if(!o.has(e)){o.add(e);var s=!1;r(e,"change",function(){var t,n=nw(e);s||i.track(tG,((t={})[tK]=nb(e.id),t[tY]=nb(e.name),t[tZ]=n,t)),s=!0}),r(e,"submit",function(r){var o,a,u=nw(e);if(s||i.track(tG,((o={})[tK]=nb(e.id),o[tY]=nb(e.name),o[tZ]=u,o)),s=!0,(null==t?void 0:t.shouldTrackSubmit)!==void 0){if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&r instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.")}i.track(tB,((a={})[tK]=nb(e.id),a[tY]=nb(e.name),a[tZ]=u,a)),s=!1})}};Array.from(document.getElementsByTagName("form")).forEach(s),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&s(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(s)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?o():(s=J())?s.addEventListener("load",o):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return null==e||e.disconnect(),i(),[2]})})}}},nb=function(e){if("string"==typeof e)return e},nw=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},nS=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,r){return(0,R.mG)(void 0,void 0,void 0,function(){var i,o;return(0,R.Jh)(this,function(s){return i=function(){if(!r){t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if("undefined"!=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),s=null==i?void 0:i[1];s&&n(e,"click",function(){var n;s&&r.track(tJ,((n={})[t$]=s,n[tz]=t.pathname,n[tV]=e.id,n[tX]=e.text,n[tW]=e.href,n))})},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),"undefined"!=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=J())?o.addEventListener("load",i):t.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},nE=!1,nk=function(e){nE||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."),nE=!0)},nx=function(){var e=J(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))},r=function(){t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,n("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return r(),[2]})})}}};function nT(e,t,n){var r,i,o=[];try{for(var s=(0,R.XA)(null!=t?t:[]),a=s.next();!a.done;a=s.next()){var u=a.value;try{o.push(new RegExp(u))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return e.concat(o)}var nO=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],nA="data-amp-track-",nC=["div","span","h1","h2","h3","h4","h5","h6"],n_=n(21394),nI=n.n(n_);function nP(e,t){return new(nI())(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function nR(e,t){return new(nI())(function(n){var r=!1,i=new Set,o=function(){var e,t;r=!0;try{for(var n=(0,R.XA)(i),o=n.next();!o.done;o=n.next()){var s=o.value;try{s.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},s=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),o())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),o(),r=!0)}});i.add(t)};return s(e),s(t),o})}function nj(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new(nI())(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){try{for(var n,r,i,o=(0,R.XA)(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.next)||void 0===i||i.call(a,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},error:function(e){try{for(var n,i,o,s=(0,R.XA)(t),a=s.next();!a.done;a=s.next()){var u=a.value;null===(o=u.error)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}r()},complete:function(){try{for(var e,n,i,o=(0,R.XA)(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.complete)||void 0===i||i.call(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})}var nN="https://app.amplitude.com",nD={US:nN,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},nL="__AMPLITUDE_MESSENGER_INSTANCE__",nM="__AMPLITUDE_MESSENGER__",nF=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?nN:t;this[k]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={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,s){r.requestCallbacks[i]={resolve:t,reject:s},r.notify(o),n.timeout>0&&setTimeout(function(){s(Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null===(t=this.logger)||void 0===t||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?void 0:i.warn)||void 0===o||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var n,r,i,o,s=this.pendingMessages.get(e);if(s){this.pendingMessages.delete(e);try{for(var a=(0,R.XA)(s),u=a.next();!u.done;u=a.next()){var c=u.value;t(c)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return(0,R.mG)(this,void 0,void 0,function(){var t,n,r;return(0,R.Jh)(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=(document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;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(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,s=i.endpoint;o&&(this.logger=o),s&&this.endpoint===nN&&(this.endpoint=s),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var t,n,i,o,s,a=e.data,u=null==a?void 0:a.action;if(u){if("id"in a&&a.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(a
1);else{if("ping"===u){r.notify({action:"pong"});return}var c=r.actionHandlers.get(u);if(c)c(a.data);else{var l=null!==(s=r.pendingMessages.get(u))&&void 0!==s?s:[];l.push(a.data),r.pendingMessages.set(u,l)}}}}},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=J();(null==e?void 0:e[nM])===this&&delete e[nM]},e}();k=nL;var nU="__AMPLITUDE_BACKGROUND_CAPTURE__",nG="1.27.2",nB="[Amplitude] Element Clicked",nJ="[Amplitude] Element Tag",nq="[Amplitude] Element Text",nH="[Amplitude] Page URL",n$="[Amplitude] Viewport Height",nz="[Amplitude] Viewport Width",nV="[Amplitude] Page View ID",nX="data-amp-mask-attributes",nW=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nK=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n},nY=["input","select","textarea"],nZ=function(e,t){var n,r=null===(n=null==window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return(null==r?void 0:r.getPropertyValue("cursor"))==="pointer"&&"click"===t},nQ=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&nW(window.location.href,n))&&!!nW(window.location.href,t)},n0=function(e,t,n){return void 0===n&&(n=!1),function(r,i){var o,s,a=e.shouldTrackEventResolver,u=null===(s=null===(o=null==i?void 0:i.tagName)||void 0===o?void 0:o.toLowerCase)||void 0===s?void 0:s.call(o);if(!u)return!1;if(a)return a(r,i);if(!nQ(e))return!1;var c=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof c)switch(c.toLowerCase()){case"hidden":case"password":return!1}var l=nZ(i,r);if(n&&l)return!0;if(t&&!t.some(function(e){var t;return!!(null===(t=null==i?void 0:i.matches)||void 0===t?void 0:t.call(i,e))}))return!1;switch(u){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:if(l)return!0;return"click"===r}}},n1=function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase())==="true";return!nY.includes(i)&&!o},n2=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return null==r||"object"==typeof r&&0===Object.keys(r).length||"string"==typeof r&&0===r.trim().length||(t[n]=r),t},{})},n3=function(){var e;try{var t=J(),n=null===(e=null==t?void 0:t.sessionStorage)||void 0===e?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},n4=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:n4(null==e?void 0:e.parentElement,t):null},n5=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor};(l=x||(x={}))[l.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",l[l.MIDDLE=1]="MIDDLE",l[l.RIGHT=2]="RIGHT";var n6="__AMPLITUDE_VISUAL_TAGGING__",n8=J(),n9=null==n8?void 0:n8.console,n7={},re={},rt=!1,rn={addListener:function(e,t){if(!n9||"function"!=typeof n9[e]||!re[e]&&(re[e]=n9[e],n9[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{if(n7[e]&&!rt){rt=!0;var r=n7[e];r&&r.forEach(function(n){try{n(e,t)}catch(e){}})}}catch(e){}return rt=!1,re[e].apply(n9,t)},0))return Error("Console override failed");n7[e]?n7[e].push(t):n7[e]=[t]},removeListener:function(e){var t,n;try{for(var r=(0,R.XA)(Object.values(n7)),i=r.next();!i.done;i=r.next())for(var o=i.value,s=o.length-1;s>=0;s--)if(o[s]===e){o.splice(s,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},_restoreConsole:function(){var e,t;try{for(var n=(0,R.XA)(Object.entries(re)),r=n.next();!r.done;r=n.next()){var i=(0,R.CR)(r.value,2),o=i[0],s=i[1];s&&(n9[o]=s)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}re={},n7={}}},rr=J(),ri=function(){return new(nI())(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()}})},ro=function(e){return void 0===e&&(e="click"),new(nI())(function(t){var n,r=function(e){t.next(e)};return null===(n=J())||void 0===n||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null===(t=J())||void 0===t||t.document.removeEventListener(e,r,{capture:!0})}})},rs=function(){var e=nR(new(nI())(function(e){var t=function(t){if(t instanceof ErrorEvent){var n={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?n=(0,R.pi)((0,R.pi)({},n),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(n.message=t.error),e.next(n)}};return rr.addEventListener("error",t),function(){rr.removeEventListener("error",t)}}),new(nI())(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return rr.addEventListener("unhandledrejection",t),function(){rr.removeEventListener("unhandledrejection",t)}}));return nR(e,new(nI())(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return rn.addListener("error",t),function(){rn.removeListener(t)}}))},ra=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},ru=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;if(e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector)return n.querySelector(e.selector);return n}}catch(e){}},rc=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},rl={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},rd=function(e){var t,n,r,i,o=Object.values(rl).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var s=(0,R.XA)(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{try{for(var c=(r=void 0,(0,R.XA)(u.definition)),l=c.next();!l.done;l=c.next()){var d=rl[l.value.event_type];d&&o[d].add(u.id)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.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{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},rf=function(e){var t,n,r,i,o=new Map;try{for(var s=(0,R.XA)(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{for(var c=(r=void 0,(0,R.XA)(u.conditions)),l=c.next();!l.done;l=c.next()){var d=l.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){r={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},rp=function(e,t){var n,r,i,o,s=new Set;try{for(var a=(0,R.XA)(e),u=a.next();!u.done;u=a.next()){var c=u.value,l=t.get(c.id);if(l)try{for(var d=(i=void 0,(0,R.XA)(l)),f=d.next();!f.done;f=d.next()){var p=f.value;s.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){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return Array.from(s)},rh=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=rp(Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]}).filter(function(t){return t.definition.some(function(t){return rl[t.event_type]===e.type&&t.filters.every(function(t){return ra(e,t)})})}),this.labeledEventToTriggerMap);try{for(var o=(0,R.XA)(i),s=o.next();!s.done;s=o.next()){var a=s.value;rc(a.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),rv=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",nX,ni]),rg=["type"],rm=["svg","path","g"],ry=["password","hidden"],rb=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),rw=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=rS(r,!!t,r===e);if(!i||(n.push(i),i.optimized))break;r=r.parentElement}return n.reverse(),n.join(" > ")},rS=function(e,t,n){if(e.nodeType!==Node.ELEMENT_NODE)return null;var r,i,o=e.getAttribute("id");if(t){if(o)return new rb(l(o),!0);var s=e.tagName.toLowerCase();if("body"===s||"head"===s||"html"===s)return new rb(s,!0)}var a=e.tagName.toLowerCase();if(o)return new rb(a+l(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new rb(a,!0);function c(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function l(e){return"#"+CSS.escape(e)}for(var d=c(e),f=!1,p=!1,h=-1,v=-1,g=u.children,m=0;g&&(-1===h||!p)&&m<g.length;++m){var y=g[m];if(y.nodeType===Node.ELEMENT_NODE){if(v+=1,y===e){h=v;continue}if(!p&&y.tagName.toLowerCase()===a){f=!0;var b=new Set(d);if(!b.size){p=!0;continue}for(var w=c(y),S=0;S<w.length;++S){var E=w[S];if(b.has(E)&&(b.delete(E),!b.size)){p=!0;break}}}}}var k=a;if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(k+="[type="+CSS.escape(e.getAttribute("type")||"")+"]"),p)k+=":nth-child("+String(h+1)+")";else if(f)try{for(var x=(0,R.XA)(d),T=x.next();!T.done;T=x.next()){var O=T.value;k+="."+CSS.escape(O.slice(1))}}catch(e){r={error:e}}finally{try{T&&!T.done&&(i=x.return)&&i.call(x)}finally{if(r)throw r.error}}return new rb(k,!1)},rE=function(e,t){var n,r,i,o=this;this.replaceSensitiveString=function(e){return nc(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,s=performance.now(),a=[];if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;
1t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),c=new Map,l=u.length-1;l>=0;l--){var d=u[l];if(d){var f,p=(f=d.getAttribute(nX))?f.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[],h=l===u.length-1?[]:null!==(r=c.get(u[l+1]))&&void 0!==r?r:new Set,v=new Set((0,R.ev)((0,R.ev)([],(0,R.CR)(h),!1),(0,R.CR)(p),!1));c.set(d,v)}}a=u.map(function(e){var t;return function(e,t){if(null===e)return null;var n,r,i,o,s,a,u=String(e.tagName).toLowerCase(),c={tag:u},l=Array.from(null!==(o=null===(i=e.parentElement)||void 0===i?void 0:i.children)&&void 0!==o?o:[]);l.length&&(c.index=l.indexOf(e),c.indexOfType=l.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null===(a=null===(s=e.previousElementSibling)||void 0===s?void 0:s.tagName)||void 0===a?void 0:a.toLowerCase();d&&(c.prevSib=String(d));var f=e.getAttribute("id");f&&(c.id=String(f));var p=Array.from(e.classList);p.length&&(c.classes=p);var h={},v=Array.from(e.attributes).filter(function(e){return!rv.has(e.name)}),g=!n1(e);if(!ry.includes(String(e.getAttribute("type")))&&!rm.includes(u))try{for(var m=(0,R.XA)(v),y=m.next();!y.done;y=m.next()){var b=y.value;if(!g||rg.includes(b.name)){if(t.has(b.name)){h[b.name]=no;continue}h[b.name]=String(b.value).substring(0,128)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}return Object.keys(h).length&&(c.attrs=h),c}(e,null!==(t=c.get(e))&&void 0!==t?t:new Set)});var g=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=(0,R.CR)(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=o.replaceSensitiveString(i))})};try{for(var m=(0,R.XA)(a),y=m.next();!y.done;y=m.next()){var b=y.value;g(b)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}var w=performance.now();return null===(i=o.diagnosticsClient)||void 0===i||i.recordHistogram("autocapturePlugin.getHierarchy",w-s),a},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(n)},this.getElementPath=function(e){if(!e)return"";var t,n=performance.now(),r=rw(e),i=performance.now();return null===(t=o.diagnosticsClient)||void 0===t||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.getEventProperties=function(e,t,n){var r,i,s,a,u=null===(s=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===s?void 0:s.call(i),c="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},l=o.getHierarchy(t),d=null===(a=l[0])||void 0===a?void 0:a.attrs,f=o.getNearestLabel(t),p=Object.entries(null!=d?d:{}).reduce(function(e,t){var r=(0,R.CR)(t,2),i=r[0],o=r[1];if(i.startsWith(n)){var s=i.replace(n,"");s&&(e[s]=o||"")}return e},{}),h=((r={})["[Amplitude] Element Hierarchy"]=l,r[nJ]=u,r[nq]=o.getText(t),r["[Amplitude] Element Position Left"]=null==c.left?null:Math.round(c.left),r["[Amplitude] Element Position Top"]=null==c.top?null:Math.round(c.top),r["[Amplitude] Element Attributes"]=p,r["[Amplitude] Element Path"]=o.getElementPath(t),r["[Amplitude] Element Parent Label"]=f,r[nH]=nK(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=nl(o.replaceSensitiveString),r[n$]=window.innerHeight,r[nz]=window.innerWidth,r),v=n3();if(v&&(h[nV]=v),h["[Amplitude] Element ID"]=t.getAttribute("id")||"",h["[Amplitude] Element Class"]=t.getAttribute("class"),h["[Amplitude] Element Aria Label"]=null==d?void 0:d["aria-label"],"a"===u&&"click"===e&&t instanceof HTMLAnchorElement){var g=t.href.substring(0,128);h["[Amplitude] Element Href"]=o.replaceSensitiveString(g)}return n2(h)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var s=o.addTypeAndTimestamp(e,t);if(("click"===s.type||"change"===s.type)&&null!==s.event.target){if(i&&nZ(s.event.target,s.type))return s.closestTrackedAncestor=s.event.target,s.targetElementProperties=o.getEventProperties(s.type,s.closestTrackedAncestor,r),s;var a=n4(s.event.target,n);a&&(s.closestTrackedAncestor=a,s.targetElementProperties=o.getEventProperties(s.type,a,r))}return s},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=ru(e,t);if(n){if("TEXT"===e.elementExtractType)return o.getText(n);if("ATTRIBUTE"===e.elementExtractType&&e.attribute)return n.getAttribute(e.attribute)}}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(ni,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",s=Array.from(e.childNodes);try{for(var a=(0,R.XA)(s),u=a.next();!u.done;u=a.next()){var c=u.value;if(c.nodeType===Node.TEXT_NODE){i+=c.textContent||"";continue}if(c instanceof Element){if(c.hasAttribute(ni)||c.hasAttribute("contenteditable")){i+=no;continue}i+=o.getTextWithMaskedDescendants(c)}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(ni,"]")))return no;var t="";return t=e.querySelector("[".concat(ni,"], [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,n,r,i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n);return n2(((t={})[nJ]=i,t[nq]=o.getText(e),t[nH]=window.location.href.split("?")[0],t))},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var s=null!==(i=e.maskTextRegex)&&void 0!==i?i:[],a=[];try{for(var u=(0,R.XA)(s),c=u.next();!c.done;c=u.next()){var l=c.value;if(a.length>=25)break;if(l instanceof RegExp)a.push(l);else if("pattern"in l&&"string"==typeof l.pattern)try{a.push(RegExp(l.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=a};(d=T||(T={})).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 rk=function(e,t){void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",nG);var n,r,i,o,s,a,u,c,l,d,f,p,h,v,g,m,y=e.dataAttributePrefix,b=void 0===y?nA:y,w=e.visualTaggingOptions,S=void 0===w?{enabled:!0}:w;e.cssSelectorAllowlist=null!==(o=e.cssSelectorAllowlist)&&void 0!==o?o:nO,e.actionClickAllowlist=null!==(s=e.actionClickAllowlist)&&void 0!==s?s:nC,e.debounceTime=null!==(a=e.debounceTime)&&void 0!==a?a:0;var E=(null===(u=e.viewportContentUpdated)||void 0===u?void 0:u.enabled)!==!1,k=null!==(d=null!==(l=null===(c=e.viewportContentUpdated)||void 0===c?void 0:c.exposureDuration)&&void 0!==l?l:e.exposureDuration)&&void 0!==d?d:150;e.viewportContentUpdated=(0,R.pi)((0,R.pi)({},e.viewportContentUpdated),{exposureDuration:k}),e.pageUrlExcludelist=null===(f=e.pageUrlExcludelist)||void 0===f?void 0:f.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 x="@amplitude/plugin-autocapture-browser",O=[],A=new rE(e,t),C=new Set,_=new Set,I=function(){var t,n,r,i=nj(ro().map(function(t){return A.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,b)})),o=nj(new(nI())(function(t){var n,r=function(n){var r=A.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,b);t.next(r)};return null===(n=J())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=J())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(r=nj(new(nI())(function(t){var n=function(n){var r=A.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,b);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var s=nj(ri().map(function(t){return A.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,b)})),a=new(nI())(function(e){var t,n=function(t){e.next(t)};return null===(t=J())||void 0===t||t.addEventListener("scroll",n),function(){var e;null===(e=J())||void 0===e||e.removeEventListener("scroll",n)}}),u=(t=e.cssSelectorAllowlist,new(nI())(function(e){var n,r=J();if(!(null==r?void 0:r.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!==(n=null==r?void 0:r.document.querySelectorAll(o))&&void 0!==n?n:[]).forEach(function(e){i.observe(e)});var a=s.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(){a.unsubscribe(),i.disconnect()}}));return(n={})[T.ChangeObservable]=o,n[T.ClickObservable]=i,n[T.MutationObservable]=s,n[T.NavigateObservable]=r,n[T.ScrollObservable]=a,n[T.ExposureObservable]=u,n},P=rd(Object.values(null!==(h=null===(p=e.pageActions)||void 0===p?void 0:p.labeledEvents)&&void 0!==h?h:{})),j=rf(null!==(g=null===(v=e.pageActions)||void 0===v?void 0:v.triggers)&&void 0!==g?g:[]),N=(n=P,r=j,i=e,new rh(n,r,A,i)),D=function(t){var n,r;t&&(e.pageActions=(0,R.pi)((0,R.pi)({},e.pageActions),t),P=rd(Object.values(null!==(n=e.pageActions.labeledEvents)&&void 0!==n?n:{})),j=rf(null!==(r=e.pageActions.triggers)&&void 0!==r?r:[]),N.update(P,j,e))};return{name:x,type:"enrichment",setup:function(t,n){return(0,R.mG)(void 0,void 0,void 0,function(){var r,i,o,s,a,u,c,l,d,f,p,h,v,g,y,w,P,j,L,M,F;return(0,R.Jh)(this,function(U){var G,B,q,H,$,z,V,X,W,K,Y,Z,Q,ee,et,en,er,ei,eo,es,ea,eu,ec,el,ed,ef,ep,eh,ev,eg,em,ey,eb,ew,eS,eE,ek,ex,eT;return"undefined"==typeof document||(r=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(e){D(e)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),o=n0(e,e.cssSelectorAllowlist),s=n0(e,e.actionClickAllowlist),B=(G={allObservables:a=I(),amplitude:n,shouldTrackEvent:o,evaluateTriggers:N.evaluate.bind(N)}).amplitude,q=G.allObservables,H=G.shouldTrackEvent,$=G.evaluateTriggers,u=q.clickObservable.filter(n5).filter(function(e){return H("click",e.closestTrackedAncestor)}).map(function(e){return $(e)}).subscribe(function(e){null==B||B.track(nB,e.targetElementProperties)}),O.push(u),V=(z={allObservables:a,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,(0,R.ev)((0,R.ev)([],(0,R.CR)(e),!1),[b],!1))},amplitude:n,shouldTrackEvent:o,evaluateTriggers:N.evaluate.bind(N)}).amplitude,X=z.allObservables,W=z.getEventProperties,K=z.shouldTrackEvent,Y=z.evaluateTriggers,c=X.changeObservable.filter(n5).filter(function(e){return K("change",e.closestTrackedAncestor)}).map(function(e){return Y(e)}).subscribe(function(e){null==V||V.track("[Amplitude] Element Changed",W("change",e.closestTrackedAncestor))}),O.push(c),Q=(Z={allObservables:a,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,(0,R.ev)((0,R.ev)([],(0,R.CR)(e),!1),[b],!1))},amplitude:n,shouldTrackEvent:o,shouldTrackActionClick:s}).amplitude,ee=Z.allObservables,et=Z.options,en=Z.getEventProperties,er=Z.shouldTrackEvent,ei=Z.shouldTrackActionClick,eo=ee.clickObservable,es=ee.mutationObservable,ea=ee.navigateObservable,eu=eo.filter(function(e){return!er("click",e.closestTrackedAncestor)}).map(function(e){var t=n4(e.event.target,et.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=en(e.type,e.closestTrackedAncestor)),e}).filter(n5).filter(function(e){return ei("click",e.closestTrackedAncestor)}),ec=ea?nR(es,ea):es,el=nR(eu,ec),ed=null,ef=null,(l=nP(el,function(e){if(ed&&(clearTimeout(ed),ed=null),"click"===e.type)ef=e,ed=setTimeout(function(){ed=null,ef=null},500);else if(ef){var t=ef;return ef=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==Q||Q.track(nB,en("click",e.closestTrackedAncestor)))}))&&O.push(l),(ep={allObservables:a,amplitude:n}).amplitude,eh=ep.allObservables.scrollObservable,ev={maxX:0,maxY:0},eg=eh.subscribe(function(){var e,t,n,r,i=J(),o=Math.floor(null!==(t=null!==(e=null==i?void 0:i.scrollX)&&void 0!==e?e:null==i?void 0:i.pageXOffset)&&void 0!==t?t:0),s=Math.floor(null!==(r=null!==(n=null==i?void 0:i.scrollY)&&void 0!==n?n:null==i?void 0:i.pageYOffset)&&void 0!==r?r:0);ev.maxX=Math.max(ev.maxX,o),ev.maxY=Math.max(ev.maxY,s)}),d={unsubscribe:function(){eg.unsubscribe()},getState:function(){return ev},reset:function(){ev.maxX=0,ev.maxY=0}},O.push(d),f={},p=J(),h=function(e){e&&r||(setTimeout(function(){r=!1},100),r=!0,function(e){var t,n,r,i,o,s,a=e.amplitude,u=e.scrollTracker,c=e.currentElementExposed,l=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,p=e.lastScroll,h=u.getState(),v=J(),g=null!==(n=null==v?void 0:v.innerWidth)&&void 0!==n?n:0,m=null!==(r=null==v?void 0:v.innerHe
1ight)&&void 0!==r?r:0,y=((t={})[nH]=nK(null!==(s=null===(o=null===(i=null==v?void 0:v.location)||void 0===i?void 0:i.href)||void 0===o?void 0:o.split("?")[0])&&void 0!==s?s:""),t["[Amplitude] Max Page X"]=h.maxX+g,t["[Amplitude] Max Page Y"]=h.maxY+m,t[n$]=m,t[nz]=g,t["[Amplitude] Element Exposed"]=Array.from(c),t),b=n3();if(b&&(y[nV]=b),0===c.size&&h.maxX===p.maxX&&h.maxY===p.maxY){f&&(u.reset(),l.clear(),null==d||d.reset());return}null==a||a.track("[Amplitude] Viewport Content Updated",y),p.maxX=h.maxX,p.maxY=h.maxY,c.clear(),f&&(u.reset(),l.clear(),null==d||d.reset())}({amplitude:n,scrollTracker:d,currentElementExposed:_,elementExposedForPage:C,exposureTracker:f.exposure,isPageEnd:e,lastScroll:i}))},v=function(e){!C.has(e)&&(C.add(e),_.add(e),JSON.stringify(Array.from(_)).length>=18e3&&h(!1))},E&&(f.exposure=(ey=(em={allObservables:a,onExposure:v,dataExtractor:A,exposureDuration:k}).allObservables,eb=em.onExposure,ew=em.dataExtractor,eE=void 0===(eS=em.exposureDuration)?150:eS,ek=new Map,ex=new Map,eT=ey.exposureObservable.subscribe(function(e){var t=e.target;if(e.isIntersecting){if(!ek.get(t)){var n=setTimeout(function(){ek.set(t,!0),eb(ew.getElementPath(t)),ex.set(t,null)},eE);ex.set(t,n)}}else if(!e.isIntersecting&&e.intersectionRatio<1){var n=ex.get(t);n&&(clearTimeout(n),ex.set(t,null))}}),{unsubscribe:function(){eT.unsubscribe()},reset:function(){ex.forEach(function(e){e&&clearTimeout(e)}),ex.clear(),ek.clear()}}),f.exposure&&O.push(f.exposure),g=function(){h(!0)},null==p||p.addEventListener("beforeunload",g),m=function(){null==p||p.removeEventListener("beforeunload",g)},O.push({unsubscribe:function(){return m()}}),(y=a[T.NavigateObservable])?O.push(y.subscribe(function(){h(!0)})):p&&(w=function(){h(!0)},p.addEventListener("popstate",w),P=p.history.pushState,p.history&&P&&(p.history.pushState=new Proxy(P,{apply:function(e,t,n){var r=(0,R.CR)(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),h(!0)}})),O.push({unsubscribe:function(){p.removeEventListener("popstate",w),p.history&&P&&(p.history.pushState=P)}}))),null===(F=null==t?void 0:t.loggerProvider)||void 0===F||F.log("".concat(x," has been successfully added.")),window.opener&&S.enabled&&(j=e.cssSelectorAllowlist,L=e.actionClickAllowlist,function(e,t){if(!0!==e[n6]){e[n6]=!0;var n=t.dataExtractor,r=t.isElementSelectable,i=t.cssSelectorAllowlist,o=t.actionClickAllowlist,s=null,a=function(t){e.notify({action:"element-selected",data:t})},u=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};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 c;s=null===(c=null==window?void 0:window.amplitudeVisualTaggingSelector)||void 0===c?void 0:c.call(window,{getEventTagProps:n.getEventTagProps,isElementSelectable:function(e){return!r||r((null==t?void 0:t.actionType)||"click",e)},onTrack:u,onSelect:a,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:i,actionClickAllowlist:o,extractDataFromDataSource:n.extractDataFromDataSource,dataExtractor:n,diagnostics:{autocapture:{version:nG}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==s?void 0:s.close)||void 0===e||e.call(s)})}}(M=function(e){var t=J(),n=null==t?void 0:t[nM];if("object"==typeof n&&null!==n&&nL in n&&!0===n[nL])return n;var r=new nF(void 0);return t&&(t[nM]=r),r}(),{dataExtractor:A,isElementSelectable:n0(e,(0,R.ev)((0,R.ev)([],(0,R.CR)(j),!1),(0,R.CR)(L),!1)),cssSelectorAllowlist:j,actionClickAllowlist:L}),function(e,t){if(!0!==e[nU]){e[nU]=!0;var n,r=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:"https://cdn.amplitude.com/libs/background-capture-1.0.1.js.gz",i=null,o=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Backgroun
1d capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var t,n,s=new URL(r,e.endpoint).toString();e.loadScriptOnce(s).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),i=null===(r=null==window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:o}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==i?void 0:i.close)||void 0===e||e.call(i),i=null})}}(M),M.setup((0,R.pi)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:nD[t.serverZone]})))),[2]})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){var e,t,n,r;return(0,R.Jh)(this,function(i){try{for(t=(e=(0,R.XA)(O)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},rx=(0,R.ev)(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],(0,R.CR)(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),rT=["*"],rO=["mutation","navigate"];function rA(e,t){var n,r,i,o,s=t.event,a=s.pageX,u=s.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:a,a),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function rC(e){if(0===e.length)return null;var t=e[0],n=e[e.length-1];return{rageClickEvent:(0,R.pi)({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.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}}(f=O||(O={})).INCREASING="increasing",f.DECREASING="decreasing",(p=A||(A={})).X="x",p.Y="y";var r_=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new(nI())(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};if(null===n){n=o;return}o.x>n.x?(r===O.DECREASING&&e.next(A.X),r=O.INCREASING):o.x<n.x&&(r===O.INCREASING&&e.next(A.X),r=O.DECREASING),o.y>n.y?(i===O.DECREASING&&e.next(A.Y),i=O.INCREASING):o.y<n.y&&(i===O.INCREASING&&e.next(A.Y),i=O.DECREASING),n=o})})};function rI(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function rP(e){e.changes=[],e.startTime=void 0}function rR(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length&&!(i-t[r]<n);r++);0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var rj=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new(nI())(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},s=void 0,a=null;function u(){void 0!==s&&(e.next(s),s=void 0,null!==a&&clearTimeout(a),rP(n),rP(i))}return t.subscribe(function(e){null!==a&&clearTimeout(a),t=e===A.X?n:i,r=+Date.now(),t.startTime=t.startTime||r,c=t.changes,l=t.changesThreshold,c.push(r),c.length>l&&c.shift();var t,r,c,l,d=function(e,t){var n=void 0;if(rI(e)&&(n=e.startTime),rI(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return d?(s=s||d,a=setTimeout(function(){u(),a=null},o)):u(),rR(n),rR(i),function(){null!==a&&(clearTimeout(a),a=null)}})})},rN=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=e.thresholdMs;return rj({mouseDirectionChangeObservable:r_({allWindowObservables:r}),directionChanges:void 0===i?20:i,thresholdMs:void 0===o?2e3:o}).subscribe(function(e){nQ(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function rD(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}
1var rL=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-frustration-browser",r=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var o=!1!==e.deadClicks&&null!==e.deadClicks,s=!1!==e.rageClicks&&null!==e.rageClicks,a=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(a=!1);var u=rD(e,"rageClicks",rT,s),c=rD(e,"deadClicks",rx,o),l=rD(e,"errorClicks",rx,i),d=null!==(t=e.dataAttributePrefix)&&void 0!==t?t:nA,f=new rE(e),p=(0,R.ev)([],(0,R.CR)(new Set((0,R.ev)((0,R.ev)((0,R.ev)([],(0,R.CR)(u),!1),(0,R.CR)(c),!1),(0,R.CR)(l),!1))),!1),h=function(){var e,t,n=nj(ro("pointerdown").map(function(e){return f.addAdditionalEventProperties(e,"click",p,d,!0)})),r=nj(rs().map(function(e){return f.addTypeAndTimestamp(e,"error")})),i=nj(ri().map(function(e){return f.addAdditionalEventProperties(e,"mutation",p,d)}));window.navigation&&(t=nj(new(nI())(function(e){var t=function(t){e.next((0,R.pi)((0,R.pi)({},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=nj(new(nI())(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){var n=void 0,r=void 0;try{if(n=t.selectionStart,r=t.selectionEnd,n===r)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)}})),s=nj(new(nI())(function(e){var t=function(t){e.next(t)},n={capture:!0};return rr.document.addEventListener("mousemove",t,n),function(){rr.document.removeEventListener("mousemove",t,n)}}));return(e={})[T.ClickObservable]=n,e[T.MutationObservable]=i,e[T.NavigateObservable]=t,e[T.BrowserErrorObservable]=r,e[T.SelectionObservable]=o,e[T.MouseMoveObservable]=s,e};return{name:n,type:"enrichment",setup:function(t,p){return(0,R.mG)(void 0,void 0,void 0,function(){var v,g,m,y,b,w,S,E;return(0,R.Jh)(this,function(k){var T,O,A,C,_,I,P,j,N,D,L,M,F,U,G,B,J,q,H,$,z,V;return"undefined"==typeof document||(v=h(),s&&(g=function(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,o=r.clickObservable,s=r.selectionObservable,a=[],u={},c=null;function l(e){a=[],u={},e&&(rA(u,e),a.push(e))}var d=nP(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return(0,R.mG)(t,void 0,void 0,function(){var t;return(0,R.Jh)(this,function(n){var r,i,o,s;return(rA(u,e),t=null,0===a.length||(r=a).length>0&&r[r.length-1].closestTrackedAncestor!==e.closestTrackedAncestor||(o=Math.max(0,(i=a).length-4+1),s=i[o],e.timestamp-s.timestamp>=1e3)||u.isOutOfBounds)?(c&&(t=rC(a)),l(e)):a.push(e),(c&&(clearTimeout(c.timerId),c.resolve(t),c=null),a.length>=4)?[2,new Promise(function(e){c={resolve:e,timerId:setTimeout(function(){e(rC(a))},1e3)}})]:[2,null]})})}),f=null==s?void 0:s.subscribe(function(){l()}),p=d.subscribe(function(e){null!==e&&n.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){p.unsubscribe(),null==f||f.unsubscribe()}}}({allObservables:v,amplitude:p,shouldTrackRageClick:n0(e,u)}),r.push(g)),o&&(O=(T={amplitude:p,allObservables:v,getEventProperties:function(e,t){return f.getEventProperties(e,t,d)},shouldTrackDeadClick:n0(e,c)}).amplitude,A=T.allObservables,C=T.getEventProperties,_=T.shouldTrackDeadClick,I=A.clickObservable,P=A.mutationObservable,j=A.navigateObservable,N=I.filter(function(e){return n5(e)&&_("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===x.LEFT_OR_TOUCH_CONTACT}),D=j?nR(P,j):P,L=nR(N,D),M=null,m=nP(L,function(e){if(M&&rO.includes(e.type))clearTimeout(M),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};O.track("[Amplitude] Dead Click",(0,R.pi)((0,R.pi)({},C("click",e.closestTrackedAncestor)),t),{time:e.timestamp})}}),r.push(m)),i&&(U=(F={amplitude:p,allObservables:v,shouldTrackErrorClick:n0(e,l)}).amplitude,G=F.allObservables,B=F.shouldTrackErrorClick,J=G.clickObservable,q=G.browserErrorObservable,H=J.filter(function(e){return n5(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,z=null,V=function(){null!==$&&(clearTimeout($),$=null),z=null},y=nR(H,q).subscribe(function(e){var t;if("click"===e.type){V(),z=e,$=setTimeout(V,2e3);return}"error"===e.type&&z&&(U.track("[Amplitude] Error Click",(0,R.pi)(((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),z.targetElementProperties)),V())}),r.push(y)),a&&(b=void 0,w=void 0,"object"==typeof e.thrashedCursor&&(b=e.thrashedCursor.directionChanges,w=e.thrashedCursor.threshold,b&&b<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(b," is below the minimum of ").concat(5,", setting to ").concat(5)),b=5),w&&w>4e3&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(w," is above the maximum of ").concat(4e3,", setting to ").concat(4e3)),w=4e3)),S=rN({amplitude:p,options:e,allObservables:v,directionChanges:b,thresholdMs:w}),r.push(S)),null===(E=null==t?void 0:t.loggerProvider)||void 0===E||E.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){var e,t,n,i;return(0,R.Jh)(this,function(o){try{for(t=(e=(0,R.XA)(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]})})}}};function rM(e,t){var n=e.startTime+e.duration;return t.filter(function(t){return t.startTime<n&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})}var rF=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",n=[],r=!0===e.mainThreadBlock||"object"==typeof e.mainThreadBlock&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return(0,R.mG)(void 0,void 0,void 0,function(){var s,a,u;return(0,R.Jh)(this,function(c){return"undefined"==typeof document||(r&&(s=100,"object"==typeof e.mainThreadBlock&&void 0!==e.mainThreadBlock.durationThreshold&&(s=e.mainThreadBlock.durationThreshold),a=function(e){var t=e.amplitude,n=e.options,r=e.durationThreshold,i=void 0===r?100:r,o=function(){if("undefined"==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 s=[],a=new PerformanceObserver(function(e){var t,n,r=performance.now();try{for(var i=(0,R.XA)(e.getEntries()),o=i.next();!o.done;o=i.next()){var a=o.value;s.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(var u=r-1e4;s.length>0&&s[0].startTime<u;)s.shift()});try{a.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var r,a;try{for(var u=(0,R.XA)(e.getEntries()),c=u.next();!c.done;c=u.next()){var l=c.value;if(!nQ(n))return;if(!(l.duration<i)){var d="long-animation-frame"===o?function(e,t){var n,r=rM(e,t),i=null!==(n=e.scripts)&&void 0!==n?n:[],o=i.map(function(e){return e.sourceURL}
1).filter(Boolean),s=i.map(function(e){return e.sourceFunctionName}).filter(Boolean),a=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),c=i.map(function(e){return e.invoker}).filter(Boolean);return(0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)((0,R.pi)({"[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},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),{"[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}),s.length>0&&{"[Amplitude] Main Thread Block Script Functions":s}),a.length>0&&{"[Amplitude] Main Thread Block Script Positions":a}),u.length>0&&{"[Amplitude] Main Thread Block Invoker Types":u}),c.length>0&&{"[Amplitude] Main Thread Block Invokers":c})}(l,s):function(e,t){var n,r=rM(e,t),i=null!==(n=e.attribution)&&void 0!==n?n:[];return(0,R.pi)((0,R.pi)({"[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},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),i.length>0&&{"[Amplitude] Main Thread Block Attribution":i.map(function(e){return e.name})})}(l,s);t.track("[Amplitude] Main Thread Block",d)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}});try{u.observe({entryTypes:[o]})}catch(e){return a.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),a.disconnect()}}}({amplitude:o,options:e,durationThreshold:s}),n.push(a)),null===(u=null==i?void 0:i.loggerProvider)||void 0===u||u.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){var e,t,r,i;return(0,R.Jh)(this,function(o){try{for(t=(e=(0,R.XA)(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 rU(e,t,n){e&&function e(t){var n,r,i=t.json,o=t.targetObject,s=t.allowlist,a=t.excludelist,u=t.ancestors,c=t.parentObject,l=t.targetKey;o||(o=i);var d=Object.keys(o);try{for(var f=(0,R.XA)(d),p=f.next();!p.done;p=f.next()){var h,v=p.value,g=(0,R.ev)((0,R.ev)([],(0,R.CR)(u),!1),[v],!1);(h=o[v],"string"==typeof h||"number"==typeof h||"boolean"==typeof h||null==h)?(!rB(g,s)||rB(g,a))&&delete o[v]:e({json:i,targetObject:o[v],allowlist:s,excludelist:a,ancestors:g,parentObject:o,targetKey:v})}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}0===Object.keys(o).length&&c&&l&&delete c[l]}({json:e,allowlist:t.map(rG),excludelist:n.map(rG),ancestors:[]})}function rG(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function rB(e,t){return t.some(function(t){return function e(t,n,r,i){if(void 0===r&&(r=0),void 0===i&&(i=0),i===n.length)return r===t.length;if(r===t.length){for(;i<n.length&&"**"===n[i];)i++;return i===n.length}var o=n[i];if("**"===o){if(i+1===n.length)return!0;for(var s=r;s<=t.length;s++)if(e(t,n,s,i+1))return!0;return!1}return("*"===o||o===t[r])&&e(t,n,r+1,i+1)}(e,t)})}var rJ=function(){function e(e){this.request=e}return e.prototype.headers=function(e){void 0===e&&(e=[]);var t,n,r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=(0,R.CR)(e,2),n=t[0],r=t[1];i[n]=r});else if(r instanceof Headers)r.forEach(function(e,t){i[t]=e});else if("object"==typeof r&&null!==r)try{for(var o=(0,R.XA)(Object.entries(r)),s=o.next();!s.done;s=o.next()){var a=(0,R.CR)(s.value,2),u=a[0],c=a[1];i[u]=c}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return rW(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=J();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=rH(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,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(n){return 0===e.length?[2,null]:[2,rV(this.body,e,t)]})})},e}(),rq=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),rW(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return rH(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,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(n){return 0===e.length?[2,null]:[2,rV(this.body,e,t)]})})},e}();function rH(e,t){var n,r,i,o,s=J(),a=null==s?void 0:s.TextEncoder;if(a){if("string"==typeof e)o=e,i=new a().encode(o).length;else if(e instanceof Blob)i=(o=e).size;else if(e instanceof URLSearchParams)o=e,i=new a().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,c=0;try{for(var l=(0,R.XA)(e.entries()),d=l.next();!d.done;d=l.next()){var f=(0,R.CR)(d.value,2),p=f[0],h=f[1];if(u+=p.length,"string"==typeof h)u+=new a().encode(h).length;else{if(!(h instanceof Blob))return;u+=h.size}if(++c>=t)return}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}i=u}else if(e instanceof ReadableStream){o=e;return}return i}}var r$=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 n=this.response.headers,r={};return null===(t=null==n?void 0:n.forEach)||void 0===t||t.call(n,function(e,t){r[t]=e}),rW(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(void 0!==this._bodySize)return this._bodySize;var e,t,n=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},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,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(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,R.mG)(this,void 0,void 0,function(){return(0,R.Jh)(this,function(n){switch(n.label){case 0:if(0===e.length)return[2,null];return[4,this.text()];case 1:return[2,rV(n.sent(),e,t)]}})})},e}(),rz=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}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,n,r={},i=this.headersString.split("\r\n");try{for(var o=(0,R.XA)(i),s=o.next();!s.done;s=o.next()){var a=s.value,u=(0,R.CR)(a.split(": "),2),c=u[0],l=u[1];c&&l&&(r[c]=l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return rW(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,R.mG)(this,void 0,void 0,function(){var n;return(0,R.Jh)(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(rU(n,e,t),[2,n]):[2,null]})})},e}();
1function rV(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return rU(r,t,n),r}catch(e){return null}}(h=C||(C={})).REDACT="redact",h.REMOVE="remove";var rX="[REDACTED]",rW=function(e,t){var n,r,i=t.allow,o=void 0===i?[]:i,s=t.strategy,a=void 0===s?C.REMOVE:s,u=(0,R.ev)([],(0,R.CR)(eD),!1),c={};try{for(var l=(0,R.XA)(Object.keys(e)),d=l.next();!d.done;d=l.next()){var f=d.value;!function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?a===C.REDACT&&(c[t]=rX):o.find(function(e){return e.toLowerCase()===n})?c[t]=e[t]:a===C.REDACT&&(c[t]=rX)}(f)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return c},rK=function(){function e(e,t,n,r,i,o,s,a,u,c,l){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=s,this.duration=a,this.responseWrapper=u,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,n,r;return 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?void 0:e.headers((0,R.ev)([],(0,R.CR)(eN),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(n=this.responseWrapper)||void 0===n?void 0:n.headers((0,R.ev)([],(0,R.CR)(eN),!1)),responseBodySize:null===(r=this.responseWrapper)||void 0===r?void 0:r.bodySize}).filter(function(e){var t=(0,R.CR)(e,2);return void 0!==(t[0],t[1])}))},e}(),rY=function(e,t){void 0===t&&(t=H()),this.callback=e,this.id=t};function rZ(e){try{e()}catch(e){}}var rQ=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=J();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=J();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,s,a,u,c,l,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.XMLHttpRequest)||void 0===r?void 0:r.prototype)||void 0===i?void 0:i.open,p=null===(a=null===(s=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===a?void 0:a.send,h=null===(l=null===(c=null===(u=this.globalScope)||void 0===u?void 0:u.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===l?void 0:l.setRequestHeader;f&&p&&h&&this.observeXhr(f,p,h);var v=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;v&&this.observeFetch(v),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(n){try{n.callback(e)}catch(e){rZ(function(){var n;null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,s){if(void 0!==o&&void 0!==s){var a,u,c,l,d="GET";if("object"==typeof t&&null!==t&&"url"in t&&"method"in t?(u=t.url,d=t.method):u=null===(a=null==t?void 0:t.toString)||void 0===a?void 0:a.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==n?void 0:n.method)||d,r&&(c=r.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},c=0);var p=Math.floor(performance.now()-s),h=Math.floor(o+p),v=new rK(e,d,o,o,u,n,c,p,r,l,h);this.triggerEventCallbacks(v)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null==performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return(0,R.mG)(t,void 0,void 0,function(){var t,i,o,s=this;return(0,R.Jh)(this,function(a){switch(a.label){case 0:try{t=this.getTimestamps()}catch(e){rZ(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=a.sent(),[3,4];case 3:return o=a.sent(),[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new rJ(r):void 0,i?new r$(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){rZ(function(){var t;return null===(t=s.logger)||void 0===t?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 n;try{if("json"===e.responseType){if(null===(n=t.globalScope)||void 0===n?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){n instanceof Error&&"InvalidStateError"===n.name&&rZ(function(){var n;return null===(n=t.logger)||void 0===n?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))})}return null}},e.prototype.observeXhr=function(t,n,r){if(this.globalScope&&t&&n){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=(0,R.CR)(n,2),s=i[0],a=i[1];try{this.$$AmplitudeAnalyticsEvent=(0,R.pi)({method:s,url:null===(e=null==a?void 0:a.toString)||void 0===e?void 0:e.call(a),headers:{}},o.getTimestamps())}catch(e){rZ(function(){var t;return null===(t=o.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,n)},i.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,s=e.createXhrJsonParser(this,o),a=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new rz(i.status,e,t?parseInt(t,10):void 0,s),r=i.$$AmplitudeAnalyticsEvent.headers,c=new rq(a,r);u.status=i.status,o.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},c,n,void 0,u.startTime,u.durationStart)}catch(e){rZ(function(){var t;return null===(t=o.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(i,t)},i.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){rZ(function(){var t;return null===(t=o.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}r.apply(this,[e,t])}}},e}()),r0="[Amplitude] Network Request",r1="500-599";function r2(e,t){var n="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(n).test(e)}function r3(e,t){var n,r,i=t.split(",");try{for(var o=(0,R.XA)(i),s=o.next();!s.done;s=o.next()){var a=s.value,u=(0,R.CR)(a.split("-").map(Number),2),c=u[0],l=u[1];if(e===c&&void 0===l||e>=c&&e<=l)return!0}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function r4(e){var t;if(e)try{var n=null===(t=J())||void 0===t?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,a=r.host;r.hash="",r.search="";var u=r.href;return{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:u,host:a}}catch(e){return}}function r5(e){return"object"!=typeof e||null===e?e?(0,R.ev)([],(0,R.CR)(eN),!1):void 0:0!==e.length?e:void 0}function r6(e){var t,n,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(n=null==e?void 0:e.blocklist)||void 0===n?void 0:n.length)&&!(null===(r=null==e?void 0:e.excludelist)||void 0===r?void 0:r.length)}(_||(_={})).NetworkObservable="networkObservable";var r8=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new(nI())(function(e){var n=new rY(function(t){var n={event:t,timestamp:Date.now(),type:"network"};e.next(n)});return rQ.subscribe(n,t),function(){rQ.unsubscribe(n)}});return(e={})[_.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,o){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(s){var a,u,c,l,d;return"undefined"==typeof document||(u=(a={allObservables:r(),networkTrackingOptions:e,amplitude:o,loggerProvider:t=null==i?void 0:i.loggerProvider}).allObservables,c=a.networkTrackingOptions,l=a.amplitude,d=a.loggerProvider,I=u.networkObservable.filter(function(e){return function(e,t){void 0===t&&(t={});var n,r,i=r4(e.url);if(!i)return!1;var o=i.host;return!(!1!==t.ignoreAmplitudeRequests&&(r2(o,"*.amplitude.com")||r2(o,"amplitude.com"))||(null===(n=t.ignoreHosts)||void 0===n?void 0:n.find(function(e){return r2(o,e)}))||!t.captureRules&&void 0!==e.status&&!r3(e.status,r1)||t.captureRules&&((0,R.ev)([],(0,R.CR)(t.captureRules),!1).reverse().find(function(t){var n,i,s;if(n=e.status,i=e.url,s=e.method,r=t.hosts&&!t.hosts.find(function(e){return r2(o,e)})||i&&t.urls&&!nW(i,t.urls)||s&&t.methods&&!t.methods.find(function(e){return s.toLowerCase()===e.toLowerCase()||"*"===e})?void 0:!n&&0!==n||!!r3(n,t.statusCodeRange||r1)){var a=r5(t.responseHeaders);if(e.responseWrapper&&a){var u=e.responseWrapper.headers(a);u&&(e.responseHeaders=u)}var c=r5(t.requestHeaders);if(e.requestWrapper&&c){var l=e.requestWrapper.headers(c);l&&(e.requestHeaders=l)}if(e.responseWrapper&&t.responseBody&&!r6(t.responseBody)){var d=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,d)}if(e.requestWrapper&&t.requestBody&&!r6(t.requestBody)){var d=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,d)}}return void 0!==r}),!r)||e.requestWrapper&&function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===r0}))return!0}catch(e){}return!1}(o,e.requestWrapper))}(e.event,c)}).subscribe(function(e){var t,n,r,i=e.event,o=r4(i.url);if(o){var s=null===(n=i.responseWrapper)||void 0===n?void 0:n.bodySize,a=null===(r=i.requestWrapper)||void 0===r?void 0:r.bodySize;(function(e,t,n,r){(0,R.mG)(this,void 0,void 0,function(){var i,o,s;return(0,R.Jh)(this,function(a){switch(a.label){case 0:if(!(t.requestBodyJson||t.responseBodyJson))return[3,2];return[4,Promise.all([t.requestBodyJson,t.responseBodyJson])];case 1:if(o=(i=R.CR.apply(void 0,[a.sent(),2]))[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch(e){null==r||r.debug("Failed to stringify response body")}a.label=2;case 2:return null==n||n.track(r0,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"]=a,t["[Amplitude] Response Body Size"]=s,t["[Amplitude] Request Type"]=i.type,t["[Amplitude] Request Headers"]=i.requestHeaders,t["[Amplitude] Response Headers"]=i.responseHeaders,t),i,l,d)}}),null==t||t.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return I.unsubscribe(),[2]})})}}};let r9=-1,r7=e=>{addEventListener("pageshow",t=>{t.persisted&&(r9=t.timeStamp,e(t))},!0)},ie=(e,t,n,r)=>{let i,o;return s=>{var a;t.value>=0&&(s||r)&&((o=t.value-(i??0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=(a=t.value)>n[1]?"poor":a>n[0]?"needs-improvement":"good",e(t))}},it=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},ir=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ii=()=>{let e=ir();return e?.activationStart??0},io=(e,t=-1)=>{let n=ir(),r="navigate";return r9>=0?r="back-forward-cache":n&&(document.prerendering||ii()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},is=new WeakMap;function ia(e,t){return is.get(e)||is.set(e,new t),is.get(e)}class iu{t;i=0;o=[];h(e){if(e.hadRecentInput)return;let t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.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 ic=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},il=e=>{let t=!1;return()=>{t||(e(),t=!0)}},id=-1,ip=new Set,ih=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,iv=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(let e of ip)e();isFinite(id)||(id="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",iv,!0))}},ig=()=>{if(id<0){let e=ii(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;id=t??ih(),addEventListener("visibilitychange",iv,!0),addEventListener("prerenderingchange",iv,!0),r7(()=>{setTimeout(()=>{id=ih()})})}return{get firstHiddenTime(){return id},onHidden(e){ip.add(e)}}},im=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},iy=[1800,3e3],ib=(e,t={})=>{im(()=>{let n=ig(),r,i=io("FCP"),o=ic("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-ii(),0),i.entries.push(t),r(!0)))});o&&(r=ie(e,i,iy,t.reportAllChanges),r7(n=>{r=ie(e,i=io("FCP"),iy,t.reportAllChanges),it(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},iw=[.1,.25],iS=(e,t={})=>{let n=ig();ib(il(()=>{let r,i=io("CLS",0),o=ia(t,iu),s=e=>{for(let t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=ic("layout-shift",s);a&&(r=ie(e,i,iw,t.reportAllChanges),n.onHidden(()=>{s(a.takeRecords()),r(!0)}),r7(()=>{o.i=0,r=ie(e,i=io("CLS",0),iw,t.reportAllChanges),it(()=>r())}),setTimeout(r))}))},iE=0,ik=1/0,ix=0,iT=e=>{for(let t of e)t.interactionId&&(ik=Math.min(ik,t.interactionId),iE=(ix=Math.max(ix,t.interactionId))?(ix-ik)/7+1:0)},iO=()=>r?iE:performance.interactionCount??0,iA=()=>{"interactionCount"in performance||r||(r=ic("event",iT,{type:"event",buffered:!0,durationThreshold:0}))},iC=0;class i_{u=[];l=new Map;m;p;v(){iC=iO(),this.u.length=0,this.l.clear()}L(){let e=Math.min(this.u.length-1,Math.floor((iO()-iC)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;let t=this.u.at(-1),n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort((e,t)=>
1t.P-e.P),this.u.length>10){let e=this.u.splice(10);for(let t of e)this.l.delete(t.id)}this.p?.(n)}}}let iI=e=>{let t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=il(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},iP=[200,500],iR=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;let n=ig();im(()=>{iA();let r,i=io("INP"),o=ia(t,i_),s=e=>{iI(()=>{for(let t of e)o.h(t);let t=o.L();t&&t.P!==i.value&&(i.value=t.P,i.entries=t.entries,r())})},a=ic("event",s,{durationThreshold:t.durationThreshold??40});r=ie(e,i,iP,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),r(!0)}),r7(()=>{o.v(),r=ie(e,i=io("INP"),iP,t.reportAllChanges)}))})};class ij{m;h(e){this.m?.(e)}}let iN=[2500,4e3],iD=(e,t={})=>{im(()=>{let n=ig(),r,i=io("LCP"),o=ia(t,ij),s=e=>{for(let s of(t.reportAllChanges||(e=e.slice(-1)),e))o.h(s),s.startTime<n.firstHiddenTime&&(i.value=Math.max(s.startTime-ii(),0),i.entries=[s],r())},a=ic("largest-contentful-paint",s);if(a){r=ie(e,i,iN,t.reportAllChanges);let n=il(()=>{s(a.takeRecords()),a.disconnect(),r(!0)}),o=e=>{e.isTrusted&&(iI(n),removeEventListener(e.type,o,{capture:!0}))};for(let e of["keydown","click","visibilitychange"])addEventListener(e,o,{capture:!0});r7(n=>{r=ie(e,i=io("LCP"),iN,t.reportAllChanges),it(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})},iL=[800,1800],iM=e=>{document.prerendering?im(()=>iM(e)):"complete"!==document.readyState?addEventListener("load",()=>iM(e),!0):setTimeout(e)},iF=(e,t={})=>{let n=io("TTFB"),r=ie(e,n,iL,t.reportAllChanges);iM(()=>{let i=ir();i&&(n.value=Math.max(i.responseStart-ii(),0),n.entries=[i],r(!0),r7(()=>{(r=ie(e,n=io("TTFB",0),iL,t.reportAllChanges))(!0)}))})};function iU(e){var t,n;return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor((n=(null===(t=e.entries[0])||void 0===t?void 0:t.startTime)||0,performance.timeOrigin+n)),navigationStart:Math.floor(performance.timeOrigin)}}var iG=function(){var e=null,t=J(),n=null==t?void 0:t.document,r=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return(0,R.mG)(void 0,void 0,void 0,function(){var o,s;return(0,R.Jh)(this,function(a){return void 0===n||(o=nK((null==r?void 0:r.href)||"",t.loggerProvider),s={"[Amplitude] Page Domain":(null==r?void 0:r.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":nK((null==r?void 0:r.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":nK(o.split("?")[0],t.loggerProvider)},iD(function(e){s["[Amplitude] LCP"]=iU(e)}),ib(function(e){s["[Amplitude] FCP"]=iU(e)}),iR(function(e){s["[Amplitude] INP"]=iU(e)}),iS(function(e){s["[Amplitude] CLS"]=iU(e)}),iF(function(e){s["[Amplitude] TTFB"]=iU(e)}),e=function(){"hidden"===n.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",s),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},iB=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),["AMP",t,e.substring(0,n)].filter(Boolean).join("_")},iJ=function(){function e(e,t){var n;this.shouldTrackNewCampaign=!1,this.options=(0,R.pi)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:t5((null===(n=t.cookieOptions)||void 0===n?void 0:n.domain)||t.topLevelDomain),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=iB(t.apiKey,"MKTG"),this.webExpStorageKey=iB(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=ej,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,R.mG)(this,void 0,void 0,function(){var e,t;return(0,R.Jh)(this,function(n){switch(n.label){case 0:if(this.options.optOut)return[2];return[4,this.fetchCampaign()];case 1:if(t=R.CR.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||e5(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:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,R.mG)(this,void 0,void 0,function(){var e;return(0,R.Jh)(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 nf().parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r=(t=this.currentCampaign,n=this.options,e1(Object.entries((0,R.pi)((0,R.pi)({},ej),t)).reduce(function(e,t){var r,i=(0,R.CR)(t,2),o=i[0],s=i[1];return(e.setOnce("initial_".concat(o),null!==(r=null!=s?s:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),s)?e.set(o,s):e.unset(o)},new eZ)));return e&&(r.event_id=e),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),iq=new Set([S.IDENTIFY,S.GROUP_IDENTIFY]),iH=function(e){void 0===e&&(e={});var t,n,r,i,o,s,a,u=null!==(t=e.fallbackAttributionEvent)&&void 0!==t&&t,c=J(),l={},d=!1,f=!1,p=function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(e){switch(e.label){case 0:return[4,new nf().parse()];case 1:return l=nd(e.sent()),u&&(null==r||r.log("Tracking attribution fallback event."),null==n||n.track("[Amplitude] Attribution",l)),[2]}})})},h=function(){p()},v=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),d&&h()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(u){switch(u.label){case 0:return n=t,r=e.loggerProvider,d=!0,r.log("Installing event property attribution tracking."),[4,p()];case 1:if(u.sent(),!c)return[2];if(c.addEventListener("popstate",h),!f){if(i=Reflect.get(c.history,"pushState"),o=Reflect.get(c.history,"replaceState"),!i||!o)return[2];s=v(i),c.history.pushState=s,a=v(o),c.history.replaceState=a,f=!0}return[2]}})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return iq.has(e.event_type)||(e.event_properties=(0,R.pi)((0,R.pi)({},l),e.event_properties)),[2,e]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){var e,t;return(0,R.Jh)(this,function(n){return c&&(c.removeEventListener("popstate",h),e=Reflect.get(c.history,"pushState"),t=Reflect.get(c.history,"replaceState"),f&&e===s&&i&&(c.history.pushState=i),f&&t===a&&o&&(c.history.replaceState=o)),d=!1,f=!1,i=void 0,o=void 0,s=void 0,a=void 0,l={},[2]})})}}},i$="AMP_CURRENT_PAGE",iz="AMP_PREVIOUS_PAGE",iV="AMP_URL_INFO";(v=P||(P={})).Direct="direct",v.Internal="internal",v.External="external";var iX=new Set([S.IDENTIFY,S.GROUP_IDENTIFY,S.REVENUE]),iW=function(e){var t=(void 0===e?{}:e).internalDomains,n=void 0===t?[]:t,r=J(),i=void 0,o=!1,s=void 0,a=!1,u=!1,
1c=function(e){var t;try{var n=nK(e,s);t=new URL(n).hostname}catch(e){null==s||s.error("Could not parse URL: ",e)}return t},l=function(e){var t="undefined"!=typeof location&&location.hostname||"",r=e?c(e):void 0;if(!r)return P.Direct;var i=n.some(function(e){return -1!==t.indexOf(e)}),o=n.some(function(e){return -1!==r.indexOf(e)});return t===r||o&&i?P.Internal:P.External},d=function(){return(0,R.mG)(void 0,void 0,void 0,function(){var e,t,n,r,s;return(0,R.Jh)(this,function(a){switch(a.label){case 0:if(!(i&&o))return[3,3];return[4,i.get(iV)];case 1:return e=a.sent(),t=nK("undefined"!=typeof location&&location.href||""),n=(null==e?void 0:e[i$])||"",r=void 0,r=t===n?(null==e?void 0:e[iz])||"":n||document.referrer||"",[4,i.set(iV,((s={})[i$]=t,s[iz]=r,s))];case 2:a.sent(),a.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,R.mG)(void 0,void 0,void 0,function(){var t,n,l,p,h,v,g,m;return(0,R.Jh)(this,function(y){switch(y.label){case 0:if((s=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),u=!0,!r)return[3,7];try{i=new tC(r.sessionStorage)}catch(e){null==s||s.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:if(o=null!==(m=y.sent())&&void 0!==m&&m,!(i&&o))return[3,6];return n=(t="undefined"!=typeof document&&document.referrer||"")?c(t):void 0,l="undefined"!=typeof location&&location.hostname||"",p=nK("undefined"!=typeof location&&location.href||""),[4,i.get(iV)];case 2:if(v=(null==(h=y.sent())?void 0:h[i$])||"",!(n&&n!==l&&v!==p))return[3,4];return[4,i.set(iV,((g={})[i$]=p,g[iz]=t,g))];case 3:return y.sent(),[3,6];case 4:return[4,d()];case 5:y.sent(),y.label=6;case 6:r.addEventListener("popstate",f),a||(r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=(0,R.CR)(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),u&&f()}}),r.history.replaceState=new Proxy(r.history.replaceState,{apply:function(e,t,n){var r=(0,R.CR)(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),u&&f()}}),a=!0),y.label=7;case 7:return[2]}})})},execute:function(e){return(0,R.mG)(void 0,void 0,void 0,function(){var t,n,r;return(0,R.Jh)(this,function(s){switch(s.label){case 0:if(t=nK("undefined"!=typeof location&&location.href||""),!(i&&o))return[3,2];return[4,i.get(iV)];case 1:if(r=(null==(n=s.sent())?void 0:n[iz])||"",iX.has(e.event_type))return[2,e];e.event_properties=(0,R.pi)((0,R.pi)({},e.event_properties||{}),{"[Amplitude] Page Domain":iK(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":iK(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":iK(e,"[Amplitude] Page Path","undefined"!=typeof location&&nK(location.pathname)||""),"[Amplitude] Page Title":iK(e,"[Amplitude] Page Title",nl(nc)),"[Amplitude] Page URL":iK(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":r,"[Amplitude] Previous Page Type":l(r)}),s.label=2;case 2:return[2,e]}})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(e){switch(e.label){case 0:if(r&&(r.removeEventListener("popstate",f),u=!1),!(i&&o))return[3,2];return[4,i.set(iV,{})];case 1:e.sent(),e.label=2;case 2:return[2]}})})}}};function iK(e,t,n){return(e.event_properties||(e.event_properties={}),void 0===e.event_properties[t])?n:e.event_properties[t]}var iY=function(){var e,t,n;function r(t){if(t)try{var n=Function("return "+t)();if("function"==typeof n)return n;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,R.mG)(void 0,void 0,void 0,function(){var o,s;return(0,R.Jh)(this,function(a){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null===(s=i.remoteConfig)||void 0===s?void 0:s.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body?r(e.body||""):r("")}),t=function(){var e;return null===(e=i.remoteConfigClient)||void 0===e?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,R.mG)(void 0,void 0,void 0,function(){var r;return(0,R.Jh)(this,function(i){if(n)try{return[2,null!==(r=n(t))&&void 0!==r?r:null]}catch(t){null==e||e.error("Could not execute custom enrichment function",t)}return[2,t]})})},teardown:function(){return(0,R.mG)(void 0,void 0,void 0,function(){return(0,R.Jh)(this,function(e){return t&&t(),[2]})})}}},iZ="userProperty",iQ="eventProperty",i0=function(e){return e===iZ||e===iQ},i1=function(e){var t=(0,R.ev)([],(0,R.CR)(new Set((Array.isArray(e)?e:[e]).filter(i0))),!1);return t.length>0?t:[iZ]},i2=function(e,t){return i1(e.trackingMethod).includes(t)},i3=function(e){return i2(e,iZ)},i4=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return(0,R.ZT)(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>
12?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),F(this._init((0,R.pi)((0,R.pi)({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i,o,s,a,u,c;return(0,R.mG)(this,void 0,void 0,function(){var l,d,f,p,h,v,g,y,b,w,S,E,k,x,T=this;return(0,R.Jh)(this,function(O){var A,C,_,I,P,j,N,D,L;switch(O.label){case 0:if(this.initializing)return[2];if(this.initializing=!0,l=nn(t),d=null!==(n=t.loggerProvider)&&void 0!==n?n:new G,t.loggerProvider||d.enable(null!==(r=t.logLevel)&&void 0!==r?r:m.Warn),f=null!==(i=t.serverZone)&&void 0!==i?i:"US",h=this._diagnosticsSampleRate,v=null===(o=t.enableDiagnostics)||void 0===o||o,!l)return[3,2];return p=new z(t.apiKey,d,f,null===(s=t.remoteConfig)||void 0===s?void 0:s.serverUrl),[4,new Promise(function(e){null==p||p.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(d.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(h=i);var o=t.enabled;"boolean"==typeof o&&(v=o)}e()})})];case 1:O.sent(),O.label=2;case 2:return(g=new er(t.apiKey,d,f,{enabled:v,sampleRate:h})).setTag("library","".concat(ty,"/").concat(tm)),"undefined"!=typeof navigator&&g.setTag("user_agent",navigator.userAgent),[4,(A=t.apiKey,C=t,_=this,I=g,P={loggerProvider:d,serverZone:f,enableDiagnostics:v,diagnosticsSampleRate:h},void 0===C&&(C={}),(0,R.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,c,l,d,f,p,h,v,g,m,y,b,w,S,E,k,x,T,O,j,N,D,L,M,F,U,G,B,J,q,$,z,V,X,W,K,Y,Z,Q,ee,et,en,er;return(0,R.Jh)(this,function(eo){var es,ea,eu;switch(eo.label){case 0:if(e=C.identityStorage||tQ,t="",!(e===tQ&&!(null===(S=C.cookieOptions)||void 0===S?void 0:S.domain)&&(null===(E=C.cookieOptions)||void 0===E?void 0:E.domain)!==""))return[3,2];return[4,(es=void 0,(0,R.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s;return(0,R.Jh)(this,function(a){switch(a.label){case 0:return[4,new tE(void 0,{diagnosticsClient:I}).isEnabled()];case 1:if(!a.sent()||!es&&("undefined"==typeof location||!location.hostname)||1===(t=(e=null!=es?es:location.hostname).split(".")).length)return[2,""];for(n=[],r=1,t8.find(function(t){return e.endsWith(".".concat(t))})&&(r=2),i=t.length-r-1;i>=0;--i)n.push(t.slice(i).join("."));i=0,a.label=2;case 2:if(!(i<n.length))return[3,7];o=n[i],a.label=3;case 3:return a.trys.push([3,5,,6]),[4,tE.isDomainWritable(o)];case 4:if(a.sent())return[2,"."+o];return[3,6];case 5:return s=a.sent(),I&&I.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(o),error:s instanceof Error?s.message:String(s)}),[3,6];case 6:return i++,[3,2];case 7:return I&&I.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(e)}),[2,""]}})}))];case 1:t=eo.sent(),eo.label=2;case 2:return n=(0,R.pi)({domain:null!==(x=null===(k=C.cookieOptions)||void 0===k?void 0:k.domain)&&void 0!==x?x:t,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},C.cookieOptions),r={duplicateResolverFn:function(e){var t=tT(e);return!!t&&tO(JSON.parse(t).cookieDomain,n.domain)},diagnosticsClient:I},[4,(ea=i=nt(C.identityStorage,n,r),void 0===(eu=null===(O=null===(T=C.cookieOptions)||void 0===T?void 0:T.upgrade)||void 0===O||O)&&(eu=!0),(0,R.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u;return(0,R.Jh)(this,function(c){switch(c.label){case 0:return e="".concat("amp","_").concat(A.substring(0,6)),[4,ea.getRaw(e)];case 1:if(!(t=c.sent()))return[2,{optOut:!1}];if(!eu)return[3,3];return[4,ea.remove(e)];case 2:c.sent(),c.label=3;case 3:return r=(n=(0,R.CR)(t.split("."),6))[0],i=n[1],o=n[2],s=n[3],a=n[4],u=n[5],[2,{deviceId:r,userId:tF(i),sessionId:tM(s),lastEventId:tM(u),lastEventTime:tM(a),optOut:!!o}]}})}))];case 3:return o=eo.sent(),[4,i.get(tA(A))];case 4:return s=eo.sent(),c=!(u=(a=ei()).ampTimestamp?Number(a.ampTimestamp):void 0)||Date.now()<u,l=null!==(M=null!==(L=null!==(D=null!==(j=C.deviceId)&&void 0!==j?j:c?null!==(N=a.ampDeviceId)&&void 0!==N?N:a.deviceId:void 0)&&void 0!==D?D:null==s?void 0:s.deviceId)&&void 0!==L?L:o.deviceId)&&void 0!==M?M:H(),d=null!==(F=null==s?void 0:s.lastEventId)&&void 0!==F?F:o.lastEventId,f=null!==(U=null==s?void 0:s.lastEventTime)&&void 0!==U?U:o.lastEventTime,p=null!==(B=null!==(G=C.optOut)&&void 0!==G?G:null==s?void 0:s.optOut)&&void 0!==B?B:o.optOut,h=null!==(J=null==s?void 0:s.sessionId)&&void 0!==J?J:o.sessionId,v=null==s?void 0:s.deferredSessionId,g=null!==($=null!==(q=C.userId)&&void 0!==q?q:null==s?void 0:s.userId)&&void 0!==$?$:o.userId,_.previousSessionDeviceId=null!==(z=null==s?void 0:s.deviceId)&&void 0!==z?z:
1o.deviceId,_.previousSessionUserId=null!==(V=null==s?void 0:s.userId)&&void 0!==V?V:o.userId,m={ipAddress:null===(W=null===(X=C.trackingOptions)||void 0===X?void 0:X.ipAddress)||void 0===W||W,language:null===(Y=null===(K=C.trackingOptions)||void 0===K?void 0:K.language)||void 0===Y||Y,platform:null===(Q=null===(Z=C.trackingOptions)||void 0===Z?void 0:Z.platform)||void 0===Q||Q},y=null==s?void 0:s.pageCounter,b=null==s?void 0:s.debugLogsEnabled,void 0!==C.autocapture&&(C.defaultTracking=C.autocapture),[4,(w=new ne(A,C.appVersion,i,n,C.defaultTracking,C.autocapture,l,C.flushIntervalMillis,C.flushMaxRetries,C.flushQueueSize,e,C.ingestionMetadata,C.instanceName,d,f,null!==(ee=null==P?void 0:P.loggerProvider)&&void 0!==ee?ee:C.loggerProvider,C.logLevel,C.minIdLength,C.offline,p,C.partnerId,C.plan,C.serverUrl,null!==(et=null==P?void 0:P.serverZone)&&void 0!==et?et:C.serverZone,h,v,C.sessionTimeout,C.storageProvider,m,C.transport,C.useBatch,C.fetchRemoteConfig,g,y,b,C.networkTrackingOptions,C.identify,null!==(en=null==P?void 0:P.enableDiagnostics)&&void 0!==en?en:C.enableDiagnostics,null!==(er=null==P?void 0:P.diagnosticsSampleRate)&&void 0!==er?er:_._diagnosticsSampleRate,I,C.remoteConfig,t,C.enableRequestBodyCompression,C.customEnrichment)).storageProvider.isEnabled()];case 5:return eo.sent()||(w.loggerProvider.warn("Storage provider ".concat(w.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),w.storageProvider=new tw),[2,w]}})}))];case 3:if(y=O.sent(),!(l&&p))return[3,5];return[4,new Promise(function(e){null==p||p.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){y.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&function(e,t){if(e){!function e(t){if(!("object"!=typeof t||null===t||Array.isArray(t))){var n,r,i,o,s,a,u,c,l,d,f,p,h=Object.keys(t);try{for(var v=(0,R.XA)(h),g=v.next();!g.done;g=v.next()){var m=g.value;try{var y=t[m];"boolean"==typeof(null==y?void 0:y.enabled)&&(y.enabled?(delete y.enabled,0===Object.keys(y).length&&(t[m]=!0)):t[m]=!1),e(y)}catch(e){}}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}try{if(null===(l=null===(c=null===(u=t.autocapture)||void 0===u?void 0:u.networkTracking)||void 0===c?void 0:c.captureRules)||void 0===l?void 0:l.length)try{for(var b=(0,R.XA)(t.autocapture.networkTracking.captureRules),w=b.next();!w.done;w=b.next()){var S=w.value;try{for(var E=(s=void 0,(0,R.XA)(["responseHeaders","requestHeaders"])),k=E.next();!k.done;k=E.next()){var x=k.value,T=null!==(d=S[x])&&void 0!==d?d:{},O=T.captureSafeHeaders,A=T.allowlist;if(O||A){if(void 0!==A&&!Array.isArray(A)){delete S[x];continue}S[x]=(0,R.ev)((0,R.ev)([],(0,R.CR)(O?eN:[]),!1),(0,R.CR)(null!=A?A:[]),!1)}}}catch(e){s={error:e}}finally{try{k&&!k.done&&(a=E.return)&&a.call(E)}finally{if(s)throw s.error}}}}catch(e){i={error:e}}
1finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}}catch(e){}var C=null===(f=t.autocapture)||void 0===f?void 0:f.frustrationInteractions;C&&(C.rageClick&&(C.rageClicks=C.rageClick,delete C.rageClick),C.deadClick&&(C.deadClicks=C.deadClick,delete C.deadClick));try{var _=null===(p=t.autocapture)||void 0===p?void 0:p.elementInteractions;if(_&&"object"==typeof _&&(!0===_.viewportContentUpdated&&(_.viewportContentUpdated={}),!1===_.viewportContentUpdated&&(_.viewportContentUpdated={enabled:!1}),void 0!==_.exposureDuration)){var I=_.viewportContentUpdated;void 0===I?_.viewportContentUpdated={exposureDuration:_.exposureDuration}:"object"==typeof I&&void 0===I.exposureDuration&&!1!==I.enabled&&(I.exposureDuration=_.exposureDuration),delete _.exposureDuration}}catch(e){}}}(e);try{var n,r,i,o,s,a,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 c=(0,R.pi)({},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?void 0:i.length)){c.elementInteractions=(0,R.pi)({},e.autocapture.elementInteractions);var l=c.elementInteractions,d=null!==(o=l.pageUrlAllowlist)&&void 0!==o?o:[],f=e.autocapture.elementInteractions.pageUrlAllowlistRegex;l.pageUrlAllowlist=nT(d,f,t),delete l.pageUrlAllowlistRegex}if("object"==typeof e.autocapture.networkTracking&&null!==e.autocapture.networkTracking&&(null===(s=e.autocapture.networkTracking.captureRules)||void 0===s?void 0:s.length)){c.networkTracking=(0,R.pi)({},e.autocapture.networkTracking);var p=c.networkTracking,h=null!==(a=p.captureRules)&&void 0!==a?a:[];try{for(var v=(0,R.XA)(h),g=v.next();!g.done;g=v.next()){var m=g.value;m.urls=nT(null!==(u=m.urls)&&void 0!==u?u:[],m.urlsRegex,t),delete m.urlsRegex}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=(0,R.pi)({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},c)),"object"==typeof t.autocapture&&(t.autocapture=(0,R.pi)((0,R.pi)({},t.autocapture),c))}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,y),e()})})];case 4:O.sent(),O.label=5;case 5:return[4,e.prototype._init.call(this,y)];case 6:if(O.sent(),this.logBrowserOptions(y),this.config.remoteConfigClient=p,b=tt((j=this.config).defaultTracking)&&j.defaultTracking&&"object"==typeof j.defaultTracking&&j.defaultTracking.attribution&&"object"==typeof j.defaultTracking.attribution?(0,R.pi)({},j.defaultTracking.attribution):{},!(tt(this.config.defaultTracking)&&i3(b)))return[3,8];return this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,R.mG)(T,void 0,void 0,function(){return(0,R.Jh)(this,function(t){switch(t.label){case 0:if(e)return[3,2];return this.webAttribution=new iJ(b,this.config),[4,this.webAttribution.init()];case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new iJ(b,this.config),[4,this.webAttribution.init()];case 7:O.sent(),O.label=8;case 8:if(E=!(!(S=(w=ei()).ampTimestamp?Number(w.ampTimestamp):void 0)||Date.now()<S)||Number.isNaN(Number(w.ampSessionId))?void 0:Number(w.ampSessionId),-1!==(k=this.config.deferredSessionId)||this.config.optOut||(k=Date.now()),this.setSessionId(null!==(c=null!==(u=null!==(a=t.sessionId)&&void 0!==a?a:E)&&void 0!==u?u:k)&&void 0!==c?c:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return(0,R.mG)(T,void 0,void 0,function(){return(0,R.Jh)(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(x=eL(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),!(null!==this.config.offline))return[3,10];return[4,this.add(nx()).promise];case 9:O.sent(),O.label=10;case 10:return[4,this.add(new eX({diagnosticsClient:g})).promise];case 11:return O.sent(),[4,this.add(new tb).promise];case 12:return O.sent(),[4,this.add(new eW).promise];case 13:if(O.sent(),nk(this.config),!te(this.config.defaultTracking,"fileDownloads"))return[3,15];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(nS()).promise];case 14:O.sent(),O.label=15;case 15:if(!tn(this.config.defaultTracking))return[3,17];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(ny()).promise];case 16:O.sent(),O.label=17;case 17:if(!tr(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(n
1h(tf(this.config))).promise];case 18:return O.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return(0,R.mG)(T,void 0,void 0,function(){return(0,R.Jh)(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(nh(tf(this.config))).promise];case 1:return t.sent(),[2]}})})}),O.label=20;case 20:if(!(tt(this.config.defaultTracking)&&i2(b,iQ)))return[3,22];return this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(iH(b)).promise];case 21:O.sent(),O.label=22;case 22:if(!ts(this.config.autocapture))return[3,24];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(rk(tc(this.config),{diagnosticsClient:g})).promise];case 23:O.sent(),O.label=24;case 24:if(!ta(this.config.autocapture))return[3,26];return this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(rL(tl(this.config))).promise];case 25:O.sent(),O.label=26;case 26:if(!to(this.config.autocapture))return[3,28];return this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(r8(td(this.config))).promise];case 27:O.sent(),O.label=28;case 28:if(!("boolean"==typeof(N=this.config.autocapture)?N:"object"==typeof N&&!0===N.webVitals))return[3,30];return this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(iG()).promise];case 29:O.sent(),O.label=30;case 30:if(!("object"==typeof(D=this.config.autocapture)&&(!0===D.performanceTracking||"object"==typeof D.performanceTracking)))return[3,32];return this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(rF(tu(this.config))).promise];case 31:O.sent(),O.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(iW()).promise];case 33:O.sent(),O.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(iY()).promise];case 35:O.sent(),O.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return O.sent(),x.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=(0,R._T)(t,["time"]),i="number"==typeof n?{time:n}:void 0;T.track(e.eventType,r,i)}),[2]}})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){if(!this.config){this.q.push(this.setUserId.bind(this,e));return}this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),eM(e,this.config.instanceName))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){if(!this.config){this.q.push(this.setDeviceId.bind(this,e));return}this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),eF(e,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(H()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?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,n,r,i=new eZ,o=null!==(r=e.userProperties)&&void 0!==r?r:{};try{for(var s=(0,R.XA)(Object.entries(o)),a=s.next();!a.done;a=s.next()){var u=(0,R.CR)(a.value,2),c=u[0],l=u[1];i.set(c,l)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),F(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,F(Promise.resolve());
1if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return F(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,ti(this.config.defaultTracking)&&(r&&i&&n.push(this.track(tH,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++o,n);return this.config.identify&&n.push(this.track(e1(this.config.identify)).promise),ti(this.config.defaultTracking)&&n.push(this.track(tq,void 0,{event_id:s?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,F(Promise.all(n))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config){this.q.push(this.setTransport.bind(this,e));return}this.config.transportProvider=nr(e)},t.prototype.identify=function(t,n){if(tv(t)){var r=t._q;t._q=[],t=th(new eZ,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(tv(r)){var o=r._q;r._q=[],r=th(new eZ,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(tv(t)){var r=t._q;t._q=[],t=th(new e4,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!i3(this.webAttribution.options))return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,R.mG)(this,void 0,void 0,function(){var n,r,i;return(0,R.Jh)(this,function(o){return n=Date.now(),r=e5(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===tq||t.event_type===tH||t.session_id&&t.session_id!==this.getSessionId()||(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,R.pi)((0,R.pi)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",e8(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}(e7),i5={init:M((g=new i4).init.bind(g),"init",N(g),L(g,["config"])),add:M(g.add.bind(g),"add",N(g),L(g,["config.apiKey","timeline.plugins"])),remove:M(g.remove.bind(g),"remove",N(g),L(g,["config.apiKey","timeline.plugins"])),track:M(g.track.bind(g),"track",N(g),L(g,["config.apiKey","timeline.queue.length"])),logEvent:M(g.logEvent.bind(g),"logEvent",N(g),L(g,["config.apiKey","timeline.queue.length"])),identify:M(g.identify.bind(g),"identify",N(g),L(g,["config.apiKey","timeline.queue.length"])),groupIdentify:M(g.groupIdentify.bind(g),"groupIdentify",N(g),L(g,["config.apiKey","timeline.queue.length"])),setGroup:M(g.setGroup.bind(g),"setGroup",N(g),L(g,["config.apiKey","timeline.queue.length"])),revenue:M(g.revenue.bind(g),"revenue",N(g),L(g,["config.apiKey","timeline.queue.length"])),flush:M(g.flush.bind(g),"flush",N(g),L(g,["config.apiKey","timeline.queue.length"])),getUserId:M(g.getUserId.bind(g),"getUserId",N(g),L(g,["config","config.userId"])),setUserId:M(g.setUserId.bind(g),"setUserId",N(g),L(g,["config","config.userId"])),getDeviceId:M(g.getDeviceId.bind(g),"getDeviceId",N(g),L(g,["config","config.deviceId"])),setDeviceId:M(g.setDeviceId.bind(g),"setDeviceId",N(g),L(g,["config","config.deviceId"])),reset:M(g.reset.bind(g),"reset",N(g),L(g,["config","config.userId","config.deviceId"])),getSessionId:M(g.getSessionId.bind(g),"getSessionId",N(g),L(g,["config"])),setSessionId:M(g.setSessionId.bind(g),"setSessionId",N(g),L(g,["config"])),extendSession:M(g.extendSession.bind(g),"extendSession",N(g),L(g,["config"])),setOptOut:M(g.setOptOut.bind(g),"setOptOut",N(g),L(g,["config"])),setTransport:M(g.setTransport.bind(g),"setTransport",N(g),L(g,["config"])),getIdentity:M(g.getIdentity.bind(g),"getIdentity",N(g),L(g,["config"])),setIdentity:M(g.setIdentity.bind(g),"setIdentity",N(g),L(g,["config","config.userId","config.deviceId"])),getOptOut:M(g.getOptOut.bind(g),"getOptOut",N(g),L(g,["config"])),_setDiagnosticsSampleRate:
1M(g._setDiagnosticsSampleRate.bind(g),"_setDiagnosticsSampleRate",N(g),L(g,["config"]))};i5.add,i5.extendSession,i5.flush,i5.getDeviceId,i5.getIdentity,i5.getOptOut,i5.getSessionId,i5.getUserId,i5.groupIdentify,i5.identify;var i6=i5.init,i8=(i5.logEvent,i5.remove,i5.reset,i5.revenue,i5.setDeviceId,i5.setGroup,i5.setIdentity,i5.setOptOut,i5.setSessionId,i5.setTransport,i5.setUserId,i5.track);i5._setDiagnosticsSampleRate},8581:function(e,t,n){"use strict";var r=n(21623);Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcastChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nextauth.message";return{receive:function(t){var n=function(n){if(n.key===e){var r,i=JSON.parse(null!==(r=n.newValue)&&void 0!==r?r:"{}");(null==i?void 0:i.event)==="session"&&null!=i&&i.data&&t(i)}};return window.addEventListener("storage",n),function(){return window.removeEventListener("storage",n)}},post:function(t){if("undefined"!=typeof window)try{localStorage.setItem(e,JSON.stringify(u(u({},t),{},{timestamp:d()})))}catch(e){}}}},t.apiBaseUrl=l,t.fetchData=function(e,t,n){return c.apply(this,arguments)},t.now=d;var i=r(n(96108)),o=r(n(70820)),s=r(n(35203));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){(0,o.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(){return(c=(0,s.default)(i.default.mark(function e(t,n,r){var o,s,a,c,d,f,p,h,v,g=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=(o=g.length>3&&void 0!==g[3]?g[3]:{}).ctx,c=void 0===(a=o.req)?null==s?void 0:s.req:a,d="".concat(l(n),"/").concat(t),e.prev=2,p={headers:u({"Content-Type":"application/json"},null!=c&&null!==(f=c.headers)&&void 0!==f&&f.cookie?{cookie:c.headers.cookie}:{})},null!=c&&c.body&&(p.body=JSON.stringify(c.body),p.method="POST"),e.next=7,fetch(d,p);case 7:return h=e.sent,e.next=10,h.json();case 10:if(v=e.sent,h.ok){e.next=13;break}throw v;case 13:return e.abrupt("return",Object.keys(v).length>0?v:null);case 16:return e.prev=16,e.t0=e.catch(2),r.error("CLIENT_FETCH_ERROR",{error:e.t0,url:d}),e.abrupt("return",null);case 20:case"end":return e.stop()}},e,null,[[2,16]])}))).apply(this,arguments)}function l(e){return"undefined"==typeof window?"".concat(e.baseUrlServer).concat(e.basePathServer):e.basePath}function d(){return Math.floor(Date.now()/1e3)}},97453:function(e,t,n){"use strict";var r=n(21623);Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedStrategy=t.UnknownError=t.OAuthCallbackError=t.MissingSecret=t.MissingAuthorize=t.MissingAdapterMethods=t.MissingAdapter=t.MissingAPIRoute=t.InvalidCallbackUrl=t.AccountNotLinkedError=void 0,t.adapterErrorHandler=function(e,t){if(e)return Object.keys(e).reduce(function(n,r){return n[r]=(0,o.default)(i.default.mark(function n(){var o,s,a,u,c,l=arguments;return i.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:for(n.prev=0,s=Array(o=l.length),a=0;a<o;a++)s[a]=l[a];return t.debug("adapter_".concat(r),{args:s}),u=e[r],n.next=6,u.apply(void 0,s);case 6:return n.abrupt("return",n.sent);case 9:throw n.prev=9,n.t0=n.catch(0),t.error("adapter_error_".concat(r),n.t0),(c=new v(n.t0)).name="".concat(m(r),"Error"),c;case 15:case"end":return n.stop()}},n,null,[[0,9]])})),n},{})},t.capitalize=m,t.eventsErrorHandler=function(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=(0,o.default)(i.default.mark(function n(){var o,s=arguments;return i.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,o=e[r],n.next=4,o.apply(void 0,s);case 4:return n.abrupt("return",n.sent);case 7:n.prev=7,n.t0=n.catch(0),t.error("".concat(g(r),"_EVENT_ERROR"),n.t0);case 10:case"end":return n.stop()}},n,null,[[0,7]])})),n},{})},t.upperSnake=g;
1var i=r(n(96108)),o=r(n(35203)),s=r(n(70820)),a=r(n(98022)),u=r(n(29001)),c=r(n(99143)),l=r(n(48298)),d=r(n(10368)),f=r(n(93620));function p(e,t,n){return t=(0,l.default)(t),(0,c.default)(e,h()?Reflect.construct(t,n||[],(0,l.default)(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var v=t.UnknownError=function(e){function t(e){var n,r;return(0,a.default)(this,t),(r=p(this,t,[null!==(n=null==e?void 0:e.message)&&void 0!==n?n:e])).name="UnknownError",r.code=e.code,e instanceof Error&&(r.stack=e.stack),r}return(0,d.default)(t,e),(0,u.default)(t,[{key:"toJSON",value:function(){return{name:this.name,message:this.message,stack:this.stack}}}])}((0,f.default)(Error));function g(e){return e.replace(/([A-Z])/g,"_$1").toUpperCase()}function m(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}t.OAuthCallbackError=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","OAuthCallbackError"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.AccountNotLinkedError=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","AccountNotLinkedError"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.MissingAPIRoute=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","MissingAPIRouteError"),(0,s.default)(e,"code","MISSING_NEXTAUTH_API_ROUTE_ERROR"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.MissingSecret=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","MissingSecretError"),(0,s.default)(e,"code","NO_SECRET"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.MissingAuthorize=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","MissingAuthorizeError"),(0,s.default)(e,"code","CALLBACK_CREDENTIALS_HANDLER_ERROR"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.MissingAdapter=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","MissingAdapterError"),(0,s.default)(e,"code","EMAIL_REQUIRES_ADAPTER_ERROR"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.MissingAdapterMethods=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","MissingAdapterMethodsError"),(0,s.default)(e,"code","MISSING_ADAPTER_METHODS_ERROR"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.UnsupportedStrategy=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","UnsupportedStrategyError"),(0,s.default)(e,"code","CALLBACK_CREDENTIALS_JWT_ERROR"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v),t.InvalidCallbackUrl=function(e){function t(){var e;(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e=p(this,t,[].concat(r)),(0,s.default)(e,"name","InvalidCallbackUrl"),(0,s.default)(e,"code","INVALID_CALLBACK_URL_ERROR"),e}return(0,d.default)(t,e),(0,u.default)(t)}(v)},81739:function(e,t,n){"use strict";var r,i,o,s,a,u=n(14224),c=n(21623),l=n(57208);Object.defineProperty(t,"__esModule",{value:!0});var d={SessionContext:!0,useSession:!0,getSession:!0,getCsrfToken:!0,getProviders:!0,signIn:!0,signOut:!0,SessionProvider:!0};t.SessionContext=void 0,t.SessionProvider=function(e){if(!_)throw Error("React Context is unavailable in Server Components");var t,n,r,i,o,s,a=e.children,u=e.basePath,c=e.refetchInterval,l=e.refetchWhenOffline;u&&(O.basePath=u);var d=void 0!==e.session;O._lastSync=d?(0,b.now)():0;var p=g.useState(function(){return d&&(O._session=e.session),e.session}),m=(0,v.default)(p,2),y=m[0],S=m[1],E=g.useState(!d),k=(0,v.default)(E,2),x=k[0],T=k[1];g.useEffect(function(){return O._getSession=(0,h.default)(f.default.mark(function e(){var t,n,r=arguments;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(r.length>0&&void 0!==r[0]?r[0]:{}).event,e.prev=1,!((n="storage"===t)||void 0===O._session)){e.next=10;break}return O._lastSync=(0,b.now)(),e.next=7,I({broadcast:!n});case 7:return O._session=e.sent,S(O._session),e.abrupt("return");case 10:if(!(!t||null===O._session||(0,b.now)()<O._lastSync)){e.next=12;break}return e.abrupt("return");case 12:return O._lastSync=(0,b.now)(),e.next=15,I();case 15:O._session=e.sent,S(O._session),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),C.error("CLIENT_SESSION_ERROR",e.t0);case 22:return e.prev=22,T(!1),e.finish(22);case 25:case"end":return e.stop()}},e,null,[[1,19,22,25]])}
1)),O._getSession(),function(){O._lastSync=0,O._session=void 0,O._getSession=function(){}}},[]),g.useEffect(function(){var e=A.receive(function(){return O._getSession({event:"storage"})});return function(){return e()}},[]),g.useEffect(function(){var t=e.refetchOnWindowFocus,n=void 0===t||t,r=function(){n&&"visible"===document.visibilityState&&O._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",r,!1),function(){return document.removeEventListener("visibilitychange",r,!1)}},[e.refetchOnWindowFocus]);var P=(t=g.useState("undefined"!=typeof navigator&&navigator.onLine),r=(n=(0,v.default)(t,2))[0],i=n[1],o=function(){return i(!0)},s=function(){return i(!1)},g.useEffect(function(){return window.addEventListener("online",o),window.addEventListener("offline",s),function(){window.removeEventListener("online",o),window.removeEventListener("offline",s)}},[]),r),j=!1!==l||P;g.useEffect(function(){if(c&&j){var e=setInterval(function(){O._session&&O._getSession({event:"poll"})},1e3*c);return function(){return clearInterval(e)}}},[c,j]);var N=g.useMemo(function(){return{data:y,status:x?"loading":y?"authenticated":"unauthenticated",update:function(e){return(0,h.default)(f.default.mark(function t(){var n;return f.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(x||!y)){t.next=2;break}return t.abrupt("return");case 2:return T(!0),t.t0=b.fetchData,t.t1=O,t.t2=C,t.next=8,R();case 8:return t.t3=t.sent,t.t4=e,t.t5={csrfToken:t.t3,data:t.t4},t.t6={body:t.t5},t.t7={req:t.t6},t.next=15,(0,t.t0)("session",t.t1,t.t2,t.t7);case 15:return n=t.sent,T(!1),n&&(S(n),A.post({event:"session",data:{trigger:"getSession"}})),t.abrupt("return",n);case 19:case"end":return t.stop()}},t)}))()}}},[y,x]);return(0,w.jsx)(_.Provider,{value:N,children:a})},t.getCsrfToken=R,t.getProviders=N,t.getSession=I,t.signIn=function(e,t,n){return L.apply(this,arguments)},t.signOut=function(e){return M.apply(this,arguments)},t.useSession=function(e){if(!_)throw Error("React Context is unavailable in Server Components");var t=g.useContext(_),n=null!=e?e:{},r=n.required,i=n.onUnauthenticated,o=r&&"unauthenticated"===t.status;return(g.useEffect(function(){if(o){var e="/api/auth/signin?".concat(new URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href}));i?i():window.location.href=e}},[o,i]),o)?{data:t.data,update:t.update,status:"loading"}:t};var f=c(n(96108)),p=c(n(70820)),h=c(n(35203)),v=c(n(60314)),g=k(n(50959)),m=k(n(69513)),y=c(n(42116)),b=n(8581),w=n(11527),S=n(95951);function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=l(e)&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){(0,p.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}Object.keys(S).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(d,e))&&(e in t&&t[e]===S[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return S[e]}}))});var O={baseUrl:(0,y.default)(null!==(r=u.env.NEXTAUTH_URL)&&void 0!==r?r:u.env.VERCEL_URL).origin,basePath:(0,y.default)(u.env.NEXTAUTH_URL).path,baseUrlServer:(0,y.default)(null!==(i=null!==(o=u.env.NEXTAUTH_URL_INTERNAL)&&void 0!==o?o:u.env.NEXTAUTH_URL)&&void 0!==i?i:u.env.VERCEL_URL).origin,basePathServer:(0,y.default)(null!==(s=u.env.NEXTAUTH_URL_INTERNAL)&&void 0!==s?s:u.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:function(){}},A=(0,b.BroadcastChannel)(),C=(0,m.proxyLogger)(m.default,O.basePath),_=t.SessionContext=null===(a=g.createContext)||void 0===a?void 0:a.call(g,void 0);function I(e){return P.apply(this,arguments)}function P(){return(P=(0,h.default)(f.default.mark(function e(t){var n,r;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.fetchData)("session",O,C,t);case 2:return r=e.sent,(null===(n=null==t?void 0:t.broadcast)||void 0===n||n)&&A.post({event:"session",data:{trigger:"getSession"}}),e.abrupt("return",r);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function R(e){return j.apply(this,arguments)}function j(){return(j=(0,h.default)(f.default.mark(function e(t){var n;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.fetchData)("csrf",O,C,t);case 2:return n=e.sent,e.abrupt("return",null==n?void 0:n.csrfToken);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function N(){return D.apply(this,arguments)}function D(){return(D=(0,h.default)(f.default.mark(function e(){return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.fetchData)("providers",O,C);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function L(){return(L=(0,h.default)(f.default.mark(function e(t,n,r){var i,o,s,a,u,c,l,d,p,h,v,g,m,y,w,S,E;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=void 0===(o=(i=null!=n?n:{}).callbackUrl)?window.location.href:o,u=void 0===(a=i.redirect)||a,c=(0,b.apiBaseUrl)(O),e.next=4,N();case 4:if(l=e.sent){e.next=8;break}return window.location.href="".concat(c,"/error"),e.abrupt("return");
1case 8:if(!(!t||!(t in l))){e.next=11;break}return window.location.href="".concat(c,"/signin?").concat(new URLSearchParams({callbackUrl:s})),e.abrupt("return");case 11:return d="credentials"===l[t].type,p="email"===l[t].type,h=d||p,v="".concat(c,"/").concat(d?"callback":"signin","/").concat(t),g="".concat(v).concat(r?"?".concat(new URLSearchParams(r)):""),e.t0=fetch,e.t1=g,e.t2={"Content-Type":"application/x-www-form-urlencoded"},e.t3=URLSearchParams,e.t4=T,e.t5=T({},n),e.t6={},e.next=25,R();case 25:return e.t7=e.sent,e.t8=s,e.t9={csrfToken:e.t7,callbackUrl:e.t8,json:!0},e.t10=(0,e.t4)(e.t5,e.t6,e.t9),e.t11=new e.t3(e.t10),e.t12={method:"post",headers:e.t2,body:e.t11},e.next=33,(0,e.t0)(e.t1,e.t12);case 33:return m=e.sent,e.next=36,m.json();case 36:if(y=e.sent,!(u||!h)){e.next=42;break}return S=null!==(w=y.url)&&void 0!==w?w:s,window.location.href=S,S.includes("#")&&window.location.reload(),e.abrupt("return");case 42:if(E=new URL(y.url).searchParams.get("error"),!m.ok){e.next=46;break}return e.next=46,O._getSession({event:"storage"});case 46:return e.abrupt("return",{error:E,status:m.status,ok:m.ok,url:E?null:y.url});case 47:case"end":return e.stop()}},e)}))).apply(this,arguments)}function M(){return(M=(0,h.default)(f.default.mark(function e(t){var n,r,i,o,s,a,u,c,l;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=void 0===(r=(null!=t?t:{}).callbackUrl)?window.location.href:r,o=(0,b.apiBaseUrl)(O),e.t0={"Content-Type":"application/x-www-form-urlencoded"},e.t1=URLSearchParams,e.next=6,R();case 6:return e.t2=e.sent,e.t3=i,e.t4={csrfToken:e.t2,callbackUrl:e.t3,json:!0},e.t5=new e.t1(e.t4),s={method:"post",headers:e.t0,body:e.t5},e.next=13,fetch("".concat(o,"/signout"),s);case 13:return a=e.sent,e.next=16,a.json();case 16:if(u=e.sent,A.post({event:"session",data:{trigger:"signout"}}),!(null===(n=null==t?void 0:t.redirect)||void 0===n||n)){e.next=23;break}return l=null!==(c=u.url)&&void 0!==c?c:i,window.location.href=l,l.includes("#")&&window.location.reload(),e.abrupt("return");case 23:return e.next=25,O._getSession({event:"storage"});case 25:return e.abrupt("return",u);case 26:case"end":return e.stop()}},e)}))).apply(this,arguments)}},95951:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69513:function(e,t,n){"use strict";var r=n(21623);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.proxyLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0;try{if("undefined"==typeof window)return e;var n={},r=function(e){var r;n[e]=(r=(0,s.default)(i.default.mark(function n(r,s){var a,d;return i.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l[e](r,s),"error"===e&&(s=c(s)),s.client=!0,a="".concat(t,"/_log"),d=new URLSearchParams(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){(0,o.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({level:e,code:r},s)),!navigator.sendBeacon){n.next=8;break}return n.abrupt("return",navigator.sendBeacon(a,d));case 8:return n.next=10,fetch(a,{method:"POST",body:d,keepalive:!0});case 10:return n.abrupt("return",n.sent);case 11:case"end":return n.stop()}},n)})),function(e,t){return r.apply(this,arguments)})};for(var a in e)r(a);return n}catch(e){return l}},t.setLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t||(l.debug=function(){}),e.error&&(l.error=e.error),e.warn&&(l.warn=e.warn),e.debug&&(l.debug=e.debug)};var i=r(n(96108)),o=r(n(70820)),s=r(n(35203)),a=n(97453);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){var t;return e instanceof Error&&!(e instanceof a.UnknownError)?{message:e.message,stack:e.stack,name:e.name}:(null!=e&&e.error&&(e.error=c(e.error),e.message=null!==(t=e.message)&&void 0!==t?t:e.error.message),e)}var l={error:function(e,t){t=c(t),console.error("[next-auth][error][".concat(e,"]"),"\nhttps://next-auth.js.org/errors#".concat(e.toLowerCase()),t.message,t)},warn:function(e){console.warn("[next-auth][warn][".concat(e,"]"),"\nhttps://next-auth.js.org/warnings#".concat(e.toLowerCase()))},debug:function(e,t){console.log("[next-auth][debug][".concat(e,"]"),t)}};t.default=l},42116:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;let n=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let r=new URL(null!==(t=e)&&void 0!==t?t:n),i=("/"===r.pathname?n.pathname:r.pathname).replace(/\/$/,""),o=`${r.origin}${i}`;return{origin:r.origin,host:r.host,path:i,base:o,toString:()=>o}}},81919:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return g}});var r=n(7695),i=n(88263),o=n(50959),s=n(81739),a=n(18877),u=n.n(a),c=n(83086),l=n(82548),d=n(40012),f=n(92426);n(34749);var p=n(11527),h=["session"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){var t=e.Component,n=e.pageProps,a=n.session,g=(0,i.Z)(n,h);return(0,o.useEffect)(function(){(0,f.Z)()},[]),(0,p.jsx)(s.SessionProvider,{session:a,children:(0,p.jsx)(c.LC,{shouldForwardProp:d.x9,children:(0,p.jsxs)(c.f6,{theme:l.rS,children:[(0,p.jsx)(l.ZL,{}),(0,p.jsx)(u(),{src:"https://www.workable.com/assets/embed.js",type:"text/javascript"}),(0,p.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},g))]})})})}},92426:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(45424),i=n(50183).QC,o=!1;function s(){o||((0,r.S1)(i,{flushIntervalMillis:3e3}),o=!0)}},50183:function(e,t,n){"use strict";n.d(t,{QC:function(){return o},QQ:function(){return i},gr:function(){return r}});var r=3006,i=3007,o="8c4b5e7a5ab386b4a694f7646738d3e2"},66149:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});var r={xs:480,sm:768,md:1024,lg:1200,xl:1280,xxl:1680}},79835:function(e,t,n){"use strict";n.d(t,{O:function(){return o}});var r=n(7695);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({primary:{brown:{white:"#FFFFFF",paper:"#E9DFC4",sand:"#D5BB72",gold:"#B8932E",butter:"#8A6A0F"},blue:{foam:"#C0CFD8",cloud:"#82AAC4",sea:"#3C7FAA",azure:"#15567E",indigo:"#04314E"},purple:{jasmine:"#A1A0A7",lavender:"#747184",royal:"#423776",raisin:"#2E2B3B",wine:"#1D1B22"}},secondary:{pink:"#ED9BAF",red:"#E15678",maroon:"#9D1B3B",mustard:"#FFE566",yellow:"#D6B300",mud:"#7A6600",lime:"#74E79B",green:"#20B653",mint:"#188B3F"},tier:{light:{untiered:"#9C9C9C",tierI:"#AF9155",tierII:"#4EA64E",tierIII:"#4DA3A3",tierIV:"#B67FD2",tierV:"#C58B16",tierVI:"#ED5959",tierVII:"linear-gradient(#C080E7-#E0755D)",tierVIII:"linear-gradient(#4DA3A3-#B67FD2)",tierIX:"linear-gradient(#4EA64E-#4DA3A3)",tierX:"linear-gradient(EF6C6C-#4DA3A3)"},dark:{untiered:"#616161",tierI:"#725F36",tierII:"#346F34",tierIII:"#336C6C",tierIV:"#8B3EB1",tierV:"#815A0E",tierVI:"#931010",tierVII:"linear-gradient(#AD2020-#A32EDD)",tierVIII:"linear-gradient(#336C6C-#8B3EB1)",tierIX:"linear-gradient(#346F34-#336C6C)",tierX:"linear-gradient(#C11515-#336C6C)"}},tier5:{light:{untiered:"#D4CDAF",tierI:"#8E8C85",tierII:"#78966E",tierIII:"#6C969D",tierIV:"#9885AD",tierV:"#A88938",tierVI:"#CF6E84"},dark:{untiered:"#413A64",tierI:"#636974",tierII:"#527069",tierIII:"#546D7D",tierIV:"#666699",tierV:"#7E672A",tierVI:"#99334C"}},rarity5:{light:{basic:"#8C8C8C",common:"#AE997A",uncommon:"#BB7B6D",rare:"#808DA3",epic:"#C37F18",legendary:"#1998B8",mythic:"#8482DE"},dark:{basic:"#636363",common:"#857051",uncommon:"#925A44",rare:"#606A85",epic:"#915E12",legendary:"#13738B",mythic:"#5C5AD3"}},gradients:{primary:{blueToPurple:"linear-gradient(#114464, #8F3985)"},secondary:{pinkToMaroon:"linear-gradient(#8F1D38,#ED7793)",mustardToMud:"linear-gradient(#A38800, #FFE45C)",limeToMint:"linear-gradient(#00802B, #53E785"}}},{accent:"#EAFF68",border:"#629F9F",borderWeak:"#EFEFEF",shadow:"#385f55",success:"#FFFFFF",successInverted:"#2BC991",
1warning:"#B4B227",error:"#FF6D6D",background:"#191E24",menuBackground:"#191E24",backgroundGradient1:"#237F88",backgroundGradient2:"#4F9993",backgroundGradientButton:"#3E8A8A",backgroundInverted:"#232e3a",backgroundInvertedDeep:"#2b3734",text:"#b6b6b6",textWeak:"#8C9B97",textStrong:"#333333",textInverted:"#E2FFF7",textInvertedWeak:"#7A9D95",textInvertedStrong:"#FFFFFF",textInvertedPrimary:"#61C8A3",textLink:"#D5BB72",navLink:"#15567E",navLinkDarkBg:"#ffffff",wave1:"#2BC991",wave2:"#00E3FF",wave3:"#04FF00",phase0:"#FF88D8",phase1:"#3B83F0",phase2:"#2CC58F",phase3:"#E3D057",phase4:"#DB4545",legend1:"#C16EA6",legend2:"#3B83F0",legend3:"#E3D057",legend4:"#47CBA4",legend5:"#EAA13A",legend6:"#DB4545",white:"#ffffff",paper:"#e9dfc4",raisin:"#2e2b3b",azure:"#15567E",azureBorderLight:"rgba(21, 86, 126, 0.2)",paperBorderLight:"rgba(233, 223, 196, 0.2)",wine:"#1d1b22",wineTransparent:"rgba(29, 27, 34, 0.8)",sand:"#D5BB72",gold:"#B8932E",royal:"#4B485B",danger:"#DC3545"})},82548:function(e,t,n){"use strict";n.d(t,{ZL:function(){return u},aE:function(){return l},B2:function(){return d},a7:function(){return f},rS:function(){return p}});var r=n(43024),i=Array(16).fill(0).reduce(function(e,t,n){return e[n]="".concat(4*n/16,"rem"),e},{}),o=n(66149),s=n(79835),a=n(83086),u=(0,a.vJ)(['@font-face{font-family:"Jaapokki Regular";src:url(/fonts/Jaapokki-Regular.otf);}body{background-color:',';margin:0;font-family:"Lexend",system-ui,-apple-system,sans-serif;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.4;color:',";text-align:center;font-size:18px;}"],function(e){return e.theme.colors.wine},function(e){return e.theme.colors.text}),c=n(42885),l=Object.entries(o.A).reduce(function(e,t){var n=(0,c.Z)(t,2),r=n[0],i=n[1];return e[r]=function(){return(0,a.iv)(["@media (min-width:","px){","}"],i,a.iv.apply(void 0,arguments))},e},{}),d=Object.entries(o.A).reduce(function(e,t){var n=(0,c.Z)(t,2),r=n[0],i=n[1];return e[r]=function(){return(0,a.iv)(["@media (max-width:","px){","}"],i,a.iv.apply(void 0,arguments))},e},{}),f=function(e,t){var n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba(".concat(n,", ").concat(r,", ").concat(i,", ").concat(t,")")},p={colors:s.O,typography:r.cp,spacing:i,breakpoints:o.A}},8543:function(e,t,n){"use strict";n.d(t,{CH:function(){return a},Vl:function(){return r},rX:function(){return s},tO:function(){return o},vC:function(){return i}});var r={heading:"'Josefin Sans', serif",body:"'Lexend', san-serif"},i={regular:400,medium:500,semibold:600,bold:700},o={tight:1.2,normal:1.5,relaxed:1.75},s={heading:"0.15em",body:"normal"},a={h1:"4rem",h2:"2.8125rem",h3:"2rem",h4:"1.375rem",h5:"1rem",h6:"1rem",body:"1rem",small:"0.875rem"}},43024:function(e,t,n){"use strict";n.d(t,{Vl:function(){return r.Vl},CH:function(){return r.CH},vC:function(){return r.vC},rX:function(){return r.rX},tO:function(){return r.tO},cp:function(){return s}});var r=n(8543),i=n(83086),o=(0,i.iv)(["font-family:",";font-weight:",";line-height:",";letter-spacing:",";margin:0;padding:0;max-width:100%;word-wrap:break-word;overflow-wrap:break-word;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;"],r.Vl.heading,r.vC.bold,r.tO.tight,r.rX.heading),s={h1:(0,i.iv)(["font-size:",";"," text-transform:uppercase;"],r.CH.h1,o),h2:(0,i.iv)(["font-size:",";"," text-transform:uppercase;"],r.CH.h2,o),h3:(0,i.iv)(["font-size:",";"," text-transform:uppercase;"],r.CH.h3,o),h4:(0,i.iv)(["font-size:",";"," text-transform:uppercase;"],r.CH.h4,o),h5:(0,i.iv)(["font-size:",";"," text-transform:uppercase;"],r.CH.h5,o),h6:(0,i.iv)(["font-size:",";"," letter-spacing:",";"],r.CH.h6,o,r.rX.body),body:(0,i.iv)(["font-family:",";font-size:",";font-weight:",";line-height:",";letter-spacing:",";"],r.Vl.body,r.CH.body,r.vC.regular,r.tO.relaxed,r.rX.body)};r.Vl,r.vC,r.tO,r.CH,r.rX},40012:function(e,t,n){"use strict";n.d(t,{fm:function(){return f},PP:function(){return p},x9:function(){return a}});var r,i,o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInl
1ine|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(r=Object.create(null),function(e){return void 0===r[e]&&(r[e]=o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)),r[e]}),a=function(e,t){return"string"!=typeof t||s(e)},u=n(28506),c=n(59908),l=n.n(c),d=n(81739),f=function(e){return"string"!=typeof e?"":e.charAt(0).toUpperCase()+e.slice(1)},p=(i=(0,u.Z)(l().mark(function e(t,n){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,d.signIn)(t,{callbackUrl:null!=n?n:"/account/settings"});case 3:e.next=8;break;case 5:throw e.prev=5,e.t0=e.catch(0),Error("Failed to login with ".concat(f(t)));case 8:case"end":return e.stop()}},e,null,[[0,5]])})),function(e,t){return i.apply(this,arguments)})},9835:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(81919)}])},34749:function(){},18877:function(e,t,n){e.exports=n(10533)},14224:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:s}
1catch(e){n=s}}();var u=[],c=!1,l=-1;function d(){c&&r&&(c=!1,r.length?u=r.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=u.length;t;){for(r=u,u=[];++l<t;)r&&r[l].run();l=-1,t=u.length}r=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},15637:function(e){var t=Object.prototype.hasOwnProperty;function n(e){var n=[];return function e(r){if(null===r||"object"!=typeof r)return r;if(-1!==n.indexOf(r))return"[Circular]";if(n.push(r),"function"==typeof r.toJSON)try{var i=e(r.toJSON());return n.pop(),i}catch(e){return"[Throws: "+(e?e.message:"?")+"]"}if(Array.isArray(r)){var o=r.map(e);return n.pop(),o}var s=Object.keys(r).reduce(function(n,i){return n[i]=e((t.call(r,i),r[i])),n},{});return n.pop(),s}(e)}e.exports=function(e,t,r){return JSON.stringify(n(e),t,r)},e.exports.ensureProperties=n},83086:function(e,t,n){"use strict";n.d(t,{qH:function(){return tC},LC:function(){return td},f6:function(){return th},vJ:function(){return tT},iv:function(){return tS},ZP:function(){return tk},F4:function(){return tA},zo:function(){return tk},Fg:function(){return tp}});var r,i,o,s=n(50959),a="-ms-",u="-moz-",c="-webkit-",l="comm",d="rule",f="decl",p="@keyframes",h=Math.abs,v=String.fromCharCode,g=Object.assign;function m(e,t){return(e=t.exec(e))?e[0]:e}function y(e,t,n){return e.replace(t,n)}function b(e,t,n){return e.indexOf(t,n)}function w(e,t){return 0|e.charCodeAt(t)}function S(e,t,n){return e.slice(t,n)}function E(e){return e.length}function k(e,t){return t.push(e),e}function x(e,t){return e.filter(function(e){return!m(e,t)})}var T=1,O=1,A=0,C=0,_=0,I="";function P(e,t,n,r,i,o,s,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:T,column:O,length:s,return:"",siblings:a}}function R(e,t){return g(P("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function j(e){for(;e.root;)e=R(e.root,{children:[e]});k(e,e.siblings)}function N(){return _=C<A?w(I,C++):0,O++,10===_&&(O=1,T++),_}function D(){return w(I,C)}function L(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function M(e){var t,n;return(t=C-1,n=function e(t){for(;N();)switch(_){case t:return C;case 34:case 39:34!==t&&39!==t&&e(_);break;case 40:41===t&&e(t);break;case 92:N()}return C}(91===e?e+2:40===e?e+1:e),S(I,t,n)).trim()}function F(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function U(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case f:return e.return=e.return||e.value;case l:return"";case p:return e.return=e.value+"{"+F(e.children,r)+"}";case d:if(!E(e.value=e.props.join(",")))return""}return E(n=F(e.children,r))?e.return=e.value+"{"+n+"}":""}function G(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case f:e.return=function e(t,n,r){var i;switch(i=n,45^w(t,0)?(((i<<2^w(t,0))<<2^w(t,1))<<2^w(t,2))<<2^w(t,3):0){case 5103:return c+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return c+t+t;case 4855:return c+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return u+t+t;
1case 5349:case 4246:case 4810:case 6968:case 2756:return c+t+u+t+a+t+t;case 5936:switch(w(t,n+11)){case 114:return c+t+a+y(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return c+t+a+y(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return c+t+a+y(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return c+t+a+t+t;case 6165:return c+t+a+"flex-"+t+t;case 5187:return c+t+y(t,/(\w+).+(:[^]+)/,c+"box-$1$2"+a+"flex-$1$2")+t;case 5443:return c+t+a+"flex-item-"+y(t,/flex-|-self/g,"")+(m(t,/flex-|baseline/)?"":a+"grid-row-"+y(t,/flex-|-self/g,""))+t;case 4675:return c+t+a+"flex-line-pack"+y(t,/align-content|flex-|-self/g,"")+t;case 5548:return c+t+a+y(t,"shrink","negative")+t;case 5292:return c+t+a+y(t,"basis","preferred-size")+t;case 6060:return c+"box-"+y(t,"-grow","")+c+t+a+y(t,"grow","positive")+t;case 4554:return c+y(t,/([^-])(transform)/g,"$1"+c+"$2")+t;case 6187:return y(y(y(t,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),t,"")+t;case 5495:case 3959:return y(t,/(image-set\([^]*)/,c+"$1$`$1");case 4968:return y(y(t,/(.+:)(flex-)?(.*)/,c+"box-pack:$3"+a+"flex-pack:$3"),/space-between/,"justify")+c+t+t;case 4200:if(!m(t,/flex-|baseline/))return a+"grid-column-align"+S(t,n)+t;break;case 2592:case 3360:return a+y(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,m(e.props,/grid-\w+-end/)}))return~b(t+(r=r[n].value),"span",0)?t:a+y(t,"-start","")+t+a+"grid-row-span:"+(~b(r,"span",0)?m(r,/\d+/):+m(r,/\d+/)-+m(t,/\d+/))+";";return a+y(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return m(e.props,/grid-\w+-start/)})?t:a+y(y(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return y(t,/(.+)-inline(.+)/,c+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(E(t)-1-n>6)switch(w(t,n+1)){case 109:if(45!==w(t,n+4))break;case 102:return y(t,/(.+:)(.+)-([^]+)/,"$1"+c+"$2-$3$1"+u+(108==w(t,n+3)?"$3":"$2-$3"))+t;case 115:return~b(t,"stretch",0)?e(y(t,"stretch","fill-available"),n,r)+t:t}break;case 5152:case 5920:return y(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,n,r,i,o,s,u){return a+n+":"+r+u+(i?a+n+"-span:"+(o?s:+s-+r)+u:"")+t});case 4949:if(121===w(t,n+6))return y(t,":",":"+c)+t;break;case 6444:switch(w(t,45===w(t,14)?18:11)){case 120:return y(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(45===w(t,14)?"inline-":"")+"box$3$1"+c+"$2$3$1"+a+"$2box$3")+t;case 100:return y(t,":",":"+a)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return y(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case p:return F([R(e,{value:y(e.value,"@","@"+c)})],r);case d:if(e.length)return(n=e.props).map(function(t){switch(m(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":j(R(e,{props:[y(t,/:(read-\w+)/,":"+u+"$1")]})),j(R(e,{props:[t]})),g(e,{props:x(n,r)});break;case"::placeholder":j(R(e,{props:[y(t,/:(plac\w+)/,":"+c+"input-$1")]})),j(R(e,{props:[y(t,/:(plac\w+)/,":"+u+"$1")]})),j(R(e,{props:[y(t,/:(plac\w+)/,a+"input-$1")]})),j(R(e,{props:[t]})),g(e,{props:x(n,r)})}return""}).join("")}}function B(e,t,n,r,i,o,s,a,u,c,l,f){for(var p=i-1,v=0===i?o:[""],g=v.length,m=0,b=0,w=0;m<r;++m)for(var E=0,k=S(e,p+1,p=h(b=s[m])),x=e;E<g;++E)(x=(b>0?v[E]+" "+k:y(k,/&\f/g,v[E])).trim())&&(u[w++]=x);return P(e,t,n,0===i?d:a,u,c,l,f)}function J(e,t,n,r,i){return P(e,t,n,f,S(e,0,r),S(e,r+1,-1),r,i)}var q=n(14224);let H=void 0!==q&&void 0!==q.env&&(q.env.REACT_APP_SC_ATTR||q.env.SC_ATTR)||"data-styled",$="active",z="data-styled-version",V="6.4.2",X="/*!sc*/\n",W="undefined"!=typeof window&&"undefined"!=typeof document;function K(e){if(void 0!==q&&void 0!==q.env){let t=q.env[e];if(void 0!==t&&""!==t)return"false"!==t}}let Y=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(i=null!==(r=K("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==r?r:K("SC_DISABLE_SPEEDY"))&&void 0!==i?i:void 0!==q&&void 0!==q.env&&!1),Z="sc-keyframes-",Q={};function ee(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let et=new Map,en=new Map,er=1,ei=e=>{if(et.has(e))return et.get(e);for(;en.has(er);)er++;let t=er++;return et.set(e,t),en.set(t,e),t},eo=e=>en.get(e),es=(e,t)=>{er=t+1,et.set(e,t),en.set(t,e)},ea=Object.freeze([]),eu=Object.freeze({});function ec(e,t,n=eu){return e.theme!==n.theme&&e.theme||t||n.theme}let el=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ed=/(^-|-$)/g;function ef(e){return e.replace(el,"-").replace(ed,"")}
1let ep=/(a)(d)/gi,eh=e=>String.fromCharCode(e+(e>25?39:97));function ev(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=eh(t%52)+n;return(eh(t%52)+n).replace(ep,"$1-$2")}let eg=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},em=e=>eg(5381,e);function ey(e){return ev(em(e)>>>0)}function eb(e){return"string"==typeof e}let ew=Symbol.for("react.memo"),eS=Symbol.for("react.forward_ref"),eE={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},ek={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ex={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eT={[eS]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[ew]:ex};function eO(e){return("type"in e&&e.type.$$typeof)===ew?ex:"$$typeof"in e?eT[e.$$typeof]:eE}let eA=Object.defineProperty,eC=Object.getOwnPropertyNames,e_=Object.getOwnPropertySymbols,eI=Object.getOwnPropertyDescriptor,eP=Object.getPrototypeOf,eR=Object.prototype;function ej(e){return"function"==typeof e}let eN=Symbol.for("react.forward_ref");function eD(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===eN&&"styledComponentId"in e}function eL(e,t){return e&&t?e+" "+t:e||t||""}function eM(e,t){return e.join(t||"")}function eF(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eU(e,t){Object.defineProperty(e,"toString",{value:t})}let eG=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if((r<<=1)<0)throw ee(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){let t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+X;return t}},eB=`style[${H}][${z}="${V}"]`,eJ=RegExp(`^${H}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),eq=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,eH=e=>{if(!e)return document;if(eq(e))return e;if("getRootNode"in e){let t=e.getRootNode();if(eq(t))return t}return document},e$=(e,t,n)=>{let r;let i=n.split(",");for(let n=0,o=i.length;n<o;n++)(r=i[n])&&e.registerName(t,r)},ez=(e,t)=>{var n;let r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(X),i=[];for(let t=0,n=r.length;t<n;t++){let n=r[t].trim();if(!n)continue;let o=n.match(eJ);if(o){let t=0|parseInt(o[1],10),n=o[2];0!==t&&(es(n,t),e$(e,n,o[3]),e.getTag().insertRules(t,i)),i.length=0}else i.push(n)}},eV=e=>{let t=eH(e.options.target).querySelectorAll(eB);for(let n=0,r=t.length;n<r;n++){let r=t[n];r&&r.getAttribute(H)!==$&&(ez(e,r),r.parentNode&&r.parentNode.removeChild(r))}},eX=!1;function eW(){if(!1!==eX)return eX;if("undefined"!=typeof document){let e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return eX=e.nonce||e.getAttribute("content")||void 0;let t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return eX=t.getAttribute("content")||void 0}return eX=n.nc}let eK=(e,t)=>{let n=document.head,r=e||n,i=document.createElement("style"),o=(e=>{let t=Array.from(e.querySelectorAll(`style[${H}]`));return t[t.length-1]})(r),s=void 0!==o?o.nextSibling:null;i.setAttribute(H,$),i.setAttribute(z,V);let a=t||eW();return a&&i.setAttribute("nonce",a),r.insertBefore(i,s),i},eY=class{constructor(e,t){this.element=eK(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;let n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r.ownerNode===e)return r}throw ee(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){let t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}}
1,eZ=class{constructor(e,t){this.element=eK(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){let n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}},eQ=W,e0={isServer:!W,useCSSOMInjection:!Y};class e1{static registerId(e){return ei(e)}constructor(e=eu,t={},n){this.options=Object.assign(Object.assign({},e0),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&W&&eQ&&(eQ=!1,eV(this)),eU(this,()=>(e=>{let t=e.getTag(),{length:n}=t,r="";for(let i=0;i<n;i++){let n=eo(i);if(void 0===n)continue;let o=e.names.get(n);if(void 0===o||!o.size)continue;let s=t.getGroup(i);if(0===s.length)continue;let a=H+".g"+i+'[id="'+n+'"]',u="";for(let e of o)e.length>0&&(u+=e+",");r+=s+a+'{content:"'+u+'"}'+X}return r})(this))}rehydrate(){!this.server&&W&&eV(this)}reconstructWithOptions(e,t=!0){let n=new e1(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&W&&e.target!==this.options.target&&eH(this.options.target)!==eH(e.target)&&eV(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){var e;return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new eY(t,n):new eZ(t,n))(this.options),new eG(e)))}hasNameForId(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r}registerName(e,t){ei(e),e.startsWith(Z)&&this.keyframeIds.add(e);let n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(ei(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(ei(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}let e2=new WeakSet,e3={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function e4(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}let e5=Symbol.for("sc-keyframes");function e6(e){return ej(e)&&!(e.prototype&&e.prototype.isReactComponent)}let e8=e=>null==e||!1===e||""===e,e9=Symbol.for("react.client.reference");function e7(e){return e.$$typeof===e9}function te(e,t,n,r,i=[]){if(e8(e))return i;let o=typeof e;if("string"===o)return i.push(e),i;if("function"===o){if(e7(e))return i;if(e6(e)&&t){let o=e(t);return te(o,t,n,r,i)}return i.push(e),i}if(Array.isArray(e)){for(let o=0;o<e.length;o++)te(e[o],t,n,r,i);return i}return eD(e)?i.push(`.${e.styledComponentId}`):"object"==typeof e&&null!==e&&e5 in e?n?(e.inject(n,r),i.push(e.getName(r))):i.push(e):e7(e)||(eF(e)?e.toString!==Object.prototype.toString?i.push(e.toString()):function e(t,n){for(let r in t){let i=t[r];t.hasOwnProperty(r)&&!e8(i)&&(Array.isArray(i)&&e2.has(i)||ej(i)?n.push(e4(r)+":",i,";"):eF(i)?(n.push(r+" {"),e(i,n),n.push("}")):n.push(e4(r)+": "+(null==i||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in e3||r.startsWith("--")?String(i).trim():i+"px")+";"))}}(e,i):i.push(e.toString())),i}let tt=em(V);class tn{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=eg(tt,t),this.baseStyle=n,e1.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let i="";for(let r=0;r<this.rules.length;r++){let o=this.rules[r];if("string"==typeof o)i+=o;else if(o){if(e6(o)){let r=o(e);"string"==typeof r?i+=r:null!=r&&!1!==r&&(i+=eM(te(r,e,t,n)))}else i+=eM(te(o,e,t,n))}}
1if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);let e=n.hash?n.hash+i:i,o=this.dynamicNameCache.get(e);if(!o){if(o=ev(eg(eg(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){let e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,o)}if(!t.hasNameForId(this.componentId,o)){let e=n(i,"."+o,void 0,this.componentId);t.insertRules(this.componentId,o,e)}r=eL(r,o)}}return r}}let tr=/&/g;function ti(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function to(e){let t=e.length,n="",r=0,i=0,o=0,s=!1,a=!1;for(let u=0;u<t;u++){let c=e.charCodeAt(u);if(0!==o||s||47!==c||42!==e.charCodeAt(u+1)){if(s)42===c&&47===e.charCodeAt(u+1)&&(s=!1,u++);else if(34!==c&&39!==c||ti(e,u)){if(0===o){if(123===c)i++;else if(125===c){if(--i<0){a=!0;let n=u+1;for(;n<t;){let t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,i=0,u=n-1,r=n;continue}0===i&&(n+=e.substring(r,u+1),r=u+1)}else 59===c&&0===i&&(n+=e.substring(r,u+1),r=u+1)}}else 0===o?o=c:o===c&&(o=0)}else s=!0,u++}return a||0!==i||0!==o?(r<t&&0===i&&0===o&&(n+=e.substring(r)),n):e}function ts({options:e=eu,plugins:t=ea}=eu){var n,r,i;let o,s,a;let u=(e,t,n)=>n.startsWith(s)&&n.endsWith(s)&&n.replaceAll(s,"").length>0?`.${o}`:e,c=t.slice();c.push(e=>{e.type===d&&e.value.includes("&")&&(a||(a=RegExp(`\\${s}\\b`,"g")),e.props[0]=e.props[0].replace(tr,s).replace(a,u))}),e.prefix&&c.push(G),c.push(U);let f=[],p=(i=(r=c.concat((n=e=>f.push(e),function(e){!e.root&&(e=e.return)&&n(e)}))).length,function(e,t,n,o){for(var s="",a=0;a<i;a++)s+=r[a](e,t,n,o)||"";return s}),g=(t,n="",r="",i="&")=>{var u,c,d;o=i,s=n,a=void 0;let g=function(e){let t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return to(e);let r=e.length,i="",o=0,s=0,a=0,u=0,c=0,l=!1;for(;s<r;){let t=e.charCodeAt(s);if(34!==t&&39!==t||ti(e,s)){if(0===a){if(47===t&&s+1<r&&42===e.charCodeAt(s+1)){for(s+=2;s+1<r&&(42!==e.charCodeAt(s)||47!==e.charCodeAt(s+1));)s++;s+=2}else if(40!==t){if(41!==t){if(u>0)s++;else if(42===t&&s+1<r&&47===e.charCodeAt(s+1))i+=e.substring(o,s),s+=2,o=s,l=!0;else if(47===t&&s+1<r&&47===e.charCodeAt(s+1)){for(i+=e.substring(o,s);s<r&&10!==e.charCodeAt(s);)s++;o=s,l=!0}else 123===t?c++:125===t&&c--,s++}else u>0&&u--,s++}else u++,s++}else s++}else 0===a?a=t:a===t&&(a=0),s++}return l?(o<r&&(i+=e.substring(o)),0===c?i:to(i)):0===c?e:to(e)}(t),m=(d=function e(t,n,r,i,o,s,a,u,c){for(var d,f=0,p=0,g=a,m=0,x=0,A=0,R=1,j=1,F=1,U=0,G="",q=o,H=s,$=i,z=G;j;)switch(A=U,U=N()){case 40:if(108!=A&&58==w(z,g-1)){-1!=b(z+=y(M(U),"&","&\f"),"&\f",h(f?u[f-1]:0))&&(F=-1);break}case 34:case 39:case 91:z+=M(U);break;case 9:case 10:case 13:case 32:z+=function(e){for(;_=D();)if(_<33)N();else break;return L(e)>2||L(_)>3?"":" "}(A);break;case 92:z+=function(e,t){for(var n;--t&&N()&&!(_<48)&&!(_>102)&&(!(_>57)||!(_<65))&&(!(_>70)||!(_<97)););return n=C+(t<6&&32==D()&&32==N()),S(I,e,n)}(C-1,7);continue;case 47:switch(D()){case 42:case 47:k(P(d=function(e,t){for(;N();)if(e+_===57)break;else if(e+_===84&&47===D())break;return"/*"+S(I,t,C-1)+"*"+v(47===e?e:N())}(N(),C),n,r,l,v(_),S(d,2,-2),0,c),c),(5==L(A||1)||5==L(D()||1))&&E(z)&&" "!==S(z,-1,void 0)&&(z+=" ");break;default:z+="/"}break;case 123*R:u[f++]=E(z)*F;case 125*R:case 59:case 0:switch(U){case 0:case 125:j=0;case 59+p:-1==F&&(z=y(z,/\f/g,"")),x>0&&(E(z)-g||0===R&&47===A)&&k(x>32?J(z+";",i,r,g-1,c):J(y(z," ","")+";",i,r,g-2,c),c);break;case 59:z+=";";default:if(k($=B(z,n,r,f,p,o,u,G,q=[],H=[],g,s),s),123===U){if(0===p)e(z,n,$,$,q,s,g,u,H);else{switch(m){case 99:if(110===w(z,3))break;case 108:if(97===w(z,2))break;default:p=0;case 100:case 109:case 115:}p?e(t,$,$,i&&k(B(t,$,$,0,0,o,u,G,o,q=[],g,H),H),o,H,g,u,i?q:H):e(z,$,$,$,[""],H,0,u,H)}}}f=p=x=0,R=F=1,G=z="",g=a;break;case 58:g=1+E(z),x=A;default:if(R<1){if(123==U)--R;else if(125==U&&0==R++&&125==(_=C>0?w(I,--C):0,O--,10===_&&(O=1,T--),_))continue}switch(z+=v(U),U*R){case 38:F=p>0?1:(z+="\f",-1);break;case 44:u[f++]=(E(z)-1)*F,F=1;break;case 64:45===D()&&(z+=M(N())),m=D(),p=g=E(G=z+=function(e){for(;!L(D());)N();return S(I,e,C)}(C)),U++;break;case 45:45===A&&2==E(z)&&(R=0)}}return s}("",null,null,null,[""],(c=u=r||n?r+" "+n+" { "+g+" }":g,T=O=1,A=E(I=c),C=0,u=[]),0,[0],u),I="",d);return e.namespace&&(m=function e(t,n){let r=n+" ",i=","+r;for(let o=0;o<t.length;o++){let s=t[o];if("rule"===s.type){s.value=(r+s.value).replaceAll(",",i);let e=s.props,t=[];for(let n=0;n<e.length;n++)t[n]=r+e[n];s.props=t}Array.isArray(s.children)&&"@keyframes"!==s.type&&e(s.children,n)}return t}(m,e.namespace)),f=[],F(m,p),f},m=5381;for(let e=0;e<t.length;e++)t[e].name||ee(15),m=eg(m,t[e].name);return(null==e?void 0:e.namespace)&&(m=eg(m,e.namespace)),(null==e?void 0:e.prefix)&&(m=eg(m,"p")),g.hash=5381!==m?m.toString():"",g}let ta=new e1,tu=ts(),tc=s.createContext({shouldForwardProp:void 0,styleSheet:ta,stylis:tu,stylisPlugins:void 0});function tl(){return s.useContext(tc)}function td(e){var t;let n=tl(),{styleSheet:r}=n,i=s.useMemo(()=>{let t=r;return e.sheet?t=e.sheet:e.target?t=t.reconstructWithOptions(void 0!==e.nonce?{target:e.target,nonce:e.nonce}:{target:e.target},!1):void 0!==e.nonce&&(t=t.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,r]),o=s.useMemo(()=>{var t;return void 0===e.stylisPlugins&&void 0===e.namespace&&void 0===e.enableVendorPrefixes?n.stylis:ts({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:null!==(t=e.stylisPlugins)&&void 0!==t?t:n.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins,n.stylis,n.stylisPlugins]),a="shouldForwardProp"in e?e.shouldForwardProp:n.shouldForwardProp,u=null!==(t=e.stylisPlugins)&&void 0!==t?t:n.stylisPlugins,c=s.useMemo(()=>({shouldForwardProp:a,styleSheet:i,stylis:o,stylisPlugins:u}),[a,i,o,u]);return s.createElement(tc.Provider,{value:c},e.children)}tc.Consumer;let tf=s.createContext(void 0);function tp(){let e=s.useContext(tf);if(!e)throw ee(18);return e}function th(e){let t=s.useContext(tf),n=s.useMemo(()=>(function(e,t){if(!e)throw ee(14);if(ej(e)){let n=e(t);return n}if(Array.isArray(e)||"object"!=typeof e)throw ee(8);return t?Object.assign(Object.assign({},t),e):e})(e.theme,t),[e.theme,t]);return e.children?s.createElement(tf.Provider,{value:n},e.children):null}tf.Consumer;let tv=Object.prototype.hasOwnProperty,tg={};function tm(e,t,n){let r=eD(e),i=!eb(e),{attrs:o=ea,componentId:a=function(e,t){let n="string"!=typeof e?"sc":ef(e);tg[n]=(tg[n]||0)+1;let r=n+"-"+ey(V+n+tg[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId),displayName:u=eb(e)?`styled.${e}`:`Styled(${e.displayName||e.name||"Component"})`}=t,c=t.displayName&&t.componentId?ef(t.displayName)+"-"+t.componentId:t.componentId||a,l=r&&e.attrs?e.attrs.concat(o).filter(
1Boolean):o,{shouldForwardProp:d}=t;if(r&&e.shouldForwardProp){let n=e.shouldForwardProp;if(t.shouldForwardProp){let e=t.shouldForwardProp;d=(t,r)=>n(t,r)&&e(t,r)}else d=n}let f=new tn(n,c,r?e.componentStyle:void 0);function p(e,t){return function(e,t,n){let r,i;let{attrs:o,componentStyle:a,defaultProps:u,foldedComponentIds:c,styledComponentId:l,target:d}=e,f=s.useContext(tf),p=tl(),h=e.shouldForwardProp||p.shouldForwardProp,v=ec(t,f,u)||eu;{let e=s.useRef(null),n=e.current;if(null!==n&&n[1]===v&&n[2]===p.styleSheet&&n[3]===p.stylis&&n[7]===a&&function(e,t,n){let r=0;for(let n in t)if(tv.call(t,n)&&(r++,e[n]!==t[n]))return!1;return r===n}(n[0],t,n[4]))r=n[5],i=n[6];else{i=function(e,t,n,r){let i=e.generateAndInjectStyles(t,n,r);return i}(a,r=function(e,t,n){let r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),i=e.length>1;for(let n=0;n<e.length;n++){let o=e[n],s=ej(o)?o(i?Object.assign({},r):r):o;for(let e in s)"className"===e?r.className=eL(r.className,s[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),s[e]):e in t&&void 0===t[e]||(r[e]=s[e])}return"className"in t&&"string"==typeof t.className&&(r.className=eL(r.className,t.className)),r}(o,t,v),p.styleSheet,p.stylis);let n=0;for(let e in t)tv.call(t,e)&&n++;e.current=[t,v,p.styleSheet,p.stylis,n,r,i,a]}}let g=r.as||d,m=function(e,t,n,r){let i={};for(let o in e)void 0===e[o]||"$"===o[0]||"as"===o||"theme"===o&&e.theme===n||("forwardedAs"===o?i.as=e.forwardedAs:r&&!r(o,t)||(i[o]=e[o]));return i}(r,g,v,h),y=eL(c,l);return i&&(y+=" "+i),r.className&&(y+=" "+r.className),m[eb(g)&&g.includes("-")?"class":"className"]=y,n&&(m.ref=n),(0,s.createElement)(g,m)}(h,e,t)}p.displayName=u;let h=s.forwardRef(p);return h.attrs=l,h.componentStyle=f,h.displayName=u,h.shouldForwardProp=d,h.foldedComponentIds=r?eL(e.foldedComponentIds,e.styledComponentId):"",h.styledComponentId=c,h.target=r?e.target:e,Object.defineProperty(h,"defaultProps",{get(){return this._foldedDefaultProps},set(t){this._foldedDefaultProps=r?function(e,...t){for(let n of t)(function e(t,n,r=!1){if(!r&&!eF(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(let r=0;r<n.length;r++)t[r]=e(t[r],n[r]);else if(eF(n))for(let r in n)t[r]=e(t[r],n[r]);return t})(e,n,!0);return e}({},e.defaultProps,t):t}}),eU(h,()=>`.${h.styledComponentId}`),i&&function e(t,n,r){if("string"!=typeof n){let i=eP(n);i&&i!==eR&&e(t,i,r);let o=eC(n).concat(e_(n)),s=eO(t),a=eO(n);for(let e=0;e<o.length;++e){let i=o[e];if(!(i in ek||r&&r[i]||a&&i in a||s&&i in s)){let e=eI(n,i);try{eA(t,i,e)}catch(e){}}}}return t}(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),h}var ty=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function tb(e,t){let n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}let tw=e=>(e2.add(e),e);function tS(e,...t){return ej(e)||eF(e)?tw(te(tb(ea,[e,...t]))):0===t.length&&1===e.length&&"string"==typeof e[0]?te(e):tw(te(tb(e,t)))}let tE=e=>(function e(t,n,r=eu){if(!n)throw ee(1,n);let i=(e,...i)=>t(n,r,tS(e,...i));return i.attrs=i=>e(t,n,Object.assign(Object.assign({}
1,r),{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)})),i.withConfig=i=>e(t,n,Object.assign(Object.assign({},r),i)),i})(tm,e),tk=tE;ty.forEach(e=>{tk[e]=tE(e)});class tx{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(ej(n)&&!eD(n))return!1}return!0}(e),e1.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,r){let i=this.componentId;if(this.isStatic){if(n.hasNameForId(i,i+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{let o=this.computeRules(e,t,n,r);n.insertRules(i,o.name,o.rules)}return}let o=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&o){let t=o.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,r){let i=eM(te(this.rules,t,n,r)),o={name:this.componentId+e,rules:r(i,"")};return this.instanceRules.set(e,o),o}rebuildGroup(e){let t=this.componentId;for(let n of(e.clearRules(t),this.instanceRules.values()))e.insertRules(t,n.name,n.rules)}}function tT(e,...t){let n=tS(e,...t),r=`sc-global-${ey(JSON.stringify(n))}`,i=new tx(n,r),o=e=>{let t;let n=tl(),o=s.useContext(tf);{let e=s.useRef(null);null===e.current&&(e.current=n.styleSheet.allocateGSInstance(r)),t=e.current}n.styleSheet.server&&a(t,e,n.styleSheet,o,n.stylis);{let u=i.isStatic?[t,n.styleSheet,i]:[t,e,n.styleSheet,o,n.stylis,i],c=s.useRef(i);s.useLayoutEffect(()=>{n.styleSheet.server||(c.current!==i&&(n.styleSheet.clearRules(r),c.current=i),a(t,e,n.styleSheet,o,n.stylis))},u),s.useLayoutEffect(()=>()=>{n.styleSheet.server||i.removeStyles(t,n.styleSheet)},[t,n.styleSheet,i])}return n.styleSheet.server&&i.instanceRules.delete(t),null};function a(e,t,n,r,s){if(i.isStatic)i.renderStyles(e,Q,n,s);else{let a=Object.assign(Object.assign({},t),{theme:ec(t,r,o.defaultProps)});i.renderStyles(e,a,n,s)}}return s.memo(o)}class tO{constructor(e,t){this[o]=!0,this.inject=(e,t=tu)=>{let n=this.getName(t);if(!e.hasNameForId(this.id,n)){let r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=Z+e,this.rules=t,ei(this.id),eU(this,()=>{throw ee(12,String(this.name))})}getName(e=tu){return e.hash?this.name+ev(+e.hash>>>0):this.name}}function tA(e,...t){let n=eM(tS(e,...t)),r=ey(n);return new tO(r,n)}o=e5;class tC{constructor({nonce:e}={}){this._emitSheetCSS=()=>{let e=this.instance.toString();if(!e)return"";let t=this.instance.options.nonce||eW();return`<style ${eM([t&&`nonce="${t}"`,`${H}="true"`,`${z}="${V}"`].filter(Boolean)," ")}>${e}</style>`},this.getStyleTags=()=>{if(this.sealed)throw ee(2);return this._emitSheetCSS()}
1,this.getStyleElement=()=>{if(this.sealed)throw ee(2);let e=this.instance.toString();if(!e)return[];let t={[H]:"",[z]:V,dangerouslySetInnerHTML:{__html:e}},n=this.instance.options.nonce||eW();return n&&(t.nonce=n),[s.createElement("style",Object.assign({},t,{key:"sc-0-0"}))]},this.seal=()=>{this.sealed=!0},this.instance=new e1({isServer:!0,nonce:e}),this.sealed=!1}collectStyles(e){if(this.sealed)throw ee(2);return s.createElement(td,{sheet:this.instance},e)}interleaveWithNodeStream(e){throw ee(3)}}},21394:function(e,t,n){e.exports=n(71714).Observable},71714:function(e,t){"use strict";t.Observable=void 0;let n=e=>!!Symbol[e],r=e=>n(e)?Symbol[e]:"@@"+e,i=r("iterator"),o=r("observable"),s=r("species");function a(e,t){let n=e[t];if(null!=n){if("function"!=typeof n)throw TypeError(n+" is not a function");return n}}function u(e){let t=e.constructor;return void 0!==t&&null===(t=t[s])&&(t=void 0),void 0!==t?t:g}function c(e){c.log?c.log(e):setTimeout(()=>{throw e})}function l(e){Promise.resolve().then(()=>{try{e()}catch(e){c(e)}})}function d(e){let t=e._cleanup;if(void 0!==t){if(e._cleanup=void 0,!t)return;try{if("function"==typeof t)t();else{let e=a(t,"unsubscribe");e&&e.call(t)}}catch(e){c(e)}}}function f(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function p(e,t,n){e._state="running";let r=e._observer;try{let i=a(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(f(e),i)i.call(r,n);else throw n;break;case"complete":f(e),i&&i.call(r)}}catch(e){c(e)}"closed"===e._state?d(e):"running"===e._state&&(e._state="ready")}function h(e,t,n){if("closed"!==e._state){if("buffering"===e._state){e._queue.push({type:t,value:n});return}if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:n}],l(()=>(function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let n=0;n<t.length&&(p(e,t[n].type,t[n].value),"closed"!==e._state);++n);}})(e));return}p(e,t,n)}}class v{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,r={get closed(){return"closed"===n._state},next(e){h(n,"next",e)},error(e){h(n,"error",e)},complete(){h(n,"complete")}};try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(f(this),d(this))}}class g{constructor(e){if(!(this instanceof g))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,n)=>{if("function"!=typeof e){n(TypeError(e+" is not a function"));return}function r(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,r)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t})})}map(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return new(u(this))(t=>this.subscribe({next(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return new(u(this))(t=>this.subscribe({next(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw TypeError(e+" is not a function");let t=u(this),n=arguments.length>1,r=!1,i=arguments[1],o=i;return new t(t=>this.subscribe({next(i){let s=!r;if(r=!0,!s||n)try{o=e(o,i)}catch(e){return t.error(e)}else o=i},error(e){t.error(e)},complete(){if(!r&&!n)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=u(this);return new t(n=>{let r;let i=0;return!function o(s){r=s.subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){i===e.length?(r=void 0,n.complete()):o(t.from(e[i++]))}})}(this),()=>{r&&(r.unsubscribe(),r=void 0)}})}flatMap(e){if("function"!=typeof e)throw TypeError(e+" is not a function");let t=u(this);return new t(n=>{let r=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return n.error(e)}let s=t.from(i).subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){let e=r.indexOf(s);e>=0&&r.splice(e,1),o()}});r.push(s)},error(e){n.error(e)},complete(){o()}});function o(){i.closed&&0===r.length&&n.complete()}return()=>
1{r.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[o](){return this}static from(e){let t="function"==typeof this?this:g;if(null==e)throw TypeError(e+" is not an object");let r=a(e,o);if(r){let n=r.call(e);if(Object(n)!==n)throw TypeError(n+" is not an object");return n instanceof g&&n.constructor===t?n:new t(e=>n.subscribe(e))}if(n("iterator")&&(r=a(e,i)))return new t(t=>{l(()=>{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=>{l(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})});throw TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:g)(t=>{l(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})})}static get[s](){return this}}t.Observable=g,Object.defineProperty(g,Symbol("extensions"),{value:{symbol:o,hostReportError:c},configurable:!0})},84076:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},53037:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},90983:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},81741:function(e){e.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},35203:function(e){function t(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}
1e.exports=function(e){return function(){var n=this,r=arguments;return new Promise(function(i,o){var s=e.apply(n,r);function a(e){t(s,i,o,a,u,"next",e)}function u(e){t(s,i,o,a,u,"throw",e)}a(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},98022:function(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},92324:function(e,t,n){var r=n(89763),i=n(25754);e.exports=function(e,t,n){if(r())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var s=new(e.bind.apply(e,o));return n&&i(s,n.prototype),s},e.exports.__esModule=!0,e.exports.default=e.exports},29001:function(e,t,n){var r=n(16086);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},70820:function(e,t,n){var r=n(16086);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},48298:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},10368:function(e,t,n){var r=n(25754);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},21623:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},84239:function(e){e.exports=function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},89763:function(e){function t(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e.exports=t=function(){return!!n},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},28286:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},40203:function(e){e.exports=function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},99143:function(e,t,n){var r=n(57208).default,i=n(81741);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},23747:function(e,t,n){var r=n(34971);function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,n,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function u(e,i,o,s){var a=Object.create((i&&i.prototype instanceof l?i:l).prototype);return r(a,"_invoke",function(e,r,i){var o,s,a,u=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,a=t,f.n=n,c}};function p(e,r){for(s=e,a=r,n=0;!d&&u&&!i&&n<l.length;n++){var i,o=l[n],p=f.p,h=o[2];e>3?(i=h===r)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=e<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=e<3||o[0]>r||r>h)&&(o[4]=e,o[5]=r,f.n=h,s=0))}if(i||e>1)return c;throw d=!0,r}return function(i,l,h){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,a=h;(n=s<2?t:a)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,a)):f.n=a:f.v=a);try{if(u=2,o){if(s||(i="next"),n=o[i]){if(!(n=n.call(o,a)))throw TypeError("iterator result is not an object");
vendor: 6,335 bytes, line 1
1if(!n.done)return n;a=n.value,s<2&&(s=0)}else 1===s&&(n=o.return)&&n.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((n=(d=f.n<0)?a:e.call(r,f))!==c)break}catch(e){o=t,s=1,a=e}finally{u=1}}return{value:n,done:d}}}(e,o,s),!0),a}var c={};function l(){}function d(){}function f(){}n=Object.getPrototypeOf;var p=[][s]?n(n([][s]())):(r(n={},s,function(){return this}),n),h=f.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return d.prototype=f,r(h,"constructor",f),r(f,"constructor",d),d.displayName="GeneratorFunction",r(f,a,"GeneratorFunction"),r(h),r(h,a,"Generator"),r(h,s,function(){return this}),r(h,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:u,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},63977:function(e,t,n){var r=n(66691);e.exports=function(e,t,n,i,o){var s=r(e,t,n,i,o);return s.next().then(function(e){return e.done?e.value:s.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},66691:function(e,t,n){var r=n(23747),i=n(61007);e.exports=function(e,t,n,o,s){return new i(r().w(e,t,n,o),s||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},61007:function(e,t,n){var r=n(84076),i=n(34971);e.exports=function e(t,n){var o;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,i,s){function a(){return new n(function(i,o){(function e(i,o,s,a){try{var u=t[i](o),c=u.value;return c instanceof r?n.resolve(c.v).then(function(t){e("next",t,s,a)},function(t){e("throw",t,s,a)}):n.resolve(c).then(function(e){u.value=e,s(u)},function(t){return e("throw",t,s,a)})}catch(e){a(e)}})(e,s,i,o)})}return o=o?o.then(a,a):a()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},34971:function(e){function t(n,r,i,o){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}e.exports=t=function(e,n,r,i){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?s?s(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2040:function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},79327:function(e,t,n){var r=n(84076),i=n(23747),o=n(63977),s=n(66691),a=n(61007),u=n(2040),c=n(63169);function l(){"use strict";var t=i(),n=t.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function h(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,c(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,i){return t.w(h(e),n,r,i&&i.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:a,async:function(e,t,n,r,i){return(f(t)?s:o)(h(e),t,n,r,i)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},63169:function(e,t,n){var r=n(57208).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},25754:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},60314:function(e,t,n){var r=n(90983),i=n(28286),o=n(88037),s=n(40203);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},499:function(e,t,n){var r=n(57208).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},16086:function(e,t,n){var r=n(57208).default,i=n(499);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},57208:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},88037:function(e,t,n){var r=n(53037);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},93620:function(e,t,n){var r=n(48298),i=n(25754),o=n(84239),s=n(92324);function a(t){var n="function"==typeof Map?new Map:void 0;return e.exports=a=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");
1if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return s(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,a(t)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},96108:function(e,t,n){var r=n(79327)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},59303:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},28506:function(e,t,n){"use strict";function r(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var s=e.apply(t,n);function a(e){r(s,i,o,a,u,"next",e)}function u(e){r(s,i,o,a,u,"throw",e)}a(void 0)})}}n.d(t,{Z:function(){return i}})},7695:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},88263:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}})},42885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(38806);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,t)||(0,r.Z)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},38806:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(59303);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return(0,r.Z)(e,t)}}},15767:function(e,t,n){"use strict";n.d(t,{CR:function(){return l},FC:function(){return p},Jh:function(){return u},KL:function(){return h},XA:function(){return c},ZT:function(){return i},_T:function(){return s},ev:function(){return d},mG:function(){return a},pi:function(){return o},qq:function(){return f}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}
1function a(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function d(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function f(e){return this instanceof f?(this.v=e,this):new f(e)}function p(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof f?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function h(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=c(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(9835),t(24260)}),_N_E=e.O()}]);

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.