-
Notifications
You must be signed in to change notification settings - Fork 0
/
13eafaad-4374d19c292a9707bb89.js
2 lines (2 loc) · 72.6 KB
/
13eafaad-4374d19c292a9707bb89.js
1
2
(self.webpackChunklubycon_home=self.webpackChunklubycon_home||[]).push([[389],{136:function(e,t,n){n(5674),e.exports=function(){"use strict";function e(t){return e="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(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){o(e,t,n[t])}))}return e}function a(e){return u(e)||c(e)||p()}function u(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function c(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var l,d,h,f;function v(){var e;return"object"==typeof process&&void 0!==(null===(e=null===process||void 0===process?void 0:process.versions)||void 0===e?void 0:e.node)}function g(){return"object"==typeof window&&void 0!==(null===window||void 0===window?void 0:window.document)}(function(e){e.IDENTIFY="$identify"})(l||(l={})),function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preinsert",e.POSTINSERT="$postinsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(d||(d={})),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose"}(h||(h={})),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed"}(f||(f={})),function(e){function t(t){return t>=200&&t<300?e.Success:429===t?e.RateLimit:413===t?e.PayloadTooLarge:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}e.fromHttpCode=t}(f||(f={})),f.Skipped;var y={},m=function(){return v()?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:y},_=function(){var e=m();return e.__AMPLITUDE__=e.__AMPLITUDE__||{},e.__AMPLITUDE__},b=function(){var e;if(g()){var t=window,n=Array;if(void 0!==t.Prototype&&void 0!==(null===(e=n.prototype)||void 0===e?void 0:e.toJSON))return delete n.prototype.toJSON,!0}return!1},w=_(),E="Amplitude Logger ",I=function(){function e(){this._logLevel=0}return e.prototype.disable=function(){this._logLevel=0},e.prototype.enable=function(e){void 0===e&&(e=h.Warn),this._logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logLevel<h.Verbose||n.g.console.log(E+"[Log]: "+e.join(" "))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logLevel<h.Warn||n.g.console.warn(E+"[Warn]: "+e.join(" "))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logLevel<h.Error||n.g.console.error(E+"[Error]: "+e.join(" "))},e}(),S=(w.logger||(w.logger=new I),{DEFAULT_INSTANCE:"$default_instance",API_VERSION:2,MAX_STRING_LENGTH:4096,MAX_PROPERTY_KEYS:1e3,IDENTIFY_EVENT:"$identify",GROUP_IDENTIFY_EVENT:"$groupidentify",LAST_EVENT_ID:"amplitude_lastEventId",LAST_EVENT_TIME:"amplitude_lastEventTime",LAST_IDENTIFY_ID:"amplitude_lastIdentifyId",LAST_SEQUENCE_NUMBER:"amplitude_lastSequenceNumber",SESSION_ID:"amplitude_sessionId",DEVICE_ID:"amplitude_deviceId",OPT_OUT:"amplitude_optOut",USER_ID:"amplitude_userId",DEVICE_ID_INDEX:0,USER_ID_INDEX:1,OPT_OUT_INDEX:2,SESSION_ID_INDEX:3,LAST_EVENT_TIME_INDEX:4,EVENT_ID_INDEX:5,IDENTIFY_ID_INDEX:6,SEQUENCE_NUMBER_INDEX:7,COOKIE_TEST_PREFIX:"amp_cookie_test",COOKIE_PREFIX:"amp",STORAGE_DEFAULT:"",STORAGE_COOKIES:"cookies",STORAGE_NONE:"none",STORAGE_LOCAL:"localStorage",STORAGE_SESSION:"sessionStorage",REVENUE_EVENT:"revenue_amount",REVENUE_PRODUCT_ID:"$productId",REVENUE_QUANTITY:"$quantity",REVENUE_PRICE:"$price",REVENUE_REVENUE_TYPE:"$revenueType",AMP_DEVICE_ID_PARAM:"amp_device_id",REFERRER:"referrer",UTM_SOURCE:"utm_source",UTM_MEDIUM:"utm_medium",UTM_CAMPAIGN:"utm_campaign",UTM_TERM:"utm_term",UTM_CONTENT:"utm_content",ATTRIBUTION_EVENT:"[Amplitude] Attribution Captured",TRANSPORT_HTTP:"http",TRANSPORT_BEACON:"beacon"}),O={encode:function(e){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):i>127&&i<2048?(t+=String.fromCharCode(i>>6|192),t+=String.fromCharCode(63&i|128)):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t},decode:function(e){for(var t="",n=0,i=0,r=0,o=0;n<e.length;)(i=e.charCodeAt(n))<128?(t+=String.fromCharCode(i),n++):i>191&&i<224?(r=e.charCodeAt(n+1),t+=String.fromCharCode((31&i)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),o=e.charCodeAt(n+2),t+=String.fromCharCode((15&i)<<12|(63&r)<<6|63&o),n+=3);return t}},T={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){try{if(window.btoa&&window.atob)return window.btoa(unescape(encodeURIComponent(e)))}catch(t){}return T._encode(e)},_encode:function(e){var t,n,i,r,o,s,a,u="",c=0;for(e=O.encode(e);c<e.length;)r=(t=e.charCodeAt(c++))>>2,o=(3&t)<<4|(n=e.charCodeAt(c++))>>4,s=(15&n)<<2|(i=e.charCodeAt(c++))>>6,a=63&i,isNaN(n)?s=a=64:isNaN(i)&&(a=64),u=u+T._keyStr.charAt(r)+T._keyStr.charAt(o)+T._keyStr.charAt(s)+T._keyStr.charAt(a);return u},decode:function(e){try{if(window.btoa&&window.atob)return decodeURIComponent(escape(window.atob(e)))}catch(t){}return T._decode(e)},_decode:function(e){var t,n,i,r,o,s,a="",u=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");u<e.length;)t=T._keyStr.indexOf(e.charAt(u++))<<2|(r=T._keyStr.indexOf(e.charAt(u++)))>>4,n=(15&r)<<4|(o=T._keyStr.indexOf(e.charAt(u++)))>>2,i=(3&o)<<6|(s=T._keyStr.indexOf(e.charAt(u++))),a+=String.fromCharCode(t),64!==o&&(a+=String.fromCharCode(n)),64!==s&&(a+=String.fromCharCode(i));return a=O.decode(a)}},N=Object.prototype.toString;function k(t){switch(N.call(t)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===t?"null":void 0===t?"undefined":t!=t?"nan":t&&1===t.nodeType?"element":"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t)?"buffer":e(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t))}var A,R={DISABLE:0,ERROR:1,WARN:2,INFO:3},C=R.WARN,x={error:function(e){C>=R.ERROR&&P(e)},warn:function(e){C>=R.WARN&&P(e)},info:function(e){C>=R.INFO&&P(e)}},P=function(e){try{console.log("[Amplitude] "+e)}catch(t){}},D=function e(t){if("array"===k(t))for(var n=0;n<t.length;n++)t[n]=e(t[n]);else if("object"===k(t))for(var i in t)i in t&&(t[i]=e(t[i]));else t=U(t);return t},U=function(e){return"string"===k(e)&&e.length>S.MAX_STRING_LENGTH?e.substring(0,S.MAX_STRING_LENGTH):e},j=function(e,t,n){return k(e)===n||(x.error("Invalid "+t+" input type. Expected "+n+" but received "+k(e)),!1)},q=function(e){return!(!j(e,"deviceId","string")||e.includes(".")&&(x.error("Device IDs may not contain '.' characters. Value will be ignored: \"".concat(e,'"')),1))},M=function(e){return!(!j(e,"transport","string")||(e!==S.TRANSPORT_HTTP&&e!==S.TRANSPORT_BEACON?(x.error("transport value must be one of '".concat(S.TRANSPORT_BEACON,"' or '").concat(S.TRANSPORT_HTTP,"'")),1):e!==S.TRANSPORT_HTTP&&!navigator.sendBeacon&&(x.error("browser does not support sendBeacon, so transport must be HTTP"),1)))},L=function(e){var t=k(e);if("object"!==t)return x.error("Error: invalid properties format. Expecting Javascript object, received "+t+", ignoring"),{};if(Object.keys(e).length>S.MAX_PROPERTY_KEYS)return x.error("Error: too many properties (more than 1000), ignoring"),{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=i,o=k(r);"string"!==o&&(r=String(r),x.warn("WARNING: Non-string property key, received type "+o+', coercing to string "'+r+'"'));var s=F(r,e[i]);null!==s&&(n[r]=s)}return n},V=["nan","function","arguments","regexp","element"],F=function e(t,n){var i=k(n);if(-1!==V.indexOf(i))x.warn('WARNING: Property key "'+t+'" with invalid value type '+i+", ignoring"),n=null;else if("undefined"===i)n=null;else if("error"===i)n=String(n),x.warn('WARNING: Property key "'+t+'" with value type error, coercing to '+n);else if("array"===i){for(var r=[],o=0;o<n.length;o++){var s=n[o],a=k(s);"array"!==a?"object"===a?r.push(L(s)):r.push(e(t,s)):x.warn("WARNING: Cannot have "+a+" nested in an array property value, skipping")}n=r}else"object"===i&&(n=L(n));return n},G=function(e){var t=k(e);if("object"!==t)return x.error("Error: invalid groups format. Expecting Javascript object, received "+t+", ignoring"),{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=i,o=k(r);"string"!==o&&(r=String(r),x.warn("WARNING: Non-string groupType, received type "+o+', coercing to string "'+r+'"'));var s=K(r,e[i]);null!==s&&(n[r]=s)}return n},K=function(e,t){var n=k(t);if("string"===n)return t;if("date"===n||"number"===n||"boolean"===n)return t=String(t),x.warn("WARNING: Non-string groupName, received type "+n+', coercing to string "'+t+'"'),t;if("array"===n){for(var i=[],r=0;r<t.length;r++){var o=t[r],s=k(o);"array"!==s&&"object"!==s?"string"===s?i.push(o):"date"!==s&&"number"!==s&&"boolean"!==s||(o=String(o),x.warn("WARNING: Non-string groupName, received type "+s+', coercing to string "'+o+'"'),i.push(o)):x.warn("WARNING: Skipping nested "+s+" in array groupName")}return i}x.warn("WARNING: Non-string groupName, received type "+n+". Please use strings or array of strings for groupName")},z={setLogLevel:function(e){Object.prototype.hasOwnProperty.call(R,e)&&(C=R[e])},getLogLevel:function(){return C},logLevels:R,log:x,isEmptyString:function(e){return!e||0===e.length},getQueryParam:function(e,t){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?void 0:decodeURIComponent(n[1].replace(/\+/g," "))},sessionStorageEnabled:function(){try{if(window.sessionStorage)return!0}catch(e){}return!1},truncate:D,validateGroups:G,validateInput:j,validateProperties:L,validateDeviceId:q,validateTransport:M},B=function(){return window.location},$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",X=function(){for(var e="",t=0;t<22;++t)e+=$.charAt(Math.floor(64*Math.random()));return e},W=function(e){try{for(var t=document.cookie.split(";"),n=null,i=0;i<t.length;i++){for(var r=t[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(e)){n=r.substring(e.length,r.length);break}}return n}catch(o){return null}},Q=function(e,t,n){var i=null!==t?n.expirationDays:-1;if(i){var r=new Date;r.setTime(r.getTime()+24*i*60*60*1e3),i=r}var o=e+"="+t;i&&(o+="; expires="+i.toUTCString()),o+="; path=/",n.domain&&(o+="; domain="+n.domain),n.secure&&(o+="; Secure"),n.sameSite&&(o+="; SameSite="+n.sameSite),document.cookie=o},Y=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t.split(".")[S.LAST_EVENT_TIME_INDEX];return n&&(e=parseInt(n,32)),e||(z.log.warn("unable to parse malformed cookie: ".concat(t)),0)},H=function(e){return a(e).sort((function(e,t){var n=Y(e);return Y(t)-n}))},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=S.COOKIE_TEST_PREFIX+X(),n=!1;try{var i=String(new Date);Q(t,i,e),z.log.info("Testing if cookies available"),n=W(t+"=")===i}catch(r){z.log.warn('Error thrown when checking for cookies. Reason: "'.concat(r,'"'))}finally{z.log.info("Cleaning up cookies availability test"),Q(t,null,e)}return n},Z={set:Q,get:W,getAll:function(e){try{var t=document.cookie.split(";").map((function(e){return e.trimStart()})),n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done);i=!0){for(var u=s.value;" "===u.charAt(0);)u=u.substring(1);0===u.indexOf(e)&&n.push(u.substring(e.length))}}catch(c){r=!0,o=c}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}catch(p){return[]}},getLastEventTime:Y,sortByEventTime:H,areCookiesEnabled:J},ee=function(e){var t=document.createElement("a");return t.href=e,t.hostname||location.hostname},te=function(e){for(var t=ee(e).split("."),n=[],i="_tldtest_"+X(),r=t.length-2;r>=0;--r)n.push(t.slice(r).join("."));for(var o=0;o<n.length;++o){var s=n[o],a={domain:"."+s};if(Z.set(i,1,a),Z.get(i))return Z.set(i,null,a),s}return""},ne={expirationDays:void 0,domain:void 0},ie=function(e){if(0===arguments.length)return ne;e=e||{},ne.expirationDays=e.expirationDays,ne.secure=e.secure,ne.sameSite=e.sameSite;var t=z.isEmptyString(e.domain)?"."+te(B().href):e.domain,n=Math.random();ne.domain=t,se("amplitude_test",n);var i=oe("amplitude_test");return i&&i===n||(t=null),ae("amplitude_test"),ne.domain=t,ne},re=function(e){var t="";return ne.domain&&(t="."===ne.domain.charAt(0)?ne.domain.substring(1):ne.domain),e+t},oe=function(e){var t=re(e)+"=",n=Z.get(t);try{if(n)return JSON.parse(T.decode(n))}catch(i){return null}return null},se=function(e,t){try{return Z.set(re(e),T.encode(JSON.stringify(t)),ne),!0}catch(n){return!1}},ae=function(e){try{return Z.set(re(e),null,ne),!0}catch(t){return!1}},ue={reset:function(){ne={expirationDays:void 0,domain:void 0}},options:ie,get:oe,set:se,remove:ae,setRaw:function(e,t){try{return Z.set(re(e),t,ne),!0}catch(n){return!1}},getRaw:function(e){var t=re(e)+"=";return Z.get(t)}};if(function(){var e,t=new Date;try{return window.localStorage.setItem(t,t),e=window.localStorage.getItem(t)===String(t),window.localStorage.removeItem(t),e}catch(n){}return!1}())A=window.localStorage;else if(window.globalStorage)try{A=window.globalStorage[window.location.hostname]}catch(St){}else if("undefined"!=typeof document){var ce=document.createElement("div"),pe="localStorage";ce.style.display="none",document.getElementsByTagName("head")[0].appendChild(ce),ce.addBehavior&&(ce.addBehavior("#default#userdata"),A={length:0,setItem:function(e,t){ce.load(pe),ce.getAttribute(e)||this.length++,ce.setAttribute(e,t),ce.save(pe)},getItem:function(e){return ce.load(pe),ce.getAttribute(e)},removeItem:function(e){ce.load(pe),ce.getAttribute(e)&&this.length--,ce.removeAttribute(e),ce.save(pe)},clear:function(){ce.load(pe);for(var e,t=0;e=ce.XMLDocument.documentElement.attributes[t++];)ce.removeAttribute(e.name);ce.save(pe),this.length=0},key:function(e){return ce.load(pe),ce.XMLDocument.documentElement.attributes[e]}},ce.load(pe),A.length=ce.XMLDocument.documentElement.attributes.length)}A||(A={length:0,setItem:function(e,t){},getItem:function(e){},removeItem:function(e){},clear:function(){},key:function(e){}});var le,de=A,he=function(){this.storage=null};he.prototype.getStorage=function(){if(null!==this.storage)return this.storage;if(Z.areCookiesEnabled())this.storage=ue;else{var e="amp_cookiestore_";this.storage={_options:{expirationDays:void 0,domain:void 0,secure:!1},reset:function(){this._options={expirationDays:void 0,domain:void 0,secure:!1}},options:function(e){return 0===arguments.length?this._options:(e=e||{},this._options.expirationDays=e.expirationDays||this._options.expirationDays,this._options.domain=e.domain||this._options.domain||window&&window.location&&window.location.hostname,this._options.secure=e.secure||!1)},get:function(t){try{return JSON.parse(de.getItem(e+t))}catch(St){}return null},set:function(t,n){try{return de.setItem(e+t,JSON.stringify(n)),!0}catch(St){}return!1},remove:function(t){try{de.removeItem(e+t)}catch(St){return!1}}}}return this.storage};var fe=(o(le={},S.STORAGE_COOKIES,!0),o(le,S.STORAGE_NONE,!0),o(le,S.STORAGE_LOCAL,!0),o(le,S.STORAGE_SESSION,!0),le),ve=function(){function e(n){var i=n.storageKey,r=n.disableCookies,o=n.domain,s=n.secure,a=n.sameSite,u=n.expirationDays,c=n.storage;t(this,e),this.storageKey=i,this.domain=o,this.secure=s,this.sameSite=a,this.expirationDays=u,this.cookieDomain="";var p=te(B().href);if(this.cookieDomain=o||(p?"."+p:null),fe[c])this.storage=c;else{var l=r||!Z.areCookiesEnabled({domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays});this.storage=l?S.STORAGE_LOCAL:S.STORAGE_COOKIES}}return r(e,[{key:"getCookieStorageKey",value:function(){if(!this.domain)return this.storageKey;var e="."===this.domain.charAt(0)?this.domain.substring(1):this.domain;return"".concat(this.storageKey).concat(e?"_".concat(e):"")}},{key:"save",value:function(e){var t=e.deviceId,n=e.userId,i=e.optOut,r=e.sessionId,o=e.lastEventTime,s=e.eventId,a=e.identifyId,u=e.sequenceNumber;if(this.storage!==S.STORAGE_NONE){var c=[t,T.encode(n||""),i?"1":"",r?r.toString(32):"0",o?o.toString(32):"0",s?s.toString(32):"0",a?a.toString(32):"0",u?u.toString(32):"0"].join(".");switch(this.storage){case S.STORAGE_SESSION:window.sessionStorage&&window.sessionStorage.setItem(this.storageKey,c);break;case S.STORAGE_LOCAL:de.setItem(this.storageKey,c);break;case S.STORAGE_COOKIES:this.saveCookie(c)}}}},{key:"saveCookie",value:function(e){Z.set(this.getCookieStorageKey(),e,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays})}},{key:"load",value:function(){var e,t=this;if(this.storage===S.STORAGE_COOKIES){var n=this.getCookieStorageKey()+"=",i=Z.getAll(n);if(0===i.length||1===i.length)e=i[0];else{var r=Z.sortByEventTime(i)[0];i.forEach((function(){return Z.set(t.getCookieStorageKey(),null,{})})),this.saveCookie(r),e=Z.get(n)}}if(e||(e=de.getItem(this.storageKey)),!e)try{e=window.sessionStorage&&window.sessionStorage.getItem(this.storageKey)}catch(St){z.log.info('window.sessionStorage unavailable. Reason: "'.concat(St,'"'))}if(!e)return null;var o=e.split("."),s=null;if(o[S.USER_ID_INDEX])try{s=T.decode(o[S.USER_ID_INDEX])}catch(St){s=null}return{deviceId:o[S.DEVICE_ID_INDEX],userId:s,optOut:"1"===o[S.OPT_OUT_INDEX],sessionId:parseInt(o[S.SESSION_ID_INDEX],32),lastEventTime:parseInt(o[S.LAST_EVENT_TIME_INDEX],32),eventId:parseInt(o[S.EVENT_ID_INDEX],32),identifyId:parseInt(o[S.IDENTIFY_ID_INDEX],32),sequenceNumber:parseInt(o[S.SEQUENCE_NUMBER_INDEX],32)}}},{key:"clear",value:function(){var e;if(this.storage===S.STORAGE_COOKIES&&(e=Z.get(this.getCookieStorageKey()+"="),Z.set(this.getCookieStorageKey(),null,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:0})),e||(e=de.getItem(this.storageKey),de.clear()),!e)try{e=window.sessionStorage&&window.sessionStorage.getItem(this.storageKey),window.sessionStorage.clear()}catch(St){z.log.info('window.sessionStorage unavailable. Reason: "'.concat(St,'"'))}return!!e}}]),e}(),ge=function(e,t){var n=e?"?"+e.split(".").slice(-1)[0].replace(/\|/g,"&"):"",i=function(e,t,n,i){return z.getQueryParam(e,t)||z.getQueryParam(n,i)},r=i(S.UTM_SOURCE,t,"utmcsr",n),o=i(S.UTM_MEDIUM,t,"utmcmd",n),s=i(S.UTM_CAMPAIGN,t,"utmccn",n),a=i(S.UTM_TERM,t,"utmctr",n),u=i(S.UTM_CONTENT,t,"utmcct",n),c={},p=function(e,t){z.isEmptyString(t)||(c[e]=t)};return p(S.UTM_SOURCE,r),p(S.UTM_MEDIUM,o),p(S.UTM_CAMPAIGN,s),p(S.UTM_TERM,a),p(S.UTM_CONTENT,u),c},ye="$add",me="$append",_e="$clearAll",be="$prepend",we="$set",Ee="$setOnce",Ie="$unset",Se="$preInsert",Oe="$postInsert",Te="$remove",Ne=function(){this.userPropertiesOperations={},this.properties=[]};Ne.prototype.add=function(e,t){return"number"===k(t)||"string"===k(t)?this._addOperation(ye,e,t):z.log.error("Unsupported type for value: "+k(t)+", expecting number or string"),this},Ne.prototype.append=function(e,t){return this._addOperation(me,e,t),this},Ne.prototype.clearAll=function(){return Object.keys(this.userPropertiesOperations).length>0?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,_e)||z.log.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"),this):(this.userPropertiesOperations[_e]="-",this)},Ne.prototype.prepend=function(e,t){return this._addOperation(be,e,t),this},Ne.prototype.set=function(e,t){return this._addOperation(we,e,t),this},Ne.prototype.setOnce=function(e,t){return this._addOperation(Ee,e,t),this},Ne.prototype.unset=function(e){return this._addOperation(Ie,e,"-"),this},Ne.prototype.preInsert=function(e,t){return this._addOperation(Se,e,t),this},Ne.prototype.postInsert=function(e,t){return this._addOperation(Oe,e,t),this},Ne.prototype.remove=function(e,t){return this._addOperation(Te,e,t),this},Ne.prototype._addOperation=function(e,t,n){Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,_e)?z.log.error("This identify already contains a $clearAll operation, skipping operation "+e):-1===this.properties.indexOf(t)?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,e)||(this.userPropertiesOperations[e]={}),this.userPropertiesOperations[e][t]=n,this.properties.push(t)):z.log.error('User property "'+t+'" already used in this identify, skipping operation '+e)};var ke="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function Ae(e,t){return e(t={exports:{}},t.exports),t.exports}var Re=Ae((function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t){return e<<t|e>>>32-t}function r(e,t,r,o,s,a){return n(i(n(n(t,e),n(o,a)),s),r)}function o(e,t,n,i,o,s,a){return r(t&n|~t&i,e,t,o,s,a)}function s(e,t,n,i,o,s,a){return r(t&i|n&~i,e,t,o,s,a)}function a(e,t,n,i,o,s,a){return r(t^n^i,e,t,o,s,a)}function u(e,t,n,i,o,s,a){return r(n^(t|~i),e,t,o,s,a)}function c(e,t){var i,r,c,p,l;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var d=1732584193,h=-271733879,f=-1732584194,v=271733878;for(i=0;i<e.length;i+=16)r=d,c=h,p=f,l=v,d=o(d,h,f,v,e[i],7,-680876936),v=o(v,d,h,f,e[i+1],12,-389564586),f=o(f,v,d,h,e[i+2],17,606105819),h=o(h,f,v,d,e[i+3],22,-1044525330),d=o(d,h,f,v,e[i+4],7,-176418897),v=o(v,d,h,f,e[i+5],12,1200080426),f=o(f,v,d,h,e[i+6],17,-1473231341),h=o(h,f,v,d,e[i+7],22,-45705983),d=o(d,h,f,v,e[i+8],7,1770035416),v=o(v,d,h,f,e[i+9],12,-1958414417),f=o(f,v,d,h,e[i+10],17,-42063),h=o(h,f,v,d,e[i+11],22,-1990404162),d=o(d,h,f,v,e[i+12],7,1804603682),v=o(v,d,h,f,e[i+13],12,-40341101),f=o(f,v,d,h,e[i+14],17,-1502002290),d=s(d,h=o(h,f,v,d,e[i+15],22,1236535329),f,v,e[i+1],5,-165796510),v=s(v,d,h,f,e[i+6],9,-1069501632),f=s(f,v,d,h,e[i+11],14,643717713),h=s(h,f,v,d,e[i],20,-373897302),d=s(d,h,f,v,e[i+5],5,-701558691),v=s(v,d,h,f,e[i+10],9,38016083),f=s(f,v,d,h,e[i+15],14,-660478335),h=s(h,f,v,d,e[i+4],20,-405537848),d=s(d,h,f,v,e[i+9],5,568446438),v=s(v,d,h,f,e[i+14],9,-1019803690),f=s(f,v,d,h,e[i+3],14,-187363961),h=s(h,f,v,d,e[i+8],20,1163531501),d=s(d,h,f,v,e[i+13],5,-1444681467),v=s(v,d,h,f,e[i+2],9,-51403784),f=s(f,v,d,h,e[i+7],14,1735328473),d=a(d,h=s(h,f,v,d,e[i+12],20,-1926607734),f,v,e[i+5],4,-378558),v=a(v,d,h,f,e[i+8],11,-2022574463),f=a(f,v,d,h,e[i+11],16,1839030562),h=a(h,f,v,d,e[i+14],23,-35309556),d=a(d,h,f,v,e[i+1],4,-1530992060),v=a(v,d,h,f,e[i+4],11,1272893353),f=a(f,v,d,h,e[i+7],16,-155497632),h=a(h,f,v,d,e[i+10],23,-1094730640),d=a(d,h,f,v,e[i+13],4,681279174),v=a(v,d,h,f,e[i],11,-358537222),f=a(f,v,d,h,e[i+3],16,-722521979),h=a(h,f,v,d,e[i+6],23,76029189),d=a(d,h,f,v,e[i+9],4,-640364487),v=a(v,d,h,f,e[i+12],11,-421815835),f=a(f,v,d,h,e[i+15],16,530742520),d=u(d,h=a(h,f,v,d,e[i+2],23,-995338651),f,v,e[i],6,-198630844),v=u(v,d,h,f,e[i+7],10,1126891415),f=u(f,v,d,h,e[i+14],15,-1416354905),h=u(h,f,v,d,e[i+5],21,-57434055),d=u(d,h,f,v,e[i+12],6,1700485571),v=u(v,d,h,f,e[i+3],10,-1894986606),f=u(f,v,d,h,e[i+10],15,-1051523),h=u(h,f,v,d,e[i+1],21,-2054922799),d=u(d,h,f,v,e[i+8],6,1873313359),v=u(v,d,h,f,e[i+15],10,-30611744),f=u(f,v,d,h,e[i+6],15,-1560198380),h=u(h,f,v,d,e[i+13],21,1309151649),d=u(d,h,f,v,e[i+4],6,-145523070),v=u(v,d,h,f,e[i+11],10,-1120210379),f=u(f,v,d,h,e[i+2],15,718787259),h=u(h,f,v,d,e[i+9],21,-343485551),d=n(d,r),h=n(h,c),f=n(f,p),v=n(v,l);return[d,h,f,v]}function p(e){var t,n="",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function l(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function d(e){return p(c(l(e),8*e.length))}function h(e,t){var n,i,r=l(e),o=[],s=[];for(o[15]=s[15]=void 0,r.length>16&&(r=c(r,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=c(o.concat(l(t)),512+8*t.length),p(c(s.concat(i),640))}function f(e){var t,n,i="0123456789abcdef",r="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),r+=i.charAt(t>>>4&15)+i.charAt(15&t);return r}function v(e){return unescape(encodeURIComponent(e))}function g(e){return d(v(e))}function y(e){return f(g(e))}function m(e,t){return h(v(e),v(t))}function _(e,t){return f(m(e,t))}function b(e,t,n){return t?n?m(t,e):_(t,e):n?g(e):y(e)}e.exports?e.exports=b:t.md5=b}(ke)})),Ce=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},xe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;function Ue(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function je(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(r){return!1}}var qe=je()?Object.assign:function(e,t){for(var n,i,r=Ue(e),o=1;o<arguments.length;o++){for(var s in n=Object(arguments[o]))Pe.call(n,s)&&(r[s]=n[s]);if(xe){i=xe(n);for(var a=0;a<i.length;a++)De.call(n,i[a])&&(r[i[a]]=n[i[a]])}}return r},Me="%[a-f0-9]{2}",Le=new RegExp(Me,"gi"),Ve=new RegExp("("+Me+")+","gi");function Fe(e,t){try{return decodeURIComponent(e.join(""))}catch(r){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),i=e.slice(t);return Array.prototype.concat.call([],Fe(n),Fe(i))}function Ge(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(Le),n=1;n<t.length;n++)t=(e=Fe(t,n).join("")).match(Le);return e}}function Ke(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=Ve.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(a){var i=Ge(n[0]);i!==n[0]&&(t[n[0]]=i)}n=Ve.exec(e)}t["%C2"]="�";for(var r=Object.keys(t),o=0;o<r.length;o++){var s=r[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}var ze=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return Ke(e)}};function Be(e){switch(e.arrayFormat){case"index":return function(t,n,i){return null===n?[Xe(t,e),"[",i,"]"].join(""):[Xe(t,e),"[",Xe(i,e),"]=",Xe(n,e)].join("")};case"bracket":return function(t,n){return null===n?Xe(t,e):[Xe(t,e),"[]=",Xe(n,e)].join("")};default:return function(t,n){return null===n?Xe(t,e):[Xe(t,e),"=",Xe(n,e)].join("")}}}function $e(e){var t;switch(e.arrayFormat){case"index":return function(e,n,i){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===i[e]&&(i[e]={}),i[e][t[1]]=n):i[e]=n};case"bracket":return function(e,n,i){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==i[e]?i[e]=[].concat(i[e],n):i[e]=[n]:i[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function Xe(e,t){return t.encode?t.strict?Ce(e):encodeURIComponent(e):e}function We(e){return Array.isArray(e)?e.sort():"object"==typeof e?We(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function Qe(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function Ye(e,t){var n=$e(t=qe({arrayFormat:"none"},t)),i=Object.create(null);return"string"!=typeof e?i:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),r=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:ze(o),n(ze(r),o,i)})),Object.keys(i).sort().reduce((function(e,t){var n=i[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=We(n):e[t]=n,e}),Object.create(null))):i}var He={extract:Qe,parse:Ye,stringify:function(e,t){!1===(t=qe({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var n=Be(t);return e?Object.keys(e).sort(t.sort).map((function(i){var r=e[i];if(void 0===r)return"";if(null===r)return Xe(i,t);if(Array.isArray(r)){var o=[];return r.slice().forEach((function(e){void 0!==e&&o.push(n(i,e,o.length))})),o.join("&")}return Xe(i,t)+"="+Xe(r,t)})).filter((function(e){return e.length>0})).join("&"):""},parseUrl:function(e,t){return{url:e.split("?")[0]||"",query:Ye(Qe(e),t)}}},Je=function(e,t,n){this.url=e,this.data=t||{},this.headers=n};function Ze(e,t){for(var n in t)e.setRequestHeader(n,t[n])}Je.prototype.send=function(e){if(window.XDomainRequest){var t=new window.XDomainRequest;t.open("POST",this.url,!0),t.onload=function(){e(200,t.responseText)},t.onerror=function(){"Request Entity Too Large"===t.responseText?e(413,t.responseText):e(500,t.responseText)},t.ontimeout=function(){},t.onprogress=function(){},t.send(He.stringify(this.data))}else{var n=new XMLHttpRequest;n.open("POST",this.url,!0),n.onreadystatechange=function(){4===n.readyState&&e(n.status,n.responseText)},Ze(n,this.headers),n.send(He.stringify(this.data))}};var et=function(){this._price=null,this._productId=null,this._quantity=1,this._revenueType=null,this._properties=null};et.prototype.setProductId=function(e){return"string"!==k(e)?z.log.error("Unsupported type for productId: "+k(e)+", expecting string"):z.isEmptyString(e)?z.log.error("Invalid empty productId"):this._productId=e,this},et.prototype.setQuantity=function(e){return"number"!==k(e)?z.log.error("Unsupported type for quantity: "+k(e)+", expecting number"):this._quantity=parseInt(e),this},et.prototype.setPrice=function(e){return"number"!==k(e)?z.log.error("Unsupported type for price: "+k(e)+", expecting number"):this._price=e,this},et.prototype.setRevenueType=function(e){return"string"!==k(e)?z.log.error("Unsupported type for revenueType: "+k(e)+", expecting string"):this._revenueType=e,this},et.prototype.setEventProperties=function(e){return"object"!==k(e)?z.log.error("Unsupported type for eventProperties: "+k(e)+", expecting object"):this._properties=z.validateProperties(e),this},et.prototype._isValidRevenue=function(){return"number"===k(this._price)||(z.log.error("Invalid revenue, need to set price field"),!1)},et.prototype._toJSONObject=function(){var e="object"===k(this._properties)?this._properties:{};return null!==this._productId&&(e[S.REVENUE_PRODUCT_ID]=this._productId),null!==this._quantity&&(e[S.REVENUE_QUANTITY]=this._quantity),null!==this._price&&(e[S.REVENUE_PRICE]=this._price),null!==this._revenueType&&(e[S.REVENUE_REVENUE_TYPE]=this._revenueType),e};var tt=Ae((function(e,t){!function(n,i){var r="0.7.28",o="",s="?",a="function",u="undefined",c="object",p="string",l="major",d="model",h="name",f="type",v="vendor",g="version",y="architecture",m="console",_="mobile",b="tablet",w="smarttv",E="wearable",I="embedded",S=255,O="Amazon",T="Apple",N="ASUS",k="BlackBerry",A="Browser",R="Chrome",C="Firefox",x="Google",P="Huawei",D="LG",U="Microsoft",j="Motorola",q="Opera",M="Samsung",L="Sony",V="Xiaomi",F="Zebra",G=function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},K=function(e){var t={};for(var n in e)t[e[n].toUpperCase()]=e[n];return t},z=function(e,t){return typeof e===p&&-1!==B(t).indexOf(B(e))},B=function(e){return e.toLowerCase()},$=function(e){return typeof e===p?e.replace(/[^\d\.]/g,o).split(".")[0]:i},X=function(e,t){if(typeof e===p)return e=e.replace(/^\s+|\s+$/g,o),typeof t===u?e:e.substring(0,S)},W=function(e,t){for(var n,r,o,s,u,p,l=0;l<t.length&&!u;){var d=t[l],h=t[l+1];for(n=r=0;n<d.length&&!u;)if(u=d[n++].exec(e))for(o=0;o<h.length;o++)p=u[++r],typeof(s=h[o])===c&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,p):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=p?p.replace(s[1],s[2]):i:this[s[0]]=p?s[1].call(this,p,s[2]):i:4==s.length&&(this[s[0]]=p?s[3].call(this,p.replace(s[1],s[2])):i):this[s]=p||i;l+=2}},Q=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(z(t[n][r],e))return n===s?i:n}else if(z(t[n],e))return n===s?i:n;return e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},H={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,g],[/opios[\/ ]+([\w\.]+)/i],[g,[h,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[g,[h,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[h,g],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[h,"UC"+A]],[/\bqbcore\/([\w\.]+)/i],[g,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[g,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[g,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[h,"IE"]],[/yabrowser\/([\w\.]+)/i],[g,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+A],g],[/\bfocus\/([\w\.]+)/i],[g,[h,C+" Focus"]],[/\bopt\/([\w\.]+)/i],[g,[h,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[g,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[g,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[g,[h,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[g,[h,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[g,[h,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+A]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+A],g],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,g],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,"Facebook"],g],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[h,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[h,R+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,R+" WebView"],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[h,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,g],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[g,[h,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[g,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[g,Q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[h,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[h,C+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,g]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[y,"amd64"]],[/(ia32(?=;))/i],[[y,B]],[/((?:i[346]|x)86)[;\)]/i],[[y,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/windows (ce|mobile); ppc;/i],[[y,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[y,/ower/,o,B]],[/(sun4\w)[;\)]/i],[[y,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[y,B]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[v,M],[f,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[v,M],[f,_]],[/((ipod|iphone)\d+,\d+)/i],[d,[v,T],[f,_]],[/(ipad\d+,\d+)/i],[d,[v,T],[f,b]],[/\((ip(?:hone|od)[\w ]*);/i],[d,[v,T],[f,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[v,T],[f,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[v,P],[f,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[d,[v,P],[f,_]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[v,V],[f,_]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[v,V],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[d,[v,"OPPO"],[f,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[v,"Vivo"],[f,_]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[d,[v,"Realme"],[f,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[v,j],[f,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[v,j],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[v,D],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[v,D],[f,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[v,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[v,"Nokia"],[f,_]],[/(pixel c)\b/i],[d,[v,x],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[v,x],[f,_]],[/droid.+ ([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[v,L],[f,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[v,L],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[v,"OnePlus"],[f,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[v,O],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[v,O],[f,_]],[/(playbook);[-\w\),; ]+(rim)/i],[d,v,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[v,k],[f,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[v,N],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[v,N],[f,_]],[/(nexus 9)/i],[d,[v,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[v,[d,/_/g," "],[f,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[v,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[v,"Meizu"],[f,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[v,"Sharp"],[f,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,d,[f,_]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,d,[f,b]],[/(surface duo)/i],[d,[v,U],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[v,"Fairphone"],[f,_]],[/(u304aa)/i],[d,[v,"AT&T"],[f,_]],[/\bsie-(\w*)/i],[d,[v,"Siemens"],[f,_]],[/\b(rct\w+) b/i],[d,[v,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[v,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[v,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[v,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[d,[v,"NuVision"],[f,b]],[/\b(k88) b/i],[d,[v,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[d,[v,"ZTE"],[f,_]],[/\b(gen\d{3}) b.+49h/i],[d,[v,"Swiss"],[f,_]],[/\b(zur\d{3}) b/i],[d,[v,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[d,[v,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],d,[f,b]],[/\b(ns-?\w{0,9}) b/i],[d,[v,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[v,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],d,[f,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],d,[f,_]],[/\b(ph-1) /i],[d,[v,"Essential"],[f,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[v,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[d,[v,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[d,[v,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[d,[v,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[v,d,[f,_]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[v,U],[f,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[v,F],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[v,F],[f,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,d,[f,m]],[/droid.+; (shield) bui/i],[d,[v,"Nvidia"],[f,m]],[/(playstation [345portablevi]+)/i],[d,[v,L],[f,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[v,U],[f,m]],[/smart-tv.+(samsung)/i],[v,[f,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[v,M],[f,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,D],[f,w]],[/(apple) ?tv/i],[v,[d,T+" TV"],[f,w]],[/crkey/i],[[d,R+"cast"],[v,x],[f,w]],[/droid.+aft(\w)( bui|\))/i],[d,[v,O],[f,w]],[/\(dtv[\);].+(aquos)/i],[d,[v,"Sharp"],[f,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[v,X],[d,X],[f,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,w]],[/((pebble))app/i],[v,d,[f,E]],[/droid.+; (glass) \d/i],[d,[v,x],[f,E]],[/droid.+; (wt63?0{2,3})\)/i],[d,[v,F],[f,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[f,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[d,[f,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[f,_]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[h,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[h,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,g],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[g,Q,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[g,Q,Y]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,"Mac OS"],[g,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[g,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,g],[/\(bb(10);/i],[g,[h,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[h,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[h,"webOS"]],[/crkey\/([\d\.]+)/i],[g,[h,R+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[h,"Chromium OS"],g],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,g],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[h,g]]},J=function e(t,r){if(typeof t===c&&(r=t,t=i),!(this instanceof e))return new e(t,r).getResult();var s=t||(typeof n!==u&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:o),a=r?G(H,r):H;return this.getBrowser=function(){var e={};return e[h]=i,e[g]=i,W.call(e,s,a.browser),e.major=$(e.version),e},this.getCPU=function(){var e={};return e[y]=i,W.call(e,s,a.cpu),e},this.getDevice=function(){var e={};return e[v]=i,e[d]=i,e[f]=i,W.call(e,s,a.device),e},this.getEngine=function(){var e={};return e[h]=i,e[g]=i,W.call(e,s,a.engine),e},this.getOS=function(){var e={};return e[h]=i,e[g]=i,W.call(e,s,a.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return s},this.setUA=function(e){return s=typeof e===p&&e.length>S?X(e,S):e,this},this.setUA(s),this};J.VERSION=r,J.BROWSER=K([h,g,l]),J.CPU=K([y]),J.DEVICE=K([d,v,f,m,_,w,b,E,I]),J.ENGINE=J.OS=K([h,g]),e.exports&&(t=e.exports=J),t.UAParser=J;var Z=typeof n!==u&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var ee=new J;Z.ua=ee.getResult(),Z.ua.get=function(){return ee.getUA()},Z.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:ke)})),nt=(tt.UAParser,function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}),it="8.8.0",rt={apiEndpoint:"api.amplitude.com",batchEvents:!1,cookieExpiration:365,cookieName:"amplitude_id",sameSiteCookie:"Lax",cookieForceUpgrade:!1,deferInitialization:!1,disableCookies:!1,deviceIdFromUrlParam:!1,domain:"",eventUploadPeriodMillis:3e4,eventUploadThreshold:30,forceHttps:!0,includeFbclid:!1,includeGclid:!1,includeReferrer:!1,includeUtm:!1,language:navigator&&(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"",logLevel:"WARN",logAttributionCapturedEvent:!1,optOut:!1,onError:function(){},onExitPage:function(){},plan:{branch:"",source:"",version:""},platform:"Web",savedMaxCount:1e3,saveEvents:!0,saveParamsReferrerOncePerSession:!0,secureCookie:!1,sessionTimeout:18e5,storage:S.STORAGE_DEFAULT,trackingOptions:{city:!0,country:!0,carrier:!0,device_manufacturer:!0,device_model:!0,dma:!0,ip_address:!0,language:!0,os_name:!0,os_version:!0,platform:!0,region:!0,version_name:!0},transport:S.TRANSPORT_HTTP,unsetParamsReferrerOnNewSession:!1,unsentKey:"amplitude_unsent",unsentIdentifyKey:"amplitude_unsent_identify",uploadBatchSize:100,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","Cross-Origin-Resource-Policy":"cross-origin"}},ot=function(e){g()||z.log.warn("amplitude-js will not work in a non-browser environment. If you are planning to add Amplitude to a node environment, please use @amplitude/node"),this._instanceName=z.isEmptyString(e)?S.DEFAULT_INSTANCE:e.toLowerCase(),this._unsentEvents=[],this._unsentIdentifys=[],this._ua=new tt(navigator.userAgent).getResult(),this.options=s({},rt,{trackingOptions:s({},rt.trackingOptions)}),this.cookieStorage=(new he).getStorage(),this._q=[],this._sending=!1,this._updateScheduled=!1,this._onInit=[],this._eventId=0,this._identifyId=0,this._lastEventTime=null,this._newSession=!1,this._sequenceNumber=0,this._sessionId=null,this._isInitialized=!1,this._userAgent=navigator&&navigator.userAgent||null};ot.prototype.Identify=Ne,ot.prototype.Revenue=et,ot.prototype.init=function(e,t,n,i){var r=this;if("string"!==k(e)||z.isEmptyString(e))z.log.error("Invalid apiKey. Please re-initialize with a valid apiKey");else try{at(this.options,n),g()&&void 0!==window.Prototype&&Array.prototype.toJSON&&(b(),z.log.warn("Prototype.js injected Array.prototype.toJSON. Deleting Array.prototype.toJSON to prevent double-stringify")),this.options.cookieName!==rt.cookieName&&z.log.warn("The cookieName option is deprecated. We will be ignoring it for newer cookies"),this.options.apiKey=e,this._storageSuffix="_"+e+(this._instanceName===S.DEFAULT_INSTANCE?"":"_"+this._instanceName),this._storageSuffixV5=e.slice(0,6),this._oldCookiename=this.options.cookieName+this._storageSuffix,this._unsentKey=this.options.unsentKey+this._storageSuffix,this._unsentIdentifyKey=this.options.unsentIdentifyKey+this._storageSuffix,this._cookieName=S.COOKIE_PREFIX+"_"+this._storageSuffixV5,this.cookieStorage.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie}),this._metadataStorage=new ve({storageKey:this._cookieName,disableCookies:this.options.disableCookies,expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie,storage:this.options.storage});var o=!!this.cookieStorage.get(this._oldCookiename),s=!!this._metadataStorage.load();this._useOldCookie=!s&&o&&!this.options.cookieForceUpgrade;var a=s||o;if(this.options.domain=this.cookieStorage.options().domain,this.options.deferInitialization&&!a)return void this._deferInitialization(e,t,n,i);"string"===k(this.options.logLevel)&&z.setLogLevel(this.options.logLevel);var u=gt(this);this._apiPropertiesTrackingOptions=Object.keys(u).length>0?{tracking_options:u}:{},this.options.cookieForceUpgrade&&o&&(s||ct(this),this.cookieStorage.remove(this._oldCookiename)),ut(this),this._pendingReadStorage=!0;var c=function(e){n&&n.deviceId&&!z.validateDeviceId(n.deviceId)&&(z.log.error('Invalid device ID rejected. Randomly generated UUID will be used instead of "'.concat(n.deviceId,'"')),delete n.deviceId),r.options.deviceId=r._getInitialDeviceId(n&&n.deviceId,e),r.options.userId="string"===k(t)&&!z.isEmptyString(t)&&t||"number"===k(t)&&t.toString()||r.options.userId||null;var i=(new Date).getTime();(!r._sessionId||!r._lastEventTime||i-r._lastEventTime>r.options.sessionTimeout)&&(r.options.unsetParamsReferrerOnNewSession&&r._unsetUTMParams(),r._newSession=!0,r._sessionId=i,r.options.saveParamsReferrerOncePerSession&&r._trackParamsAndReferrer()),r.options.saveParamsReferrerOncePerSession||r._trackParamsAndReferrer(),r.options.saveEvents&&(st(r._unsentEvents),st(r._unsentIdentifys)),r._lastEventTime=i,lt(r),r._pendingReadStorage=!1,r._sendEventsIfReady();for(var o=0;o<r._onInit.length;o++)r._onInit[o](r);r._onInit=[],r._isInitialized=!0};this.options.saveEvents&&(this._unsentEvents=this._loadSavedUnsentEvents(this.options.unsentKey).map((function(e){return{event:e}})).concat(this._unsentEvents),this._unsentIdentifys=this._loadSavedUnsentEvents(this.options.unsentIdentifyKey).map((function(e){return{event:e}})).concat(this._unsentIdentifys)),c(),this.runQueuedFunctions(),"function"===k(i)&&i(this);var p=this.options.onExitPage;if("function"===k(p)&&!this.pageHandlersAdded){this.pageHandlersAdded=!0;var l=function(){var e=r.options.transport;r.setTransport(S.TRANSPORT_BEACON),p(),r.setTransport(e)};window.addEventListener("pagehide",(function(){l()}),!1)}}catch(d){z.log.error(d),"function"===k(n.onError)&&n.onError(d)}},ot.prototype.deleteLowerLevelDomainCookies=function(){var e=ee(),t=this.options.domain&&"."===this.options.domain[0]?this.options.domain.slice(1):this.options.domain;if(t&&e!==t&&new RegExp(t+"$").test(e)){for(var n=e.split("."),i=t.split("."),r=n.length;r>i.length;--r){var o=n.slice(n.length-r).join(".");Z.set(this._cookieName,null,{domain:"."+o})}Z.set(this._cookieName,null,{})}},ot.prototype._getInitialDeviceId=function(e,t){if(e)return e;if(this.options.deviceIdFromUrlParam){var n=this._getDeviceIdFromUrlParam(this._getUrlParams());if(n)return n}return this.options.deviceId?this.options.deviceId:t||X()};var st=function(e){for(var t=0;t<e.length;t++){var n=e[t].event.user_properties,i=e[t].event.event_properties,r=e[t].event.groups;e[t].event.user_properties=z.validateProperties(n),e[t].event.event_properties=z.validateProperties(i),e[t].event.groups=z.validateGroups(r)}};ot.prototype._trackParamsAndReferrer=function(){var e,t,n,i;if(this.options.includeUtm&&(e=this._initUtmData()),this.options.includeReferrer&&(t=this._saveReferrer(this._getReferrer())),this.options.includeGclid&&(n=this._saveGclid(this._getUrlParams())),this.options.includeFbclid&&(i=this._saveFbclid(this._getUrlParams())),this.options.logAttributionCapturedEvent){var r=s({},e,t,n,i);Object.keys(r).length>0&&this.logEvent(S.ATTRIBUTION_EVENT,r)}};var at=function e(t,n){if("object"===k(n)){var i=new Set(["headers"]),r=function(i){if(Object.prototype.hasOwnProperty.call(t,i)){var r=n[i],o=k(t[i]);("transport"!==i||z.validateTransport(r))&&z.validateInput(r,i+" option",o)&&("boolean"===o?t[i]=!!r:"string"===o&&!z.isEmptyString(r)||"number"===o&&r>0||"function"===o?t[i]=r:"object"===o&&e(t[i],r))}};for(var o in n)i.has(o)?t[o]=s({},t[o],n[o]):Object.prototype.hasOwnProperty.call(n,o)&&r(o)}};ot.prototype.runQueuedFunctions=function(){var e=this._q;this._q=[];for(var t=0;t<e.length;t++){var n=this[e[t][0]];"function"===k(n)&&n.apply(this,e[t].slice(1))}},ot.prototype._apiKeySet=function(e){return!z.isEmptyString(this.options.apiKey)||(z.log.error("Invalid apiKey. Please set a valid apiKey with init() before calling "+e),!1)},ot.prototype._loadSavedUnsentEvents=function(e){var t=this._getFromStorage(de,e),n=this._parseSavedUnsentEventsString(t,e);return this._setInStorage(de,e,JSON.stringify(n)),n},ot.prototype._parseSavedUnsentEventsString=function(e,t){if(z.isEmptyString(e))return[];if("string"===k(e))try{var n=JSON.parse(e);if("array"===k(n))return n}catch(St){}return z.log.error("Unable to load "+t+" events. Restart with a new empty queue."),[]},ot.prototype.isNewSession=function(){return this._newSession},ot.prototype.onInit=function(e){this._isInitialized?e(this):this._onInit.push(e)},ot.prototype.getSessionId=function(){return this._sessionId},ot.prototype.nextEventId=function(){return this._eventId++,this._eventId},ot.prototype.nextIdentifyId=function(){return this._identifyId++,this._identifyId},ot.prototype.nextSequenceNumber=function(){return this._sequenceNumber++,this._sequenceNumber},ot.prototype._unsentCount=function(){return this._unsentEvents.length+this._unsentIdentifys.length},ot.prototype._sendEventsIfReady=function(){return 0!==this._unsentCount()&&(this.options.batchEvents?this._unsentCount()>=this.options.eventUploadThreshold||this.options.transport===S.TRANSPORT_BEACON?(this.sendEvents(),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout(function(){this._updateScheduled=!1,this.sendEvents()}.bind(this),this.options.eventUploadPeriodMillis)),!1):(this.sendEvents(),!0))},ot.prototype.clearStorage=function(){return this._metadataStorage.clear()},ot.prototype._getFromStorage=function(e,t){return e.getItem(t+this._storageSuffix)},ot.prototype._setInStorage=function(e,t,n){e.setItem(t+this._storageSuffix,n)};var ut=function(e){if(e._useOldCookie){var t=e.cookieStorage.get(e._oldCookiename);"object"!==k(t)||pt(e,t)}else{var n=e._metadataStorage.load();"object"===k(n)&&pt(e,n)}},ct=function(e){var t=e.cookieStorage.get(e._oldCookiename);"object"===k(t)&&(pt(e,t),lt(e))},pt=function(e,t){t.deviceId&&(e.options.deviceId=t.deviceId),t.userId&&(e.options.userId=t.userId),null!==t.optOut&&void 0!==t.optOut&&!1!==t.optOut&&(e.options.optOut=t.optOut),t.sessionId&&(e._sessionId=parseInt(t.sessionId,10)),t.lastEventTime&&(e._lastEventTime=parseInt(t.lastEventTime,10)),t.eventId&&(e._eventId=parseInt(t.eventId,10)),t.identifyId&&(e._identifyId=parseInt(t.identifyId,10)),t.sequenceNumber&&(e._sequenceNumber=parseInt(t.sequenceNumber,10))},lt=function(e){var t={deviceId:e.options.deviceId,userId:e.options.userId,optOut:e.options.optOut,sessionId:e._sessionId,lastEventTime:e._lastEventTime,eventId:e._eventId,identifyId:e._identifyId,sequenceNumber:e._sequenceNumber};e._useOldCookie?e.cookieStorage.set(e.options.cookieName+e._storageSuffix,t):e._metadataStorage.save(t)};ot.prototype._initUtmData=function(e,t){e=e||this._getUrlParams(),t=t||this.cookieStorage.get("__utmz");var n=ge(t,e);return dt(this,n),n},ot.prototype._unsetUTMParams=function(){var e=new Ne;e.unset(S.REFERRER),e.unset(S.UTM_SOURCE),e.unset(S.UTM_MEDIUM),e.unset(S.UTM_CAMPAIGN),e.unset(S.UTM_TERM),e.unset(S.UTM_CONTENT),this.identify(e)};var dt=function(e,t){if("object"===k(t)&&0!==Object.keys(t).length){var n=new Ne;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n.setOnce("initial_"+i,t[i]),n.set(i,t[i]));e.identify(n)}};ot.prototype._getReferrer=function(){return document.referrer},ot.prototype._getUrlParams=function(){return location.search},ot.prototype._saveGclid=function(e){var t=z.getQueryParam("gclid",e);if(!z.isEmptyString(t)){var n={gclid:t};return dt(this,n),n}},ot.prototype._saveFbclid=function(e){var t=z.getQueryParam("fbclid",e);if(!z.isEmptyString(t)){var n={fbclid:t};return dt(this,n),n}},ot.prototype._getDeviceIdFromUrlParam=function(e){return z.getQueryParam(S.AMP_DEVICE_ID_PARAM,e)},ot.prototype._getReferringDomain=function(e){if(z.isEmptyString(e))return null;var t=e.split("/");return t.length>=3?t[2]:null},ot.prototype._saveReferrer=function(e){if(!z.isEmptyString(e)){var t={referrer:e,referring_domain:this._getReferringDomain(e)};return dt(this,t),t}},ot.prototype.saveEvents=function(){try{var e=JSON.stringify(this._unsentEvents.map((function(e){return e.event})));this._setInStorage(de,this.options.unsentKey,e)}catch(St){}try{var t=JSON.stringify(this._unsentIdentifys.map((function(e){return e.event})));this._setInStorage(de,this.options.unsentIdentifyKey,t)}catch(St){}},ot.prototype.setDomain=function(e){if(this._shouldDeferCall())return this._q.push(["setDomain"].concat(Array.prototype.slice.call(arguments,0)));if(z.validateInput(e,"domain","string"))try{this.cookieStorage.options({expirationDays:this.options.cookieExpiration,secure:this.options.secureCookie,domain:e,sameSite:this.options.sameSiteCookie}),this.options.domain=this.cookieStorage.options().domain,ut(this),lt(this)}catch(St){z.log.error(St)}},ot.prototype.setUserId=function(e){if(this._shouldDeferCall())return this._q.push(["setUserId"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.userId=null!=e&&""+e||null,lt(this)}catch(St){z.log.error(St)}},ot.prototype.setGroup=function(e,t){if(this._shouldDeferCall())return this._q.push(["setGroup"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setGroup()")&&z.validateInput(e,"groupType","string")&&!z.isEmptyString(e)){var n={};n[e]=t;var i=(new Ne).set(e,t);this._logEvent(S.IDENTIFY_EVENT,null,null,i.userPropertiesOperations,n,null,null,null)}},ot.prototype.setOptOut=function(e){if(this._shouldDeferCall())return this._q.push(["setOptOut"].concat(Array.prototype.slice.call(arguments,0)));if(z.validateInput(e,"enable","boolean"))try{this.options.optOut=e,lt(this)}catch(St){z.log.error(St)}},ot.prototype.setSessionId=function(e){if(z.validateInput(e,"sessionId","number"))try{this._sessionId=e,lt(this)}catch(St){z.log.error(St)}},ot.prototype.resetSessionId=function(){this.setSessionId((new Date).getTime())},ot.prototype.regenerateDeviceId=function(){if(this._shouldDeferCall())return this._q.push(["regenerateDeviceId"].concat(Array.prototype.slice.call(arguments,0)));this.setDeviceId(X())},ot.prototype.setDeviceId=function(e){if(this._shouldDeferCall())return this._q.push(["setDeviceId"].concat(Array.prototype.slice.call(arguments,0)));if(z.validateDeviceId(e))try{z.isEmptyString(e)||(this.options.deviceId=""+e,lt(this))}catch(St){z.log.error(St)}},ot.prototype.setTransport=function(e){if(this._shouldDeferCall())return this._q.push(["setTransport"].concat(Array.prototype.slice.call(arguments,0)));z.validateTransport(e)&&(this.options.transport=e)},ot.prototype.setUserProperties=function(e){if(this._shouldDeferCall())return this._q.push(["setUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setUserProperties()")&&z.validateInput(e,"userProperties","object")){var t=z.truncate(z.validateProperties(e));if(0!==Object.keys(t).length){var n=new Ne;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.set(i,t[i]);this.identify(n)}}},ot.prototype.clearUserProperties=function(){if(this._shouldDeferCall())return this._q.push(["clearUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("clearUserProperties()")){var e=new Ne;e.clearAll(),this.identify(e)}};var ht=function(e,t){for(var n=0;n<t._q.length;n++){var i=e[t._q[n][0]];"function"===k(i)&&i.apply(e,t._q[n].slice(1))}return e};ot.prototype.identify=function(e,t,n){if(this._shouldDeferCall())return this._q.push(["identify"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("identify()"))if("object"===k(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=ht(new Ne,e)),e instanceof Ne){if(Object.keys(e.userPropertiesOperations).length>0)return this._logEvent(S.IDENTIFY_EVENT,null,null,e.userPropertiesOperations,null,null,null,t,n);mt(t,n,0,"No request sent",{reason:"No user property operations"})}else z.log.error("Invalid identify input type. Expected Identify object but saw "+k(e)),mt(t,n,0,"No request sent",{reason:"Invalid identify input type"});else mt(t,n,0,"No request sent",{reason:"API key is not set"})},ot.prototype.groupIdentify=function(e,t,n,i,r){if(this._shouldDeferCall())return this._q.push(["groupIdentify"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("groupIdentify()"))if(z.validateInput(e,"group_type","string")&&!z.isEmptyString(e))if(null!=t)if("object"===k(n)&&Object.prototype.hasOwnProperty.call(n,"_q")&&(n=ht(new Ne,n)),n instanceof Ne){if(Object.keys(n.userPropertiesOperations).length>0)return this._logEvent(S.GROUP_IDENTIFY_EVENT,null,null,null,o({},e,t),n.userPropertiesOperations,null,i,r);mt(i,r,0,"No request sent",{reason:"No group property operations"})}else z.log.error("Invalid identify input type. Expected Identify object but saw "+k(n)),mt(i,r,0,"No request sent",{reason:"Invalid identify input type"});else mt(i,r,0,"No request sent",{reason:"Invalid group name"});else mt(i,r,0,"No request sent",{reason:"Invalid group type"});else mt(i,r,0,"No request sent",{reason:"API key is not set"})},ot.prototype.setVersionName=function(e){if(this._shouldDeferCall())return this._q.push(["setVersionName"].concat(Array.prototype.slice.call(arguments,0)));z.validateInput(e,"versionName","string")&&(this.options.versionName=e)},ot.prototype._logEvent=function(e,t,n,i,r,o,a,u,c){if(ut(this),e)if(this.options.optOut)mt(u,c,0,"No request sent",{reason:"optOut is set to true"});else try{var p;p=e===S.IDENTIFY_EVENT||e===S.GROUP_IDENTIFY_EVENT?this.nextIdentifyId():this.nextEventId();var l=this.nextSequenceNumber(),d="number"===k(a)?a:(new Date).getTime();(!this._sessionId||!this._lastEventTime||d-this._lastEventTime>this.options.sessionTimeout)&&(this._sessionId=d),this._lastEventTime=d,lt(this);var h=this._ua.browser.name,f=this._ua.browser.major,v=this._ua.device.model||this._ua.os.name,g=this._ua.device.vendor;i=i||{};var y=s({},this._apiPropertiesTrackingOptions);n=s({},n||{},y),t=t||{},r=r||{},o=o||{};var m={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:d,event_id:p,session_id:this._sessionId||-1,event_type:e,version_name:this.options.versionName||null,platform:vt(this,"platform")?this.options.platform:null,os_name:vt(this,"os_name")&&h||null,os_version:vt(this,"os_version")&&f||null,device_model:vt(this,"device_model")&&v||null,device_manufacturer:vt(this,"device_manufacturer")&&g||null,language:vt(this,"language")?this.options.language:null,api_properties:n,event_properties:z.truncate(z.validateProperties(t)),user_properties:z.truncate(z.validateProperties(i)),uuid:nt(),library:{name:"amplitude-js",version:it},sequence_number:l,groups:z.truncate(z.validateGroups(r)),group_properties:z.truncate(z.validateProperties(o)),user_agent:this._userAgent};return ft(this)&&(m.plan={branch:this.options.plan.branch||void 0,source:this.options.plan.source||void 0,version:this.options.plan.version||void 0}),e===S.IDENTIFY_EVENT||e===S.GROUP_IDENTIFY_EVENT?(this._unsentIdentifys.push({event:m,callback:u,errorCallback:c}),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push({event:m,callback:u,errorCallback:c}),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(),p}catch(St){z.log.error(St)}else mt(u,c,0,"No request sent",{reason:"Missing eventType"})};var ft=function(e){return e.options.plan&&(e.options.plan.source||e.options.plan.branch||e.options.plan.version)},vt=function(e,t){return!!e.options.trackingOptions[t]},gt=function(e){for(var t=["city","country","dma","ip_address","region"],n={},i=0;i<t.length;i++){var r=t[i];vt(e,r)||(n[r]=!1)}return n};ot.prototype._limitEventsQueued=function(e){e.length>this.options.savedMaxCount&&e.splice(0,e.length-this.options.savedMaxCount).forEach((function(e){mt(e.callback,e.errorCallback,0,"No request sent",{reason:"Event dropped because options.savedMaxCount exceeded. User may be offline or have a content blocker"})}))},ot.prototype.logEvent=function(e,t,n,i){return this._shouldDeferCall()?this._q.push(["logEvent"].concat(Array.prototype.slice.call(arguments,0))):this.logEventWithTimestamp(e,t,null,n,i)},ot.prototype.logEventWithTimestamp=function(e,t,n,i,r){return this._shouldDeferCall()?this._q.push(["logEventWithTimestamp"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEvent()")?z.validateInput(e,"eventType","string")?z.isEmptyString(e)?(mt(i,r,0,"No request sent",{reason:"Missing eventType"}),-1):this._logEvent(e,t,null,null,null,null,n,i,r):(mt(i,r,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(mt(i,r,0,"No request sent",{reason:"API key not set"}),-1)},ot.prototype.logEventWithGroups=function(e,t,n,i,r){return this._shouldDeferCall()?this._q.push(["logEventWithGroups"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEventWithGroups()")?z.validateInput(e,"eventType","string")?this._logEvent(e,t,null,null,n,null,null,i,r):(mt(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(mt(event.callback,event.errorCallback,0,"No request sent",{reason:"API key not set"}),-1)};var yt=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},mt=function(e,t,n,i,r){"function"===k(e)&&e(n,i,r),"function"===k(t)&&t(n,i,r)};ot.prototype.logRevenueV2=function(e){if(this._shouldDeferCall())return this._q.push(["logRevenueV2"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("logRevenueV2()"))if("object"===k(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=ht(new et,e)),e instanceof et){if(e&&e._isValidRevenue())return this.logEvent(S.REVENUE_EVENT,e._toJSONObject())}else z.log.error("Invalid revenue input type. Expected Revenue object but saw "+k(e))},ot.prototype.logRevenue=function(e,t,n){return this._shouldDeferCall()?this._q.push(["logRevenue"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logRevenue()")&&yt(e)&&(void 0===t||yt(t))?this._logEvent(S.REVENUE_EVENT,{},{productId:n,special:"revenue_amount",quantity:t||1,price:e},null,null,null,null,null):-1},ot.prototype._logErrorsOnEvents=function(e,t,n,i){for(var r=["_unsentEvents","_unsentIdentifys"],o=0;o<r.length;o++)for(var s=r[o],a="_unsentEvents"===s?e:t,u=0;u<this[s].length;u++){var c=this[s][u];c.event.event_id<=a&&c.errorCallback&&c.errorCallback(n,i)}},ot.prototype.removeEvents=function(e,t,n,i){_t(this,"_unsentEvents",e,n,i),_t(this,"_unsentIdentifys",t,n,i)};var _t=function(e,t,n,i,r){if(!(n<0)){for(var o=[],s=0;s<e[t].length;s++){var a=e[t][s];a.event.event_id>n?o.push(a):a.callback&&a.callback(i,r)}e[t]=o}};ot.prototype.sendEvents=function(){if(this._apiKeySet("sendEvents()")){if(this.options.optOut)this.removeEvents(1/0,1/0,0,"No request sent",{reason:"Opt out is set to true"});else if(0!==this._unsentCount()){if(this.options.transport!==S.TRANSPORT_BEACON){if(this._sending)return;this._sending=!0}var e=(this.options.forceHttps||"https:"===window.location.protocol?"https":"http")+"://"+this.options.apiEndpoint,t=Math.min(this._unsentCount(),this.options.uploadBatchSize),n=this._mergeEventsAndIdentifys(t),i=n.maxEventId,r=n.maxIdentifyId,o=JSON.stringify(n.eventsToSend.map((function(e){return e.event}))),s=(new Date).getTime(),a={client:this.options.apiKey,e:o,v:S.API_VERSION,upload_time:s,checksum:Re(S.API_VERSION+this.options.apiKey+o+s)};if(this.options.transport!==S.TRANSPORT_BEACON){var u=this;new Je(e,a,this.options.headers).send((function(e,n){u._sending=!1;try{200===e&&"success"===n?(u.removeEvents(i,r,e,n),u.options.saveEvents&&u.saveEvents(),u._sendEventsIfReady()):(u._logErrorsOnEvents(i,r,e,n),413===e&&(1===u.options.uploadBatchSize&&u.removeEvents(i,r,e,n),u.options.uploadBatchSize=Math.ceil(t/2),u.sendEvents()))}catch(St){}}))}else navigator.sendBeacon(e,new URLSearchParams(a))?(this.removeEvents(i,r,200,"success"),this.options.saveEvents&&this.saveEvents()):this._logErrorsOnEvents(i,r,0,"")}}else this.removeEvents(1/0,1/0,0,"No request sent",{reason:"API key not set"})},ot.prototype._mergeEventsAndIdentifys=function(e){for(var t=[],n=0,i=-1,r=0,o=-1;t.length<e;){var s=void 0,a=r>=this._unsentIdentifys.length,u=n>=this._unsentEvents.length;if(u&&a){z.log.error("Merging Events and Identifys, less events and identifys than expected");break}a?i=(s=this._unsentEvents[n++]).event.event_id:u?o=(s=this._unsentIdentifys[r++]).event.event_id:!("sequence_number"in this._unsentEvents[n].event)||this._unsentEvents[n].event.sequence_number<this._unsentIdentifys[r].event.sequence_number?i=(s=this._unsentEvents[n++]).event.event_id:o=(s=this._unsentIdentifys[r++]).event.event_id,t.push(s)}return{eventsToSend:t,maxEventId:i,maxIdentifyId:o}},ot.prototype.setGlobalUserProperties=function(e){this.setUserProperties(e)},ot.prototype.__VERSION__=it,ot.prototype._shouldDeferCall=function(){return this._pendingReadStorage||this._initializationDeferred},ot.prototype._deferInitialization=function(){this._initializationDeferred=!0,this._q.push(["init"].concat(Array.prototype.slice.call(arguments,0)))},ot.prototype.enableTracking=function(){this._initializationDeferred=!1,lt(this),this.runQueuedFunctions()};var bt=function(){this.options=s({},rt),this._q=[],this._instances={}};bt.prototype.Identify=Ne,bt.prototype.Revenue=et,bt.prototype.getInstance=function(e){e=z.isEmptyString(e)?S.DEFAULT_INSTANCE:e.toLowerCase();var t=this._instances[e];return void 0===t&&(t=new ot(e),this._instances[e]=t),t},bt.prototype.runQueuedFunctions=function(){for(var e=0;e<this._q.length;e++){var t=this[this._q[e][0]];"function"===k(t)&&t.apply(this,this._q[e].slice(1))}for(var n in this._q=[],this._instances)Object.prototype.hasOwnProperty.call(this._instances,n)&&this._instances[n].runQueuedFunctions()},bt.prototype.init=function(e,t,n,i){this.getInstance().init(e,t,n,function(e){this.options=e.options,"function"===k(i)&&i(e)}.bind(this))},bt.prototype.isNewSession=function(){return this.getInstance().isNewSession()},bt.prototype.getSessionId=function(){return this.getInstance().getSessionId()},bt.prototype.nextEventId=function(){return this.getInstance().nextEventId()},bt.prototype.nextIdentifyId=function(){return this.getInstance().nextIdentifyId()},bt.prototype.nextSequenceNumber=function(){return this.getInstance().nextSequenceNumber()},bt.prototype.saveEvents=function(){this.getInstance().saveEvents()},bt.prototype.setDomain=function(e){this.getInstance().setDomain(e)},bt.prototype.setUserId=function(e){this.getInstance().setUserId(e)},bt.prototype.setGroup=function(e,t){this.getInstance().setGroup(e,t)},bt.prototype.setOptOut=function(e){this.getInstance().setOptOut(e)},bt.prototype.regenerateDeviceId=function(){this.getInstance().regenerateDeviceId()},bt.prototype.setDeviceId=function(e){this.getInstance().setDeviceId(e)},bt.prototype.setUserProperties=function(e){this.getInstance().setUserProperties(e)},bt.prototype.clearUserProperties=function(){this.getInstance().clearUserProperties()},bt.prototype.identify=function(e,t){this.getInstance().identify(e,t)},bt.prototype.setVersionName=function(e){this.getInstance().setVersionName(e)},bt.prototype.logEvent=function(e,t,n){return this.getInstance().logEvent(e,t,n)},bt.prototype.logEventWithGroups=function(e,t,n,i){return this.getInstance().logEventWithGroups(e,t,n,i)},bt.prototype.logRevenueV2=function(e){return this.getInstance().logRevenueV2(e)},bt.prototype.logRevenue=function(e,t,n){return this.getInstance().logRevenue(e,t,n)},bt.prototype.removeEvents=function(e,t){this.getInstance().removeEvents(e,t)},bt.prototype.sendEvents=function(e){this.getInstance().sendEvents(e)},bt.prototype.setGlobalUserProperties=function(e){this.getInstance().setUserProperties(e)},bt.prototype.__VERSION__=it;var wt=window.amplitude||{},Et=new bt;for(var It in Et._q=wt._q||[],wt._iq)Object.prototype.hasOwnProperty.call(wt._iq,It)&&(Et.getInstance(It)._q=wt._iq[It]._q||[]);return Et.runQueuedFunctions(),Et}()}}]);
//# sourceMappingURL=13eafaad-4374d19c292a9707bb89.js.map