function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _classPrivateFieldInitSpec(e,t,n){_checkPrivateRedeclaration(e,t),t.set(e,n)}function _classPrivateFieldSet(e,t,n){return e.set(_assertClassBrand(e,t),n),n}function _classPrivateFieldGet(e,t){return e.get(_assertClassBrand(e,t))}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _assertClassBrand(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var pixelTracker=function(e,t){"use strict";class n{constructor(){this.trackers=[],this.identifiers=[],this.sender=e=>{console.log(e)}}setSender(e){this.sender=e}registerTrackers(e){this.trackers.push(...e),e.forEach((e=>{e.register(this)}))}registerIdentifiers(e){this.identifiers.push(...e)}async handleEvent(e){let t={};for(const e of this.identifiers)t={...t,...await e.identify()};const n={host:window.location.host,path:window.location.pathname,title:document.title,event:e,identifiers:t};await this.sender.send(n)}run(){this.trackers.forEach((e=>{e.run()})),this.identifiers.forEach((e=>{e.run()}))}}async function r(e){if(null==e||""===e||void 0===window.crypto||void 0===window.crypto.subtle)return"";const t=(new TextEncoder).encode(e),n=await window.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>e.toString(16).padStart(2,"0"))).join("")}function i(e,t,n){document.querySelectorAll(e).forEach((e=>{e.addEventListener(t,n)}));new MutationObserver((function(r){for(const i of r)"childList"===i.type&&i.addedNodes.forEach((r=>{1===r.nodeType&&(r.matches(e)?r.addEventListener(t,n):r.querySelectorAll(e).forEach((e=>{e.addEventListener(t,n)})))}))})).observe(document.body,{childList:!0,subtree:!0})}async function a(e,t){return{tag:e.tagName.toLowerCase(),id:e.id,class:e.className,name:e.name,value:t?await r(e.value):e.value,valueLength:e.value?e.value.length:0,text:e.innerText,href:e.getAttribute("href")}}var o=new WeakSet;class c{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];_classPrivateMethodInitSpec(this,o),this.selector=e,this.valueDigest=t}run(){i(this.selector,"click",_assertClassBrand(o,this,s).bind(this))}register(e){this.tracker=e}}async function s(e){this.tracker.handleEvent({event:"click",element:await a(e.target,this.valueDigest)})}var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]=i+n?(i=o,[4,m(0)]):[3,3]):[3,4];case 2:c.sent(),c.label=3;case 3:return++a,[3,1];case 4:return[2,r]}}))}))}function b(e){e.then(void 0,(function(){}))}function g(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function w(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function k(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function L(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=S(e=w(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=S(e=w(e,[3301882366,444984403]),[0,e[0]>>>1])}function C(e){return parseInt(e)}function W(e){return parseFloat(e)}function I(e,t){return"number"==typeof e&&isNaN(e)?t:e}function Z(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function P(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var n=1/t;return Math.round(e*n)/n}function F(e){return e&&"object"==typeof e&&"message"in e?e:{message:e}}function M(e,t,n){var r=Object.keys(e).filter((function(e){return!function(e,t){for(var n=0,r=e.length;n=4}function A(){var e=window,t=navigator;return Z(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===t.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function G(){var e=window,t=navigator;return Z(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===t.vendor.indexOf("Apple"),"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function R(){var e=window;return Z(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function _(){var e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function j(){var e=A(),t=function(){var e,t,n=window;return Z(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4}();if(!e&&!t)return!1;var n=window;return Z(["onorientationchange"in n,"orientation"in n,e&&!("SharedWorker"in n),t&&/android/i.test(navigator.appVersion)])>=2}function Y(e){var t=new Error(e);return t.name=e,t}function X(e,t,n){var r,i,a;return void 0===n&&(n=50),u(this,void 0,void 0,(function(){var o,c;return d(this,(function(s){switch(s.label){case 0:o=document,s.label=1;case 1:return o.body?[3,3]:[4,m(n)];case 2:return s.sent(),[3,1];case 3:c=o.createElement("iframe"),s.label=4;case 4:return s.trys.push([4,,10,11]),[4,new Promise((function(e,n){var r=!1,i=function(){r=!0,e()};c.onload=i,c.onerror=function(e){r=!0,n(e)};var a=c.style;a.setProperty("display","block","important"),a.position="absolute",a.top="0",a.left="0",a.visibility="hidden",t&&"srcdoc"in c?c.srcdoc=t:c.src="about:blank",o.body.appendChild(c);var s=function(){var e,t;r||("complete"===(null===(t=null===(e=c.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?i():setTimeout(s,10))};s()}))];case 5:s.sent(),s.label=6;case 6:return(null===(i=null===(r=c.contentWindow)||void 0===r?void 0:r.document)||void 0===i?void 0:i.body)?[3,8]:[4,m(n)];case 7:return s.sent(),[3,6];case 8:return[4,e(c,c.contentWindow)];case 9:return[2,s.sent()];case 10:return null===(a=c.parentNode)||void 0===a||a.removeChild(c),[7];case 11:return[2]}}))}))}function T(e){for(var t=function(e){for(var t,n,r="Unexpected syntax '".concat(e,"'"),i=/^\s*([a-z-]*)(.*)$/i.exec(e),a=i[1]||void 0,o={},c=/([.:#][\w-]+|\[.+?\])/gi,s=function(e,t){o[e]=o[e]||[],o[e].push(t)};;){var l=c.exec(i[2]);if(!l)break;var u=l[0];switch(u[0]){case".":s("class",u.slice(1));break;case"#":s("id",u.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(u);if(!d)throw new Error(r);s(d[1],null!==(n=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==n?n:"");break;default:throw new Error(r)}}return[a,o]}(e),n=t[0],r=t[1],i=document.createElement(null!=n?n:"div"),a=0,o=Object.keys(r);a.6*n.length}))).sort(),[2,i]}var c}))}))},fontPreferences:function(){return function(e,t){void 0===t&&(t=4e3);return X((function(n,r){var i=r.document,a=i.body,o=a.style;o.width="".concat(t,"px"),o.webkitTextSizeAdjust=o.textSizeAdjust="none",A()?a.style.zoom="".concat(1/r.devicePixelRatio):G()&&(a.style.zoom="reset");var c=i.createElement("div");return c.textContent=h([],Array(t/20|0),!0).map((function(){return"word"})).join(" "),a.appendChild(c),e(i,a)}),'')}((function(e,t){for(var n={},r={},i=0,a=Object.keys(oe);i=3}())return-1;var n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;var i=n.createDynamicsCompressor();i.threshold.value=-50,i.knee.value=40,i.ratio.value=12,i.attack.value=0,i.release.value=.25,r.connect(i),i.connect(n.destination),r.start(0);var a=function(e){var t=3,n=500,r=500,i=5e3,a=function(){},o=new Promise((function(o,c){var s=!1,l=0,u=0;e.oncomplete=function(e){return o(e.renderedBuffer)};var d=function(){setTimeout((function(){return c(Y("timeout"))}),Math.min(r,u+i-Date.now()))},h=function(){try{var r=e.startRendering();switch(v(r)&&b(r),e.state){case"running":u=Date.now(),s&&d();break;case"suspended":document.hidden||l++,s&&l>=t?c(Y("suspended")):setTimeout(h,n)}}catch(e){c(e)}};h(),a=function(){s||(s=!0,u>0&&d())}}));return[o,a]}(n),o=a[0],c=a[1],s=o.then((function(e){return function(e){for(var t=0,n=0;n=3||n.push(t.languages);else if("string"==typeof t.languages){var i=t.languages;i&&n.push(i.split(","))}return n},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return I(W(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(e){return I(C(e),null)},n=[t(e.width),t(e.height)];return n.sort().reverse(),n},hardwareConcurrency:function(){return I(C(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var n=(new t).resolvedOptions().timeZone;if(n)return n}var r,i=(r=(new Date).getFullYear(),-Math.max(W(new Date(r,0,1).getTimezoneOffset()),W(new Date(r,6,1).getTimezoneOffset())));return"UTC".concat(i>=0?"+":"").concat(Math.abs(i))},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){var e,t;if(!(x()||(e=window,t=navigator,Z(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!x())))try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&G()&&!R()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return Z(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],n=0;n>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)}(function(e){for(var t="",n=0,r=Object.keys(e).sort();n=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(f,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),[4,he(n)];case 1:return e.sent(),[2,fe(M(ce,{debug:r},[]),r)]}}))}))},hashComponents:de,componentsToDebugString:ue}.load({monitoring:!1});class ve{async run(){}async identify(){const e=await(await me).get();return{fingerprint:e.visitorId,screenWidth:e.components.screenResolution.value[0],screenHeight:e.components.screenResolution.value[1],color:e.components.colorDepth.value,timezone:e.components.timezone.value,deviceMemory:e.components.deviceMemory.value,webglVendor:e.components.videoCard.value.vendor,webglRenderer:e.components.videoCard.value.renderer,hardwareConcurrency:e.components.hardwareConcurrency.value}}}var pe=new WeakMap,ye=new WeakMap,be=new WeakSet;class ge{constructor(e){_classPrivateMethodInitSpec(this,be),_classPrivateFieldInitSpec(this,pe,!1),_classPrivateFieldInitSpec(this,ye,[]),this.intervals=[...e]}run(){if(_classPrivateFieldGet(pe,this)||void 0===this.tracker)return;const e=Date.now();_classPrivateFieldSet(ye,this,this.intervals.map((t=>[t,e+1e3*t]))),_classPrivateFieldSet(pe,this,!0),_assertClassBrand(be,this,we).call(this)}register(e){this.tracker=e}}function we(){if(0===_classPrivateFieldGet(ye,this).length)return;const[e,t]=_classPrivateFieldGet(ye,this).shift();let n=t-Date.now();n<0&&(n=0),setTimeout((()=>{this.tracker.handleEvent({event:"duration",duration:e}),_assertClassBrand(be,this,we).call(this)}),n)}class ke{run(){window.addEventListener("visibilitychange",this.handleChange.bind(this))}register(e){this.tracker=e}handleChange(){this.tracker.handleEvent({event:"visibility",visibility:document.visibilityState})}}class Le{run(){window.addEventListener("beforeunload",this.handleLeave.bind(this))}register(e){this.tracker=e}handleLeave(){this.tracker.м({event:"leave"})}}class Se{async run(){}async identify(){return{userAgent:navigator.userAgent,platform:navigator.platform,timeOffset:-(new Date).getTimezoneOffset()/60}}}var Ve=new WeakMap,Ce=new WeakMap,We=new WeakSet;class Ie{constructor(e){_classPrivateMethodInitSpec(this,We),_classPrivateFieldInitSpec(this,Ve,.03),_classPrivateFieldInitSpec(this,Ce,null),this.intervalsPercents=e}run(){window.addEventListener("scroll",_assertClassBrand(We,this,Ze).bind(this))}register(e){this.tracker=e}}function Ze(){const e=window.scrollY/(document.body.offsetHeight-window.innerHeight);if(null!==_classPrivateFieldGet(Ce,this)&&_assertClassBrand(We,this,Pe).call(this,e,_classPrivateFieldGet(Ce,this)))return;const t=this.intervalsPercents.find((t=>_assertClassBrand(We,this,Pe).call(this,e,t)));void 0!==t&&(_classPrivateFieldSet(Ce,this,t),this.tracker.handleEvent({event:"scroll",scroll:{percent:Math.round(100*e)/100,interval:t}}))}function Pe(e,t){return e>=t-_classPrivateFieldGet(Ve,this)&&e<=t+_classPrivateFieldGet(Ve,this)}var Fe=new WeakSet;class Me{constructor(){_classPrivateMethodInitSpec(this,Fe)}async run(){}async identify(){return{ym:_assertClassBrand(Fe,this,xe).call(this,"_ym_uid"),ga:_assertClassBrand(Fe,this,xe).call(this,"_ga")}}}function xe(e){return document.cookie.split("; ").filter((t=>t.startsWith(e+"="))).map((e=>e.split("=")[1]))}class Ae{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.element=e?document.getElementById(e):null}async send(e){const t=Date.now()+" "+JSON.stringify(e);console.log(t),this.element&&(this.element.value+=t+"\n")}}class Ge{constructor(e){this.endpoint=e}async send(e){await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}class Re{constructor(){}run(){setTimeout((()=>{this.tracker.handleEvent({event:"open"})}),10)}register(e){this.tracker=e}}class _e{async run(){window.crypto&&window.crypto.randomUUID?this.pageviewId=window.crypto.randomUUID():this.pageviewId=Math.random().toString(36)}async identify(){return{pageviewId:this.pageviewId}}}class je{constructor(e,t){this.id=e,this.installationId=t}async run(){}async identify(){return{trackerId:this.id,trackerInstallationId:this.installationId}}}var Ye=new WeakSet;class Xe{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];_classPrivateMethodInitSpec(this,Ye),this.selector=e,this.valueDigest=t,this.timeoutPairs=[]}run(){i(this.selector,"keyup",_assertClassBrand(Ye,this,Te).bind(this))}register(e){this.tracker=e}}async function Te(t){const n=`${t.target.tagName}#${t.target.id}#${t.target.className}#${t.target.type}#${t.target.name}`,r=this.timeoutPairs.find((e=>e[0]===n));r?(clearTimeout(r[1]),this.timeoutPairs=this.timeoutPairs.filter((e=>e!==r))):this.timeoutPairs.size===e.maxTimeoutPairsCount&&clearTimeout(this.timeoutPairs.shift()[1]),this.timeoutPairs.push([n,setTimeout((async()=>{this.tracker.handleEvent({event:"type",element:await a(t.target,this.valueDigest)})}),1e3)])}e=Xe,_defineProperty(Xe,"maxTimeoutPairsCount",3);class Ee{async run(){this.referrer=document.referrer,this.previousLocation=window.location.href}async identify(){return this.previousLocation!==window.location.href&&(this.referrer=this.previousLocation,this.previousLocation=window.location.href),{referrer:this.referrer}}}var He=new WeakSet;class Je{constructor(){_classPrivateMethodInitSpec(this,He)}run(){this.previousSelectedText=null,document.addEventListener("pointerup",_assertClassBrand(He,this,Ne).bind(this))}register(e){this.tracker=e}}async function Ne(){const e=window.getSelection(),n=e.toString().trim();n!==this.previousSelectedText&&(this.previousSelectedText=n,n&&this.tracker.handleEvent({event:"selection",selection:{snippet:n.slice(0,t.snippetLength),length:n.length},element:await a(e.anchorNode.parentElement,!0)}))}t=Je,_defineProperty(Je,"snippetLength",32);const De={click:e=>new c(e.selector),type:e=>new Xe(e.selector,e.digest),open:()=>new Re,duration:e=>new ge(e.intervals),scroll:e=>new Ie(e.intervals),leave:()=>new Le,visibility:()=>new ke,selection:()=>new Je},Be={fingerprint:()=>new ve,browser:()=>new Se,metrics:()=>new Me,pageview:()=>new _e,referrer:()=>new Ee,tracker:e=>new je(e.id,e.installationId)},ze={post:e=>new Ge(e.url),debug:e=>new Ae(e.elementId)};return{Tracker:n,Trackers:{ClicksTracker:c,TypingTracker:Xe,OpenTracker:Re,DurationTracker:ge,ScrollTracker:Ie,LeaveTracker:Le,VisibilityTracker:ke,SelectionTracker:Je},Identifiers:{FingerprintIdentifier:ve,BrowserIdentifier:Se,MetricsIdentifier:Me,PageviewIdentifier:_e,TrackerIdentifier:je,ReferrerIdentifier:Ee},Senders:{DebugSender:Ae,PostSender:Ge},run:function(e){const t=new n;if(Array.isArray(e.trackers)){const n=e.trackers.map((e=>{const t=De[e.type];return t?t(e):(console.error(`Unknown tracker type: ${e.type}`),null)})).filter((e=>null!==e));t.registerTrackers(n)}else console.error("Invalid or missing trackers configuration");if(Array.isArray(e.identifiers)){const n=e.identifiers.map((e=>{const t=Be[e.type];return t?t(e):(console.error(`Unknown identifier type: ${e.type}`),null)})).filter((e=>null!==e));t.registerIdentifiers(n)}else console.error("Invalid or missing identifiers configuration");if(e.sender){const n=ze[e.sender.type];n?t.setSender(n(e.sender)):console.error(`Unknown sender type: ${e.sender.type}`)}else console.error("Invalid or missing sender configuration");t.run()}}}();