@ruptjs/client 0.1.1 → 3.0.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/index.d.ts CHANGED
@@ -45,9 +45,10 @@ export interface EvaluateBaseParams {
45
45
  /**
46
46
  * Controls whether the SDK automatically navigates to a server-issued
47
47
  * challenge URL. When false the URL is returned in `response.redirect`
48
- * and the caller decides what to do. Per-method defaults: `true` for
49
- * `access` and `login`, `false` for `signup` (so a challenged sign-up
50
- * doesn't navigate the user away from a not-yet-created account).
48
+ * and the caller decides what to do. Defaults to `true` only for
49
+ * `access` (page-view enforcement, where navigating to the challenge is
50
+ * the intended outcome); `false` for `login`, `signup`, and custom
51
+ * events so a challenge never navigates the user off the page mid-flow.
51
52
  */
52
53
  auto_challenge?: boolean;
53
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruptjs/client",
3
- "version": "0.1.1",
3
+ "version": "3.0.0",
4
4
  "description": "Framework agnostic device intelligence to prevent fraud and drive revenue growth",
5
5
  "devDependencies": {
6
6
  "@google-cloud/storage": "^7.19.0",
package/release/index.js CHANGED
@@ -1,4 +1,4 @@
1
- function k($,Q){return new Promise((Z)=>setTimeout(Z,$,Q))}function K$(){return k(0)}function b($){return parseInt($)}function X$($){return parseFloat($)}function V$($,Q){return typeof $==="number"&&isNaN($)?Q:$}function T($){return $.reduce((Q,Z)=>Q+(Z?1:0),0)}async function W$($,Q,Z=50){let J=document;while(!J.body)await k(Z);let X=J.createElement("iframe");try{await new Promise((q,z)=>{let K=!1,V=()=>{K=!0,q()},G=(j)=>{K=!0,z(j)};X.onload=V,X.onerror=G;let{style:B}=X;if(B.setProperty("display","block","important"),B.position="absolute",B.top="0",B.left="0",B.visibility="hidden",Q&&"srcdoc"in X)X.srcdoc=Q;else X.src="about:blank";J.body.appendChild(X);let H=()=>{if(K)return;if(X.contentWindow?.document?.readyState==="complete")V();else setTimeout(H,10)};H()});while(!X.contentWindow?.document?.body)await k(Z);return await $(X,X.contentWindow)}finally{X.parentNode?.removeChild(X)}}var SQ="mmMwWLliI0O&1",wQ="48px",M=["monospace","sans-serif","serif"],G$=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function x(){return W$(async($,{document:Q})=>{let Z=Q.body;Z.style.fontSize=wQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(D)=>{let N=Q.createElement("span"),{style:R}=N;return R.position="absolute",R.top="0",R.left="0",R.fontFamily=D,N.textContent=SQ,J.appendChild(N),N},K=(D,N)=>{return z(`'${D}',${N}`)},V=()=>{return M.map(z)},G=()=>{let D={};for(let N of G$)D[N]=M.map((R)=>K(N,R));return D},B=(D)=>{return M.some((N,R)=>D[R].offsetWidth!==X[N]||D[R].offsetHeight!==q[N])},H=V(),j=G();Z.appendChild(J),await K$();for(let D=0;D<M.length;D++)X[M[D]]=H[D].offsetWidth,q[M[D]]=H[D].offsetHeight;return G$.filter((D)=>B(j[D]))})}async function g(){let $=navigator.userAgentData;if($)try{let{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:V,uaFullVersion:G,formFactor:B,wow64:H}=await $.getHighEntropyValues(["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList","formFactor","wow64"]);return{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:V,uaFullVersion:G,formFactor:B,wow64:H}}catch(Q){return{}}return{}}function B$($){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String($))}function H$(){let $=window,Q=navigator;return T(["webkitPersistentStorage"in Q,"webkitTemporaryStorage"in Q,Q.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in $,"BatteryManager"in $,"webkitMediaStream"in $,"webkitSpeechGrammar"in $])>=5}function v(){let $=window,Q=navigator;return T(["ApplePayError"in $,"CSSPrimitiveValue"in $,"Counter"in $,Q.vendor.indexOf("Apple")===0,"getStorageUpdates"in Q,"WebKitMediaKeys"in $])>=4}function D$(){let $=window,{HTMLElement:Q,Document:Z}=$;return T(["safari"in $,!("ongestureend"in $),!("TouchEvent"in $),!("orientation"in $),Q&&!("autocapitalize"in Q.prototype),Z&&"pointerLockElement"in Z.prototype])>=4}function L$(){let $=window;if(!B$($.print))return!1;return T([String($.browser)==="[object WebPageNamespace]","MicrodataExtractor"in $])>=1}function C$(){let $=window;return T([!("MediaSettingsRange"in $),"RTCEncodedAudioFrame"in $,""+$.Intl==="[object Intl]",""+$.Reflect==="[object Reflect]"])>=3}function A$(){let $=window,Q=navigator,{CSS:Z,HTMLButtonElement:J}=$;return T([!("getStorageUpdates"in Q),J&&"popover"in J.prototype,"CSSCounterStyleRule"in $,Z.supports("font-size-adjust: ex-height 0.5"),Z.supports("text-transform: full-width")])>=4}function j$(){if(navigator.platform==="iPad")return!0;let $=screen,Q=$.width/$.height;return T(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,Q>0.65&&Q<1.53])>=2}function f(){let $=navigator,Q=[],Z=$.language||$.userLanguage||$.browserLanguage||$.systemLanguage;if(Z!==void 0)Q.push([Z]);if(Array.isArray($.languages)){if(!(H$()&&C$()))Q.push($.languages)}else if(typeof $.languages==="string"){let J=$.languages;if(J)Q.push(J.split(","))}return Q}function h($){try{if($)return window.localStorage.getItem($);return!!window.localStorage}catch(Q){return!0}}var L=Math,P=()=>0;function u(){let $=L.acos||P,Q=L.acosh||P,Z=L.asin||P,J=L.asinh||P,X=L.atanh||P,q=L.atan||P,z=L.sin||P,K=L.sinh||P,V=L.cos||P,G=L.cosh||P,B=L.tan||P,H=L.tanh||P,j=L.exp||P,D=L.expm1||P,N=L.log1p||P,R=(A)=>L.pow(L.PI,A),s=(A)=>L.log(A+L.sqrt(A*A-1)),t=(A)=>L.log(A+L.sqrt(A*A+1)),a=(A)=>L.log((1+A)/(1-A))/2,e=(A)=>L.exp(A)-1/L.exp(A)/2,$$=(A)=>(L.exp(A)+1/L.exp(A))/2,Q$=(A)=>L.exp(A)-1,Z$=(A)=>(L.exp(2*A)-1)/(L.exp(2*A)+1),J$=(A)=>L.log(1+A);return{acos:$(0.12312423423423424),acosh:Q(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:s(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:Z(0.12312423423423424),asinh:J(1),asinhPf:t(1),atanh:X(0.5),atanhPf:a(0.5),atan:q(0.5),sin:z(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:K(1),sinhPf:e(1),cos:V(10.000000000123),cosh:G(1),coshPf:$$(1),tan:B(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:H(1),tanhPf:Z$(1),exp:j(1),expm1:D(1),expm1Pf:Q$(1),log1p:N(10),log1pPf:J$(10),powPI:R(-100)}}function p(){let{platform:$}=navigator;if($==="MacIntel"){if(v()&&!D$())return j$()?"iPad":"iPhone"}return $}function m(){if(v()&&A$()&&L$())return;return yQ()}function yQ(){let $=screen,Q=(J)=>V$(b(J),null),Z=[Q($.width),Q($.height)];return Z.sort().reverse(),Z}function d(){let $=window.Intl?.DateTimeFormat;if($){let Z=new $().resolvedOptions().timeZone;if(Z)return Z}let Q=-kQ();return`UTC${Q>=0?"+":""}${Math.abs(Q)}`}function kQ(){let $=new Date().getFullYear();return Math.max(X$(new Date($,0,1).getTimezoneOffset()),X$(new Date($,6,1).getTimezoneOffset()))}function c(){let $=navigator,Q=0,Z;if($.maxTouchPoints!==void 0)Q=b($.maxTouchPoints);else if($.msMaxTouchPoints!==void 0)Q=$.msMaxTouchPoints;try{document.createEvent("TouchEvent"),Z=!0}catch{Z=!1}let J="ontouchstart"in window;return{maxTouchPoints:Q,touchEvent:Z,touchStart:J}}async function l(){return{fonts:{value:await x()},languages:{value:f()},screenResolution:{value:m()},timezone:{value:d()},platform:{value:p()},touchSupport:{value:c()},math:{value:u()},localStorage:{value:h()},highEntropyValues:{value:await g()}}}class Y${iframe=null;ready;queue=Promise.resolve();destroyed=!1;domReadyHandler=null;readyTimer=null;constructor(){this.ready=this.create()}async runInFrame($){if(this.destroyed)throw Error("Measurement iframe has been destroyed");let Q=await this.ready,Z=this.queue.then(()=>$(Q));return this.queue=Z.then(()=>{return},()=>{return}),Z}destroy(){if(this.destroyed=!0,this.domReadyHandler)document.removeEventListener("DOMContentLoaded",this.domReadyHandler),this.domReadyHandler=null;if(this.readyTimer!==null)clearTimeout(this.readyTimer),this.readyTimer=null;if(this.iframe?.parentNode)this.iframe.parentNode.removeChild(this.iframe);this.iframe=null}create(){return new Promise(($,Q)=>{if(typeof window>"u"||typeof document>"u")return Q(Error("Measurement iframe requires a DOM"));let Z=document.createElement("iframe"),J=Z.style;J.setProperty("display","block","important"),J.position="absolute",J.top="0",J.left="0",J.visibility="hidden",Z.src="about:blank",this.iframe=Z;let X=()=>{if(this.destroyed){Q(Error("Measurement iframe destroyed before ready"));return}let q=!1,z=()=>{if(q||this.destroyed)return;let{contentDocument:K,contentWindow:V}=Z;if(!K||!V||K.readyState!=="complete"||!K.body){this.readyTimer=setTimeout(z,10);return}if(q=!0,this.readyTimer!==null)clearTimeout(this.readyTimer),this.readyTimer=null;K.body.offsetHeight,$({doc:K,win:V})};Z.onload=z,Z.onerror=()=>Q(Error("Measurement iframe failed to load")),document.body.appendChild(Z),z()};if(document.body)X();else{let q=()=>{document.removeEventListener("DOMContentLoaded",q),this.domReadyHandler=null,X()};this.domReadyHandler=q,document.addEventListener("DOMContentLoaded",q)}})}}function i(){return{iframe:new Y$}}var Y=($)=>({s:"ok",v:$}),U=($)=>({s:$,v:null});var bQ=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];async function O$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return U("unsupported");if(typeof window<"u"&&window.isSecureContext===!1)return U("rejected");let Q=await Promise.all(bQ.map(async(X)=>{try{let q=await navigator.requestMediaKeySystemAccess("com.widevine.alpha",[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"',robustness:X}]}]);return{robustness:X,success:!0,keySystem:q.keySystem}}catch(q){return{robustness:X,success:!1,errName:q?.name??""}}}));if(Q.some((X)=>!X.success&&X.errName==="SecurityError"))return U("rejected");if(Q.some((X)=>!X.success&&X.errName==="NotAllowedError"))return U("denied");let Z=Q.filter((X)=>X.success).map((X)=>X.robustness),J=Q.find((X)=>X.success)?.keySystem??null;if(Z.length===0&&J===null)return U("unsupported");return Y({supported:Z.length>0,robustness:Z,keySystem:J})}var gQ=[{key:"widevine",id:"com.widevine.alpha"},{key:"playready",id:"com.microsoft.playready"},{key:"playready_recommendation",id:"com.microsoft.playready.recommendation"},{key:"fairplay",id:"com.apple.fps"},{key:"fairplay_1_0",id:"com.apple.fps.1_0"},{key:"clearkey",id:"org.w3.clearkey"}];async function vQ($){try{return{supported:!0,keySystem:(await navigator.requestMediaKeySystemAccess($,[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}])).keySystem}}catch{return{supported:!1,keySystem:null}}}async function N$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return U("unsupported");let Q=await Promise.all(gQ.map(async({key:J,id:X})=>[J,await vQ(X)])),Z=Object.fromEntries(Q);return Y(Z)}var hQ=["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList","formFactor","wow64"];async function R$($){let Q=navigator?.userAgentData;if(!Q)return U("unsupported");if(typeof Q.getHighEntropyValues!=="function")return U("missing");try{let Z=await Q.getHighEntropyValues(hQ);return Y({brands:Q.brands,mobile:Q.mobile,platform:Q.platform,...Z})}catch(Z){if(Z?.name==="NotAllowedError")return U("denied");return U("unexpected")}}var o=($)=>Math.round($/10)*10;async function P$($){if(typeof screen>"u")return U("unsupported");let Q=screen;if(typeof Q.availWidth>"u"||typeof Q.availHeight>"u"||typeof Q.width>"u"||typeof Q.height>"u")return U("missing");let Z=Q.availTop??0,J=Q.availLeft??0,X=o(Z),q=o(J),z=o(Math.max(0,Q.width-J-Q.availWidth)),K=o(Math.max(0,Q.height-Z-Q.availHeight)),V=[X,z,K,q];if(V.every((B)=>B===0))return{s:"blocked",v:V};return Y(V)}async function E$($){if(typeof screen>"u")return U("unsupported");return Y([screen.width,screen.height])}async function _$($){if(typeof window>"u")return U("unexpected");let Q={outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight},Z=(J)=>typeof J==="number"&&Number.isFinite(J);if(!Z(Q.outerWidth)||!Z(Q.outerHeight)||!Z(Q.innerWidth)||!Z(Q.innerHeight))return U("unexpected");return Y(Q)}async function cQ($){let Q=new TextEncoder().encode($);return await crypto.subtle.digest("SHA-256",Q)}function lQ($,Q=32){let Z=new Uint8Array($),J=Math.min(Q,Z.length),X="";for(let q=0;q<J;q++)X+=Z[q].toString(16).padStart(2,"0");return X}async function F($){return lQ(await cQ($),16)}var iQ=1e4;function U$(){try{return window.speechSynthesis.getVoices()??[]}catch{return[]}}function oQ(){return new Promise(($)=>{let Q=window.speechSynthesis,Z=U$();if(Z.length>0)return $(Z);let J=!1,X=()=>{if(J)return;let q=U$();if(q.length>0)J=!0,Q.removeEventListener("voiceschanged",X),$(q)};Q.addEventListener("voiceschanged",X),setTimeout(()=>{if(J)return;J=!0,Q.removeEventListener("voiceschanged",X),$(U$())},iQ)})}async function F$($){if(typeof window>"u"||!window.speechSynthesis)return U("unsupported");if(typeof window.speechSynthesis.getVoices!=="function")return U("missing");let Q=await oQ();if(Q.length===0)return U("unsupported");let Z=Q.map((X)=>`${X.voiceURI},${X.name},${X.lang},${X.localService?1:0},${X.default?1:0}`).sort().join("|"),J=await F(Z);return Y({hash:J})}var S=["monospace","sans-serif","serif"],nQ="mmMwWLliI0O&1",sQ="48px",I$=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];async function T$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return U("iframe_error");Z.style.fontSize=sQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(H)=>{let j=Q.createElement("span"),{style:D}=j;return D.position="absolute",D.top="0",D.left="0",D.fontFamily=H,j.textContent=nQ,J.appendChild(j),j},K=(H,j)=>z(`'${H}',${j}`),V=S.map(z),G={};for(let H of I$)G[H]=S.map((j)=>K(H,j));Z.appendChild(J);for(let H=0;H<S.length;H++)X[S[H]]=V[H].offsetWidth,q[S[H]]=V[H].offsetHeight;let B=I$.filter((H)=>S.some((j,D)=>G[H][D].offsetWidth!==X[j]||G[H][D].offsetHeight!==q[j]));return Y(B)})}catch{return U("iframe_error")}}var aQ="mmMwWLliI0O&1",eQ="48px",$Z={default:"",apple:"-apple-system, BlinkMacSystemFont",serif:"serif",sans:"sans-serif",mono:"monospace",min:"",system:"system-ui"},QZ={min:"1px"};async function M$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return U("iframe_error");let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important"),J.style.fontSize=eQ;let X={};for(let[z,K]of Object.entries($Z)){let V=Q.createElement("span");if(V.style.position="absolute",V.style.top="0",V.style.left="0",V.style.whiteSpace="nowrap",K)V.style.fontFamily=K;let G=QZ[z];if(G)V.style.fontSize=G;V.textContent=aQ,J.appendChild(V),X[z]=V}Z.appendChild(J);let q={};for(let z of Object.keys(X))q[z]=X[z].getBoundingClientRect().width;return Y(q)})}catch{return U("iframe_error")}}async function S$($){if(typeof FontFace>"u")return U("unsupported");try{return await new FontFace("f","local('Arial')").load(),Y({supported:!0})}catch{return Y({supported:!1})}}var XZ=44100,w$=5000,YZ=4500;async function y$(){let $=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!$)throw Error("no offline audio context");let Q=new $(1,w$,XZ),Z=Q.createOscillator();Z.type="triangle",Z.frequency.value=1e4;let J=Q.createDynamicsCompressor();J.threshold.value=-50,J.knee.value=40,J.ratio.value=12,J.attack.value=0,J.release.value=0.25,Z.connect(J),J.connect(Q.destination),Z.start(0);let q=(await Q.startRendering()).getChannelData(0),z=0;for(let K=YZ;K<w$;K++)z+=Math.abs(q[K]);return z}async function k$($){if(typeof window>"u")return U("unsupported");if(!(window.OfflineAudioContext||window.webkitOfflineAudioContext))return U("unsupported");try{let Z=await y$(),J;try{J=await y$()}catch{}if(J!==void 0&&Math.abs(Z-J)>0.001)return{s:"unstable",v:{sample:Z,sampleAlt:J}};return Y({sample:Z,sampleAlt:J})}catch(Z){if(Z?.name==="NotSupportedError")return U("unsupported");return U("unexpected")}}var b$="Cwm fjordbank gly \uD83D\uDE03";function x$($){let Q=$.getContext("2d");if(!Q)return null;return $.width=240,$.height=60,Q.textBaseline="alphabetic",Q.fillStyle="#f60",Q.fillRect(100,1,62,20),Q.fillStyle="#069",Q.font='11pt "no-real-font-123"',Q.fillText(b$,2,15),Q.fillStyle="rgba(102, 204, 0, 0.2)",Q.font="18pt Arial",Q.fillText(b$,4,45),$.toDataURL()}function g$($){let Q=$.getContext("2d");if(!Q)return null;$.width=122,$.height=110,Q.globalCompositeOperation="multiply";for(let[Z,J,X]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])Q.fillStyle=Z,Q.beginPath(),Q.arc(J,X,40,0,Math.PI*2,!0),Q.closePath(),Q.fill();return Q.fillStyle="#f9c",Q.beginPath(),Q.arc(60,60,60,0,Math.PI*2,!0),Q.arc(60,60,20,0,Math.PI*2,!0),Q.fill("evenodd"),$.toDataURL()}function qZ($){let Q=$.getContext("2d");if(!Q)return!1;return $.width=1,$.height=1,Q.rect(0,0,10,10),Q.rect(2,2,6,6),Q.isPointInPath(5,5,"evenodd")}async function v$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.createElement("canvas"),J=qZ(Z),X=Q.createElement("canvas"),q=g$(X),z=Q.createElement("canvas"),K=x$(z);if(!q||!K)return U("blocked");let V=await F(q),G=await F(K),B=Q.createElement("canvas"),H=Q.createElement("canvas"),j=g$(B),D=x$(H);if(j&&D){let N=await F(j),R=await F(D);if(N!==V||R!==G)return{s:"unstable",v:{winding:J,geometry:V,text:G}}}return Y({winding:J,geometry:V,text:G})})}catch{return U("iframe_error")}}var I=4;function KZ($){let[Q,Z,J,X]=$;return()=>{let q=Q^Q<<11;return Q=Z,Z=J,J=X,X=X^X>>>19^(q^q>>>8)|0,(X>>>0)/4294967296}}async function f$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.createElement("canvas");Z.width=I,Z.height=I;let J=Z.getContext("2d");if(!J)return U("unsupported");let X=[Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0],q=KZ([...X]),z=new Uint8ClampedArray(I*I*4);for(let K=0;K<z.length;K+=4)z[K]=Math.floor(q()*256),z[K+1]=Math.floor(q()*256),z[K+2]=Math.floor(q()*256),z[K+3]=Math.floor(q()*256);try{J.putImageData(new ImageData(z,I,I),0,0);let K=J.getImageData(0,0,I,I);return Y({seed:X,pixels:Array.from(K.data),dimension:I})}catch{return U("unexpected")}})}catch{return U("iframe_error")}}var WZ=["MAX_VERTEX_ATTRIBS","MAX_VERTEX_UNIFORM_VECTORS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_TEXTURE_IMAGE_UNITS","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","MAX_CUBE_MAP_TEXTURE_SIZE","ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS"];function GZ($){let Q={},Z=[[$.VERTEX_SHADER,"v"],[$.FRAGMENT_SHADER,"f"]],J=[[$.LOW_FLOAT,"lf"],[$.MEDIUM_FLOAT,"mf"],[$.HIGH_FLOAT,"hf"],[$.LOW_INT,"li"],[$.MEDIUM_INT,"mi"],[$.HIGH_INT,"hi"]];for(let[X,q]of Z)for(let[z,K]of J){let V=$.getShaderPrecisionFormat(X,z);if(V)Q[`${q}.${K}`]=[V.rangeMin,V.rangeMax,V.precision]}return Q}var BZ=`
1
+ function k($,Q){return new Promise((Z)=>setTimeout(Z,$,Q))}function K$(){return k(0)}function b($){return parseInt($)}function X$($){return parseFloat($)}function V$($,Q){return typeof $==="number"&&isNaN($)?Q:$}function T($){return $.reduce((Q,Z)=>Q+(Z?1:0),0)}async function W$($,Q,Z=50){let J=document;while(!J.body)await k(Z);let X=J.createElement("iframe");try{await new Promise((q,z)=>{let K=!1,V=()=>{K=!0,q()},B=(j)=>{K=!0,z(j)};X.onload=V,X.onerror=B;let{style:G}=X;if(G.setProperty("display","block","important"),G.position="absolute",G.top="0",G.left="0",G.visibility="hidden",Q&&"srcdoc"in X)X.srcdoc=Q;else X.src="about:blank";J.body.appendChild(X);let H=()=>{if(K)return;if(X.contentWindow?.document?.readyState==="complete")V();else setTimeout(H,10)};H()});while(!X.contentWindow?.document?.body)await k(Z);return await $(X,X.contentWindow)}finally{X.parentNode?.removeChild(X)}}var SQ="mmMwWLliI0O&1",wQ="48px",M=["monospace","sans-serif","serif"],G$=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function x(){return W$(async($,{document:Q})=>{let Z=Q.body;Z.style.fontSize=wQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(D)=>{let N=Q.createElement("span"),{style:R}=N;return R.position="absolute",R.top="0",R.left="0",R.fontFamily=D,N.textContent=SQ,J.appendChild(N),N},K=(D,N)=>{return z(`'${D}',${N}`)},V=()=>{return M.map(z)},B=()=>{let D={};for(let N of G$)D[N]=M.map((R)=>K(N,R));return D},G=(D)=>{return M.some((N,R)=>D[R].offsetWidth!==X[N]||D[R].offsetHeight!==q[N])},H=V(),j=B();Z.appendChild(J),await K$();for(let D=0;D<M.length;D++)X[M[D]]=H[D].offsetWidth,q[M[D]]=H[D].offsetHeight;return G$.filter((D)=>G(j[D]))})}async function g(){let $=navigator.userAgentData;if($)try{let{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:V,uaFullVersion:B,formFactor:G,wow64:H}=await $.getHighEntropyValues(["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList","formFactor","wow64"]);return{architecture:Q,bitness:Z,brands:J,fullVersionList:X,mobile:q,model:z,platform:K,platformVersion:V,uaFullVersion:B,formFactor:G,wow64:H}}catch(Q){return{}}return{}}function B$($){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String($))}function H$(){let $=window,Q=navigator;return T(["webkitPersistentStorage"in Q,"webkitTemporaryStorage"in Q,Q.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in $,"BatteryManager"in $,"webkitMediaStream"in $,"webkitSpeechGrammar"in $])>=5}function v(){let $=window,Q=navigator;return T(["ApplePayError"in $,"CSSPrimitiveValue"in $,"Counter"in $,Q.vendor.indexOf("Apple")===0,"getStorageUpdates"in Q,"WebKitMediaKeys"in $])>=4}function D$(){let $=window,{HTMLElement:Q,Document:Z}=$;return T(["safari"in $,!("ongestureend"in $),!("TouchEvent"in $),!("orientation"in $),Q&&!("autocapitalize"in Q.prototype),Z&&"pointerLockElement"in Z.prototype])>=4}function L$(){let $=window;if(!B$($.print))return!1;return T([String($.browser)==="[object WebPageNamespace]","MicrodataExtractor"in $])>=1}function C$(){let $=window;return T([!("MediaSettingsRange"in $),"RTCEncodedAudioFrame"in $,""+$.Intl==="[object Intl]",""+$.Reflect==="[object Reflect]"])>=3}function A$(){let $=window,Q=navigator,{CSS:Z,HTMLButtonElement:J}=$;return T([!("getStorageUpdates"in Q),J&&"popover"in J.prototype,"CSSCounterStyleRule"in $,Z.supports("font-size-adjust: ex-height 0.5"),Z.supports("text-transform: full-width")])>=4}function j$(){if(navigator.platform==="iPad")return!0;let $=screen,Q=$.width/$.height;return T(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,Q>0.65&&Q<1.53])>=2}function f(){let $=navigator,Q=[],Z=$.language||$.userLanguage||$.browserLanguage||$.systemLanguage;if(Z!==void 0)Q.push([Z]);if(Array.isArray($.languages)){if(!(H$()&&C$()))Q.push($.languages)}else if(typeof $.languages==="string"){let J=$.languages;if(J)Q.push(J.split(","))}return Q}function h($){try{if($)return window.localStorage.getItem($);return!!window.localStorage}catch(Q){return!0}}var L=Math,P=()=>0;function u(){let $=L.acos||P,Q=L.acosh||P,Z=L.asin||P,J=L.asinh||P,X=L.atanh||P,q=L.atan||P,z=L.sin||P,K=L.sinh||P,V=L.cos||P,B=L.cosh||P,G=L.tan||P,H=L.tanh||P,j=L.exp||P,D=L.expm1||P,N=L.log1p||P,R=(A)=>L.pow(L.PI,A),s=(A)=>L.log(A+L.sqrt(A*A-1)),t=(A)=>L.log(A+L.sqrt(A*A+1)),a=(A)=>L.log((1+A)/(1-A))/2,e=(A)=>L.exp(A)-1/L.exp(A)/2,$$=(A)=>(L.exp(A)+1/L.exp(A))/2,Q$=(A)=>L.exp(A)-1,Z$=(A)=>(L.exp(2*A)-1)/(L.exp(2*A)+1),J$=(A)=>L.log(1+A);return{acos:$(0.12312423423423424),acosh:Q(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:s(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:Z(0.12312423423423424),asinh:J(1),asinhPf:t(1),atanh:X(0.5),atanhPf:a(0.5),atan:q(0.5),sin:z(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:K(1),sinhPf:e(1),cos:V(10.000000000123),cosh:B(1),coshPf:$$(1),tan:G(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:H(1),tanhPf:Z$(1),exp:j(1),expm1:D(1),expm1Pf:Q$(1),log1p:N(10),log1pPf:J$(10),powPI:R(-100)}}function p(){let{platform:$}=navigator;if($==="MacIntel"){if(v()&&!D$())return j$()?"iPad":"iPhone"}return $}function m(){if(v()&&A$()&&L$())return;return yQ()}function yQ(){let $=screen,Q=(J)=>V$(b(J),null),Z=[Q($.width),Q($.height)];return Z.sort().reverse(),Z}function d(){let $=window.Intl?.DateTimeFormat;if($){let Z=new $().resolvedOptions().timeZone;if(Z)return Z}let Q=-kQ();return`UTC${Q>=0?"+":""}${Math.abs(Q)}`}function kQ(){let $=new Date().getFullYear();return Math.max(X$(new Date($,0,1).getTimezoneOffset()),X$(new Date($,6,1).getTimezoneOffset()))}function c(){let $=navigator,Q=0,Z;if($.maxTouchPoints!==void 0)Q=b($.maxTouchPoints);else if($.msMaxTouchPoints!==void 0)Q=$.msMaxTouchPoints;try{document.createEvent("TouchEvent"),Z=!0}catch{Z=!1}let J="ontouchstart"in window;return{maxTouchPoints:Q,touchEvent:Z,touchStart:J}}async function l(){return{fonts:{value:await x()},languages:{value:f()},screenResolution:{value:m()},timezone:{value:d()},platform:{value:p()},touchSupport:{value:c()},math:{value:u()},localStorage:{value:h()},highEntropyValues:{value:await g()}}}class Y${iframe=null;ready;queue=Promise.resolve();destroyed=!1;domReadyHandler=null;readyTimer=null;constructor(){this.ready=this.create()}async runInFrame($){if(this.destroyed)throw Error("Measurement iframe has been destroyed");let Q=await this.ready,Z=this.queue.then(()=>$(Q));return this.queue=Z.then(()=>{return},()=>{return}),Z}destroy(){if(this.destroyed=!0,this.domReadyHandler)document.removeEventListener("DOMContentLoaded",this.domReadyHandler),this.domReadyHandler=null;if(this.readyTimer!==null)clearTimeout(this.readyTimer),this.readyTimer=null;if(this.iframe?.parentNode)this.iframe.parentNode.removeChild(this.iframe);this.iframe=null}create(){return new Promise(($,Q)=>{if(typeof window>"u"||typeof document>"u")return Q(Error("Measurement iframe requires a DOM"));let Z=document.createElement("iframe"),J=Z.style;J.setProperty("display","block","important"),J.position="absolute",J.top="0",J.left="0",J.visibility="hidden",Z.src="about:blank",this.iframe=Z;let X=()=>{if(this.destroyed){Q(Error("Measurement iframe destroyed before ready"));return}let q=!1,z=()=>{if(q||this.destroyed)return;let{contentDocument:K,contentWindow:V}=Z;if(!K||!V||K.readyState!=="complete"||!K.body){this.readyTimer=setTimeout(z,10);return}if(q=!0,this.readyTimer!==null)clearTimeout(this.readyTimer),this.readyTimer=null;K.body.offsetHeight,$({doc:K,win:V})};Z.onload=z,Z.onerror=()=>Q(Error("Measurement iframe failed to load")),document.body.appendChild(Z),z()};if(document.body)X();else{let q=()=>{document.removeEventListener("DOMContentLoaded",q),this.domReadyHandler=null,X()};this.domReadyHandler=q,document.addEventListener("DOMContentLoaded",q)}})}}function i(){return{iframe:new Y$}}var Y=($)=>({s:"ok",v:$}),U=($)=>({s:$,v:null});var bQ=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];async function O$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return U("unsupported");if(typeof window<"u"&&window.isSecureContext===!1)return U("rejected");let Q=await Promise.all(bQ.map(async(X)=>{try{let q=await navigator.requestMediaKeySystemAccess("com.widevine.alpha",[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"',robustness:X}]}]);return{robustness:X,success:!0,keySystem:q.keySystem}}catch(q){return{robustness:X,success:!1,errName:q?.name??""}}}));if(Q.some((X)=>!X.success&&X.errName==="SecurityError"))return U("rejected");if(Q.some((X)=>!X.success&&X.errName==="NotAllowedError"))return U("denied");let Z=Q.filter((X)=>X.success).map((X)=>X.robustness),J=Q.find((X)=>X.success)?.keySystem??null;if(Z.length===0&&J===null)return U("unsupported");return Y({supported:Z.length>0,robustness:Z,keySystem:J})}var gQ=[{key:"widevine",id:"com.widevine.alpha"},{key:"playready",id:"com.microsoft.playready"},{key:"playready_recommendation",id:"com.microsoft.playready.recommendation"},{key:"fairplay",id:"com.apple.fps"},{key:"fairplay_1_0",id:"com.apple.fps.1_0"},{key:"clearkey",id:"org.w3.clearkey"}];async function vQ($){try{return{supported:!0,keySystem:(await navigator.requestMediaKeySystemAccess($,[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}])).keySystem}}catch{return{supported:!1,keySystem:null}}}async function N$($){if(typeof navigator>"u"||typeof navigator.requestMediaKeySystemAccess!=="function")return U("unsupported");let Q=await Promise.all(gQ.map(async({key:J,id:X})=>[J,await vQ(X)])),Z=Object.fromEntries(Q);return Y(Z)}var hQ=["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList","formFactor","wow64"];async function R$($){let Q=navigator?.userAgentData;if(!Q)return U("unsupported");if(typeof Q.getHighEntropyValues!=="function")return U("missing");try{let Z=await Q.getHighEntropyValues(hQ);return Y({brands:Q.brands,mobile:Q.mobile,platform:Q.platform,...Z})}catch(Z){if(Z?.name==="NotAllowedError")return U("denied");return U("unexpected")}}var o=($)=>Math.round($/10)*10;async function P$($){if(typeof screen>"u")return U("unsupported");let Q=screen;if(typeof Q.availWidth>"u"||typeof Q.availHeight>"u"||typeof Q.width>"u"||typeof Q.height>"u")return U("missing");let Z=Q.availTop??0,J=Q.availLeft??0,X=o(Z),q=o(J),z=o(Math.max(0,Q.width-J-Q.availWidth)),K=o(Math.max(0,Q.height-Z-Q.availHeight)),V=[X,z,K,q];if(V.every((G)=>G===0))return{s:"blocked",v:V};return Y(V)}async function E$($){if(typeof screen>"u")return U("unsupported");return Y([screen.width,screen.height])}async function F$($){if(typeof window>"u")return U("unexpected");let Q={outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight},Z=(J)=>typeof J==="number"&&Number.isFinite(J);if(!Z(Q.outerWidth)||!Z(Q.outerHeight)||!Z(Q.innerWidth)||!Z(Q.innerHeight))return U("unexpected");return Y(Q)}async function cQ($){let Q=new TextEncoder().encode($);return await crypto.subtle.digest("SHA-256",Q)}function lQ($,Q=32){let Z=new Uint8Array($),J=Math.min(Q,Z.length),X="";for(let q=0;q<J;q++)X+=Z[q].toString(16).padStart(2,"0");return X}async function _($){return lQ(await cQ($),16)}var iQ=1e4;function U$(){try{return window.speechSynthesis.getVoices()??[]}catch{return[]}}function oQ(){return new Promise(($)=>{let Q=window.speechSynthesis,Z=U$();if(Z.length>0)return $(Z);let J=!1,X=()=>{if(J)return;let q=U$();if(q.length>0)J=!0,Q.removeEventListener("voiceschanged",X),$(q)};Q.addEventListener("voiceschanged",X),setTimeout(()=>{if(J)return;J=!0,Q.removeEventListener("voiceschanged",X),$(U$())},iQ)})}async function _$($){if(typeof window>"u"||!window.speechSynthesis)return U("unsupported");if(typeof window.speechSynthesis.getVoices!=="function")return U("missing");let Q=await oQ();if(Q.length===0)return U("unsupported");let Z=Q.map((X)=>`${X.voiceURI},${X.name},${X.lang},${X.localService?1:0},${X.default?1:0}`).sort().join("|"),J=await _(Z);return Y({hash:J})}var S=["monospace","sans-serif","serif"],nQ="mmMwWLliI0O&1",sQ="48px",I$=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];async function T$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return U("iframe_error");Z.style.fontSize=sQ;let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important");let X={},q={},z=(H)=>{let j=Q.createElement("span"),{style:D}=j;return D.position="absolute",D.top="0",D.left="0",D.fontFamily=H,j.textContent=nQ,J.appendChild(j),j},K=(H,j)=>z(`'${H}',${j}`),V=S.map(z),B={};for(let H of I$)B[H]=S.map((j)=>K(H,j));Z.appendChild(J);for(let H=0;H<S.length;H++)X[S[H]]=V[H].offsetWidth,q[S[H]]=V[H].offsetHeight;let G=I$.filter((H)=>S.some((j,D)=>B[H][D].offsetWidth!==X[j]||B[H][D].offsetHeight!==q[j]));return Y(G)})}catch{return U("iframe_error")}}var aQ="mmMwWLliI0O&1",eQ="48px",$Z={default:"",apple:"-apple-system, BlinkMacSystemFont",serif:"serif",sans:"sans-serif",mono:"monospace",min:"",system:"system-ui"},QZ={min:"1px"};async function M$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.body;if(!Z)return U("iframe_error");let J=Q.createElement("div");J.style.setProperty("visibility","hidden","important"),J.style.fontSize=eQ;let X={};for(let[z,K]of Object.entries($Z)){let V=Q.createElement("span");if(V.style.position="absolute",V.style.top="0",V.style.left="0",V.style.whiteSpace="nowrap",K)V.style.fontFamily=K;let B=QZ[z];if(B)V.style.fontSize=B;V.textContent=aQ,J.appendChild(V),X[z]=V}Z.appendChild(J);let q={};for(let z of Object.keys(X))q[z]=X[z].getBoundingClientRect().width;return Y(q)})}catch{return U("iframe_error")}}async function S$($){if(typeof FontFace>"u")return U("unsupported");try{return await new FontFace("f","local('Arial')").load(),Y({supported:!0})}catch{return Y({supported:!1})}}var XZ=44100,w$=5000,YZ=4500;async function y$(){let $=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!$)throw Error("no offline audio context");let Q=new $(1,w$,XZ),Z=Q.createOscillator();Z.type="triangle",Z.frequency.value=1e4;let J=Q.createDynamicsCompressor();J.threshold.value=-50,J.knee.value=40,J.ratio.value=12,J.attack.value=0,J.release.value=0.25,Z.connect(J),J.connect(Q.destination),Z.start(0);let q=(await Q.startRendering()).getChannelData(0),z=0;for(let K=YZ;K<w$;K++)z+=Math.abs(q[K]);return z}async function k$($){if(typeof window>"u")return U("unsupported");if(!(window.OfflineAudioContext||window.webkitOfflineAudioContext))return U("unsupported");try{let Z=await y$(),J;try{J=await y$()}catch{}if(J!==void 0&&Math.abs(Z-J)>0.001)return{s:"unstable",v:{sample:Z,sampleAlt:J}};return Y({sample:Z,sampleAlt:J})}catch(Z){if(Z?.name==="NotSupportedError")return U("unsupported");return U("unexpected")}}var b$="Cwm fjordbank gly \uD83D\uDE03";function x$($){let Q=$.getContext("2d");if(!Q)return null;return $.width=240,$.height=60,Q.textBaseline="alphabetic",Q.fillStyle="#f60",Q.fillRect(100,1,62,20),Q.fillStyle="#069",Q.font='11pt "no-real-font-123"',Q.fillText(b$,2,15),Q.fillStyle="rgba(102, 204, 0, 0.2)",Q.font="18pt Arial",Q.fillText(b$,4,45),$.toDataURL()}function g$($){let Q=$.getContext("2d");if(!Q)return null;$.width=122,$.height=110,Q.globalCompositeOperation="multiply";for(let[Z,J,X]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])Q.fillStyle=Z,Q.beginPath(),Q.arc(J,X,40,0,Math.PI*2,!0),Q.closePath(),Q.fill();return Q.fillStyle="#f9c",Q.beginPath(),Q.arc(60,60,60,0,Math.PI*2,!0),Q.arc(60,60,20,0,Math.PI*2,!0),Q.fill("evenodd"),$.toDataURL()}function qZ($){let Q=$.getContext("2d");if(!Q)return!1;return $.width=1,$.height=1,Q.rect(0,0,10,10),Q.rect(2,2,6,6),Q.isPointInPath(5,5,"evenodd")}async function v$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.createElement("canvas"),J=qZ(Z),X=Q.createElement("canvas"),q=g$(X),z=Q.createElement("canvas"),K=x$(z);if(!q||!K)return U("blocked");let V=await _(q),B=await _(K),G=Q.createElement("canvas"),H=Q.createElement("canvas"),j=g$(G),D=x$(H);if(j&&D){let N=await _(j),R=await _(D);if(N!==V||R!==B)return{s:"unstable",v:{winding:J,geometry:V,text:B}}}return Y({winding:J,geometry:V,text:B})})}catch{return U("iframe_error")}}var I=4;function KZ($){let[Q,Z,J,X]=$;return()=>{let q=Q^Q<<11;return Q=Z,Z=J,J=X,X=X^X>>>19^(q^q>>>8)|0,(X>>>0)/4294967296}}async function f$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{let Z=Q.createElement("canvas");Z.width=I,Z.height=I;let J=Z.getContext("2d");if(!J)return U("unsupported");let X=[Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0,Math.random()*4294967295|0],q=KZ([...X]),z=new Uint8ClampedArray(I*I*4);for(let K=0;K<z.length;K+=4)z[K]=Math.floor(q()*256),z[K+1]=Math.floor(q()*256),z[K+2]=Math.floor(q()*256),z[K+3]=Math.floor(q()*256);try{J.putImageData(new ImageData(z,I,I),0,0);let K=J.getImageData(0,0,I,I);return Y({seed:X,pixels:Array.from(K.data),dimension:I})}catch{return U("unexpected")}})}catch{return U("iframe_error")}}var WZ=["MAX_VERTEX_ATTRIBS","MAX_VERTEX_UNIFORM_VECTORS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_TEXTURE_IMAGE_UNITS","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","MAX_CUBE_MAP_TEXTURE_SIZE","ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS"];function GZ($){let Q={},Z=[[$.VERTEX_SHADER,"v"],[$.FRAGMENT_SHADER,"f"]],J=[[$.LOW_FLOAT,"lf"],[$.MEDIUM_FLOAT,"mf"],[$.HIGH_FLOAT,"hf"],[$.LOW_INT,"li"],[$.MEDIUM_INT,"mi"],[$.HIGH_INT,"hi"]];for(let[X,q]of Z)for(let[z,K]of J){let V=$.getShaderPrecisionFormat(X,z);if(V)Q[`${q}.${K}`]=[V.rangeMin,V.rangeMax,V.precision]}return Q}var BZ=`
2
2
  attribute vec2 position;
