@v-tilt/browser 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";function e(e,t,i,r,a,n,s){try{var o=e[n](s),u=o.value}catch(e){return void i(e)}o.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var i=this,r=arguments;return new Promise(function(a,n){var s=t.apply(i,r);function o(t){e(s,a,n,o,u,"next",t)}function u(t){e(s,a,n,o,u,"throw",t)}o(void 0)})}}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},i.apply(null,arguments)}class r{constructor(e){void 0===e&&(e={}),this.config=this.parseConfigFromScript(e)}parseConfigFromScript(e){if(!document.currentScript)return i({token:e.token||""},e);var t=document.currentScript,r=i({token:""},e);if(r.api_host=t.getAttribute("data-api-host")||t.getAttribute("data-host")||e.api_host,r.proxy=t.getAttribute("data-proxy")||e.proxy,r.proxyUrl=t.getAttribute("data-proxy-url")||e.proxyUrl,r.token=t.getAttribute("data-token")||e.token||"",r.projectId=t.getAttribute("data-project-id")||e.projectId||"",r.domain=t.getAttribute("data-domain")||e.domain,r.storage=t.getAttribute("data-storage")||e.storage,r.stringifyPayload="false"!==t.getAttribute("data-stringify-payload"),r.capture_performance="true"===t.getAttribute("data-capture-performance")||e.capture_performance,r.proxy&&r.proxyUrl)throw console.error("Error: Both data-proxy and data-proxy-url are specified. Please use only one of them."),new Error("Both data-proxy and data-proxy-url are specified. Please use only one of them.");for(var a of(r.globalAttributes=i({},e.globalAttributes),Array.from(t.attributes)))a.name.startsWith("data-vt-")&&(r.globalAttributes[a.name.slice(8).replace(/-/g,"_")]=a.value);return r}getConfig(){return i({},this.config)}updateConfig(e){this.config=i({},this.config,e)}}var a="__vt_session",n="__vt_window_id",s="__vt_primary_window",o="__vt_user_state",u="__vt_device_id",c="__vt_anonymous_id",l="__vt_distinct_id",d="__vt_user_properties",h="localStorage",g="localStorage+cookie",f="sessionStorage",p="memory",_="$initial_person_info",v={"Europe/Andorra":"AD","Asia/Dubai":"AE","Asia/Kabul":"AF","America/Antigua":"AG","America/Anguilla":"AI","Europe/Tirane":"AL","Asia/Yerevan":"AM","Africa/Luanda":"AO","Antarctica/Casey":"AQ","Antarctica/Davis":"AQ","Antarctica/DumontDUrville":"AQ","Antarctica/Mawson":"AQ","Antarctica/McMurdo":"AQ","Antarctica/Palmer":"AQ","Antarctica/Rothera":"AQ","Antarctica/Syowa":"AQ","Antarctica/Troll":"AQ","Antarctica/Vostok":"AQ","America/Argentina/Buenos_Aires":"AR","America/Argentina/Catamarca":"AR","America/Argentina/Cordoba":"AR","America/Argentina/Jujuy":"AR","America/Argentina/La_Rioja":"AR","America/Argentina/Mendoza":"AR","America/Argentina/Rio_Gallegos":"AR","America/Argentina/Salta":"AR","America/Argentina/San_Juan":"AR","America/Argentina/San_Luis":"AR","America/Argentina/Tucuman":"AR","America/Argentina/Ushuaia":"AR","Pacific/Pago_Pago":"AS","Europe/Vienna":"AT","Australia/Adelaide":"AU","Australia/Brisbane":"AU","Australia/Broken_Hill":"AU","Australia/Darwin":"AU","Australia/Eucla":"AU","Australia/Hobart":"AU","Australia/Lindeman":"AU","Australia/Lord_Howe":"AU","Australia/Melbourne":"AU","Australia/Perth":"AU","Australia/Sydney":"AU","America/Aruba":"AW","Europe/Mariehamn":"AX","Asia/Baku":"AZ","Europe/Sarajevo":"BA","America/Barbados":"BB","Asia/Dhaka":"BD","Europe/Brussels":"BE","Africa/Ouagadougou":"BF","Europe/Sofia":"BG","Asia/Bahrain":"BH","Africa/Bujumbura":"BI","Africa/Porto-Novo":"BJ","America/St_Barthelemy":"BL","Atlantic/Bermuda":"BM","Asia/Brunei":"BN","America/La_Paz":"BO","America/Kralendijk":"BQ","America/Araguaina":"BR","America/Bahia":"BR","America/Belem":"BR","America/Boa_Vista":"BR","America/Campo_Grande":"BR","America/Cuiaba":"BR","America/Eirunepe":"BR","America/Fortaleza":"BR","America/Maceio":"BR","America/Manaus":"BR","America/Noronha":"BR","America/Porto_Velho":"BR","America/Recife":"BR","America/Rio_Branco":"BR","America/Santarem":"BR","America/Sao_Paulo":"BR","America/Nassau":"BS","Asia/Thimphu":"BT","Africa/Gaborone":"BW","Europe/Minsk":"BY","America/Belize":"BZ","America/Atikokan":"CA","America/Blanc-Sablon":"CA","America/Cambridge_Bay":"CA","America/Creston":"CA","America/Dawson":"CA","America/Dawson_Creek":"CA","America/Edmonton":"CA","America/Fort_Nelson":"CA","America/Glace_Bay":"CA","America/Goose_Bay":"CA","America/Halifax":"CA","America/Inuvik":"CA","America/Iqaluit":"CA","America/Moncton":"CA","America/Nipigon":"CA","America/Pangnirtung":"CA","America/Rainy_River":"CA","America/Rankin_Inlet":"CA","America/Regina":"CA","America/Resolute":"CA","America/St_Johns":"CA","America/Swift_Current":"CA","America/Thunder_Bay":"CA","America/Toronto":"CA","America/Vancouver":"CA","America/Whitehorse":"CA","America/Winnipeg":"CA","America/Yellowknife":"CA","Indian/Cocos":"CC","Africa/Kinshasa":"CD","Africa/Lubumbashi":"CD","Africa/Bangui":"CF","Africa/Brazzaville":"CG","Europe/Zurich":"CH","Africa/Abidjan":"CI","Pacific/Rarotonga":"CK","America/Punta_Arenas":"CL","America/Santiago":"CL","Pacific/Easter":"CL","Africa/Douala":"CM","Asia/Shanghai":"CN","Asia/Urumqi":"CN","America/Bogota":"CO","America/Costa_Rica":"CR","America/Havana":"CU","Atlantic/Cape_Verde":"CV","America/Curacao":"CW","Indian/Christmas":"CX","Asia/Famagusta":"CY","Asia/Nicosia":"CY","Europe/Prague":"CZ","Europe/Berlin":"DE","Europe/Busingen":"DE","Africa/Djibouti":"DJ","Europe/Copenhagen":"DK","America/Dominica":"DM","America/Santo_Domingo":"DO","Africa/Algiers":"DZ","America/Guayaquil":"EC","Pacific/Galapagos":"EC","Europe/Tallinn":"EE","Africa/Cairo":"EG","Africa/El_Aaiun":"EH","Africa/Asmara":"ER","Africa/Ceuta":"ES","Atlantic/Canary":"ES","Europe/Madrid":"ES","Africa/Addis_Ababa":"ET","Europe/Helsinki":"FI","Pacific/Fiji":"FJ","Atlantic/Stanley":"FK","Pacific/Chuuk":"FM","Pacific/Kosrae":"FM","Pacific/Pohnpei":"FM","Atlantic/Faroe":"FO","Europe/Paris":"FR","Africa/Libreville":"GA","Europe/London":"GB","America/Grenada":"GD","Asia/Tbilisi":"GE","America/Cayenne":"GF","Europe/Guernsey":"GG","Africa/Accra":"GH","Europe/Gibraltar":"GI","America/Danmarkshavn":"GL","America/Nuuk":"GL","America/Scoresbysund":"GL","America/Thule":"GL","Africa/Banjul":"GM","Africa/Conakry":"GN","America/Guadeloupe":"GP","Africa/Malabo":"GQ","Europe/Athens":"GR","Atlantic/South_Georgia":"GS","America/Guatemala":"GT","Pacific/Guam":"GU","Africa/Bissau":"GW","America/Guyana":"GY","Asia/Hong_Kong":"HK","America/Tegucigalpa":"HN","Europe/Zagreb":"HR","America/Port-au-Prince":"HT","Europe/Budapest":"HU","Asia/Jakarta":"ID","Asia/Jayapura":"ID","Asia/Makassar":"ID","Asia/Pontianak":"ID","Europe/Dublin":"IE","Asia/Jerusalem":"IL","Europe/Isle_of_Man":"IM","Asia/Kolkata":"IN","Indian/Chagos":"IO","Asia/Baghdad":"IQ","Asia/Tehran":"IR","Atlantic/Reykjavik":"IS","Europe/Rome":"IT","Europe/Jersey":"JE","America/Jamaica":"JM","Asia/Amman":"JO","Asia/Tokyo":"JP","Africa/Nairobi":"KE","Asia/Bishkek":"KG","Asia/Phnom_Penh":"KH","Pacific/Enderbury":"KI","Pacific/Kiritimati":"KI","Pacific/Tarawa":"KI","Indian/Comoro":"KM","America/St_Kitts":"KN","Asia/Pyongyang":"KP","Asia/Seoul":"KR","Asia/Kuwait":"KW","America/Cayman":"KY","Asia/Almaty":"KZ","Asia/Aqtau":"KZ","Asia/Aqtobe":"KZ","Asia/Atyrau":"KZ","Asia/Oral":"KZ","Asia/Qostanay":"KZ","Asia/Qyzylorda":"KZ","Asia/Vientiane":"LA","Asia/Beirut":"LB","America/St_Lucia":"LC","Europe/Vaduz":"LI","Asia/Colombo":"LK","Africa/Monrovia":"LR","Africa/Maseru":"LS","Europe/Vilnius":"LT","Europe/Luxembourg":"LU","Europe/Riga":"LV","Africa/Tripoli":"LY","Africa/Casablanca":"MA","Europe/Monaco":"MC","Europe/Chisinau":"MD","Europe/Podgorica":"ME","America/Marigot":"MF","Indian/Antananarivo":"MG","Pacific/Kwajalein":"MH","Pacific/Majuro":"MH","Europe/Skopje":"MK","Africa/Bamako":"ML","Asia/Yangon":"MM","Asia/Choibalsan":"MN","Asia/Hovd":"MN","Asia/Ulaanbaatar":"MN","Asia/Macau":"MO","Pacific/Saipan":"MP","America/Martinique":"MQ","Africa/Nouakchott":"MR","America/Montserrat":"MS","Europe/Malta":"MT","Indian/Mauritius":"MU","Indian/Maldives":"MV","Africa/Blantyre":"MW","America/Bahia_Banderas":"MX","America/Cancun":"MX","America/Chihuahua":"MX","America/Hermosillo":"MX","America/Matamoros":"MX","America/Mazatlan":"MX","America/Merida":"MX","America/Mexico_City":"MX","America/Monterrey":"MX","America/Ojinaga":"MX","America/Tijuana":"MX","Asia/Kuala_Lumpur":"MY","Asia/Kuching":"MY","Africa/Maputo":"MZ","Africa/Windhoek":"NA","Pacific/Noumea":"NC","Africa/Niamey":"NE","Pacific/Norfolk":"NF","Africa/Lagos":"NG","America/Managua":"NI","Europe/Amsterdam":"NL","Europe/Oslo":"NO","Asia/Kathmandu":"NP","Pacific/Nauru":"NR","Pacific/Niue":"NU","Pacific/Auckland":"NZ","Pacific/Chatham":"NZ","Asia/Muscat":"OM","America/Panama":"PA","America/Lima":"PE","Pacific/Gambier":"PF","Pacific/Marquesas":"PF","Pacific/Tahiti":"PF","Pacific/Bougainville":"PG","Pacific/Port_Moresby":"PG","Asia/Manila":"PH","Asia/Karachi":"PK","Europe/Warsaw":"PL","America/Miquelon":"PM","Pacific/Pitcairn":"PN","America/Puerto_Rico":"PR","Asia/Gaza":"PS","Asia/Hebron":"PS","Atlantic/Azores":"PT","Atlantic/Madeira":"PT","Europe/Lisbon":"PT","Pacific/Palau":"PW","America/Asuncion":"PY","Asia/Qatar":"QA","Indian/Reunion":"RE","Europe/Bucharest":"RO","Europe/Belgrade":"RS","Asia/Anadyr":"RU","Asia/Barnaul":"RU","Asia/Chita":"RU","Asia/Irkutsk":"RU","Asia/Kamchatka":"RU","Asia/Khandyga":"RU","Asia/Krasnoyarsk":"RU","Asia/Magadan":"RU","Asia/Novokuznetsk":"RU","Asia/Novosibirsk":"RU","Asia/Omsk":"RU","Asia/Sakhalin":"RU","Asia/Srednekolymsk":"RU","Asia/Tomsk":"RU","Asia/Ust-Nera":"RU","Asia/Vladivostok":"RU","Asia/Yakutsk":"RU","Asia/Yekaterinburg":"RU","Europe/Astrakhan":"RU","Europe/Kaliningrad":"RU","Europe/Kirov":"RU","Europe/Moscow":"RU","Europe/Samara":"RU","Europe/Saratov":"RU","Europe/Ulyanovsk":"RU","Europe/Volgograd":"RU","Africa/Kigali":"RW","Asia/Riyadh":"SA","Pacific/Guadalcanal":"SB","Indian/Mahe":"SC","Africa/Khartoum":"SD","Europe/Stockholm":"SE","Asia/Singapore":"SG","Atlantic/St_Helena":"SH","Europe/Ljubljana":"SI","Arctic/Longyearbyen":"SJ","Europe/Bratislava":"SK","Africa/Freetown":"SL","Europe/San_Marino":"SM","Africa/Dakar":"SN","Africa/Mogadishu":"SO","America/Paramaribo":"SR","Africa/Juba":"SS","Africa/Sao_Tome":"ST","America/El_Salvador":"SV","America/Lower_Princes":"SX","Asia/Damascus":"SY","Africa/Mbabane":"SZ","America/Grand_Turk":"TC","Africa/Ndjamena":"TD","Indian/Kerguelen":"TF","Africa/Lome":"TG","Asia/Bangkok":"TH","Asia/Dushanbe":"TJ","Pacific/Fakaofo":"TK","Asia/Dili":"TL","Asia/Ashgabat":"TM","Africa/Tunis":"TN","Pacific/Tongatapu":"TO","Europe/Istanbul":"TR","America/Port_of_Spain":"TT","Pacific/Funafuti":"TV","Asia/Taipei":"TW","Africa/Dar_es_Salaam":"TZ","Europe/Kiev":"UA","Europe/Simferopol":"UA","Europe/Uzhgorod":"UA","Europe/Zaporozhye":"UA","Africa/Kampala":"UG","Pacific/Midway":"UM","Pacific/Wake":"UM","America/Adak":"US","America/Anchorage":"US","America/Boise":"US","America/Chicago":"US","America/Denver":"US","America/Detroit":"US","America/Indiana/Indianapolis":"US","America/Indiana/Knox":"US","America/Indiana/Marengo":"US","America/Indiana/Petersburg":"US","America/Indiana/Tell_City":"US","America/Indiana/Vevay":"US","America/Indiana/Vincennes":"US","America/Indiana/Winamac":"US","America/Juneau":"US","America/Kentucky/Louisville":"US","America/Kentucky/Monticello":"US","America/Los_Angeles":"US","America/Menominee":"US","America/Metlakatla":"US","America/New_York":"US","America/Nome":"US","America/North_Dakota/Beulah":"US","America/North_Dakota/Center":"US","America/North_Dakota/New_Salem":"US","America/Phoenix":"US","America/Sitka":"US","America/Yakutat":"US","Pacific/Honolulu":"US","America/Montevideo":"UY","Asia/Samarkand":"UZ","Asia/Tashkent":"UZ","Europe/Vatican":"VA","America/St_Vincent":"VC","America/Caracas":"VE","America/Tortola":"VG","America/St_Thomas":"VI","Asia/Ho_Chi_Minh":"VN","Pacific/Efate":"VU","Pacific/Wallis":"WF","Pacific/Apia":"WS","Asia/Aden":"YE","Indian/Mayotte":"YT","Africa/Johannesburg":"ZA","Africa/Lusaka":"ZM","Africa/Harare":"ZW"};function m(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16))}function A(e){return!(!e||"string"!=typeof e)&&!(e.length<2||e.length>10240)}function y(e,t,i){if(e)if(Array.isArray(e))e.forEach((e,r)=>{t.call(i,e,r)});else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(i,e[r],r)}function S(e,t,i,r){var{capture:a=!1,passive:n=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:a,passive:n})}function w(e,t){if(!t)return e;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function I(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];for(var a of i)for(var n of a)e.push(n);return e}var b="undefined"!=typeof window?window:void 0,M="undefined"!=typeof globalThis?globalThis:b,E=null==M?void 0:M.navigator,P=null==M?void 0:M.document,C=null==M?void 0:M.location,k=null==M?void 0:M.fetch,T=(null==M?void 0:M.XMLHttpRequest)&&"withCredentials"in new M.XMLHttpRequest?M.XMLHttpRequest:void 0;null==M||M.AbortController;var U=null==E?void 0:E.userAgent,R=null!=b?b:{};class B{constructor(e,t){void 0===e&&(e="cookie"),this.storageMethod=e,this.domain=t,this._windowId=void 0,this._initializeWindowId()}_isWebStorage(){return this.storageMethod===h||this.storageMethod===f}_getStorage(){return this._isWebStorage()?this.storageMethod===h?localStorage:sessionStorage:null}_createSessionData(e){return{value:e,expiry:(new Date).getTime()+18e5}}_storeSessionIdInWebStorage(e){var t=this._getStorage();if(t){var i=this._createSessionData(e);t.setItem(a,JSON.stringify(i))}}getSessionIdFromCookie(){var e={};return document.cookie.split(";").forEach(function(t){var[i,r]=t.split("=");e[i.trim()]=r}),e[a]||null}setSessionIdFromCookie(e){var t=a+"="+e+"; Max-Age=1800; path=/; secure";this.domain&&(t+="; domain="+this.domain),document.cookie=t}_storeSessionId(e){this._isWebStorage()?this._storeSessionIdInWebStorage(e):this.setSessionIdFromCookie(e)}_getSessionIdRaw(){var e=this._getStorage();if(e){var t=e.getItem(a);if(!t)return null;var i=null;try{i=JSON.parse(t)}catch(e){return null}return"object"!=typeof i||null===i?null:(new Date).getTime()>i.expiry?(e.removeItem(a),null):i.value}return this.getSessionIdFromCookie()}getSessionId(){var e=this._getSessionIdRaw();return e||(e=m(),this._storeSessionId(e)),e}setSessionId(){var e=this._getSessionIdRaw()||m();return this._storeSessionId(e),e}_clearSessionId(){var e=this._getStorage();if(e)e.removeItem(a);else{var t="Thu, 01 Jan 1970 00:00:00 UTC";document.cookie=a+"=; expires="+t+"; path=/;",this.domain&&(document.cookie=a+"=; expires="+t+"; path=/; domain="+this.domain+";")}}resetSessionId(){this._clearSessionId(),this.setSessionId(),this._setWindowId(m())}getWindowId(){if(this._windowId)return this._windowId;if(this._canUseSessionStorage()&&b){var e=b.sessionStorage.getItem(n);if(e)return this._windowId=e,e}var t=m();return this._setWindowId(t),t}_setWindowId(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&b&&b.sessionStorage.setItem(n,e))}_canUseSessionStorage(){if(void 0===b||!b.sessionStorage)return!1;try{var e="__vt_session_storage_test__";return b.sessionStorage.setItem(e,"test"),b.sessionStorage.removeItem(e),!0}catch(e){return!1}}_initializeWindowId(){if(this._canUseSessionStorage()&&b){var e=b.sessionStorage.getItem(s),t=b.sessionStorage.getItem(n);t&&!e?this._windowId=t:(t&&b.sessionStorage.removeItem(n),this._setWindowId(m())),b.sessionStorage.setItem(s,"true"),this._listenToUnload()}else this._windowId=m()}_listenToUnload(){b&&this._canUseSessionStorage()&&S(b,"beforeunload",()=>{b&&b.sessionStorage&&b.sessionStorage.removeItem(s)},{capture:!1})}}function L(e){if(!P)return null;var t=P.createElement("a");return t.href=e,t}function D(e,t){for(var i=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<i.length;r++){var a=i[r].split("=");if(a[0]===t){if(a.length<2)return"";var n=a[1];try{n=decodeURIComponent(n)}catch(e){}return n.replace(/\+/g," ")}}return""}function x(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),a=r[0]||"",n=r[1],s=a.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),l=[],d=0;d<c.length;d++){var h=c[d].split("="),g=h[0],f=h.slice(1).join("=");-1!==t.indexOf(g)?l.push(g+"="+i):g&&l.push(g+(f?"="+f:""))}var p=l.join("&");return u+(p?"?"+p:"")+(n?"#"+n:"")}function O(e){return"function"==typeof e}var q="Mobile",N="iOS",V="Android",$="Tablet",K=V+" "+$,G="iPad",F="Apple",j=F+" Watch",W="Safari",H="BlackBerry",z="Samsung",J=z+"Browser",Q=z+" Internet",Z="Chrome",X=Z+" OS",Y=Z+" "+N,ee="Internet Explorer",te=ee+" "+q,ie="Opera",re=ie+" Mini",ae="Edge",ne="Microsoft "+ae,se="Firefox",oe=se+" "+N,ue="Nintendo",ce="PlayStation",le="Xbox",de=V+" "+q,he=q+" "+W,ge="Windows",fe=ge+" Phone",pe="Nokia",_e="Ouya",ve="Generic",me=ve+" "+q.toLowerCase(),Ae=ve+" "+$.toLowerCase(),ye="Konqueror",Se="(\\d+(\\.\\d+)?)",we=new RegExp("Version/"+Se),Ie=new RegExp(le,"i"),be=new RegExp(ce+" \\w+","i"),Me=new RegExp(ue+" \\w+","i"),Ee=new RegExp(H+"|PlayBook|BB10","i"),Pe={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function Ce(e,t){return e.toLowerCase().includes(t.toLowerCase())}var ke=(e,t)=>t&&Ce(t,F)||function(e){return Ce(e,W)&&!Ce(e,Z)&&!Ce(e,V)}(e),Te=function(e,t){return t=t||"",Ce(e," OPR/")&&Ce(e,"Mini")?re:Ce(e," OPR/")?ie:Ee.test(e)?H:Ce(e,"IE"+q)||Ce(e,"WPDesktop")?te:Ce(e,J)?Q:Ce(e,ae)||Ce(e,"Edg/")?ne:Ce(e,"FBIOS")?"Facebook "+q:Ce(e,"UCWEB")||Ce(e,"UCBrowser")?"UC Browser":Ce(e,"CriOS")?Y:Ce(e,"CrMo")||Ce(e,Z)?Z:Ce(e,V)&&Ce(e,W)?de:Ce(e,"FxiOS")?oe:Ce(e.toLowerCase(),ye.toLowerCase())?ye:ke(e,t)?Ce(e,q)?he:W:Ce(e,se)?se:Ce(e,"MSIE")||Ce(e,"Trident/")?ee:Ce(e,"Gecko")?se:""},Ue={[te]:[new RegExp("rv:"+Se)],[ne]:[new RegExp(ae+"?\\/"+Se)],[Z]:[new RegExp("("+Z+"|CrMo)\\/"+Se)],[Y]:[new RegExp("CriOS\\/"+Se)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Se)],[W]:[we],[he]:[we],[ie]:[new RegExp("(Opera|OPR)\\/"+Se)],[se]:[new RegExp(se+"\\/"+Se)],[oe]:[new RegExp("FxiOS\\/"+Se)],[ye]:[new RegExp("Konqueror[:/]?"+Se,"i")],[H]:[new RegExp(H+" "+Se),we],[de]:[new RegExp("android\\s"+Se,"i")],[Q]:[new RegExp(J+"\\/"+Se)],[ee]:[new RegExp("(rv:|MSIE )"+Se)],Mozilla:[new RegExp("rv:"+Se)]},Re=function(e,t){var i=Te(e,t),r=Ue[i];if(void 0===r)return null;for(var a=0;a<r.length;a++){var n=r[a],s=e.match(n);if(s)return parseFloat(s[s.length-2])}return null},Be=[[new RegExp(le+"; "+le+" (.*?)[);]","i"),e=>[le,e&&e[1]||""]],[new RegExp(ue,"i"),[ue,""]],[new RegExp(ce,"i"),[ce,""]],[Ee,[H,""]],[new RegExp(ge,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[fe,""];if(new RegExp(q).test(t)&&!/IEMobile\b/.test(t))return[ge+" "+q,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=i[1],a=Pe[r]||"";return/arm/i.test(t)&&(a="RT"),[ge,a]}return[ge,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[N,t.join(".")]}return[N,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=void 0===e[2]?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+V+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+V+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[V,t.join(".")]}return[V,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var i=[e[1],e[2],e[3]||"0"];t[1]=i.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[X,""]],[/Linux|debian/i,["Linux",""]]],Le=function(e){return Me.test(e)?ue:be.test(e)?ce:Ie.test(e)?le:new RegExp(_e,"i").test(e)?_e:new RegExp("("+fe+"|WPDesktop)","i").test(e)?fe:/iPad/.test(e)?G:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?j:Ee.test(e)?H:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(pe,"i").test(e)?pe:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(q).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?V:K:V:new RegExp("(pda|"+q+")","i").test(e)?me:new RegExp($,"i").test(e)&&!new RegExp($+" pc","i").test(e)?Ae:""},De="https?://(.*)",xe=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Oe=I(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],xe),qe="<masked>";function Ne(e){var t=function(e){return e?0===e.search(De+"google.([^/?]*)")?"google":0===e.search(De+"bing.com")?"bing":0===e.search(De+"yahoo.com")?"yahoo":0===e.search(De+"duckduckgo.com")?"duckduckgo":null:null}(e),i="yahoo"!==t?"q":"p",r={};if(null!==t){r.$search_engine=t;var a=P?D(P.referrer,i):"";a.length&&(r.ph_keyword=a)}return r}function Ve(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function $e(){return(null==P?void 0:P.referrer)||"$direct"}function Ke(){var e;return(null==P?void 0:P.referrer)&&(null===(e=L(P.referrer))||void 0===e?void 0:e.host)||"$direct"}function Ge(e){var t,{r:i,u:r}=e,a={$referrer:i,$referring_domain:null==i?void 0:"$direct"===i?"$direct":null===(t=L(i))||void 0===t?void 0:t.host};if(r){a.$current_url=r;var n=L(r);a.$host=null==n?void 0:n.host,a.$pathname=null==n?void 0:n.pathname;var s=function(e){var t=Oe.concat([]),i={};return y(t,function(t){var r=D(e,t);i[t]=r||null}),i}(r);w(a,s)}i&&w(a,Ne(i));return a}function Fe(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function je(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function We(e,t){if(!U)return{};var i,r,a,[n,s]=function(e){for(var t=0;t<Be.length;t++){var[i,r]=Be[t],a=i.exec(e),n=a&&(O(r)?r(a,e):r);if(n)return n}return["",""]}(U);return w(function(e){var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=e[i];null!=r&&""!==r&&(t[i]=r)}return t}({$os:n,$os_version:s,$browser:Te(U,navigator.vendor),$device:Le(U),$device_type:(r=U,a=Le(r),a===G||a===K||"Kobo"===a||"Kindle Fire"===a||a===Ae?$:a===ue||a===le||a===ce||a===_e?"Console":a===j?"Wearable":a?q:"Desktop"),$timezone:Fe(),$timezone_offset:je()}),{$current_url:x(null==C?void 0:C.href,[],qe),$host:null==C?void 0:C.host,$pathname:null==C?void 0:C.pathname,$raw_user_agent:U.length>1e3?U.substring(0,997)+"...":U,$browser_version:Re(U,navigator.vendor),$browser_language:Ve(),$browser_language_prefix:(i=Ve(),"string"==typeof i?i.split("-")[0]:void 0),$screen_height:null==b?void 0:b.screen.height,$screen_width:null==b?void 0:b.screen.width,$viewport_height:null==b?void 0:b.innerHeight,$viewport_width:null==b?void 0:b.innerWidth,$lib:"web",$lib_version:"1.0.7",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}class He{constructor(e,t){void 0===e&&(e="localStorage"),this._cachedPersonProperties=null,this.storageMethod=e,this.domain=t,this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return i({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.setStoredValue(c,this.userIdentity.anonymous_id)),this.userIdentity.anonymous_id}getUserProperties(){return i({},this.userIdentity.properties)}identify(e,t,r){if("number"==typeof e&&(e=e.toString(),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),e)if(this.isDistinctIdStringLike(e))console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==e){var a=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=e,!this.userIdentity.device_id){var n=a||this.userIdentity.anonymous_id;this.userIdentity.device_id=n,this.userIdentity.properties=i({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:n})}e!==a&&(this.userIdentity.distinct_id=e);var s="anonymous"===this.userIdentity.user_state;e!==a&&s?(this.userIdentity.user_state="identified",t&&(this.userIdentity.properties=i({},this.userIdentity.properties,t)),r&&Object.keys(r).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=r[e])}),this.saveUserIdentity()):t||r?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),t&&(this.userIdentity.properties=i({},this.userIdentity.properties,t)),r&&Object.keys(r).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=r[e])}),this.saveUserIdentity()):e!==a&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(e,t){if(!e&&!t)return!1;var r=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,a=this.getPersonPropertiesHash(r,e,t);return this._cachedPersonProperties===a?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(e&&(this.userIdentity.properties=i({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity(),this._cachedPersonProperties=a,!0)}getPersonPropertiesHash(e,t,i){return JSON.stringify({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}reset(e){var t=this.generateAnonymousId(),r=this.userIdentity.device_id,a=e?this.generateDeviceId():r;this.userIdentity={distinct_id:null,anonymous_id:t,device_id:a,properties:{},user_state:"anonymous"},this._cachedPersonProperties=null,this.saveUserIdentity(),this.userIdentity.properties=i({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}setDistinctId(e){this.userIdentity.distinct_id=e,this.saveUserIdentity()}setUserState(e){this.userIdentity.user_state=e,this.saveUserIdentity()}updateUserProperties(e,t){e&&(this.userIdentity.properties=i({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity()}ensureDeviceId(e){this.userIdentity.device_id||(this.userIdentity.device_id=e,this.userIdentity.properties=i({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:e}),this.saveUserIdentity())}isDistinctIdStringLikePublic(e){return this.isDistinctIdStringLike(e)}createAlias(e,t){return this.isValidDistinctId(e)?(void 0===t&&(t=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(t)?e===t?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:e,original:t}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isValidDistinctId(e){if(!e||"string"!=typeof e)return!1;var t=e.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(t)&&0!==e.trim().length}isDistinctIdStringLike(e){if(!e||"string"!=typeof e)return!1;var t=e.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(t)}loadUserIdentity(){var e=this.getStoredValue(c)||this.generateAnonymousId(),t=this.getStoredValue(l)||null,i=this.getStoredValue(u)||this.generateDeviceId(),r=this.getStoredUserProperties(),a=this.getStoredValue(o)||"anonymous";return{distinct_id:t,anonymous_id:e||this.generateAnonymousId(),device_id:i,properties:r,user_state:a}}saveUserIdentity(){this.setStoredValue(c,this.userIdentity.anonymous_id),this.setStoredValue(u,this.userIdentity.device_id),this.setStoredValue(o,this.userIdentity.user_state),this.userIdentity.distinct_id?this.setStoredValue(l,this.userIdentity.distinct_id):this.removeStoredValue(l),this.setStoredUserProperties(this.userIdentity.properties)}generateAnonymousId(){return"anon_"+m()}generateDeviceId(){return"device_"+m()}getStoredValue(e){try{if(this.storageMethod===p)return null;if(this.storageMethod===h||this.storageMethod===g){var t=localStorage.getItem(e);return null!==t?t:this.storageMethod===g?this.getCookieValue(e):null}return this.getCookieValue(e)}catch(e){return console.warn("Failed to access storage:",e),null}}setStoredValue(e,t){try{if(this.storageMethod===p)return;this.storageMethod===h?localStorage.setItem(e,t):this.storageMethod===g?(localStorage.setItem(e,t),this.setCookieValue(e,t)):this.setCookieValue(e,t)}catch(e){console.warn("Failed to save to storage:",e)}}removeStoredValue(e){this.storageMethod!==p&&(this.storageMethod===h?localStorage.removeItem(e):this.storageMethod===g?(localStorage.removeItem(e),this.removeCookieValue(e)):this.removeCookieValue(e))}getStoredUserProperties(){var e=this.getStoredValue(d);if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}setStoredUserProperties(e){this.setStoredValue(d,JSON.stringify(e))}getCookieValue(e){var t=document.cookie.split(";");for(var i of t){var[r,a]=i.trim().split("=");if(r===e)return decodeURIComponent(a)}return null}setCookieValue(e,t){var i=e+"="+encodeURIComponent(t)+"; Max-Age=31536000; path=/; secure; SameSite=Lax";this.domain&&(i+="; domain="+this.domain),document.cookie=i}removeCookieValue(e){var t=e+"=; Max-Age=0; path=/";this.domain&&(t+="; domain="+this.domain),document.cookie=t}register_once(e,t){var i=this.getStoredUserProperties(),r=!1;for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(a in i||(i[a]=e[a],r=!0));if(t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(n in i||(i[n]=t[n],r=!0));r&&this.setStoredUserProperties(i)}set_initial_person_info(e,t){if(!this.getStoredUserProperties()[_]){var i=function(e,t){var i=e?I([],xe,t||[]):[],r=null==C?void 0:C.href.substring(0,1e3);return{r:$e().substring(0,1e3),u:r?x(r,i,qe):void 0}}(e,t);this.register_once({[_]:i},void 0)}}get_initial_props(){var e,t,i=this.getStoredUserProperties()[_];return i?(e=Ge(i),t={},y(e,function(e,i){var r;t["$initial_"+(r=String(i),r.startsWith("$")?r.substring(1):r)]=e}),t):{}}update_referrer_info(){var e={$referrer:$e(),$referring_domain:Ke()};this.register_once(e,void 0)}}class ze{constructor(e,t){if(this.instance=t,e.capture_performance&&b)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(e){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",e)}}initializeWebVitals(){if(this.webVitals){var e=e=>{try{if(!(b&&P&&E&&C))return;var{country:t,locale:i}=function(){var e,t;if(!E)return{country:e,locale:t};try{var i=Intl.DateTimeFormat().resolvedOptions().timeZone;e=v[i],t=E.languages&&E.languages.length?E.languages[0]:E.userLanguage||E.language||E.browserLanguage||"en"}catch(e){}return{country:e,locale:t}}();this.instance.capture("web_vital",{name:e.name,value:e.value,delta:e.delta,rating:e.rating,id:e.id,navigationType:e.navigationType,pathname:C.pathname,href:C.href,"user-agent":E.userAgent,locale:i,location:t,referrer:P.referrer})}catch(e){console.error("Error sending web vital:",e)}};this.webVitals.onCLS&&this.webVitals.onCLS(e),this.webVitals.onFCP&&this.webVitals.onFCP(e),this.webVitals.onLCP&&this.webVitals.onLCP(e),this.webVitals.onTTFB&&this.webVitals.onTTFB(e),this.webVitals.onINP&&this.webVitals.onINP(e)}}}function Je(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],a=i(r);return O(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),e[t]=a,()=>{e[t]=r}}catch(e){return()=>{}}}class Qe{constructor(e){var t;this._instance=e,this._lastPathname=(null===(t=null==b?void 0:b.location)||void 0===t?void 0:t.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0}monitorHistoryChanges(){var e,t;if(b&&C&&(this._lastPathname=C.pathname||"",b.history)){var i=this;(null===(e=b.history.pushState)||void 0===e?void 0:e.__vtilt_wrapped__)||Je(b.history,"pushState",e=>function(t,r,a){e.call(this,t,r,a),i._capturePageview("pushState")}),(null===(t=b.history.replaceState)||void 0===t?void 0:t.__vtilt_wrapped__)||Je(b.history,"replaceState",e=>function(t,r,a){e.call(this,t,r,a),i._capturePageview("replaceState")}),this._setupPopstateListener()}}_capturePageview(e){var t;try{var i=null===(t=null==b?void 0:b.location)||void 0===t?void 0:t.pathname;if(!i||!C||!P)return;if(i!==this._lastPathname&&this.isEnabled){var r={navigation_type:e};this._instance.capture("$pageview",r)}this._lastPathname=i}catch(t){console.error("Error capturing "+e+" pageview",t)}}_setupPopstateListener(){if(!this._popstateListener&&b){var e=()=>{this._capturePageview("popstate")};S(b,"popstate",e),this._popstateListener=()=>{b&&b.removeEventListener("popstate",e)}}}}var Ze=Uint8Array,Xe=Uint16Array,Ye=Int32Array,et=new Ze([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),tt=new Ze([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),it=new Ze([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rt=function(e,t){for(var i=new Xe(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var a=new Ye(i[30]);for(r=1;r<30;++r)for(var n=i[r];n<i[r+1];++n)a[n]=n-i[r]<<5|r;return{b:i,r:a}},at=rt(et,2),nt=at.b,st=at.r;nt[28]=258,st[258]=28;for(var ot=rt(tt,0).r,ut=new Xe(32768),ct=0;ct<32768;++ct){var lt=(43690&ct)>>1|(21845&ct)<<1;lt=(61680&(lt=(52428&lt)>>2|(13107&lt)<<2))>>4|(3855&lt)<<4,ut[ct]=((65280&lt)>>8|(255&lt)<<8)>>1}var dt=function(e,t,i){for(var r=e.length,a=0,n=new Xe(t);a<r;++a)e[a]&&++n[e[a]-1];var s,o=new Xe(t);for(a=1;a<t;++a)o[a]=o[a-1]+n[a-1]<<1;if(i){s=new Xe(1<<t);var u=15-t;for(a=0;a<r;++a)if(e[a])for(var c=a<<4|e[a],l=t-e[a],d=o[e[a]-1]++<<l,h=d|(1<<l)-1;d<=h;++d)s[ut[d]>>u]=c}else for(s=new Xe(r),a=0;a<r;++a)e[a]&&(s[a]=ut[o[e[a]-1]++]>>15-e[a]);return s},ht=new Ze(288);for(ct=0;ct<144;++ct)ht[ct]=8;for(ct=144;ct<256;++ct)ht[ct]=9;for(ct=256;ct<280;++ct)ht[ct]=7;for(ct=280;ct<288;++ct)ht[ct]=8;var gt=new Ze(32);for(ct=0;ct<32;++ct)gt[ct]=5;var ft=dt(ht,9,0),pt=dt(gt,5,0),_t=function(e){return(e+7)/8|0},vt=function(e,t,i){return(null==i||i>e.length)&&(i=e.length),new Ze(e.subarray(t,i))},mt=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>8},At=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>8,e[r+2]|=i>>16},yt=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var a=i.length,n=i.slice();if(!a)return{t:Pt,l:0};if(1==a){var s=new Ze(i[0].s+1);return s[i[0].s]=1,{t:s,l:1}}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],u=i[1],c=0,l=1,d=2;for(i[0]={s:-1,f:o.f+u.f,l:o,r:u};l!=a-1;)o=i[i[c].f<i[d].f?c++:d++],u=i[c!=l&&i[c].f<i[d].f?c++:d++],i[l++]={s:-1,f:o.f+u.f,l:o,r:u};var h=n[0].s;for(r=1;r<a;++r)n[r].s>h&&(h=n[r].s);var g=new Xe(h+1),f=St(i[l-1],g,0);if(f>t){r=0;var p=0,_=f-t,v=1<<_;for(n.sort(function(e,t){return g[t.s]-g[e.s]||e.f-t.f});r<a;++r){var m=n[r].s;if(!(g[m]>t))break;p+=v-(1<<f-g[m]),g[m]=t}for(p>>=_;p>0;){var A=n[r].s;g[A]<t?p-=1<<t-g[A]++-1:++r}for(;r>=0&&p;--r){var y=n[r].s;g[y]==t&&(--g[y],++p)}f=t}return{t:new Ze(g),l:f}},St=function(e,t,i){return-1==e.s?Math.max(St(e.l,t,i+1),St(e.r,t,i+1)):t[e.s]=i},wt=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new Xe(++t),r=0,a=e[0],n=1,s=function(e){i[r++]=e},o=1;o<=t;++o)if(e[o]==a&&o!=t)++n;else{if(!a&&n>2){for(;n>138;n-=138)s(32754);n>2&&(s(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(s(a),--n;n>6;n-=6)s(8304);n>2&&(s(n-3<<5|8208),n=0)}for(;n--;)s(a);n=1,a=e[o]}return{c:i.subarray(0,r),n:t}},It=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},bt=function(e,t,i){var r=i.length,a=_t(t+2);e[a]=255&r,e[a+1]=r>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var n=0;n<r;++n)e[a+n+4]=i[n];return 8*(a+4+r)},Mt=function(e,t,i,r,a,n,s,o,u,c,l){mt(t,l++,i),++a[256];for(var d=yt(a,15),h=d.t,g=d.l,f=yt(n,15),p=f.t,_=f.l,v=wt(h),m=v.c,A=v.n,y=wt(p),S=y.c,w=y.n,I=new Xe(19),b=0;b<m.length;++b)++I[31&m[b]];for(b=0;b<S.length;++b)++I[31&S[b]];for(var M=yt(I,7),E=M.t,P=M.l,C=19;C>4&&!E[it[C-1]];--C);var k,T,U,R,B=c+5<<3,L=It(a,ht)+It(n,gt)+s,D=It(a,h)+It(n,p)+s+14+3*C+It(I,E)+2*I[16]+3*I[17]+7*I[18];if(u>=0&&B<=L&&B<=D)return bt(t,l,e.subarray(u,u+c));if(mt(t,l,1+(D<L)),l+=2,D<L){k=dt(h,g,0),T=h,U=dt(p,_,0),R=p;var x=dt(E,P,0);mt(t,l,A-257),mt(t,l+5,w-1),mt(t,l+10,C-4),l+=14;for(b=0;b<C;++b)mt(t,l+3*b,E[it[b]]);l+=3*C;for(var O=[m,S],q=0;q<2;++q){var N=O[q];for(b=0;b<N.length;++b){var V=31&N[b];mt(t,l,x[V]),l+=E[V],V>15&&(mt(t,l,N[b]>>5&127),l+=N[b]>>12)}}}else k=ft,T=ht,U=pt,R=gt;for(b=0;b<o;++b){var $=r[b];if($>255){At(t,l,k[(V=$>>18&31)+257]),l+=T[V+257],V>7&&(mt(t,l,$>>23&31),l+=et[V]);var K=31&$;At(t,l,U[K]),l+=R[K],K>3&&(At(t,l,$>>5&8191),l+=tt[K])}else At(t,l,k[$]),l+=T[$]}return At(t,l,k[256]),l+T[256]},Et=new Ye([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Pt=new Ze(0),Ct=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&-306674912)^i>>>1;e[t]=i}return e}(),kt=function(e,t,i,r,a){if(!a&&(a={l:1},t.dictionary)){var n=t.dictionary.subarray(-32768),s=new Ze(n.length+e.length);s.set(n),s.set(e,n.length),e=s,a.w=n.length}return function(e,t,i,r,a,n){var s=n.z||e.length,o=new Ze(r+s+5*(1+Math.ceil(s/7e3))+a),u=o.subarray(r,o.length-a),c=n.l,l=7&(n.r||0);if(t){l&&(u[0]=n.r>>3);for(var d=Et[t-1],h=d>>13,g=8191&d,f=(1<<i)-1,p=n.p||new Xe(32768),_=n.h||new Xe(f+1),v=Math.ceil(i/3),m=2*v,A=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<m)&f},y=new Ye(25e3),S=new Xe(288),w=new Xe(32),I=0,b=0,M=n.i||0,E=0,P=n.w||0,C=0;M+2<s;++M){var k=A(M),T=32767&M,U=_[k];if(p[T]=U,_[k]=T,P<=M){var R=s-M;if((I>7e3||E>24576)&&(R>423||!c)){l=Mt(e,u,0,y,S,w,b,E,C,M-C,l),E=I=b=0,C=M;for(var B=0;B<286;++B)S[B]=0;for(B=0;B<30;++B)w[B]=0}var L=2,D=0,x=g,O=T-U&32767;if(R>2&&k==A(M-O))for(var q=Math.min(h,R)-1,N=Math.min(32767,M),V=Math.min(258,R);O<=N&&--x&&T!=U;){if(e[M+L]==e[M+L-O]){for(var $=0;$<V&&e[M+$]==e[M+$-O];++$);if($>L){if(L=$,D=O,$>q)break;var K=Math.min(O,$-2),G=0;for(B=0;B<K;++B){var F=M-O+B&32767,j=F-p[F]&32767;j>G&&(G=j,U=F)}}}O+=(T=U)-(U=p[T])&32767}if(D){y[E++]=268435456|st[L]<<18|ot[D];var W=31&st[L],H=31&ot[D];b+=et[W]+tt[H],++S[257+W],++w[H],P=M+L,++I}else y[E++]=e[M],++S[e[M]]}}for(M=Math.max(M,P);M<s;++M)y[E++]=e[M],++S[e[M]];l=Mt(e,u,c,y,S,w,b,E,C,M-C,l),c||(n.r=7&l|u[l/8|0]<<3,l-=7,n.h=_,n.p=p,n.i=M,n.w=P)}else{for(M=n.w||0;M<s+c;M+=65535){var z=M+65535;z>=s&&(u[l/8|0]=c,z=s),l=bt(u,l+1,e.subarray(M,z))}n.i=s}return vt(o,0,r+_t(l)+a)}(e,null==t.level?6:t.level,null==t.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,i,r,a)},Tt=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8};function Ut(e,t){t||(t={});var i=function(){var e=-1;return{p:function(t){for(var i=e,r=0;r<t.length;++r)i=Ct[255&i^t[r]]^i>>>8;e=i},d:function(){return~e}}}(),r=e.length;i.p(e);var a,n=kt(e,t,10+((a=t).filename?a.filename.length+1:0),8),s=n.length;return function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Tt(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;r<=i.length;++r)e[r+10]=i.charCodeAt(r)}}(n,t),Tt(n,s-8,i.d()),Tt(n,s-4,r),n}var Rt="undefined"!=typeof TextEncoder&&new TextEncoder,Bt="undefined"!=typeof TextDecoder&&new TextDecoder;try{Bt.decode(Pt,{stream:!0})}catch(e){}var Lt,Dt="text/plain";!function(e){e.GZipJS="gzip-js",e.None="none"}(Lt||(Lt={}));var xt=e=>{var{data:t,compression:i}=e;if(t){var r=(e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t))(t),a=new Blob([r]).size;if(i===Lt.GZipJS&&a>=1024)try{var n=Ut(function(e,t){if(Rt)return Rt.encode(e);for(var i=e.length,r=new Ze(e.length+(e.length>>1)),a=0,n=function(e){r[a++]=e},s=0;s<i;++s){if(a+5>r.length){var o=new Ze(a+8+(i-s<<1));o.set(r),r=o}var u=e.charCodeAt(s);u<128||t?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>18),n(128|u>>12&63),n(128|u>>6&63),n(128|63&u)):(n(224|u>>12),n(128|u>>6&63),n(128|63&u))}return vt(r,0,a)}(r),{mtime:0}),s=new Blob([n],{type:Dt});if(s.size<.95*a)return{contentType:Dt,body:s,estimatedSize:s.size}}catch(e){}return{contentType:"application/json",body:r,estimatedSize:a}}},Ot=[{name:"fetch",available:"undefined"!=typeof fetch,method:e=>{var r=xt(e);if(r){var{contentType:a,body:n,estimatedSize:s}=r,o=e.compression===Lt.GZipJS&&a===Dt?e.url+(e.url.includes("?")?"&":"?")+"compression=gzip-js":e.url,u=i({"Content-Type":a},e.headers||{}),c=new AbortController,l=e.timeout?setTimeout(()=>c.abort(),e.timeout):null;fetch(o,{method:e.method||"POST",headers:u,body:n,keepalive:s<52428.8,signal:c.signal}).then(function(){var i=t(function*(t){var i,r=yield t.text(),a={statusCode:t.status,text:r};if(200===t.status)try{a.json=JSON.parse(r)}catch(e){}null===(i=e.callback)||void 0===i||i.call(e,a)});return function(e){return i.apply(this,arguments)}}()).catch(()=>{var t;null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})}).finally(()=>{l&&clearTimeout(l)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:e=>{var t=xt(e);if(t){var{contentType:i,body:r}=t,a=e.compression===Lt.GZipJS&&i===Dt?e.url+(e.url.includes("?")?"&":"?")+"compression=gzip-js":e.url,n=new XMLHttpRequest;n.open(e.method||"POST",a,!0),e.headers&&Object.entries(e.headers).forEach(e=>{var[t,i]=e;n.setRequestHeader(t,i)}),n.setRequestHeader("Content-Type",i),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{var t;if(4===n.readyState){var i={statusCode:n.status,text:n.responseText};if(200===n.status)try{i.json=JSON.parse(n.responseText)}catch(e){}null===(t=e.callback)||void 0===t||t.call(e,i)}},n.onerror=()=>{var t;null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})},n.send(r)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:e=>{var t=xt(e);if(t){var{contentType:i,body:r}=t;try{var a="string"==typeof r?new Blob([r],{type:i}):r,n=e.compression===Lt.GZipJS&&i===Dt?e.url+(e.url.includes("?")?"&":"?")+"compression=gzip-js":e.url;navigator.sendBeacon(n,a)}catch(e){}}}}],qt=e=>{var t,i=e.transport||"fetch",r=Ot.find(e=>e.name===i&&e.available)||Ot.find(e=>e.available);if(!r)return console.error("vTilt: No available transport method"),void(null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0}));r.method(e)};class Nt{constructor(e,t){var i,r,a,n;this._isPaused=!0,this._queue=[],this._flushTimeoutMs=(i=(null==t?void 0:t.flush_interval_ms)||3e3,r=250,a=5e3,n=3e3,"number"!=typeof i||isNaN(i)?n:Math.min(Math.max(i,r),a)),this._sendRequest=e}get length(){return this._queue.length}enqueue(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()}unload(){if(this._clearFlushTimeout(),0!==this._queue.length){var e=this._formatQueue();for(var t in e){var r=e[t];this._sendRequest(i({},r,{transport:"sendBeacon"}))}}}enable(){this._isPaused=!1,this._setFlushTimeout()}pause(){this._isPaused=!0,this._clearFlushTimeout()}flush(){this._clearFlushTimeout(),this._flushNow(),this._setFlushTimeout()}_setFlushTimeout(){this._isPaused||(this._flushTimeout=setTimeout(()=>{this._clearFlushTimeout(),this._flushNow(),this._queue.length>0&&this._setFlushTimeout()},this._flushTimeoutMs))}_clearFlushTimeout(){this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0)}_flushNow(){if(0!==this._queue.length){var e=this._formatQueue(),t=Date.now();for(var i in e){var r=e[i];r.events.forEach(e=>{var i=new Date(e.timestamp).getTime();e.$offset=Math.abs(i-t)}),this._sendRequest(r)}}}_formatQueue(){var e={};return this._queue.forEach(t=>{var i=t.batchKey||t.url;e[i]||(e[i]={url:t.url,events:[],batchKey:t.batchKey}),e[i].events.push(t.event)}),this._queue=[],e}}class Vt{constructor(e){this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._areWeOnline=!0,this._sendRequest=e.sendRequest,this._sendBeacon=e.sendBeacon,b&&void 0!==E&&"onLine"in E&&(this._areWeOnline=E.onLine,S(b,"online",()=>{this._areWeOnline=!0,this._flush()}),S(b,"offline",()=>{this._areWeOnline=!1}))}get length(){return this._queue.length}enqueue(e,t){if(void 0===t&&(t=0),t>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var i=function(e){var t=3e3*Math.pow(2,e),i=t/2,r=Math.min(18e5,t),a=(Math.random()-.5)*(r-i);return Math.ceil(r+a)}(t),r=Date.now()+i;this._queue.push({retryAt:r,request:e,retriesPerformedSoFar:t+1});var a="VTilt: Enqueued failed request for retry in "+Math.round(i/1e3)+"s";this._areWeOnline||(a+=" (Browser is offline)"),console.warn(a),this._isPolling||(this._isPolling=!0,this._poll())}}retriableRequest(e){var i=this;return t(function*(){try{var t=yield i._sendRequest(e);200!==t.statusCode&&(t.statusCode<400||t.statusCode>=500)&&i.enqueue(e,0)}catch(t){i.enqueue(e,0)}})()}_poll(){this._poller&&clearTimeout(this._poller),this._poller=setTimeout(()=>{this._areWeOnline&&this._queue.length>0&&this._flush(),this._queue.length>0?this._poll():this._isPolling=!1},this._pollIntervalMs)}_flush(){var e=this,i=Date.now(),r=[],a=[];this._queue.forEach(e=>{e.retryAt<i?a.push(e):r.push(e)}),this._queue=r,a.forEach(function(){var i=t(function*(t){var{request:i,retriesPerformedSoFar:r}=t;try{var a=yield e._sendRequest(i);200!==a.statusCode&&(a.statusCode<400||a.statusCode>=500)&&e.enqueue(i,r)}catch(t){e.enqueue(i,r)}});return function(e){return i.apply(this,arguments)}}())}unload(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._queue.forEach(e=>{var{request:t}=e;try{this._sendBeacon(t)}catch(e){console.error("VTilt: Failed to send beacon on unload",e)}}),this._queue=[]}}var $t="vt_rate_limit";class Kt{constructor(e){var t,i;void 0===e&&(e={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(t=e.eventsPerSecond)&&void 0!==t?t:10,this.eventsBurstLimit=Math.max(null!==(i=e.eventsBurstLimit)&&void 0!==i?i:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=e.persistence,this.captureWarning=e.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(e){var t,i,r,a;void 0===e&&(e=!1);var n=Date.now(),s=null!==(i=null===(t=this.persistence)||void 0===t?void 0:t.get($t))&&void 0!==i?i:{tokens:this.eventsBurstLimit,last:n},o=(n-s.last)/1e3;s.tokens+=o*this.eventsPerSecond,s.last=n,s.tokens>this.eventsBurstLimit&&(s.tokens=this.eventsBurstLimit);var u=s.tokens<1;return u||e||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||e||null===(r=this.captureWarning)||void 0===r||r.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=u,null===(a=this.persistence)||void 0===a||a.set($t,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var Gt=Array.isArray;class Ft{constructor(e){void 0===e&&(e={}),this.__loaded=!1,this._initial_pageview_captured=!1,this._visibility_state_listener=null,this.__request_queue=[],this._has_warned_about_config=!1,this._set_once_properties_sent=!1,this.configManager=new r(e);var t=this.configManager.getConfig(),i=t.domain;!i&&C&&(i=this.getCurrentDomain()),this.sessionManager=new B(t.storage||"cookie",i),this.userManager=new He(t.persistence||"localStorage",i),this.webVitalsManager=new ze(t,this),this.rateLimiter=new Kt({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:e=>{this._capture_internal("$$client_ingestion_warning",{$$client_ingestion_warning_message:e})}}),this.retryQueue=new Vt({sendRequest:e=>this._send_http_request(e),sendBeacon:e=>this._send_beacon_request(e)}),this.requestQueue=new Nt(e=>this._send_batched_request(e),{flush_interval_ms:3e3})}init(e,t,i){var r;if(i&&i!==Wt){var a=null!==(r=jt[i])&&void 0!==r?r:new Ft;return a._init(e,t,i),jt[i]=a,jt[Wt][i]=a,a}return this._init(e,t,i)}_init(e,t,r){if(void 0===t&&(t={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(i({},t,{projectId:e||t.projectId,name:r})),this.__loaded=!0;var a=this.configManager.getConfig();return this.userManager.set_initial_person_info(a.mask_personal_data_properties,a.custom_personal_data_properties),this.historyAutocapture=new Qe(this),this.historyAutocapture.startIfEnabled(),this._setup_unload_handler(),this._start_queue_if_opted_in(),!1!==a.capture_pageview&&this._capture_initial_pageview(),this}_start_queue_if_opted_in(){this.requestQueue.enable()}_setup_unload_handler(){if(b){var e=()=>{this.requestQueue.unload(),this.retryQueue.unload()};S(b,"beforeunload",e),S(b,"pagehide",e)}}toString(){var e,t=null!==(e=this.configManager.getConfig().name)&&void 0!==e?e:Wt;return t!==Wt&&(t=Wt+"."+t),t}getCurrentDomain(){if(!C)return"";var e=C.protocol,t=C.hostname,i=C.port;return e+"//"+t+(i?":"+i:"")}_is_configured(){var e=this.configManager.getConfig();return!(!e.projectId||!e.token)||(this._has_warned_about_config||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this._has_warned_about_config=!0),!1)}buildUrl(){var e=this.configManager.getConfig(),{proxyUrl:t,proxy:i,api_host:r,token:a}=e;return t||(i?i+"/api/tracking?token="+a:r?r.replace(/\/+$/gm,"")+"/api/tracking?token="+a:"/api/tracking?token="+a)}sendRequest(e,t,i){if(this._is_configured()){if(i&&void 0!==b)if(b.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:e,event:t});this.requestQueue.enqueue({url:e,event:t})}}_send_batched_request(e){var{transport:t}=e;"sendBeacon"!==t?this.retryQueue.retriableRequest(e):this._send_beacon_request(e)}_send_http_request(e){return new Promise(t=>{var{url:i,events:r}=e,a=1===r.length?r[0]:{events:r},n=this.configManager.getConfig().disable_compression?Lt.None:Lt.GZipJS;qt({url:i,data:a,method:"POST",transport:"XHR",compression:n,callback:e=>{t({statusCode:e.statusCode})}})})}_send_beacon_request(e){var{url:t,events:i}=e,r=1===i.length?i[0]:{events:i},a=this.configManager.getConfig().disable_compression?Lt.None:Lt.GZipJS;qt({url:t,data:r,method:"POST",transport:"sendBeacon",compression:a})}_send_retriable_request(e){this.sendRequest(e.url,e.event,!1)}capture(e,t,r){if(this.sessionManager.setSessionId(),E&&E.userAgent&&function(e){return!(e&&"string"==typeof e&&e.length>500)}(E.userAgent)&&((null==r?void 0:r.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var a=this.buildUrl(),n=We(),s=this.userManager.getUserProperties(),o=this.userManager.get_initial_props(),u=this.sessionManager.getSessionId(),c=this.sessionManager.getWindowId(),l=this.userManager.getAnonymousId(),d={};!this._set_once_properties_sent&&Object.keys(o).length>0&&Object.assign(d,o),t.$set_once&&Object.assign(d,t.$set_once);var h=i({},n,s,{$session_id:u,$window_id:c},l?{$anon_distinct_id:l}:{},Object.keys(d).length>0?{$set_once:d}:{},t.$set?{$set:t.$set}:{},t);!this._set_once_properties_sent&&Object.keys(o).length>0&&(this._set_once_properties_sent=!0),"$pageview"===e&&P&&(h.title=P.title);var g,f,p=this.configManager.getConfig();if(!1!==p.stringifyPayload){if(g=Object.assign({},h,p.globalAttributes),!A(g=JSON.stringify(g)))return}else if(g=Object.assign({},h,p.globalAttributes),!A(JSON.stringify(g)))return;f="$identify"===e?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var _={timestamp:(new Date).toISOString(),event:e,project_id:p.projectId||"",domain:p.domain||this.getCurrentDomain(),payload:g,distinct_id:f,anonymous_id:l};this.sendRequest(a,_,!0)}}_capture_internal(e,t){this.capture(e,t,{skip_client_rate_limiting:!0})}trackEvent(e,t){void 0===t&&(t={}),this.capture(e,t)}identify(e,t,i){if("number"==typeof e&&(e=String(e),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),e)if(this.userManager.isDistinctIdStringLikePublic(e))console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==e){var r=this.userManager.getDistinctId(),a=this.userManager.getAnonymousId(),n=this.userManager.getDeviceId(),s="anonymous"===this.userManager.getUserState();if(!n){var o=r||a;this.userManager.ensureDeviceId(o)}e!==r&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(t,i),this.capture("$identify",{distinct_id:e,$anon_distinct_id:a,$set:t||{},$set_once:i||{}}),this.userManager.setDistinctId(e)):t||i?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(t,i),this.capture("$set",{$set:t||{},$set_once:i||{}})):e!==r&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(e))}else console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(e,t){this.userManager.setUserProperties(e,t)&&this.capture("$set",{$set:e||{},$set_once:t||{}})}resetUser(e){this.sessionManager.resetSessionId(),this.userManager.reset(e)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(e,t){var i=this.userManager.createAlias(e,t);i?this.capture("$alias",{$original_id:i.original,$alias_id:i.distinct_id}):e===(t||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(e)}_capture_initial_pageview(){P&&("visible"===P.visibilityState?this._initial_pageview_captured||(this._initial_pageview_captured=!0,setTimeout(()=>{if(P&&C){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this._visibility_state_listener&&(P.removeEventListener("visibilitychange",this._visibility_state_listener),this._visibility_state_listener=null)):this._visibility_state_listener||(this._visibility_state_listener=()=>{this._capture_initial_pageview()},S(P,"visibilitychange",this._visibility_state_listener)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}updateConfig(e){this.configManager.updateConfig(e);var t=this.configManager.getConfig(),i=t.domain;!i&&C&&(i=this.getCurrentDomain()),this.sessionManager=new B(t.storage||"cookie",i),this.userManager=new He(t.persistence||"localStorage",i),this.webVitalsManager=new ze(t,this)}_execute_array(e){Array.isArray(e)&&e.forEach(e=>{if(e&&Array.isArray(e)&&e.length>0){var t=e[0],i=e.slice(1);if("function"==typeof this[t])try{this[t](...i)}catch(e){console.error("vTilt: Error executing queued call "+t+":",e)}}})}_dom_loaded(){this.__request_queue.forEach(e=>{this._send_retriable_request(e)}),this.__request_queue=[],this._start_queue_if_opted_in()}}var jt={},Wt="vt",Ht=!(void 0!==T||void 0!==k)&&-1===(null==U?void 0:U.indexOf("MSIE"))&&-1===(null==U?void 0:U.indexOf("Mozilla"));null!=b&&(b.__VTILT_ENQUEUE_REQUESTS=Ht);var zt,Jt;zt=jt[Wt]=new Ft,(Jt=R.vt)&&y(Jt._i,function(e){if(e&&Gt(e)){var t=zt.init(e[0],e[1],e[2]),i=Jt[e[2]||"vt"]||Jt;t&&t._execute_array(i)}}),R.vt=zt,function(){function e(){e.done||(e.done=!0,Ht=!1,null!=b&&(b.__VTILT_ENQUEUE_REQUESTS=!1),y(jt,function(e){e._dom_loaded()}))}P&&"function"==typeof P.addEventListener?"complete"===P.readyState?e():S(P,"DOMContentLoaded",e,{capture:!1}):b&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")}()}();
1
+ !function(){"use strict";function e(e,t,i,r,a,n,s){try{var o=e[n](s),u=o.value}catch(e){return void i(e)}o.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var i=this,r=arguments;return new Promise(function(a,n){var s=t.apply(i,r);function o(t){e(s,a,n,o,u,"next",t)}function u(t){e(s,a,n,o,u,"throw",t)}o(void 0)})}}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},i.apply(null,arguments)}class r{constructor(e){void 0===e&&(e={}),this.config=this.parseConfigFromScript(e)}parseConfigFromScript(e){if(!document.currentScript)return i({token:e.token||""},e);var t=document.currentScript,r=i({token:""},e);if(r.api_host=t.getAttribute("data-api-host")||t.getAttribute("data-host")||e.api_host,r.proxy=t.getAttribute("data-proxy")||e.proxy,r.proxyUrl=t.getAttribute("data-proxy-url")||e.proxyUrl,r.token=t.getAttribute("data-token")||e.token||"",r.projectId=t.getAttribute("data-project-id")||e.projectId||"",r.domain=t.getAttribute("data-domain")||e.domain,r.storage=t.getAttribute("data-storage")||e.storage,r.stringifyPayload="false"!==t.getAttribute("data-stringify-payload"),r.capture_performance="true"===t.getAttribute("data-capture-performance")||e.capture_performance,r.proxy&&r.proxyUrl)throw console.error("Error: Both data-proxy and data-proxy-url are specified. Please use only one of them."),new Error("Both data-proxy and data-proxy-url are specified. Please use only one of them.");for(var a of(r.globalAttributes=i({},e.globalAttributes),Array.from(t.attributes)))a.name.startsWith("data-vt-")&&(r.globalAttributes[a.name.slice(8).replace(/-/g,"_")]=a.value);return r}getConfig(){return i({},this.config)}updateConfig(e){this.config=i({},this.config,e)}}var a="__vt_session",n="__vt_window_id",s="__vt_primary_window",o="__vt_user_state",u="__vt_device_id",c="__vt_anonymous_id",l="__vt_distinct_id",d="__vt_user_properties",h="localStorage",g="localStorage+cookie",f="sessionStorage",p="memory",v="$initial_person_info",m={"Europe/Andorra":"AD","Asia/Dubai":"AE","Asia/Kabul":"AF","America/Antigua":"AG","America/Anguilla":"AI","Europe/Tirane":"AL","Asia/Yerevan":"AM","Africa/Luanda":"AO","Antarctica/Casey":"AQ","Antarctica/Davis":"AQ","Antarctica/DumontDUrville":"AQ","Antarctica/Mawson":"AQ","Antarctica/McMurdo":"AQ","Antarctica/Palmer":"AQ","Antarctica/Rothera":"AQ","Antarctica/Syowa":"AQ","Antarctica/Troll":"AQ","Antarctica/Vostok":"AQ","America/Argentina/Buenos_Aires":"AR","America/Argentina/Catamarca":"AR","America/Argentina/Cordoba":"AR","America/Argentina/Jujuy":"AR","America/Argentina/La_Rioja":"AR","America/Argentina/Mendoza":"AR","America/Argentina/Rio_Gallegos":"AR","America/Argentina/Salta":"AR","America/Argentina/San_Juan":"AR","America/Argentina/San_Luis":"AR","America/Argentina/Tucuman":"AR","America/Argentina/Ushuaia":"AR","Pacific/Pago_Pago":"AS","Europe/Vienna":"AT","Australia/Adelaide":"AU","Australia/Brisbane":"AU","Australia/Broken_Hill":"AU","Australia/Darwin":"AU","Australia/Eucla":"AU","Australia/Hobart":"AU","Australia/Lindeman":"AU","Australia/Lord_Howe":"AU","Australia/Melbourne":"AU","Australia/Perth":"AU","Australia/Sydney":"AU","America/Aruba":"AW","Europe/Mariehamn":"AX","Asia/Baku":"AZ","Europe/Sarajevo":"BA","America/Barbados":"BB","Asia/Dhaka":"BD","Europe/Brussels":"BE","Africa/Ouagadougou":"BF","Europe/Sofia":"BG","Asia/Bahrain":"BH","Africa/Bujumbura":"BI","Africa/Porto-Novo":"BJ","America/St_Barthelemy":"BL","Atlantic/Bermuda":"BM","Asia/Brunei":"BN","America/La_Paz":"BO","America/Kralendijk":"BQ","America/Araguaina":"BR","America/Bahia":"BR","America/Belem":"BR","America/Boa_Vista":"BR","America/Campo_Grande":"BR","America/Cuiaba":"BR","America/Eirunepe":"BR","America/Fortaleza":"BR","America/Maceio":"BR","America/Manaus":"BR","America/Noronha":"BR","America/Porto_Velho":"BR","America/Recife":"BR","America/Rio_Branco":"BR","America/Santarem":"BR","America/Sao_Paulo":"BR","America/Nassau":"BS","Asia/Thimphu":"BT","Africa/Gaborone":"BW","Europe/Minsk":"BY","America/Belize":"BZ","America/Atikokan":"CA","America/Blanc-Sablon":"CA","America/Cambridge_Bay":"CA","America/Creston":"CA","America/Dawson":"CA","America/Dawson_Creek":"CA","America/Edmonton":"CA","America/Fort_Nelson":"CA","America/Glace_Bay":"CA","America/Goose_Bay":"CA","America/Halifax":"CA","America/Inuvik":"CA","America/Iqaluit":"CA","America/Moncton":"CA","America/Nipigon":"CA","America/Pangnirtung":"CA","America/Rainy_River":"CA","America/Rankin_Inlet":"CA","America/Regina":"CA","America/Resolute":"CA","America/St_Johns":"CA","America/Swift_Current":"CA","America/Thunder_Bay":"CA","America/Toronto":"CA","America/Vancouver":"CA","America/Whitehorse":"CA","America/Winnipeg":"CA","America/Yellowknife":"CA","Indian/Cocos":"CC","Africa/Kinshasa":"CD","Africa/Lubumbashi":"CD","Africa/Bangui":"CF","Africa/Brazzaville":"CG","Europe/Zurich":"CH","Africa/Abidjan":"CI","Pacific/Rarotonga":"CK","America/Punta_Arenas":"CL","America/Santiago":"CL","Pacific/Easter":"CL","Africa/Douala":"CM","Asia/Shanghai":"CN","Asia/Urumqi":"CN","America/Bogota":"CO","America/Costa_Rica":"CR","America/Havana":"CU","Atlantic/Cape_Verde":"CV","America/Curacao":"CW","Indian/Christmas":"CX","Asia/Famagusta":"CY","Asia/Nicosia":"CY","Europe/Prague":"CZ","Europe/Berlin":"DE","Europe/Busingen":"DE","Africa/Djibouti":"DJ","Europe/Copenhagen":"DK","America/Dominica":"DM","America/Santo_Domingo":"DO","Africa/Algiers":"DZ","America/Guayaquil":"EC","Pacific/Galapagos":"EC","Europe/Tallinn":"EE","Africa/Cairo":"EG","Africa/El_Aaiun":"EH","Africa/Asmara":"ER","Africa/Ceuta":"ES","Atlantic/Canary":"ES","Europe/Madrid":"ES","Africa/Addis_Ababa":"ET","Europe/Helsinki":"FI","Pacific/Fiji":"FJ","Atlantic/Stanley":"FK","Pacific/Chuuk":"FM","Pacific/Kosrae":"FM","Pacific/Pohnpei":"FM","Atlantic/Faroe":"FO","Europe/Paris":"FR","Africa/Libreville":"GA","Europe/London":"GB","America/Grenada":"GD","Asia/Tbilisi":"GE","America/Cayenne":"GF","Europe/Guernsey":"GG","Africa/Accra":"GH","Europe/Gibraltar":"GI","America/Danmarkshavn":"GL","America/Nuuk":"GL","America/Scoresbysund":"GL","America/Thule":"GL","Africa/Banjul":"GM","Africa/Conakry":"GN","America/Guadeloupe":"GP","Africa/Malabo":"GQ","Europe/Athens":"GR","Atlantic/South_Georgia":"GS","America/Guatemala":"GT","Pacific/Guam":"GU","Africa/Bissau":"GW","America/Guyana":"GY","Asia/Hong_Kong":"HK","America/Tegucigalpa":"HN","Europe/Zagreb":"HR","America/Port-au-Prince":"HT","Europe/Budapest":"HU","Asia/Jakarta":"ID","Asia/Jayapura":"ID","Asia/Makassar":"ID","Asia/Pontianak":"ID","Europe/Dublin":"IE","Asia/Jerusalem":"IL","Europe/Isle_of_Man":"IM","Asia/Kolkata":"IN","Indian/Chagos":"IO","Asia/Baghdad":"IQ","Asia/Tehran":"IR","Atlantic/Reykjavik":"IS","Europe/Rome":"IT","Europe/Jersey":"JE","America/Jamaica":"JM","Asia/Amman":"JO","Asia/Tokyo":"JP","Africa/Nairobi":"KE","Asia/Bishkek":"KG","Asia/Phnom_Penh":"KH","Pacific/Enderbury":"KI","Pacific/Kiritimati":"KI","Pacific/Tarawa":"KI","Indian/Comoro":"KM","America/St_Kitts":"KN","Asia/Pyongyang":"KP","Asia/Seoul":"KR","Asia/Kuwait":"KW","America/Cayman":"KY","Asia/Almaty":"KZ","Asia/Aqtau":"KZ","Asia/Aqtobe":"KZ","Asia/Atyrau":"KZ","Asia/Oral":"KZ","Asia/Qostanay":"KZ","Asia/Qyzylorda":"KZ","Asia/Vientiane":"LA","Asia/Beirut":"LB","America/St_Lucia":"LC","Europe/Vaduz":"LI","Asia/Colombo":"LK","Africa/Monrovia":"LR","Africa/Maseru":"LS","Europe/Vilnius":"LT","Europe/Luxembourg":"LU","Europe/Riga":"LV","Africa/Tripoli":"LY","Africa/Casablanca":"MA","Europe/Monaco":"MC","Europe/Chisinau":"MD","Europe/Podgorica":"ME","America/Marigot":"MF","Indian/Antananarivo":"MG","Pacific/Kwajalein":"MH","Pacific/Majuro":"MH","Europe/Skopje":"MK","Africa/Bamako":"ML","Asia/Yangon":"MM","Asia/Choibalsan":"MN","Asia/Hovd":"MN","Asia/Ulaanbaatar":"MN","Asia/Macau":"MO","Pacific/Saipan":"MP","America/Martinique":"MQ","Africa/Nouakchott":"MR","America/Montserrat":"MS","Europe/Malta":"MT","Indian/Mauritius":"MU","Indian/Maldives":"MV","Africa/Blantyre":"MW","America/Bahia_Banderas":"MX","America/Cancun":"MX","America/Chihuahua":"MX","America/Hermosillo":"MX","America/Matamoros":"MX","America/Mazatlan":"MX","America/Merida":"MX","America/Mexico_City":"MX","America/Monterrey":"MX","America/Ojinaga":"MX","America/Tijuana":"MX","Asia/Kuala_Lumpur":"MY","Asia/Kuching":"MY","Africa/Maputo":"MZ","Africa/Windhoek":"NA","Pacific/Noumea":"NC","Africa/Niamey":"NE","Pacific/Norfolk":"NF","Africa/Lagos":"NG","America/Managua":"NI","Europe/Amsterdam":"NL","Europe/Oslo":"NO","Asia/Kathmandu":"NP","Pacific/Nauru":"NR","Pacific/Niue":"NU","Pacific/Auckland":"NZ","Pacific/Chatham":"NZ","Asia/Muscat":"OM","America/Panama":"PA","America/Lima":"PE","Pacific/Gambier":"PF","Pacific/Marquesas":"PF","Pacific/Tahiti":"PF","Pacific/Bougainville":"PG","Pacific/Port_Moresby":"PG","Asia/Manila":"PH","Asia/Karachi":"PK","Europe/Warsaw":"PL","America/Miquelon":"PM","Pacific/Pitcairn":"PN","America/Puerto_Rico":"PR","Asia/Gaza":"PS","Asia/Hebron":"PS","Atlantic/Azores":"PT","Atlantic/Madeira":"PT","Europe/Lisbon":"PT","Pacific/Palau":"PW","America/Asuncion":"PY","Asia/Qatar":"QA","Indian/Reunion":"RE","Europe/Bucharest":"RO","Europe/Belgrade":"RS","Asia/Anadyr":"RU","Asia/Barnaul":"RU","Asia/Chita":"RU","Asia/Irkutsk":"RU","Asia/Kamchatka":"RU","Asia/Khandyga":"RU","Asia/Krasnoyarsk":"RU","Asia/Magadan":"RU","Asia/Novokuznetsk":"RU","Asia/Novosibirsk":"RU","Asia/Omsk":"RU","Asia/Sakhalin":"RU","Asia/Srednekolymsk":"RU","Asia/Tomsk":"RU","Asia/Ust-Nera":"RU","Asia/Vladivostok":"RU","Asia/Yakutsk":"RU","Asia/Yekaterinburg":"RU","Europe/Astrakhan":"RU","Europe/Kaliningrad":"RU","Europe/Kirov":"RU","Europe/Moscow":"RU","Europe/Samara":"RU","Europe/Saratov":"RU","Europe/Ulyanovsk":"RU","Europe/Volgograd":"RU","Africa/Kigali":"RW","Asia/Riyadh":"SA","Pacific/Guadalcanal":"SB","Indian/Mahe":"SC","Africa/Khartoum":"SD","Europe/Stockholm":"SE","Asia/Singapore":"SG","Atlantic/St_Helena":"SH","Europe/Ljubljana":"SI","Arctic/Longyearbyen":"SJ","Europe/Bratislava":"SK","Africa/Freetown":"SL","Europe/San_Marino":"SM","Africa/Dakar":"SN","Africa/Mogadishu":"SO","America/Paramaribo":"SR","Africa/Juba":"SS","Africa/Sao_Tome":"ST","America/El_Salvador":"SV","America/Lower_Princes":"SX","Asia/Damascus":"SY","Africa/Mbabane":"SZ","America/Grand_Turk":"TC","Africa/Ndjamena":"TD","Indian/Kerguelen":"TF","Africa/Lome":"TG","Asia/Bangkok":"TH","Asia/Dushanbe":"TJ","Pacific/Fakaofo":"TK","Asia/Dili":"TL","Asia/Ashgabat":"TM","Africa/Tunis":"TN","Pacific/Tongatapu":"TO","Europe/Istanbul":"TR","America/Port_of_Spain":"TT","Pacific/Funafuti":"TV","Asia/Taipei":"TW","Africa/Dar_es_Salaam":"TZ","Europe/Kiev":"UA","Europe/Simferopol":"UA","Europe/Uzhgorod":"UA","Europe/Zaporozhye":"UA","Africa/Kampala":"UG","Pacific/Midway":"UM","Pacific/Wake":"UM","America/Adak":"US","America/Anchorage":"US","America/Boise":"US","America/Chicago":"US","America/Denver":"US","America/Detroit":"US","America/Indiana/Indianapolis":"US","America/Indiana/Knox":"US","America/Indiana/Marengo":"US","America/Indiana/Petersburg":"US","America/Indiana/Tell_City":"US","America/Indiana/Vevay":"US","America/Indiana/Vincennes":"US","America/Indiana/Winamac":"US","America/Juneau":"US","America/Kentucky/Louisville":"US","America/Kentucky/Monticello":"US","America/Los_Angeles":"US","America/Menominee":"US","America/Metlakatla":"US","America/New_York":"US","America/Nome":"US","America/North_Dakota/Beulah":"US","America/North_Dakota/Center":"US","America/North_Dakota/New_Salem":"US","America/Phoenix":"US","America/Sitka":"US","America/Yakutat":"US","Pacific/Honolulu":"US","America/Montevideo":"UY","Asia/Samarkand":"UZ","Asia/Tashkent":"UZ","Europe/Vatican":"VA","America/St_Vincent":"VC","America/Caracas":"VE","America/Tortola":"VG","America/St_Thomas":"VI","Asia/Ho_Chi_Minh":"VN","Pacific/Efate":"VU","Pacific/Wallis":"WF","Pacific/Apia":"WS","Asia/Aden":"YE","Indian/Mayotte":"YT","Africa/Johannesburg":"ZA","Africa/Lusaka":"ZM","Africa/Harare":"ZW"};function _(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16))}function A(e){return!(!e||"string"!=typeof e)&&!(e.length<2||e.length>10240)}function y(e,t,i){if(e)if(Array.isArray(e))e.forEach((e,r)=>{t.call(i,e,r)});else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(i,e[r],r)}function S(e,t,i,r){var{capture:a=!1,passive:n=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:a,passive:n})}function w(e,t){if(!t)return e;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function I(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];for(var a of i)for(var n of a)e.push(n);return e}var b="undefined"!=typeof window?window:void 0,M="undefined"!=typeof globalThis?globalThis:b,E=null==M?void 0:M.navigator,P=null==M?void 0:M.document,C=null==M?void 0:M.location,R=null==M?void 0:M.fetch,T=(null==M?void 0:M.XMLHttpRequest)&&"withCredentials"in new M.XMLHttpRequest?M.XMLHttpRequest:void 0;null==M||M.AbortController;var k=null==E?void 0:E.userAgent,U=null!=b?b:{},L=31536e3;class B{constructor(e){var t;this.memoryStorage=new Map,this.method=e.method,this.domain=e.domain,this.sameSite=e.sameSite||"Lax",this.secure=null!==(t=e.secure)&&void 0!==t?t:"undefined"!=typeof location&&"https:"===location.protocol}get(e){var t;try{if(this.method===p)return null!==(t=this.memoryStorage.get(e))&&void 0!==t?t:null;if(this.usesLocalStorage()){var i=localStorage.getItem(e);return null!==i?i:this.method===g?this.getCookie(e):null}return this.usesSessionStorage()?sessionStorage.getItem(e):this.getCookie(e)}catch(t){return console.warn('[StorageManager] Failed to get "'+e+'":',t),null}}set(e,t,i){try{if(this.method===p)return void this.memoryStorage.set(e,t);if(this.usesLocalStorage())return localStorage.setItem(e,t),void(this.method===g&&this.setCookie(e,t,i||L));if(this.usesSessionStorage())return void sessionStorage.setItem(e,t);this.setCookie(e,t,i||L)}catch(t){console.warn('[StorageManager] Failed to set "'+e+'":',t)}}remove(e){try{if(this.method===p)return void this.memoryStorage.delete(e);if(this.usesLocalStorage())return localStorage.removeItem(e),void(this.method===g&&this.removeCookie(e));if(this.usesSessionStorage())return void sessionStorage.removeItem(e);this.removeCookie(e)}catch(t){console.warn('[StorageManager] Failed to remove "'+e+'":',t)}}getWithExpiry(e){var t=this.get(e);if(!t)return null;try{var i=JSON.parse(t);return i.expiry&&Date.now()>i.expiry?(this.remove(e),null):i.value}catch(e){return null}}setWithExpiry(e,t,r){var a=i({value:t},r?{expiry:Date.now()+r}:{});this.set(e,JSON.stringify(a))}getJSON(e){var t=this.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return null}}setJSON(e,t,i){this.set(e,JSON.stringify(t),i)}getCookie(e){if("undefined"==typeof document)return null;var t=document.cookie.split(";");for(var i of t){var[r,...a]=i.trim().split("=");if(r===e){var n=a.join("=");try{return decodeURIComponent(n)}catch(e){return n}}}return null}setCookie(e,t,i){if("undefined"!=typeof document){var r=e+"="+encodeURIComponent(t);r+="; Max-Age="+i,r+="; path=/",r+="; SameSite="+this.sameSite,this.secure&&(r+="; Secure"),this.domain&&(r+="; domain="+this.domain),document.cookie=r}}removeCookie(e){if("undefined"!=typeof document){var t=e+"=; Max-Age=0; path=/";this.domain&&(t+="; domain="+this.domain),document.cookie=t,document.cookie=e+"=; Max-Age=0; path=/"}}usesLocalStorage(){return this.method===h||this.method===g}usesSessionStorage(){return this.method===f}canUseSessionStorage(){if(void 0===b||!(null==b?void 0:b.sessionStorage))return!1;try{var e="__vt_storage_test__";return b.sessionStorage.setItem(e,"test"),b.sessionStorage.removeItem(e),!0}catch(e){return!1}}getSessionStorage(){var e;return this.canUseSessionStorage()&&null!==(e=null==b?void 0:b.sessionStorage)&&void 0!==e?e:null}setMethod(e){this.method=e}getMethod(){return this.method}}class x{constructor(e,t){void 0===e&&(e="cookie"),this.storage=new B({method:e,domain:t,sameSite:"Lax"}),this._windowId=void 0,this._initializeWindowId()}getSessionId(){var e=this._getSessionIdRaw();return e||(e=_(),this._storeSessionId(e)),e}setSessionId(){var e=this._getSessionIdRaw()||_();return this._storeSessionId(e),e}resetSessionId(){this._clearSessionId(),this.setSessionId(),this._setWindowId(_())}_getSessionIdRaw(){var e=this.storage.getWithExpiry(a);if(e)return e;var t=this.storage.get(a);if(t)try{var i=JSON.parse(t);return"object"==typeof i&&null!==i&&"value"in i?i.expiry&&Date.now()>i.expiry?(this.storage.remove(a),null):i.value:t}catch(e){return t}return null}_storeSessionId(e){this.storage.setWithExpiry(e,e,18e5),this.storage.set(a,e,1800)}_clearSessionId(){this.storage.remove(a)}getWindowId(){if(this._windowId)return this._windowId;var e=this.storage.getSessionStorage();if(e){var t=e.getItem(n);if(t)return this._windowId=t,t}var i=_();return this._setWindowId(i),i}_setWindowId(e){if(e!==this._windowId){this._windowId=e;var t=this.storage.getSessionStorage();t&&t.setItem(n,e)}}_initializeWindowId(){var e=this.storage.getSessionStorage();if(e){var t=e.getItem(s),i=e.getItem(n);i&&!t?this._windowId=i:(i&&e.removeItem(n),this._setWindowId(_())),e.setItem(s,"true"),this._listenToUnload()}else this._windowId=_()}_listenToUnload(){var e=this.storage.getSessionStorage();b&&e&&S(b,"beforeunload",()=>{var e=this.storage.getSessionStorage();e&&e.removeItem(s)},{capture:!1})}updateStorageMethod(e,t){this.storage=new B({method:e,domain:t,sameSite:"Lax"})}}function O(e){if(!P)return null;var t=P.createElement("a");return t.href=e,t}function D(e,t){for(var i=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<i.length;r++){var a=i[r].split("=");if(a[0]===t){if(a.length<2)return"";var n=a[1];try{n=decodeURIComponent(n)}catch(e){}return n.replace(/\+/g," ")}}return""}function q(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),a=r[0]||"",n=r[1],s=a.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),l=[],d=0;d<c.length;d++){var h=c[d].split("="),g=h[0],f=h.slice(1).join("=");-1!==t.indexOf(g)?l.push(g+"="+i):g&&l.push(g+(f?"="+f:""))}var p=l.join("&");return u+(p?"?"+p:"")+(n?"#"+n:"")}function N(e){return"function"==typeof e}var $="Mobile",K="iOS",G="Android",j="Tablet",V=G+" "+j,F="iPad",W="Apple",H=W+" Watch",J="Safari",z="BlackBerry",Q="Samsung",Z=Q+"Browser",X=Q+" Internet",Y="Chrome",ee=Y+" OS",te=Y+" "+K,ie="Internet Explorer",re=ie+" "+$,ae="Opera",ne=ae+" Mini",se="Edge",oe="Microsoft "+se,ue="Firefox",ce=ue+" "+K,le="Nintendo",de="PlayStation",he="Xbox",ge=G+" "+$,fe=$+" "+J,pe="Windows",ve=pe+" Phone",me="Nokia",_e="Ouya",Ae="Generic",ye=Ae+" "+$.toLowerCase(),Se=Ae+" "+j.toLowerCase(),we="Konqueror",Ie="(\\d+(\\.\\d+)?)",be=new RegExp("Version/"+Ie),Me=new RegExp(he,"i"),Ee=new RegExp(de+" \\w+","i"),Pe=new RegExp(le+" \\w+","i"),Ce=new RegExp(z+"|PlayBook|BB10","i"),Re={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function Te(e,t){return e.toLowerCase().includes(t.toLowerCase())}var ke=(e,t)=>t&&Te(t,W)||function(e){return Te(e,J)&&!Te(e,Y)&&!Te(e,G)}(e),Ue=function(e,t){return t=t||"",Te(e," OPR/")&&Te(e,"Mini")?ne:Te(e," OPR/")?ae:Ce.test(e)?z:Te(e,"IE"+$)||Te(e,"WPDesktop")?re:Te(e,Z)?X:Te(e,se)||Te(e,"Edg/")?oe:Te(e,"FBIOS")?"Facebook "+$:Te(e,"UCWEB")||Te(e,"UCBrowser")?"UC Browser":Te(e,"CriOS")?te:Te(e,"CrMo")||Te(e,Y)?Y:Te(e,G)&&Te(e,J)?ge:Te(e,"FxiOS")?ce:Te(e.toLowerCase(),we.toLowerCase())?we:ke(e,t)?Te(e,$)?fe:J:Te(e,ue)?ue:Te(e,"MSIE")||Te(e,"Trident/")?ie:Te(e,"Gecko")?ue:""},Le={[re]:[new RegExp("rv:"+Ie)],[oe]:[new RegExp(se+"?\\/"+Ie)],[Y]:[new RegExp("("+Y+"|CrMo)\\/"+Ie)],[te]:[new RegExp("CriOS\\/"+Ie)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ie)],[J]:[be],[fe]:[be],[ae]:[new RegExp("(Opera|OPR)\\/"+Ie)],[ue]:[new RegExp(ue+"\\/"+Ie)],[ce]:[new RegExp("FxiOS\\/"+Ie)],[we]:[new RegExp("Konqueror[:/]?"+Ie,"i")],[z]:[new RegExp(z+" "+Ie),be],[ge]:[new RegExp("android\\s"+Ie,"i")],[X]:[new RegExp(Z+"\\/"+Ie)],[ie]:[new RegExp("(rv:|MSIE )"+Ie)],Mozilla:[new RegExp("rv:"+Ie)]},Be=function(e,t){var i=Ue(e,t),r=Le[i];if(void 0===r)return null;for(var a=0;a<r.length;a++){var n=r[a],s=e.match(n);if(s)return parseFloat(s[s.length-2])}return null},xe=[[new RegExp(he+"; "+he+" (.*?)[);]","i"),e=>[he,e&&e[1]||""]],[new RegExp(le,"i"),[le,""]],[new RegExp(de,"i"),[de,""]],[Ce,[z,""]],[new RegExp(pe,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ve,""];if(new RegExp($).test(t)&&!/IEMobile\b/.test(t))return[pe+" "+$,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=i[1],a=Re[r]||"";return/arm/i.test(t)&&(a="RT"),[pe,a]}return[pe,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[K,t.join(".")]}return[K,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=void 0===e[2]?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+G+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+G+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[G,t.join(".")]}return[G,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var i=[e[1],e[2],e[3]||"0"];t[1]=i.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ee,""]],[/Linux|debian/i,["Linux",""]]],Oe=function(e){return Pe.test(e)?le:Ee.test(e)?de:Me.test(e)?he:new RegExp(_e,"i").test(e)?_e:new RegExp("("+ve+"|WPDesktop)","i").test(e)?ve:/iPad/.test(e)?F:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?H:Ce.test(e)?z:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(me,"i").test(e)?me:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp($).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?G:V:G:new RegExp("(pda|"+$+")","i").test(e)?ye:new RegExp(j,"i").test(e)&&!new RegExp(j+" pc","i").test(e)?Se:""},De="https?://(.*)",qe=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ne=I(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],qe),$e="<masked>";function Ke(e){var t=function(e){return e?0===e.search(De+"google.([^/?]*)")?"google":0===e.search(De+"bing.com")?"bing":0===e.search(De+"yahoo.com")?"yahoo":0===e.search(De+"duckduckgo.com")?"duckduckgo":null:null}(e),i="yahoo"!==t?"q":"p",r={};if(null!==t){r.$search_engine=t;var a=P?D(P.referrer,i):"";a.length&&(r.ph_keyword=a)}return r}function Ge(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function je(){return(null==P?void 0:P.referrer)||"$direct"}function Ve(){var e;return(null==P?void 0:P.referrer)&&(null===(e=O(P.referrer))||void 0===e?void 0:e.host)||"$direct"}function Fe(e){var t,{r:i,u:r}=e,a={$referrer:i,$referring_domain:null==i?void 0:"$direct"===i?"$direct":null===(t=O(i))||void 0===t?void 0:t.host};if(r){a.$current_url=r;var n=O(r);a.$host=null==n?void 0:n.host,a.$pathname=null==n?void 0:n.pathname;var s=function(e){var t=Ne.concat([]),i={};return y(t,function(t){var r=D(e,t);i[t]=r||null}),i}(r);w(a,s)}i&&w(a,Ke(i));return a}function We(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function He(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function Je(e,t){if(!k)return{};var i,r,a,[n,s]=function(e){for(var t=0;t<xe.length;t++){var[i,r]=xe[t],a=i.exec(e),n=a&&(N(r)?r(a,e):r);if(n)return n}return["",""]}(k);return w(function(e){var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=e[i];null!=r&&""!==r&&(t[i]=r)}return t}({$os:n,$os_version:s,$browser:Ue(k,navigator.vendor),$device:Oe(k),$device_type:(r=k,a=Oe(r),a===F||a===V||"Kobo"===a||"Kindle Fire"===a||a===Se?j:a===le||a===he||a===de||a===_e?"Console":a===H?"Wearable":a?$:"Desktop"),$timezone:We(),$timezone_offset:He()}),{$current_url:q(null==C?void 0:C.href,[],$e),$host:null==C?void 0:C.host,$pathname:null==C?void 0:C.pathname,$raw_user_agent:k.length>1e3?k.substring(0,997)+"...":k,$browser_version:Be(k,navigator.vendor),$browser_language:Ge(),$browser_language_prefix:(i=Ge(),"string"==typeof i?i.split("-")[0]:void 0),$screen_height:null==b?void 0:b.screen.height,$screen_width:null==b?void 0:b.screen.width,$viewport_height:null==b?void 0:b.innerHeight,$viewport_width:null==b?void 0:b.innerWidth,$lib:"web",$lib_version:"1.0.7",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}class ze{constructor(e,t){void 0===e&&(e="localStorage"),this._cachedPersonProperties=null,this.storage=new B({method:e,domain:t,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return i({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.storage.set(c,this.userIdentity.anonymous_id,L)),this.userIdentity.anonymous_id}getUserProperties(){return i({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}identify(e,t,r){if("number"==typeof e&&(e=e.toString(),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),e)if(this.isDistinctIdStringLike(e))console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==e){var a=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=e,!this.userIdentity.device_id){var n=a||this.userIdentity.anonymous_id;this.userIdentity.device_id=n,this.userIdentity.properties=i({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:n})}e!==a&&(this.userIdentity.distinct_id=e);var s="anonymous"===this.userIdentity.user_state;e!==a&&s?(this.userIdentity.user_state="identified",t&&(this.userIdentity.properties=i({},this.userIdentity.properties,t)),r&&Object.keys(r).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=r[e])}),this.saveUserIdentity()):t||r?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),t&&(this.userIdentity.properties=i({},this.userIdentity.properties,t)),r&&Object.keys(r).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=r[e])}),this.saveUserIdentity()):e!==a&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(e,t){if(!e&&!t)return!1;var r=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,a=this.getPersonPropertiesHash(r,e,t);return this._cachedPersonProperties===a?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(e&&(this.userIdentity.properties=i({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity(),this._cachedPersonProperties=a,!0)}reset(e){var t=this.generateAnonymousId(),r=this.userIdentity.device_id,a=e?this.generateDeviceId():r;this.userIdentity={distinct_id:null,anonymous_id:t,device_id:a,properties:{},user_state:"anonymous"},this._cachedPersonProperties=null,this.saveUserIdentity(),this.userIdentity.properties=i({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}setDistinctId(e){this.userIdentity.distinct_id=e,this.saveUserIdentity()}setUserState(e){this.userIdentity.user_state=e,this.saveUserIdentity()}updateUserProperties(e,t){e&&(this.userIdentity.properties=i({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity()}ensureDeviceId(e){this.userIdentity.device_id||(this.userIdentity.device_id=e,this.userIdentity.properties=i({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:e}),this.saveUserIdentity())}createAlias(e,t){return this.isValidDistinctId(e)?(void 0===t&&(t=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(t)?e===t?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:e,original:t}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isDistinctIdStringLikePublic(e){return this.isDistinctIdStringLike(e)}set_initial_person_info(e,t){if(!this.getStoredUserProperties()[v]){var i=function(e,t){var i=e?I([],qe,t||[]):[],r=null==C?void 0:C.href.substring(0,1e3);return{r:je().substring(0,1e3),u:r?q(r,i,$e):void 0}}(e,t);this.register_once({[v]:i},void 0)}}get_initial_props(){var e,t,i=this.getStoredUserProperties()[v];return i?(e=Fe(i),t={},y(e,function(e,i){var r;t["$initial_"+(r=String(i),r.startsWith("$")?r.substring(1):r)]=e}),t):{}}update_referrer_info(){var e={$referrer:je(),$referring_domain:Ve()};this.register_once(e,void 0)}loadUserIdentity(){var e=this.storage.get(c)||this.generateAnonymousId(),t=this.storage.get(l)||null,i=this.storage.get(u)||this.generateDeviceId(),r=this.getStoredUserProperties(),a=this.storage.get(o)||"anonymous";return{distinct_id:t,anonymous_id:e||this.generateAnonymousId(),device_id:i,properties:r,user_state:a}}saveUserIdentity(){this.storage.set(c,this.userIdentity.anonymous_id,L),this.storage.set(u,this.userIdentity.device_id,L),this.storage.set(o,this.userIdentity.user_state,L),this.userIdentity.distinct_id?this.storage.set(l,this.userIdentity.distinct_id,L):this.storage.remove(l),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(d)||{}}setStoredUserProperties(e){this.storage.setJSON(d,e,L)}register_once(e,t){var i=this.getStoredUserProperties(),r=!1;for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(a in i||(i[a]=e[a],r=!0));if(t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(n in i||(i[n]=t[n],r=!0));r&&this.setStoredUserProperties(i)}generateAnonymousId(){return"anon_"+_()}generateDeviceId(){return"device_"+_()}getPersonPropertiesHash(e,t,i){return JSON.stringify({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}isValidDistinctId(e){if(!e||"string"!=typeof e)return!1;var t=e.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(t)&&0!==e.trim().length}isDistinctIdStringLike(e){if(!e||"string"!=typeof e)return!1;var t=e.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(t)}updateStorageMethod(e,t){this.storage=new B({method:e,domain:t,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}}class Qe{constructor(e,t){if(this.instance=t,e.capture_performance&&b)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(e){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",e)}}initializeWebVitals(){if(this.webVitals){var e=e=>{try{if(!(b&&P&&E&&C))return;var{country:t,locale:i}=function(){var e,t;if(!E)return{country:e,locale:t};try{var i=Intl.DateTimeFormat().resolvedOptions().timeZone;e=m[i],t=E.languages&&E.languages.length?E.languages[0]:E.userLanguage||E.language||E.browserLanguage||"en"}catch(e){}return{country:e,locale:t}}();this.instance.capture("web_vital",{name:e.name,value:e.value,delta:e.delta,rating:e.rating,id:e.id,navigationType:e.navigationType,pathname:C.pathname,href:C.href,"user-agent":E.userAgent,locale:i,location:t,referrer:P.referrer})}catch(e){console.error("Error sending web vital:",e)}};this.webVitals.onCLS&&this.webVitals.onCLS(e),this.webVitals.onFCP&&this.webVitals.onFCP(e),this.webVitals.onLCP&&this.webVitals.onLCP(e),this.webVitals.onTTFB&&this.webVitals.onTTFB(e),this.webVitals.onINP&&this.webVitals.onINP(e)}}}function Ze(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],a=i(r);return N(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),e[t]=a,()=>{e[t]=r}}catch(e){return()=>{}}}class Xe{constructor(e){var t;this._instance=e,this._lastPathname=(null===(t=null==b?void 0:b.location)||void 0===t?void 0:t.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0}monitorHistoryChanges(){var e,t;if(b&&C&&(this._lastPathname=C.pathname||"",b.history)){var i=this;(null===(e=b.history.pushState)||void 0===e?void 0:e.__vtilt_wrapped__)||Ze(b.history,"pushState",e=>function(t,r,a){e.call(this,t,r,a),i._capturePageview("pushState")}),(null===(t=b.history.replaceState)||void 0===t?void 0:t.__vtilt_wrapped__)||Ze(b.history,"replaceState",e=>function(t,r,a){e.call(this,t,r,a),i._capturePageview("replaceState")}),this._setupPopstateListener()}}_capturePageview(e){var t;try{var i=null===(t=null==b?void 0:b.location)||void 0===t?void 0:t.pathname;if(!i||!C||!P)return;if(i!==this._lastPathname&&this.isEnabled){var r={navigation_type:e};this._instance.capture("$pageview",r)}this._lastPathname=i}catch(t){console.error("Error capturing "+e+" pageview",t)}}_setupPopstateListener(){if(!this._popstateListener&&b){var e=()=>{this._capturePageview("popstate")};S(b,"popstate",e),this._popstateListener=()=>{b&&b.removeEventListener("popstate",e)}}}}var Ye=Uint8Array,et=Uint16Array,tt=Int32Array,it=new Ye([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rt=new Ye([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),at=new Ye([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nt=function(e,t){for(var i=new et(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var a=new tt(i[30]);for(r=1;r<30;++r)for(var n=i[r];n<i[r+1];++n)a[n]=n-i[r]<<5|r;return{b:i,r:a}},st=nt(it,2),ot=st.b,ut=st.r;ot[28]=258,ut[258]=28;for(var ct=nt(rt,0).r,lt=new et(32768),dt=0;dt<32768;++dt){var ht=(43690&dt)>>1|(21845&dt)<<1;ht=(61680&(ht=(52428&ht)>>2|(13107&ht)<<2))>>4|(3855&ht)<<4,lt[dt]=((65280&ht)>>8|(255&ht)<<8)>>1}var gt=function(e,t,i){for(var r=e.length,a=0,n=new et(t);a<r;++a)e[a]&&++n[e[a]-1];var s,o=new et(t);for(a=1;a<t;++a)o[a]=o[a-1]+n[a-1]<<1;if(i){s=new et(1<<t);var u=15-t;for(a=0;a<r;++a)if(e[a])for(var c=a<<4|e[a],l=t-e[a],d=o[e[a]-1]++<<l,h=d|(1<<l)-1;d<=h;++d)s[lt[d]>>u]=c}else for(s=new et(r),a=0;a<r;++a)e[a]&&(s[a]=lt[o[e[a]-1]++]>>15-e[a]);return s},ft=new Ye(288);for(dt=0;dt<144;++dt)ft[dt]=8;for(dt=144;dt<256;++dt)ft[dt]=9;for(dt=256;dt<280;++dt)ft[dt]=7;for(dt=280;dt<288;++dt)ft[dt]=8;var pt=new Ye(32);for(dt=0;dt<32;++dt)pt[dt]=5;var vt=gt(ft,9,0),mt=gt(pt,5,0),_t=function(e){return(e+7)/8|0},At=function(e,t,i){return(null==i||i>e.length)&&(i=e.length),new Ye(e.subarray(t,i))},yt=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>8},St=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>8,e[r+2]|=i>>16},wt=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var a=i.length,n=i.slice();if(!a)return{t:Rt,l:0};if(1==a){var s=new Ye(i[0].s+1);return s[i[0].s]=1,{t:s,l:1}}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],u=i[1],c=0,l=1,d=2;for(i[0]={s:-1,f:o.f+u.f,l:o,r:u};l!=a-1;)o=i[i[c].f<i[d].f?c++:d++],u=i[c!=l&&i[c].f<i[d].f?c++:d++],i[l++]={s:-1,f:o.f+u.f,l:o,r:u};var h=n[0].s;for(r=1;r<a;++r)n[r].s>h&&(h=n[r].s);var g=new et(h+1),f=It(i[l-1],g,0);if(f>t){r=0;var p=0,v=f-t,m=1<<v;for(n.sort(function(e,t){return g[t.s]-g[e.s]||e.f-t.f});r<a;++r){var _=n[r].s;if(!(g[_]>t))break;p+=m-(1<<f-g[_]),g[_]=t}for(p>>=v;p>0;){var A=n[r].s;g[A]<t?p-=1<<t-g[A]++-1:++r}for(;r>=0&&p;--r){var y=n[r].s;g[y]==t&&(--g[y],++p)}f=t}return{t:new Ye(g),l:f}},It=function(e,t,i){return-1==e.s?Math.max(It(e.l,t,i+1),It(e.r,t,i+1)):t[e.s]=i},bt=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new et(++t),r=0,a=e[0],n=1,s=function(e){i[r++]=e},o=1;o<=t;++o)if(e[o]==a&&o!=t)++n;else{if(!a&&n>2){for(;n>138;n-=138)s(32754);n>2&&(s(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(s(a),--n;n>6;n-=6)s(8304);n>2&&(s(n-3<<5|8208),n=0)}for(;n--;)s(a);n=1,a=e[o]}return{c:i.subarray(0,r),n:t}},Mt=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},Et=function(e,t,i){var r=i.length,a=_t(t+2);e[a]=255&r,e[a+1]=r>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var n=0;n<r;++n)e[a+n+4]=i[n];return 8*(a+4+r)},Pt=function(e,t,i,r,a,n,s,o,u,c,l){yt(t,l++,i),++a[256];for(var d=wt(a,15),h=d.t,g=d.l,f=wt(n,15),p=f.t,v=f.l,m=bt(h),_=m.c,A=m.n,y=bt(p),S=y.c,w=y.n,I=new et(19),b=0;b<_.length;++b)++I[31&_[b]];for(b=0;b<S.length;++b)++I[31&S[b]];for(var M=wt(I,7),E=M.t,P=M.l,C=19;C>4&&!E[at[C-1]];--C);var R,T,k,U,L=c+5<<3,B=Mt(a,ft)+Mt(n,pt)+s,x=Mt(a,h)+Mt(n,p)+s+14+3*C+Mt(I,E)+2*I[16]+3*I[17]+7*I[18];if(u>=0&&L<=B&&L<=x)return Et(t,l,e.subarray(u,u+c));if(yt(t,l,1+(x<B)),l+=2,x<B){R=gt(h,g,0),T=h,k=gt(p,v,0),U=p;var O=gt(E,P,0);yt(t,l,A-257),yt(t,l+5,w-1),yt(t,l+10,C-4),l+=14;for(b=0;b<C;++b)yt(t,l+3*b,E[at[b]]);l+=3*C;for(var D=[_,S],q=0;q<2;++q){var N=D[q];for(b=0;b<N.length;++b){var $=31&N[b];yt(t,l,O[$]),l+=E[$],$>15&&(yt(t,l,N[b]>>5&127),l+=N[b]>>12)}}}else R=vt,T=ft,k=mt,U=pt;for(b=0;b<o;++b){var K=r[b];if(K>255){St(t,l,R[($=K>>18&31)+257]),l+=T[$+257],$>7&&(yt(t,l,K>>23&31),l+=it[$]);var G=31&K;St(t,l,k[G]),l+=U[G],G>3&&(St(t,l,K>>5&8191),l+=rt[G])}else St(t,l,R[K]),l+=T[K]}return St(t,l,R[256]),l+T[256]},Ct=new tt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Rt=new Ye(0),Tt=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&-306674912)^i>>>1;e[t]=i}return e}(),kt=function(e,t,i,r,a){if(!a&&(a={l:1},t.dictionary)){var n=t.dictionary.subarray(-32768),s=new Ye(n.length+e.length);s.set(n),s.set(e,n.length),e=s,a.w=n.length}return function(e,t,i,r,a,n){var s=n.z||e.length,o=new Ye(r+s+5*(1+Math.ceil(s/7e3))+a),u=o.subarray(r,o.length-a),c=n.l,l=7&(n.r||0);if(t){l&&(u[0]=n.r>>3);for(var d=Ct[t-1],h=d>>13,g=8191&d,f=(1<<i)-1,p=n.p||new et(32768),v=n.h||new et(f+1),m=Math.ceil(i/3),_=2*m,A=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<_)&f},y=new tt(25e3),S=new et(288),w=new et(32),I=0,b=0,M=n.i||0,E=0,P=n.w||0,C=0;M+2<s;++M){var R=A(M),T=32767&M,k=v[R];if(p[T]=k,v[R]=T,P<=M){var U=s-M;if((I>7e3||E>24576)&&(U>423||!c)){l=Pt(e,u,0,y,S,w,b,E,C,M-C,l),E=I=b=0,C=M;for(var L=0;L<286;++L)S[L]=0;for(L=0;L<30;++L)w[L]=0}var B=2,x=0,O=g,D=T-k&32767;if(U>2&&R==A(M-D))for(var q=Math.min(h,U)-1,N=Math.min(32767,M),$=Math.min(258,U);D<=N&&--O&&T!=k;){if(e[M+B]==e[M+B-D]){for(var K=0;K<$&&e[M+K]==e[M+K-D];++K);if(K>B){if(B=K,x=D,K>q)break;var G=Math.min(D,K-2),j=0;for(L=0;L<G;++L){var V=M-D+L&32767,F=V-p[V]&32767;F>j&&(j=F,k=V)}}}D+=(T=k)-(k=p[T])&32767}if(x){y[E++]=268435456|ut[B]<<18|ct[x];var W=31&ut[B],H=31&ct[x];b+=it[W]+rt[H],++S[257+W],++w[H],P=M+B,++I}else y[E++]=e[M],++S[e[M]]}}for(M=Math.max(M,P);M<s;++M)y[E++]=e[M],++S[e[M]];l=Pt(e,u,c,y,S,w,b,E,C,M-C,l),c||(n.r=7&l|u[l/8|0]<<3,l-=7,n.h=v,n.p=p,n.i=M,n.w=P)}else{for(M=n.w||0;M<s+c;M+=65535){var J=M+65535;J>=s&&(u[l/8|0]=c,J=s),l=Et(u,l+1,e.subarray(M,J))}n.i=s}return At(o,0,r+_t(l)+a)}(e,null==t.level?6:t.level,null==t.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,i,r,a)},Ut=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8};function Lt(e,t){t||(t={});var i=function(){var e=-1;return{p:function(t){for(var i=e,r=0;r<t.length;++r)i=Tt[255&i^t[r]]^i>>>8;e=i},d:function(){return~e}}}(),r=e.length;i.p(e);var a,n=kt(e,t,10+((a=t).filename?a.filename.length+1:0),8),s=n.length;return function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Ut(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;r<=i.length;++r)e[r+10]=i.charCodeAt(r)}}(n,t),Ut(n,s-8,i.d()),Ut(n,s-4,r),n}var Bt="undefined"!=typeof TextEncoder&&new TextEncoder,xt="undefined"!=typeof TextDecoder&&new TextDecoder;try{xt.decode(Rt,{stream:!0})}catch(e){}var Ot,Dt="text/plain";!function(e){e.GZipJS="gzip-js",e.None="none"}(Ot||(Ot={}));var qt=e=>{var{data:t,compression:i}=e;if(t){var r=(e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t))(t),a=new Blob([r]).size;if(i===Ot.GZipJS&&a>=1024)try{var n=Lt(function(e,t){if(Bt)return Bt.encode(e);for(var i=e.length,r=new Ye(e.length+(e.length>>1)),a=0,n=function(e){r[a++]=e},s=0;s<i;++s){if(a+5>r.length){var o=new Ye(a+8+(i-s<<1));o.set(r),r=o}var u=e.charCodeAt(s);u<128||t?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>18),n(128|u>>12&63),n(128|u>>6&63),n(128|63&u)):(n(224|u>>12),n(128|u>>6&63),n(128|63&u))}return At(r,0,a)}(r),{mtime:0}),s=new Blob([n],{type:Dt});if(s.size<.95*a)return{contentType:Dt,body:s,estimatedSize:s.size}}catch(e){}return{contentType:"application/json",body:r,estimatedSize:a}}},Nt=[{name:"fetch",available:"undefined"!=typeof fetch,method:e=>{var r=qt(e);if(r){var{contentType:a,body:n,estimatedSize:s}=r,o=e.compression===Ot.GZipJS&&a===Dt?e.url+(e.url.includes("?")?"&":"?")+"compression=gzip-js":e.url,u=i({"Content-Type":a},e.headers||{}),c=new AbortController,l=e.timeout?setTimeout(()=>c.abort(),e.timeout):null;fetch(o,{method:e.method||"POST",headers:u,body:n,keepalive:s<52428.8,signal:c.signal}).then(function(){var i=t(function*(t){var i,r=yield t.text(),a={statusCode:t.status,text:r};if(200===t.status)try{a.json=JSON.parse(r)}catch(e){}null===(i=e.callback)||void 0===i||i.call(e,a)});return function(e){return i.apply(this,arguments)}}()).catch(()=>{var t;null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})}).finally(()=>{l&&clearTimeout(l)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:e=>{var t=qt(e);if(t){var{contentType:i,body:r}=t,a=e.compression===Ot.GZipJS&&i===Dt?e.url+(e.url.includes("?")?"&":"?")+"compression=gzip-js":e.url,n=new XMLHttpRequest;n.open(e.method||"POST",a,!0),e.headers&&Object.entries(e.headers).forEach(e=>{var[t,i]=e;n.setRequestHeader(t,i)}),n.setRequestHeader("Content-Type",i),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{var t;if(4===n.readyState){var i={statusCode:n.status,text:n.responseText};if(200===n.status)try{i.json=JSON.parse(n.responseText)}catch(e){}null===(t=e.callback)||void 0===t||t.call(e,i)}},n.onerror=()=>{var t;null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})},n.send(r)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:e=>{var t=qt(e);if(t){var{contentType:i,body:r}=t;try{var a="string"==typeof r?new Blob([r],{type:i}):r,n=e.compression===Ot.GZipJS&&i===Dt?e.url+(e.url.includes("?")?"&":"?")+"compression=gzip-js":e.url;navigator.sendBeacon(n,a)}catch(e){}}}}],$t=e=>{var t,i=e.transport||"fetch",r=Nt.find(e=>e.name===i&&e.available)||Nt.find(e=>e.available);if(!r)return console.error("vTilt: No available transport method"),void(null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0}));r.method(e)};class Kt{constructor(e,t){var i,r,a,n;this._isPaused=!0,this._queue=[],this._flushTimeoutMs=(i=(null==t?void 0:t.flush_interval_ms)||3e3,r=250,a=5e3,n=3e3,"number"!=typeof i||isNaN(i)?n:Math.min(Math.max(i,r),a)),this._sendRequest=e}get length(){return this._queue.length}enqueue(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()}unload(){if(this._clearFlushTimeout(),0!==this._queue.length){var e=this._formatQueue();for(var t in e){var r=e[t];this._sendRequest(i({},r,{transport:"sendBeacon"}))}}}enable(){this._isPaused=!1,this._setFlushTimeout()}pause(){this._isPaused=!0,this._clearFlushTimeout()}flush(){this._clearFlushTimeout(),this._flushNow(),this._setFlushTimeout()}_setFlushTimeout(){this._isPaused||(this._flushTimeout=setTimeout(()=>{this._clearFlushTimeout(),this._flushNow(),this._queue.length>0&&this._setFlushTimeout()},this._flushTimeoutMs))}_clearFlushTimeout(){this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0)}_flushNow(){if(0!==this._queue.length){var e=this._formatQueue(),t=Date.now();for(var i in e){var r=e[i];r.events.forEach(e=>{var i=new Date(e.timestamp).getTime();e.$offset=Math.abs(i-t)}),this._sendRequest(r)}}}_formatQueue(){var e={};return this._queue.forEach(t=>{var i=t.batchKey||t.url;e[i]||(e[i]={url:t.url,events:[],batchKey:t.batchKey}),e[i].events.push(t.event)}),this._queue=[],e}}class Gt{constructor(e){this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._areWeOnline=!0,this._sendRequest=e.sendRequest,this._sendBeacon=e.sendBeacon,b&&void 0!==E&&"onLine"in E&&(this._areWeOnline=E.onLine,S(b,"online",()=>{this._areWeOnline=!0,this._flush()}),S(b,"offline",()=>{this._areWeOnline=!1}))}get length(){return this._queue.length}enqueue(e,t){if(void 0===t&&(t=0),t>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var i=function(e){var t=3e3*Math.pow(2,e),i=t/2,r=Math.min(18e5,t),a=(Math.random()-.5)*(r-i);return Math.ceil(r+a)}(t),r=Date.now()+i;this._queue.push({retryAt:r,request:e,retriesPerformedSoFar:t+1});var a="VTilt: Enqueued failed request for retry in "+Math.round(i/1e3)+"s";this._areWeOnline||(a+=" (Browser is offline)"),console.warn(a),this._isPolling||(this._isPolling=!0,this._poll())}}retriableRequest(e){var i=this;return t(function*(){try{var t=yield i._sendRequest(e);200!==t.statusCode&&(t.statusCode<400||t.statusCode>=500)&&i.enqueue(e,0)}catch(t){i.enqueue(e,0)}})()}_poll(){this._poller&&clearTimeout(this._poller),this._poller=setTimeout(()=>{this._areWeOnline&&this._queue.length>0&&this._flush(),this._queue.length>0?this._poll():this._isPolling=!1},this._pollIntervalMs)}_flush(){var e=this,i=Date.now(),r=[],a=[];this._queue.forEach(e=>{e.retryAt<i?a.push(e):r.push(e)}),this._queue=r,a.forEach(function(){var i=t(function*(t){var{request:i,retriesPerformedSoFar:r}=t;try{var a=yield e._sendRequest(i);200!==a.statusCode&&(a.statusCode<400||a.statusCode>=500)&&e.enqueue(i,r)}catch(t){e.enqueue(i,r)}});return function(e){return i.apply(this,arguments)}}())}unload(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._queue.forEach(e=>{var{request:t}=e;try{this._sendBeacon(t)}catch(e){console.error("VTilt: Failed to send beacon on unload",e)}}),this._queue=[]}}var jt="vt_rate_limit";class Vt{constructor(e){var t,i;void 0===e&&(e={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(t=e.eventsPerSecond)&&void 0!==t?t:10,this.eventsBurstLimit=Math.max(null!==(i=e.eventsBurstLimit)&&void 0!==i?i:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=e.persistence,this.captureWarning=e.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(e){var t,i,r,a;void 0===e&&(e=!1);var n=Date.now(),s=null!==(i=null===(t=this.persistence)||void 0===t?void 0:t.get(jt))&&void 0!==i?i:{tokens:this.eventsBurstLimit,last:n},o=(n-s.last)/1e3;s.tokens+=o*this.eventsPerSecond,s.last=n,s.tokens>this.eventsBurstLimit&&(s.tokens=this.eventsBurstLimit);var u=s.tokens<1;return u||e||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||e||null===(r=this.captureWarning)||void 0===r||r.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=u,null===(a=this.persistence)||void 0===a||a.set(jt,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var Ft=Array.isArray;class Wt{constructor(e){void 0===e&&(e={}),this.__loaded=!1,this._initial_pageview_captured=!1,this._visibility_state_listener=null,this.__request_queue=[],this._has_warned_about_config=!1,this._set_once_properties_sent=!1,this.configManager=new r(e);var t=this.configManager.getConfig(),i=t.domain;!i&&C&&(i=this.getCurrentDomain()),this.sessionManager=new x(t.storage||"cookie",i),this.userManager=new ze(t.persistence||"localStorage",i),this.webVitalsManager=new Qe(t,this),this.rateLimiter=new Vt({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:e=>{this._capture_internal("$$client_ingestion_warning",{$$client_ingestion_warning_message:e})}}),this.retryQueue=new Gt({sendRequest:e=>this._send_http_request(e),sendBeacon:e=>this._send_beacon_request(e)}),this.requestQueue=new Kt(e=>this._send_batched_request(e),{flush_interval_ms:3e3})}init(e,t,i){var r;if(i&&i!==Jt){var a=null!==(r=Ht[i])&&void 0!==r?r:new Wt;return a._init(e,t,i),Ht[i]=a,Ht[Jt][i]=a,a}return this._init(e,t,i)}_init(e,t,r){if(void 0===t&&(t={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(i({},t,{projectId:e||t.projectId,name:r})),this.__loaded=!0;var a=this.configManager.getConfig();return this.userManager.set_initial_person_info(a.mask_personal_data_properties,a.custom_personal_data_properties),this.historyAutocapture=new Xe(this),this.historyAutocapture.startIfEnabled(),this._setup_unload_handler(),this._start_queue_if_opted_in(),!1!==a.capture_pageview&&this._capture_initial_pageview(),this}_start_queue_if_opted_in(){this.requestQueue.enable()}_setup_unload_handler(){if(b){var e=()=>{this.requestQueue.unload(),this.retryQueue.unload()};S(b,"beforeunload",e),S(b,"pagehide",e)}}toString(){var e,t=null!==(e=this.configManager.getConfig().name)&&void 0!==e?e:Jt;return t!==Jt&&(t=Jt+"."+t),t}getCurrentDomain(){if(!C)return"";var e=C.protocol,t=C.hostname,i=C.port;return e+"//"+t+(i?":"+i:"")}_is_configured(){var e=this.configManager.getConfig();return!(!e.projectId||!e.token)||(this._has_warned_about_config||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this._has_warned_about_config=!0),!1)}buildUrl(){var e=this.configManager.getConfig(),{proxyUrl:t,proxy:i,api_host:r,token:a}=e;return t||(i?i+"/api/tracking?token="+a:r?r.replace(/\/+$/gm,"")+"/api/tracking?token="+a:"/api/tracking?token="+a)}sendRequest(e,t,i){if(this._is_configured()){if(i&&void 0!==b)if(b.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:e,event:t});this.requestQueue.enqueue({url:e,event:t})}}_send_batched_request(e){var{transport:t}=e;"sendBeacon"!==t?this.retryQueue.retriableRequest(e):this._send_beacon_request(e)}_send_http_request(e){return new Promise(t=>{var{url:i,events:r}=e,a=1===r.length?r[0]:{events:r},n=this.configManager.getConfig().disable_compression?Ot.None:Ot.GZipJS;$t({url:i,data:a,method:"POST",transport:"XHR",compression:n,callback:e=>{t({statusCode:e.statusCode})}})})}_send_beacon_request(e){var{url:t,events:i}=e,r=1===i.length?i[0]:{events:i},a=this.configManager.getConfig().disable_compression?Ot.None:Ot.GZipJS;$t({url:t,data:r,method:"POST",transport:"sendBeacon",compression:a})}_send_retriable_request(e){this.sendRequest(e.url,e.event,!1)}capture(e,t,r){if(this.sessionManager.setSessionId(),E&&E.userAgent&&function(e){return!(e&&"string"==typeof e&&e.length>500)}(E.userAgent)&&((null==r?void 0:r.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var a=this.buildUrl(),n=Je(),s=this.userManager.getUserProperties(),o=this.userManager.get_initial_props(),u=this.sessionManager.getSessionId(),c=this.sessionManager.getWindowId(),l=this.userManager.getAnonymousId(),d={};!this._set_once_properties_sent&&Object.keys(o).length>0&&Object.assign(d,o),t.$set_once&&Object.assign(d,t.$set_once);var h=i({},n,s,{$session_id:u,$window_id:c},l?{$anon_distinct_id:l}:{},Object.keys(d).length>0?{$set_once:d}:{},t.$set?{$set:t.$set}:{},t);!this._set_once_properties_sent&&Object.keys(o).length>0&&(this._set_once_properties_sent=!0),"$pageview"===e&&P&&(h.title=P.title);var g,f,p=this.configManager.getConfig();if(!1!==p.stringifyPayload){if(g=Object.assign({},h,p.globalAttributes),!A(g=JSON.stringify(g)))return}else if(g=Object.assign({},h,p.globalAttributes),!A(JSON.stringify(g)))return;f="$identify"===e?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var v={timestamp:(new Date).toISOString(),event:e,project_id:p.projectId||"",domain:p.domain||this.getCurrentDomain(),payload:g,distinct_id:f,anonymous_id:l};this.sendRequest(a,v,!0)}}_capture_internal(e,t){this.capture(e,t,{skip_client_rate_limiting:!0})}trackEvent(e,t){void 0===t&&(t={}),this.capture(e,t)}identify(e,t,i){if("number"==typeof e&&(e=String(e),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),e)if(this.userManager.isDistinctIdStringLikePublic(e))console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==e){var r=this.userManager.getDistinctId(),a=this.userManager.getAnonymousId(),n=this.userManager.getDeviceId(),s="anonymous"===this.userManager.getUserState();if(!n){var o=r||a;this.userManager.ensureDeviceId(o)}e!==r&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(t,i),this.capture("$identify",{distinct_id:e,$anon_distinct_id:a,$set:t||{},$set_once:i||{}}),this.userManager.setDistinctId(e)):t||i?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(t,i),this.capture("$set",{$set:t||{},$set_once:i||{}})):e!==r&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(e))}else console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(e,t){this.userManager.setUserProperties(e,t)&&this.capture("$set",{$set:e||{},$set_once:t||{}})}resetUser(e){this.sessionManager.resetSessionId(),this.userManager.reset(e)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(e,t){var i=this.userManager.createAlias(e,t);i?this.capture("$alias",{$original_id:i.original,$alias_id:i.distinct_id}):e===(t||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(e)}_capture_initial_pageview(){P&&("visible"===P.visibilityState?this._initial_pageview_captured||(this._initial_pageview_captured=!0,setTimeout(()=>{if(P&&C){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this._visibility_state_listener&&(P.removeEventListener("visibilitychange",this._visibility_state_listener),this._visibility_state_listener=null)):this._visibility_state_listener||(this._visibility_state_listener=()=>{this._capture_initial_pageview()},S(P,"visibilitychange",this._visibility_state_listener)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}updateConfig(e){this.configManager.updateConfig(e);var t=this.configManager.getConfig(),i=t.domain;!i&&C&&(i=this.getCurrentDomain()),this.sessionManager=new x(t.storage||"cookie",i),this.userManager=new ze(t.persistence||"localStorage",i),this.webVitalsManager=new Qe(t,this)}_execute_array(e){Array.isArray(e)&&e.forEach(e=>{if(e&&Array.isArray(e)&&e.length>0){var t=e[0],i=e.slice(1);if("function"==typeof this[t])try{this[t](...i)}catch(e){console.error("vTilt: Error executing queued call "+t+":",e)}}})}_dom_loaded(){this.__request_queue.forEach(e=>{this._send_retriable_request(e)}),this.__request_queue=[],this._start_queue_if_opted_in()}}var Ht={},Jt="vt",zt=!(void 0!==T||void 0!==R)&&-1===(null==k?void 0:k.indexOf("MSIE"))&&-1===(null==k?void 0:k.indexOf("Mozilla"));null!=b&&(b.__VTILT_ENQUEUE_REQUESTS=zt);var Qt,Zt;Qt=Ht[Jt]=new Wt,(Zt=U.vt)&&y(Zt._i,function(e){if(e&&Ft(e)){var t=Qt.init(e[0],e[1],e[2]),i=Zt[e[2]||"vt"]||Zt;t&&t._execute_array(i)}}),U.vt=Qt,function(){function e(){e.done||(e.done=!0,zt=!1,null!=b&&(b.__VTILT_ENQUEUE_REQUESTS=!1),y(Ht,function(e){e._dom_loaded()}))}P&&"function"==typeof P.addEventListener?"complete"===P.readyState?e():S(P,"DOMContentLoaded",e,{capture:!1}):b&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")}()}();
2
2
  //# sourceMappingURL=array.no-external.js.map