@v-tilt/browser 1.1.4 → 1.2.0
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.
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/entrypoints/array.d.ts +1 -0
- package/dist/entrypoints/external-scripts-loader.d.ts +24 -0
- package/dist/entrypoints/module.es.d.ts +1 -0
- package/dist/entrypoints/recorder.d.ts +23 -0
- package/dist/extensions/replay/index.d.ts +13 -0
- package/dist/extensions/replay/session-recording-utils.d.ts +92 -0
- package/dist/extensions/replay/session-recording-wrapper.d.ts +61 -0
- package/dist/extensions/replay/session-recording.d.ts +95 -0
- package/dist/extensions/replay/types.d.ts +211 -0
- package/dist/external-scripts-loader.js +2 -0
- package/dist/external-scripts-loader.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.d.ts +271 -8
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.d.ts +271 -8
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/recorder.js +2 -0
- package/dist/recorder.js.map +1 -0
- package/dist/session.d.ts +4 -2
- package/dist/storage.d.ts +8 -3
- package/dist/types.d.ts +91 -7
- package/dist/user-manager.d.ts +2 -2
- package/dist/utils/globals.d.ts +42 -0
- package/dist/vtilt.d.ts +36 -0
- package/lib/config.js +2 -0
- package/lib/entrypoints/array.d.ts +1 -0
- package/lib/entrypoints/array.js +1 -0
- package/lib/entrypoints/external-scripts-loader.d.ts +24 -0
- package/lib/entrypoints/external-scripts-loader.js +107 -0
- package/lib/entrypoints/module.es.d.ts +1 -0
- package/lib/entrypoints/module.es.js +1 -0
- package/lib/entrypoints/recorder.d.ts +23 -0
- package/lib/entrypoints/recorder.js +42 -0
- package/lib/extensions/replay/index.d.ts +13 -0
- package/lib/extensions/replay/index.js +31 -0
- package/lib/extensions/replay/session-recording-utils.d.ts +92 -0
- package/lib/extensions/replay/session-recording-utils.js +212 -0
- package/lib/extensions/replay/session-recording-wrapper.d.ts +61 -0
- package/lib/extensions/replay/session-recording-wrapper.js +149 -0
- package/lib/extensions/replay/session-recording.d.ts +95 -0
- package/lib/extensions/replay/session-recording.js +700 -0
- package/lib/extensions/replay/types.d.ts +211 -0
- package/lib/extensions/replay/types.js +8 -0
- package/lib/session.d.ts +4 -2
- package/lib/session.js +7 -41
- package/lib/storage.d.ts +8 -3
- package/lib/storage.js +62 -9
- package/lib/types.d.ts +91 -7
- package/lib/user-manager.d.ts +2 -2
- package/lib/user-manager.js +4 -4
- package/lib/utils/globals.d.ts +42 -0
- package/lib/utils/globals.js +2 -0
- package/lib/vtilt.d.ts +36 -0
- package/lib/vtilt.js +110 -14
- package/package.json +4 -1
package/dist/array.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";function i(i,e,t,a,r,n,s){try{var o=i[n](s),u=o.value}catch(i){return void t(i)}o.done?e(u):Promise.resolve(u).then(a,r)}function e(e){return function(){var t=this,a=arguments;return new Promise(function(r,n){var s=e.apply(t,a);function o(e){i(s,r,n,o,u,"next",e)}function u(e){i(s,r,n,o,u,"throw",e)}o(void 0)})}}function t(){return t=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)({}).hasOwnProperty.call(t,a)&&(i[a]=t[a])}return i},t.apply(null,arguments)}class a{constructor(i){void 0===i&&(i={}),this.config=this.parseConfigFromScript(i)}parseConfigFromScript(i){if(!document.currentScript)return t({token:i.token||""},i);var e=document.currentScript,a=t({token:""},i);if(a.api_host=e.getAttribute("data-api-host")||e.getAttribute("data-host")||i.api_host,a.proxy=e.getAttribute("data-proxy")||i.proxy,a.proxyUrl=e.getAttribute("data-proxy-url")||i.proxyUrl,a.token=e.getAttribute("data-token")||i.token||"",a.projectId=e.getAttribute("data-project-id")||i.projectId||"",a.domain=e.getAttribute("data-domain")||i.domain,a.storage=e.getAttribute("data-storage")||i.storage,a.stringifyPayload="false"!==e.getAttribute("data-stringify-payload"),a.capture_performance="true"===e.getAttribute("data-capture-performance")||i.capture_performance,a.proxy&&a.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 r of(a.globalAttributes=t({},i.globalAttributes),Array.from(e.attributes)))r.name.startsWith("data-vt-")&&(a.globalAttributes[r.name.slice(8).replace(/-/g,"_")]=r.value);return a}getConfig(){return t({},this.config)}updateConfig(i){this.config=t({},this.config,i)}}var r="__vt_session",n="__vt_window_id",s="__vt_primary_window",o="__vt_user_state",u="__vt_device_id",c="__vt_anonymous_id",h="__vt_distinct_id",l="__vt_user_properties",d="localStorage",f="localStorage+cookie",v="sessionStorage",A="memory",m="$initial_person_info",p={"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 g(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}function _(i){return!(!i||"string"!=typeof i)&&!(i.length<2||i.length>10240)}function S(i,e,t){if(i)if(Array.isArray(i))i.forEach((i,a)=>{e.call(t,i,a)});else for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&e.call(t,i[a],a)}function y(i,e,t,a){var{capture:r=!1,passive:n=!0}=null!=a?a:{};null==i||i.addEventListener(e,t,{capture:r,passive:n})}function w(i,e){if(!e)return i;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}function E(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];for(var r of t)for(var n of r)i.push(n);return i}var M="undefined"!=typeof window?window:void 0,b="undefined"!=typeof globalThis?globalThis:M,P=null==b?void 0:b.navigator,R=null==b?void 0:b.document,C=null==b?void 0:b.location,T=null==b?void 0:b.fetch,k=(null==b?void 0:b.XMLHttpRequest)&&"withCredentials"in new b.XMLHttpRequest?b.XMLHttpRequest:void 0;null==b||b.AbortController;var U=null==P?void 0:P.userAgent,B=null!=M?M:{},I=31536e3;class x{constructor(i){var e;this.memoryStorage=new Map,this.method=i.method,this.domain=i.domain,this.sameSite=i.sameSite||"Lax",this.secure=null!==(e=i.secure)&&void 0!==e?e:"undefined"!=typeof location&&"https:"===location.protocol}get(i){var e;try{if(this.method===A)return null!==(e=this.memoryStorage.get(i))&&void 0!==e?e:null;if(this.usesLocalStorage()){var t=localStorage.getItem(i);return null!==t?t:this.method===f?this.getCookie(i):null}return this.usesSessionStorage()?sessionStorage.getItem(i):this.getCookie(i)}catch(e){return console.warn('[StorageManager] Failed to get "'+i+'":',e),null}}set(i,e,t){try{if(this.method===A)return void this.memoryStorage.set(i,e);if(this.usesLocalStorage())return localStorage.setItem(i,e),void(this.method===f&&this.setCookie(i,e,t||I));if(this.usesSessionStorage())return void sessionStorage.setItem(i,e);this.setCookie(i,e,t||I)}catch(e){console.warn('[StorageManager] Failed to set "'+i+'":',e)}}remove(i){try{if(this.method===A)return void this.memoryStorage.delete(i);if(this.usesLocalStorage())return localStorage.removeItem(i),void(this.method===f&&this.removeCookie(i));if(this.usesSessionStorage())return void sessionStorage.removeItem(i);this.removeCookie(i)}catch(e){console.warn('[StorageManager] Failed to remove "'+i+'":',e)}}getWithExpiry(i){var e=this.get(i);if(!e)return null;try{var t=JSON.parse(e);return t.expiry&&Date.now()>t.expiry?(this.remove(i),null):t.value}catch(i){return null}}setWithExpiry(i,e,a){var r=t({value:e},a?{expiry:Date.now()+a}:{});this.set(i,JSON.stringify(r))}getJSON(i){var e=this.get(i);if(!e)return null;try{return JSON.parse(e)}catch(i){return null}}setJSON(i,e,t){this.set(i,JSON.stringify(e),t)}getCookie(i){if("undefined"==typeof document)return null;var e=document.cookie.split(";");for(var t of e){var[a,...r]=t.trim().split("=");if(a===i){var n=r.join("=");try{return decodeURIComponent(n)}catch(i){return n}}}return null}setCookie(i,e,t){if("undefined"!=typeof document){var a=i+"="+encodeURIComponent(e);a+="; Max-Age="+t,a+="; path=/",a+="; SameSite="+this.sameSite,this.secure&&(a+="; Secure"),this.domain&&(a+="; domain="+this.domain),document.cookie=a}}removeCookie(i){if("undefined"!=typeof document){var e=i+"=; Max-Age=0; path=/";this.domain&&(e+="; domain="+this.domain),document.cookie=e,document.cookie=i+"=; Max-Age=0; path=/"}}usesLocalStorage(){return this.method===d||this.method===f}usesSessionStorage(){return this.method===v}canUseSessionStorage(){if(void 0===M||!(null==M?void 0:M.sessionStorage))return!1;try{var i="__vt_storage_test__";return M.sessionStorage.setItem(i,"test"),M.sessionStorage.removeItem(i),!0}catch(i){return!1}}getSessionStorage(){var i;return this.canUseSessionStorage()&&null!==(i=null==M?void 0:M.sessionStorage)&&void 0!==i?i:null}setMethod(i){this.method=i}getMethod(){return this.method}}class N{constructor(i,e){void 0===i&&(i="cookie"),this.storage=new x({method:i,domain:e,sameSite:"Lax"}),this.o=void 0,this.v()}getSessionId(){var i=this.A();return i||(i=g(),this.m(i)),i}setSessionId(){var i=this.A()||g();return this.m(i),i}resetSessionId(){this.S(),this.setSessionId(),this.M(g())}A(){var i=this.storage.getWithExpiry(r);if(i)return i;var e=this.storage.get(r);if(e)try{var t=JSON.parse(e);return"object"==typeof t&&null!==t&&"value"in t?t.expiry&&Date.now()>t.expiry?(this.storage.remove(r),null):t.value:e}catch(i){return e}return null}m(i){this.storage.setWithExpiry(r,i,18e5),this.storage.set(r,i,1800)}S(){this.storage.remove(r)}getWindowId(){if(this.o)return this.o;var i=this.storage.getSessionStorage();if(i){var e=i.getItem(n);if(e)return this.o=e,e}var t=g();return this.M(t),t}M(i){if(i!==this.o){this.o=i;var e=this.storage.getSessionStorage();e&&e.setItem(n,i)}}v(){var i=this.storage.getSessionStorage();if(i){var e=i.getItem(s),t=i.getItem(n);t&&!e?this.o=t:(t&&i.removeItem(n),this.M(g())),i.setItem(s,"true"),this.P()}else this.o=g()}P(){var i=this.storage.getSessionStorage();M&&i&&y(M,"beforeunload",()=>{var i=this.storage.getSessionStorage();i&&i.removeItem(s)},{capture:!1})}updateStorageMethod(i,e){this.storage=new x({method:i,domain:e,sameSite:"Lax"})}}function O(i){if(!R)return null;var e=R.createElement("a");return e.href=i,e}function D(i,e){for(var t=((i.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;a<t.length;a++){var r=t[a].split("=");if(r[0]===e){if(r.length<2)return"";var n=r[1];try{n=decodeURIComponent(n)}catch(i){}return n.replace(/\+/g," ")}}return""}function L(i,e,t){if(!i||!e||!e.length)return i;for(var a=i.split("#"),r=a[0]||"",n=a[1],s=r.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),h=[],l=0;l<c.length;l++){var d=c[l].split("="),f=d[0],v=d.slice(1).join("=");-1!==e.indexOf(f)?h.push(f+"="+t):f&&h.push(f+(v?"="+v:""))}var A=h.join("&");return u+(A?"?"+A:"")+(n?"#"+n:"")}function K(i){return"function"==typeof i}var G="Mobile",j="iOS",F="Android",V="Tablet",q=F+" "+V,H="iPad",W="Apple",z=W+" Watch",J="Safari",Z="BlackBerry",X="Samsung",Q=X+"Browser",Y=X+" Internet",ii="Chrome",ei=ii+" OS",ti=ii+" "+j,ai="Internet Explorer",ri=ai+" "+G,ni="Opera",si=ni+" Mini",oi="Edge",ui="Microsoft "+oi,ci="Firefox",hi=ci+" "+j,li="Nintendo",di="PlayStation",fi="Xbox",vi=F+" "+G,Ai=G+" "+J,mi="Windows",pi=mi+" Phone",gi="Nokia",_i="Ouya",Si="Generic",yi=Si+" "+G.toLowerCase(),wi=Si+" "+V.toLowerCase(),Ei="Konqueror",Mi="(\\d+(\\.\\d+)?)",bi=new RegExp("Version/"+Mi),Pi=new RegExp(fi,"i"),Ri=new RegExp(di+" \\w+","i"),Ci=new RegExp(li+" \\w+","i"),Ti=new RegExp(Z+"|PlayBook|BB10","i"),ki={"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 Ui(i,e){return i.toLowerCase().includes(e.toLowerCase())}var Bi=(i,e)=>e&&Ui(e,W)||function(i){return Ui(i,J)&&!Ui(i,ii)&&!Ui(i,F)}(i),Ii=function(i,e){return e=e||"",Ui(i," OPR/")&&Ui(i,"Mini")?si:Ui(i," OPR/")?ni:Ti.test(i)?Z:Ui(i,"IE"+G)||Ui(i,"WPDesktop")?ri:Ui(i,Q)?Y:Ui(i,oi)||Ui(i,"Edg/")?ui:Ui(i,"FBIOS")?"Facebook "+G:Ui(i,"UCWEB")||Ui(i,"UCBrowser")?"UC Browser":Ui(i,"CriOS")?ti:Ui(i,"CrMo")||Ui(i,ii)?ii:Ui(i,F)&&Ui(i,J)?vi:Ui(i,"FxiOS")?hi:Ui(i.toLowerCase(),Ei.toLowerCase())?Ei:Bi(i,e)?Ui(i,G)?Ai:J:Ui(i,ci)?ci:Ui(i,"MSIE")||Ui(i,"Trident/")?ai:Ui(i,"Gecko")?ci:""},xi={[ri]:[new RegExp("rv:"+Mi)],[ui]:[new RegExp(oi+"?\\/"+Mi)],[ii]:[new RegExp("("+ii+"|CrMo)\\/"+Mi)],[ti]:[new RegExp("CriOS\\/"+Mi)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Mi)],[J]:[bi],[Ai]:[bi],[ni]:[new RegExp("(Opera|OPR)\\/"+Mi)],[ci]:[new RegExp(ci+"\\/"+Mi)],[hi]:[new RegExp("FxiOS\\/"+Mi)],[Ei]:[new RegExp("Konqueror[:/]?"+Mi,"i")],[Z]:[new RegExp(Z+" "+Mi),bi],[vi]:[new RegExp("android\\s"+Mi,"i")],[Y]:[new RegExp(Q+"\\/"+Mi)],[ai]:[new RegExp("(rv:|MSIE )"+Mi)],Mozilla:[new RegExp("rv:"+Mi)]},Ni=function(i,e){var t=Ii(i,e),a=xi[t];if(void 0===a)return null;for(var r=0;r<a.length;r++){var n=a[r],s=i.match(n);if(s)return parseFloat(s[s.length-2])}return null},Oi=[[new RegExp(fi+"; "+fi+" (.*?)[);]","i"),i=>[fi,i&&i[1]||""]],[new RegExp(li,"i"),[li,""]],[new RegExp(di,"i"),[di,""]],[Ti,[Z,""]],[new RegExp(mi,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[pi,""];if(new RegExp(G).test(e)&&!/IEMobile\b/.test(e))return[mi+" "+G,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var a=t[1],r=ki[a]||"";return/arm/i.test(e)&&(r="RT"),[mi,r]}return[mi,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>{if(i&&i[3]){var e=[i[3],i[4],i[5]||"0"];return[j,e.join(".")]}return[j,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=void 0===i[2]?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+F+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+F+")","i"),i=>{if(i&&i[2]){var e=[i[2],i[3],i[4]||"0"];return[F,e.join(".")]}return[F,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];if(i&&i[1]){var t=[i[1],i[2],i[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ei,""]],[/Linux|debian/i,["Linux",""]]],Di=function(i){return Ci.test(i)?li:Ri.test(i)?di:Pi.test(i)?fi:new RegExp(_i,"i").test(i)?_i:new RegExp("("+pi+"|WPDesktop)","i").test(i)?pi:/iPad/.test(i)?H:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?z:Ti.test(i)?Z:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(gi,"i").test(i)?gi:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?!new RegExp(G).test(i)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)?/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?F:q:F:new RegExp("(pda|"+G+")","i").test(i)?yi:new RegExp(V,"i").test(i)&&!new RegExp(V+" pc","i").test(i)?wi:""},Li="https?://(.*)",$i=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ki=E(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],$i),Gi="<masked>";function ji(i){var e=function(i){return i?0===i.search(Li+"google.([^/?]*)")?"google":0===i.search(Li+"bing.com")?"bing":0===i.search(Li+"yahoo.com")?"yahoo":0===i.search(Li+"duckduckgo.com")?"duckduckgo":null:null}(i),t="yahoo"!==e?"q":"p",a={};if(null!==e){a.$search_engine=e;var r=R?D(R.referrer,t):"";r.length&&(a.ph_keyword=r)}return a}function Fi(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function Vi(){return(null==R?void 0:R.referrer)||"$direct"}function qi(){var i;return(null==R?void 0:R.referrer)&&(null===(i=O(R.referrer))||void 0===i?void 0:i.host)||"$direct"}function Hi(i){var e,{r:t,u:a}=i,r={$referrer:t,$referring_domain:null==t?void 0:"$direct"===t?"$direct":null===(e=O(t))||void 0===e?void 0:e.host};if(a){r.$current_url=a;var n=O(a);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname;var s=function(i){var e=Ki.concat([]),t={};return S(e,function(e){var a=D(i,e);t[e]=a||null}),t}(a);w(r,s)}t&&w(r,ji(t));return r}function Wi(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(i){return}}function zi(){try{return(new Date).getTimezoneOffset()}catch(i){return}}function Ji(i,e){if(!U)return{};var t,a,r,[n,s]=function(i){for(var e=0;e<Oi.length;e++){var[t,a]=Oi[e],r=t.exec(i),n=r&&(K(a)?a(r,i):a);if(n)return n}return["",""]}(U);return w(function(i){var e={};for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var a=i[t];null!=a&&""!==a&&(e[t]=a)}return e}({$os:n,$os_version:s,$browser:Ii(U,navigator.vendor),$device:Di(U),$device_type:(a=U,r=Di(a),r===H||r===q||"Kobo"===r||"Kindle Fire"===r||r===wi?V:r===li||r===fi||r===di||r===_i?"Console":r===z?"Wearable":r?G:"Desktop"),$timezone:Wi(),$timezone_offset:zi()}),{$current_url:L(null==C?void 0:C.href,[],Gi),$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:Ni(U,navigator.vendor),$browser_language:Fi(),$browser_language_prefix:(t=Fi(),"string"==typeof t?t.split("-")[0]:void 0),$screen_height:null==M?void 0:M.screen.height,$screen_width:null==M?void 0:M.screen.width,$viewport_height:null==M?void 0:M.innerHeight,$viewport_width:null==M?void 0:M.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 Zi{constructor(i,e){void 0===i&&(i="localStorage"),this.R=null,this.storage=new x({method:i,domain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return t({},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,I)),this.userIdentity.anonymous_id}getUserProperties(){return t({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}identify(i,e,a){if("number"==typeof i&&(i=i.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.")),i)if(this.isDistinctIdStringLike(i))console.error('The string "'+i+'" 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"!==i){var r=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=i,!this.userIdentity.device_id){var n=r||this.userIdentity.anonymous_id;this.userIdentity.device_id=n,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:n})}i!==r&&(this.userIdentity.distinct_id=i);var s="anonymous"===this.userIdentity.user_state;i!==r&&s?(this.userIdentity.user_state="identified",e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),a&&Object.keys(a).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=a[i])}),this.saveUserIdentity()):e||a?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),a&&Object.keys(a).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=a[i])}),this.saveUserIdentity()):i!==r&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+i+'" 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(i,e){if(!i&&!e)return!1;var a=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,r=this.getPersonPropertiesHash(a,i,e);return this.R===r?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity(),this.R=r,!0)}reset(i){var e=this.generateAnonymousId(),a=this.userIdentity.device_id,r=i?this.generateDeviceId():a;this.userIdentity={distinct_id:null,anonymous_id:e,device_id:r,properties:{},user_state:"anonymous"},this.R=null,this.saveUserIdentity(),this.userIdentity.properties=t({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}setDistinctId(i){this.userIdentity.distinct_id=i,this.saveUserIdentity()}setUserState(i){this.userIdentity.user_state=i,this.saveUserIdentity()}updateUserProperties(i,e){i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity()}ensureDeviceId(i){this.userIdentity.device_id||(this.userIdentity.device_id=i,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:i}),this.saveUserIdentity())}createAlias(i,e){return this.isValidDistinctId(i)?(void 0===e&&(e=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(e)?i===e?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:i,original:e}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isDistinctIdStringLikePublic(i){return this.isDistinctIdStringLike(i)}set_initial_person_info(i,e){if(!this.getStoredUserProperties()[m]){var t=function(i,e){var t=i?E([],$i,e||[]):[],a=null==C?void 0:C.href.substring(0,1e3);return{r:Vi().substring(0,1e3),u:a?L(a,t,Gi):void 0}}(i,e);this.register_once({[m]:t},void 0)}}get_initial_props(){var i,e,t=this.getStoredUserProperties()[m];return t?(i=Hi(t),e={},S(i,function(i,t){var a;e["$initial_"+(a=String(t),a.startsWith("$")?a.substring(1):a)]=i}),e):{}}update_referrer_info(){var i={$referrer:Vi(),$referring_domain:qi()};this.register_once(i,void 0)}loadUserIdentity(){var i=this.storage.get(c)||this.generateAnonymousId(),e=this.storage.get(h)||null,t=this.storage.get(u)||this.generateDeviceId(),a=this.getStoredUserProperties(),r=this.storage.get(o)||"anonymous";return{distinct_id:e,anonymous_id:i||this.generateAnonymousId(),device_id:t,properties:a,user_state:r}}saveUserIdentity(){this.storage.set(c,this.userIdentity.anonymous_id,I),this.storage.set(u,this.userIdentity.device_id,I),this.storage.set(o,this.userIdentity.user_state,I),this.userIdentity.distinct_id?this.storage.set(h,this.userIdentity.distinct_id,I):this.storage.remove(h),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(l)||{}}setStoredUserProperties(i){this.storage.setJSON(l,i,I)}register_once(i,e){var t=this.getStoredUserProperties(),a=!1;for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(r in t||(t[r]=i[r],a=!0));if(e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(n in t||(t[n]=e[n],a=!0));a&&this.setStoredUserProperties(t)}generateAnonymousId(){return"anon_"+g()}generateDeviceId(){return"device_"+g()}getPersonPropertiesHash(i,e,t){return JSON.stringify({distinct_id:i,userPropertiesToSet:e,userPropertiesToSetOnce:t})}isValidDistinctId(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(e)&&0!==i.trim().length}isDistinctIdStringLike(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(e)}updateStorageMethod(i,e){this.storage=new x({method:i,domain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}}class Xi{constructor(i,e){if(this.instance=e,i.capture_performance&&M)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(i){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",i)}}initializeWebVitals(){if(this.webVitals){var i=i=>{try{if(!(M&&R&&P&&C))return;var{country:e,locale:t}=function(){var i,e;if(!P)return{country:i,locale:e};try{var t=Intl.DateTimeFormat().resolvedOptions().timeZone;i=p[t],e=P.languages&&P.languages.length?P.languages[0]:P.userLanguage||P.language||P.browserLanguage||"en"}catch(i){}return{country:i,locale:e}}();this.instance.capture("web_vital",{name:i.name,value:i.value,delta:i.delta,rating:i.rating,id:i.id,navigationType:i.navigationType,pathname:C.pathname,href:C.href,"user-agent":P.userAgent,locale:t,location:e,referrer:R.referrer})}catch(i){console.error("Error sending web vital:",i)}};this.webVitals.onCLS&&this.webVitals.onCLS(i),this.webVitals.onFCP&&this.webVitals.onFCP(i),this.webVitals.onLCP&&this.webVitals.onLCP(i),this.webVitals.onTTFB&&this.webVitals.onTTFB(i),this.webVitals.onINP&&this.webVitals.onINP(i)}}}function Qi(i,e,t){try{if(!(e in i))return()=>{};var a=i[e],r=t(a);return K(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),i[e]=r,()=>{i[e]=a}}catch(i){return()=>{}}}class Yi{constructor(i){var e;this._instance=i,this.C=(null===(e=null==M?void 0:M.location)||void 0===e?void 0:e.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this.T&&this.T(),this.T=void 0}monitorHistoryChanges(){var i,e;if(M&&C&&(this.C=C.pathname||"",M.history)){var t=this;(null===(i=M.history.pushState)||void 0===i?void 0:i.__vtilt_wrapped__)||Qi(M.history,"pushState",i=>function(e,a,r){i.call(this,e,a,r),t.k("pushState")}),(null===(e=M.history.replaceState)||void 0===e?void 0:e.__vtilt_wrapped__)||Qi(M.history,"replaceState",i=>function(e,a,r){i.call(this,e,a,r),t.k("replaceState")}),this.U()}}k(i){var e;try{var t=null===(e=null==M?void 0:M.location)||void 0===e?void 0:e.pathname;if(!t||!C||!R)return;if(t!==this.C&&this.isEnabled){var a={navigation_type:i};this._instance.capture("$pageview",a)}this.C=t}catch(e){console.error("Error capturing "+i+" pageview",e)}}U(){if(!this.T&&M){var i=()=>{this.k("popstate")};y(M,"popstate",i),this.T=()=>{M&&M.removeEventListener("popstate",i)}}}}var ie=Uint8Array,ee=Uint16Array,te=Int32Array,ae=new ie([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]),re=new ie([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]),ne=new ie([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),se=function(i,e){for(var t=new ee(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];var r=new te(t[30]);for(a=1;a<30;++a)for(var n=t[a];n<t[a+1];++n)r[n]=n-t[a]<<5|a;return{b:t,r:r}},oe=se(ae,2),ue=oe.b,ce=oe.r;ue[28]=258,ce[258]=28;for(var he=se(re,0).r,le=new ee(32768),de=0;de<32768;++de){var fe=(43690&de)>>1|(21845&de)<<1;fe=(61680&(fe=(52428&fe)>>2|(13107&fe)<<2))>>4|(3855&fe)<<4,le[de]=((65280&fe)>>8|(255&fe)<<8)>>1}var ve=function(i,e,t){for(var a=i.length,r=0,n=new ee(e);r<a;++r)i[r]&&++n[i[r]-1];var s,o=new ee(e);for(r=1;r<e;++r)o[r]=o[r-1]+n[r-1]<<1;if(t){s=new ee(1<<e);var u=15-e;for(r=0;r<a;++r)if(i[r])for(var c=r<<4|i[r],h=e-i[r],l=o[i[r]-1]++<<h,d=l|(1<<h)-1;l<=d;++l)s[le[l]>>u]=c}else for(s=new ee(a),r=0;r<a;++r)i[r]&&(s[r]=le[o[i[r]-1]++]>>15-i[r]);return s},Ae=new ie(288);for(de=0;de<144;++de)Ae[de]=8;for(de=144;de<256;++de)Ae[de]=9;for(de=256;de<280;++de)Ae[de]=7;for(de=280;de<288;++de)Ae[de]=8;var me=new ie(32);for(de=0;de<32;++de)me[de]=5;var pe=ve(Ae,9,0),ge=ve(me,5,0),_e=function(i){return(i+7)/8|0},Se=function(i,e,t){return(null==t||t>i.length)&&(t=i.length),new ie(i.subarray(e,t))},ye=function(i,e,t){t<<=7&e;var a=e/8|0;i[a]|=t,i[a+1]|=t>>8},we=function(i,e,t){t<<=7&e;var a=e/8|0;i[a]|=t,i[a+1]|=t>>8,i[a+2]|=t>>16},Ee=function(i,e){for(var t=[],a=0;a<i.length;++a)i[a]&&t.push({s:a,f:i[a]});var r=t.length,n=t.slice();if(!r)return{t:ke,l:0};if(1==r){var s=new ie(t[0].s+1);return s[t[0].s]=1,{t:s,l:1}}t.sort(function(i,e){return i.f-e.f}),t.push({s:-1,f:25001});var o=t[0],u=t[1],c=0,h=1,l=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};h!=r-1;)o=t[t[c].f<t[l].f?c++:l++],u=t[c!=h&&t[c].f<t[l].f?c++:l++],t[h++]={s:-1,f:o.f+u.f,l:o,r:u};var d=n[0].s;for(a=1;a<r;++a)n[a].s>d&&(d=n[a].s);var f=new ee(d+1),v=Me(t[h-1],f,0);if(v>e){a=0;var A=0,m=v-e,p=1<<m;for(n.sort(function(i,e){return f[e.s]-f[i.s]||i.f-e.f});a<r;++a){var g=n[a].s;if(!(f[g]>e))break;A+=p-(1<<v-f[g]),f[g]=e}for(A>>=m;A>0;){var _=n[a].s;f[_]<e?A-=1<<e-f[_]++-1:++a}for(;a>=0&&A;--a){var S=n[a].s;f[S]==e&&(--f[S],++A)}v=e}return{t:new ie(f),l:v}},Me=function(i,e,t){return-1==i.s?Math.max(Me(i.l,e,t+1),Me(i.r,e,t+1)):e[i.s]=t},be=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new ee(++e),a=0,r=i[0],n=1,s=function(i){t[a++]=i},o=1;o<=e;++o)if(i[o]==r&&o!=e)++n;else{if(!r&&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(r),--n;n>6;n-=6)s(8304);n>2&&(s(n-3<<5|8208),n=0)}for(;n--;)s(r);n=1,r=i[o]}return{c:t.subarray(0,a),n:e}},Pe=function(i,e){for(var t=0,a=0;a<e.length;++a)t+=i[a]*e[a];return t},Re=function(i,e,t){var a=t.length,r=_e(e+2);i[r]=255&a,i[r+1]=a>>8,i[r+2]=255^i[r],i[r+3]=255^i[r+1];for(var n=0;n<a;++n)i[r+n+4]=t[n];return 8*(r+4+a)},Ce=function(i,e,t,a,r,n,s,o,u,c,h){ye(e,h++,t),++r[256];for(var l=Ee(r,15),d=l.t,f=l.l,v=Ee(n,15),A=v.t,m=v.l,p=be(d),g=p.c,_=p.n,S=be(A),y=S.c,w=S.n,E=new ee(19),M=0;M<g.length;++M)++E[31&g[M]];for(M=0;M<y.length;++M)++E[31&y[M]];for(var b=Ee(E,7),P=b.t,R=b.l,C=19;C>4&&!P[ne[C-1]];--C);var T,k,U,B,I=c+5<<3,x=Pe(r,Ae)+Pe(n,me)+s,N=Pe(r,d)+Pe(n,A)+s+14+3*C+Pe(E,P)+2*E[16]+3*E[17]+7*E[18];if(u>=0&&I<=x&&I<=N)return Re(e,h,i.subarray(u,u+c));if(ye(e,h,1+(N<x)),h+=2,N<x){T=ve(d,f,0),k=d,U=ve(A,m,0),B=A;var O=ve(P,R,0);ye(e,h,_-257),ye(e,h+5,w-1),ye(e,h+10,C-4),h+=14;for(M=0;M<C;++M)ye(e,h+3*M,P[ne[M]]);h+=3*C;for(var D=[g,y],L=0;L<2;++L){var K=D[L];for(M=0;M<K.length;++M){var G=31&K[M];ye(e,h,O[G]),h+=P[G],G>15&&(ye(e,h,K[M]>>5&127),h+=K[M]>>12)}}}else T=pe,k=Ae,U=ge,B=me;for(M=0;M<o;++M){var j=a[M];if(j>255){we(e,h,T[(G=j>>18&31)+257]),h+=k[G+257],G>7&&(ye(e,h,j>>23&31),h+=ae[G]);var F=31&j;we(e,h,U[F]),h+=B[F],F>3&&(we(e,h,j>>5&8191),h+=re[F])}else we(e,h,T[j]),h+=k[j]}return we(e,h,T[256]),h+k[256]},Te=new te([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ke=new ie(0),Ue=function(){for(var i=new Int32Array(256),e=0;e<256;++e){for(var t=e,a=9;--a;)t=(1&t&&-306674912)^t>>>1;i[e]=t}return i}(),Be=function(i,e,t,a,r){if(!r&&(r={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),s=new ie(n.length+i.length);s.set(n),s.set(i,n.length),i=s,r.w=n.length}return function(i,e,t,a,r,n){var s=n.z||i.length,o=new ie(a+s+5*(1+Math.ceil(s/7e3))+r),u=o.subarray(a,o.length-r),c=n.l,h=7&(n.r||0);if(e){h&&(u[0]=n.r>>3);for(var l=Te[e-1],d=l>>13,f=8191&l,v=(1<<t)-1,A=n.p||new ee(32768),m=n.h||new ee(v+1),p=Math.ceil(t/3),g=2*p,_=function(e){return(i[e]^i[e+1]<<p^i[e+2]<<g)&v},S=new te(25e3),y=new ee(288),w=new ee(32),E=0,M=0,b=n.i||0,P=0,R=n.w||0,C=0;b+2<s;++b){var T=_(b),k=32767&b,U=m[T];if(A[k]=U,m[T]=k,R<=b){var B=s-b;if((E>7e3||P>24576)&&(B>423||!c)){h=Ce(i,u,0,S,y,w,M,P,C,b-C,h),P=E=M=0,C=b;for(var I=0;I<286;++I)y[I]=0;for(I=0;I<30;++I)w[I]=0}var x=2,N=0,O=f,D=k-U&32767;if(B>2&&T==_(b-D))for(var L=Math.min(d,B)-1,K=Math.min(32767,b),G=Math.min(258,B);D<=K&&--O&&k!=U;){if(i[b+x]==i[b+x-D]){for(var j=0;j<G&&i[b+j]==i[b+j-D];++j);if(j>x){if(x=j,N=D,j>L)break;var F=Math.min(D,j-2),V=0;for(I=0;I<F;++I){var q=b-D+I&32767,H=q-A[q]&32767;H>V&&(V=H,U=q)}}}D+=(k=U)-(U=A[k])&32767}if(N){S[P++]=268435456|ce[x]<<18|he[N];var W=31&ce[x],z=31&he[N];M+=ae[W]+re[z],++y[257+W],++w[z],R=b+x,++E}else S[P++]=i[b],++y[i[b]]}}for(b=Math.max(b,R);b<s;++b)S[P++]=i[b],++y[i[b]];h=Ce(i,u,c,S,y,w,M,P,C,b-C,h),c||(n.r=7&h|u[h/8|0]<<3,h-=7,n.h=m,n.p=A,n.i=b,n.w=R)}else{for(b=n.w||0;b<s+c;b+=65535){var J=b+65535;J>=s&&(u[h/8|0]=c,J=s),h=Re(u,h+1,i.subarray(b,J))}n.i=s}return Se(o,0,a+_e(h)+r)}(i,null==e.level?6:e.level,null==e.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):20:12+e.mem,t,a,r)},Ie=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8};function xe(i,e){e||(e={});var t=function(){var i=-1;return{p:function(e){for(var t=i,a=0;a<e.length;++a)t=Ue[255&t^e[a]]^t>>>8;i=t},d:function(){return~i}}}(),a=i.length;t.p(i);var r,n=Be(i,e,10+((r=e).filename?r.filename.length+1:0),8),s=n.length;return function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:9==e.level?2:0,i[9]=3,0!=e.mtime&&Ie(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var a=0;a<=t.length;++a)i[a+10]=t.charCodeAt(a)}}(n,e),Ie(n,s-8,t.d()),Ie(n,s-4,a),n}var Ne="undefined"!=typeof TextEncoder&&new TextEncoder,Oe="undefined"!=typeof TextDecoder&&new TextDecoder;try{Oe.decode(ke,{stream:!0})}catch(i){}var De,Le="text/plain";!function(i){i.GZipJS="gzip-js",i.None="none"}(De||(De={}));var $e=i=>{var{data:e,compression:t}=i;if(e){var a=(i=>JSON.stringify(i,(i,e)=>"bigint"==typeof e?e.toString():e))(e),r=new Blob([a]).size;if(t===De.GZipJS&&r>=1024)try{var n=xe(function(i,e){if(Ne)return Ne.encode(i);for(var t=i.length,a=new ie(i.length+(i.length>>1)),r=0,n=function(i){a[r++]=i},s=0;s<t;++s){if(r+5>a.length){var o=new ie(r+8+(t-s<<1));o.set(a),a=o}var u=i.charCodeAt(s);u<128||e?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&i.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 Se(a,0,r)}(a),{mtime:0}),s=new Blob([n],{type:Le});if(s.size<.95*r)return{contentType:Le,body:s,estimatedSize:s.size}}catch(i){}return{contentType:"application/json",body:a,estimatedSize:r}}},Ke=[{name:"fetch",available:"undefined"!=typeof fetch,method:i=>{var a=$e(i);if(a){var{contentType:r,body:n,estimatedSize:s}=a,o=i.compression===De.GZipJS&&r===Le?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,u=t({"Content-Type":r},i.headers||{}),c=new AbortController,h=i.timeout?setTimeout(()=>c.abort(),i.timeout):null;fetch(o,{method:i.method||"POST",headers:u,body:n,keepalive:s<52428.8,signal:c.signal}).then(function(){var t=e(function*(e){var t,a=yield e.text(),r={statusCode:e.status,text:a};if(200===e.status)try{r.json=JSON.parse(a)}catch(i){}null===(t=i.callback)||void 0===t||t.call(i,r)});return function(i){return t.apply(this,arguments)}}()).catch(()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})}).finally(()=>{h&&clearTimeout(h)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:i=>{var e=$e(i);if(e){var{contentType:t,body:a}=e,r=i.compression===De.GZipJS&&t===Le?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,n=new XMLHttpRequest;n.open(i.method||"POST",r,!0),i.headers&&Object.entries(i.headers).forEach(i=>{var[e,t]=i;n.setRequestHeader(e,t)}),n.setRequestHeader("Content-Type",t),i.timeout&&(n.timeout=i.timeout),n.onreadystatechange=()=>{var e;if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(i){}null===(e=i.callback)||void 0===e||e.call(i,t)}},n.onerror=()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})},n.send(a)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:i=>{var e=$e(i);if(e){var{contentType:t,body:a}=e;try{var r="string"==typeof a?new Blob([a],{type:t}):a,n=i.compression===De.GZipJS&&t===Le?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url;navigator.sendBeacon(n,r)}catch(i){}}}}],Ge=i=>{var e,t=i.transport||"fetch",a=Ke.find(i=>i.name===t&&i.available)||Ke.find(i=>i.available);if(!a)return console.error("vTilt: No available transport method"),void(null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0}));a.method(i)};class je{constructor(i,e){var t,a,r,n;this.B=!0,this.I=[],this.N=(t=(null==e?void 0:e.flush_interval_ms)||3e3,a=250,r=5e3,n=3e3,"number"!=typeof t||isNaN(t)?n:Math.min(Math.max(t,a),r)),this.O=i}get length(){return this.I.length}enqueue(i){this.I.push(i),this.D||this.L()}unload(){if(this.$(),0!==this.I.length){var i=this.K();for(var e in i){var a=i[e];this.O(t({},a,{transport:"sendBeacon"}))}}}enable(){this.B=!1,this.L()}pause(){this.B=!0,this.$()}flush(){this.$(),this.G(),this.L()}L(){this.B||(this.D=setTimeout(()=>{this.$(),this.G(),this.I.length>0&&this.L()},this.N))}$(){this.D&&(clearTimeout(this.D),this.D=void 0)}G(){if(0!==this.I.length){var i=this.K(),e=Date.now();for(var t in i){var a=i[t];a.events.forEach(i=>{var t=new Date(i.timestamp).getTime();i.$offset=Math.abs(t-e)}),this.O(a)}}}K(){var i={};return this.I.forEach(e=>{var t=e.batchKey||e.url;i[t]||(i[t]={url:e.url,events:[],batchKey:e.batchKey}),i[t].events.push(e.event)}),this.I=[],i}}class Fe{constructor(i){this.j=!1,this.F=3e3,this.I=[],this.V=!0,this.O=i.sendRequest,this.q=i.sendBeacon,M&&void 0!==P&&"onLine"in P&&(this.V=P.onLine,y(M,"online",()=>{this.V=!0,this.H()}),y(M,"offline",()=>{this.V=!1}))}get length(){return this.I.length}enqueue(i,e){if(void 0===e&&(e=0),e>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var t=function(i){var e=3e3*Math.pow(2,i),t=e/2,a=Math.min(18e5,e),r=(Math.random()-.5)*(a-t);return Math.ceil(a+r)}(e),a=Date.now()+t;this.I.push({retryAt:a,request:i,retriesPerformedSoFar:e+1});var r="VTilt: Enqueued failed request for retry in "+Math.round(t/1e3)+"s";this.V||(r+=" (Browser is offline)"),console.warn(r),this.j||(this.j=!0,this.W())}}retriableRequest(i){var t=this;return e(function*(){try{var e=yield t.O(i);200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&t.enqueue(i,0)}catch(e){t.enqueue(i,0)}})()}W(){this.J&&clearTimeout(this.J),this.J=setTimeout(()=>{this.V&&this.I.length>0&&this.H(),this.I.length>0?this.W():this.j=!1},this.F)}H(){var i=this,t=Date.now(),a=[],r=[];this.I.forEach(i=>{i.retryAt<t?r.push(i):a.push(i)}),this.I=a,r.forEach(function(){var t=e(function*(e){var{request:t,retriesPerformedSoFar:a}=e;try{var r=yield i.O(t);200!==r.statusCode&&(r.statusCode<400||r.statusCode>=500)&&i.enqueue(t,a)}catch(e){i.enqueue(t,a)}});return function(i){return t.apply(this,arguments)}}())}unload(){this.J&&(clearTimeout(this.J),this.J=void 0),this.I.forEach(i=>{var{request:e}=i;try{this.q(e)}catch(i){console.error("VTilt: Failed to send beacon on unload",i)}}),this.I=[]}}var Ve="vt_rate_limit";class qe{constructor(i){var e,t;void 0===i&&(i={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(e=i.eventsPerSecond)&&void 0!==e?e:10,this.eventsBurstLimit=Math.max(null!==(t=i.eventsBurstLimit)&&void 0!==t?t:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=i.persistence,this.captureWarning=i.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(i){var e,t,a,r;void 0===i&&(i=!1);var n=Date.now(),s=null!==(t=null===(e=this.persistence)||void 0===e?void 0:e.get(Ve))&&void 0!==t?t:{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||i||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||i||null===(a=this.captureWarning)||void 0===a||a.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=u,null===(r=this.persistence)||void 0===r||r.set(Ve,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var He=Array.isArray;class We{constructor(i){void 0===i&&(i={}),this.__loaded=!1,this.Z=!1,this.X=null,this.__request_queue=[],this.Y=!1,this.ii=!1,this.configManager=new a(i);var e=this.configManager.getConfig(),t=e.domain;!t&&C&&(t=this.getCurrentDomain()),this.sessionManager=new N(e.storage||"cookie",t),this.userManager=new Zi(e.persistence||"localStorage",t),this.webVitalsManager=new Xi(e,this),this.rateLimiter=new qe({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:i=>{this.ei("$$client_ingestion_warning",{$$client_ingestion_warning_message:i})}}),this.retryQueue=new Fe({sendRequest:i=>this.ti(i),sendBeacon:i=>this.ai(i)}),this.requestQueue=new je(i=>this.ri(i),{flush_interval_ms:3e3})}init(i,e,t){var a;if(t&&t!==Je){var r=null!==(a=ze[t])&&void 0!==a?a:new We;return r._init(i,e,t),ze[t]=r,ze[Je][t]=r,r}return this._init(i,e,t)}_init(i,e,a){if(void 0===e&&(e={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(t({},e,{projectId:i||e.projectId,name:a})),this.__loaded=!0;var r=this.configManager.getConfig();return this.userManager.set_initial_person_info(r.mask_personal_data_properties,r.custom_personal_data_properties),this.historyAutocapture=new Yi(this),this.historyAutocapture.startIfEnabled(),this.ni(),this.si(),!1!==r.capture_pageview&&this.oi(),this}si(){this.requestQueue.enable()}ni(){if(M){var i=()=>{this.requestQueue.unload(),this.retryQueue.unload()};y(M,"beforeunload",i),y(M,"pagehide",i)}}toString(){var i,e=null!==(i=this.configManager.getConfig().name)&&void 0!==i?i:Je;return e!==Je&&(e=Je+"."+e),e}getCurrentDomain(){if(!C)return"";var i=C.protocol,e=C.hostname,t=C.port;return i+"//"+e+(t?":"+t:"")}ui(){var i=this.configManager.getConfig();return!(!i.projectId||!i.token)||(this.Y||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this.Y=!0),!1)}buildUrl(){var i=this.configManager.getConfig(),{proxyUrl:e,proxy:t,api_host:a,token:r}=i;return e||(t?t+"/api/tracking?token="+r:a?a.replace(/\/+$/gm,"")+"/api/tracking?token="+r:"/api/tracking?token="+r)}sendRequest(i,e,t){if(this.ui()){if(t&&void 0!==M)if(M.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:i,event:e});this.requestQueue.enqueue({url:i,event:e})}}ri(i){var{transport:e}=i;"sendBeacon"!==e?this.retryQueue.retriableRequest(i):this.ai(i)}ti(i){return new Promise(e=>{var{url:t,events:a}=i,r=1===a.length?a[0]:{events:a},n=this.configManager.getConfig().disable_compression?De.None:De.GZipJS;Ge({url:t,data:r,method:"POST",transport:"XHR",compression:n,callback:i=>{e({statusCode:i.statusCode})}})})}ai(i){var{url:e,events:t}=i,a=1===t.length?t[0]:{events:t},r=this.configManager.getConfig().disable_compression?De.None:De.GZipJS;Ge({url:e,data:a,method:"POST",transport:"sendBeacon",compression:r})}ci(i){this.sendRequest(i.url,i.event,!1)}capture(i,e,a){if(this.sessionManager.setSessionId(),P&&P.userAgent&&function(i){return!(i&&"string"==typeof i&&i.length>500)}(P.userAgent)&&((null==a?void 0:a.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var r=this.buildUrl(),n=Ji(),s=this.userManager.getUserProperties(),o=this.userManager.get_initial_props(),u=this.sessionManager.getSessionId(),c=this.sessionManager.getWindowId(),h=this.userManager.getAnonymousId(),l={};!this.ii&&Object.keys(o).length>0&&Object.assign(l,o),e.$set_once&&Object.assign(l,e.$set_once);var d=t({},n,s,{$session_id:u,$window_id:c},h?{$anon_distinct_id:h}:{},Object.keys(l).length>0?{$set_once:l}:{},e.$set?{$set:e.$set}:{},e);!this.ii&&Object.keys(o).length>0&&(this.ii=!0),"$pageview"===i&&R&&(d.title=R.title);var f,v,A=this.configManager.getConfig();if(!1!==A.stringifyPayload){if(f=Object.assign({},d,A.globalAttributes),!_(f=JSON.stringify(f)))return}else if(f=Object.assign({},d,A.globalAttributes),!_(JSON.stringify(f)))return;v="$identify"===i?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var m={timestamp:(new Date).toISOString(),event:i,project_id:A.projectId||"",domain:A.domain||this.getCurrentDomain(),payload:f,distinct_id:v,anonymous_id:h};this.sendRequest(r,m,!0)}}ei(i,e){this.capture(i,e,{skip_client_rate_limiting:!0})}trackEvent(i,e){void 0===e&&(e={}),this.capture(i,e)}identify(i,e,t){if("number"==typeof i&&(i=String(i),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),i)if(this.userManager.isDistinctIdStringLikePublic(i))console.error('The string "'+i+'" 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"!==i){var a=this.userManager.getDistinctId(),r=this.userManager.getAnonymousId(),n=this.userManager.getDeviceId(),s="anonymous"===this.userManager.getUserState();if(!n){var o=a||r;this.userManager.ensureDeviceId(o)}i!==a&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$identify",{distinct_id:i,$anon_distinct_id:r,$set:e||{},$set_once:t||{}}),this.userManager.setDistinctId(i)):e||t?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$set",{$set:e||{},$set_once:t||{}})):i!==a&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(i))}else console.error('The string "'+i+'" 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(i,e){this.userManager.setUserProperties(i,e)&&this.capture("$set",{$set:i||{},$set_once:e||{}})}resetUser(i){this.sessionManager.resetSessionId(),this.userManager.reset(i)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(i,e){var t=this.userManager.createAlias(i,e);t?this.capture("$alias",{$original_id:t.original,$alias_id:t.distinct_id}):i===(e||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(i)}oi(){R&&("visible"===R.visibilityState?this.Z||(this.Z=!0,setTimeout(()=>{if(R&&C){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this.X&&(R.removeEventListener("visibilitychange",this.X),this.X=null)):this.X||(this.X=()=>{this.oi()},y(R,"visibilitychange",this.X)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}updateConfig(i){this.configManager.updateConfig(i);var e=this.configManager.getConfig(),t=e.domain;!t&&C&&(t=this.getCurrentDomain()),this.sessionManager=new N(e.storage||"cookie",t),this.userManager=new Zi(e.persistence||"localStorage",t),this.webVitalsManager=new Xi(e,this)}_execute_array(i){Array.isArray(i)&&i.forEach(i=>{if(i&&Array.isArray(i)&&i.length>0){var e=i[0],t=i.slice(1);if("function"==typeof this[e])try{this[e](...t)}catch(i){console.error("vTilt: Error executing queued call "+e+":",i)}}})}_dom_loaded(){this.__request_queue.forEach(i=>{this.ci(i)}),this.__request_queue=[],this.si()}}var ze={},Je="vt",Ze=!(void 0!==k||void 0!==T)&&-1===(null==U?void 0:U.indexOf("MSIE"))&&-1===(null==U?void 0:U.indexOf("Mozilla"));null!=M&&(M.__VTILT_ENQUEUE_REQUESTS=Ze);var Xe,Qe;Xe=ze[Je]=new We,(Qe=B.vt)&&S(Qe._i,function(i){if(i&&He(i)){var e=Xe.init(i[0],i[1],i[2]),t=Qe[i[2]||"vt"]||Qe;e&&e._execute_array(t)}}),B.vt=Xe,function(){function i(){i.done||(i.done=!0,Ze=!1,null!=M&&(M.__VTILT_ENQUEUE_REQUESTS=!1),S(ze,function(i){i._dom_loaded()}))}R&&"function"==typeof R.addEventListener?"complete"===R.readyState?i():y(R,"DOMContentLoaded",i,{capture:!1}):M&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")}()}();
|
|
1
|
+
!function(){"use strict";var i="undefined"!=typeof window?window:void 0,e="undefined"!=typeof globalThis?globalThis:i,t=null==e?void 0:e.navigator,r=null==e?void 0:e.document,a=null==e?void 0:e.location,n=null==e?void 0:e.fetch,s=(null==e?void 0:e.XMLHttpRequest)&&"withCredentials"in new e.XMLHttpRequest?e.XMLHttpRequest:void 0;null==e||e.AbortController;var o=null==t?void 0:t.userAgent,u=null!=i?i:{};function c(i,e,t,r,a,n,s){try{var o=i[n](s),u=o.value}catch(i){return void t(i)}o.done?e(u):Promise.resolve(u).then(r,a)}function l(i){return function(){var e=this,t=arguments;return new Promise(function(r,a){var n=i.apply(e,t);function s(i){c(n,r,a,s,o,"next",i)}function o(i){c(n,r,a,s,o,"throw",i)}s(void 0)})}}function h(){return h=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},h.apply(null,arguments)}u.__VTiltExtensions__=u.__VTiltExtensions__||{},u.__VTiltExtensions__.loadExternalDependency=(i,e,t)=>{var a=((i,e)=>{var t=i.getConfig();return t.script_host?t.script_host.replace(/\/+$/gm,"")+"/dist/"+e+".js":"https://unpkg.com/@v-tilt/browser@1.1.5/dist/"+e+".js"})(i,e);((i,e,t)=>{if(i.getConfig().disable_external_dependency_loading)return console.warn("[ExternalScriptsLoader] "+e+" was requested but loading of external scripts is disabled."),t("Loading of external scripts is disabled");var a=null==r?void 0:r.querySelectorAll("script");if(a)for(var n,s=function(){if(a[o].src===e){var i=a[o];return i.__vtilt_loading_callback_fired?{v:t()}:(i.addEventListener("load",e=>{i.__vtilt_loading_callback_fired=!0,t(void 0,e)}),i.onerror=i=>t(i),{v:void 0})}},o=0;o<a.length;o++)if(n=s())return n.v;var u=()=>{var i;if(!r)return t("document not found");var a=r.createElement("script");a.type="text/javascript",a.crossOrigin="anonymous",a.src=e,a.onload=i=>{a.__vtilt_loading_callback_fired=!0,t(void 0,i)},a.onerror=i=>t(i);var n=r.querySelectorAll("body > script");n.length>0?null===(i=n[0].parentNode)||void 0===i||i.insertBefore(a,n[0]):r.body.appendChild(a)};(null==r?void 0:r.body)?u():null==r||r.addEventListener("DOMContentLoaded",u)})(i,a,t)};class d{constructor(i){void 0===i&&(i={}),this.config=this.parseConfigFromScript(i)}parseConfigFromScript(i){if(!document.currentScript)return h({token:i.token||""},i);var e=document.currentScript,t=h({token:""},i);if(t.api_host=e.getAttribute("data-api-host")||e.getAttribute("data-host")||i.api_host,t.script_host=e.getAttribute("data-script-host")||i.script_host,t.proxy=e.getAttribute("data-proxy")||i.proxy,t.proxyUrl=e.getAttribute("data-proxy-url")||i.proxyUrl,t.token=e.getAttribute("data-token")||i.token||"",t.projectId=e.getAttribute("data-project-id")||i.projectId||"",t.domain=e.getAttribute("data-domain")||i.domain,t.storage=e.getAttribute("data-storage")||i.storage,t.stringifyPayload="false"!==e.getAttribute("data-stringify-payload"),t.capture_performance="true"===e.getAttribute("data-capture-performance")||i.capture_performance,t.proxy&&t.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 r of(t.globalAttributes=h({},i.globalAttributes),Array.from(e.attributes)))r.name.startsWith("data-vt-")&&(t.globalAttributes[r.name.slice(8).replace(/-/g,"_")]=r.value);return t}getConfig(){return h({},this.config)}updateConfig(i){this.config=h({},this.config,i)}}var v="__vt_session",f="__vt_window_id",A="__vt_primary_window",m="__vt_user_state",p="__vt_device_id",g="__vt_anonymous_id",_="__vt_distinct_id",S="__vt_user_properties",y="localStorage",w="localStorage+cookie",b="sessionStorage",M="memory",E="$initial_person_info",R={"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 C(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}function P(i){return!(!i||"string"!=typeof i)&&!(i.length<2||i.length>10240)}function T(i,e,t){if(i)if(Array.isArray(i))i.forEach((i,r)=>{e.call(t,i,r)});else for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.call(t,i[r],r)}function k(i,e,t,r){var{capture:a=!1,passive:n=!0}=null!=r?r:{};null==i||i.addEventListener(e,t,{capture:a,passive:n})}function U(i,e){if(!e)return i;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}function I(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];for(var a of t)for(var n of a)i.push(n);return i}var B=31536e3,x=["herokuapp.com","vercel.app","netlify.app"];function D(i){var e;if(!i)return"";if("undefined"==typeof document)return"";var t=null===(e=document.location)||void 0===e?void 0:e.hostname;if(!t)return"";var r=t.match(/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i);return r?"."+r[0]:""}class O{constructor(i){var e,t;this.memoryStorage=new Map,this.method=i.method,this.cross_subdomain=null!==(e=i.cross_subdomain)&&void 0!==e?e:function(){var i;if("undefined"==typeof document)return!1;var e=null===(i=document.location)||void 0===i?void 0:i.hostname;if(!e)return!1;var t=e.split(".").slice(-2).join(".");for(var r of x)if(t===r)return!1;return!0}(),this.sameSite=i.sameSite||"Lax",this.secure=null!==(t=i.secure)&&void 0!==t?t:"undefined"!=typeof location&&"https:"===location.protocol}get(i){var e;try{if(this.method===M)return null!==(e=this.memoryStorage.get(i))&&void 0!==e?e:null;if(this.usesLocalStorage()){var t=localStorage.getItem(i);return null!==t?t:this.method===w?this.getCookie(i):null}return this.usesSessionStorage()?sessionStorage.getItem(i):this.getCookie(i)}catch(e){return console.warn('[StorageManager] Failed to get "'+i+'":',e),null}}set(i,e,t){try{if(this.method===M)return void this.memoryStorage.set(i,e);if(this.usesLocalStorage())return localStorage.setItem(i,e),void(this.method===w&&this.setCookie(i,e,t||B));if(this.usesSessionStorage())return void sessionStorage.setItem(i,e);this.setCookie(i,e,t||B)}catch(e){console.warn('[StorageManager] Failed to set "'+i+'":',e)}}remove(i){try{if(this.method===M)return void this.memoryStorage.delete(i);if(this.usesLocalStorage())return localStorage.removeItem(i),void(this.method===w&&this.removeCookie(i));if(this.usesSessionStorage())return void sessionStorage.removeItem(i);this.removeCookie(i)}catch(e){console.warn('[StorageManager] Failed to remove "'+i+'":',e)}}getWithExpiry(i){var e=this.get(i);if(!e)return null;try{var t=JSON.parse(e);return t.expiry&&Date.now()>t.expiry?(this.remove(i),null):t.value}catch(i){return null}}setWithExpiry(i,e,t){var r=h({value:e},t?{expiry:Date.now()+t}:{});this.set(i,JSON.stringify(r))}getJSON(i){var e=this.get(i);if(!e)return null;try{return JSON.parse(e)}catch(i){return null}}setJSON(i,e,t){this.set(i,JSON.stringify(e),t)}getCookie(i){if("undefined"==typeof document)return null;var e=document.cookie.split(";");for(var t of e){var[r,...a]=t.trim().split("=");if(r===i){var n=a.join("=");try{return decodeURIComponent(n)}catch(i){return n}}}return null}setCookie(i,e,t){if("undefined"!=typeof document){var r=i+"="+encodeURIComponent(e);r+="; Max-Age="+t,r+="; path=/",r+="; SameSite="+this.sameSite,this.secure&&(r+="; Secure");var a=D(this.cross_subdomain);a&&(r+="; domain="+a),document.cookie=r}}removeCookie(i){if("undefined"!=typeof document){var e=D(this.cross_subdomain),t=i+"=; Max-Age=0; path=/";e&&(t+="; domain="+e),document.cookie=t,document.cookie=i+"=; Max-Age=0; path=/"}}usesLocalStorage(){return this.method===y||this.method===w}usesSessionStorage(){return this.method===b}canUseSessionStorage(){if(void 0===i||!(null==i?void 0:i.sessionStorage))return!1;try{var e="__vt_storage_test__";return i.sessionStorage.setItem(e,"test"),i.sessionStorage.removeItem(e),!0}catch(i){return!1}}getSessionStorage(){var e;return this.canUseSessionStorage()&&null!==(e=null==i?void 0:i.sessionStorage)&&void 0!==e?e:null}setMethod(i){this.method=i}getMethod(){return this.method}}class N{constructor(i,e){void 0===i&&(i="cookie"),this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"}),this.o=void 0,this.A()}getSessionId(){var i=this.m();return i||(i=C(),this.S(i)),i}setSessionId(){var i=this.m()||C();return this.S(i),i}resetSessionId(){this.M(),this.setSessionId(),this.R(C())}m(){return this.storage.get(v)}S(i){this.storage.set(v,i,1800)}M(){this.storage.remove(v)}getWindowId(){if(this.o)return this.o;var i=this.storage.getSessionStorage();if(i){var e=i.getItem(f);if(e)return this.o=e,e}var t=C();return this.R(t),t}R(i){if(i!==this.o){this.o=i;var e=this.storage.getSessionStorage();e&&e.setItem(f,i)}}A(){var i=this.storage.getSessionStorage();if(i){var e=i.getItem(A),t=i.getItem(f);t&&!e?this.o=t:(t&&i.removeItem(f),this.R(C())),i.setItem(A,"true"),this.C()}else this.o=C()}C(){var e=this.storage.getSessionStorage();i&&e&&k(i,"beforeunload",()=>{var i=this.storage.getSessionStorage();i&&i.removeItem(A)},{capture:!1})}updateStorageMethod(i,e){this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"})}}function L(i){if(!r)return null;var e=r.createElement("a");return e.href=i,e}function K(i,e){for(var t=((i.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<t.length;r++){var a=t[r].split("=");if(a[0]===e){if(a.length<2)return"";var n=a[1];try{n=decodeURIComponent(n)}catch(i){}return n.replace(/\+/g," ")}}return""}function G(i,e,t){if(!i||!e||!e.length)return i;for(var r=i.split("#"),a=r[0]||"",n=r[1],s=a.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),l=[],h=0;h<c.length;h++){var d=c[h].split("="),v=d[0],f=d.slice(1).join("=");-1!==e.indexOf(v)?l.push(v+"="+t):v&&l.push(v+(f?"="+f:""))}var A=l.join("&");return u+(A?"?"+A:"")+(n?"#"+n:"")}function j(i){return"function"==typeof i}var F="Mobile",z="iOS",V="Android",q="Tablet",H=V+" "+q,W="iPad",J="Apple",Z=J+" Watch",X="Safari",Q="BlackBerry",Y="Samsung",ii=Y+"Browser",ei=Y+" Internet",ti="Chrome",ri=ti+" OS",ai=ti+" "+z,ni="Internet Explorer",si=ni+" "+F,oi="Opera",ui=oi+" Mini",ci="Edge",li="Microsoft "+ci,hi="Firefox",di=hi+" "+z,vi="Nintendo",fi="PlayStation",Ai="Xbox",mi=V+" "+F,pi=F+" "+X,gi="Windows",_i=gi+" Phone",Si="Nokia",yi="Ouya",wi="Generic",bi=wi+" "+F.toLowerCase(),Mi=wi+" "+q.toLowerCase(),Ei="Konqueror",Ri="(\\d+(\\.\\d+)?)",Ci=new RegExp("Version/"+Ri),Pi=new RegExp(Ai,"i"),Ti=new RegExp(fi+" \\w+","i"),ki=new RegExp(vi+" \\w+","i"),Ui=new RegExp(Q+"|PlayBook|BB10","i"),Ii={"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 Bi(i,e){return i.toLowerCase().includes(e.toLowerCase())}var xi=(i,e)=>e&&Bi(e,J)||function(i){return Bi(i,X)&&!Bi(i,ti)&&!Bi(i,V)}(i),Di=function(i,e){return e=e||"",Bi(i," OPR/")&&Bi(i,"Mini")?ui:Bi(i," OPR/")?oi:Ui.test(i)?Q:Bi(i,"IE"+F)||Bi(i,"WPDesktop")?si:Bi(i,ii)?ei:Bi(i,ci)||Bi(i,"Edg/")?li:Bi(i,"FBIOS")?"Facebook "+F:Bi(i,"UCWEB")||Bi(i,"UCBrowser")?"UC Browser":Bi(i,"CriOS")?ai:Bi(i,"CrMo")||Bi(i,ti)?ti:Bi(i,V)&&Bi(i,X)?mi:Bi(i,"FxiOS")?di:Bi(i.toLowerCase(),Ei.toLowerCase())?Ei:xi(i,e)?Bi(i,F)?pi:X:Bi(i,hi)?hi:Bi(i,"MSIE")||Bi(i,"Trident/")?ni:Bi(i,"Gecko")?hi:""},Oi={[si]:[new RegExp("rv:"+Ri)],[li]:[new RegExp(ci+"?\\/"+Ri)],[ti]:[new RegExp("("+ti+"|CrMo)\\/"+Ri)],[ai]:[new RegExp("CriOS\\/"+Ri)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ri)],[X]:[Ci],[pi]:[Ci],[oi]:[new RegExp("(Opera|OPR)\\/"+Ri)],[hi]:[new RegExp(hi+"\\/"+Ri)],[di]:[new RegExp("FxiOS\\/"+Ri)],[Ei]:[new RegExp("Konqueror[:/]?"+Ri,"i")],[Q]:[new RegExp(Q+" "+Ri),Ci],[mi]:[new RegExp("android\\s"+Ri,"i")],[ei]:[new RegExp(ii+"\\/"+Ri)],[ni]:[new RegExp("(rv:|MSIE )"+Ri)],Mozilla:[new RegExp("rv:"+Ri)]},Ni=function(i,e){var t=Di(i,e),r=Oi[t];if(void 0===r)return null;for(var a=0;a<r.length;a++){var n=r[a],s=i.match(n);if(s)return parseFloat(s[s.length-2])}return null},Li=[[new RegExp(Ai+"; "+Ai+" (.*?)[);]","i"),i=>[Ai,i&&i[1]||""]],[new RegExp(vi,"i"),[vi,""]],[new RegExp(fi,"i"),[fi,""]],[Ui,[Q,""]],[new RegExp(gi,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[_i,""];if(new RegExp(F).test(e)&&!/IEMobile\b/.test(e))return[gi+" "+F,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var r=t[1],a=Ii[r]||"";return/arm/i.test(e)&&(a="RT"),[gi,a]}return[gi,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>{if(i&&i[3]){var e=[i[3],i[4],i[5]||"0"];return[z,e.join(".")]}return[z,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=void 0===i[2]?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+V+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+V+")","i"),i=>{if(i&&i[2]){var e=[i[2],i[3],i[4]||"0"];return[V,e.join(".")]}return[V,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];if(i&&i[1]){var t=[i[1],i[2],i[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ri,""]],[/Linux|debian/i,["Linux",""]]],$i=function(i){return ki.test(i)?vi:Ti.test(i)?fi:Pi.test(i)?Ai:new RegExp(yi,"i").test(i)?yi:new RegExp("("+_i+"|WPDesktop)","i").test(i)?_i:/iPad/.test(i)?W:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?Z:Ui.test(i)?Q:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(Si,"i").test(i)?Si:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?!new RegExp(F).test(i)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)?/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?V:H:V:new RegExp("(pda|"+F+")","i").test(i)?bi:new RegExp(q,"i").test(i)&&!new RegExp(q+" pc","i").test(i)?Mi:""},Ki="https?://(.*)",Gi=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],ji=I(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Gi),Fi="<masked>";function zi(i){var e=function(i){return i?0===i.search(Ki+"google.([^/?]*)")?"google":0===i.search(Ki+"bing.com")?"bing":0===i.search(Ki+"yahoo.com")?"yahoo":0===i.search(Ki+"duckduckgo.com")?"duckduckgo":null:null}(i),t="yahoo"!==e?"q":"p",a={};if(null!==e){a.$search_engine=e;var n=r?K(r.referrer,t):"";n.length&&(a.ph_keyword=n)}return a}function Vi(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function qi(){return(null==r?void 0:r.referrer)||"$direct"}function Hi(){var i;return(null==r?void 0:r.referrer)&&(null===(i=L(r.referrer))||void 0===i?void 0:i.host)||"$direct"}function Wi(i){var e,{r:t,u:r}=i,a={$referrer:t,$referring_domain:null==t?void 0:"$direct"===t?"$direct":null===(e=L(t))||void 0===e?void 0:e.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(i){var e=ji.concat([]),t={};return T(e,function(e){var r=K(i,e);t[e]=r||null}),t}(r);U(a,s)}t&&U(a,zi(t));return a}function Ji(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(i){return}}function Zi(){try{return(new Date).getTimezoneOffset()}catch(i){return}}function Xi(e,t){if(!o)return{};var r,n,s,[u,c]=function(i){for(var e=0;e<Li.length;e++){var[t,r]=Li[e],a=t.exec(i),n=a&&(j(r)?r(a,i):r);if(n)return n}return["",""]}(o);return U(function(i){var e={};for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var r=i[t];null!=r&&""!==r&&(e[t]=r)}return e}({$os:u,$os_version:c,$browser:Di(o,navigator.vendor),$device:$i(o),$device_type:(n=o,s=$i(n),s===W||s===H||"Kobo"===s||"Kindle Fire"===s||s===Mi?q:s===vi||s===Ai||s===fi||s===yi?"Console":s===Z?"Wearable":s?F:"Desktop"),$timezone:Ji(),$timezone_offset:Zi()}),{$current_url:G(null==a?void 0:a.href,[],Fi),$host:null==a?void 0:a.host,$pathname:null==a?void 0:a.pathname,$raw_user_agent:o.length>1e3?o.substring(0,997)+"...":o,$browser_version:Ni(o,navigator.vendor),$browser_language:Vi(),$browser_language_prefix:(r=Vi(),"string"==typeof r?r.split("-")[0]:void 0),$screen_height:null==i?void 0:i.screen.height,$screen_width:null==i?void 0:i.screen.width,$viewport_height:null==i?void 0:i.innerHeight,$viewport_width:null==i?void 0:i.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 Qi{constructor(i,e){void 0===i&&(i="localStorage"),this.P=null,this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return h({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.storage.set(g,this.userIdentity.anonymous_id,B)),this.userIdentity.anonymous_id}getUserProperties(){return h({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}identify(i,e,t){if("number"==typeof i&&(i=i.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.")),i)if(this.isDistinctIdStringLike(i))console.error('The string "'+i+'" 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"!==i){var r=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=i,!this.userIdentity.device_id){var a=r||this.userIdentity.anonymous_id;this.userIdentity.device_id=a,this.userIdentity.properties=h({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:a})}i!==r&&(this.userIdentity.distinct_id=i);var n="anonymous"===this.userIdentity.user_state;i!==r&&n?(this.userIdentity.user_state="identified",e&&(this.userIdentity.properties=h({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=t[i])}),this.saveUserIdentity()):e||t?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),e&&(this.userIdentity.properties=h({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=t[i])}),this.saveUserIdentity()):i!==r&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+i+'" 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(i,e){if(!i&&!e)return!1;var t=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,r=this.getPersonPropertiesHash(t,i,e);return this.P===r?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(i&&(this.userIdentity.properties=h({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity(),this.P=r,!0)}reset(i){var e=this.generateAnonymousId(),t=this.userIdentity.device_id,r=i?this.generateDeviceId():t;this.userIdentity={distinct_id:null,anonymous_id:e,device_id:r,properties:{},user_state:"anonymous"},this.P=null,this.saveUserIdentity(),this.userIdentity.properties=h({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}setDistinctId(i){this.userIdentity.distinct_id=i,this.saveUserIdentity()}setUserState(i){this.userIdentity.user_state=i,this.saveUserIdentity()}updateUserProperties(i,e){i&&(this.userIdentity.properties=h({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity()}ensureDeviceId(i){this.userIdentity.device_id||(this.userIdentity.device_id=i,this.userIdentity.properties=h({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:i}),this.saveUserIdentity())}createAlias(i,e){return this.isValidDistinctId(i)?(void 0===e&&(e=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(e)?i===e?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:i,original:e}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isDistinctIdStringLikePublic(i){return this.isDistinctIdStringLike(i)}set_initial_person_info(i,e){if(!this.getStoredUserProperties()[E]){var t=function(i,e){var t=i?I([],Gi,e||[]):[],r=null==a?void 0:a.href.substring(0,1e3);return{r:qi().substring(0,1e3),u:r?G(r,t,Fi):void 0}}(i,e);this.register_once({[E]:t},void 0)}}get_initial_props(){var i,e,t=this.getStoredUserProperties()[E];return t?(i=Wi(t),e={},T(i,function(i,t){var r;e["$initial_"+(r=String(t),r.startsWith("$")?r.substring(1):r)]=i}),e):{}}update_referrer_info(){var i={$referrer:qi(),$referring_domain:Hi()};this.register_once(i,void 0)}loadUserIdentity(){var i=this.storage.get(g)||this.generateAnonymousId(),e=this.storage.get(_)||null,t=this.storage.get(p)||this.generateDeviceId(),r=this.getStoredUserProperties(),a=this.storage.get(m)||"anonymous";return{distinct_id:e,anonymous_id:i||this.generateAnonymousId(),device_id:t,properties:r,user_state:a}}saveUserIdentity(){this.storage.set(g,this.userIdentity.anonymous_id,B),this.storage.set(p,this.userIdentity.device_id,B),this.storage.set(m,this.userIdentity.user_state,B),this.userIdentity.distinct_id?this.storage.set(_,this.userIdentity.distinct_id,B):this.storage.remove(_),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(S)||{}}setStoredUserProperties(i){this.storage.setJSON(S,i,B)}register_once(i,e){var t=this.getStoredUserProperties(),r=!1;for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(a in t||(t[a]=i[a],r=!0));if(e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(n in t||(t[n]=e[n],r=!0));r&&this.setStoredUserProperties(t)}generateAnonymousId(){return"anon_"+C()}generateDeviceId(){return"device_"+C()}getPersonPropertiesHash(i,e,t){return JSON.stringify({distinct_id:i,userPropertiesToSet:e,userPropertiesToSetOnce:t})}isValidDistinctId(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(e)&&0!==i.trim().length}isDistinctIdStringLike(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(e)}updateStorageMethod(i,e){this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}}class Yi{constructor(e,t){if(this.instance=t,e.capture_performance&&i)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(i){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",i)}}initializeWebVitals(){if(this.webVitals){var e=e=>{try{if(!(i&&r&&t&&a))return;var{country:n,locale:s}=function(){var i,e;if(!t)return{country:i,locale:e};try{var r=Intl.DateTimeFormat().resolvedOptions().timeZone;i=R[r],e=t.languages&&t.languages.length?t.languages[0]:t.userLanguage||t.language||t.browserLanguage||"en"}catch(i){}return{country:i,locale:e}}();this.instance.capture("web_vital",{name:e.name,value:e.value,delta:e.delta,rating:e.rating,id:e.id,navigationType:e.navigationType,pathname:a.pathname,href:a.href,"user-agent":t.userAgent,locale:s,location:n,referrer:r.referrer})}catch(i){console.error("Error sending web vital:",i)}};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 ie(i,e,t){try{if(!(e in i))return()=>{};var r=i[e],a=t(r);return j(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),i[e]=a,()=>{i[e]=r}}catch(i){return()=>{}}}class ee{constructor(e){var t;this._instance=e,this.T=(null===(t=null==i?void 0:i.location)||void 0===t?void 0:t.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this.k&&this.k(),this.k=void 0}monitorHistoryChanges(){var e,t;if(i&&a&&(this.T=a.pathname||"",i.history)){var r=this;(null===(e=i.history.pushState)||void 0===e?void 0:e.__vtilt_wrapped__)||ie(i.history,"pushState",i=>function(e,t,a){i.call(this,e,t,a),r.U("pushState")}),(null===(t=i.history.replaceState)||void 0===t?void 0:t.__vtilt_wrapped__)||ie(i.history,"replaceState",i=>function(e,t,a){i.call(this,e,t,a),r.U("replaceState")}),this.I()}}U(e){var t;try{var n=null===(t=null==i?void 0:i.location)||void 0===t?void 0:t.pathname;if(!n||!a||!r)return;if(n!==this.T&&this.isEnabled){var s={navigation_type:e};this._instance.capture("$pageview",s)}this.T=n}catch(i){console.error("Error capturing "+e+" pageview",i)}}I(){if(!this.k&&i){var e=()=>{this.U("popstate")};k(i,"popstate",e),this.k=()=>{i&&i.removeEventListener("popstate",e)}}}}var te="[SessionRecording]";class re{constructor(i,e){void 0===e&&(e={}),this._instance=i,this.B=e}get started(){var i;return!!(null===(i=this.D)||void 0===i?void 0:i.isStarted)}get status(){var i;return(null===(i=this.D)||void 0===i?void 0:i.status)||"lazy_loading"}get sessionId(){var i;return(null===(i=this.D)||void 0===i?void 0:i.sessionId)||""}startIfEnabledOrStop(i){var e;if(!this.O||!(null===(e=this.D)||void 0===e?void 0:e.isStarted)){var t=void 0!==Object.assign&&void 0!==Array.from;this.O&&t?(this.N(i),console.info(te+" starting")):this.stopRecording()}}stopRecording(){var i;null===(i=this.D)||void 0===i||i.stop()}log(i,e){var t;void 0===e&&(e="log"),(null===(t=this.D)||void 0===t?void 0:t.log)?this.D.log(i,e):console.warn(te+" log called before recorder was ready")}updateConfig(i){var e;this.B=h({},this.B,i),null===(e=this.D)||void 0===e||e.updateConfig(this.B)}get O(){var e,t=this._instance.getConfig(),r=null!==(e=this.B.enabled)&&void 0!==e&&e,a=!t.disable_session_recording;return!!i&&r&&a}get L(){return"recorder"}N(i){var e,t,r,a;if(this.O)if((null===(t=null===(e=null==u?void 0:u.__VTiltExtensions__)||void 0===e?void 0:e.rrweb)||void 0===t?void 0:t.record)&&(null===(r=u.__VTiltExtensions__)||void 0===r?void 0:r.initSessionRecording))this.$(i);else{var n=null===(a=u.__VTiltExtensions__)||void 0===a?void 0:a.loadExternalDependency;n?n(this._instance,this.L,e=>{e?console.error(te+" could not load recorder:",e):this.$(i)}):console.error(te+" loadExternalDependency not available. Session recording cannot start.")}}$(i){var e,t=null===(e=u.__VTiltExtensions__)||void 0===e?void 0:e.initSessionRecording;t?(this.D||(this.D=t(this._instance,this.B)),this.D.start(i)):console.error(te+" initSessionRecording not available after script load")}}var ae=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i))(ae||{}),ne=Uint8Array,se=Uint16Array,oe=Int32Array,ue=new ne([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]),ce=new ne([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]),le=new ne([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),he=function(i,e){for(var t=new se(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];var a=new oe(t[30]);for(r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)a[n]=n-t[r]<<5|r;return{b:t,r:a}},de=he(ue,2),ve=de.b,fe=de.r;ve[28]=258,fe[258]=28;for(var Ae=he(ce,0).r,me=new se(32768),pe=0;pe<32768;++pe){var ge=(43690&pe)>>1|(21845&pe)<<1;ge=(61680&(ge=(52428&ge)>>2|(13107&ge)<<2))>>4|(3855&ge)<<4,me[pe]=((65280&ge)>>8|(255&ge)<<8)>>1}var _e=function(i,e,t){for(var r=i.length,a=0,n=new se(e);a<r;++a)i[a]&&++n[i[a]-1];var s,o=new se(e);for(a=1;a<e;++a)o[a]=o[a-1]+n[a-1]<<1;if(t){s=new se(1<<e);var u=15-e;for(a=0;a<r;++a)if(i[a])for(var c=a<<4|i[a],l=e-i[a],h=o[i[a]-1]++<<l,d=h|(1<<l)-1;h<=d;++h)s[me[h]>>u]=c}else for(s=new se(r),a=0;a<r;++a)i[a]&&(s[a]=me[o[i[a]-1]++]>>15-i[a]);return s},Se=new ne(288);for(pe=0;pe<144;++pe)Se[pe]=8;for(pe=144;pe<256;++pe)Se[pe]=9;for(pe=256;pe<280;++pe)Se[pe]=7;for(pe=280;pe<288;++pe)Se[pe]=8;var ye=new ne(32);for(pe=0;pe<32;++pe)ye[pe]=5;var we=_e(Se,9,0),be=_e(ye,5,0),Me=function(i){return(i+7)/8|0},Ee=function(i,e,t){return(null==t||t>i.length)&&(t=i.length),new ne(i.subarray(e,t))},Re=function(i,e,t){t<<=7&e;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8},Ce=function(i,e,t){t<<=7&e;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8,i[r+2]|=t>>16},Pe=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var a=t.length,n=t.slice();if(!a)return{t:De,l:0};if(1==a){var s=new ne(t[0].s+1);return s[t[0].s]=1,{t:s,l:1}}t.sort(function(i,e){return i.f-e.f}),t.push({s:-1,f:25001});var o=t[0],u=t[1],c=0,l=1,h=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};l!=a-1;)o=t[t[c].f<t[h].f?c++:h++],u=t[c!=l&&t[c].f<t[h].f?c++:h++],t[l++]={s:-1,f:o.f+u.f,l:o,r:u};var d=n[0].s;for(r=1;r<a;++r)n[r].s>d&&(d=n[r].s);var v=new se(d+1),f=Te(t[l-1],v,0);if(f>e){r=0;var A=0,m=f-e,p=1<<m;for(n.sort(function(i,e){return v[e.s]-v[i.s]||i.f-e.f});r<a;++r){var g=n[r].s;if(!(v[g]>e))break;A+=p-(1<<f-v[g]),v[g]=e}for(A>>=m;A>0;){var _=n[r].s;v[_]<e?A-=1<<e-v[_]++-1:++r}for(;r>=0&&A;--r){var S=n[r].s;v[S]==e&&(--v[S],++A)}f=e}return{t:new ne(v),l:f}},Te=function(i,e,t){return-1==i.s?Math.max(Te(i.l,e,t+1),Te(i.r,e,t+1)):e[i.s]=t},ke=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new se(++e),r=0,a=i[0],n=1,s=function(i){t[r++]=i},o=1;o<=e;++o)if(i[o]==a&&o!=e)++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=i[o]}return{c:t.subarray(0,r),n:e}},Ue=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},Ie=function(i,e,t){var r=t.length,a=Me(e+2);i[a]=255&r,i[a+1]=r>>8,i[a+2]=255^i[a],i[a+3]=255^i[a+1];for(var n=0;n<r;++n)i[a+n+4]=t[n];return 8*(a+4+r)},Be=function(i,e,t,r,a,n,s,o,u,c,l){Re(e,l++,t),++a[256];for(var h=Pe(a,15),d=h.t,v=h.l,f=Pe(n,15),A=f.t,m=f.l,p=ke(d),g=p.c,_=p.n,S=ke(A),y=S.c,w=S.n,b=new se(19),M=0;M<g.length;++M)++b[31&g[M]];for(M=0;M<y.length;++M)++b[31&y[M]];for(var E=Pe(b,7),R=E.t,C=E.l,P=19;P>4&&!R[le[P-1]];--P);var T,k,U,I,B=c+5<<3,x=Ue(a,Se)+Ue(n,ye)+s,D=Ue(a,d)+Ue(n,A)+s+14+3*P+Ue(b,R)+2*b[16]+3*b[17]+7*b[18];if(u>=0&&B<=x&&B<=D)return Ie(e,l,i.subarray(u,u+c));if(Re(e,l,1+(D<x)),l+=2,D<x){T=_e(d,v,0),k=d,U=_e(A,m,0),I=A;var O=_e(R,C,0);Re(e,l,_-257),Re(e,l+5,w-1),Re(e,l+10,P-4),l+=14;for(M=0;M<P;++M)Re(e,l+3*M,R[le[M]]);l+=3*P;for(var N=[g,y],L=0;L<2;++L){var K=N[L];for(M=0;M<K.length;++M){var G=31&K[M];Re(e,l,O[G]),l+=R[G],G>15&&(Re(e,l,K[M]>>5&127),l+=K[M]>>12)}}}else T=we,k=Se,U=be,I=ye;for(M=0;M<o;++M){var j=r[M];if(j>255){Ce(e,l,T[(G=j>>18&31)+257]),l+=k[G+257],G>7&&(Re(e,l,j>>23&31),l+=ue[G]);var F=31&j;Ce(e,l,U[F]),l+=I[F],F>3&&(Ce(e,l,j>>5&8191),l+=ce[F])}else Ce(e,l,T[j]),l+=k[j]}return Ce(e,l,T[256]),l+k[256]},xe=new oe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),De=new ne(0),Oe=function(){for(var i=new Int32Array(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(1&t&&-306674912)^t>>>1;i[e]=t}return i}(),Ne=function(i,e,t,r,a){if(!a&&(a={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),s=new ne(n.length+i.length);s.set(n),s.set(i,n.length),i=s,a.w=n.length}return function(i,e,t,r,a,n){var s=n.z||i.length,o=new ne(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(e){l&&(u[0]=n.r>>3);for(var h=xe[e-1],d=h>>13,v=8191&h,f=(1<<t)-1,A=n.p||new se(32768),m=n.h||new se(f+1),p=Math.ceil(t/3),g=2*p,_=function(e){return(i[e]^i[e+1]<<p^i[e+2]<<g)&f},S=new oe(25e3),y=new se(288),w=new se(32),b=0,M=0,E=n.i||0,R=0,C=n.w||0,P=0;E+2<s;++E){var T=_(E),k=32767&E,U=m[T];if(A[k]=U,m[T]=k,C<=E){var I=s-E;if((b>7e3||R>24576)&&(I>423||!c)){l=Be(i,u,0,S,y,w,M,R,P,E-P,l),R=b=M=0,P=E;for(var B=0;B<286;++B)y[B]=0;for(B=0;B<30;++B)w[B]=0}var x=2,D=0,O=v,N=k-U&32767;if(I>2&&T==_(E-N))for(var L=Math.min(d,I)-1,K=Math.min(32767,E),G=Math.min(258,I);N<=K&&--O&&k!=U;){if(i[E+x]==i[E+x-N]){for(var j=0;j<G&&i[E+j]==i[E+j-N];++j);if(j>x){if(x=j,D=N,j>L)break;var F=Math.min(N,j-2),z=0;for(B=0;B<F;++B){var V=E-N+B&32767,q=V-A[V]&32767;q>z&&(z=q,U=V)}}}N+=(k=U)-(U=A[k])&32767}if(D){S[R++]=268435456|fe[x]<<18|Ae[D];var H=31&fe[x],W=31&Ae[D];M+=ue[H]+ce[W],++y[257+H],++w[W],C=E+x,++b}else S[R++]=i[E],++y[i[E]]}}for(E=Math.max(E,C);E<s;++E)S[R++]=i[E],++y[i[E]];l=Be(i,u,c,S,y,w,M,R,P,E-P,l),c||(n.r=7&l|u[l/8|0]<<3,l-=7,n.h=m,n.p=A,n.i=E,n.w=C)}else{for(E=n.w||0;E<s+c;E+=65535){var J=E+65535;J>=s&&(u[l/8|0]=c,J=s),l=Ie(u,l+1,i.subarray(E,J))}n.i=s}return Ee(o,0,r+Me(l)+a)}(i,null==e.level?6:e.level,null==e.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):20:12+e.mem,t,r,a)},Le=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8};function $e(i,e){e||(e={});var t=function(){var i=-1;return{p:function(e){for(var t=i,r=0;r<e.length;++r)t=Oe[255&t^e[r]]^t>>>8;i=t},d:function(){return~i}}}(),r=i.length;t.p(i);var a,n=Ne(i,e,10+((a=e).filename?a.filename.length+1:0),8),s=n.length;return function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:9==e.level?2:0,i[9]=3,0!=e.mtime&&Le(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var r=0;r<=t.length;++r)i[r+10]=t.charCodeAt(r)}}(n,e),Le(n,s-8,t.d()),Le(n,s-4,r),n}var Ke="undefined"!=typeof TextEncoder&&new TextEncoder,Ge="undefined"!=typeof TextDecoder&&new TextDecoder;try{Ge.decode(De,{stream:!0})}catch(i){}ae.MouseMove,ae.MouseInteraction,ae.Scroll,ae.ViewportResize,ae.Input,ae.TouchMove,ae.MediaInteraction,ae.Drag;var je,Fe="text/plain";!function(i){i.GZipJS="gzip-js",i.None="none"}(je||(je={}));var ze=i=>{var{data:e,compression:t}=i;if(e){var r=(i=>JSON.stringify(i,(i,e)=>"bigint"==typeof e?e.toString():e))(e),a=new Blob([r]).size;if(t===je.GZipJS&&a>=1024)try{var n=$e(function(i,e){if(Ke)return Ke.encode(i);for(var t=i.length,r=new ne(i.length+(i.length>>1)),a=0,n=function(i){r[a++]=i},s=0;s<t;++s){if(a+5>r.length){var o=new ne(a+8+(t-s<<1));o.set(r),r=o}var u=i.charCodeAt(s);u<128||e?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&i.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 Ee(r,0,a)}(r),{mtime:0}),s=new Blob([n],{type:Fe});if(s.size<.95*a)return{contentType:Fe,body:s,estimatedSize:s.size}}catch(i){}return{contentType:"application/json",body:r,estimatedSize:a}}},Ve=[{name:"fetch",available:"undefined"!=typeof fetch,method:i=>{var e=ze(i);if(e){var{contentType:t,body:r,estimatedSize:a}=e,n=i.compression===je.GZipJS&&t===Fe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,s=h({"Content-Type":t},i.headers||{}),o=new AbortController,u=i.timeout?setTimeout(()=>o.abort(),i.timeout):null;fetch(n,{method:i.method||"POST",headers:s,body:r,keepalive:a<52428.8,signal:o.signal}).then(function(){var e=l(function*(e){var t,r=yield e.text(),a={statusCode:e.status,text:r};if(200===e.status)try{a.json=JSON.parse(r)}catch(i){}null===(t=i.callback)||void 0===t||t.call(i,a)});return function(i){return e.apply(this,arguments)}}()).catch(()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})}).finally(()=>{u&&clearTimeout(u)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:i=>{var e=ze(i);if(e){var{contentType:t,body:r}=e,a=i.compression===je.GZipJS&&t===Fe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,n=new XMLHttpRequest;n.open(i.method||"POST",a,!0),i.headers&&Object.entries(i.headers).forEach(i=>{var[e,t]=i;n.setRequestHeader(e,t)}),n.setRequestHeader("Content-Type",t),i.timeout&&(n.timeout=i.timeout),n.onreadystatechange=()=>{var e;if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(i){}null===(e=i.callback)||void 0===e||e.call(i,t)}},n.onerror=()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})},n.send(r)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:i=>{var e=ze(i);if(e){var{contentType:t,body:r}=e;try{var a="string"==typeof r?new Blob([r],{type:t}):r,n=i.compression===je.GZipJS&&t===Fe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url;navigator.sendBeacon(n,a)}catch(i){}}}}],qe=i=>{var e,t=i.transport||"fetch",r=Ve.find(i=>i.name===t&&i.available)||Ve.find(i=>i.available);if(!r)return console.error("vTilt: No available transport method"),void(null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0}));r.method(i)};class He{constructor(i,e){var t,r,a,n;this.K=!0,this.G=[],this.j=(t=(null==e?void 0:e.flush_interval_ms)||3e3,r=250,a=5e3,n=3e3,"number"!=typeof t||isNaN(t)?n:Math.min(Math.max(t,r),a)),this.F=i}get length(){return this.G.length}enqueue(i){this.G.push(i),this.V||this.q()}unload(){if(this.H(),0!==this.G.length){var i=this.W();for(var e in i){var t=i[e];this.F(h({},t,{transport:"sendBeacon"}))}}}enable(){this.K=!1,this.q()}pause(){this.K=!0,this.H()}flush(){this.H(),this.J(),this.q()}q(){this.K||(this.V=setTimeout(()=>{this.H(),this.J(),this.G.length>0&&this.q()},this.j))}H(){this.V&&(clearTimeout(this.V),this.V=void 0)}J(){if(0!==this.G.length){var i=this.W(),e=Date.now();for(var t in i){var r=i[t];r.events.forEach(i=>{var t=new Date(i.timestamp).getTime();i.$offset=Math.abs(t-e)}),this.F(r)}}}W(){var i={};return this.G.forEach(e=>{var t=e.batchKey||e.url;i[t]||(i[t]={url:e.url,events:[],batchKey:e.batchKey}),i[t].events.push(e.event)}),this.G=[],i}}class We{constructor(e){this.Z=!1,this.X=3e3,this.G=[],this.Y=!0,this.F=e.sendRequest,this.ii=e.sendBeacon,i&&void 0!==t&&"onLine"in t&&(this.Y=t.onLine,k(i,"online",()=>{this.Y=!0,this.ei()}),k(i,"offline",()=>{this.Y=!1}))}get length(){return this.G.length}enqueue(i,e){if(void 0===e&&(e=0),e>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var t=function(i){var e=3e3*Math.pow(2,i),t=e/2,r=Math.min(18e5,e),a=(Math.random()-.5)*(r-t);return Math.ceil(r+a)}(e),r=Date.now()+t;this.G.push({retryAt:r,request:i,retriesPerformedSoFar:e+1});var a="VTilt: Enqueued failed request for retry in "+Math.round(t/1e3)+"s";this.Y||(a+=" (Browser is offline)"),console.warn(a),this.Z||(this.Z=!0,this.ti())}}retriableRequest(i){var e=this;return l(function*(){try{var t=yield e.F(i);200!==t.statusCode&&(t.statusCode<400||t.statusCode>=500)&&e.enqueue(i,0)}catch(t){e.enqueue(i,0)}})()}ti(){this.ri&&clearTimeout(this.ri),this.ri=setTimeout(()=>{this.Y&&this.G.length>0&&this.ei(),this.G.length>0?this.ti():this.Z=!1},this.X)}ei(){var i=this,e=Date.now(),t=[],r=[];this.G.forEach(i=>{i.retryAt<e?r.push(i):t.push(i)}),this.G=t,r.forEach(function(){var e=l(function*(e){var{request:t,retriesPerformedSoFar:r}=e;try{var a=yield i.F(t);200!==a.statusCode&&(a.statusCode<400||a.statusCode>=500)&&i.enqueue(t,r)}catch(e){i.enqueue(t,r)}});return function(i){return e.apply(this,arguments)}}())}unload(){this.ri&&(clearTimeout(this.ri),this.ri=void 0),this.G.forEach(i=>{var{request:e}=i;try{this.ii(e)}catch(i){console.error("VTilt: Failed to send beacon on unload",i)}}),this.G=[]}}var Je="vt_rate_limit";class Ze{constructor(i){var e,t;void 0===i&&(i={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(e=i.eventsPerSecond)&&void 0!==e?e:10,this.eventsBurstLimit=Math.max(null!==(t=i.eventsBurstLimit)&&void 0!==t?t:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=i.persistence,this.captureWarning=i.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(i){var e,t,r,a;void 0===i&&(i=!1);var n=Date.now(),s=null!==(t=null===(e=this.persistence)||void 0===e?void 0:e.get(Je))&&void 0!==t?t:{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||i||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||i||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(Je,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var Xe=Array.isArray;class Qe{constructor(i){void 0===i&&(i={}),this.version="1.1.5",this.__loaded=!1,this.ai=!1,this.ni=null,this.__request_queue=[],this.si=!1,this.oi=!1,this.configManager=new d(i);var e=this.configManager.getConfig();this.sessionManager=new N(e.storage||"cookie",e.cross_subdomain_cookie),this.userManager=new Qi(e.persistence||"localStorage",e.cross_subdomain_cookie),this.webVitalsManager=new Yi(e,this),this.rateLimiter=new Ze({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:i=>{this.ui("$$client_ingestion_warning",{$$client_ingestion_warning_message:i})}}),this.retryQueue=new We({sendRequest:i=>this.ci(i),sendBeacon:i=>this.li(i)}),this.requestQueue=new He(i=>this.hi(i),{flush_interval_ms:3e3})}init(i,e,t){var r;if(t&&t!==it){var a=null!==(r=Ye[t])&&void 0!==r?r:new Qe;return a._init(i,e,t),Ye[t]=a,Ye[it][t]=a,a}return this._init(i,e,t)}_init(i,e,t){if(void 0===e&&(e={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(h({},e,{projectId:i||e.projectId,name:t})),this.__loaded=!0;var r=this.configManager.getConfig();return this.userManager.set_initial_person_info(r.mask_personal_data_properties,r.custom_personal_data_properties),this.historyAutocapture=new ee(this),this.historyAutocapture.startIfEnabled(),this.di(),this.fi(),this.Ai(),!1!==r.capture_pageview&&this.mi(),this}Ai(){this.requestQueue.enable()}fi(){if(i){var e=()=>{this.requestQueue.unload(),this.retryQueue.unload()};k(i,"beforeunload",e),k(i,"pagehide",e)}}toString(){var i,e=null!==(i=this.configManager.getConfig().name)&&void 0!==i?i:it;return e!==it&&(e=it+"."+e),e}getCurrentDomain(){if(!a)return"";var i=a.protocol,e=a.hostname,t=a.port;return i+"//"+e+(t?":"+t:"")}pi(){var i=this.configManager.getConfig();return!(!i.projectId||!i.token)||(this.si||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this.si=!0),!1)}buildUrl(){var i=this.configManager.getConfig(),{proxyUrl:e,proxy:t,api_host:r,token:a}=i;return e||(t?t+"/api/tracking?token="+a:r?r.replace(/\/+$/gm,"")+"/api/tracking?token="+a:"/api/tracking?token="+a)}sendRequest(e,t,r){if(this.pi()){if(r&&void 0!==i)if(i.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:e,event:t});this.requestQueue.enqueue({url:e,event:t})}}hi(i){var{transport:e}=i;"sendBeacon"!==e?this.retryQueue.retriableRequest(i):this.li(i)}ci(i){return new Promise(e=>{var{url:t,events:r}=i,a=1===r.length?r[0]:{events:r},n=this.configManager.getConfig().disable_compression?je.None:je.GZipJS;qe({url:t,data:a,method:"POST",transport:"XHR",compression:n,callback:i=>{e({statusCode:i.statusCode})}})})}li(i){var{url:e,events:t}=i,r=1===t.length?t[0]:{events:t},a=this.configManager.getConfig().disable_compression?je.None:je.GZipJS;qe({url:e,data:r,method:"POST",transport:"sendBeacon",compression:a})}gi(i){this.sendRequest(i.url,i.event,!1)}capture(i,e,a){if(this.sessionManager.setSessionId(),t&&t.userAgent&&function(i){return!(i&&"string"==typeof i&&i.length>500)}(t.userAgent)&&((null==a?void 0:a.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var n=this.buildUrl(),s=Xi(),o=this.userManager.getUserProperties(),u=this.userManager.get_initial_props(),c=this.sessionManager.getSessionId(),l=this.sessionManager.getWindowId(),d=this.userManager.getAnonymousId(),v={};!this.oi&&Object.keys(u).length>0&&Object.assign(v,u),e.$set_once&&Object.assign(v,e.$set_once);var f=h({},s,o,{$session_id:c,$window_id:l},d?{$anon_distinct_id:d}:{},Object.keys(v).length>0?{$set_once:v}:{},e.$set?{$set:e.$set}:{},e);!this.oi&&Object.keys(u).length>0&&(this.oi=!0),"$pageview"===i&&r&&(f.title=r.title);var A,m,p=this.configManager.getConfig();if(!1!==p.stringifyPayload){if(A=Object.assign({},f,p.globalAttributes),!P(A=JSON.stringify(A)))return}else if(A=Object.assign({},f,p.globalAttributes),!P(JSON.stringify(A)))return;m="$identify"===i?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var g={timestamp:(new Date).toISOString(),event:i,project_id:p.projectId||"",payload:A,distinct_id:m,anonymous_id:d};this.sendRequest(n,g,!0)}}ui(i,e){this.capture(i,e,{skip_client_rate_limiting:!0})}trackEvent(i,e){void 0===e&&(e={}),this.capture(i,e)}identify(i,e,t){if("number"==typeof i&&(i=String(i),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),i)if(this.userManager.isDistinctIdStringLikePublic(i))console.error('The string "'+i+'" 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"!==i){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)}i!==r&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$identify",{distinct_id:i,$anon_distinct_id:a,$set:e||{},$set_once:t||{}}),this.userManager.setDistinctId(i)):e||t?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$set",{$set:e||{},$set_once:t||{}})):i!==r&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(i))}else console.error('The string "'+i+'" 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(i,e){this.userManager.setUserProperties(i,e)&&this.capture("$set",{$set:i||{},$set_once:e||{}})}resetUser(i){this.sessionManager.resetSessionId(),this.userManager.reset(i)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(i,e){var t=this.userManager.createAlias(i,e);t?this.capture("$alias",{$original_id:t.original,$alias_id:t.distinct_id}):i===(e||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(i)}mi(){r&&("visible"===r.visibilityState?this.ai||(this.ai=!0,setTimeout(()=>{if(r&&a){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this.ni&&(r.removeEventListener("visibilitychange",this.ni),this.ni=null)):this.ni||(this.ni=()=>{this.mi()},k(r,"visibilitychange",this.ni)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}getDistinctId(){return this.userManager.getDistinctId()||this.userManager.getAnonymousId()}getAnonymousId(){return this.userManager.getAnonymousId()}updateConfig(i){this.configManager.updateConfig(i);var e=this.configManager.getConfig();this.sessionManager=new N(e.storage||"cookie",e.cross_subdomain_cookie),this.userManager=new Qi(e.persistence||"localStorage",e.cross_subdomain_cookie),this.webVitalsManager=new Yi(e,this),this.sessionRecording&&e.session_recording&&this.sessionRecording.updateConfig(this.Si(e))}di(){var i=this.configManager.getConfig();if(!i.disable_session_recording){var e=this.Si(i);this.sessionRecording=new re(this,e),e.enabled&&this.sessionRecording.startIfEnabledOrStop("recording_initialized")}}Si(i){var e,t,r,a=i.session_recording||{};return{enabled:null!==(e=a.enabled)&&void 0!==e&&e,sampleRate:a.sampleRate,minimumDurationMs:a.minimumDurationMs,sessionIdleThresholdMs:a.sessionIdleThresholdMs,fullSnapshotIntervalMs:a.fullSnapshotIntervalMs,captureConsole:null!==(t=a.captureConsole)&&void 0!==t&&t,captureNetwork:null!==(r=a.captureNetwork)&&void 0!==r&&r,captureCanvas:a.captureCanvas,blockClass:a.blockClass,blockSelector:a.blockSelector,ignoreClass:a.ignoreClass,maskTextClass:a.maskTextClass,maskTextSelector:a.maskTextSelector,maskAllInputs:a.maskAllInputs,maskInputOptions:a.maskInputOptions,masking:a.masking,recordHeaders:a.recordHeaders,recordBody:a.recordBody,compressEvents:a.compressEvents,__mutationThrottlerRefillRate:a.__mutationThrottlerRefillRate,__mutationThrottlerBucketSize:a.__mutationThrottlerBucketSize}}startSessionRecording(){if(!this.sessionRecording){var i=this.configManager.getConfig(),e=this.Si(i);e.enabled=!0,this.sessionRecording=new re(this,e)}this.sessionRecording.startIfEnabledOrStop("recording_initialized")}stopSessionRecording(){var i;null===(i=this.sessionRecording)||void 0===i||i.stopRecording()}isSessionRecordingActive(){var i;return"active"===(null===(i=this.sessionRecording)||void 0===i?void 0:i.status)}getSessionRecordingId(){var i;return(null===(i=this.sessionRecording)||void 0===i?void 0:i.sessionId)||null}_execute_array(i){Array.isArray(i)&&i.forEach(i=>{if(i&&Array.isArray(i)&&i.length>0){var e=i[0],t=i.slice(1);if("function"==typeof this[e])try{this[e](...t)}catch(i){console.error("vTilt: Error executing queued call "+e+":",i)}}})}_dom_loaded(){this.__request_queue.forEach(i=>{this.gi(i)}),this.__request_queue=[],this.Ai()}}var Ye={},it="vt",et=!(void 0!==s||void 0!==n)&&-1===(null==o?void 0:o.indexOf("MSIE"))&&-1===(null==o?void 0:o.indexOf("Mozilla"));null!=i&&(i.__VTILT_ENQUEUE_REQUESTS=et);var tt,rt;tt=Ye[it]=new Qe,(rt=u.vt)&&T(rt._i,function(i){if(i&&Xe(i)){var e=tt.init(i[0],i[1],i[2]),t=rt[i[2]||"vt"]||rt;e&&e._execute_array(t)}}),u.vt=tt,function(){function e(){e.done||(e.done=!0,et=!1,null!=i&&(i.__VTILT_ENQUEUE_REQUESTS=!1),T(Ye,function(i){i._dom_loaded()}))}r&&"function"==typeof r.addEventListener?"complete"===r.readyState?e():k(r,"DOMContentLoaded",e,{capture:!1}):i&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")}()}();
|
|
2
2
|
//# sourceMappingURL=array.js.map
|