3
3
  uniform float angle;
4
4
  varying vec2 v;
@@ -14,5 +14,5 @@ varying vec2 v;
14
14
  void main() {
15
15
  gl_FragColor = vec4((v.x + 1.0) * 0.5, (v.y + 1.0) * 0.5, 0.5, 1.0);
16
16
  }
17
- `;function DZ($){try{let Q=$.createProgram(),Z=$.createShader($.VERTEX_SHADER),J=$.createShader($.FRAGMENT_SHADER);if(!Q||!Z||!J)return null;if($.shaderSource(Z,BZ),$.shaderSource(J,HZ),$.compileShader(Z),$.compileShader(J),$.attachShader(Q,Z),$.attachShader(Q,J),$.linkProgram(Q),!$.getProgramParameter(Q,$.LINK_STATUS))return null;$.useProgram(Q);let X=$.createBuffer();$.bindBuffer($.ARRAY_BUFFER,X),$.bufferData($.ARRAY_BUFFER,new Float32Array([-0.7,-0.7,0.7,-0.7,0,0.7]),$.STATIC_DRAW);let q=$.getAttribLocation(Q,"position");$.enableVertexAttribArray(q),$.vertexAttribPointer(q,2,$.FLOAT,!1,0,0);let z=$.getUniformLocation(Q,"angle");$.uniform1f(z,Math.PI/4),$.viewport(0,0,64,64),$.clearColor(0,0,0,1),$.clear($.COLOR_BUFFER_BIT),$.drawArrays($.TRIANGLES,0,3);let K=new Uint8Array(16384);return $.readPixels(0,0,64,64,$.RGBA,$.UNSIGNED_BYTE,K),K}catch{return null}}async function h$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(typeof Z.WebGLRenderingContext>"u")return U("unsupported");let J=Q.createElement("canvas");J.width=64,J.height=64;let X=J.getContext("webgl")||J.getContext("experimental-webgl");if(!X)return U("blocked");let q=X.getExtension("WEBGL_debug_renderer_info"),z=q?X.getParameter(q.UNMASKED_VENDOR_WEBGL):null,K=q?X.getParameter(q.UNMASKED_RENDERER_WEBGL):null,V={};for(let j of WZ){let D=X[j];if(typeof D==="number"){let N=X.getParameter(D);V[j]=N instanceof Float32Array||N instanceof Int32Array?Array.from(N):N}}let G=DZ(X),B=G?await F(Array.from(G).join(",")):null,H={version:X.getParameter(X.VERSION),shadingLanguageVersion:X.getParameter(X.SHADING_LANGUAGE_VERSION),vendor:X.getParameter(X.VENDOR),renderer:X.getParameter(X.RENDERER),unmaskedVendor:z,unmaskedRenderer:K,webgl2:typeof Z.WebGL2RenderingContext<"u",extensions:X.getSupportedExtensions()??[],shaderPrecisions:GZ(X),parameters:V,shaderHash:B};return Y(H)})}catch{return U("iframe_error")}}var C=Math,E=()=>0;async function u$($){let Q=C.acos||E,Z=C.acosh||E,J=C.asin||E,X=C.asinh||E,q=C.atanh||E,z=C.atan||E,K=C.sin||E,V=C.sinh||E,G=C.cos||E,B=C.cosh||E,H=C.tan||E,j=C.tanh||E,D=C.exp||E,N=C.expm1||E,R=C.log1p||E,s=(O)=>C.pow(C.PI,O),t=(O)=>C.log(O+C.sqrt(O*O-1)),a=(O)=>C.log(O+C.sqrt(O*O+1)),e=(O)=>C.log((1+O)/(1-O))/2,$$=(O)=>(C.exp(O)-1/C.exp(O))/2,Q$=(O)=>(C.exp(O)+1/C.exp(O))/2,Z$=(O)=>C.exp(O)-1,J$=(O)=>(C.exp(2*O)-1)/(C.exp(2*O)+1),A=(O)=>C.log(1+O);return Y({acos:Q(0.12312423423423424),acosh:Z(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:t(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:J(0.12312423423423424),asinh:X(1),asinhPf:a(1),atanh:q(0.5),atanhPf:e(0.5),atan:z(0.5),sin:K(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:V(1),sinhPf:$$(1),cos:G(10.000000000123),cosh:B(1),coshPf:Q$(1),tan:H(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:j(1),tanhPf:J$(1),exp:D(1),expm1:N(1),expm1Pf:Z$(1),log1p:R(10),log1pPf:A(10),powPI:s(-100)})}async function p$($){let Q=[],Z=Math.random();for(let J=1;J<=24576;J++){let X=Math.random();if(J%4096===0)Q.push((Z-X)*4294967295|0);Z=X}return Y({samples:[Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]]})}async function m$($){if(typeof navigator>"u"||!navigator.permissions)return U("unsupported");if(typeof window<"u"&&window.location.protocol!=="https:")return U("rejected");try{let Q=await navigator.permissions.query({name:"geolocation"});return Y({state:Q.state})}catch{return U("missing")}}var OZ=["clipboard-read","clipboard-write","notifications","push","camera","microphone","speaker-selection","device-info","background-sync","background-fetch","persistent-storage","midi","screen-wake-lock","nfc","accelerometer","gyroscope","magnetometer","payment-handler","window-management","storage-access","top-level-storage-access","local-fonts","captured-surface-control"];async function d$($){if(typeof navigator>"u"||!navigator.permissions)return U("unsupported");let Q={};return await Promise.all(OZ.map(async(Z)=>{try{let J=await navigator.permissions.query({name:Z});Q[Z]=J.state}catch{Q[Z]="unsupported"}})),Y(Q)}async function c$($){if(typeof window>"u"||typeof window.Notification>"u"||typeof navigator>"u"||!navigator.permissions)return U("unsupported");try{let Q=window.Notification.permission,J=(await navigator.permissions.query({name:"notifications"})).state;return Y({notificationPermission:Q,queryState:J,mismatch:Q==="denied"&&J==="prompt"})}catch{return U("unexpected")}}var PZ=["AccentColor","AccentColorText","ActiveText","ButtonFace","ButtonText","Canvas","CanvasText","Field","FieldText","GrayText","Highlight","HighlightText","LinkText","Mark","MarkText","SelectedItem","SelectedItemText","VisitedText","Scrollbar","Menu","MenuText","InfoBackground","InfoText","ActiveBorder","InactiveBorder","Window"];async function l$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("div");Q.body.appendChild(J);try{let X={};for(let z of PZ)J.style.color=z,X[z]=Z.getComputedStyle(J).color;if(new Set(Object.values(X)).size<=1)return U("unsupported");return Y(X)}finally{J.remove?.()}})}catch{return U("iframe_error")}}var _Z=(()=>{let $="";for(let Q=128512;Q<=128591;Q++)$+=String.fromCodePoint(Q);return $})();async function i$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("span");J.textContent=_Z,J.style.fontSize="32px",J.style.position="absolute",J.style.visibility="hidden",J.style.whiteSpace="nowrap",Q.body.appendChild(J);try{let X=J.getBoundingClientRect(),q=Z.getComputedStyle(J).fontFamily;return Y({width:X.width,height:X.height,font:q})}finally{J.remove?.()}})}catch{return U("iframe_error")}}async function o$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J="http://www.w3.org/1998/Math/MathML",X=Q.createElementNS(J,"math"),q=Q.createElementNS(J,"mi");q.textContent="x",X.appendChild(q),Q.body.appendChild(X);try{let z=X.getBoundingClientRect();if(z.width===0&&z.height===0)return U("unsupported");let K=Z.getComputedStyle(X).fontFamily;return Y({x:z.x,y:z.y,left:z.left,right:z.right,top:z.top,bottom:z.bottom,width:z.width,height:z.height,font:K})}finally{X.remove?.()}})}catch{return U("iframe_error")}}async function r$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{if(!Q.body)return U("iframe_error");let Z=Q.createElement("div");Z.style.overflow="scroll",Z.style.width="100px",Z.style.height="100px",Z.style.position="absolute",Z.style.visibility="hidden";let J=Q.createElement("div");J.style.height="200px",Z.appendChild(J),Q.body.appendChild(Z);try{let X=Z.offsetWidth-Z.clientWidth,q=Z.offsetWidth!==Z.clientWidth||X>0;return Y({width:X,present:q})}finally{Z.remove?.()}})}catch{return U("iframe_error")}}async function n$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("div");J.style.border="0.5px solid",J.style.height="0";let X=Q.createElement("div");X.style.width="calc(0.5px / 2)",Q.body.appendChild(J),Q.body.appendChild(X);try{let q=J.offsetHeight,z=Z.getComputedStyle(X).width;return Y({halfPixelBorder:q,halfPixelCalc:z})}finally{J.remove?.(),X.remove?.()}})}catch{return U("iframe_error")}}async function s$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{let J=Q.createElement("input");J.type="radio",Q.body?.appendChild(J);let X=Z.getComputedStyle(J).fontFamily;return J.remove?.(),Y({fontFamily:X})})}catch{return U("iframe_error")}}var wZ=50000,yZ=450;function kZ(){let $=1/0,Q=1/0,Z=performance.now();for(let J=0;J<wZ;J++){let X=performance.now(),q=X-Z;if(q>0){if(q<$)Q=$,$=q;else if(q<Q)Q=q}Z=X}return[Number.isFinite($)?$:0,Number.isFinite(Q)?Q:0]}function bZ(){let $=performance.now(),Q=0;while(performance.now()-$<yZ)performance.now(),Q++;return Q}async function t$($){if(typeof performance>"u"||typeof performance.now!=="function")return U("unsupported");let Q=kZ(),Z=bZ();return Y({deltas:Q,iterationsIn450ms:Z})}var a$=[new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,22,1,20,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,41,1,39,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,253,174,1,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,41,1,39,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,253,228,1,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,57,1,55,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,253,13,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,7,1,96,1,127,1,123,3,2,1,0,5,3,1,0,1,10,11,1,9,0,32,0,253,0,4,0,11])];async function e$($){if(typeof WebAssembly>"u")return U("unsupported");let Q=0,Z=!0;for(let J=0;J<a$.length;J++)try{if(WebAssembly.validate(a$[J]))Q|=1<<J,Z=!1;else Z=!1}catch{}if(Z)return U("blocked");return Y({bitmap:Q})}async function $Q($){if(typeof SharedArrayBuffer>"u")return U("unsupported");return Y({maxBytes:4294967296,crossOriginIsolated:typeof window<"u"&&window.crossOriginIsolated===!0})}async function QQ($){let Q=null;if(typeof Intl<"u"&&Intl.DateTimeFormat)try{Q=new Intl.DateTimeFormat().resolvedOptions().timeZone??null}catch{}let Z=new Date().getFullYear(),J=-Math.max(new Date(Z,0,1).getTimezoneOffset(),new Date(Z,6,1).getTimezoneOffset());if(Q===null&&J===0&&typeof Intl>"u")return U("unsupported");return Y({iana:Q,offsetMinutes:J})}async function ZQ($){if(typeof Intl>"u"||!Intl.DateTimeFormat)return U("unsupported");try{let Q=new Intl.DateTimeFormat().resolvedOptions().locale;return Y({locale:Q})}catch{return U("unexpected")}}async function JQ($){if(typeof navigator>"u")return U("unsupported");let Q=navigator.language??navigator.userLanguage??navigator.browserLanguage??null,Z=[];if(Array.isArray(navigator.languages))Z=[...navigator.languages];else if(typeof navigator.languages==="string")Z=navigator.languages.split(",");return Z=Z.map((J)=>typeof J==="string"?J.trim():"").filter((J)=>J.length>0),Y({language:Q,languages:Z})}function r($){try{return typeof window[$]<"u"&&window[$]!==null}catch(Q){return Q instanceof DOMException&&Q.name==="SecurityError"}}async function XQ($){if(typeof window>"u")return Y({sessionStorage:!1,localStorage:!1,indexedDB:!1,openDatabase:!1});return Y({sessionStorage:r("sessionStorage"),localStorage:r("localStorage"),indexedDB:r("indexedDB"),openDatabase:r("openDatabase")})}async function YQ($){if(typeof navigator<"u"&&navigator.storage?.estimate)try{let Q=await navigator.storage.estimate();if(typeof Q.quota==="number")return Y({quota:Q.quota,path:"storage"})}catch{}if(typeof navigator<"u"&&navigator.webkitTemporaryStorage?.queryUsageAndQuota)try{let Q=await new Promise((Z,J)=>{navigator.webkitTemporaryStorage.queryUsageAndQuota((X,q)=>Z(q),(X)=>J(X))});return Y({quota:Q,path:"webkitTemporaryStorage"})}catch{}return U("unsupported")}var _=($)=>{if(typeof window>"u"||!window.matchMedia)return null;let Q=window.matchMedia($);return Q.media==="not all"?null:Q.matches};async function UQ($){if(typeof window>"u")return U("unsupported");let Q=typeof screen<"u"&&screen.colorDepth?screen.colorDepth:null,Z=null;if(_("(color-gamut: rec2020)"))Z="rec2020";else if(_("(color-gamut: p3)"))Z="p3";else if(_("(color-gamut: srgb)"))Z="srgb";let J=null;if(_("(prefers-contrast: forced)"))J="forced";else if(_("(prefers-contrast: more)"))J="more";else if(_("(prefers-contrast: less)"))J="less";else if(_("(prefers-contrast: no-preference)"))J="no-preference";let X=null;if(_("(monochrome)")!==null){let q=0,z=100;while(q<=z){let K=q+z>>1;if(_(`(min-monochrome: ${K})`))q=K+1;else z=K-1}X=z}return Y({colorDepth:Q,colorGamut:Z,hdr:_("(dynamic-range: high)"),contrast:J,invertedColors:_("(inverted-colors: inverted)"),reducedTransparency:_("(prefers-reduced-transparency: reduce)"),reducedMotion:_("(prefers-reduced-motion: reduce)"),monochrome:X,colorScheme:_("(prefers-color-scheme: dark)")===!0?"dark":_("(prefers-color-scheme: light)")===!0?"light":null})}async function qQ($){return Y({deviceMemory:typeof navigator<"u"&&typeof navigator.deviceMemory==="number"?navigator.deviceMemory:null,hardwareConcurrency:typeof navigator<"u"&&typeof navigator.hardwareConcurrency==="number"?navigator.hardwareConcurrency:null,devicePixelRatio:typeof window<"u"&&typeof window.devicePixelRatio==="number"?window.devicePixelRatio:null})}var lZ=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];function iZ(){if(typeof window>"u"||typeof navigator>"u")return!1;return/WebKit/i.test(navigator.userAgent??"")&&!/Chrome|Edg|OPR/i.test(navigator.userAgent??"")}async function zQ($){let Q=typeof navigator<"u"?navigator.platform||"":"";if(Q==="MacIntel"&&iZ()){if((navigator.maxTouchPoints??0)>1)Q=typeof navigator.userAgent==="string"&&/iPad/i.test(navigator.userAgent)?"iPad":"iPhone"}let Z=typeof navigator<"u"?navigator.vendor??"":"",J=[];if(typeof window<"u"){for(let X of lZ)if(typeof window[X]<"u")J.push(X)}return Y({platform:Q,vendor:Z,vendorFlavors:J})}async function KQ($){let Q=0;if(typeof navigator<"u"){if(typeof navigator.maxTouchPoints==="number")Q=navigator.maxTouchPoints;else if(typeof navigator.msMaxTouchPoints==="number")Q=navigator.msMaxTouchPoints}let Z=!1;try{if(typeof document<"u")document.createEvent("TouchEvent"),Z=!0}catch{}let J=typeof window<"u"&&"ontouchstart"in window;return Y({maxTouchPoints:Q,touchEvent:Z,touchStart:J})}function w($){return $!==null&&(typeof $==="object"||typeof $==="function")}async function VQ($){if(typeof navigator>"u"||!navigator.plugins)return U("unsupported");let Q=navigator.plugins,Z=[];for(let z=0;z<Q.length;z++){let K=Q[z],V=[];for(let G=0;G<K.length;G++){let B=K[G];V.push({type:B.type,suffixes:B.suffixes})}Z.push({name:K.name,description:K.description,mimeTypes:V})}let J=!0;for(let z=0;z<Q.length;z++){let K=Q[z];if(!w(K)){J=!1;break}if(typeof Plugin<"u"&&Object.getPrototypeOf(K)!==Plugin.prototype){J=!1;break}}let X=navigator.mimeTypes,q=!0;if(w(X))for(let z=0;z<X.length;z++){let K=X[z];if(!w(K)){q=!1;break}if(typeof MimeType<"u"&&Object.getPrototypeOf(K)!==MimeType.prototype){q=!1;break}}return Y({plugins:Z,pluginsLength:Q.length,pdfViewerEnabled:typeof navigator.pdfViewerEnabled==="boolean"?navigator.pdfViewerEnabled:null,prototypesIntact:{pluginArray:w(Q)&&typeof PluginArray<"u"&&Object.getPrototypeOf(Q)===PluginArray.prototype,pluginItems:J,mimeArray:w(X)&&typeof MimeTypeArray<"u"&&Object.getPrototypeOf(X)===MimeTypeArray.prototype,mimeItems:q}})}function WQ(){return(Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)).slice(0,16)}function sZ($,Q,Z){let J=`${Q}=${Z}`;for(let X of $.split(";"))if(X.trim()===J)return!0;return!1}async function GQ($){if(typeof document>"u")return Y({enabled:!1});let Q=`rupt_probe_${WQ()}`,Z=WQ();try{document.cookie=`${Q}=${Z}; Path=/; SameSite=Strict`;let J=sZ(document.cookie,Q,Z);if(J)document.cookie=`${Q}=; Path=/; SameSite=Strict; Max-Age=0`;return Y({enabled:J})}catch{return Y({enabled:!1})}}async function BQ($){return Y({userAgent:typeof navigator<"u"?navigator.userAgent||"":"",appVersion:typeof navigator<"u"?navigator.appVersion||"":""})}async function HQ($){let Q=typeof navigator<"u"?navigator.connection:void 0;if(!Q)return U("unsupported");return Y({rtt:typeof Q.rtt==="number"?Q.rtt:void 0,effectiveType:typeof Q.effectiveType==="string"?Q.effectiveType:void 0,downlink:typeof Q.downlink==="number"?Q.downlink:void 0,saveData:typeof Q.saveData==="boolean"?Q.saveData:void 0})}async function DQ($){if(typeof Float32Array>"u"||typeof Uint8Array>"u")return U("unsupported");let Q=new Float32Array(1);Q[0]=NaN;let Z=new Uint8Array(Q.buffer);return Y({byte:Z[3]})}async function LQ($){let Q={evalLength:null,serviceWorkerPrototype:null,isSecureContext:null,backdropFilter:null,sourceBufferTypes:null,productSub:null,windowCloseToString:null,bindToString:null,errorStack:null,onLine:null};try{let Z=globalThis.eval;if(typeof Z==="function")Q.evalLength=Z.toString().length}catch{}try{Q.serviceWorkerPrototype=typeof Navigator<"u"&&"serviceWorker"in Navigator.prototype}catch{}try{Q.isSecureContext=typeof window<"u"?window.isSecureContext:null}catch{}try{Q.backdropFilter=typeof CSS<"u"&&CSS.supports?CSS.supports("backdrop-filter","blur(2px)"):null}catch{}try{Q.sourceBufferTypes=[typeof window.SourceBuffer,typeof window.SourceBufferList]}catch{}try{Q.productSub=typeof navigator<"u"?navigator.productSub??null:null}catch{}try{Q.windowCloseToString=typeof window<"u"?window.close.toString():null}catch{}try{Q.bindToString=Function.prototype.bind.toString()}catch{}try{null[0]()}catch(Z){Q.errorStack=typeof Z?.stack==="string"?Z.stack:null}try{Q.onLine=typeof navigator<"u"?navigator.onLine:null}catch{}return Y(Q)}async function CQ($){if(typeof window>"u")return Y({present:!1});let Q=window.process;if(typeof Q>"u")return Y({present:!1});try{return Y({present:!0,type:typeof Q.type==="string"?Q.type:void 0,versions:Q.versions&&typeof Q.versions==="object"?{electron:Q.versions.electron,node:Q.versions.node,chrome:Q.versions.chrome}:void 0})}catch{return Y({present:!0})}}async function AQ($){if(typeof Event>"u")return U("unsupported");try{return Y({isTrusted:new Event("x").isTrusted})}catch{return U("unexpected")}}var XJ=["awesomium","RunPerfTest","CefSharp","emit","fmget_targets","geb","__nightmare","nightmare","__phantomas","callPhantom","_phantom","spawn","_Selenium_IDE_Recorder","_selenium","calledSelenium","wdioElectron","webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","domAutomation","domAutomationController","__playwright__","__puppeteer_evaluation_script__"],YJ=["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped","__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","$cdc_asdjflasutopfhvcZLmcf","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"],UJ=/^([a-z]){3}_.*_(Array|Promise|Symbol)$/;async function jQ($){let Q=[],Z=[],J=[];if(typeof window<"u"){for(let X of XJ)try{if(typeof window[X]<"u")Q.push(X)}catch{}try{for(let X of Object.getOwnPropertyNames(window))if(UJ.test(X))J.push(X)}catch{}}if(typeof document<"u")for(let X of YJ)try{if(typeof document[X]<"u")Z.push(X)}catch{}return Y({windowHits:Q,documentHits:Z,headlessRegexMatches:J})}async function OQ($){if(typeof navigator>"u")return Y({webdriver:"undefined"});let Q=navigator.webdriver;if(Q===null)return Y({webdriver:"null"});if(typeof Q>"u")return Y({webdriver:"undefined"});return Y({webdriver:!!Q})}async function NQ($){let Q=!1,Z=!1;try{let J=Error("rupt-probe");if(Object.defineProperty(J,"stack",{get(){return Q=!0,""}}),typeof console<"u"&&console.debug)console.debug(J)}catch{}try{Z=typeof globalThis.objectToInspect<"u"}catch{}return Y({stackGetter:Q,objectToInspect:Z})}var VJ=["onLine","webdriver","getGamepads"],WJ=[["HTMLElement.offsetWidth",()=>typeof HTMLElement<"u"?HTMLElement.prototype:null,"offsetWidth"],["Navigator.userAgent",()=>typeof Navigator<"u"?Navigator.prototype:null,"userAgent"],["Navigator.platform",()=>typeof Navigator<"u"?Navigator.prototype:null,"platform"],["Screen.width",()=>typeof Screen<"u"?Screen.prototype:null,"width"]],GJ=["window","document","location","navigator","screen","history","console","Function","Object","Array","Math","Date","JSON","Promise","Symbol","Map","Set","WeakMap","WeakSet","Proxy","Reflect","RegExp","String","Number","Boolean","Error"];async function RQ($){let Q=[],Z=[],J={},X=[],q=[];try{if(typeof navigator<"u"){Q=Object.getOwnPropertyNames(Object.getPrototypeOf(navigator));for(let z of VJ){let K=Q.indexOf(z);if(K>=0)Z.push({name:z,index:K})}}}catch{}for(let[z,K,V]of WJ)try{let G=K();if(!G)continue;let B=Object.getOwnPropertyDescriptor(G,V);if(B?.get)J[z]=B.get.toString()}catch{}try{if(typeof window<"u"){let z=Object.getOwnPropertyNames(window);for(let K of z){if(!/^[A-Z]/.test(K))continue;if(!GJ.some((V)=>K.startsWith(V))&&!/^(HTML|SVG|XML|CSS|Animation|Audio|Worker|Element|Event|File|Font|Form|Image|Intl|Path|Performance|Pointer|Range|Resource|Storage|Style|Touch|UI|URL|Video|Web|Window)/.test(K))X.push(K)}}}catch{}try{if(typeof document<"u"&&document.documentElement)q=document.documentElement.getAttributeNames()}catch{}return Y({navPrototypeNames:Q,navPrototypeFingerprint:{length:Q.length,positions:Z},getterSources:J,globalsPresent:{Function:typeof Function<"u",Object:typeof Object<"u"},suspiciousGlobals:X,documentElementAttributes:q})}function HJ($){if(!$)return"";try{return new URL($).origin}catch{return""}}async function PQ($){let Q=[],Z=!1,J=!1;if(typeof window>"u")return Y({frames:Q,crossOriginBoundary:Z,topReached:!0});let X=window,q=0;while(X&&q<20){try{Q.push({origin:X.location.origin,pathname:X.location.pathname,referrerOrigin:HJ(X.document.referrer)})}catch{Z=!0;break}if(X.parent===X){J=!0;break}X=X.parent,q++}return Y({frames:Q,crossOriginBoundary:Z,topReached:J})}async function EQ($){if(typeof URL>"u")return U("unsupported");try{return Y({protocol:new URL("C:/").protocol})}catch{return U("unexpected")}}async function _Q($){if(typeof window>"u")return U("unsupported");try{if(typeof window.external>"u")return U("unsupported");return Y({value:String(window.external)})}catch{return U("unexpected")}}async function FQ($){if(typeof globalThis.DeviceOrientationEvent>"u")return U("unsupported");return Y({hasPermissionAPI:typeof globalThis.DeviceOrientationEvent.requestPermission==="function"})}async function IQ($){let Q=typeof navigator<"u"?navigator.mediaDevices:void 0;return Y({present:!!Q,getUserMediaPresent:typeof Q?.getUserMedia==="function",enumerateDevicesPresent:typeof Q?.enumerateDevices==="function"})}var OJ=/https?:\/\/([^\/\s)]+)/;async function TQ($){let Q;try{throw Error("probe")}catch(K){Q=typeof K?.stack==="string"?K.stack:void 0}if(!Q)return U("unsupported");let Z=Q.split(`
18
- `).filter((K)=>K.trim().length>0),J=null;for(let K of Z){let V=K.match(OJ);if(V){J=V[1];break}}let X=!!Z[0]?.startsWith("Error"),q=X?"v8":Z[0]?.includes("@")?"spidermonkey":"unknown",z=X?Math.max(0,Z.length-1):Z.length;return Y({host:J,formatPattern:q,framesCount:z})}function W($,Q){return Q.then((Z)=>[$,Z],()=>[$,{s:"unexpected",v:null}])}async function n($=i()){try{return await RJ($)}finally{$.iframe.destroy()}}async function RJ($){let Q=await Promise.all([W("widevine",O$($)),W("drm_full",N$($)),W("uach",R$($)),W("ua_string",BQ($)),W("platform_vendor",zQ($)),W("navigator_webdriver",OQ($)),W("screen_frame",P$($)),W("screen_resolution",E$($)),W("window_dimensions",_$($)),W("display_preferences",UQ($)),W("hardware",qQ($)),W("speech_voices",F$($)),W("fonts",T$($)),W("font_preferences",M$($)),W("fontface_load",S$($)),W("emoji",i$($)),W("mathml",o$($)),W("scrollbar",r$($)),W("half_pixel",n$($)),W("radio_default_font",s$($)),W("css_system_colors",l$($)),W("audio",k$($)),W("canvas",v$($)),W("seeded_canvas",f$($)),W("webgl",h$($)),W("math_ops",u$($)),W("math_random",p$($)),W("architecture_nan",DQ($)),W("engine_probes",LQ($)),W("timer_resolution",t$($)),W("wasm_simd",e$($)),W("shared_array_buffer",$Q($)),W("url_parser",EQ($)),W("timezone",QQ($)),W("locale",ZQ($)),W("languages",JQ($)),W("geolocation_permission",m$($)),W("permissions_map",d$($)),W("notifications_spoof",c$($)),W("storage_apis",XQ($)),W("storage_quota",YQ($)),W("cookie_enabled",GQ($)),W("touch",KQ($)),W("plugins",VQ($)),W("device_orientation_permission",FQ($)),W("media_devices",IQ($)),W("connection",HQ($)),W("bot_globals",jQ($)),W("event_istrusted",AQ($)),W("window_process",CQ($)),W("window_external",_Q($)),W("devtools_open",NQ($)),W("prototype_integrity",RQ($)),W("frame_ancestry",PQ($)),W("error_stack",TQ($))]);return Object.fromEntries(Q)}class q${apiOrigin;debug;iframe=null;iframeReady;warmupPromise=null;pending=new Map;rpcCounter=0;constructor($){this.apiOrigin=$.apiOrigin.replace(/\/+$/,""),this.debug=$.debug??!1,this.iframeReady=this.installIframe()}warmup(){if(!this.warmupPromise)this.warmupPromise=(async()=>{try{await this.iframeReady;let $=await this.send({kind:"warm",payload:{type:"warm",id:this.nextId()}});if(!$.ok)throw Error(`warm handshake rejected (status ${$.status}${$.error?`: ${$.error}`:""})`)}catch($){if(this.debug)console.error("[Rupt] transport.warmup failed",$);this.warmupPromise=null}})();return this.warmupPromise}async post($,Q,Z={}){await this.warmup();let J=await this.send({kind:"rpc",payload:{type:"rpc",id:this.nextId(),path:$,body:Q,attachNonce:Z.attachNonce!==!1,authorization:Z.authorization}});return{ok:J.ok,status:J.status,data:J.data}}nextId(){return`r${++this.rpcCounter}-${Date.now().toString(36)}`}send($){return new Promise((Q,Z)=>{if(!this.iframe||!this.iframe.contentWindow)return Z(Error("Rupt transport iframe is not ready"));let J=$.payload.id,X=setTimeout(()=>{if(this.pending.delete(J))Z(Error("Rupt transport request timed out"))},30000);this.pending.set(J,{resolve:(q)=>{clearTimeout(X),Q(q)},reject:(q)=>{clearTimeout(X),Z(q)}});try{this.iframe.contentWindow.postMessage($.payload,this.apiOrigin)}catch(q){clearTimeout(X),this.pending.delete(J),Z(q)}})}installIframe(){if(typeof window>"u")return Promise.resolve();return new Promise(($,Q)=>{let Z=document.createElement("iframe");Z.setAttribute("aria-hidden","true"),Z.style.display="none",Z.style.width="0",Z.style.height="0",Z.style.border="0",Z.src=`${this.apiOrigin}/v3/transport/iframe.html`,this.iframe=Z;let J=!1,X=()=>{if(J)return;J=!0,clearTimeout(K),$()},q=(G)=>{if(J)return;if(J=!0,clearTimeout(K),window.removeEventListener("message",z),Z.parentNode)Z.parentNode.removeChild(Z);if(this.iframe===Z)this.iframe=null;Q(G)},z=(G)=>{if(G.origin!==this.apiOrigin)return;if(G.source!==Z.contentWindow)return;let B=G.data;if(!B||typeof B!=="object")return;if(B.type==="ready"){X();return}if(B.type==="warm_done"||B.type==="rpc_done"){let H=this.pending.get(B.id);if(!H)return;if(this.pending.delete(B.id),B.error)H.reject(Error(B.error));else H.resolve(B);return}},K=setTimeout(()=>q(Error("Rupt transport iframe never posted `ready` within timeout")),15000);Z.addEventListener("error",()=>q(Error("Rupt transport iframe failed to load"))),window.addEventListener("message",z),(()=>{if(document.body)document.body.appendChild(Z);else window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(Z)})})()})}}class z${config;eventSource=null;constructor($){this.config=$}start(){let{apiOrigin:$,clientId:Q,evaluationId:Z,version:J}=this.config,X=`${$}/v3/listen/evaluation/${Z}?version=${J}&auth=Basic ${Q}:`;this.eventSource=new EventSource(X),this.eventSource.onmessage=async(q)=>{let z;try{z=JSON.parse(q.data)}catch{return}if(z?.action==="logout"){try{if(await this.config.onLogout?.({challenge:z.challenge?._id})===!1)return}catch(K){if(this.config.debug)console.error("[Rupt] onLogout callback error",K)}if(z.url)window.location.href=z.url}}}stop(){if(this.eventSource)this.eventSource.close(),this.eventSource=null}}var PJ="https://api.rupt.dev",y="0.1.1",EJ="kelp.tundra",_J=new Set(["access","login","signup","warm","fingerprint"]);function FJ($){let Q=$.trim().replace(/\/+$/,"");return/^https?:\/\//i.test(Q)?Q:`https://${Q}`}class MQ{clientId;debug;onLogout;apiOrigin;transport;warmupPromise;warmSignalContext=null;listener=null;evaluate;constructor($){if($.debug)console.log("[Rupt]","Debug mode enabled"),console.log("[Rupt]","Version ID:",EJ);if(!$?.clientId)throw Error("Rupt: `clientId` is required");if(this.clientId=$.clientId,this.debug=$.debug??!1,this.onLogout=$.on_logout,this.apiOrigin=$.domain?FJ($.domain):PJ,this.transport=new q$({apiOrigin:this.apiOrigin,debug:this.debug}),this.warmupPromise=this.transport.warmup(),typeof document<"u")this.warmSignalContext=i();let Q=(Z,J)=>this._evaluateCustom(Z,J);Q.access=(Z)=>this._evaluateAccess(Z),Q.login=(Z)=>this._evaluateAuthEvent("login",Z),Q.signup=(Z)=>this._evaluateAuthEvent("signup",Z),this.evaluate=Q}consumeWarmContext(){let $=this.warmSignalContext;return this.warmSignalContext=null,$??void 0}async fingerprint(){try{let $=await n(this.consumeWarmContext());return(await this.transport.post("/v3/evaluate/fingerprint",{fp_signals:$,version:y},{authorization:`Basic ${this.clientId}:`})).data}catch($){if(this.debug)console.error("[Rupt]",$);return null}}ready(){return this.warmupPromise}async _evaluateAccess($){try{let Q=await l(),Z={user:$.user!==void 0?String($.user):void 0,device_signals:Q,fp_signals:void 0,metadata:$.metadata,origin_url:typeof window<"u"?window.location.href:void 0,client:"javascript",version:y,page:typeof window<"u"?window.location.href:void 0,email:$.email,phone:$.phone,groups:$.groups,devdata:$.devdata},X=(await this.transport.post("/v3/evaluate/access",Z,{authorization:`Basic ${this.clientId}:`})).data;if(this.debug)console.log("[Rupt]","Successfully evaluated access.");if($.auto_challenge!==!1&&X?.redirect&&typeof window<"u")return window.location.href=X.redirect,null;if(X?.evaluation_id)this.startListener({evaluationId:X.evaluation_id,onLogout:$.on_logout??this.onLogout});return X}catch(Q){if(this.debug)console.error("[Rupt]",Q);return null}}async _evaluateAuthEvent($,Q){try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data,V=$!=="signup";if((Q.auto_challenge??V)&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}async _evaluateCustom($,Q){if(_J.has($))throw Error(`Rupt: "${$}" is a reserved action. Use rupt.evaluate.access / .login / .signup or rupt.fingerprint() instead.`);try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(Q.auto_challenge!==!1&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}startListener($){this.listener?.stop(),this.listener=new z$({apiOrigin:this.apiOrigin,clientId:this.clientId,evaluationId:$.evaluationId,version:y,onLogout:$.onLogout,debug:this.debug}),this.listener.start()}}var e8=MQ;export{e8 as default,MQ as Rupt,PJ as BASE_URL};
17
+ `;function DZ($){try{let Q=$.createProgram(),Z=$.createShader($.VERTEX_SHADER),J=$.createShader($.FRAGMENT_SHADER);if(!Q||!Z||!J)return null;if($.shaderSource(Z,BZ),$.shaderSource(J,HZ),$.compileShader(Z),$.compileShader(J),$.attachShader(Q,Z),$.attachShader(Q,J),$.linkProgram(Q),!$.getProgramParameter(Q,$.LINK_STATUS))return null;$.useProgram(Q);let X=$.createBuffer();$.bindBuffer($.ARRAY_BUFFER,X),$.bufferData($.ARRAY_BUFFER,new Float32Array([-0.7,-0.7,0.7,-0.7,0,0.7]),$.STATIC_DRAW);let q=$.getAttribLocation(Q,"position");$.enableVertexAttribArray(q),$.vertexAttribPointer(q,2,$.FLOAT,!1,0,0);let z=$.getUniformLocation(Q,"angle");$.uniform1f(z,Math.PI/4),$.viewport(0,0,64,64),$.clearColor(0,0,0,1),$.clear($.COLOR_BUFFER_BIT),$.drawArrays($.TRIANGLES,0,3);let K=new Uint8Array(16384);return $.readPixels(0,0,64,64,$.RGBA,$.UNSIGNED_BYTE,K),K}catch{return null}}async function h$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(typeof Z.WebGLRenderingContext>"u")return U("unsupported");let J=Q.createElement("canvas");J.width=64,J.height=64;let X=J.getContext("webgl")||J.getContext("experimental-webgl");if(!X)return U("blocked");let q=X.getExtension("WEBGL_debug_renderer_info"),z=q?X.getParameter(q.UNMASKED_VENDOR_WEBGL):null,K=q?X.getParameter(q.UNMASKED_RENDERER_WEBGL):null,V={};for(let j of WZ){let D=X[j];if(typeof D==="number"){let N=X.getParameter(D);V[j]=N instanceof Float32Array||N instanceof Int32Array?Array.from(N):N}}let B=DZ(X),G=B?await _(Array.from(B).join(",")):null,H={version:X.getParameter(X.VERSION),shadingLanguageVersion:X.getParameter(X.SHADING_LANGUAGE_VERSION),vendor:X.getParameter(X.VENDOR),renderer:X.getParameter(X.RENDERER),unmaskedVendor:z,unmaskedRenderer:K,webgl2:typeof Z.WebGL2RenderingContext<"u",extensions:X.getSupportedExtensions()??[],shaderPrecisions:GZ(X),parameters:V,shaderHash:G};return Y(H)})}catch{return U("iframe_error")}}var C=Math,E=()=>0;async function u$($){let Q=C.acos||E,Z=C.acosh||E,J=C.asin||E,X=C.asinh||E,q=C.atanh||E,z=C.atan||E,K=C.sin||E,V=C.sinh||E,B=C.cos||E,G=C.cosh||E,H=C.tan||E,j=C.tanh||E,D=C.exp||E,N=C.expm1||E,R=C.log1p||E,s=(O)=>C.pow(C.PI,O),t=(O)=>C.log(O+C.sqrt(O*O-1)),a=(O)=>C.log(O+C.sqrt(O*O+1)),e=(O)=>C.log((1+O)/(1-O))/2,$$=(O)=>(C.exp(O)-1/C.exp(O))/2,Q$=(O)=>(C.exp(O)+1/C.exp(O))/2,Z$=(O)=>C.exp(O)-1,J$=(O)=>(C.exp(2*O)-1)/(C.exp(2*O)+1),A=(O)=>C.log(1+O);return Y({acos:Q(0.12312423423423424),acosh:Z(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),acoshPf:t(10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),asin:J(0.12312423423423424),asinh:X(1),asinhPf:a(1),atanh:q(0.5),atanhPf:e(0.5),atan:z(0.5),sin:K(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),sinh:V(1),sinhPf:$$(1),cos:B(10.000000000123),cosh:G(1),coshPf:Q$(1),tan:H(-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),tanh:j(1),tanhPf:J$(1),exp:D(1),expm1:N(1),expm1Pf:Z$(1),log1p:R(10),log1pPf:A(10),powPI:s(-100)})}async function p$($){let Q=[],Z=Math.random();for(let J=1;J<=24576;J++){let X=Math.random();if(J%4096===0)Q.push((Z-X)*4294967295|0);Z=X}return Y({samples:[Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]]})}async function m$($){if(typeof navigator>"u"||!navigator.permissions)return U("unsupported");if(typeof window<"u"&&window.location.protocol!=="https:")return U("rejected");try{let Q=await navigator.permissions.query({name:"geolocation"});return Y({state:Q.state})}catch{return U("missing")}}var OZ=["clipboard-read","clipboard-write","notifications","push","camera","microphone","speaker-selection","device-info","background-sync","background-fetch","persistent-storage","midi","screen-wake-lock","nfc","accelerometer","gyroscope","magnetometer","payment-handler","window-management","storage-access","top-level-storage-access","local-fonts","captured-surface-control"];async function d$($){if(typeof navigator>"u"||!navigator.permissions)return U("unsupported");let Q={};return await Promise.all(OZ.map(async(Z)=>{try{let J=await navigator.permissions.query({name:Z});Q[Z]=J.state}catch{Q[Z]="unsupported"}})),Y(Q)}async function c$($){if(typeof window>"u"||typeof window.Notification>"u"||typeof navigator>"u"||!navigator.permissions)return U("unsupported");try{let Q=window.Notification.permission,J=(await navigator.permissions.query({name:"notifications"})).state;return Y({notificationPermission:Q,queryState:J,mismatch:Q==="denied"&&J==="prompt"})}catch{return U("unexpected")}}var PZ=["AccentColor","AccentColorText","ActiveText","ButtonFace","ButtonText","Canvas","CanvasText","Field","FieldText","GrayText","Highlight","HighlightText","LinkText","Mark","MarkText","SelectedItem","SelectedItemText","VisitedText","Scrollbar","Menu","MenuText","InfoBackground","InfoText","ActiveBorder","InactiveBorder","Window"];async function l$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("div");Q.body.appendChild(J);try{let X={};for(let z of PZ)J.style.color=z,X[z]=Z.getComputedStyle(J).color;if(new Set(Object.values(X)).size<=1)return U("unsupported");return Y(X)}finally{J.remove?.()}})}catch{return U("iframe_error")}}var FZ=(()=>{let $="";for(let Q=128512;Q<=128591;Q++)$+=String.fromCodePoint(Q);return $})();async function i$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("span");J.textContent=FZ,J.style.fontSize="32px",J.style.position="absolute",J.style.visibility="hidden",J.style.whiteSpace="nowrap",Q.body.appendChild(J);try{let X=J.getBoundingClientRect(),q=Z.getComputedStyle(J).fontFamily;return Y({width:X.width,height:X.height,font:q})}finally{J.remove?.()}})}catch{return U("iframe_error")}}async function o$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J="http://www.w3.org/1998/Math/MathML",X=Q.createElementNS(J,"math"),q=Q.createElementNS(J,"mi");q.textContent="x",X.appendChild(q),Q.body.appendChild(X);try{let z=X.getBoundingClientRect();if(z.width===0&&z.height===0)return U("unsupported");let K=Z.getComputedStyle(X).fontFamily;return Y({x:z.x,y:z.y,left:z.left,right:z.right,top:z.top,bottom:z.bottom,width:z.width,height:z.height,font:K})}finally{X.remove?.()}})}catch{return U("iframe_error")}}async function r$($){try{return await $.iframe.runInFrame(async({doc:Q})=>{if(!Q.body)return U("iframe_error");let Z=Q.createElement("div");Z.style.overflow="scroll",Z.style.width="100px",Z.style.height="100px",Z.style.position="absolute",Z.style.visibility="hidden";let J=Q.createElement("div");J.style.height="200px",Z.appendChild(J),Q.body.appendChild(Z);try{let X=Z.offsetWidth-Z.clientWidth,q=Z.offsetWidth!==Z.clientWidth||X>0;return Y({width:X,present:q})}finally{Z.remove?.()}})}catch{return U("iframe_error")}}async function n$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{if(!Q.body)return U("iframe_error");let J=Q.createElement("div");J.style.border="0.5px solid",J.style.height="0";let X=Q.createElement("div");X.style.width="calc(0.5px / 2)",Q.body.appendChild(J),Q.body.appendChild(X);try{let q=J.offsetHeight,z=Z.getComputedStyle(X).width;return Y({halfPixelBorder:q,halfPixelCalc:z})}finally{J.remove?.(),X.remove?.()}})}catch{return U("iframe_error")}}async function s$($){try{return await $.iframe.runInFrame(async({doc:Q,win:Z})=>{let J=Q.createElement("input");J.type="radio",Q.body?.appendChild(J);let X=Z.getComputedStyle(J).fontFamily;return J.remove?.(),Y({fontFamily:X})})}catch{return U("iframe_error")}}var wZ=50000,yZ=450;function kZ(){let $=1/0,Q=1/0,Z=performance.now();for(let J=0;J<wZ;J++){let X=performance.now(),q=X-Z;if(q>0){if(q<$)Q=$,$=q;else if(q<Q)Q=q}Z=X}return[Number.isFinite($)?$:0,Number.isFinite(Q)?Q:0]}function bZ(){let $=performance.now(),Q=0;while(performance.now()-$<yZ)performance.now(),Q++;return Q}async function t$($){if(typeof performance>"u"||typeof performance.now!=="function")return U("unsupported");let Q=kZ(),Z=bZ();return Y({deltas:Q,iterationsIn450ms:Z})}var a$=[new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,22,1,20,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,41,1,39,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,253,174,1,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,41,1,39,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,0,0,128,63,0,0,128,63,0,0,128,63,0,0,128,63,253,228,1,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,57,1,55,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,253,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,253,13,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,11]),new Uint8Array([0,97,115,109,1,0,0,0,1,7,1,96,1,127,1,123,3,2,1,0,5,3,1,0,1,10,11,1,9,0,32,0,253,0,4,0,11])];async function e$($){if(typeof WebAssembly>"u")return U("unsupported");let Q=0,Z=!0;for(let J=0;J<a$.length;J++)try{if(WebAssembly.validate(a$[J]))Q|=1<<J,Z=!1;else Z=!1}catch{}if(Z)return U("blocked");return Y({bitmap:Q})}async function $Q($){if(typeof SharedArrayBuffer>"u")return U("unsupported");return Y({maxBytes:4294967296,crossOriginIsolated:typeof window<"u"&&window.crossOriginIsolated===!0})}async function QQ($){let Q=null;if(typeof Intl<"u"&&Intl.DateTimeFormat)try{Q=new Intl.DateTimeFormat().resolvedOptions().timeZone??null}catch{}let Z=new Date().getFullYear(),J=-Math.max(new Date(Z,0,1).getTimezoneOffset(),new Date(Z,6,1).getTimezoneOffset());if(Q===null&&J===0&&typeof Intl>"u")return U("unsupported");return Y({iana:Q,offsetMinutes:J})}async function ZQ($){if(typeof Intl>"u"||!Intl.DateTimeFormat)return U("unsupported");try{let Q=new Intl.DateTimeFormat().resolvedOptions().locale;return Y({locale:Q})}catch{return U("unexpected")}}async function JQ($){if(typeof navigator>"u")return U("unsupported");let Q=navigator.language??navigator.userLanguage??navigator.browserLanguage??null,Z=[];if(Array.isArray(navigator.languages))Z=[...navigator.languages];else if(typeof navigator.languages==="string")Z=navigator.languages.split(",");return Z=Z.map((J)=>typeof J==="string"?J.trim():"").filter((J)=>J.length>0),Y({language:Q,languages:Z})}function r($){try{return typeof window[$]<"u"&&window[$]!==null}catch(Q){return Q instanceof DOMException&&Q.name==="SecurityError"}}async function XQ($){if(typeof window>"u")return Y({sessionStorage:!1,localStorage:!1,indexedDB:!1,openDatabase:!1});return Y({sessionStorage:r("sessionStorage"),localStorage:r("localStorage"),indexedDB:r("indexedDB"),openDatabase:r("openDatabase")})}async function YQ($){if(typeof navigator<"u"&&navigator.storage?.estimate)try{let Q=await navigator.storage.estimate();if(typeof Q.quota==="number")return Y({quota:Q.quota,path:"storage"})}catch{}if(typeof navigator<"u"&&navigator.webkitTemporaryStorage?.queryUsageAndQuota)try{let Q=await new Promise((Z,J)=>{navigator.webkitTemporaryStorage.queryUsageAndQuota((X,q)=>Z(q),(X)=>J(X))});return Y({quota:Q,path:"webkitTemporaryStorage"})}catch{}return U("unsupported")}var F=($)=>{if(typeof window>"u"||!window.matchMedia)return null;let Q=window.matchMedia($);return Q.media==="not all"?null:Q.matches};async function UQ($){if(typeof window>"u")return U("unsupported");let Q=typeof screen<"u"&&screen.colorDepth?screen.colorDepth:null,Z=null;if(F("(color-gamut: rec2020)"))Z="rec2020";else if(F("(color-gamut: p3)"))Z="p3";else if(F("(color-gamut: srgb)"))Z="srgb";let J=null;if(F("(prefers-contrast: forced)"))J="forced";else if(F("(prefers-contrast: more)"))J="more";else if(F("(prefers-contrast: less)"))J="less";else if(F("(prefers-contrast: no-preference)"))J="no-preference";let X=null;if(F("(monochrome)")!==null){let q=0,z=100;while(q<=z){let K=q+z>>1;if(F(`(min-monochrome: ${K})`))q=K+1;else z=K-1}X=z}return Y({colorDepth:Q,colorGamut:Z,hdr:F("(dynamic-range: high)"),contrast:J,invertedColors:F("(inverted-colors: inverted)"),reducedTransparency:F("(prefers-reduced-transparency: reduce)"),reducedMotion:F("(prefers-reduced-motion: reduce)"),monochrome:X,colorScheme:F("(prefers-color-scheme: dark)")===!0?"dark":F("(prefers-color-scheme: light)")===!0?"light":null})}async function qQ($){return Y({deviceMemory:typeof navigator<"u"&&typeof navigator.deviceMemory==="number"?navigator.deviceMemory:null,hardwareConcurrency:typeof navigator<"u"&&typeof navigator.hardwareConcurrency==="number"?navigator.hardwareConcurrency:null,devicePixelRatio:typeof window<"u"&&typeof window.devicePixelRatio==="number"?window.devicePixelRatio:null})}var lZ=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];function iZ(){if(typeof window>"u"||typeof navigator>"u")return!1;return/WebKit/i.test(navigator.userAgent??"")&&!/Chrome|Edg|OPR/i.test(navigator.userAgent??"")}async function zQ($){let Q=typeof navigator<"u"?navigator.platform||"":"";if(Q==="MacIntel"&&iZ()){if((navigator.maxTouchPoints??0)>1)Q=typeof navigator.userAgent==="string"&&/iPad/i.test(navigator.userAgent)?"iPad":"iPhone"}let Z=typeof navigator<"u"?navigator.vendor??"":"",J=[];if(typeof window<"u"){for(let X of lZ)if(typeof window[X]<"u")J.push(X)}return Y({platform:Q,vendor:Z,vendorFlavors:J})}async function KQ($){let Q=0;if(typeof navigator<"u"){if(typeof navigator.maxTouchPoints==="number")Q=navigator.maxTouchPoints;else if(typeof navigator.msMaxTouchPoints==="number")Q=navigator.msMaxTouchPoints}let Z=!1;try{if(typeof document<"u")document.createEvent("TouchEvent"),Z=!0}catch{}let J=typeof window<"u"&&"ontouchstart"in window;return Y({maxTouchPoints:Q,touchEvent:Z,touchStart:J})}function w($){return $!==null&&(typeof $==="object"||typeof $==="function")}async function VQ($){if(typeof navigator>"u"||!navigator.plugins)return U("unsupported");let Q=navigator.plugins,Z=[];for(let z=0;z<Q.length;z++){let K=Q[z],V=[];for(let B=0;B<K.length;B++){let G=K[B];V.push({type:G.type,suffixes:G.suffixes})}Z.push({name:K.name,description:K.description,mimeTypes:V})}let J=!0;for(let z=0;z<Q.length;z++){let K=Q[z];if(!w(K)){J=!1;break}if(typeof Plugin<"u"&&Object.getPrototypeOf(K)!==Plugin.prototype){J=!1;break}}let X=navigator.mimeTypes,q=!0;if(w(X))for(let z=0;z<X.length;z++){let K=X[z];if(!w(K)){q=!1;break}if(typeof MimeType<"u"&&Object.getPrototypeOf(K)!==MimeType.prototype){q=!1;break}}return Y({plugins:Z,pluginsLength:Q.length,pdfViewerEnabled:typeof navigator.pdfViewerEnabled==="boolean"?navigator.pdfViewerEnabled:null,prototypesIntact:{pluginArray:w(Q)&&typeof PluginArray<"u"&&Object.getPrototypeOf(Q)===PluginArray.prototype,pluginItems:J,mimeArray:w(X)&&typeof MimeTypeArray<"u"&&Object.getPrototypeOf(X)===MimeTypeArray.prototype,mimeItems:q}})}function WQ(){return(Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)).slice(0,16)}function sZ($,Q,Z){let J=`${Q}=${Z}`;for(let X of $.split(";"))if(X.trim()===J)return!0;return!1}async function GQ($){if(typeof document>"u")return Y({enabled:!1});let Q=`rupt_probe_${WQ()}`,Z=WQ();try{document.cookie=`${Q}=${Z}; Path=/; SameSite=Strict`;let J=sZ(document.cookie,Q,Z);if(J)document.cookie=`${Q}=; Path=/; SameSite=Strict; Max-Age=0`;return Y({enabled:J})}catch{return Y({enabled:!1})}}async function BQ($){return Y({userAgent:typeof navigator<"u"?navigator.userAgent||"":"",appVersion:typeof navigator<"u"?navigator.appVersion||"":""})}async function HQ($){let Q=typeof navigator<"u"?navigator.connection:void 0;if(!Q)return U("unsupported");return Y({rtt:typeof Q.rtt==="number"?Q.rtt:void 0,effectiveType:typeof Q.effectiveType==="string"?Q.effectiveType:void 0,downlink:typeof Q.downlink==="number"?Q.downlink:void 0,saveData:typeof Q.saveData==="boolean"?Q.saveData:void 0})}async function DQ($){if(typeof Float32Array>"u"||typeof Uint8Array>"u")return U("unsupported");let Q=new Float32Array(1);Q[0]=NaN;let Z=new Uint8Array(Q.buffer);return Y({byte:Z[3]})}async function LQ($){let Q={evalLength:null,serviceWorkerPrototype:null,isSecureContext:null,backdropFilter:null,sourceBufferTypes:null,productSub:null,windowCloseToString:null,bindToString:null,errorStack:null,onLine:null};try{let Z=globalThis.eval;if(typeof Z==="function")Q.evalLength=Z.toString().length}catch{}try{Q.serviceWorkerPrototype=typeof Navigator<"u"&&"serviceWorker"in Navigator.prototype}catch{}try{Q.isSecureContext=typeof window<"u"?window.isSecureContext:null}catch{}try{Q.backdropFilter=typeof CSS<"u"&&CSS.supports?CSS.supports("backdrop-filter","blur(2px)"):null}catch{}try{Q.sourceBufferTypes=[typeof window.SourceBuffer,typeof window.SourceBufferList]}catch{}try{Q.productSub=typeof navigator<"u"?navigator.productSub??null:null}catch{}try{Q.windowCloseToString=typeof window<"u"?window.close.toString():null}catch{}try{Q.bindToString=Function.prototype.bind.toString()}catch{}try{null[0]()}catch(Z){Q.errorStack=typeof Z?.stack==="string"?Z.stack:null}try{Q.onLine=typeof navigator<"u"?navigator.onLine:null}catch{}return Y(Q)}async function CQ($){if(typeof window>"u")return Y({present:!1});let Q=window.process;if(typeof Q>"u")return Y({present:!1});try{return Y({present:!0,type:typeof Q.type==="string"?Q.type:void 0,versions:Q.versions&&typeof Q.versions==="object"?{electron:Q.versions.electron,node:Q.versions.node,chrome:Q.versions.chrome}:void 0})}catch{return Y({present:!0})}}async function AQ($){if(typeof Event>"u")return U("unsupported");try{return Y({isTrusted:new Event("x").isTrusted})}catch{return U("unexpected")}}var XJ=["awesomium","RunPerfTest","CefSharp","emit","fmget_targets","geb","__nightmare","nightmare","__phantomas","callPhantom","_phantom","spawn","_Selenium_IDE_Recorder","_selenium","calledSelenium","wdioElectron","webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","domAutomation","domAutomationController","__playwright__","__puppeteer_evaluation_script__"],YJ=["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped","__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","$cdc_asdjflasutopfhvcZLmcf","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"],UJ=/^([a-z]){3}_.*_(Array|Promise|Symbol)$/;async function jQ($){let Q=[],Z=[],J=[];if(typeof window<"u"){for(let X of XJ)try{if(typeof window[X]<"u")Q.push(X)}catch{}try{for(let X of Object.getOwnPropertyNames(window))if(UJ.test(X))J.push(X)}catch{}}if(typeof document<"u")for(let X of YJ)try{if(typeof document[X]<"u")Z.push(X)}catch{}return Y({windowHits:Q,documentHits:Z,headlessRegexMatches:J})}async function OQ($){if(typeof navigator>"u")return Y({webdriver:"undefined"});let Q=navigator.webdriver;if(Q===null)return Y({webdriver:"null"});if(typeof Q>"u")return Y({webdriver:"undefined"});return Y({webdriver:!!Q})}async function NQ($){let Q=!1,Z=!1;try{let J=Error("rupt-probe");if(Object.defineProperty(J,"stack",{get(){return Q=!0,""}}),typeof console<"u"&&console.debug)console.debug(J)}catch{}try{Z=typeof globalThis.objectToInspect<"u"}catch{}return Y({stackGetter:Q,objectToInspect:Z})}var VJ=["onLine","webdriver","getGamepads"],WJ=[["HTMLElement.offsetWidth",()=>typeof HTMLElement<"u"?HTMLElement.prototype:null,"offsetWidth"],["Navigator.userAgent",()=>typeof Navigator<"u"?Navigator.prototype:null,"userAgent"],["Navigator.platform",()=>typeof Navigator<"u"?Navigator.prototype:null,"platform"],["Screen.width",()=>typeof Screen<"u"?Screen.prototype:null,"width"]],GJ=["window","document","location","navigator","screen","history","console","Function","Object","Array","Math","Date","JSON","Promise","Symbol","Map","Set","WeakMap","WeakSet","Proxy","Reflect","RegExp","String","Number","Boolean","Error"];async function RQ($){let Q=[],Z=[],J={},X=[],q=[];try{if(typeof navigator<"u"){Q=Object.getOwnPropertyNames(Object.getPrototypeOf(navigator));for(let z of VJ){let K=Q.indexOf(z);if(K>=0)Z.push({name:z,index:K})}}}catch{}for(let[z,K,V]of WJ)try{let B=K();if(!B)continue;let G=Object.getOwnPropertyDescriptor(B,V);if(G?.get)J[z]=G.get.toString()}catch{}try{if(typeof window<"u"){let z=Object.getOwnPropertyNames(window);for(let K of z){if(!/^[A-Z]/.test(K))continue;if(!GJ.some((V)=>K.startsWith(V))&&!/^(HTML|SVG|XML|CSS|Animation|Audio|Worker|Element|Event|File|Font|Form|Image|Intl|Path|Performance|Pointer|Range|Resource|Storage|Style|Touch|UI|URL|Video|Web|Window)/.test(K))X.push(K)}}}catch{}try{if(typeof document<"u"&&document.documentElement)q=document.documentElement.getAttributeNames()}catch{}return Y({navPrototypeNames:Q,navPrototypeFingerprint:{length:Q.length,positions:Z},getterSources:J,globalsPresent:{Function:typeof Function<"u",Object:typeof Object<"u"},suspiciousGlobals:X,documentElementAttributes:q})}function HJ($){if(!$)return"";try{return new URL($).origin}catch{return""}}async function PQ($){let Q=[],Z=!1,J=!1;if(typeof window>"u")return Y({frames:Q,crossOriginBoundary:Z,topReached:!0});let X=window,q=0;while(X&&q<20){try{Q.push({origin:X.location.origin,pathname:X.location.pathname,referrerOrigin:HJ(X.document.referrer)})}catch{Z=!0;break}if(X.parent===X){J=!0;break}X=X.parent,q++}return Y({frames:Q,crossOriginBoundary:Z,topReached:J})}async function EQ($){if(typeof URL>"u")return U("unsupported");try{return Y({protocol:new URL("C:/").protocol})}catch{return U("unexpected")}}async function FQ($){if(typeof window>"u")return U("unsupported");try{if(typeof window.external>"u")return U("unsupported");return Y({value:String(window.external)})}catch{return U("unexpected")}}async function _Q($){if(typeof globalThis.DeviceOrientationEvent>"u")return U("unsupported");return Y({hasPermissionAPI:typeof globalThis.DeviceOrientationEvent.requestPermission==="function"})}async function IQ($){let Q=typeof navigator<"u"?navigator.mediaDevices:void 0;return Y({present:!!Q,getUserMediaPresent:typeof Q?.getUserMedia==="function",enumerateDevicesPresent:typeof Q?.enumerateDevices==="function"})}var OJ=/https?:\/\/([^\/\s)]+)/;async function TQ($){let Q;try{throw Error("probe")}catch(K){Q=typeof K?.stack==="string"?K.stack:void 0}if(!Q)return U("unsupported");let Z=Q.split(`
18
+ `).filter((K)=>K.trim().length>0),J=null;for(let K of Z){let V=K.match(OJ);if(V){J=V[1];break}}let X=!!Z[0]?.startsWith("Error"),q=X?"v8":Z[0]?.includes("@")?"spidermonkey":"unknown",z=X?Math.max(0,Z.length-1):Z.length;return Y({host:J,formatPattern:q,framesCount:z})}function W($,Q){return Q.then((Z)=>[$,Z],()=>[$,{s:"unexpected",v:null}])}async function n($=i()){try{return await RJ($)}finally{$.iframe.destroy()}}async function RJ($){let Q=await Promise.all([W("widevine",O$($)),W("drm_full",N$($)),W("uach",R$($)),W("ua_string",BQ($)),W("platform_vendor",zQ($)),W("navigator_webdriver",OQ($)),W("screen_frame",P$($)),W("screen_resolution",E$($)),W("window_dimensions",F$($)),W("display_preferences",UQ($)),W("hardware",qQ($)),W("speech_voices",_$($)),W("fonts",T$($)),W("font_preferences",M$($)),W("fontface_load",S$($)),W("emoji",i$($)),W("mathml",o$($)),W("scrollbar",r$($)),W("half_pixel",n$($)),W("radio_default_font",s$($)),W("css_system_colors",l$($)),W("audio",k$($)),W("canvas",v$($)),W("seeded_canvas",f$($)),W("webgl",h$($)),W("math_ops",u$($)),W("math_random",p$($)),W("architecture_nan",DQ($)),W("engine_probes",LQ($)),W("timer_resolution",t$($)),W("wasm_simd",e$($)),W("shared_array_buffer",$Q($)),W("url_parser",EQ($)),W("timezone",QQ($)),W("locale",ZQ($)),W("languages",JQ($)),W("geolocation_permission",m$($)),W("permissions_map",d$($)),W("notifications_spoof",c$($)),W("storage_apis",XQ($)),W("storage_quota",YQ($)),W("cookie_enabled",GQ($)),W("touch",KQ($)),W("plugins",VQ($)),W("device_orientation_permission",_Q($)),W("media_devices",IQ($)),W("connection",HQ($)),W("bot_globals",jQ($)),W("event_istrusted",AQ($)),W("window_process",CQ($)),W("window_external",FQ($)),W("devtools_open",NQ($)),W("prototype_integrity",RQ($)),W("frame_ancestry",PQ($)),W("error_stack",TQ($))]);return Object.fromEntries(Q)}class q${apiOrigin;debug;iframe=null;iframeReady;warmupPromise=null;pending=new Map;rpcCounter=0;constructor($){this.apiOrigin=$.apiOrigin.replace(/\/+$/,""),this.debug=$.debug??!1,this.iframeReady=this.installIframe()}warmup(){if(!this.warmupPromise)this.warmupPromise=(async()=>{try{await this.iframeReady;let $=await this.send({kind:"warm",payload:{type:"warm",id:this.nextId()}});if(!$.ok)throw Error(`warm handshake rejected (status ${$.status}${$.error?`: ${$.error}`:""})`)}catch($){if(this.debug)console.error("[Rupt] transport.warmup failed",$);this.warmupPromise=null}})();return this.warmupPromise}async post($,Q,Z={}){await this.warmup();let J=await this.send({kind:"rpc",payload:{type:"rpc",id:this.nextId(),path:$,body:Q,attachNonce:Z.attachNonce!==!1,authorization:Z.authorization}});return{ok:J.ok,status:J.status,data:J.data}}nextId(){return`r${++this.rpcCounter}-${Date.now().toString(36)}`}send($){return new Promise((Q,Z)=>{if(!this.iframe||!this.iframe.contentWindow)return Z(Error("Rupt transport iframe is not ready"));let J=$.payload.id,X=setTimeout(()=>{if(this.pending.delete(J))Z(Error("Rupt transport request timed out"))},30000);this.pending.set(J,{resolve:(q)=>{clearTimeout(X),Q(q)},reject:(q)=>{clearTimeout(X),Z(q)}});try{this.iframe.contentWindow.postMessage($.payload,this.apiOrigin)}catch(q){clearTimeout(X),this.pending.delete(J),Z(q)}})}installIframe(){if(typeof window>"u")return Promise.resolve();return new Promise(($,Q)=>{let Z=document.createElement("iframe");Z.setAttribute("aria-hidden","true"),Z.style.display="none",Z.style.width="0",Z.style.height="0",Z.style.border="0",Z.src=`${this.apiOrigin}/v3/transport/iframe.html`,this.iframe=Z;let J=!1,X=()=>{if(J)return;J=!0,clearTimeout(K),$()},q=(B)=>{if(J)return;if(J=!0,clearTimeout(K),window.removeEventListener("message",z),Z.parentNode)Z.parentNode.removeChild(Z);if(this.iframe===Z)this.iframe=null;Q(B)},z=(B)=>{if(B.origin!==this.apiOrigin)return;if(B.source!==Z.contentWindow)return;let G=B.data;if(!G||typeof G!=="object")return;if(G.type==="ready"){X();return}if(G.type==="warm_done"||G.type==="rpc_done"){let H=this.pending.get(G.id);if(!H)return;if(this.pending.delete(G.id),G.error)H.reject(Error(G.error));else H.resolve(G);return}},K=setTimeout(()=>q(Error("Rupt transport iframe never posted `ready` within timeout")),15000);Z.addEventListener("error",()=>q(Error("Rupt transport iframe failed to load"))),window.addEventListener("message",z),(()=>{if(document.body)document.body.appendChild(Z);else window.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(Z)})})()})}}class z${config;eventSource=null;constructor($){this.config=$}start(){let{apiOrigin:$,clientId:Q,evaluationId:Z,version:J}=this.config,X=`${$}/v3/listen/evaluation/${Z}?version=${J}&auth=Basic ${Q}:`;this.eventSource=new EventSource(X),this.eventSource.onmessage=async(q)=>{let z;try{z=JSON.parse(q.data)}catch{return}if(z?.action==="logout"){try{if(await this.config.onLogout?.({challenge:z.challenge?._id})===!1)return}catch(K){if(this.config.debug)console.error("[Rupt] onLogout callback error",K)}if(z.url)window.location.href=z.url}}}stop(){if(this.eventSource)this.eventSource.close(),this.eventSource=null}}var PJ="https://api.rupt.dev",y="3.0.0",EJ="harbor.lantern",FJ=new Set(["access","login","signup","warm","fingerprint"]);function _J($){let Q=$.trim().replace(/\/+$/,"");return/^https?:\/\//i.test(Q)?Q:`https://${Q}`}class MQ{clientId;debug;onLogout;apiOrigin;transport;warmupPromise;warmSignalContext=null;listener=null;evaluate;constructor($){if($.debug)console.log("[Rupt]","Debug mode enabled"),console.log("[Rupt]","Version ID:",EJ);if(!$?.clientId)throw Error("Rupt: `clientId` is required");if(this.clientId=$.clientId,this.debug=$.debug??!1,this.onLogout=$.on_logout,this.apiOrigin=$.domain?_J($.domain):PJ,this.transport=new q$({apiOrigin:this.apiOrigin,debug:this.debug}),this.warmupPromise=this.transport.warmup(),typeof document<"u")this.warmSignalContext=i();let Q=(Z,J)=>this._evaluateCustom(Z,J);Q.access=(Z)=>this._evaluateAccess(Z),Q.login=(Z)=>this._evaluateAuthEvent("login",Z),Q.signup=(Z)=>this._evaluateAuthEvent("signup",Z),this.evaluate=Q}consumeWarmContext(){let $=this.warmSignalContext;return this.warmSignalContext=null,$??void 0}async fingerprint(){try{let $=await n(this.consumeWarmContext());return(await this.transport.post("/v3/evaluate/fingerprint",{fp_signals:$,version:y},{authorization:`Basic ${this.clientId}:`})).data}catch($){if(this.debug)console.error("[Rupt]",$);return null}}ready(){return this.warmupPromise}async _evaluateAccess($){try{let Q=await l(),Z={user:$.user!==void 0?String($.user):void 0,device_signals:Q,fp_signals:void 0,metadata:$.metadata,origin_url:typeof window<"u"?window.location.href:void 0,client:"javascript",version:y,page:typeof window<"u"?window.location.href:void 0,email:$.email,phone:$.phone,groups:$.groups,devdata:$.devdata},X=(await this.transport.post("/v3/evaluate/access",Z,{authorization:`Basic ${this.clientId}:`})).data;if(this.debug)console.log("[Rupt]","Successfully evaluated access.");if($.auto_challenge!==!1&&X?.redirect&&typeof window<"u")return window.location.href=X.redirect,null;if(X?.evaluation_id)this.startListener({evaluationId:X.evaluation_id,onLogout:$.on_logout??this.onLogout});return X}catch(Q){if(this.debug)console.error("[Rupt]",Q);return null}}async _evaluateAuthEvent($,Q){try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(Q.auto_challenge===!0&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}async _evaluateCustom($,Q){if(FJ.has($))throw Error(`Rupt: "${$}" is a reserved action. Use rupt.evaluate.access / .login / .signup or rupt.fingerprint() instead.`);try{let Z=this.consumeWarmContext(),[J,X]=await Promise.all([l(),n(Z)]),q={user:Q.user!==void 0?String(Q.user):void 0,email:Q.email,phone:Q.phone,metadata:Q.metadata,device_signals:J,fp_signals:X,version:y,origin_url:typeof window<"u"?window.location.href:void 0},K=(await this.transport.post(`/v3/evaluate/${$}`,q,{authorization:`Basic ${this.clientId}:`})).data;if(Q.auto_challenge===!0&&K?.redirect&&typeof window<"u")return window.location.href=K.redirect,null;return K}catch(Z){return console.error("[Rupt]",Z),null}}startListener($){this.listener?.stop(),this.listener=new z$({apiOrigin:this.apiOrigin,clientId:this.clientId,evaluationId:$.evaluationId,version:y,onLogout:$.onLogout,debug:this.debug}),this.listener.start()}}var e8=MQ;export{e8 as default,MQ as Rupt,PJ as BASE_URL};