@fingerly/web-js 0.1.2 → 0.3.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/README.md +320 -51
- package/dist/browser.global.js +48 -1
- package/dist/index.cjs +1273 -622
- package/dist/index.d.cts +57 -53
- package/dist/index.d.ts +57 -53
- package/dist/index.js +1274 -624
- package/package.json +2 -2
package/dist/browser.global.js
CHANGED
|
@@ -1 +1,48 @@
|
|
|
1
|
-
"use strict";var Fingerly=(()=>{var G=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var bt=Object.prototype.hasOwnProperty;var _t=(e,t)=>{for(var n in t)G(e,n,{get:t[n],enumerable:!0})},Et=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wt(t))!bt.call(e,o)&&o!==n&&G(e,o,{get:()=>t[o],enumerable:!(r=vt(t,o))||r.enumerable});return e};var xt=e=>Et(G({},"__esModule",{value:!0}),e);var In={};_t(In,{ConsentError:()=>N,FingerlyClient:()=>P,SOURCE:()=>d,TransportError:()=>h,browserSources:()=>B,inspectIntegrity:()=>I,load:()=>St});var le=e=>{throw TypeError(e)},fe=(e,t,n)=>t.has(e)||le("Cannot "+n),x=(e,t,n)=>(fe(e,t,"read from private field"),n?n.call(e):t.get(e)),me=(e,t,n)=>t.has(e)?le("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pe=(e,t,n,r)=>(fe(e,t,"write to private field"),t.set(e,n),n),Tt=["granted","pending","denied"];function J(e){if(!Tt.includes(e))throw new TypeError(`Fingerly consent must be 'granted', 'pending' or 'denied' (received ${JSON.stringify(e)})`)}var N=class extends Error{constructor(e){super(`Fingerly needs consent before it can identify this visitor (consent is ${e})`),this.state=e,this.name="ConsentError",this.code="consent_required"}},l=class extends Error{constructor(e){super(e??"unsupported"),this.reason=e,this.name="UnsupportedSignal"}},w=class extends Error{constructor(e){super(e??"blocked"),this.reason=e,this.name="BlockedSignal"}},R=class extends Error{constructor(e){super(e??"timeout"),this.reason=e,this.name="TimedOutSignal"}};function Mt(e){if(e instanceof l||e instanceof w||e instanceof R)return e.reason;if(e instanceof Error&&typeof e.name=="string"&&e.name!=="Error")return e.name}var T=typeof globalThis.performance?.now=="function"?()=>globalThis.performance.now():()=>Date.now(),H={budgetMs:1200,defaultSourceTimeoutMs:300,concurrency:6};function U(e){return Math.max(0,Math.round(e))}function kt(e){return e instanceof l?"unsupported":e instanceof w?"blocked":e instanceof R?"timeout":"error"}async function At(e,t,n,r,o){let i=T(),a=t-i;if(a<=0)return{status:"timeout",ms:0,reason:"budget-exhausted"};let c=Math.min(e.timeoutMs??n,a),u=new AbortController,m=()=>u.abort(new R("aborted"));r?.addEventListener("abort",m,{once:!0});let p=setTimeout(()=>u.abort(new R("source-timeout")),c),b={signal:u.signal,budgetRemainingMs:()=>Math.max(0,t-T()),completed:y=>o[y]};try{let y=await Promise.race([(async()=>e.run(b))(),new Promise((_,E)=>{u.signal.addEventListener("abort",()=>E(u.signal.reason??new R("source-timeout")),{once:!0})})]);return{status:"ok",ms:U(T()-i),value:y}}catch(y){let _=kt(y),E=Mt(y);return E===void 0?{status:_,ms:U(T()-i)}:{status:_,ms:U(T()-i),reason:E}}finally{clearTimeout(p),r?.removeEventListener("abort",m)}}async function Ct(e,t={}){let n=t.budgetMs??H.budgetMs,r=t.defaultSourceTimeoutMs??H.defaultSourceTimeoutMs,o=Math.max(1,t.concurrency??H.concurrency),i=t.tiers??["fast","deferred"],a=T(),c=a+n,u={},m={...t.completed??{}},p=!1;for(let b of i){let y=e.filter(M=>M.tier===b);if(y.length===0)continue;let _=0,E=async()=>{for(;_<y.length;){let M=y[_++];if(!M)continue;if(T()>=c||t.signal?.aborted){p=!0,u[M.id]={status:"timeout",ms:0,reason:"budget-exhausted"};continue}let V=await At(M,c,r,t.signal,m);V.status==="timeout"&&(p=!0),u[M.id]=V,m[M.id]=V}};await Promise.all(Array.from({length:Math.min(o,y.length)},E))}return{outcomes:u,elapsedMs:U(T()-a),truncated:p}}function Dt(e="v1"){if(!/^v[1-9]\d*$/.test(e)||e.trim()!==e)throw new TypeError('apiVersion must be a version such as "v1" or "v2"');return e}var Rt="https://api.fingerly.io",Y="x-api-key",ge="[redacted]",he=Symbol.for("nodejs.util.inspect.custom"),Ot="Idempotency-Key",h=class extends Error{constructor(e,t,n=!1,r,o){super(e),this.status=t,this.retryable=n,this.code=r,this.retryAfterMs=o,this.name="TransportError"}},Z=4*1024*1024,Nt=2e3;function Pt(e){let t=e.headers.get("retry-after")?.trim();if(!t)return;if(/^\d+$/.test(t))return Number(t)*1e3;let n=Date.parse(t);return Number.isFinite(n)?Math.max(0,n-Date.now()):void 0}async function ee(e){try{let n=(await e.json())?.error?.code;return typeof n=="string"&&n!==""?n:void 0}catch{return}}function te(e,t){return new h(`The server refused the submission (${e.status})`,e.status,Bt(e.status),t,Pt(e))}async function It(e){let t=()=>new h("The server answered with a response this SDK cannot read",e.status,!1);if(Number(e.headers.get("content-length"))>Z)throw e.body?.cancel().catch(()=>{}),t();let n=await e.text();if(n.length>Z)throw t();try{let r=JSON.parse(n);if(r===null||typeof r!="object")throw t();return r}catch{throw t()}}function Lt(e,t){let n=Wt(t,Math.random);return e.retryAfterMs===void 0?n:e.retryAfterMs>Nt?null:e.retryAfterMs+n}function Bt(e){return e===408||e===429||e>=500&&e<=599}function Ft(e){return e.status===404||e.status===405}function ye(e,t){return`${e}/api/${t}/ingest`}function $(e){return ye(Rt,e)}function Ut(e,t){let n=e.trim().replace(/\/+$/,"");if(n===""||n.includes("?")||n.includes("#"))throw new TypeError("A Fingerly endpoint must be a non-empty URL or path without a query or fragment");if(!(n.startsWith("/")||/^https?:\/\//i.test(n)))throw new TypeError("A Fingerly endpoint must be an absolute URL or a root-relative browser path");return/^https?:\/\/[^/]+$/i.test(n)?ye(n,t):n}function Wt(e,t){let n=Math.min(2e3,100*2**(e-1));return Math.floor(t()*n)}function ne(e,t){return new Promise(n=>{if(t?.aborted)return n();let r=()=>{clearTimeout(o),t?.removeEventListener("abort",r),n()},o=setTimeout(r,e);t?.addEventListener("abort",r,{once:!0})})}function qt(){let e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();if(typeof e?.getRandomValues=="function"){let t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}return`fingerly-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`}var D,re=class{constructor(e){if(me(this,D),!e.apiKey)throw new h("An SDK key is required to submit a fingerprint");pe(this,D,e.apiKey);let t=Dt(e.apiVersion),n=e.endpoints,r=n===void 0?[$(t)]:Array.isArray(n)?[...n]:[n];if(r.length===0)throw new TypeError("The endpoints array must not be empty");let o=r.map(a=>Ut(a,t));n!==void 0&&e.fallbackToDefaultEndpoint&&(o.includes($(t))||o.push($(t))),this.urls=o,this.maxAttempts=Math.max(1,this.urls.length,e.maxAttempts??3),this.requestTimeoutMs=e.requestTimeoutMs??5e3;let i=e.fetchImpl??globalThis.fetch;if(typeof i!="function")throw new h("No fetch implementation is available; pass one as fetchImpl");this.fetchImpl=i.bind(globalThis)}toJSON(){return{apiKey:ge,urls:[...this.urls],maxAttempts:this.maxAttempts,requestTimeoutMs:this.requestTimeoutMs}}[he](){return this.toJSON()}async submit(e,t){let n,r=JSON.stringify(e),o=qt(),i=0;for(let a=1;a<=this.maxAttempts;a++){if(t?.aborted)throw new h("The submission was cancelled");try{return await this.attempt(this.urls[i],r,o,t)}catch(c){let u=c instanceof h?c:new h(c instanceof Error?c.message:"The submission could not be sent",void 0,!0),m=this.nextAttempt(u,a,i);if(m===null)throw u;n=u,i=Math.min(i+1,this.urls.length-1),await ne(m,t)}}throw n??new h("The submission could not be sent")}async submitSupplement(e,t,n){let r=JSON.stringify(t),o,i=0;for(let a=1;a<=this.maxAttempts;a++){if(n?.aborted)throw new h("The supplement was cancelled");try{await this.postJSON(this.urls[i],r,n);return}catch(c){let u=c instanceof h?c:new h(c instanceof Error?c.message:"The supplement could not be sent",void 0,!0),m=this.nextAttempt(u,a,i);if(m===null)throw u;o=u,i=Math.min(i+1,this.urls.length-1),await ne(m,n)}}throw o??new h("The supplement could not be sent")}nextAttempt(e,t,n){return t===this.maxAttempts?null:e.retryable?Lt(e,t):Ft(e)&&n<this.urls.length-1?0:null}async postJSON(e,t,n){let r=new AbortController,o=()=>r.abort();n?.addEventListener("abort",o,{once:!0});let i=setTimeout(o,this.requestTimeoutMs);try{let a=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[Y]:x(this,D)},body:t,credentials:"omit",signal:r.signal});if(!a.ok)throw te(a,await ee(a));return await a.arrayBuffer().catch(()=>{}),a}finally{clearTimeout(i),n?.removeEventListener("abort",o)}}async attempt(e,t,n,r){let o=new AbortController,i=()=>o.abort();r?.addEventListener("abort",i,{once:!0});let a=setTimeout(i,this.requestTimeoutMs);try{let c=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[Y]:x(this,D),[Ot]:n},body:t,credentials:"omit",signal:o.signal});if(!c.ok)throw te(c,await ee(c));let u=await It(c);if(typeof u?.request_id!="string"||u.request_id==="")throw new h("The server accepted the submission but returned no request_id");return u}finally{clearTimeout(a),r?.removeEventListener("abort",i)}}};D=new WeakMap;var oe="0.1.2",Vt=1;function ie(e){return e instanceof h&&e.code==="consent_required"?new N("pending"):e}var ae={patched_natives:[],lies:[],engine:{}},v,P=class{constructor(e){me(this,v),this.consentListeners=new Set;let t=e.consent??"pending";J(t),this.consentState=t,pe(this,v,e),this.platform=e.platform??"web",this.transport=e.transport??new re({...e.apiVersion===void 0?{}:{apiVersion:e.apiVersion},apiKey:e.apiKey,...e.endpoints===void 0?{}:{endpoints:e.endpoints},...e.fallbackToDefaultEndpoint===void 0?{}:{fallbackToDefaultEndpoint:e.fallbackToDefaultEndpoint}})}toJSON(){return{apiKey:ge,platform:this.platform,consent:this.consentState,transport:this.transport instanceof re?this.transport:"custom"}}[he](){return this.toJSON()}get consent(){return this.consentState}setConsent(e){if(J(e),e!==this.consentState){this.consentState=e;for(let t of[...this.consentListeners])try{t(e)}catch(n){setTimeout(()=>{throw n},0)}}}onConsentChange(e){return this.consentListeners.add(e),()=>{this.consentListeners.delete(e)}}requireConsent(){if(this.consentState!=="granted")throw new N(this.consentState)}consentScope(e){let t=new AbortController,n=()=>t.abort();e?.aborted?n():e?.addEventListener("abort",n,{once:!0});let r=this.onConsentChange(o=>{o!=="granted"&&n()});return{signal:t.signal,close:()=>{r(),e?.removeEventListener("abort",n)}}}async identify(e={}){this.requireConsent();let t=this.consentScope(e.signal);try{return await this.identifyWithConsent(e,t.signal)}finally{t.close()}}async identifyWithConsent(e,t){let n=e.submit!==!1&&e.tiers===void 0,r=await this.collectReport(n?["fast"]:e.tiers??["fast","deferred"],t,n?300:void 0);if(this.requireConsent(),e.submit===!1)return{requestId:"",visitorId:"",visitorIsNew:!1,visitorConfidence:0,identifiable:!1,duplicate:!1,state:"",suspectScore:null,suspectLevel:null,report:r,deferred:Promise.resolve({status:"skipped",reason:"not-submitted"})};let o={sdk:{platform:this.platform,version:oe},consent:this.consentState,signals:r,...e.tag===void 0?{}:{tag:e.tag}},i;try{i=await this.transport.submit(o,t)}catch(c){throw this.requireConsent(),ie(c)}let a={requestId:i.request_id,visitorId:i.visitor_id??"",visitorIsNew:i.visitor_is_new??!1,visitorConfidence:i.visitor_confidence??0,identifiable:i.identifiable??!1,duplicate:i.duplicate??!1,state:i.state??"",suspectScore:typeof i.suspect_score=="number"&&Number.isFinite(i.suspect_score)?i.suspect_score:null,suspectLevel:typeof i.suspect_level=="string"&&i.suspect_level!==""?i.suspect_level:null,report:r,deferred:Promise.resolve({status:"skipped",reason:"explicit-tiers"})};return n?i.duplicate||!i.deferred_token?(a.deferred=Promise.resolve({status:"skipped",reason:i.duplicate?"duplicate":"unsupported-transport"}),a):typeof this.transport.submitSupplement!="function"?(a.deferred=Promise.resolve({status:"skipped",reason:"unsupported-transport"}),a):(a.deferred=this.finishDeferred(r,i.request_id,i.deferred_token,e.signal),a):a}async finishDeferred(e,t,n,r){let o={status:"skipped",reason:"consent-withdrawn"};if(this.consentState!=="granted")return o;let i=this.consentScope(r),a,c;try{if(a=await this.collectReport(["deferred"],i.signal,1200,e.sources),this.consentState!=="granted")return o;c={schema:e.schema,budget_ms:e.budget_ms+a.budget_ms,elapsed_ms:e.elapsed_ms+a.elapsed_ms,tiers:["fast","deferred"],sources:{...e.sources,...a.sources},integrity:x(this,v).integrity?x(this,v).integrity({sources:{...e.sources,...a.sources}}):ae};let u={sdk:{platform:this.platform,version:oe},consent:this.consentState,signals:a,token:n};return await this.transport.submitSupplement(t,u,i.signal),{status:"submitted",report:a,combinedReport:c}}catch(u){if(this.consentState!=="granted")return o;let m=ie(u);return{status:"failed",error:m instanceof Error?m:new Error(String(m)),...a===void 0?{}:{report:a},...c===void 0?{}:{combinedReport:c}}}finally{i.close()}}async collect(e={}){this.requireConsent();let t=e.tiers??["fast","deferred"],n=this.consentScope(e.signal);try{let r=await this.collectReport(t,n.signal);return this.requireConsent(),r}finally{n.close()}}async collectReport(e,t,n,r){let o=x(this,v).sources??[],i={...x(this,v).schedule,tiers:e,...n===void 0?{}:{budgetMs:n},...t===void 0?{}:{signal:t},...r===void 0?{}:{completed:r}},a=await Ct(o,i),c=x(this,v).integrity?x(this,v).integrity({sources:a.outcomes}):ae;return{schema:Vt,budget_ms:i.budgetMs??1200,elapsed_ms:a.elapsedMs,tiers:e,sources:a.outcomes,integrity:c}}};v=new WeakMap;var O=2654435761,W=2246822519,se=3266489917,Gt=668265263,ce=374761393;function k(e,t){return e<<t|e>>>32-t}function F(e,t){return Math.imul(k(e+Math.imul(t,W)|0,13),O)}function C(e,t){return((e[t]??0)|(e[t+1]??0)<<8|(e[t+2]??0)<<16|(e[t+3]??0)<<24)>>>0}function Ht(e){if(typeof TextEncoder<"u")return new TextEncoder().encode(e);let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(r=(r-55296)*1024+(o-56320)+65536,n++)}r<128?t.push(r):r<2048?t.push(192|r>>6,128|r&63):r<65536?t.push(224|r>>12,128|r>>6&63,128|r&63):t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}return new Uint8Array(t)}function ue(e,t){let n=e.length,r=0,o;if(n>=16){let i=t+O+W|0,a=t+W|0,c=t|0,u=t-O|0,m=n-16;do i=F(i,C(e,r)),a=F(a,C(e,r+4)),c=F(c,C(e,r+8)),u=F(u,C(e,r+12)),r+=16;while(r<=m);o=k(i,1)+k(a,7)+k(c,12)+k(u,18)|0}else o=t+ce|0;for(o=o+n|0;r+4<=n;)o=Math.imul(k(o+Math.imul(C(e,r),se)|0,17),Gt),r+=4;for(;r<n;)o=Math.imul(k(o+Math.imul(e[r]??0,ce)|0,11),O),r++;return o^=o>>>15,o=Math.imul(o,W),o^=o>>>13,o=Math.imul(o,se),o^=o>>>16,o>>>0}function de(e){return e.toString(16).padStart(8,"0")}function A(e){let t=typeof e=="string"?Ht(e):e;return de(ue(t,0))+de(ue(t,O))}var d={navigator:"navigator",userAgentData:"user_agent_data",languages:"languages",plugins:"plugins",vendor:"vendor",engine:"engine",math:"math",errors:"errors",screen:"screen",screenFrame:"screen_frame",colorGamut:"color_gamut",mediaQueries:"media_queries",canvas:"canvas",webgl:"webgl",webglExtensions:"webgl_extensions",audio:"audio",audioLatency:"audio_latency",fonts:"fonts",fontPreferences:"font_preferences",intl:"intl",timezone:"timezone",storage:"storage",storageQuota:"storage_quota",storageDurability:"storage_durability",hardware:"hardware",touch:"touch",sensors:"sensors",battery:"battery",mediaDevices:"media_devices",network:"network",speech:"speech",timing:"timing",permissions:"permissions",automation:"automation",shields:"shields",domBlockers:"dom_blockers"};function Se(e,t){let n=e.sources[t];return n?.status==="ok"?n.value:void 0}function f(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function s(e){try{return e()}catch{return}}function j(){return typeof window>"u"?void 0:window}function g(){let e=j();if(!e)throw new l("no-window");return e}function ve(e){throw e instanceof Error&&(e.name==="SecurityError"||e.name==="NotAllowedError"||e.name==="NotSupportedError")?new w(e.name):e}var $t=/\{\s*\[native code\]\s*\}\s*$/,jt=[["navigator","webdriver"],["navigator","userAgent"],["navigator","platform"],["navigator","plugins"],["navigator","mimeTypes"],["navigator","languages"],["navigator","language"],["navigator","hardwareConcurrency"],["navigator","deviceMemory"],["navigator","maxTouchPoints"],["navigator","vendor"],["navigator","appVersion"],["navigator","productSub"],["screen","width"],["screen","height"],["screen","availWidth"],["screen","availHeight"],["screen","colorDepth"]];function we(e){let t=[];for(let[o,i]of jt){let a=o==="navigator"?e.navigator:e.screen;if(!a)continue;if(s(()=>Object.getOwnPropertyDescriptor(a,i))){t.push({id:`${o}.${i}`,kind:"descriptor",detail:"own-property-shadows-prototype"});continue}let u=s(()=>Object.getPrototypeOf(a));if(!u)continue;let m=s(()=>Object.getOwnPropertyDescriptor(u,i));if(!m?.get)continue;let p=s(()=>Function.prototype.toString.call(m.get));p!==void 0&&!$t.test(p)&&t.push({id:`${o}.${i}.getter`,kind:"descriptor",detail:"getter-is-not-native"})}let n=s(()=>Object.getPrototypeOf(e.navigator));e.Navigator&&n!==void 0&&n!==e.Navigator.prototype&&t.push({id:"navigator",kind:"prototype",detail:"not-Navigator.prototype"});let r=s(()=>Object.getPrototypeOf(e.screen));return e.Screen&&r!==void 0&&r!==e.Screen.prototype&&t.push({id:"screen",kind:"prototype",detail:"not-Screen.prototype"}),t}var be=/\{\s*\[native code\]\s*\}\s*$/,Xt=[["Function.prototype.toString",()=>Function.prototype.toString],["Function.prototype.bind",()=>Function.prototype.bind],["Object.getOwnPropertyDescriptor",()=>Object.getOwnPropertyDescriptor],["Object.defineProperty",()=>Object.defineProperty],["Date.prototype.getTimezoneOffset",()=>Date.prototype.getTimezoneOffset],["Number.prototype.toFixed",()=>Number.prototype.toFixed],["Error.prototype.toString",()=>Error.prototype.toString],["Intl.DateTimeFormat",()=>Intl?.DateTimeFormat],["Navigator.prototype.javaEnabled",e=>e.Navigator?.prototype?.javaEnabled],["Permissions.prototype.query",e=>e.Permissions?.prototype?.query],["MediaDevices.prototype.enumerateDevices",e=>e.MediaDevices?.prototype?.enumerateDevices],["HTMLCanvasElement.prototype.toDataURL",e=>e.HTMLCanvasElement?.prototype?.toDataURL],["CanvasRenderingContext2D.prototype.getImageData",e=>e.CanvasRenderingContext2D?.prototype?.getImageData],["WebGLRenderingContext.prototype.getParameter",e=>e.WebGLRenderingContext?.prototype?.getParameter],["WebGLRenderingContext.prototype.getExtension",e=>e.WebGLRenderingContext?.prototype?.getExtension],["AudioBuffer.prototype.getChannelData",e=>e.AudioBuffer?.prototype?.getChannelData],["Element.prototype.getBoundingClientRect",e=>e.Element?.prototype?.getBoundingClientRect],["Performance.prototype.now",e=>e.Performance?.prototype?.now],["Screen.prototype.constructor",e=>e.Screen]];function Kt(){let e=Function.prototype.toString;if(typeof document>"u"||!document.body)return{fn:e,clean:!1};let t=s(()=>{let n=document.createElement("iframe");return n.setAttribute("sandbox","allow-same-origin"),n.style.display="none",document.body.appendChild(n),n});if(!t)return{fn:e,clean:!1};try{let n=s(()=>t.contentWindow?.Function?.prototype?.toString);return n?{fn:n,clean:!0}:{fn:e,clean:!1}}finally{t.remove()}}function _e(e){let t=[],n=[],{fn:r,clean:o}=Kt(),i=a=>s(()=>r.call(a));for(let[a,c]of Xt){let u=s(()=>c(e));if(u==null){n.push({id:a,kind:"missing"});continue}if(typeof u!="function")continue;let m=i(u);m!==void 0&&(be.test(m)||(t.push(a),n.push({id:a,kind:"not-native"})))}if(o){let a=Function.prototype.toString,c=i(a);c!==void 0&&!be.test(c)&&(t.includes("Function.prototype.toString")||t.push("Function.prototype.toString"),n.push({id:"Function.prototype.toString",kind:"not-native",detail:"caught-via-fresh-realm"}))}return{patched:t,lies:n}}function I(e){let t=j(),n=Se({schema:1,budget_ms:0,elapsed_ms:0,tiers:[],sources:e,integrity:{patched_natives:[],lies:[],engine:{}}},d.engine),r={...n?.claimed===void 0?{}:{claimed:n.claimed},...n?.observed===void 0?{}:{observed:n.observed}};if(!t)return{patched_natives:[],lies:[],engine:r};let o=_e(t),i=we(t);return{patched_natives:o.patched,lies:[...o.lies,...i],engine:r}}function zt(){let e=globalThis,t=e.OfflineAudioContext??e.webkitOfflineAudioContext;if(!t)throw new l("no-offline-audio-context");return t}async function Ee(e){let t=zt(),n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;let o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);let a=(await new Promise((u,m)=>{e.signal.addEventListener("abort",()=>m(e.signal.reason),{once:!0}),n.oncomplete=p=>u(p.renderedBuffer);try{let p=n.startRendering();p&&typeof p.then=="function"&&p.then(u,m)}catch(p){m(p)}})).getChannelData(0),c=0;for(let u=4500;u<a.length;u++)c+=Math.abs(a[u]??0);return c}var xe={id:d.audio,tier:"deferred",timeoutMs:500,async run(e){let t=await Ee(e);if(t===0)throw new w("audio-silent");let n=await Ee(e);return f({value:t,unstable:t!==n,sample_rate:44100})}},Te={id:d.audioLatency,tier:"deferred",timeoutMs:200,run(){let e=globalThis,t=e.AudioContext??e.webkitAudioContext;if(!t)throw new l("no-audio-context");let n=new t;try{return f({base_latency:s(()=>n.baseLatency),sample_rate:s(()=>n.sampleRate),state:s(()=>n.state)})}finally{s(()=>{n.close()})}}};var Me={id:d.hardware,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator;return f({hardware_concurrency:s(()=>e.hardwareConcurrency),device_memory:s(()=>e.deviceMemory)})}},ke={id:d.touch,tier:"fast",run(){let e=g();return f({max_touch_points:s(()=>navigator.maxTouchPoints),touch_event:s(()=>"ontouchstart"in e),touch_start:s(()=>(document.createEvent("TouchEvent"),!0)),pointer_coarse:s(()=>e.matchMedia?.("(pointer: coarse)").matches),any_hover:s(()=>e.matchMedia?.("(any-hover: hover)").matches),device_motion:s(()=>"DeviceMotionEvent"in e),device_orientation:s(()=>"DeviceOrientationEvent"in e)})}},Ae={id:d.sensors,tier:"deferred",timeoutMs:150,async run(e){let t=g(),n="DeviceMotionEvent"in t,r="DeviceOrientationEvent"in t;if(!n&&!r)return f({device_motion:!1,device_orientation:!1});if(typeof document<"u"&&document.visibilityState==="hidden")return f({device_motion:n,device_orientation:r});let o=await new Promise(i=>{let a=!1,c=p=>{a||(a=!0,t.removeEventListener("devicemotion",u),clearTimeout(m),i(p))},u=()=>c(!0),m=setTimeout(()=>c(!1),100);e.signal.addEventListener("abort",()=>c(!1),{once:!0}),t.addEventListener("devicemotion",u,{once:!0})});return f({device_motion:n,device_orientation:r,motion_observed:o})}},Ce={id:d.mediaDevices,tier:"fast",timeoutMs:120,async run(){if(typeof navigator>"u")throw new l("no-navigator");if(typeof navigator.mediaDevices?.enumerateDevices!="function")throw new l("no-media-devices");let e=await navigator.mediaDevices.enumerateDevices();return f({audio_input:e.filter(t=>t.kind==="audioinput").length,audio_output:e.filter(t=>t.kind==="audiooutput").length,video_input:e.filter(t=>t.kind==="videoinput").length,labels_hidden:e.length>0&&e.every(t=>t.label==="")})}},De={id:d.network,tier:"fast",run(){let e=navigator.connection;if(!e)throw new l("no-network-information");return f({effective_type:s(()=>e.effectiveType),downlink:s(()=>e.downlink),rtt:s(()=>e.rtt),save_data:s(()=>e.saveData)})}},Re={id:d.intl,tier:"fast",run(){if(typeof Intl>"u")throw new l("no-intl");let e=s(()=>new Intl.DateTimeFormat().resolvedOptions());return f({timezone:e?.timeZone,timezone_offset:s(()=>new Date().getTimezoneOffset()),locale:e?.locale,calendar:e?.calendar,numbering_system:e?.numberingSystem,formatted:s(()=>new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"full"}).format(new Date(0)))})}},Oe={id:d.timezone,tier:"fast",run(){if(typeof Intl>"u")throw new l("no-intl");return f({name:s(()=>new Intl.DateTimeFormat().resolvedOptions().timeZone),offset:s(()=>new Date().getTimezoneOffset())})}},Ne={id:d.battery,tier:"deferred",timeoutMs:250,async run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator.getBattery;if(typeof e!="function")throw new l("no-battery-api");let t=await e.call(navigator),n=r=>r===void 0?void 0:Number.isFinite(r)?r:null;return f({charging:t.charging,charging_time:n(t.chargingTime),discharging_time:n(t.dischargingTime),level:t.level})}},Pe={id:d.speech,tier:"deferred",timeoutMs:250,async run(e){if(typeof speechSynthesis>"u")throw new l("no-speech-synthesis");let t=speechSynthesis.getVoices();return t.length===0&&(t=await new Promise(n=>{let r=()=>{speechSynthesis.removeEventListener("voiceschanged",o),e.signal.removeEventListener("abort",i),n(speechSynthesis.getVoices())},o=()=>r(),i=()=>r();speechSynthesis.addEventListener("voiceschanged",o,{once:!0}),e.signal.addEventListener("abort",i,{once:!0}),setTimeout(r,Math.min(100,e.budgetRemainingMs()))})),{voices:t.map(n=>({name:n.name,language:n.lang,local_service:n.localService,default:n.default,uri:n.voiceURI}))}}};var Ie={id:d.screen,tier:"fast",run(){let e=g(),t=e.screen;return f({width:s(()=>t.width),height:s(()=>t.height),avail_width:s(()=>t.availWidth),avail_height:s(()=>t.availHeight),color_depth:s(()=>t.colorDepth),pixel_depth:s(()=>t.pixelDepth),device_pixel_ratio:s(()=>e.devicePixelRatio),orientation:s(()=>t.orientation?.type),inner_width:s(()=>e.innerWidth),inner_height:s(()=>e.innerHeight),frame:s(()=>[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null])})}},X;function Qt(e){let t=e.screen;return[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null]}var Le={id:d.screenFrame,tier:"fast",run(){let e=g(),t=Qt(e),n=e.document?.fullscreenElement!=null,r=t.every(o=>o===0||o===null);return!n&&!r&&(X=t),{frame:n&&X?[...X]:t}}};function Jt(e,t,n){if(typeof e.matchMedia=="function"){for(let r=0;r<=n;r++)if(e.matchMedia(`(${t}: ${r})`).matches)return r}}function K(e,t){if(typeof e.matchMedia=="function")return t.find(n=>e.matchMedia(n).matches)}var Be={id:d.mediaQueries,tier:"fast",run(){let e=g();if(typeof e.matchMedia!="function")throw new l("no-match-media");let t=K(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"]),n=K(e,["(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-contrast: no-preference)"]);return f({color_gamut:t?.match(/color-gamut:\s*(\w+)/)?.[1],inverted_colors:s(()=>e.matchMedia("(inverted-colors: inverted)").matches),forced_colors:s(()=>e.matchMedia("(forced-colors: active)").matches),monochrome:Jt(e,"monochrome",10),contrast:n?.match(/prefers-contrast:\s*([\w-]+)/)?.[1],reduced_motion:s(()=>e.matchMedia("(prefers-reduced-motion: reduce)").matches),reduced_transparency:s(()=>e.matchMedia("(prefers-reduced-transparency: reduce)").matches),hdr:s(()=>e.matchMedia("(dynamic-range: high)").matches)})}},Fe={id:d.colorGamut,tier:"fast",run(){let e=g();if(typeof e.matchMedia!="function")throw new l("no-match-media");let n=K(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"])?.match(/color-gamut:\s*(\w+)/)?.[1];return n==="srgb"||n==="p3"||n==="rec2020"?{gamut:n}:{}}};var Yt=16384,Zt=15,en=9;var tn=250,Ue=600;function nn(e){return new Promise((t,n)=>{let r=indexedDB.open(e,1);r.onupgradeneeded=()=>r.result.createObjectStore("s"),r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error??new Error("indexeddb-open-failed")),r.onblocked=()=>n(new Error("indexeddb-open-blocked"))})}function rn(e){try{let t=e.transaction("s","readwrite",{durability:"strict"}),n=t.durability==="strict";return t.abort(),n}catch{return!1}}function q(e,t,n){return new Promise((r,o)=>{let i=performance.now(),a=0,c=()=>{if(a===Zt){r(performance.now()-i);return}let u=e.transaction("s","readwrite",{durability:t});u.objectStore("s").put(n,a),a+=1,u.oncomplete=c,u.onerror=u.onabort=()=>o(u.error??new Error("indexeddb-write-failed"))};c()})}var We={id:d.storageDurability,tier:"deferred",timeoutMs:Ue+400,async run(e){if(g(),typeof indexedDB!="object"||indexedDB===null)throw new l("no-indexeddb");let t=e.completed(d.engine);if((t?.status==="ok"?t.value.observed:void 0)!=="chromium")throw new l("not-chromium");let r=`__fingerly_durability_${Math.random().toString(36).slice(2)}`,o=new Uint8Array(Yt),i;try{if(i=await nn(r),!rn(i))return{honored:!1};await q(i,"relaxed",o),await q(i,"strict",o);let a=performance.now(),c=a+Math.min(Ue,Math.max(0,e.budgetRemainingMs()-tn)),u=[];for(;u.length<en&&!e.signal.aborted;){if(u.length>0){let b=(performance.now()-a)/u.length;if(performance.now()+b>c)break}let m=await q(i,"relaxed",o),p=await q(i,"strict",o);if(m>0)u.push(p/m);else break}return u.length===0?{honored:!0,rounds:0}:(u.sort((m,p)=>m-p),f({ratio:u[u.length>>1],rounds:u.length,honored:!0}))}finally{try{i?.close(),indexedDB.deleteDatabase(r)}catch{}}}};var qe=[["easylist",".ad_300x250",".textads"],["easylist_germany",".werbung1",".werbeblock"],["easylist_italy",".pubbl",".banner_pubblicita"],["easylist_dutch",".advertentie-container",".reclame"],["easyprivacy",".trackingpixel","#tracking-pixel"],["fanboy_annoyances","#newsletter-signup-modal",".cookie-consent-banner"],["fanboy_social",".social-share-buttons",".facebook-like-box"],["adguard_base","#adsense_widget",".adsbygoogle-container"],["adguard_annoyances",".push-notification-prompt","#app-install-banner"],["listekr","#ad_wrapper_top",".ad_zone"],["liste_fr",".pub_300x250","#pubfooter"],["ro_list",".reclama-mare","#reclama"]],on=60;function an(){return new Promise(e=>{let t=!1,n=()=>{t||(t=!0,e())};setTimeout(n,on),typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>setTimeout(n,0))})}function Ve(e){if(e.offsetParent===null||e.offsetHeight===0||e.offsetWidth===0)return!0;let t=getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"}function Ge(e,t){let n=e.createElement("div");return t.startsWith("#")?n.id=t.slice(1):n.className=t.slice(1),n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.style.width="1px",n.style.height="1px",n}var He={id:d.domBlockers,tier:"deferred",timeoutMs:300,async run(){if(g(),typeof document>"u"||!document.body)throw new l("no-document-body");let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.style.width="1px",e.style.height="1px";let t=Ge(document,".fingerly-control-element");e.appendChild(t);let n=qe.map(([r,...o])=>({name:r,nodes:o.map(i=>{let a=Ge(document,i);return e.appendChild(a),a})}));document.body.appendChild(e);try{if(await an(),Ve(t))return{};let r=n.filter(({nodes:o})=>o.some(Ve)).map(({name:o})=>o);return f({blocked:r,probed:qe.length})}finally{e.remove()}}};function sn(){return s(()=>{try{(-1).toFixed(-1)}catch(e){return e instanceof Error?e.message.length:void 0}})}function cn(){return s(()=>eval.toString().length)}function un(){return s(()=>{let e=new Error("probe").stack;if(!(typeof e!="string"||e===""))return e.includes(" at ")?"v8":/^@|\n@|^\w*@/m.test(e)?e.includes("global code")?"javascriptcore":"spidermonkey":"unknown"})}function dn(e,t,n){let r=[];if(e===51?r.push("chromium"):e===43||e===44?r.push("webkit"):e===25&&r.push("gecko"),t===33&&r.push("chromium"),n==="v8"?r.push("chromium"):n==="javascriptcore"?r.push("webkit"):n==="spidermonkey"&&r.push("gecko"),r.length===0)return;let o=new Map;for(let c of r)o.set(c,(o.get(c)??0)+1);let i,a=0;for(let[c,u]of o)u>a&&(a=u,i=c);return i}function ln(e){if(e){if(/Firefox\//.test(e))return"gecko";if(/Edg\/|OPR\/|Chrome\/|Chromium\//.test(e))return"chromium";if(/Safari\//.test(e))return"webkit"}}var $e={id:d.engine,tier:"fast",run(){let e=sn(),t=cn(),n=un(),r=dn(e,t,n),o=ln(typeof navigator>"u"?void 0:navigator.userAgent);return f({to_fixed_error_length:e,eval_length:t,stack_style:n,observed:r,claimed:o})}},fn=[["acos",()=>Math.acos(.12312423423423424)],["acosh",()=>Math.acosh(1e308)],["asin",()=>Math.asin(.12312423423423424)],["asinh",()=>Math.asinh(1)],["atan",()=>Math.atan(.5)],["atanh",()=>Math.atanh(.5)],["cbrt",()=>Math.cbrt(100)],["cos",()=>Math.cos(10.000000000123)],["cosh",()=>Math.cosh(1)],["exp",()=>Math.exp(1)],["expm1",()=>Math.expm1(1)],["log",()=>Math.log(10)],["log1p",()=>Math.log1p(10)],["pow",()=>Math.pow(Math.PI,-100)],["sin",()=>Math.sin(1e300)],["sinh",()=>Math.sinh(1)],["sqrt",()=>Math.sqrt(2)],["tan",()=>Math.tan(-1e300)],["tanh",()=>Math.tanh(1)]];function mn(){return Object.is(Math.sin(0),0)&&Math.cos(0)===1&&Math.sqrt(4)===2&&Math.log(1)===0&&Math.pow(2,10)===1024}var je={id:d.math,tier:"fast",timeoutMs:50,run(){let e=[],t=0,n=new Map;for(let[r,o]of fn){let i=s(o);typeof i=="number"&&Number.isFinite(i)?(t+=1,n.set(r,i),e.push(`${r}:${i}`)):e.push(`${r}:`)}return f({hash:A(e.join("|")),probed:t,atanh_half:n.get("atanh"),expm1_1:n.get("expm1"),identities_hold:s(mn)})}};function L(e){return s(()=>{try{e()}catch(t){return t instanceof EvalError?void 0:t instanceof Error?t.message.length:void 0}})}function pn(){try{return new Function(""),!0}catch{return!1}}function gn(e){let t=[],n=e.own_properties;if(n!==void 0&&(n.includes("sourceURL")?t.push("webkit","webkit"):n.includes("lineNumber")?t.push("gecko","gecko"):n==="message,stack"&&t.push("chromium","chromium")),e.null_property_length===44?t.push("chromium"):e.null_property_length===33&&t.push("gecko"),e.syntax_length===20?t.push("chromium"):e.syntax_length===28&&t.push("gecko"),t.length===0)return;let r=new Map;for(let c of t)r.set(c,(r.get(c)??0)+1);let o,i=0,a=!1;for(let[c,u]of r)u>i?(i=u,o=c,a=!1):u===i&&(a=!0);return a?void 0:o}function hn(){return s(()=>{try{throw new Error("probe")}catch(e){return Object.getOwnPropertyNames(e).sort().join(",")}})}var Xe={id:d.errors,tier:"fast",timeoutMs:50,run(){let e=pn(),t=f({null_property_length:L(()=>null.x),syntax_length:e?L(()=>new Function("!")):void 0,json_parse_length:L(()=>JSON.parse("{")),invalid_array_length:L(()=>{let n=[];n.length=-1}),const_assign_length:e?L(()=>{new Function("const c = 1; c = 2")()}):void 0,own_properties:hn(),capture_stack_trace:s(()=>typeof Error.captureStackTrace=="function"),stack_trace_limit:s(()=>"stackTraceLimit"in Error)});return f({...t,observed:gn(t)})}};var Ke={id:d.navigator,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator;return f({user_agent:s(()=>e.userAgent),platform:s(()=>e.platform),vendor:s(()=>e.vendor),product_sub:s(()=>e.productSub),app_version:s(()=>e.appVersion),hardware_concurrency:s(()=>e.hardwareConcurrency),device_memory:s(()=>e.deviceMemory),max_touch_points:s(()=>e.maxTouchPoints),webdriver:s(()=>e.webdriver),cookie_enabled:s(()=>e.cookieEnabled),pdf_viewer_enabled:s(()=>e.pdfViewerEnabled),do_not_track:s(()=>e.doNotTrack),plugin_count:s(()=>e.plugins?.length),mime_type_count:s(()=>e.mimeTypes?.length),language:s(()=>e.language),languages:s(()=>e.languages?[...e.languages]:void 0)})}},ze={id:d.languages,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");return f({primary:s(()=>navigator.language),accepted:s(()=>navigator.languages?[...navigator.languages]:void 0)})}},Qe={id:d.vendor,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");return f({vendor:s(()=>navigator.vendor)})}},Je={id:d.plugins,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator.plugins;if(!e)throw new l("no-plugins");return{plugins:Array.from(e,t=>({name:t.name,filename:t.filename,description:t.description,mime_types:Array.from(t,n=>({type:n.type,suffixes:n.suffixes,description:n.description}))}))}}},Ye={id:d.userAgentData,tier:"deferred",timeoutMs:200,async run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator.userAgentData;if(!e)throw new l("no-user-agent-data");let t=f({brands:e.brands,mobile:e.mobile,platform:e.platform});if(typeof e.getHighEntropyValues!="function")return t;let n=await e.getHighEntropyValues(["architecture","bitness","model","platformVersion","fullVersionList","wow64"]);return{...t,...n}}};function z(e,t){let n=document.createElement("canvas");n.width=e,n.height=t;let r=n.getContext("2d");if(!r)throw new l("no-2d-context");return[n,r]}function Ze(){let[e,t]=z(240,60);t.globalCompositeOperation="multiply";for(let[n,r,o]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])t.fillStyle=n,t.beginPath(),t.arc(r,o,40,0,Math.PI*2,!0),t.closePath(),t.fill();return t.fillStyle="#f9c",t.arc(100,50,50,0,Math.PI*2,!0),t.arc(100,50,20,0,Math.PI*2,!0),t.fill("evenodd"),e.toDataURL()}function et(){let[e,t]=z(300,60);return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"',t.fillText("Fingerly <canvas> 1.0 \u{1F512}\u0416\u4E2D",2,15),t.font="18pt Arial",t.fillStyle="rgba(102, 204, 0, 0.7)",t.fillText("Fingerly <canvas> 1.0",4,45),e.toDataURL()}function yn(){let[,e]=z(1,1);return e.rect(0,0,10,10),e.rect(2,2,6,6),e.isPointInPath(5,5,"evenodd")===!1}function Sn(e){let t=e.completed(d.timing);if(t?.status!=="ok")return!1;let n=t.value?.now_resolution;return typeof n=="number"&&n>=16}var tt={id:d.canvas,tier:"deferred",timeoutMs:400,run(e){if(g(),typeof document>"u")throw new l("no-document");if(Sn(e))throw new w("rfp-canvas-prompt-avoided");try{let t=Ze(),n=Ze(),r=et(),o=et(),i=t!==n||r!==o;return f({geometry:A(t),text:A(r),winding:s(yn),unstable:i})}catch(t){ve(t)}}};function nt(){if(typeof document>"u")throw new l("no-document");let e=document.createElement("canvas"),t=e.getContext("webgl")??e.getContext("experimental-webgl");if(!t)throw new l("no-webgl-context");return t}var rt={id:d.webgl,tier:"fast",timeoutMs:400,run(){let e=nt(),t=s(()=>e.getExtension("WEBGL_debug_renderer_info")),n={};for(let o of["MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","MAX_VERTEX_ATTRIBS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_CUBE_MAP_TEXTURE_SIZE","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_UNIFORM_VECTORS","ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS"]){let i=e[o];if(typeof i!="number")continue;let a=s(()=>e.getParameter(i));a!=null&&(n[o]=ArrayBuffer.isView(a)?Array.from(a):a)}let r=[];for(let o of[e.VERTEX_SHADER,e.FRAGMENT_SHADER])for(let i of[e.LOW_FLOAT,e.MEDIUM_FLOAT,e.HIGH_FLOAT]){let a=s(()=>e.getShaderPrecisionFormat(o,i));a&&r.push(a.rangeMin,a.rangeMax,a.precision)}return f({vendor:s(()=>e.getParameter(e.VENDOR)),renderer:s(()=>e.getParameter(e.RENDERER)),unmasked_vendor:t?s(()=>e.getParameter(t.UNMASKED_VENDOR_WEBGL)):void 0,unmasked_renderer:t?s(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):void 0,version:s(()=>e.getParameter(e.VERSION)),shading_language_version:s(()=>e.getParameter(e.SHADING_LANGUAGE_VERSION)),max_texture_size:s(()=>e.getParameter(e.MAX_TEXTURE_SIZE)),max_render_buffer_size:s(()=>e.getParameter(e.MAX_RENDERBUFFER_SIZE)),parameters_hash:Object.keys(n).length>0?A(JSON.stringify(n)):void 0,shader_precision_hash:r.length>0?A(r.join(",")):void 0})}},ot={id:d.webglExtensions,tier:"deferred",timeoutMs:200,run(){let t=nt().getSupportedExtensions();if(!t)throw new w("extensions-withheld");return[...t].sort()}};function vn(e){let t=[],n=Date.now()+12;for(;t.length<25&&Date.now()<n;){let r=e(),o=e(),i=0;for(;o===r&&i++<1e5&&Date.now()<n;)o=e();o!==r&&t.push(o-r)}return t.length===0?100:Math.round(Math.min(...t)*1e6)/1e6}var at={id:d.timing,tier:"fast",timeoutMs:150,run(){let t=g().performance;return typeof t?.now!="function"?f({has_performance:!1}):f({has_performance:!0,now_resolution:vn(()=>t.now())})}},it=new WeakMap;function wn(e,t){let n=it.get(e.navigator);n||(n=new Map,it.set(e.navigator,n));let r=n.get(t);return r||(r=e.navigator.permissions.query({name:t}),n.set(t,r)),r}var st={id:d.permissions,tier:"fast",timeoutMs:200,async run(){let e=g();if(!e.navigator.permissions?.query)throw new l("no-permissions-api");let t=async o=>{try{return(await wn(e,o)).state}catch{return}},n=await t("notifications"),r=s(()=>e.Notification?.permission);return f({notification:n,notification_legacy:r,geolocation:await t("geolocation")})}},bn=["__nightmare","_phantom","callPhantom","__phantomas","Buffer","emit","spawn","__selenium_evaluate","__selenium_unwrapped","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_unwrapped","__fxdriver_evaluate","__fxdriver_unwrapped","__driver_evaluate","__driver_unwrapped","_Selenium_IDE_Recorder","domAutomation","domAutomationController","__lastWatirAlert","__playwright","__puppeteer","__pw_manual"],ct={id:d.automation,tier:"fast",run(){let e=g(),t=bn.filter(r=>s(()=>r in e)===!0),n=s(()=>Object.getOwnPropertyNames(e).filter(r=>/^cdc_|^\$cdc_/.test(r)));return f({webdriver:s(()=>navigator.webdriver),cdp_artifacts:n&&n.length>0?n:void 0,distinctive_properties:t.length>0?[...t]:void 0,chrome_object:s(()=>"chrome"in e),window_external:s(()=>{let r=e.external;return r?String(r):void 0})})}};var _n=50,ut=Symbol("timed-out");async function En(e){if(typeof e.brave?.isBrave=="function")try{let t=await Promise.race([e.brave.isBrave(),new Promise(n=>setTimeout(()=>n(ut),_n))]);return t===ut?void 0:t===!0}catch{return}}function xn(e){let t=e.userAgentData?.brands;if(Array.isArray(t))return t.some(n=>n?.brand==="Brave")}var dt=[[30,60,90],[210,180,140]],S=8;function Tn(){if(!(typeof document>"u"))try{let e=document.createElement("canvas");e.width=S,e.height=S;let t=e.getContext("2d",{willReadFrequently:!0});if(!t)return;for(let r=0;r<S;r++)for(let o=0;o<S;o++){let[i,a,c]=dt[(o+r)%2];t.fillStyle=`rgb(${i}, ${a}, ${c})`,t.fillRect(o,r,1,1)}let n=t.getImageData(0,0,S,S).data;for(let r=0;r<S*S;r++){let o=r%S,i=Math.floor(r/S),[a,c,u]=dt[(o+i)%2],m=r*4;if(n[m]!==a||n[m+1]!==c||n[m+2]!==u||n[m+3]!==255)return!0}return!1}catch{return}}var lt={id:d.shields,tier:"fast",timeoutMs:100,async run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator;return f({brave:await En(e),brave_claimed:xn(e),canvas_noise:Tn()})}};function ft(e){try{let t=window[e];if(!t)return!1;let n="__fingerly_probe__";return t.setItem(n,"1"),t.removeItem(n),!0}catch{return!1}}function Mn(){try{return typeof window.indexedDB=="object"&&window.indexedDB!==null}catch{return!1}}function kn(e){let t=e instanceof Error?e.name:"",n=e instanceof Error?e.message:String(e);return n.includes("unknown transient reason")?"transient":t==="SecurityError"||n.includes("Security error")?"refused":"failed"}var An=200;async function Cn(){let e=navigator.storage;if(typeof e?.getDirectory=="function")return Promise.race([e.getDirectory().then(()=>"ok",t=>kn(t)),new Promise(t=>setTimeout(t,An))])}var Dn=150;function Rn(){let e=navigator.webkitTemporaryStorage;return typeof e?.queryUsageAndQuota!="function"?Promise.resolve(void 0):new Promise(t=>{let n=!1,r=o=>{n||(n=!0,t(o))};setTimeout(()=>r(void 0),Dn);try{e.queryUsageAndQuota((o,i)=>r(typeof i=="number"?i:void 0),()=>r(void 0))}catch{r(void 0)}})}function On(){if(window.isSecureContext)return"serviceWorker"in navigator}var mt={id:d.storage,tier:"fast",timeoutMs:250,async run(){g();let e=s(async()=>{if(typeof navigator.storage?.estimate!="function")return;let u=await navigator.storage.estimate();return{quota:u.quota,usage:u.usage}}),t=Rn(),n=Cn(),[r,o,i]=await Promise.all([e,t,n]),a=r?.quota,c=navigator.deviceMemory;return f({local_storage:ft("localStorage"),session_storage:ft("sessionStorage"),indexed_db:Mn(),quota:a,usage:r?.usage,legacy_quota:o,quota_ratio:typeof a=="number"&&typeof c=="number"&&c>0?a/(c*1024*1024*1024):void 0,origin_filesystem:i,service_worker:On()})}},pt={id:d.storageQuota,tier:"fast",run(){if(g(),typeof document>"u")throw new l("no-document");return{partitioned:typeof document.hasStorageAccess=="function"}}};var gt=["monospace","sans-serif","serif"],Nn="72px",Pn="mmmmmmmmmmlli WwMmIi 0123",Q=["Arial","Arial Black","Calibri","Cambria","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic","Gabriola","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","MS Gothic","MV Boli","Nirmala UI","Palatino Linotype","Segoe UI","Segoe UI Emoji","Sylfaen","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","American Typewriter","Andale Mono","Apple Chancery","Arial Hebrew","Avenir","Avenir Next","Baskerville","Big Caslon","Bodoni 72","Chalkboard","Cochin","Copperplate","Didot","Futura","Geneva","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Lucida Grande","Luminari","Menlo","Monaco","Optima","Papyrus","Phosphate","Rockwell","SF Pro","Skia","Snell Roundhand","Trattatello","Zapfino","Cantarell","DejaVu Sans","DejaVu Serif","FreeSans","Liberation Sans","Liberation Serif","Nimbus Sans","Noto Sans","Ubuntu","Ubuntu Mono","Droid Sans","Roboto","Roboto Condensed","Bahnschrift","Bookshelf Symbol 7","Cascadia Code","Fira Code","HoloLens MDL2 Assets","Inter","JetBrains Mono","MT Extra","Source Code Pro","Wingdings 2","Wingdings 3"],ht={id:d.fonts,tier:"deferred",timeoutMs:700,run(){if(typeof document>"u")throw new l("no-document");let e=document.createElement("div");e.style.cssText="position:absolute;left:-9999px;top:-9999px;visibility:hidden;width:auto;height:auto;margin:0;padding:0;white-space:nowrap;";let t=o=>{let i=document.createElement("span");return i.style.cssText=`position:absolute;font-size:${Nn};margin:0;padding:0;font-family:${o};`,i.textContent=Pn,e.appendChild(i),i},n=gt.map(o=>t(o)),r=Q.map(o=>gt.map(i=>t(`'${o}',${i}`)));document.body.appendChild(e);try{let o=n.map(c=>c.offsetWidth),i=n.map(c=>c.offsetHeight),a=[];return Q.forEach((c,u)=>{let m=r[u];if(!m)return;m.every((b,y)=>{let _=o[y],E=i[y];return b.offsetWidth!==_||b.offsetHeight!==E})&&a.push(c)}),f({available:a,probed:Q.length})}finally{e.remove()}}},yt={id:d.fontPreferences,tier:"deferred",timeoutMs:250,run(){if(typeof document>"u"||!document.body)throw new l("no-document-body");let e=document.createElement("iframe");e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;border:0",document.body.appendChild(e);try{let t=e.contentDocument;if(!t?.body)throw new l("no-frame-document");let n="mmMwWLliI0O&1",r={default:"",serif:"serif",sans:"sans-serif",mono:"monospace",system:"system-ui",apple:"-apple-system",min:"Arial, sans-serif"},o={};for(let[i,a]of Object.entries(r)){let c=t.createElement("span");c.textContent=n,c.style.cssText=`font:72px ${a||"initial"};white-space:nowrap;position:absolute`,t.body.appendChild(c),o[i]=Math.round(c.getBoundingClientRect().width*1e3)/1e3}return{widths:o}}finally{e.remove()}}};var B=[$e,Xe,je,Ke,ze,Je,Qe,Ie,Le,Be,Fe,Me,ke,De,Re,Oe,mt,pt,lt,at,st,ct,rt,Ce,tt,ot,xe,Te,ht,yt,Ne,Pe,Ae,Ye,He,We];function St(e){return new Promise(t=>t(new P({...e,platform:"web",sources:e.sources??B,integrity:n=>I(n.sources)})))}return xt(In);})();
|
|
1
|
+
"use strict";var Fingerly=(()=>{var Ee=Object.defineProperty;var bn=Object.getOwnPropertyDescriptor;var Sn=Object.getOwnPropertyNames;var _n=Object.prototype.hasOwnProperty;var En=(e,t)=>{for(var n in t)Ee(e,n,{get:t[n],enumerable:!0})},xn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Sn(t))!_n.call(e,o)&&o!==n&&Ee(e,o,{get:()=>t[o],enumerable:!(r=bn(t,o))||r.enumerable});return e};var kn=e=>xn(Ee({},"__esModule",{value:!0}),e);var xo={};En(xo,{ConsentError:()=>ne,FingerlyClient:()=>re,SOURCE:()=>f,TransportError:()=>R,browserSources:()=>le,inspectIntegrity:()=>se,load:()=>wn});var at=e=>{throw TypeError(e)},st=(e,t,n)=>t.has(e)||at("Cannot "+n),O=(e,t,n)=>(st(e,t,"read from private field"),n?n.call(e):t.get(e)),Me=(e,t,n)=>t.has(e)?at("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),X=(e,t,n,r)=>(st(e,t,"write to private field"),t.set(e,n),n),Tn=["granted","pending","denied"];function je(e){if(!Tn.includes(e))throw new TypeError(`Fingerly consent must be 'granted', 'pending' or 'denied' (received ${JSON.stringify(e)})`)}var ne=class extends Error{constructor(e){super(`Fingerly needs consent before it can identify this visitor (consent is ${e})`),this.state=e,this.name="ConsentError",this.code="consent_required"}},g=class extends Error{constructor(e){super(e??"unsupported"),this.reason=e,this.name="UnsupportedSignal"}},C=class extends Error{constructor(e){super(e??"blocked"),this.reason=e,this.name="BlockedSignal"}},G=class extends Error{constructor(e){super(e??"timeout"),this.reason=e,this.name="TimedOutSignal"}};function Rn(e){if(e instanceof g||e instanceof C||e instanceof G)return e.reason;if(e instanceof Error&&typeof e.name=="string"&&e.name!=="Error")return e.name}var Mn=Object.prototype.hasOwnProperty;function An(e,t){if(e===null||typeof e!="object"&&typeof e!="function")return!1;try{return Mn.call(e,t)}catch{return!1}}function E(e,t){if(An(e,t))try{return e[t]}catch{return}}function H(e){let t=Object.create(null);if(e==null||typeof e!="object")return t;let n;try{n=Object.keys(e)}catch{return t}for(let r of n)if(r!=="__proto__")try{t[r]=e[r]}catch{}return t}var F=()=>Date.now(),ct=350,xe={budgetMs:ct,defaultSourceTimeoutMs:250,concurrency:6},Cn=["prerequisite","collect"];function pe(e){return Math.max(0,Math.round(e))}function Dn(e){return e instanceof g?"unsupported":e instanceof C?"blocked":e instanceof G?"timeout":"error"}function Nn(e){let t=E(e,"stage"),n=E(e,"timeoutMs");return{source:e,id:String(E(e,"id")),stage:t==="prerequisite"?"prerequisite":"collect",optIn:E(e,"optIn"),timeoutMs:typeof n=="number"&&Number.isFinite(n)?n:void 0}}function ke(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function On(e,t,n){return!(e.optIn==="extended-incognito"&&t!=="extended"||typeof n=="function"&&!n(e.source))}async function Ln(e,t,n,r,o,i){let s=F(),c=t-s;if(c<=0)return{status:"timeout",ms:0,reason:"budget-exhausted"};let{source:u}=e,d=Math.min(e.timeoutMs??n,c),m=new AbortController,p=()=>m.abort(new G("aborted"));r?.addEventListener("abort",p,{once:!0});let w=setTimeout(()=>m.abort(new G("source-timeout")),d),S={signal:m.signal,budgetRemainingMs:()=>Math.max(0,t-F()),completed:l=>o[l],shared:i};try{let l=await Promise.race([(async()=>u.run(S))(),new Promise((b,x)=>{m.signal.addEventListener("abort",()=>x(m.signal.reason??new G("source-timeout")),{once:!0})})]);return{status:"ok",ms:pe(F()-s),value:l}}catch(l){let b=Dn(l),x=Rn(l);return x===void 0?{status:b,ms:pe(F()-s)}:{status:b,ms:pe(F()-s),reason:x}}finally{clearTimeout(w),r?.removeEventListener("abort",p)}}async function Pn(e,t={}){let n=ke(E(t,"budgetMs"),xe.budgetMs),r=ke(E(t,"defaultSourceTimeoutMs"),xe.defaultSourceTimeoutMs),o=Math.max(1,ke(E(t,"concurrency"),xe.concurrency)),i=E(t,"stages"),s=Array.isArray(i)?i:Cn,c=E(t,"incognitoDetection"),u=E(t,"filter"),d=E(t,"signal"),m=F(),p=m+n,w={},S={...E(t,"completed")??{}},l=new Map,b=e.map(Nn),x=!1;for(let _ of s){let v=b.filter(D=>D.stage===_&&On(D,c,u));if(v.length===0)continue;let y={...S},k={},A=0,K=async()=>{for(;A<v.length;){let D=v[A++];if(!D)continue;if(F()>=p||d?.aborted){x=!0,k[D.id]={status:"timeout",ms:0,reason:"budget-exhausted"};continue}let z=await Ln(D,p,r,d,y,l);z.status==="timeout"&&(x=!0),k[D.id]=z}};await Promise.all(Array.from({length:Math.min(o,v.length)},K)),Object.assign(w,k),Object.assign(S,k)}return{outcomes:w,elapsedMs:pe(F()-m),truncated:x}}var In=1500,Wn=22,Un=8,Ve=256,Bn=2**31;function ut(e,t,n,r){let o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],i=new Int32Array(64);function s(l,b,x){for(let M=0;M<16;M++){let N=x+M*4;i[M]=b[N]<<24|b[N+1]<<16|b[N+2]<<8|b[N+3]}for(let M=16;M<64;M++){let N=i[M-15],U=i[M-2],qe=(N>>>7|N<<25)^(N>>>18|N<<14)^N>>>3,_e=(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10;i[M]=i[M-16]+qe+i[M-7]+_e|0}let _=l[0],v=l[1],y=l[2],k=l[3],A=l[4],K=l[5],D=l[6],z=l[7];for(let M=0;M<64;M++){let N=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7),U=z+N+(A&K^~A&D)+o[M]+i[M]|0,_e=((_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10))+(_&v^_&y^v&y)|0;z=D,D=K,K=A,A=k+U|0,k=y,y=v,v=_,_=U+_e|0}l[0]=l[0]+_|0,l[1]=l[1]+v|0,l[2]=l[2]+y|0,l[3]=l[3]+k|0,l[4]=l[4]+A|0,l[5]=l[5]+K|0,l[6]=l[6]+D|0,l[7]=l[7]+z|0}let c=new Uint8Array(e.length+1);for(let l=0;l<e.length;l++)c[l]=e.charCodeAt(l)&255;c[e.length]=58;let u=new Int32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),d=Math.floor(c.length/64);for(let l=0;l<d;l++)s(u,c,l*64);let m=c.subarray(d*64),p=new Uint8Array(128),w=new Int32Array(8),S=32-t;for(let l=n;l<r;l++){let b=String(l),x=m.length+b.length,_=x+9<=64?1:2;p.fill(0),p.set(m,0);for(let k=0;k<b.length;k++)p[m.length+k]=b.charCodeAt(k);p[x]=128;let v=(c.length+b.length)*8,y=_*64;if(p[y-5]=Math.floor(v/2**32)&255,p[y-4]=v>>>24&255,p[y-3]=v>>>16&255,p[y-2]=v>>>8&255,p[y-1]=v&255,w.set(u),s(w,p,0),_===2&&s(w,p,64),!(w[0]>>>S))return l}return-1}function Fn(){return`const powSearch = ${ut.toString()};
|
|
2
|
+
self.onmessage = (event) => {
|
|
3
|
+
const d = event.data;
|
|
4
|
+
self.postMessage(powSearch(d.ticket, d.bits, 0, d.limit));
|
|
5
|
+
};
|
|
6
|
+
`}function ee(){let e=globalThis.performance;return typeof e?.now=="function"?e.now():Date.now()}function Gn(){return new Promise(e=>setTimeout(e,0))}async function qn(e,t,n){let r=0;for(;ee()<n;){let o=Math.min(n,ee()+Un);for(;ee()<o;){let i=ut(e,t,r,r+Ve);if(i>=0)return String(i);r+=Ve}await Gn()}}function jn(e,t,n){let r=globalThis,o=r.Worker;return typeof o!="function"||typeof r.Blob!="function"||typeof r.URL?.createObjectURL!="function"?Promise.resolve(null):new Promise(i=>{let s,c,u,d=m=>{clearTimeout(u);try{c?.terminate()}catch{}s!==void 0&&r.URL?.revokeObjectURL?.(s),i(m)};try{s=r.URL.createObjectURL(new r.Blob([Fn()],{type:"text/javascript"})),c=new o(s),c.onmessage=m=>{let p=m.data;d(typeof p=="number"&&p>=0?String(p):void 0)},c.onerror=()=>d(null),u=setTimeout(()=>d(void 0),Math.max(0,n-ee())),c.postMessage({ticket:e,bits:t,limit:Bn})}catch{d(null)}})}async function Vn(e,t,n={}){if(!Number.isInteger(t)||t<1||t>Wn)return;let r=ee()+(n.budgetMs??In);try{if(n.worker!==!1){let o=await jn(e,t,r);if(o!==null)return o}return await qn(e,t,r)}catch{return}}var f={navigator:"navigator",userAgentData:"user_agent_data",languages:"languages",vendor:"vendor",engine:"engine",math:"math",errors:"errors",workerRealm:"worker_realm",screen:"screen",screenFrame:"screen_frame",colorGamut:"color_gamut",mediaQueries:"media_queries",canvas:"canvas",webgl:"webgl",webglExtensions:"webgl_extensions",audio:"audio",audioLatency:"audio_latency",fonts:"fonts",fontPreferences:"font_preferences",intl:"intl",timezone:"timezone",storage:"storage",storageQuota:"storage_quota",storageDurability:"storage_durability",hardware:"hardware",touch:"touch",mediaDevices:"media_devices",network:"network",timing:"timing",permissions:"permissions",automation:"automation",shields:"shields",embedding:"embedding"},Ae=new Set([f.engine,f.automation,f.math,f.errors,f.navigator,f.workerRealm,f.embedding]);function dt(e,t){let n=e.sources[t];return n?.status==="ok"?n.value:void 0}function Hn(e="v1"){if(!/^v[1-9]\d*$/.test(e)||e.trim()!==e)throw new TypeError('apiVersion must be a version such as "v1" or "v2"');return e}var $n="https://api.fingerly.io",He="x-api-key",lt="[redacted]",ft=Symbol.for("nodejs.util.inspect.custom"),$e="Idempotency-Key",he="request_in_progress",pt=1e3,Kn=2048;function mt(e){if(e===null||typeof e!="object")return;let t=e,n=E(t,"ticket"),r=E(t,"expires_at");if(typeof n!="string"||typeof r!="string"||n.length===0||n.length>Kn||!/^[A-Za-z0-9_-]+$/.test(n)||!Number.isFinite(Date.parse(r)))return;let o=E(t,"pow_bits"),i=typeof o=="number"&&Number.isInteger(o)&&o>=1&&o<=22;return{ticket:n,expires_at:r,...i?{pow_bits:o}:{}}}var R=class extends Error{constructor(e,t,n=!1,r,o){super(e),this.status=t,this.retryable=n,this.code=r,this.retryAfterMs=o,this.name="TransportError"}},Ke=4*1024*1024,me=2e3;function zn(e){let t=e.headers.get("retry-after")?.trim();if(!t)return;if(/^\d+$/.test(t))return Number(t)*1e3;let n=Date.parse(t);return Number.isFinite(n)?Math.max(0,n-Date.now()):void 0}async function ze(e){try{let t=await e.json(),n=E(E(t,"error"),"code");return typeof n=="string"&&n!==""?n:void 0}catch{return}}function Xn(e,t){return e===409&&t===he?!0:e===408||e===429||e>=500&&e<=599}function Xe(e,t){let n=zn(e),r=Xn(e.status,t),o=e.status===409&&t===he?Math.min(me,Math.max(0,n??pt)):n;return new R(`The server refused the submission (${e.status})`,e.status,r,t,o)}async function Ye(e){let t=()=>new R("The server answered with a response this SDK cannot read",e.status,!1);if(Number(e.headers.get("content-length"))>Ke)throw e.body?.cancel().catch(()=>{}),t();let n=await e.text();if(n.length>Ke)throw t();try{let r=JSON.parse(n);if(r===null||typeof r!="object"||Array.isArray(r))throw t();return H(r)}catch{throw t()}}function Yn(e,t){let n=Jn(t,Math.random);if(e.status===409&&e.code===he){let r=Math.min(me,Math.max(0,e.retryAfterMs??pt));return Math.min(me,r+n)}return e.retryAfterMs===void 0?n:e.retryAfterMs>me?null:e.retryAfterMs+n}function Qn(e){return e.status===404||e.status===405}function gt(e,t){return`${e}/api/${t}/ingest`}function Te(e){return gt($n,e)}function Zn(e,t){let n=e.trim().replace(/\/+$/,"");if(n===""||n.includes("?")||n.includes("#"))throw new TypeError("A Fingerly endpoint must be a non-empty URL or path without a query or fragment");if(!(n.startsWith("/")||/^https?:\/\//i.test(n)))throw new TypeError("A Fingerly endpoint must be an absolute URL or a root-relative browser path");return/^https?:\/\/[^/]+$/i.test(n)?gt(n,t):n}function Jn(e,t){let n=Math.min(2e3,100*2**(e-1));return Math.floor(t()*n)}function er(e,t){return new Promise(n=>{if(t?.aborted)return n();let r=()=>{clearTimeout(o),t?.removeEventListener("abort",r),n()},o=setTimeout(r,e);t?.addEventListener("abort",r,{once:!0})})}function tr(e){if(e.length<16||e.length>128)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<33||n>126)return!1}return!0}var nr="no_secure_random";function Qe(){let e=globalThis.crypto;if(typeof e?.randomUUID=="function"){let t=e.randomUUID();if(tr(t))return t}if(typeof e?.getRandomValues=="function"){let t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}throw new R("No secure random source (crypto.getRandomValues) is available for the Idempotency-Key",void 0,!1,nr)}var J,Ze=class{constructor(e){Me(this,J);let t=H(e);if(!t.apiKey)throw new R("An SDK key is required to submit a fingerprint");X(this,J,t.apiKey);let n=Hn(t.apiVersion),r=t.endpoints,o=r===void 0?[Te(n)]:Array.isArray(r)?[...r]:[r];if(o.length===0)throw new TypeError("The endpoints array must not be empty");let i=o.map(c=>Zn(c,n));r!==void 0&&t.fallbackToDefaultEndpoint&&(i.includes(Te(n))||i.push(Te(n))),this.urls=i,this.maxAttempts=Math.max(1,this.urls.length,t.maxAttempts??3),this.requestTimeoutMs=t.requestTimeoutMs??5e3;let s=t.fetchImpl??globalThis.fetch;if(typeof s!="function")throw new R("No fetch implementation is available; pass one as fetchImpl");this.fetchImpl=s.bind(globalThis)}toJSON(){return{apiKey:lt,urls:[...this.urls],maxAttempts:this.maxAttempts,requestTimeoutMs:this.requestTimeoutMs}}[ft](){return this.toJSON()}async submit(e,t){let n,r=JSON.stringify(e),o=Qe(),i=0;for(let s=1;s<=this.maxAttempts;s++){if(t?.aborted)throw new R("The submission was cancelled");try{return await this.attempt(this.urls[i],r,o,t)}catch(c){let u=c instanceof R?c:new R(c instanceof Error?c.message:"The submission could not be sent",void 0,!0),d=this.nextAttempt(u,s,i);if(d===null)throw u;n=u,u.status===409&&u.code===he||(i=Math.min(i+1,this.urls.length-1)),await er(d,t)}}throw n??new R("The submission could not be sent")}async ticket(e,t){let n=JSON.stringify(e),r;for(let o of this.urls){if(t?.aborted)throw new R("The ticket request was cancelled");try{return await this.ticketAttempt(o,n,t)}catch(i){r=i instanceof R?i:new R(i instanceof Error?i.message:"The ticket request could not be sent",void 0,!0)}}throw r??new R("The ticket request could not be sent")}async ticketAttempt(e,t,n){let r=new AbortController,o=()=>r.abort();n?.addEventListener("abort",o,{once:!0});let i=setTimeout(o,this.requestTimeoutMs);try{let s=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[He]:O(this,J),[$e]:Qe()},body:t,credentials:"omit",signal:r.signal});if(!s.ok)throw Xe(s,await ze(s));let c=mt(await Ye(s));if(!c)throw new R("The server answered the ticket request without a usable ticket");return c}finally{clearTimeout(i),n?.removeEventListener("abort",o)}}nextAttempt(e,t,n){return t===this.maxAttempts?null:e.retryable?Yn(e,t):Qn(e)&&n<this.urls.length-1?0:null}async attempt(e,t,n,r){let o=new AbortController,i=()=>o.abort();r?.addEventListener("abort",i,{once:!0});let s=setTimeout(i,this.requestTimeoutMs);try{let c=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[He]:O(this,J),[$e]:n},body:t,credentials:"omit",signal:o.signal});if(!c.ok)throw Xe(c,await ze(c));let u=await Ye(c);if(typeof u?.request_id!="string"||u.request_id==="")throw new R("The server accepted the submission but returned no request_id");return u}finally{clearTimeout(s),r?.removeEventListener("abort",i)}}};J=new WeakMap;var Je="0.3.0",rr=1;function or(e){return e instanceof R&&e.code==="consent_required"?new ne("pending"):e}function ir(e){return e==="low"||e==="medium"||e==="high"}function ar(e){let t=E(e,"embeddedSafe");return t===!0?!0:t===!1?!1:Ae.has(String(E(e,"id")))}function sr(e){let t=E(e,"budgetMs");return typeof t=="number"&&Number.isFinite(t)?t:ct}function cr(){return{patched_natives:[],lies:[{id:"integrity",kind:"unverified_realm",detail:"inspection-threw"}],engine:{}}}var et=!1;function ur(e){et||(et=!0,console.warn(`Fingerly: this page is running inside an app (${e}), so device-fingerprinting collectors were skipped. Use the Fingerly iOS or Android SDK in apps.`))}var dr={patched_natives:[],lies:[],engine:{}},lr=1e4,fr=250;function Re(e){return e.expiresAtMs-Date.now()>lr}function tt(e,t){let n=mt(e);if(!n)return;let r={ticket:n.ticket,expiresAtMs:Date.parse(n.expires_at),requested:t},o=n.pow_bits;return o!==void 0&&(r.pow=Promise.resolve().then(()=>Vn(n.ticket,o)).catch(()=>{})),r}function pr(e,t){return t.aborted?Promise.resolve(void 0):new Promise(n=>{let r=()=>n(void 0);t.addEventListener("abort",r,{once:!0}),e.then(o=>{t.removeEventListener("abort",r),n(o)})})}function mr(e,t){let n;return{promise:new Promise(o=>{n=setTimeout(()=>o(t),e)}),cancel:()=>clearTimeout(n)}}var P,B,re=class{constructor(e){Me(this,P),this.consentListeners=new Set,Me(this,B);let t=H(e),n=t.consent??"pending";je(n),this.consentState=n,X(this,P,t),this.platform=t.platform??"web",this.transport=t.transport??new Ze({...t.apiVersion===void 0?{}:{apiVersion:t.apiVersion},apiKey:t.apiKey,...t.endpoints===void 0?{}:{endpoints:t.endpoints},...t.fallbackToDefaultEndpoint===void 0?{}:{fallbackToDefaultEndpoint:t.fallbackToDefaultEndpoint}})}toJSON(){return{apiKey:lt,platform:this.platform,consent:this.consentState,transport:this.transport instanceof Ze?this.transport:"custom"}}[ft](){return this.toJSON()}get consent(){return this.consentState}setConsent(e){if(je(e),e!==this.consentState){this.consentState=e;for(let t of[...this.consentListeners])try{t(e)}catch(n){setTimeout(()=>{throw n},0)}}}onConsentChange(e){return this.consentListeners.add(e),()=>{this.consentListeners.delete(e)}}requireConsent(){if(this.consentState!=="granted")throw new ne(this.consentState)}consentScope(e){let t=new AbortController,n=()=>t.abort();e?.aborted?n():e?.addEventListener("abort",n,{once:!0});let r=this.onConsentChange(o=>{o!=="granted"&&n()});return{signal:t.signal,close:()=>{r(),e?.removeEventListener("abort",n)}}}async identify(e={}){this.requireConsent();let t=H(e),n=this.consentScope(t.signal);try{return await this.identifyWithConsent(t,n.signal)}finally{n.close()}}async identifyWithConsent(e,t){let n=e.incognitoDetection??O(this,P).incognitoDetection??"standard",r=this.ticketFor(t),o,i,s;try{s=await this.collectReport(n,t),this.requireConsent();let p=mr(fr,void 0);o=await Promise.race([r,p.promise]),p.cancel(),o?.pow&&(i=await pr(o.pow,t)),this.requireConsent()}finally{r.then(p=>{p!==void 0&&p!==o&&this.holdTicket(p)})}let c={v:3,sdk:{platform:this.platform,version:Je},consent:this.consentState,signals:s,...typeof e.tag=="string"&&e.tag!==""?{tag:e.tag}:{},...o===void 0?{}:{ticket:o.ticket},...o===void 0||i===void 0?{}:{ticket_pow:i}},u;try{u=await this.transport.submit(c,t)}catch(p){throw this.requireConsent(),or(p)}let d=H(u);if(this.platform==="web"){let p=tt(d.next_ticket,!1);p&&this.holdTicket(p)}let m=typeof d.visitor_id=="string"?d.visitor_id:"";return{requestId:typeof d.request_id=="string"?d.request_id:"",visitorId:m,visitorIsNew:m===""?!1:d.visitor_is_new===!0,visitorConfidence:m===""||typeof d.visitor_confidence!="number"||!Number.isFinite(d.visitor_confidence)?0:d.visitor_confidence,identifiable:d.identifiable===!0,duplicate:d.duplicate===!0,state:typeof d.state=="string"?d.state:"",suspectScore:typeof d.suspect_score=="number"&&Number.isFinite(d.suspect_score)?d.suspect_score:null,suspectLevel:ir(d.suspect_level)?d.suspect_level:null}}ticketFor(e){if(this.platform!=="web")return Promise.resolve(void 0);let t=O(this,B);if(X(this,B,void 0),t&&Re(t))return Promise.resolve(t);let n=this.transport;if(typeof n.ticket!="function")return Promise.resolve(void 0);try{return Promise.resolve(n.ticket({v:3,op:"ticket",sdk:{platform:"web",version:Je}},e)).then(r=>tt(r,!0),()=>{})}catch{return Promise.resolve(void 0)}}holdTicket(e){let t=O(this,B);if(!t||!Re(t)){X(this,B,e);return}if(Re(e)){if(e.requested!==t.requested){e.requested&&X(this,B,e);return}e.expiresAtMs>t.expiresAtMs&&X(this,B,e)}}async collect(e={}){this.requireConsent();let t=H(e),n=this.consentScope(t.signal);try{let r=t.incognitoDetection??O(this,P).incognitoDetection??"standard",o=await this.collectReport(r,n.signal);return this.requireConsent(),o}finally{n.close()}}async collectReport(e,t){let n=O(this,P).embedding?.();n&&ur(n);let r=O(this,P).sources??[],o=E(O(this,P).schedule,"filter"),i=n?p=>ar(p)&&(o?o(p):!0):o,s=n?"standard":e,c={...H(O(this,P).schedule),incognitoDetection:s,...i===void 0?{}:{filter:i},...t===void 0?{}:{signal:t}},u=await Pn(r,c),d={...u.outcomes};n&&(d[f.embedding]={status:"ok",ms:0,value:{kind:n}});let m;try{m=O(this,P).integrity?O(this,P).integrity({sources:d}):dr}catch{m=cr()}return{schema:rr,budget_ms:sr(c),elapsed_ms:u.elapsedMs,sources:d,integrity:m}}};P=new WeakMap;B=new WeakMap;var te=2654435761,ge=2246822519,nt=3266489917,gr=668265263,rt=374761393;function V(e,t){return e<<t|e>>>32-t}function fe(e,t){return Math.imul(V(e+Math.imul(t,ge)|0,13),te)}function Z(e,t){return((e[t]??0)|(e[t+1]??0)<<8|(e[t+2]??0)<<16|(e[t+3]??0)<<24)>>>0}function hr(e){if(typeof TextEncoder<"u")return new TextEncoder().encode(e);let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(r=(r-55296)*1024+(o-56320)+65536,n++)}r<128?t.push(r):r<2048?t.push(192|r>>6,128|r&63):r<65536?t.push(224|r>>12,128|r>>6&63,128|r&63):t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}return new Uint8Array(t)}function ot(e,t){let n=e.length,r=0,o;if(n>=16){let i=t+te+ge|0,s=t+ge|0,c=t|0,u=t-te|0,d=n-16;do i=fe(i,Z(e,r)),s=fe(s,Z(e,r+4)),c=fe(c,Z(e,r+8)),u=fe(u,Z(e,r+12)),r+=16;while(r<=d);o=V(i,1)+V(s,7)+V(c,12)+V(u,18)|0}else o=t+rt|0;for(o=o+n|0;r+4<=n;)o=Math.imul(V(o+Math.imul(Z(e,r),nt)|0,17),gr),r+=4;for(;r<n;)o=Math.imul(V(o+Math.imul(e[r]??0,rt)|0,11),te),r++;return o^=o>>>15,o=Math.imul(o,ge),o^=o>>>13,o=Math.imul(o,nt),o^=o>>>16,o>>>0}function it(e){return e.toString(16).padStart(8,"0")}function oe(e){let t=typeof e=="string"?hr(e):e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return it(ot(t,0))+it(ot(t,te))}var yr=["fban/","fbav/","fb_iab","instagram","musical_ly","bytedancewebview","snapchat","linkedinapp","line/","micromessenger","pinterest/","gsa/"];function vr(){let e=globalThis;return{...typeof e.navigator?.userAgent=="string"?{userAgent:e.navigator.userAgent}:{},...typeof e.location?.protocol=="string"?{protocol:e.location.protocol}:{},window:globalThis}}function wr(e){try{let t=e.Capacitor;if(t&&typeof t.isNativePlatform=="function"&&t.isNativePlatform()===!0)return"capacitor";if(e.cordova!==void 0||e._cordovaNative!==void 0)return"cordova";if(e.ReactNativeWebView!==void 0)return"react-native-webview";if(e.flutter_inappwebview!==void 0)return"flutter-webview"}catch{}}function br(e){let t=e.toLowerCase();if(t==="")return;if(t.includes("electron/"))return"electron";if(yr.some(r=>t.includes(r)))return;if(t.includes("android")&&t.includes("; wv)"))return"android-webview";if(["iphone","ipad","ipod","macintosh"].some(r=>t.includes(r))&&t.includes("applewebkit/")&&!t.includes("safari/"))return"apple-webview"}function I(e=vr()){let t=(e.protocol??"").toLowerCase();if(t!==""&&!["http:","https:","about:","blob:"].includes(t))return"app-scheme";let n=e.window?wr(e.window):void 0;return n||br(e.userAgent??"")}function h(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function a(e){try{return e()}catch{return}}function Ce(){return typeof window>"u"?void 0:window}function T(){let e=Ce();if(!e)throw new g("no-window");return e}function ht(e){throw e instanceof Error&&(e.name==="SecurityError"||e.name==="NotAllowedError"||e.name==="NotSupportedError")?new C(e.name):e}var Y=Function.prototype.toString,ie=Object.getOwnPropertyDescriptor,ae=Object.getPrototypeOf,j=Reflect.apply;function ve(e=Y){return t=>{try{let n=j(e,t,[]);return typeof n=="string"?{ok:!0,source:n}:{ok:!1}}catch{return{ok:!1}}}}function Sr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e,t,n,r=!1){let o=a(()=>e.name);if(typeof o=="string"&&o.startsWith("bound "))return!1;let i=Sr(n);return(r?new RegExp(`^\\s*function\\s+(?:get\\s+)?${i}\\s*\\(\\s*\\)\\s*\\{\\s*\\[native code\\]\\s*\\}\\s*$`):new RegExp(`^\\s*function\\s+${i}\\s*\\(\\s*\\)\\s*\\{\\s*\\[native code\\]\\s*\\}\\s*$`)).test(t)}function _r(e){return e instanceof TypeError?!0:typeof e=="object"&&e!==null&&e.name==="TypeError"}function Oe(e,t){for(let n of t){let r=!1;try{j(e,{},[...n])}catch(o){r=_r(o)}if(!r)return!1}return!0}function ye(e,t){if(e)return a(()=>ie(e,t)?.get)}function De(e,t){let n=e;for(let r=0;r<8&&n!==null&&n!==void 0;r++){let o=a(()=>ie(n,t));if(o)return o.get??("value"in o?o.value:void 0);n=a(()=>ae(n))}}var yt=[[7936],[37445],[37446]],Er=["acos","acosh","asin","asinh","atan","atanh","cbrt","cos","cosh","exp","expm1","log","log1p","pow","sin","sinh","sqrt","tan","tanh"];function q(e,t,n){return e[t]?.prototype?.[n]}var xr=[{path:"Document.prototype.createElement",expectedName:"createElement",brandArgsList:[["div"]],resolve:e=>q(e,"Document","createElement")},{path:"Node.prototype.appendChild",expectedName:"appendChild",brandArgsList:[[]],resolve:e=>q(e,"Node","appendChild")},{path:"HTMLIFrameElement.prototype.contentWindow",expectedName:"contentWindow",isGetter:!0,brandArgsList:[[]],resolve:e=>ye(e.HTMLIFrameElement?.prototype,"contentWindow")},{path:"window.navigator",expectedName:"navigator",isGetter:!0,resolve:e=>De(e,"navigator")},{path:"window.screen",expectedName:"screen",isGetter:!0,resolve:e=>De(e,"screen")},{path:"window.devicePixelRatio",expectedName:"devicePixelRatio",isGetter:!0,resolve:e=>De(e,"devicePixelRatio")},{path:"window.matchMedia",expectedName:"matchMedia",resolve:e=>e.matchMedia},{path:"Worker",expectedName:"Worker",resolve:e=>e.Worker},{path:"Blob",expectedName:"Blob",resolve:e=>e.Blob},{path:"URL.createObjectURL",expectedName:"createObjectURL",resolve:e=>e.URL?.createObjectURL},{path:"OffscreenCanvas",expectedName:"OffscreenCanvas",resolve:e=>e.OffscreenCanvas},...Er.map(e=>({path:`Math.${e}`,expectedName:e,resolve:()=>Math[e]})),{path:"Intl.DateTimeFormat.prototype.resolvedOptions",expectedName:"resolvedOptions",brandArgsList:[[]],resolve:()=>Intl?.DateTimeFormat?.prototype?.resolvedOptions},{path:"NavigatorUAData.prototype.getHighEntropyValues",expectedName:"getHighEntropyValues",resolve:e=>q(e,"NavigatorUAData","getHighEntropyValues")},{path:"StorageManager.prototype.getDirectory",expectedName:"getDirectory",resolve:e=>q(e,"StorageManager","getDirectory")},{path:"WebGLRenderingContext.prototype.getShaderPrecisionFormat",expectedName:"getShaderPrecisionFormat",brandArgsList:[[35633,36338]],resolve:e=>q(e,"WebGLRenderingContext","getShaderPrecisionFormat")},{path:"WebGLRenderingContext.prototype.getSupportedExtensions",expectedName:"getSupportedExtensions",brandArgsList:[[]],resolve:e=>q(e,"WebGLRenderingContext","getSupportedExtensions")},{path:"Function.prototype.toString",expectedName:"toString",resolve:()=>Function.prototype.toString},{path:"Function.prototype.bind",expectedName:"bind",resolve:()=>Function.prototype.bind},{path:"Object.getOwnPropertyDescriptor",expectedName:"getOwnPropertyDescriptor",resolve:()=>Object.getOwnPropertyDescriptor},{path:"Object.defineProperty",expectedName:"defineProperty",resolve:()=>Object.defineProperty},{path:"Date.prototype.getTimezoneOffset",expectedName:"getTimezoneOffset",resolve:()=>Date.prototype.getTimezoneOffset},{path:"Number.prototype.toFixed",expectedName:"toFixed",resolve:()=>Number.prototype.toFixed},{path:"Error.prototype.toString",expectedName:"toString",resolve:()=>Error.prototype.toString},{path:"Intl.DateTimeFormat",expectedName:"DateTimeFormat",resolve:()=>Intl?.DateTimeFormat},{path:"Navigator.prototype.javaEnabled",expectedName:"javaEnabled",resolve:e=>e.Navigator?.prototype?.javaEnabled},{path:"Permissions.prototype.query",expectedName:"query",resolve:e=>e.Permissions?.prototype?.query},{path:"MediaDevices.prototype.enumerateDevices",expectedName:"enumerateDevices",resolve:e=>e.MediaDevices?.prototype?.enumerateDevices},{path:"HTMLCanvasElement.prototype.getContext",expectedName:"getContext",brandArgsList:[["2d"]],resolve:e=>e.HTMLCanvasElement?.prototype?.getContext},{path:"HTMLCanvasElement.prototype.toDataURL",expectedName:"toDataURL",resolve:e=>e.HTMLCanvasElement?.prototype?.toDataURL},{path:"CanvasRenderingContext2D.prototype.getImageData",expectedName:"getImageData",resolve:e=>e.CanvasRenderingContext2D?.prototype?.getImageData},{path:"WebGLRenderingContext.prototype.getParameter",expectedName:"getParameter",brandArgsList:yt,resolve:e=>e.WebGLRenderingContext?.prototype?.getParameter},{path:"WebGLRenderingContext.prototype.getExtension",expectedName:"getExtension",brandArgsList:[["WEBGL_lose_context"]],resolve:e=>e.WebGLRenderingContext?.prototype?.getExtension},{path:"WebGL2RenderingContext.prototype.getParameter",expectedName:"getParameter",brandArgsList:yt,resolve:e=>e.WebGL2RenderingContext?.prototype?.getParameter},{path:"OfflineAudioContext.prototype.startRendering",expectedName:"startRendering",resolve:e=>e.OfflineAudioContext?.prototype?.startRendering},{path:"AudioBuffer.prototype.getChannelData",expectedName:"getChannelData",brandArgsList:[[0]],resolve:e=>e.AudioBuffer?.prototype?.getChannelData},{path:"StorageManager.prototype.estimate",expectedName:"estimate",resolve:e=>e.StorageManager?.prototype?.estimate},{path:"Element.prototype.getBoundingClientRect",expectedName:"getBoundingClientRect",resolve:e=>e.Element?.prototype?.getBoundingClientRect},{path:"HTMLElement.prototype.offsetWidth",expectedName:"offsetWidth",isGetter:!0,brandArgsList:[[]],resolve:e=>ye(e.HTMLElement?.prototype,"offsetWidth")},{path:"HTMLElement.prototype.offsetHeight",expectedName:"offsetHeight",isGetter:!0,brandArgsList:[[]],resolve:e=>ye(e.HTMLElement?.prototype,"offsetHeight")},{path:"Performance.prototype.now",expectedName:"now",resolve:e=>e.Performance?.prototype?.now},{path:"Screen.prototype.constructor",expectedName:"Screen",resolve:e=>e.Screen}];function L(e){return{stringify:ve(Y),clean:!1,...e===void 0?{}:{reason:e}}}function kr(){return"fingerly-realm-probe-7c1e"}function Ne(e,t,n=!1){if(typeof e!="function")return!1;let r=a(()=>j(Y,e,[]));return typeof r=="string"&&Q(e,r,t,n)}function Tr(e,t){let n=e(kr);if(!n.ok||!n.source.includes("fingerly-realm-probe-7c1e")||n.source.includes("[native code]"))return!1;let r=e(t);return r.ok&&Q(t,r.source,"toString",!1)}function Le(){try{return Rr()}catch{return L("inspection-threw")}}function Rr(){if(typeof document>"u")return L();let e=globalThis,t=document,n=a(()=>q(e,"Document","createElement")),r=a(()=>q(e,"Node","appendChild")),o=a(()=>e.HTMLIFrameElement?.prototype),i=ye(o,"contentWindow");if(typeof n!="function"||typeof r!="function"||typeof i!="function")return L();if(!Ne(n,"createElement")||!Ne(r,"appendChild")||!Ne(i,"contentWindow",!0))return L("borrow-primitive-not-native");let s=a(()=>t.body??t.documentElement);if(!s)return L();let c=a(()=>{let u=j(n,t,["iframe"]);return u.setAttribute("sandbox","allow-same-origin"),u.style.display="none",j(r,s,[u]),u});if(!c)return L();try{let u=a(()=>j(i,c,[]));if(!u)return L();if(u===globalThis)return L("realm-not-distinct");let d=a(()=>u.Function?.prototype?.toString);if(typeof d!="function")return L();if(d===Y)return L("realm-not-distinct");let m=ve(d);return Tr(m,d)?(a(()=>c.remove()),m(Y).ok?{stringify:m,clean:!0}:L()):L("stringifier-implausible")}finally{a(()=>c.remove())}}function $(e,t){e.includes(t)||e.push(t)}function vt(e,t=Le()){let n=[],r=[],{stringify:o,clean:i,reason:s}=t;i||r.push(s===void 0?{id:"realm",kind:"unverified_realm"}:{id:"realm",kind:"unverified_realm",detail:s});for(let u of xr){let{path:d,expectedName:m,isGetter:p=!1,brandArgsList:w,resolve:S}=u,l=a(()=>S(e));if(l==null){r.push({id:d,kind:"missing"});continue}if(typeof l!="function"){$(n,d),r.push({id:d,kind:"not-native"});continue}let b=o(l);b.ok?Q(l,b.source,m,p)||($(n,d),r.push({id:d,kind:"not-native"})):($(n,d),r.push({id:d,kind:"to-string-threw"})),w&&!Oe(l,w)&&($(n,d),r.push({id:d,kind:"brand"}))}let c=a(()=>Function.prototype.toString);if(c!==Y)$(n,"Function.prototype.toString"),r.some(u=>u.id==="Function.prototype.toString"&&u.kind!=="missing")||r.push({id:"Function.prototype.toString",kind:"not-native",detail:"replaced-after-init"});else if(i&&typeof c=="function"){let u=o(c);u.ok?Q(c,u.source,"toString",!1)||($(n,"Function.prototype.toString"),r.some(d=>d.id==="Function.prototype.toString"&&d.kind==="not-native")||r.push({id:"Function.prototype.toString",kind:"not-native",detail:"caught-via-fresh-realm"})):($(n,"Function.prototype.toString"),r.push({id:"Function.prototype.toString",kind:"to-string-threw",detail:"caught-via-fresh-realm"}))}return{patched:n,lies:r,clean:i,stringify:o}}var Mr=[["navigator","webdriver"],["navigator","userAgent"],["navigator","platform"],["navigator","plugins"],["navigator","mimeTypes"],["navigator","languages"],["navigator","language"],["navigator","hardwareConcurrency"],["navigator","deviceMemory"],["navigator","maxTouchPoints"],["navigator","vendor"],["navigator","appVersion"],["navigator","productSub"],["screen","width"],["screen","height"],["screen","availWidth"],["screen","availHeight"],["screen","colorDepth"],["screen","pixelDepth"],["screen","orientation"]],Ar=[[]];function Cr(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>Object.is(n,t[r])):!1}function Dr(e,t,n,r,o){let i;try{i=j(r,t,[])}catch{o.some(u=>u.id===e&&u.kind==="brand")||o.push({id:e,kind:"brand",detail:"receiver-rejected"});return}let s;try{s=t[n]}catch{o.push({id:`${e}.${n}`,kind:"contradiction",detail:"read-threw"});return}(i===null||typeof i!="object"||Array.isArray(i))&&(s===null||typeof s!="object"||Array.isArray(s))&&!Cr(i,s)&&o.push({id:`${e}.${n}`,kind:"contradiction",detail:"read-differs-from-getter"})}function wt(e,t=ve(),n={}){let r=n.readValues!==!1,o=[],i={navigator:a(()=>e.navigator),screen:a(()=>e.screen)};for(let[w,S]of Mr){let l=i[w];if(!l)continue;if(a(()=>ie(l,S))){o.push({id:`${w}.${S}`,kind:"descriptor",detail:"own-property-shadows-prototype"});continue}let x=a(()=>ae(l));if(!x)continue;let _=a(()=>ie(x,S));if(!_)continue;let v=`${w}.${S}.getter`;if("value"in _&&_.get===void 0){o.push({id:v,kind:"descriptor",detail:"data-property-replaces-getter"});continue}let y=_.get;if(typeof y!="function")continue;let k=t(y);k.ok?Q(y,k.source,S,!0)||o.push({id:v,kind:"descriptor",detail:"getter-is-not-native"}):o.push({id:v,kind:"to-string-threw"}),Oe(y,Ar)||o.push({id:v,kind:"brand",detail:"getter-accepted-invalid-receiver"}),r&&Dr(w,l,S,y,o)}let s=a(()=>e.Navigator),c=i.navigator?a(()=>ae(i.navigator)):void 0,u=a(()=>s?.prototype);s&&c!==void 0&&c!==u&&o.push({id:"navigator",kind:"prototype",detail:"not-Navigator.prototype"});let d=a(()=>e.Screen),m=i.screen?a(()=>ae(i.screen)):void 0,p=a(()=>d?.prototype);return d&&m!==void 0&&m!==p&&o.push({id:"screen",kind:"prototype",detail:"not-Screen.prototype"}),o}function se(e){let t=Ce(),n=dt({schema:1,budget_ms:0,elapsed_ms:0,sources:e,integrity:{patched_natives:[],lies:[],engine:{}}},f.engine),r={...n?.claimed===void 0?{}:{claimed:n.claimed},...n?.observed===void 0?{}:{observed:n.observed}};if(!t)return{patched_natives:[],lies:[],engine:r};let o=Le(),i=[],s=[];try{let c=vt(t,o);i=c.patched,s.push(...c.lies)}catch{s.push({id:"natives",kind:"unverified_realm",detail:"inspection-threw"})}try{s.push(...wt(t,o.stringify,{readValues:!I()}))}catch{s.push({id:"descriptors",kind:"unverified_realm",detail:"inspection-threw"})}return{patched_natives:i,lies:s,engine:r}}function Nr(){let e=globalThis,t=e.OfflineAudioContext??e.webkitOfflineAudioContext;if(!t)throw new g("no-offline-audio-context");return t}async function bt(e){let t=Nr(),n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;let o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);let s=(await new Promise((u,d)=>{e.signal.addEventListener("abort",()=>d(e.signal.reason),{once:!0}),n.oncomplete=m=>u(m.renderedBuffer);try{let m=n.startRendering();m&&typeof m.then=="function"&&m.then(u,d)}catch(m){d(m)}})).getChannelData(0),c=0;for(let u=4500;u<s.length;u++)c+=Math.abs(s[u]??0);return c}var St={id:f.audio,stage:"collect",timeoutMs:250,async run(e){let t=await bt(e);if(t===0)throw new C("audio-silent");let n=await bt(e);return h({value:t,unstable:t!==n,sample_rate:44100})}},_t={id:f.audioLatency,stage:"collect",timeoutMs:200,run(){let e=globalThis,t=e.AudioContext??e.webkitAudioContext;if(!t)throw new g("no-audio-context");let n=new t;try{return h({base_latency:a(()=>n.baseLatency),sample_rate:a(()=>n.sampleRate),state:a(()=>n.state)})}finally{a(()=>{n.close()})}}};var Et={id:f.hardware,stage:"collect",run(){if(typeof navigator>"u")throw new g("no-navigator");let e=navigator;return h({hardware_concurrency:a(()=>e.hardwareConcurrency),device_memory:a(()=>e.deviceMemory)})}},xt={id:f.touch,stage:"collect",run(){let e=T();return h({max_touch_points:a(()=>navigator.maxTouchPoints),touch_event:a(()=>"ontouchstart"in e),touch_start:a(()=>(document.createEvent("TouchEvent"),!0)),pointer_coarse:a(()=>e.matchMedia?.("(pointer: coarse)").matches),any_hover:a(()=>e.matchMedia?.("(any-hover: hover)").matches),device_motion:a(()=>"DeviceMotionEvent"in e),device_orientation:a(()=>"DeviceOrientationEvent"in e)})}},kt={id:f.mediaDevices,stage:"collect",timeoutMs:120,async run(){if(typeof navigator>"u")throw new g("no-navigator");if(typeof navigator.mediaDevices?.enumerateDevices!="function")throw new g("no-media-devices");let e=await navigator.mediaDevices.enumerateDevices();return h({audio_input:e.filter(t=>t.kind==="audioinput").length,audio_output:e.filter(t=>t.kind==="audiooutput").length,video_input:e.filter(t=>t.kind==="videoinput").length,labels_hidden:e.length>0&&e.every(t=>t.label==="")})}},Tt={id:f.network,stage:"collect",run(){let e=navigator.connection;if(!e)throw new g("no-network-information");return h({effective_type:a(()=>e.effectiveType),downlink:a(()=>e.downlink),rtt:a(()=>e.rtt),save_data:a(()=>e.saveData)})}},Rt={id:f.intl,stage:"collect",run(){if(typeof Intl>"u")throw new g("no-intl");let e=a(()=>new Intl.DateTimeFormat().resolvedOptions());return h({timezone:e?.timeZone,timezone_offset:a(()=>new Date().getTimezoneOffset()),locale:e?.locale,calendar:e?.calendar,numbering_system:e?.numberingSystem,formatted:a(()=>new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"full"}).format(new Date(0)))})}},Mt={id:f.timezone,stage:"collect",run(){if(typeof Intl>"u")throw new g("no-intl");return h({name:a(()=>new Intl.DateTimeFormat().resolvedOptions().timeZone),offset:a(()=>new Date().getTimezoneOffset())})}};var At={id:f.screen,stage:"collect",run(){let e=T(),t=e.screen;return h({width:a(()=>t.width),height:a(()=>t.height),avail_width:a(()=>t.availWidth),avail_height:a(()=>t.availHeight),color_depth:a(()=>t.colorDepth),pixel_depth:a(()=>t.pixelDepth),device_pixel_ratio:a(()=>e.devicePixelRatio),orientation:a(()=>t.orientation?.type),inner_width:a(()=>e.innerWidth),inner_height:a(()=>e.innerHeight),frame:a(()=>[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null])})}},Pe;function Or(e){let t=e.screen;return[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null]}var Ct={id:f.screenFrame,stage:"collect",run(){let e=T(),t=Or(e),n=e.document?.fullscreenElement!=null,r=t.every(o=>o===0||o===null);return!n&&!r&&(Pe=t),{frame:n&&Pe?[...Pe]:t}}};function Lr(e,t,n){if(typeof e.matchMedia=="function"){for(let r=0;r<=n;r++)if(e.matchMedia(`(${t}: ${r})`).matches)return r}}function Ie(e,t){if(typeof e.matchMedia=="function")return t.find(n=>e.matchMedia(n).matches)}var Dt={id:f.mediaQueries,stage:"collect",run(){let e=T();if(typeof e.matchMedia!="function")throw new g("no-match-media");let t=Ie(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"]),n=Ie(e,["(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-contrast: no-preference)"]);return h({color_gamut:t?.match(/color-gamut:\s*(\w+)/)?.[1],inverted_colors:a(()=>e.matchMedia("(inverted-colors: inverted)").matches),forced_colors:a(()=>e.matchMedia("(forced-colors: active)").matches),monochrome:Lr(e,"monochrome",10),contrast:n?.match(/prefers-contrast:\s*([\w-]+)/)?.[1],reduced_motion:a(()=>e.matchMedia("(prefers-reduced-motion: reduce)").matches),reduced_transparency:a(()=>e.matchMedia("(prefers-reduced-transparency: reduce)").matches),hdr:a(()=>e.matchMedia("(dynamic-range: high)").matches)})}},Nt={id:f.colorGamut,stage:"collect",run(){let e=T();if(typeof e.matchMedia!="function")throw new g("no-match-media");let n=Ie(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"])?.match(/color-gamut:\s*(\w+)/)?.[1];return n==="srgb"||n==="p3"||n==="rec2020"?{gamut:n}:{}}};var Pr=16384,Ir=4,Wr=3,Ur=60;function Br(e){return new Promise((t,n)=>{let r=indexedDB.open(e,1);r.onupgradeneeded=()=>r.result.createObjectStore("s"),r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error??new Error("indexeddb-open-failed")),r.onblocked=()=>n(new Error("indexeddb-open-blocked"))})}function Fr(e){try{let t=e.transaction("s","readwrite",{durability:"strict"}),n=t.durability==="strict";return t.abort(),n}catch{return!1}}function Ot(e,t,n){return new Promise((r,o)=>{let i=performance.now(),s=0,c=()=>{if(s===Ir){r(performance.now()-i);return}let u=e.transaction("s","readwrite",{durability:t});u.objectStore("s").put(n,s),s+=1,u.oncomplete=c,u.onerror=u.onabort=()=>o(u.error??new Error("indexeddb-write-failed"))};c()})}var Lt={id:f.storageDurability,stage:"collect",optIn:"extended-incognito",timeoutMs:80,async run(e){if(T(),typeof indexedDB!="object"||indexedDB===null)throw new g("no-indexeddb");let t=e.completed(f.engine);if((t?.status==="ok"?t.value.observed:void 0)!=="chromium")throw new g("not-chromium");let r=`__fingerly_durability_${Math.random().toString(36).slice(2)}`,o=new Uint8Array(Pr),i;try{let s=performance.now(),c=s+Math.min(Ur,Math.max(0,e.budgetRemainingMs()));if(i=await Br(r),!Fr(i))return{honored:!1};let u=[];for(;u.length<Wr&&!(e.signal.aborted||performance.now()>=c);){if(u.length>0){let p=(performance.now()-s)/u.length;if(performance.now()+p>c)break}let d=await Ot(i,"relaxed",o);if(e.signal.aborted||performance.now()>=c)break;let m=await Ot(i,"strict",o);if(d>0)u.push(m/d);else break}return u.length===0?{honored:!0,rounds:0}:(u.sort((d,m)=>d-m),h({ratio:u[u.length>>1],rounds:u.length,honored:!0}))}finally{try{i?.close(),indexedDB.deleteDatabase(r)}catch{}}}};function Pt(){return a(()=>{try{(-1).toFixed(-1)}catch(e){return e instanceof Error?e.message.length:void 0}})}function It(){return a(()=>eval.toString().length)}function Wt(){return a(()=>{let e=new Error("probe").stack;if(!(typeof e!="string"||e===""))return e.includes(" at ")?"v8":/^@|\n@|^\w*@/m.test(e)?e.includes("global code")?"javascriptcore":"spidermonkey":"unknown"})}function Ut(e,t,n){let r=[];if(e===51?r.push("chromium"):e===43||e===44?r.push("webkit"):e===25&&r.push("gecko"),t===33&&r.push("chromium"),n==="v8"?r.push("chromium"):n==="javascriptcore"?r.push("webkit"):n==="spidermonkey"&&r.push("gecko"),r.length===0)return;let o=new Map;for(let c of r)o.set(c,(o.get(c)??0)+1);let i,s=0;for(let[c,u]of o)u>s&&(s=u,i=c);return i}function Bt(e){if(e){if(/Firefox\//.test(e))return"gecko";if(/Edg\/|OPR\/|Chrome\/|Chromium\//.test(e))return"chromium";if(/Safari\//.test(e))return"webkit"}}function ue(e,t){return a(()=>typeof CSS<"u"&&typeof CSS.supports=="function"?CSS.supports(e,t):void 0)}function Gr(){return typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"}function we(e){let t=e?.completed?.(f.engine);if(t?.status==="ok"){let o=t.value;if(o?.observed==="gecko"||o?.claimed==="gecko"||o?.moz_appearance===!0&&ue("-fingerly-nonexistent","none")!==!0)return!0}if(Ut(Pt(),It(),Wt())==="gecko")return!0;let n=a(()=>typeof navigator>"u"?void 0:navigator.userAgent);if(Bt(n)==="gecko"||n&&/\bGecko\/\d/i.test(n)&&!/like Gecko|FxiOS/i.test(n)||ue("-moz-appearance","none")===!0&&ue("-fingerly-nonexistent","none")!==!0)return!0;let r=a(()=>typeof document>"u"?void 0:document.documentElement?.style);return!!(r&&"MozAppearance"in r&&!("FingerlyNonexistent"in r))}var Ft={id:f.engine,stage:"prerequisite",embeddedSafe:!0,run(){let e=Pt(),t=It(),n=Wt(),r=Ut(e,t,n),o=Bt(typeof navigator>"u"?void 0:navigator.userAgent);return h({to_fixed_error_length:e,eval_length:t,stack_style:n,observed:r,claimed:o,has_motion_permission_fn:a(Gr),moz_appearance:ue("-moz-appearance","none"),webkit_touch_callout:ue("-webkit-touch-callout","none")})}},qr=[["acos",()=>Math.acos(.12312423423423424)],["acosh",()=>Math.acosh(1e308)],["asin",()=>Math.asin(.12312423423423424)],["asinh",()=>Math.asinh(1)],["atan",()=>Math.atan(.5)],["atanh",()=>Math.atanh(.5)],["cbrt",()=>Math.cbrt(100)],["cos",()=>Math.cos(10.000000000123)],["cosh",()=>Math.cosh(1)],["exp",()=>Math.exp(1)],["expm1",()=>Math.expm1(1)],["log",()=>Math.log(10)],["log1p",()=>Math.log1p(10)],["pow",()=>Math.pow(Math.PI,-100)],["sin",()=>Math.sin(1e300)],["sinh",()=>Math.sinh(1)],["sqrt",()=>Math.sqrt(2)],["tan",()=>Math.tan(-1e300)],["tanh",()=>Math.tanh(1)]];function jr(){return Object.is(Math.sin(0),0)&&Math.cos(0)===1&&Math.sqrt(4)===2&&Math.log(1)===0&&Math.pow(2,10)===1024}var Gt={id:f.math,stage:"collect",embeddedSafe:!0,timeoutMs:50,run(){let e=0,t=new Map;for(let[n,r]of qr){let o=a(r);typeof o=="number"&&Number.isFinite(o)&&(e+=1,t.set(n,o))}return h({probed:e,atanh_half:t.get("atanh"),expm1_1:t.get("expm1"),identities_hold:a(jr)})}};function ce(e){return a(()=>{try{e()}catch(t){return t instanceof EvalError?void 0:t instanceof Error?t.message.length:void 0}})}function Vr(){return new RegExp("(")}function Hr(){return Object.defineProperty(Object.freeze({x:1}),"x",{value:2})}function $r(e){let t=[],n=e.own_properties;if(n!==void 0&&(n.includes("sourceURL")?t.push("webkit","webkit"):n.includes("lineNumber")?t.push("gecko","gecko"):n==="message,stack"&&t.push("chromium","chromium")),e.null_property_length===44?t.push("chromium"):e.null_property_length===33&&t.push("gecko"),e.regexp_syntax_length===51?t.push("chromium"):e.regexp_syntax_length===37&&t.push("webkit"),e.redefine_length===27?t.push("chromium"):e.redefine_length===50&&t.push("webkit"),t.length===0)return;let r=new Map;for(let c of t)r.set(c,(r.get(c)??0)+1);let o,i=0,s=!1;for(let[c,u]of r)u>i?(i=u,o=c,s=!1):u===i&&(s=!0);return s?void 0:o}function Kr(){return a(()=>{try{throw new Error("probe")}catch(e){return Object.getOwnPropertyNames(e).sort().join(",")}})}var qt={id:f.errors,stage:"collect",embeddedSafe:!0,timeoutMs:50,run(){let e=h({null_property_length:ce(()=>null.x),json_parse_length:ce(()=>JSON.parse("{")),invalid_array_length:ce(()=>{let t=[];t.length=-1}),regexp_syntax_length:ce(Vr),redefine_length:ce(Hr),own_properties:Kr(),capture_stack_trace:a(()=>typeof Error.captureStackTrace=="function"),stack_trace_limit:a(()=>"stackTraceLimit"in Error)});return h({...e,observed:$r(e)})}};var jt={id:f.navigator,stage:"collect",embeddedSafe:!0,run(){if(typeof navigator>"u")throw new g("no-navigator");let e=navigator;return I()?h({user_agent:a(()=>e.userAgent),platform:a(()=>e.platform),webdriver:a(()=>e.webdriver)}):h({user_agent:a(()=>e.userAgent),platform:a(()=>e.platform),vendor:a(()=>e.vendor),product_sub:a(()=>e.productSub),app_version:a(()=>e.appVersion),hardware_concurrency:a(()=>e.hardwareConcurrency),device_memory:a(()=>e.deviceMemory),max_touch_points:a(()=>e.maxTouchPoints),webdriver:a(()=>e.webdriver),cookie_enabled:a(()=>e.cookieEnabled),pdf_viewer_enabled:a(()=>e.pdfViewerEnabled),do_not_track:a(()=>e.doNotTrack),plugin_count:a(()=>e.plugins?.length),mime_type_count:a(()=>e.mimeTypes?.length),language:a(()=>e.language),languages:a(()=>e.languages?[...e.languages]:void 0)})}},Vt={id:f.languages,stage:"collect",run(){if(typeof navigator>"u")throw new g("no-navigator");return h({primary:a(()=>navigator.language),accepted:a(()=>navigator.languages?[...navigator.languages]:void 0)})}},Ht={id:f.vendor,stage:"collect",run(){if(typeof navigator>"u")throw new g("no-navigator");return h({vendor:a(()=>navigator.vendor)})}},$t={id:f.userAgentData,stage:"collect",timeoutMs:150,async run(){if(typeof navigator>"u")throw new g("no-navigator");let e=navigator.userAgentData;if(!e)throw new g("no-user-agent-data");let t=h({brands:e.brands,mobile:e.mobile,platform:e.platform});if(typeof e.getHighEntropyValues!="function")return t;let n=await e.getHighEntropyValues(["architecture"]),r=a(()=>n.architecture);return typeof r=="string"?{...t,architecture:r}:t}};var de="rfpCanvasBlocked",zr=2.8,Xr=25e4,Kt=16.67;function We(e){return Math.round(e*1e6)/1e6}function Yt(e){let t=Date.now()+zr,n=e(),r=e(),o=0;for(;r===n&&o++<Xr&&Date.now()<t;)r=e();let i=r-n;return i===0?{resolution:Kt,rfpBlocked:!0}:i>=1.5||!(i>0&&i<=1.2)?{resolution:i>0?We(i):Kt,rfpBlocked:!0}:{resolution:We(i),rfpBlocked:!1}}function Yr(e){let t=e(),n=e();return n>t?We(n-t):0}function be(e){let t=e?.shared?.get(de);if(typeof t=="boolean")return t;let n=e?.completed?.(f.timing);if(n?.status==="ok"){let r=n.value;if(r?.rfp_canvas_blocked===!0||typeof r?.now_resolution=="number"&&r.now_resolution>=1.5)return!0;if(typeof r?.rfp_canvas_blocked=="boolean")return r.rfp_canvas_blocked;if(typeof r?.now_resolution=="number")return!1}if(we(e)){let r=typeof window>"u"?void 0:window;if(typeof r?.performance?.now!="function")return!0;let o=Yt(()=>r.performance.now());return e?.shared?.set(de,o.rfpBlocked),o.rfpBlocked}return!1}var Qt={id:f.timing,stage:"prerequisite",timeoutMs:50,run(e){let n=T().performance;if(typeof n?.now!="function"){let o=we(e);return e?.shared?.set(de,o),h({has_performance:!1,rfp_canvas_blocked:o})}if(!we(e))return e?.shared?.set(de,!1),h({has_performance:!0,now_resolution:Yr(()=>n.now()),rfp_canvas_blocked:!1});let r=Yt(()=>n.now());return e?.shared?.set(de,r.rfpBlocked),h({has_performance:!0,now_resolution:r.resolution,rfp_canvas_blocked:r.rfpBlocked})}},zt=new WeakMap;function Qr(e,t){let n=zt.get(e.navigator);n||(n=new Map,zt.set(e.navigator,n));let r=n.get(t);return r||(r=e.navigator.permissions.query({name:t}),n.set(t,r)),r}var Zt={id:f.permissions,stage:"collect",timeoutMs:150,async run(){let e=T();if(!e.navigator.permissions?.query)throw new g("no-permissions-api");let t=async o=>{try{return(await Qr(e,o)).state}catch{return}},n=await t("notifications"),r=a(()=>e.Notification?.permission);return h({notification:n,notification_legacy:r,geolocation:await t("geolocation")})}},Zr=["__nightmare","_phantom","callPhantom","__phantomas","Buffer","emit","spawn","__selenium_evaluate","__selenium_unwrapped","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_unwrapped","__fxdriver_evaluate","__fxdriver_unwrapped","__driver_evaluate","__driver_unwrapped","_Selenium_IDE_Recorder","domAutomation","domAutomationController","__lastWatirAlert","__playwright","__playwright__binding__","__pwInitScripts","__puppeteer","__pw_manual"],Xt=/^cdc_|^\$cdc_/;function Jr(e){let t=new Set,n=a(()=>Object.getOwnPropertyNames(e));if(n)for(let o of n)Xt.test(o)&&t.add(o);let r=a(()=>e.document);if(r){let o=a(()=>Object.getOwnPropertyNames(r));if(o)for(let i of o)Xt.test(i)&&t.add(i)}return[...t]}var Jt={id:f.automation,stage:"collect",embeddedSafe:!0,run(){let e=T(),t=Zr.filter(r=>a(()=>r in e||e.document!=null&&r in e.document)===!0),n=Jr(e);return h({webdriver:a(()=>navigator.webdriver),cdp_artifacts:n.length>0?n:void 0,distinctive_properties:t.length>0?[...t]:void 0,window_external:a(()=>{let r=e.external;return r?String(r):void 0})})}};var en="canvas2d";function Ue(e,t,n){if(typeof document>"u")return;let r=e?.shared,o=r?.get(en);if(o)return o.canvas.width=t,o.canvas.height=n,[o.canvas,o.context];let i=document.createElement("canvas");i.width=t,i.height=n;let s=i.getContext("2d",{willReadFrequently:!0})??i.getContext("2d");if(s)return r?.set(en,{canvas:i,context:s}),[i,s]}function Be(e,t,n){let r=Ue(e,t,n);if(!r)throw new g("no-2d-context");return r}function tn(e){let[,r]=Be(e,240,60);r.globalCompositeOperation="multiply";for(let[o,i,s]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])r.fillStyle=o,r.beginPath(),r.arc(i,s,40,0,Math.PI*2,!0),r.closePath(),r.fill();return r.fillStyle="#f9c",r.arc(100,50,50,0,Math.PI*2,!0),r.arc(100,50,20,0,Math.PI*2,!0),r.fill("evenodd"),oe(r.getImageData(0,0,240,60).data)}function nn(e){let[,r]=Be(e,300,60);return r.textBaseline="alphabetic",r.fillStyle="#f60",r.fillRect(100,1,62,20),r.fillStyle="#069",r.font='11pt "Times New Roman"',r.fillText("Fingerly <canvas> 1.0 \u{1F512}\u0416\u4E2D",2,15),r.font="18pt Arial",r.fillStyle="rgba(102, 204, 0, 0.7)",r.fillText("Fingerly <canvas> 1.0",4,45),oe(r.getImageData(0,0,300,60).data)}function eo(e){let[,t]=Be(e,1,1);return t.rect(0,0,10,10),t.rect(2,2,6,6),t.isPointInPath(5,5,"evenodd")===!1}var rn={id:f.canvas,stage:"collect",timeoutMs:250,run(e){if(T(),typeof document>"u")throw new g("no-document");if(be(e))throw new C("rfp-canvas-prompt-avoided");try{let t=tn(e),n=tn(e),r=nn(e),o=nn(e),i=t!==n||r!==o;return h({geometry:t,text:r,winding:a(()=>eo(e)),unstable:i})}catch(t){ht(t)}}};function on(){if(typeof document>"u")throw new g("no-document");let e=document.createElement("canvas"),t=e.getContext("webgl")??e.getContext("experimental-webgl");if(!t)throw new g("no-webgl-context");return t}var an={id:f.webgl,stage:"collect",timeoutMs:250,run(){let e=on();try{let t=a(()=>e.getExtension("WEBGL_debug_renderer_info")),n={};for(let o of["MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","MAX_VERTEX_ATTRIBS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_CUBE_MAP_TEXTURE_SIZE","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_UNIFORM_VECTORS","ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS"]){let i=e[o];if(typeof i!="number")continue;let s=a(()=>e.getParameter(i));s!=null&&(n[o]=ArrayBuffer.isView(s)?Array.from(s):s)}let r=[];for(let o of[e.VERTEX_SHADER,e.FRAGMENT_SHADER])for(let i of[e.LOW_FLOAT,e.MEDIUM_FLOAT,e.HIGH_FLOAT]){let s=a(()=>e.getShaderPrecisionFormat(o,i));s&&r.push(s.rangeMin,s.rangeMax,s.precision)}return h({vendor:a(()=>e.getParameter(e.VENDOR)),renderer:a(()=>e.getParameter(e.RENDERER)),unmasked_vendor:t?a(()=>e.getParameter(t.UNMASKED_VENDOR_WEBGL)):void 0,unmasked_renderer:t?a(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):void 0,version:a(()=>e.getParameter(e.VERSION)),shading_language_version:a(()=>e.getParameter(e.SHADING_LANGUAGE_VERSION)),max_texture_size:a(()=>e.getParameter(e.MAX_TEXTURE_SIZE)),max_render_buffer_size:a(()=>e.getParameter(e.MAX_RENDERBUFFER_SIZE)),parameters_hash:Object.keys(n).length>0?oe(JSON.stringify(n)):void 0,shader_precision_hash:r.length>0?oe(r.join(",")):void 0})}finally{a(()=>e.getExtension("WEBGL_lose_context")?.loseContext())}}},sn={id:f.webglExtensions,stage:"collect",timeoutMs:200,run(){let e=on();try{let t=e.getSupportedExtensions();if(!t)throw new C("extensions-withheld");return[...t].sort()}finally{a(()=>e.getExtension("WEBGL_lose_context")?.loseContext())}}};var to=50,cn=Symbol("timed-out");async function no(e){let t=a(()=>e.brave);if(t==null)return"absent";let n=a(()=>t.isBrave);if(typeof n!="function")return"not-function";try{let r=await Promise.race([n.call(t),new Promise(o=>setTimeout(()=>o(cn),to))]);return r===cn?"timeout":r===!0?"true":"false"}catch{return"threw"}}function ro(e){let t=a(()=>e.userAgentData?.brands);if(Array.isArray(t))return t.map(n=>a(()=>n?.brand)).filter(n=>typeof n=="string")}var un=[[30,60,90],[210,180,140]],W=8;function oo(e){if(!(typeof document>"u"))try{let t=Ue(e,W,W);if(!t)return;let[,n]=t;for(let c=0;c<W;c++)for(let u=0;u<W;u++){let[d,m,p]=un[(u+c)%2];n.fillStyle=`rgb(${d}, ${m}, ${p})`,n.fillRect(u,c,1,1)}let r=n.getImageData(0,0,W,W).data,o=0,i=0,s=W*W;for(let c=0;c<s;c++){let u=c%W,d=Math.floor(c/W),[m,p,w]=un[(u+d)%2],S=c*4,l=[Math.abs((r[S]??0)-m),Math.abs((r[S+1]??0)-p),Math.abs((r[S+2]??0)-w),Math.abs((r[S+3]??0)-255)],b=Math.max(...l);b>0&&(o+=1),b>i&&(i=b)}return{pixels:s,mismatched:o,maxDelta:i}}catch{return}}var dn={id:f.shields,stage:"collect",timeoutMs:100,async run(e){if(be(e))throw new C("rfp-canvas-prompt-avoided");if(typeof navigator>"u")throw new g("no-navigator");let t=navigator,n=await no(t),r=ro(t),o=oo(e);return h({brave:n==="true"?!0:n==="false"?!1:void 0,brave_claimed:r===void 0?void 0:r.includes("Brave"),canvas_noise:o===void 0?void 0:o.mismatched>0,brave_api:n,brands:r,canary_pixels:o?.pixels,canary_mismatched:o?.mismatched,canary_max_delta:o?.maxDelta})}};function ln(e){try{let t=window[e];if(!t)return!1;let n="__fingerly_probe__";return t.setItem(n,"1"),t.removeItem(n),!0}catch{return!1}}function io(){try{return typeof window.indexedDB=="object"&&window.indexedDB!==null}catch{return!1}}function ao(e){let t=e instanceof Error?e.name:"",n=e instanceof Error?e.message:String(e);return n.includes("unknown transient reason")?"transient":t==="SecurityError"||n.includes("Security error")?"refused":"failed"}var so=200;async function co(){let e=navigator.storage;if(typeof e?.getDirectory=="function")return Promise.race([e.getDirectory().then(()=>"ok",t=>ao(t)),new Promise(t=>setTimeout(t,so))])}var uo=150;function lo(){let e=navigator.webkitTemporaryStorage;return typeof e?.queryUsageAndQuota!="function"?Promise.resolve(void 0):new Promise(t=>{let n=!1,r=o=>{n||(n=!0,t(o))};setTimeout(()=>r(void 0),uo);try{e.queryUsageAndQuota((o,i)=>r(typeof i=="number"?i:void 0),()=>r(void 0))}catch{r(void 0)}})}function fo(){if(window.isSecureContext)return"serviceWorker"in navigator}var fn={id:f.storage,stage:"collect",timeoutMs:250,async run(){T();let e=a(async()=>{if(typeof navigator.storage?.estimate!="function")return;let u=await navigator.storage.estimate();return{quota:u.quota,usage:u.usage}}),t=lo(),n=co(),[r,o,i]=await Promise.all([e,t,n]),s=r?.quota,c=navigator.deviceMemory;return h({local_storage:ln("localStorage"),session_storage:ln("sessionStorage"),indexed_db:io(),quota:s,usage:r?.usage,legacy_quota:o,quota_ratio:typeof s=="number"&&typeof c=="number"&&c>0?s/(c*1024*1024*1024):void 0,origin_filesystem:i,service_worker:fo()})}},pn={id:f.storageQuota,stage:"collect",run(){if(T(),typeof document>"u")throw new g("no-document");return{partitioned:typeof document.hasStorageAccess=="function"}}};var mn=["monospace","sans-serif","serif"],po="72px",mo="mmmmmmmmmmlli WwMmIi 0123",Fe=["Arial","Arial Black","Calibri","Cambria","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic","Gabriola","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","MS Gothic","MV Boli","Nirmala UI","Palatino Linotype","Segoe UI","Segoe UI Emoji","Sylfaen","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","American Typewriter","Andale Mono","Apple Chancery","Arial Hebrew","Avenir","Avenir Next","Baskerville","Big Caslon","Bodoni 72","Chalkboard","Cochin","Copperplate","Didot","Futura","Geneva","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Lucida Grande","Luminari","Menlo","Monaco","Optima","Papyrus","Phosphate","Rockwell","SF Pro","Skia","Snell Roundhand","Trattatello","Zapfino","Cantarell","DejaVu Sans","DejaVu Serif","FreeSans","Liberation Sans","Liberation Serif","Nimbus Sans","Noto Sans","Ubuntu","Ubuntu Mono","Droid Sans","Roboto","Roboto Condensed","Bahnschrift","Bookshelf Symbol 7","Cascadia Code","Fira Code","HoloLens MDL2 Assets","Inter","JetBrains Mono","MT Extra","Source Code Pro","Wingdings 2","Wingdings 3"],gn={id:f.fonts,stage:"collect",timeoutMs:250,run(){if(typeof document>"u")throw new g("no-document");let e=document.createElement("div");e.style.cssText="position:absolute;left:-9999px;top:-9999px;visibility:hidden;width:auto;height:auto;margin:0;padding:0;white-space:nowrap;";let t=o=>{let i=document.createElement("span");return i.style.cssText=`position:absolute;font-size:${po};margin:0;padding:0;font-family:${o};`,i.textContent=mo,e.appendChild(i),i},n=mn.map(o=>t(o)),r=Fe.map(o=>mn.map(i=>t(`'${o}',${i}`)));document.body.appendChild(e);try{let o=n.map(c=>c.offsetWidth),i=n.map(c=>c.offsetHeight),s=[];return Fe.forEach((c,u)=>{let d=r[u];if(!d)return;d.every((p,w)=>{let S=o[w],l=i[w];return p.offsetWidth!==S||p.offsetHeight!==l})&&s.push(c)}),h({available:s,probed:Fe.length})}finally{e.remove()}}},hn={id:f.fontPreferences,stage:"collect",timeoutMs:250,run(){if(typeof document>"u"||!document.body)throw new g("no-document-body");let e=document.createElement("iframe");e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;border:0",document.body.appendChild(e);try{let t=e.contentDocument;if(!t?.body)throw new g("no-frame-document");let n="mmMwWLliI0O&1",r={default:"",serif:"serif",sans:"sans-serif",mono:"monospace",system:"system-ui",apple:"-apple-system",min:"Arial, sans-serif"},o={};for(let[i,s]of Object.entries(r)){let c=t.createElement("span");c.textContent=n,c.style.cssText=`font:72px ${s||"initial"};white-space:nowrap;position:absolute`,t.body.appendChild(c),o[i]=Math.round(c.getBoundingClientRect().width*1e3)/1e3}return{widths:o}}finally{e.remove()}}};var Se=330,go=60,yn=15;function ho(e){let t=Number.isFinite(e)?e-yn:Se;return Math.max(go,Math.min(Se,t))}var Ge;function yo(e){return`(function (full) {
|
|
7
|
+
var out = {};
|
|
8
|
+
try {
|
|
9
|
+
if (typeof navigator !== 'undefined') {
|
|
10
|
+
if (typeof navigator.userAgent === 'string') out.user_agent = navigator.userAgent;
|
|
11
|
+
if (typeof navigator.platform === 'string') out.platform = navigator.platform;
|
|
12
|
+
if (full && typeof navigator.hardwareConcurrency === 'number') out.hardware_concurrency = navigator.hardwareConcurrency;
|
|
13
|
+
if (full && typeof navigator.deviceMemory === 'number') out.device_memory = navigator.deviceMemory;
|
|
14
|
+
if (full && Array.isArray(navigator.languages)) out.languages = Array.prototype.slice.call(navigator.languages);
|
|
15
|
+
}
|
|
16
|
+
} catch (_) {}
|
|
17
|
+
if (!full) { self.postMessage(out); return; }
|
|
18
|
+
try {
|
|
19
|
+
var tz0 = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
20
|
+
if (typeof tz0 === 'string' && tz0) out.timezone = tz0;
|
|
21
|
+
} catch (_) {}
|
|
22
|
+
// The navigator values first: a first WebGL context can take longer than
|
|
23
|
+
// the whole collection budget on a cold page.
|
|
24
|
+
self.postMessage({ partial: true, values: out });
|
|
25
|
+
try {
|
|
26
|
+
if (typeof OffscreenCanvas !== 'undefined') {
|
|
27
|
+
var canvas = new OffscreenCanvas(1, 1);
|
|
28
|
+
var gl = canvas.getContext('webgl') || canvas.getContext('webgl2');
|
|
29
|
+
if (gl) {
|
|
30
|
+
try {
|
|
31
|
+
var dbg = gl.getExtension('WEBGL_debug_renderer_info');
|
|
32
|
+
if (dbg) {
|
|
33
|
+
var vendor = gl.getParameter(dbg.UNMASKED_VENDOR_WEBGL);
|
|
34
|
+
var renderer = gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL);
|
|
35
|
+
if (typeof vendor === 'string' && vendor) out.unmasked_vendor = vendor;
|
|
36
|
+
if (typeof renderer === 'string' && renderer) out.unmasked_renderer = renderer;
|
|
37
|
+
}
|
|
38
|
+
} finally {
|
|
39
|
+
try {
|
|
40
|
+
var lose = gl.getExtension('WEBGL_lose_context');
|
|
41
|
+
if (lose && typeof lose.loseContext === 'function') lose.loseContext();
|
|
42
|
+
} catch (_) {}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
} catch (_) {}
|
|
47
|
+
self.postMessage(out);
|
|
48
|
+
})(${e?"true":"false"});`}function vo(e){let t=new Map;for(let r of e.split(";")){let o=r.trim();if(!o)continue;let i=o.split(/\s+/).map(c=>c.toLowerCase()),s=i[0];s&&!t.has(s)&&t.set(s,i.slice(1))}let n=t.get("worker-src")??t.get("child-src")??t.get("default-src");return n?n.some(r=>r==="blob:"||r.startsWith("blob:")):!0}function wo(e){let t=a(()=>e?.head);if(!t)return!1;let n=a(()=>Array.from(t.children));if(!n)return!1;for(let r of n){if(a(()=>r.tagName.toLowerCase())!=="meta"||a(()=>r.getAttribute("http-equiv")?.trim().toLowerCase())!=="content-security-policy")continue;let i=a(()=>r.getAttribute("content"));if(typeof i=="string"&&!vo(i))return!0}return!1}function bo(e){if(!(e instanceof Error))return!1;if(e.name==="SecurityError")return!0;let t=e.message.toLowerCase();return t.includes("content security policy")||t.includes("securityerror")}function So(e,t){if(!e||typeof e!="object")return{};let n=e,r=typeof n.user_agent=="string"?n.user_agent:void 0,o=typeof n.platform=="string"?n.platform:void 0;return t?h({user_agent:r,platform:o,hardware_concurrency:typeof n.hardware_concurrency=="number"&&Number.isFinite(n.hardware_concurrency)?n.hardware_concurrency:void 0,device_memory:typeof n.device_memory=="number"&&Number.isFinite(n.device_memory)?n.device_memory:void 0,languages:Array.isArray(n.languages)?n.languages.filter(i=>typeof i=="string"):void 0,timezone:typeof n.timezone=="string"?n.timezone:void 0,unmasked_vendor:typeof n.unmasked_vendor=="string"?n.unmasked_vendor:void 0,unmasked_renderer:typeof n.unmasked_renderer=="string"?n.unmasked_renderer:void 0,gpu_unanswered:n.gpu_unanswered===!0?!0:void 0}):h({user_agent:r,platform:o})}var vn={id:f.workerRealm,stage:"collect",embeddedSafe:!0,timeoutMs:Se+yn+5,async run(e){let t=T(),n=a(()=>t.document);if(Ge)throw new C(Ge);if(typeof Worker!="function"||typeof Blob!="function"||typeof URL>"u"||typeof URL.createObjectURL!="function"||typeof URL.revokeObjectURL!="function")throw new g("no-worker");let r=wo(n)?"csp-meta":"csp-blocked",o=()=>(Ge=r,new C(r)),i=!I(),s=URL.createObjectURL(new Blob([yo(i)],{type:"text/javascript"})),c,u;try{try{c=new Worker(s)}catch(p){throw bo(p)?o():p}let d=c,m=await new Promise((p,w)=>{let S=!1,l=v=>{S||(S=!0,clearTimeout(_),e.signal?.removeEventListener("abort",b),n&&u&&n.removeEventListener("securitypolicyviolation",u),v())},b=()=>l(()=>w(e.signal?.reason??new G("aborted"))),x,_=setTimeout(()=>{setTimeout(()=>l(()=>x?p({...x,gpu_unanswered:!0}):w(new G("worker-timeout"))),0)},ho(a(()=>e.budgetRemainingMs())??Se));e.signal?.addEventListener("abort",b,{once:!0}),u=v=>{let y=v,k=(y.effectiveDirective||y.violatedDirective||"").toLowerCase();((y.blockedURI||"").toLowerCase().startsWith("blob")||k.startsWith("worker-src")||k.startsWith("child-src")||k.startsWith("default-src"))&&l(()=>w(o()))},n?.addEventListener("securitypolicyviolation",u),d.onmessage=v=>{let y=v?.data;if(y&&y.partial===!0){x=y.values&&typeof y.values=="object"?y.values:{};return}l(()=>p(v?.data))},d.onerror=v=>{v?.preventDefault?.();let y=String(v?.message??"").toLowerCase();if(r==="csp-meta"||y.includes("content security policy")||y.includes("securityerror")){l(()=>w(o()));return}l(()=>w(new C("worker-error")))}});return So(m,i)}finally{n&&u&&a(()=>n.removeEventListener("securitypolicyviolation",u)),a(()=>c?.terminate()),a(()=>URL.revokeObjectURL(s))}}};function _o(e){let t=E(e,"embeddedSafe")===!0||Ae.has(e.id);return{...e,run:n=>{if(!t&&I())throw new g("embedded");return e.run(n)}}}var Eo=[Ft,Qt,qt,Gt,jt,Vt,Ht,$t,vn,At,Ct,Dt,Nt,Et,xt,Tt,Rt,Mt,fn,pn,Lt,dn,Zt,Jt,an,sn,kt,rn,St,_t,gn,hn],le=Eo.map(_o);function wn(e){return new Promise(t=>t(new re({...e,platform:"web",sources:e.sources??le,integrity:n=>se(n.sources),embedding:()=>I()})))}return kn(xo);})();
|