1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6751],{16791:function(e,t,n){var i=n(83454),o=n(48764).lW;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 r(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 s(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(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){a(e,t,n[t])}))}return e}function c(e){return l(e)||p(e)||d()}function l(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 p(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var h,f,g,v;function y(){var e;return"object"===typeof i&&void 0!==(null===(e=null===i||void 0===i?void 0:i.versions)||void 0===e?void 0:e.node)}function m(){return"object"===typeof window&&void 0!==(null===window||void 0===window?void 0:window.document)}(function(e){e.IDENTIFY="$identify"})(h||(h={})),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"}(f||(f={})),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose"}(g||(g={})),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"}(v||(v={})),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}(v||(v={})),v.Skipped;var _={},w=function(){return y()?n.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:_},E=function(){var e=w();return e.__AMPLITUDE__=e.__AMPLITUDE__||{},e.__AMPLITUDE__},I=function(){var e;if(m()){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},b=E(),S="Amplitude Logger ",N=function(){function e(){this._logLevel=0}return e.prototype.disable=function(){this._logLevel=0},e.prototype.enable=function(e){void 0===e&&(e=g.Warn),this._logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logLevel<g.Verbose||n.g.console.log(S+"[Log]: "+e.join(" "))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logLevel<g.Warn||n.g.console.warn(S+"[Warn]: "+e.join(" "))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logLevel<g.Error||n.g.console.error(S+"[Error]: "+e.join(" "))},e}(),O=(b.logger||(b.logger=new N),{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"}),T={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,o=0,r=0;n<e.length;)(i=e.charCodeAt(n))<128?(t+=String.fromCharCode(i),n++):i>191&&i<224?(o=e.charCodeAt(n+1),t+=String.fromCharCode((31&i)<<6|63&o),n+=2):(o=e.charCodeAt(n+1),r=e.charCodeAt(n+2),t+=String.fromCharCode((1
15&i)<<12|(63&o)<<6|63&r),n+=3);return t}},k={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){try{if(window.btoa&&window.atob)return window.btoa(unescape(encodeURIComponent(e)))}catch(t){}return k._encode(e)},_encode:function(e){var t,n,i,o,r,s,a,u="",c=0;for(e=T.encode(e);c<e.length;)o=(t=e.charCodeAt(c++))>>2,r=(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+k._keyStr.charAt(o)+k._keyStr.charAt(r)+k._keyStr.charAt(s)+k._keyStr.charAt(a);return u},decode:function(e){try{if(window.btoa&&window.atob)return decodeURIComponent(escape(window.atob(e)))}catch(t){}return k._decode(e)},_decode:function(e){var t,n,i,o,r,s,a="",u=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");u<e.length;)t=k._keyStr.indexOf(e.charAt(u++))<<2|(o=k._keyStr.indexOf(e.charAt(u++)))>>4,n=(15&o)<<4|(r=k._keyStr.indexOf(e.charAt(u++)))>>2,i=(3&r)<<6|(s=k._keyStr.indexOf(e.charAt(u++))),a+=String.fromCharCode(t),64!==r&&(a+=String.fromCharCode(n)),64!==s&&(a+=String.fromCharCode(i));return a=T.decode(a)}},A=Object.prototype.toString;function R(t){switch(A.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 o&&"function"===typeof o.isBuffer&&o.isBuffer(t)?"buffer":e(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t))}var C,D={DISABLE:0,ERROR:1,WARN:2,INFO:3},x=D.WARN,P={error:function(e){x>=D.ERROR&&U(e)},warn:function(e){x>=D.WARN&&U(e)},info:function(e){x>=D.INFO&&U(e)}},U=function(e){try{console.log("[Amplitude] "+e)}catch(t){}},j=function e(t){if("array"===R(t))for(var n=0;n<t.length;n++)t[n]=e(t[n]);else if("object"===R(t))for(var i in t)i in t&&(t[i]=e(t[i]));else t=q(t);return t},q=function(e){return"string"===R(e)&&e.length>O.MAX_STRING_LENGTH?e.substring(0,O.MAX_STRING_LENGTH):e},M=function(e,t,n){return R(e)===n||(P.error("Invalid "+t+" input type. Expected "+n+" but received "+R(e)),!1)},L=function(e){return!!M(e,"deviceId","string")&&(!e.includes(".")||(P.error("Device IDs may not contain '.' characters. Value will be ignored: \"".concat(e,'"')),!1))},V=function(e){var t=R(e);if("object"!==t)return P.error("Error: invalid properties format. Expecting Javascript object, received "+t+", ignoring"),{};if(Object.keys(e).length>O.MAX_PROPERTY_KEYS)return P.error("Error: too many properties (more than 1000), ignoring"),{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=i,r=R(o);"string"!==r&&(o=String(o),P.warn("WARNING: Non-string property key, received type "+r+', coercing to string "'+o+'"'));var s=F(o,e[i]);null!==s&&(n[o]=s)}return n},G=["nan","function","arguments","regexp","element"],F=function e(t,n){var i=R(n);if(-1!==G.indexOf(i))P.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),P.warn('WARNING: Property key "'+t+'" with value type error, coercing to '+n);else if("array"===i){for(var o=[],r=0;r<n.length;r++){var s=n[r],a=R(s);"array"!==a?"object"===a?o.push(V(s)):o.push(e(t,s)):P.warn("WARNING: Cannot have "+a+" nested in an array property value, skipping")}n=o}else"object"===i&&(n=V(n));return n},K=function(e){var t=R(e);if("object"!==t)return P.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 o=i,r=R(o);"string"!==r&&(o=String(o),P.warn("WARNING: Non-string groupType, received type "+r+', coercing to string "'+o+'"'));var s=z(o,e[i]);null!==s&&(n[o]=s)}return n},z=function(e,t){var n=R(t);if("string"===n)return t;if("date"===n||"number"===n||"boolean"===n)return t=String(t),P.warn("WARNING: Non-string groupName, received type "+n+', coercing to string "'+t+'"'),t;if("array"===n){for(var i=[],o=0;o<t.length;o++){var r=t[o],s=R(r);"array"!==s&&"object"!==s?"string"===s?i.push(r):"date"!==s&&"number"!==s&&"boolean"!==s||(r=String(r),P.warn("WARNING: Non-string groupName, received type "+s+', coercing to string "'+r+'"'),i.push(r)):P.warn("WARNING:
1Skipping nested "+s+" in array groupName")}return i}P.warn("WARNING: Non-string groupName, received type "+n+". Please use strings or array of strings for groupName")},B={setLogLevel:function(e){Object.prototype.hasOwnProperty.call(D,e)&&(x=D[e])},getLogLevel:function(){return x},logLevels:D,log:P,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:j,validateGroups:K,validateInput:M,validateProperties:V,validateDeviceId:L},X=function(){return window.location},$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",W=function(){for(var e="",t=0;t<22;++t)e+=$.charAt(Math.floor(64*Math.random()));return e},Q=function(e){try{for(var t=document.cookie.split(";"),n=null,i=0;i<t.length;i++){for(var o=t[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e)){n=o.substring(e.length,o.length);break}}return n}catch(r){return null}},Y=function(e,t,n){var i=null!==t?n.expirationDays:-1;if(i){var o=new Date;o.setTime(o.getTime()+24*i*60*60*1e3),i=o}var r=e+"="+t;i&&(r+="; expires="+i.toUTCString()),r+="; path=/",n.domain&&(r+="; domain="+n.domain),n.secure&&(r+="; Secure"),n.sameSite&&(r+="; SameSite="+n.sameSite),document.cookie=r},J=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t.split(".")[O.LAST_EVENT_TIME_INDEX];return n&&(e=parseInt(n,32)),e||(B.log.warn("unable to parse malformed cookie: ".concat(t)),0)},H=function(e){return c(e).sort((function(e,t){var n=J(e);return J(t)-n}))},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=O.COOKIE_TEST_PREFIX+W(),n=!1;try{var i=String(new Date);Y(t,i,e),B.log.info("Testing if cookies available"),n=Q(t+"=")===i}catch(o){B.log.warn('Error thrown when checking for cookies. Reason: "'.concat(o,'"'))}finally{B.log.info("Cleaning up cookies availability test"),Y(t,null,e)}return n},ee={set:Y,get:Q,getAll:function(e){try{var t=document.cookie.split(";").map((function(e){return e.trimStart()})),n=[],i=!0,o=!1,r=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){o=!0,r=c}finally{try{i||null==a.return||a.return()}finally{if(o)throw r}}return n}catch(l){return[]}},getLastEventTime:J,sortByEventTime:H,areCookiesEnabled:Z},te=function(e){var t=document.createElement("a");return t.href=e,t.hostname||location.hostname},ne=function(e){for(var t=te(e).split("."),n=[],i="_tldtest_"+W(),o=t.length-2;o>=0;--o)n.push(t.slice(o).join("."));for(var r=0;r<n.length;++r){var s=n[r],a={domain:"."+s};if(ee.set(i,1,a),ee.get(i))return ee.set(i,null,a),s}return""},ie={expirationDays:void 0,domain:void 0},oe=function(e){if(0===arguments.length)return ie;e=e||{},ie.expirationDays=e.expirationDays,ie.secure=e.secure,ie.sameSite=e.sameSite;var t=B.isEmptyString(e.domain)?"."+ne(X().href):e.domain,n=Math.random();ie.domain=t,ae("amplitude_test",n);var i=se("amplitude_test");return i&&i===n||(t=null),ue("amplitude_test"),ie.domain=t,ie},re=function(e){var t="";return ie.domain&&(t="."===ie.domain.charAt(0)?ie.domain.substring(1):ie.domain),e+t},se=function(e){var t=re(e)+"=",n=ee.get(t);try{if(n)return JSON.parse(k.decode(n))}catch(i){return null}return null},ae=function(e,t){try{return ee.set(re(e),k.encode(JSON.stringify(t)),ie),!0}catch(n){return!1}},ue=function(e){try{return ee.set(re(e),null,ie),!0}catch(t){return!1}},ce={reset:function(){ie={expirationDays:void 0,domain:void 0}},options:oe,get:se,set:ae,remove:ue,setRaw:function(e,t){try{return ee.set(re(e),t,ie),!0}catch(n){return!1}},getRaw:function(e){var t=re(e)+"=";return ee.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}())C=window.localStorage;else if(window.globalStorage)try{C=window.globalStorage[window.location.hostname]}catch(bt){}else if("undefined"!==typeof document){var le=document.createElement("div"),pe="localStorage";le.style.display="none",document.getElementsByTagName("head")[0].appendChild(le),le.addBehavior&&(le.addBehavior("#default#userdata"),C={length:0,setItem:function(e,t){le.load(pe),le.getAttribute(e)||this.length++,le.setAttribute(e,t),le.save(pe)},getItem:function(e){return le.load(pe),le.getAttribute(e)},removeItem:function(e){le.load(pe),le.getAttribute(e)&&this.length--,le.removeAttribute(e),le.save(pe)},clear:function(){le.load(pe);for(var e,t=0;e=le.XMLDocument.documentElement.attributes[t++];)le.removeAttribute(e.name);le.save(pe),this.length=0},key:function(e){return le.load(pe),le.XMLDocument.documentElement.attributes[e]}},le.load(pe),C.length=le.XMLDocument.documentElement.attributes.length)}C||(C={length:0,setItem:function(e,t){},getItem:function(e){},removeItem:function(e){},clear:function(){},key:function(e){}});var de,he=C,fe=function(){this.storage=null};fe.prototype.getStorage=function(){if(null!==this.storage)return this.storage;if(ee.areCookiesEnabled())this.storage=ce;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(he.getItem(e+t))}catch(bt){}return null},set:function(t,n){try{return he.setItem(e+t,JSON.stringify(n)),!0}catch(bt){}return!1},remove:function(t){try{he.removeItem(e+t)}catch(bt){return!1}}}}return this.storage};var ge=(a(de={},O.STORAGE_COOKIES,!0),a(de,O.STORAGE_NONE,!0),a(de,O.STORAGE_LOCAL,!0),a(de,O.STORAGE_SESSION,!0),de),ve=function(){function e(n){var i=n.storageKey,o=n.disableCookies,r=n.domain,s=n.secure,a=n.sameSite,u=n.expirationDays,c=n.storage;t(this,e),this.storageKey=i,this.domain=r,this.secure=s,this.sameSite=a,this.expirationDays=u,this.cookieDomain="";var l=ne(X().href);if(this.cookieDomain=r||(l?"."+l:null),ge[c])this.storage=c;else{var p=o||!ee.areCookiesEnabled({domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays});this.storage=p?O.STORAGE_LOCAL:O.STORAGE_COOKIES}}return s(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,o=e.sessionId,r=e.lastEventTime,s=e.eventId,a=e.identifyId,u=e.sequenceNumber;if(this.storage!==O.STORAGE_NONE){var c=[t,k.encode(n||""),i?"1":"",o?o.toString(32):"0",r?r.toString(32):"0",s?s.toString(32):"0",a?a.toString(32):"0",u?u.toString(32):"0"].join(".");switch(this.storage){case O.STORAGE_SESSION:window.sessionStorage&&window.sessionStorage.setItem(this.storageKey,c);break;case O.STORAGE_LOCAL:he.setItem(this.storageKey,c);break;case O.STORAGE_COOKIES:this.saveCookie(c)}}}},{key:"saveCookie",value:function(e){ee.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===O.STORAGE_COOKIES){var n=this.getCookieStorageKey()+"=",i=ee.getAll(n);if(0===i.length||1===i.length)e=i[0];else{var o=ee.sortByEventTime(i)[0];
1i.forEach((function(){return ee.set(t.getCookieStorageKey(),null,{})})),this.saveCookie(o),e=ee.get(n)}}if(e||(e=he.getItem(this.storageKey)),!e)try{e=window.sessionStorage&&window.sessionStorage.getItem(this.storageKey)}catch(bt){B.log.info('window.sessionStorage unavailable. Reason: "'.concat(bt,'"'))}if(!e)return null;var r=e.split("."),s=null;if(r[O.USER_ID_INDEX])try{s=k.decode(r[O.USER_ID_INDEX])}catch(bt){s=null}return{deviceId:r[O.DEVICE_ID_INDEX],userId:s,optOut:"1"===r[O.OPT_OUT_INDEX],sessionId:parseInt(r[O.SESSION_ID_INDEX],32),lastEventTime:parseInt(r[O.LAST_EVENT_TIME_INDEX],32),eventId:parseInt(r[O.EVENT_ID_INDEX],32),identifyId:parseInt(r[O.IDENTIFY_ID_INDEX],32),sequenceNumber:parseInt(r[O.SEQUENCE_NUMBER_INDEX],32)}}},{key:"clear",value:function(){var e;if(this.storage===O.STORAGE_COOKIES&&(e=ee.get(this.getCookieStorageKey()+"="),ee.set(this.getCookieStorageKey(),null,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:0})),e||(e=he.getItem(this.storageKey),he.clear()),!e)try{e=window.sessionStorage&&window.sessionStorage.getItem(this.storageKey),window.sessionStorage.clear()}catch(bt){B.log.info('window.sessionStorage unavailable. Reason: "'.concat(bt,'"'))}return!0}}]),e}(),ye=function(e,t){var n=e?"?"+e.split(".").slice(-1)[0].replace(/\|/g,"&"):"",i=function(e,t,n,i){return B.getQueryParam(e,t)||B.getQueryParam(n,i)},o=i(O.UTM_SOURCE,t,"utmcsr",n),r=i(O.UTM_MEDIUM,t,"utmcmd",n),s=i(O.UTM_CAMPAIGN,t,"utmccn",n),a=i(O.UTM_TERM,t,"utmctr",n),u=i(O.UTM_CONTENT,t,"utmcct",n),c={},l=function(e,t){B.isEmptyString(t)||(c[e]=t)};return l(O.UTM_SOURCE,o),l(O.UTM_MEDIUM,r),l(O.UTM_CAMPAIGN,s),l(O.UTM_TERM,a),l(O.UTM_CONTENT,u),c},me="$add",_e="$append",we="$clearAll",Ee="$prepend",Ie="$set",be="$setOnce",Se="$unset",Ne="$preInsert",Oe="$postInsert",Te="$remove",ke=function(){this.userPropertiesOperations={},this.properties=[]};ke.prototype.add=function(e,t){return"number"===R(t)||"string"===R(t)?this._addOperation(me,e,t):B.log.error("Unsupported type for value: "+R(t)+", expecting number or string"),this},ke.prototype.append=function(e,t){return this._addOperation(_e,e,t),this},ke.prototype.clearAll=function(){return Object.keys(this.userPropertiesOperations).length>0?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,we)||B.log.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"),this):(this.userPropertiesOperations[we]="-",this)},ke.prototype.prepend=function(e,t){return this._addOperation(Ee,e,t),this},ke.prototype.set=function(e,t){return this._addOperation(Ie,e,t),this},ke.prototype.setOnce=function(e,t){return this._addOperation(be,e,t),this},ke.prototype.unset=function(e){return this._addOperation(Se,e,"-"),this},ke.prototype.preInsert=function(e,t){return this._addOperation(Ne,e,t),this},ke.prototype.postInsert=function(e,t){return this._addOperation(Oe,e,t),this},ke.prototype.remove=function(e,t){return this._addOperation(Te,e,t),this},ke.prototype._addOperation=function(e,t,n){Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,we)?B.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)):B.log.error('User property "'+t+'" already used in this identify, skipping operation '+e)};var Ae="undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{};function Re(e,t){return e(t={exports:{}},t.exports),t.exports}var Ce=Re((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 o(e,t,o,r,s,a){return n(i(n(n(t,e),n(r,a)),s),o)}function r(e,t,n,i,r,s,a){return o(t&n|~t&i,e,t,r,s,a)}function s(e,t,n,i,r,s,a){return o(t&i|n&~i,e,t,r,s,a)}function a(e,t,n,i,r,s,a){return o(t^n^i,e,t,r,s,a)}function u(e,t,n,i,r,s,a){return o(n^(t|~i),e,t,r,s,a)}function c(e,t){var i,o,c,l,p;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var d=1732584193,h=-271733879,f=-1732584194,g=271733878;for(i=0;i<e.length;i+=16)o=d,c=h,l=f,p=g,d=r(d,h,f,g,e[i],7,-680876936),g=r(g,d,h,f,e[i+1],12,-389564586),f=r(f,g,d,h,e[i+2],17,606105819),h=r(h,f,g,d,e[i+3],22,-1044525330),d=r(d,h,f,g,e[i+4],7,-176418897),g=r(g,d,h,f,e[i+5],12,1200080426),f=r(f,g,d,h,e[i+6],17,-1473231341),h=r(h,f,g,d,e[i+7],22,-45705983),d=r(d,h,f,g,e[i+8],7,1770035416),g=r(g,d,h,f,e[i+9],12,-1958414417),f=r(f,g,d,h,e[i+10],17,-42063),h=r(h,f,g,d,e[i+11],22,-1990404162),d=r(d,h,f,g,e[i+12],7,1804603682),g=r(g,d,h,f,e[i+13],12,-40341101),f=r(f,g,d,h,e[i+14],17,-1502002290),d=s(d,h=r(h,f,g,d,e[i+15],22,1236535329),f,g,e[i+1],5,-165796510),g=s(g,d,h,f,e[i+6],9,-1069501632),f=s(f,g,d,h,e[i+11],14,643717713),h=s(h,f,g,d,e[i],20,-373897302),d=s(d,h,f,g,e[i+5],5,-701558691),g=s(g,d,h,f,e[i+10],9,38016083),f=s(f,g,d,h,e[i+15],14,-660478335),h=s(h,f,g,d,e[i+4],20,-405537848),d=s(d,h,f,g,e[i+9],5,568446438),g=s(g,d,h,f,e[i+14],9,-1019803690),f=s(f,g,d,h,e[i+3],14,-187363961),h=s(h,f,g,d,e[i+8],20,1163531501),d=s(d,h,f,g,e[i+13],5,-1444681467),g=s(g,d,h,f,e[i+2],9,-51403784),f=s(f,g,d,h,e[i+7],14,1735328473),d=a(d,h=s(h,f,g,d,e[i+12],20,-1926607734),f,g,e[i+5],4,-378558),g=a(g,d,h,f,e[i+8],11,-2022574463),f=a(f,g,d,h,e[i+11],16,1839030562),h=a(h,f,g,d,e[i+14],23,-35309556),d=a(d,h,f,g,e[i+1],4,-1530992060),g=a(g,d,h,f,e[i+4],11,1272893353),f=a(f,g,d,h,e[i+7],16,-155497632),h=a(h,f,g,d,e[i+10],23,-1094730640),d=a(d,h,f,g,e[i+13],4,681279174),g=a(g,d,h,f,e[i],11,-358537222),f=a(f,g,d,h,e[i+3],16,-722521979),h=a(h,f,g,d,e[i+6],23,76029189),d=a(d,h,f,g,e[i+9],4,-640364487),g=a(g,d,h,f,e[i+12],11,-421815835),f=a(f,g,d,h,e[i+15],16,530742520),d=u(d,h=a(h,f,g,d,e[i+2],23,-995338651),f,g,e[i],6,-198630844),g=u(g,d,h,f,e[i+7],10,1126891415),f=u(f,g,d,h,e[i+14],15,-1416354905),h=u(h,f,g,d,e[i+5],21,-57434055),d=u(d,h,f,g,e[i+12],
16,1700485571),g=u(g,d,h,f,e[i+3],10,-1894986606),f=u(f,g,d,h,e[i+10],15,-1051523),h=u(h,f,g,d,e[i+1],21,-2054922799),d=u(d,h,f,g,e[i+8],6,1873313359),g=u(g,d,h,f,e[i+15],10,-30611744),f=u(f,g,d,h,e[i+6],15,-1560198380),h=u(h,f,g,d,e[i+13],21,1309151649),d=u(d,h,f,g,e[i+4],6,-145523070),g=u(g,d,h,f,e[i+11],10,-1120210379),f=u(f,g,d,h,e[i+2],15,718787259),h=u(h,f,g,d,e[i+9],21,-343485551),d=n(d,o),h=n(h,c),f=n(f,l),g=n(g,p);return[d,h,f,g]}function l(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 p(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 l(c(p(e),8*e.length))}function h(e,t){var n,i,o=p(e),r=[],s=[];for(r[15]=s[15]=void 0,o.length>16&&(o=c(o,8*e.length)),n=0;n<16;n+=1)r[n]=909522486^o[n],s[n]=1549556828^o[n];return i=c(r.concat(p(t)),512+8*t.length),l(c(s.concat(i),640))}function f(e){var t,n,i="0123456789abcdef",o="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),o+=i.charAt(t>>>4&15)+i.charAt(15&t);return o}function g(e){return unescape(encodeURIComponent(e))}function v(e){return d(g(e))}function y(e){return f(v(e))}function m(e,t){return h(g(e),g(t))}function _(e,t){return f(m(e,t))}function w(e,t,n){return t?n?m(t,e):_(t,e):n?v(e):y(e)}e.exports?e.exports=w:t.md5=w}(Ae)})),De=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},xe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable;function je(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function qe(){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(o){return!1}}var Me=qe()?Object.assign:function(e,t){for(var n,i,o=je(e),r=1;r<arguments.length;r++){for(var s in n=Object(arguments[r]))Pe.call(n,s)&&(o[s]=n[s]);if(xe){i=xe(n);for(var a=0;a<i.length;a++)Ue.call(n,i[a])&&(o[i[a]]=n[i[a]])}}return o},Le="%[a-f0-9]{2}",Ve=new RegExp(Le,"gi"),Ge=new RegExp("("+Le+")+","gi");function Fe(e,t){try{return decodeURIComponent(e.join(""))}catch(o){}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 Ke(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(Ve),n=1;n<t.length;n++)t=(e=Fe(t,n).join("")).match(Ve);return e}}function ze(e){for(var t={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},n=Ge.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(a){var i=Ke(n[0]);i!==n[0]&&(t[n[0]]=i)}n=Ge.exec(e)}t["%C2"]="\ufffd";for(var o=Object.keys(t),r=0;r<o.length;r++){var s=o[r];e=e.replace(new RegExp(s,"g"),t[s])}return e}var Be=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 ze(e)}};function Xe(e){switch(e.arrayFormat){case"index":return function(t,n,i){return null===n?[We(t,e),"[",i,"]"].join(""):[We(t,e),"[",We(i,e),"]=",We(n,e)].join("")};case"bracket":return function(t,n){return null===n?We(t,e):[We(t,e),"[]=",We(n,e)].join("")};default:return function(t,n){return null===n?We(t,e):[We(t,e),"=",We(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 We(e,t){return t.encode?t.strict?De(e):encodeURIComponent(e):e}function Qe(e){return Array.isArray(e)?e.sort():"object"===typeof e?Qe(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function Ye(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function Je(e,t){var n=$e(t=Me({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("="),o=t.shift(),r=t.length>0?t.join("="):void 0;
1r=void 0===r?null:Be(r),n(Be(o),r,i)})),Object.keys(i).sort().reduce((function(e,t){var n=i[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=Qe(n):e[t]=n,e}),Object.create(null))):i}var He={extract:Ye,parse:Je,stringify:function(e,t){!1===(t=Me({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var n=Xe(t);return e?Object.keys(e).sort(t.sort).map((function(i){var o=e[i];if(void 0===o)return"";if(null===o)return We(i,t);if(Array.isArray(o)){var r=[];return o.slice().forEach((function(e){void 0!==e&&r.push(n(i,e,r.length))})),r.join("&")}return We(i,t)+"="+We(o,t)})).filter((function(e){return e.length>0})).join("&"):""},parseUrl:function(e,t){return{url:e.split("?")[0]||"",query:Je(Ye(e),t)}}},Ze=function(e,t,n){this.url=e,this.data=t||{},this.headers=n};function et(e,t){for(var n in t)e.setRequestHeader(n,t[n])}Ze.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)},et(n,this.headers),n.send(He.stringify(this.data))}};var tt=function(){this._price=null,this._productId=null,this._quantity=1,this._revenueType=null,this._properties=null};tt.prototype.setProductId=function(e){return"string"!==R(e)?B.log.error("Unsupported type for productId: "+R(e)+", expecting string"):B.isEmptyString(e)?B.log.error("Invalid empty productId"):this._productId=e,this},tt.prototype.setQuantity=function(e){return"number"!==R(e)?B.log.error("Unsupported type for quantity: "+R(e)+", expecting number"):this._quantity=parseInt(e),this},tt.prototype.setPrice=function(e){return"number"!==R(e)?B.log.error("Unsupported type for price: "+R(e)+", expecting number"):this._price=e,this},tt.prototype.setRevenueType=function(e){return"string"!==R(e)?B.log.error("Unsupported type for revenueType: "+R(e)+", expecting string"):this._revenueType=e,this},tt.prototype.setEventProperties=function(e){return"object"!==R(e)?B.log.error("Unsupported type for eventProperties: "+R(e)+", expecting object"):this._properties=B.validateProperties(e),this},tt.prototype._isValidRevenue=function(){return"number"===R(this._price)||(B.log.error("Invalid revenue, need to set price field"),!1)},tt.prototype._toJSONObject=function(){var e="object"===R(this._properties)?this._properties:{};return null!==this._productId&&(e[O.REVENUE_PRODUCT_ID]=this._productId),null!==this._quantity&&(e[O.REVENUE_QUANTITY]=this._quantity),null!==this._price&&(e[O.REVENUE_PRICE]=this._price),null!==this._revenueType&&(e[O.REVENUE_REVENUE_TYPE]=this._revenueType),e};var nt=Re((function(e,t){!function(n,i){var o="0.7.21",r="",s="?",a="function",u="object",c="string",l="major",p="model",d="name",h="type",f="vendor",g="version",v="architecture",y="console",m="mobile",_="tablet",w="smarttv",E="wearable",I="embedded",b={extend: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},has:function(e,t){return"string"===typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===c?e.replace(/[^\d\.]/g,"").split(".")[0]:i},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},S={rgx:function(e,t){for(var n,o,r,s,c,l,p=0;p<t.length&&!c;){var d=t[p],h=t[p+1];for(n=o=0;n<d.length&&!c;)if(c=d[n++].exec(e))for(r=0;r<h.length;r++)l=c[++o],typeof(s=h[r])===u&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):i:this[s[0]]=l?s[1].call(this,l,s[2]):i:4==s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):i):this[s]=l||i;p+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===u&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(b.has(t[n][o],e))return n===s?i:n}else if(b.has(t[n],e))return n===s?i:n;return e}},N={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{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"}}}}
1,O={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[d,g],[/(opios)[\/\s]+([\w\.]+)/i],[[d,"Opera Mini"],g],[/\s(opr)\/([\w\.]+)/i],[[d,"Opera"],g],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[d,g],[/(konqueror)\/([\w\.]+)/i],[[d,"Konqueror"],g],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[d,"IE"],g],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[d,"Edge"],g],[/(yabrowser)\/([\w\.]+)/i],[[d,"Yandex"],g],[/(Avast)\/([\w\.]+)/i],[[d,"Avast Secure Browser"],g],[/(AVG)\/([\w\.]+)/i],[[d,"AVG Secure Browser"],g],[/(puffin)\/([\w\.]+)/i],[[d,"Puffin"],g],[/(focus)\/([\w\.]+)/i],[[d,"Firefox Focus"],g],[/(opt)\/([\w\.]+)/i],[[d,"Opera Touch"],g],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[d,"UCBrowser"],g],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],g],[/(windowswechat qbcore)\/([\w\.]+)/i],[[d,"WeChat(Win) Desktop"],g],[/(micromessenger)\/([\w\.]+)/i],[[d,"WeChat"],g],[/(brave)\/([\w\.]+)/i],[[d,"Brave"],g],[/(qqbrowserlite)\/([\w\.]+)/i],[d,g],[/(QQ)\/([\d\.]+)/i],[d,g],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[d,g],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[d,g],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[d,g],[/(MetaSr)[\/\s]?([\w\.]+)/i],[d],[/(LBBROWSER)/i],[d],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[g,[d,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[g,[d,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[d,g],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[g,[d,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[d,/(.+)/,"$1 WebView"],g],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[d,/(.+(?:g|us))(.+)/,"$1 $2"],g],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[d,"Chrome Mobile"],g],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[g,[d,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[d,"Sailfish Browser"],g],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[d,g],[/(dolfin)\/([\w\.]+)/i],[[d,"Dolphin"],g],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[d,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[d,"Opera Coast"],g],[/fxios\/([\w\.-]+)/i],[g,[d,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[g,[d,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[g,d],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[d,"GSA"],g],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[d,[g,S.str,N.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[d,g],[/(navigator|netscape)\/([\w\.-]+)/i],[[d,"Netscape"],g],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.
vendor: 4,315 bytes, line 1
1+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[d,g]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,b.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[v,/ower/,"",b.lowerize]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[v,b.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[p,f,[h,_]],[/applecoremedia\/[\w\.]+ \((ipad)/],[p,[f,"Apple"],[h,_]],[/(apple\s{0,1}tv)/i],[[p,"Apple TV"],[f,"Apple"],[h,w]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[f,p,[h,_]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[p,[f,"Amazon"],[h,_]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[p,S.str,N.device.amazon.model],[f,"Amazon"],[h,m]],[/android.+aft([bms])\sbuild/i],[p,[f,"Amazon"],[h,w]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[p,f,[h,m]],[/\((ip[honed|\s\w*]+);/i],[p,[f,"Apple"],[h,m]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[f,p,[h,m]],[/\(bb10;\s(\w+)/i],[p,[f,"BlackBerry"],[h,m]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[p,[f,"Asus"],[h,_]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[f,"Sony"],[p,"Xperia Tablet"],[h,_]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[f,"Sony"],[h,m]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[f,p,[h,y]],[/android.+;\s(shield)\sbuild/i],[p,[f,"Nvidia"],[h,y]],[/(playstation\s[34portablevi]+)/i],[p,[f,"Sony"],[h,y]],[/(sprint\s(\w+))/i],[[f,S.str,N.device.sprint.vendor],[p,S.str,N.device.sprint.model],[h,m]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[p,/_/g," "],[h,m]],[/(nexus\s9)/i],[p,[f,"HTC"],[h,_]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[p,[f,"Huawei"],[h,m]],[/android.+(bah2?-a?[lw]\d{2})/i],[p,[f,"Huawei"],[h,_]],[/(microsoft);\s(lumia[\s\w]+)/i],[f,p,[h,m]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[p,[f,"Microsoft"],[h,y]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[f,"Microsoft"],[h,m]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[p,[f,"Motorola"],[h,m]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[p,[f,"Motorola"],[h,_]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,b.trim],[p,b.trim],[h,w]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/\(dtv[\);].+(aquos)/i],[p,[f,"Sharp"],[h,w]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[f,"Samsung"],p,[h,_]],[/smart-tv.+(samsung)/i],[f,[h,w],p],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[f,"Samsung"],p,[h,m]],[/sie-(\w*)/i],[p,[f,"Siemens"],[h,m]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[f,"Nokia"],p,[h,m]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[p,[f,"Acer"],[h,_]],[/android.+([vl]k\-?\d{3})\s+build/i],[p,[f,"LG"],[h,_]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[f,"LG"],p,[h,_]],[/(lg) netcast\.tv/i],[f,p,[h,w]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[p,[f,"LG"],[h,m]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[f,p,[h,_]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[p,[f,"Lenovo"],[h,_]],[/(lenovo)[_\s-]?([\w-]+)/i],[f,p,[h,m]],[/linux;.+((jolla));/i],[f,p,[h,m]],[/((pebble))app\/[\d\.]+\s/i],[f,p,[h,E]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,p,[h,m]],[/crkey/i],[[p,"Chromecast"],[f,"Google"],[h,w]],[/android.+;\s(glass)\s\d/i],[p,[f,"Google"],[h,E]],[/android.+;\s(pixel c)[\s)]/i],[p,[f,"Google"],[h,_]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[p,[f,"Google"],[h,m]],[/android.+;
1\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[p,/_/g," "],[f,"Xiaomi"],[h,m]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[p,/_/g," "],[f,"Xiaomi"],[h,_]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[p,[f,"Meizu"],[h,m]],[/(mz)-([\w-]{2,})/i],[[f,"Meizu"],p,[h,m]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[p,[f,"OnePlus"],[h,m]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[p,[f,"RCA"],[h,_]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[p,[f,"Dell"],[h,_]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[p,[f,"Verizon"],[h,_]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[f,"Barnes & Noble"],p,[h,_]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[p,[f,"NuVision"],[h,_]],[/android.+;\s(k88)\sbuild/i],[p,[f,"ZTE"],[h,_]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[p,[f,"Swiss"],[h,m]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[p,[f,"Swiss"],[h,_]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[p,[f,"Zeki"],[h,_]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[f,"Dragon Touch"],p,[h,_]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[p,[f,"Insignia"],[h,_]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[p,[f,"NextBook"],[h,_]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[f,"Voice"],p,[h,m]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[f,"LvTel"],p,[h,m]],[/android.+;\s(PH-1)\s/i],[p,[f,"Essential"],[h,m]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[p,[f,"Envizen"],[h,_]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[f,p,[h,_]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[p,[f,"MachSpeed"],[h,_]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[f,p,[h,_]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[p,[f,"Rotor"],[h,_]],[/android.+(KS(.+))\s+build/i],[p,[f,"Amazon"],[h,_]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[f,p,[h,_]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,b.lowerize],f,p],[/[\s\/\(](smart-?tv)[;\)]/i],[[h,w]],[/(android[\w\.\s\-]{0,9});.+build/i],[p,[f,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[g,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[d,g],[/rv\:([\w\.]{1,9}).+(gecko)/i],[g,d]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[d,g],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[d,S.str,N.os.windows.name],[g,S.str,N.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[d,"Windows"],[g,S.str,N.os.windows.version]],[/\((bb)(10);
1/i],[[d,"BlackBerry"],g],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[d,g],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[d,"Symbian"],g],[/\((series40);/i],[d],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[d,"Firefox OS"],g],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[d,"Linux"],g],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[d,"Chromium OS"],g],[/(sunos)\s?([\w\.\d]*)/i],[[d,"Solaris"],g],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[d,"Linux"],g],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[d,"iPhone"],[g,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[d,"iPad"],[g,/_/g,"."]],[/(haiku)\s(\w+)/i],[d,g],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[g,/_/g,"."],[d,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[d,"Mac"],[g,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[d,g]]},T=function(e,t){if("object"===typeof e&&(t=e,e=i),!(this instanceof T))return new T(e,t).getResult();var o=e||(n&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:r),s=t?b.extend(O,t):O;return this.getBrowser=function(){var e={name:i,version:i};return S.rgx.call(e,o,s.browser),e.major=b.major(e.version),e},this.getCPU=function(){var e={architecture:i};return S.rgx.call(e,o,s.cpu),e},this.getDevice=function(){var e={vendor:i,model:i,type:i};return S.rgx.call(e,o,s.device),e},this.getEngine=function(){var e={name:i,version:i};return S.rgx.call(e,o,s.engine),e},this.getOS=function(){var e={name:i,version:i};return S.rgx.call(e,o,s.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 o},this.setUA=function(e){return o=e,this},this};T.VERSION=o,T.BROWSER={NAME:d,MAJOR:l,VERSION:g},T.CPU={ARCHITECTURE:v},T.DEVICE={MODEL:p,VENDOR:f,TYPE:h,CONSOLE:y,MOBILE:m,SMARTTV:w,TABLET:_,WEARABLE:E,EMBEDDED:I},T.ENGINE={NAME:d,VERSION:g},T.OS={NAME:d,VERSION:g},e.exports&&(t=e.exports=T),t.UAParser=T;var k=n&&(n.jQuery||n.Zepto);if(k&&!k.ua){var A=new T;k.ua=A.getResult(),k.ua.get=function(){return A.getUA()},k.ua.set=function(e){A.setUA(e);var t=A.getResult();for(var n in t)k.ua[n]=t[n]}}}("object"===typeof window?window:Ae)})),it=(nt.UAParser,function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}),ot="8.3.1",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(){},platform:"Web",savedMaxCount:1e3,saveEvents:!0,saveParamsReferrerOncePerSession:!0,secureCookie:!1,sessionTimeout:18e5,storage:O.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},unsetParamsReferrerOnNewSession:!1,unsentKey:"amplitude_unsent",unsentIdentifyKey:"amplitude_unsent_identify",uploadBatchSize:100,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}},st=function(e){m()||B.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=B.isEmptyString(e)?O.DEFAULT_INSTANCE:e.toLowerCase(),this._unsentEvents=[],this._unsentIdentifys=[],this._ua=new nt(navigator.userAgent).getResult(),this.options=u({},rt,{trackingOptions:u({},rt.trackingOptions)}),this.cookieStorage=(new fe).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};st.prototype.Identify=ke,st.prototype.Revenue=tt,st.prototype.init=function(e,t,n,i){var o=this;if("string"!==R(e)||B.isEmptyString(e))B.log.error("Invalid apiKey. Please re-initialize with a valid apiKey");else try{ut(this.options,n),m()&&void 0!==window.Prototype&&Array.prototype.toJSON&&(I(),B.log.warn("Prototype.js injected Array.prototype.toJSON. Deleting Array.prototype.toJSON to prevent double-stringify")),this.options.cookieName!==rt.cookieName&&B.log.warn("The cookieName option is deprecated. We will be ignoring it for newer cookies"),this.options.apiKey=e,this._storageSuffix="_"+e+(this._instanceName===O.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=O.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 r=!!this.cookieStorage.get(this._oldCookiename),s=!!this._metadataStorage.load();this._useOldCookie=!s&&r&&!this.options.cookieForceUpgrade;var a=s||r;if(this.options.domain=this.cookieStorage.options().domain,this.options.deferInitialization&&!a)return void this._deferInitialization(e,t,n,i);"string"===R(this.options.logLevel)&&B.setLogLevel(this.options.logLevel);var u=vt(this);this._apiPropertiesTrackingOptions=Object.keys(u).length>0?{tracking_options:u}:{},this.options.cookieForceUpgrade&&r&&(s||lt(this),this.cookieStorage.remove(this._oldCookiename)),ct(this),this._pendingReadStorage=!0;var c=function(e){n&&n.deviceId&&!B.validateDeviceId(n.deviceId)&&(B.log.error('Invalid device ID rejected. Randomly generated UUID will be used instead of "'.concat(n.deviceId,'"')),delete n.deviceId),o.options.deviceId=o._getInitialDeviceId(n&&n.deviceId,e),o.options.userId="string"===R(t)&&!B.isEmptyString(t)&&t||"number"===R(t)&&t.toString()||o.options.userId||null;var i=(new Date).getTime();(!o._sessionId||!o._lastEventTime||i-o._lastEventTime>o.options.sessionTimeout)&&(o.options.unsetParamsReferrerOnNewSession&&o._unsetUTMParams(),o._newSession=!0,o._sessionId=i,o.options.saveParamsReferrerOncePerSession&&o._trackParamsAndReferrer()),o.options.saveParamsReferrerOncePerSession||o._trackParamsAndReferrer(),o.options.saveEvents&&(at(o._unsentEvents),at(o._unsentIdentifys)),o._lastEventTime=i,dt(o),o._pendingReadStorage=!1,o._sendEventsIfReady();for(var r=0;r<o._onInit.length;r++)o._onInit[r](o);o._onInit=[],o._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"===R(i)&&i(this)}catch(l){B.log.error(l),"function"===R(n.onError)&&n.onError(l)}},st.prototype.deleteLowerLevelDomainCookies=function(){var e=te(),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("."),o=n.length;o>i.length;--o){var r=n.slice(n.length-o).join(".");ee.set(this._cookieName,null,{domain:"."+r})}ee.set(this._cookieName,null,{})}},st.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||W()};var at=function(e){for(var t=0;t<e.length;t++){var n=e[t].event.user_properties,i=e[t].event.event_properties,o=e[t].event.groups;
1e[t].event.user_properties=B.validateProperties(n),e[t].event.event_properties=B.validateProperties(i),e[t].event.groups=B.validateGroups(o)}};st.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 o=u({},e,t,n,i);Object.keys(o).length>0&&this.logEvent(O.ATTRIBUTION_EVENT,o)}};var ut=function e(t,n){if("object"===R(n)){var i=new Set(["headers"]),o=function(i){if(Object.prototype.hasOwnProperty.call(t,i)){var o=n[i],r=R(t[i]);B.validateInput(o,i+" option",r)&&("boolean"===r?t[i]=!!o:"string"===r&&!B.isEmptyString(o)||"number"===r&&o>0||"function"===r?t[i]=o:"object"===r&&e(t[i],o))}};for(var r in n)i.has(r)?t[r]=u({},t[r],n[r]):Object.prototype.hasOwnProperty.call(n,r)&&o(r)}};st.prototype.runQueuedFunctions=function(){var e=this._q;this._q=[];for(var t=0;t<e.length;t++){var n=this[e[t][0]];"function"===R(n)&&n.apply(this,e[t].slice(1))}},st.prototype._apiKeySet=function(e){return!B.isEmptyString(this.options.apiKey)||(B.log.error("Invalid apiKey. Please set a valid apiKey with init() before calling "+e),!1)},st.prototype._loadSavedUnsentEvents=function(e){var t=this._getFromStorage(he,e),n=this._parseSavedUnsentEventsString(t,e);return this._setInStorage(he,e,JSON.stringify(n)),n},st.prototype._parseSavedUnsentEventsString=function(e,t){if(B.isEmptyString(e))return[];if("string"===R(e))try{var n=JSON.parse(e);if("array"===R(n))return n}catch(bt){}return B.log.error("Unable to load "+t+" events. Restart with a new empty queue."),[]},st.prototype.isNewSession=function(){return this._newSession},st.prototype.onInit=function(e){this._isInitialized?e(this):this._onInit.push(e)},st.prototype.getSessionId=function(){return this._sessionId},st.prototype.nextEventId=function(){return this._eventId++,this._eventId},st.prototype.nextIdentifyId=function(){return this._identifyId++,this._identifyId},st.prototype.nextSequenceNumber=function(){return this._sequenceNumber++,this._sequenceNumber},st.prototype._unsentCount=function(){return this._unsentEvents.length+this._unsentIdentifys.length},st.prototype._sendEventsIfReady=function(){return 0!==this._unsentCount()&&(this.options.batchEvents?this._unsentCount()>=this.options.eventUploadThreshold?(this.sendEvents(),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout(function(){this._updateScheduled=!1,this.sendEvents()}.bind(this),this.options.eventUploadPeriodMillis)),!1):(this.sendEvents(),!0))},st.prototype.clearStorage=function(){return this._metadataStorage.clear()},st.prototype._getFromStorage=function(e,t){return e.getItem(t+this._storageSuffix
1)},st.prototype._setInStorage=function(e,t,n){e.setItem(t+this._storageSuffix,n)};var ct=function(e){if(e._useOldCookie){var t=e.cookieStorage.get(e._oldCookiename);"object"!==R(t)||pt(e,t)}else{var n=e._metadataStorage.load();"object"===R(n)&&pt(e,n)}},lt=function(e){var t=e.cookieStorage.get(e._oldCookiename);"object"===R(t)&&(pt(e,t),dt(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))},dt=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)};st.prototype._initUtmData=function(e,t){e=e||this._getUrlParams(),t=t||this.cookieStorage.get("__utmz");var n=ye(t,e);return ht(this,n),n},st.prototype._unsetUTMParams=function(){var e=new ke;e.unset(O.REFERRER),e.unset(O.UTM_SOURCE),e.unset(O.UTM_MEDIUM),e.unset(O.UTM_CAMPAIGN),e.unset(O.UTM_TERM),e.unset(O.UTM_CONTENT),this.identify(e)};var ht=function(e,t){if("object"===R(t)&&0!==Object.keys(t).length){var n=new ke;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)}};st.prototype._getReferrer=function(){return document.referrer},st.prototype._getUrlParams=function(){return location.search},st.prototype._saveGclid=function(e){var t=B.getQueryParam("gclid",e);if(!B.isEmptyString(t)){var n={gclid:t};return ht(this,n),n}},st.prototype._saveFbclid=function(e){var t=B.getQueryParam("fbclid",e);if(!B.isEmptyString(t)){var n={fbclid:t};return ht(this,n),n}},st.prototype._getDeviceIdFromUrlParam=function(e){return B.getQueryParam(O.AMP_DEVICE_ID_PARAM,e)},st.prototype._getReferringDomain=function(e){if(B.isEmptyString(e))return null;var t=e.split("/");return t.length>=3?t[2]:null},st.prototype._saveReferrer=function(e){if(!B.isEmptyString(e)){var t={referrer:e,referring_domain:this._getReferringDomain(e)};return ht(this,t),t}},st.prototype.saveEvents=function(){try{var e=JSON.stringify(this._unsentEvents.map((function(e){return e.event})));this._setInStorage(he,this.options.unsentKey,e)}catch(bt){}try{var t=JSON.stringify(this._unsentIdentifys.map((function(e){return e.event})));this._setInStorage(he,this.options.unsentIdentifyKey,t)}catch(bt){}},st.prototype.setDomain=function(e){if(this._shouldDeferCall())return this._q.push(["setDomain"].concat(Array.prototype.slice.call(arguments,0)));if(B.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,ct(this),dt(this)}catch(bt){B.log.error(bt)}},st.prototype.setUserId=function(e){if(this._shouldDeferCall())return this._q.push(["setUserId"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.userId=void 0!==e&&null!==e&&""+e||null,dt(this)}catch(bt){B.log.error(bt)}},st.prototype.setGroup=function(e,t){if(this._shouldDeferCall())return this._q.push(["setGroup"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setGroup()")&&B.validateInput(e,"groupType","string")&&!B.isEmptyString(e)){var n={};n[e]=t;var i=(new ke).set(e,t);this._logEvent(O.IDENTIFY_EVENT,null,null,i.userPropertiesOperations,n,null,null,null)}},st.prototype.setOptOut=function(e){if(this._shouldDeferCall())return this._q.push(["setOptOut"].concat(Array.prototype.slice.call(arguments,0)));if(B.validateInput(e,"enable","boolean"))try{this.options.optOut=e,dt(this)}catch(bt){B.log.error(bt)}},st.prototype.setSessionId=function(e){if(B.validateInput(e,"sessionId","number"))try{this._sessionId=e,dt(this)}catch(bt){B.log.error(bt)}},st.prototype.resetSessionId=function(){this.setSessionId((new Date).getTime())},st.prototype.regenerateDeviceId=function(){if(this._shouldDeferCall())return this._q.push(["regenerateDeviceId"].concat(Array.prototype.slice.call(arguments,0)));this.setDeviceId(W())},st.prototype.setDeviceId=function(e){if(this._shouldDeferCall())return this._q.push(["setDeviceId"].concat(Array.prototype.slice.call(arguments,0)));if(B.validateDeviceId(e))try{B.isEmptyString(e)||(this.options.deviceId=""+e,dt(this))}catch(bt){B.log.error(bt)}},st.prototype.setUserProperties=function(e){if(this._shouldDeferCall())return this._q.push(["setUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setUserProperties()")&&B.validateInput(e,"userProperties","object")){var t=B.truncate(B.validateProperties(e));if(0!==Object.keys(t).length){var n=new ke;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.set(i,t[i]);this.identify(n)}}},st.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 ke;e.clearAll(),this.identify(e)}};var ft=function(e,t){for(var n=0;n<t._q.length;n++){var i=e[t._q[n][0]];"function"===R(i)&&i.apply(e,t._q[n].slice(1))}return e};st.prototype.identify=function(e,t){if(this._shouldDeferCall())return this._q.push(["identify"].
1concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("identify()"))if("object"===R(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=ft(new ke,e)),e instanceof ke){if(Object.keys(e.userPropertiesOperations).length>0)return this._logEvent(O.IDENTIFY_EVENT,null,null,e.userPropertiesOperations,null,null,null,t);"function"===R(t)&&t(0,"No request sent",{reason:"No user property operations"})}else B.log.error("Invalid identify input type. Expected Identify object but saw "+R(e)),"function"===R(t)&&t(0,"No request sent",{reason:"Invalid identify input type"});else"function"===R(t)&&t(0,"No request sent",{reason:"API key is not set"})},st.prototype.groupIdentify=function(e,t,n,i){if(this._shouldDeferCall())return this._q.push(["groupIdentify"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("groupIdentify()"))if(B.validateInput(e,"group_type","string")&&!B.isEmptyString(e))if(null!==t&&void 0!==t)if("object"===R(n)&&Object.prototype.hasOwnProperty.call(n,"_q")&&(n=ft(new ke,n)),n instanceof ke){if(Object.keys(n.userPropertiesOperations).length>0)return this._logEvent(O.GROUP_IDENTIFY_EVENT,null,null,null,a({},e,t),n.userPropertiesOperations,null,i);"function"===R(i)&&i(0,"No request sent",{reason:"No group property operations"})}else B.log.error("Invalid identify input type. Expected Identify object but saw "+R(n)),"function"===R(i)&&i(0,"No request sent",{reason:"Invalid identify input type"});else"function"===R(i)&&i(0,"No request sent",{reason:"Invalid group name"});else"function"===R(i)&&i(0,"No request sent",{reason:"Invalid group type"});else"function"===R(i)&&i(0,"No request sent",{reason:"API key is not set"})},st.prototype.setVersionName=function(e){if(this._shouldDeferCall())return this._q.push(["setVersionName"].concat(Array.prototype.slice.call(arguments,0)));B.validateInput(e,"versionName","string")&&(this.options.versionName=e)},st.prototype._logEvent=function(e,t,n,i,o,r,s,a){if(ct(this),e)if(this.options.optOut)"function"===R(a)&&a(0,"No request sent",{reason:"optOut is set to true"});else try{var c;c=e===O.IDENTIFY_EVENT||e===O.GROUP_IDENTIFY_EVENT?this.nextIdentifyId():this.nextEventId();var l=this.nextSequenceNumber(),p="number"===R(s)?s:(new Date).getTime();(!this._sessionId||!this._lastEventTime||p-this._lastEventTime>this.options.sessionTimeout)&&(this._sessionId=p),this._lastEventTime=p,dt(this);var d=this._ua.browser.name,h=this._ua.browser.major,f=this._ua.os.name;i=i||{};var g=u({},this._apiPropertiesTrackingOptions);n=u({},n||{},g),t=t||{},o=o||{},r=r||{};var v={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:p,event_id:c,session_id:this._sessionId||-1,event_type:e,version_name:this.options.versionName||null,platform:gt(this,"platform")?this.options.platform:null,os_name:gt(this,"os_name")&&d||null,os_version:gt(this,"os_version")&&h||null,device_model:gt(this,"device_model")&&f||null,language:gt(this,"language")?this.options.language:null,api_properties:n,event_properties:B.truncate(B.validateProperties(t)),user_properties:B.truncate(B.validateProperties(i)),uuid:it(),library:{name:"amplitude-js",version:ot},sequence_number:l,groups:B.truncate(B.validateGroups(o)),group_properties:B.truncate(B.validateProperties(r)),user_agent:this._userAgent};return e===O.IDENTIFY_EVENT||e===O.GROUP_IDENTIFY_EVENT?(this._unsentIdentifys.push({event:v,callback:a}),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push({event:v,callback:a}),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(),c}catch(bt){B.log.error(bt)}else"function"===R(a)&&a(0,"No request sent",{reason:"Missing eventType"})};var gt=function(e,t){return!!e.options.trackingOptions[t]},vt=function(e){for(var t=["city","country","dma","ip_address","region"],n={},i=0;i<t.length;i++){var o=t[i];gt(e,o)||(n[o]=!1)}return n};st.prototype._limitEventsQueued=function(e){e.length>this.options.savedMaxCount&&e.splice(0,e.length-this.options.savedMaxCount).forEach((function(e){"function"===R(e.callback)&&e.callback(0,"No request sent",{reason:"Event dropped because options.savedMaxCount exceeded. User may be offline or have a content blocker"})}))},st.prototype.logEvent=function(e,t,n){return this._shouldDeferCall()?this._q.push(["logEvent"].concat(Array.prototype.slice.call(arguments,0))):this.logEventWithTimestamp(e,t,null,n)},st.prototype.logEventWithTimestamp=function(e,t,n,i){return this._shouldDeferCall()?this._q.push(["logEventWithTimestamp"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEvent()")?B.validateInput(e,"eventType","string")?B.isEmptyString(e)?("function"===R(i)&&i(0,"No request sent",{reason:"Missing eventType"}),-1):this._logEvent(e,t,null,null,null,null,n,i):("function"===R(i)&&i(0,"No request sent",{reason:"Invalid type for eventType"}),-1):("function"===R(i)&&i(0,"No request sent",{reason:"API key not set"}),-1)},st.prototype.logEventWithGroups=function(e,t,n,i){return this._shouldDeferCall()?this._q.push(["logEventWithGroups"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEventWithGroups()")?B.validateInput(e,"eventType","string")?this._logEvent(e,t,null,null,n,null,null,i):("function"===R(i)&&i(0,"No request sent",{reason:"Invalid type for eventType"}),-1):("function"===R(i)&&i(0,"No request sent",{reason:"API key not set"}),-1)};var yt=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};st.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"===R(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=ft(new tt,e)),e instanceof tt){if(e&&e._isValidRevenue())return this.logEvent(O.REVENUE_EVENT,e._toJSONObject())}else B.log.error("Invalid revenue input type. Expected Revenue object but saw "+R(e))},st.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(O.REVENUE_EVENT,{},{productId:n,special:"revenue_amount",quantity:t||1,price:e}
1,null,null,null,null,null):-1},st.prototype.removeEvents=function(e,t,n,i){mt(this,"_unsentEvents",e,n,i),mt(this,"_unsentIdentifys",t,n,i)};var mt=function(e,t,n,i,o){if(!(n<0)){for(var r=[],s=0;s<e[t].length;s++){var a=e[t][s];a.event.event_id>n?r.push(a):a.callback&&a.callback(i,o)}e[t]=r}};st.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()&&!this._sending){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,o=n.maxIdentifyId,r=JSON.stringify(n.eventsToSend.map((function(e){return e.event}))),s=(new Date).getTime(),a={client:this.options.apiKey,e:r,v:O.API_VERSION,upload_time:s,checksum:Ce(O.API_VERSION+this.options.apiKey+r+s)},u=this;new Ze(e,a,this.options.headers).send((function(e,n){u._sending=!1;try{200===e&&"success"===n?(u.removeEvents(i,o,e,n),u.options.saveEvents&&u.saveEvents(),u._sendEventsIfReady()):413===e&&(1===u.options.uploadBatchSize&&u.removeEvents(i,o,e,n),u.options.uploadBatchSize=Math.ceil(t/2),u.sendEvents())}catch(bt){}}))}}else this.removeEvents(1/0,1/0,0,"No request sent",{reason:"API key not set"})},st.prototype._mergeEventsAndIdentifys=function(e){for(var t=[],n=0,i=-1,o=0,r=-1;t.length<e;){var s=void 0,a=o>=this._unsentIdentifys.length,u=n>=this._unsentEvents.length;if(u&&a){B.log.error("Merging Events and Identifys, less events and identifys than expected");break}a?i=(s=this._unsentEvents[n++]).event.event_id:u?r=(s=this._unsentIdentifys[o++]).event.event_id:!("sequence_number"in this._unsentEvents[n].event)||this._unsentEvents[n].event.sequence_number<this._unsentIdentifys[o].event.sequence_number?i=(s=this._unsentEvents[n++]).event.event_id:r=(s=this._unsentIdentifys[o++]).event.event_id,t.push(s)}return{eventsToSend:t,maxEventId:i,maxIdentifyId:r}},st.prototype.setGlobalUserProperties=function(e){this.setUserProperties(e)},st.prototype.__VERSION__=ot,st.prototype._shouldDeferCall=function(){return this._pendingReadStorage||this._initializationDeferred},st.prototype._deferInitialization=function(){this._initializationDeferred=!0,this._q.push(["init"].concat(Array.prototype.slice.call(arguments,0)))},st.prototype.enableTracking=function(){this._initializationDeferred=!1,dt(this),this.runQueuedFunctions()};var _t=function(){this.options=u({},rt),this._q=[],this._instances={}};_t.prototype.Identify=ke,_t.prototype.Revenue=tt,_t.prototype.getInstance=function(e){e=B.isEmptyString(e)?O.DEFAULT_INSTANCE:e.toLowerCase();var t=this._instances[e];return void 0===t&&(t=new st(e),this._instances[e]=t),t},_t.prototype.runQueuedFunctions=function(){for(var e=0;e<this._q.length;e++){var t=this[this._q[e][0]];"function"===R(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()},_t.prototype.init=function(e,t,n,i){this.getInstance().init(e,t,n,function(e){this.options=e.options,"function"===R(i)&&i(e)}.bind(this))},_t.prototype.isNewSession=function(){return this.getInstance().isNewSession()},_t.prototype.getSessionId=function(){return this.getInstance().getSessionId()},_t.prototype.nextEventId=function(){return this.getInstance().nextEventId()},_t.prototype.nextIdentifyId=function(){return this.getInstance().nextIdentifyId()},_t.prototype.nextSequenceNumber=function(){return this.getInstance().nextSequenceNumber()},_t.prototype.saveEvents=function(){this.getInstance().saveEvents()},_t.prototype.setDomain=function(e){this.getInstance().setDomain(e)},_t.prototype.setUserId=function(e){this.getInstance().setUserId(e)},_t.prototype.setGroup=function(e,t){this.getInstance().setGroup(e,t)},_t.prototype.setOptOut=function(e){this.getInstance().setOptOut(e)},_t.prototype.regenerateDeviceId=function(){this.getInstance().regenerateDeviceId()},_t.prototype.setDeviceId=function(e){this.getInstance().setDeviceId(e)},_t.prototype.setUserProperties=function(e){this.getInstance().setUserProperties(e)},_t.prototype.clearUserProperties=function(){this.getInstance().clearUserProperties()},_t.prototype.identify=function(e,t){this.getInstance().identify(e,t)},_t.prototype.setVersionName=function(e){this.getInstance().setVersionName(e)},_t.prototype.logEvent=function(e,t,n){return this.getInstance().logEvent(e,t,n)},_t.prototype.logEventWithGroups=function(e,t,n,i){return this.getInstance().logEventWithGroups(e,t,n,i)},_t.prototype.logRevenueV2=function(e){return this.getInstance().logRevenueV2(e)},_t.prototype.logRevenue=function(e,t,n){return this.getInstance().logRevenue(e,t,n)},_t.prototype.removeEvents=function(e,t){this.getInstance().removeEvents(e,t)},_t.prototype.sendEvents=function(e){this.getInstance().sendEvents(e)},_t.prototype.setGlobalUserProperties=function(e){this.getInstance().setUserProperties(e)},_t.prototype.__VERSION__=ot;var wt=window.amplitude||{}
1,Et=new _t;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}()}}]);
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.