jslib-nightly
Version:
SheerID JavaScript Library
9 lines • 3 kB
JavaScript
/*!
*
* VERSION: undefined
* BUILD_TIMESTAMP: 1622760645472
* BUILD_DATE: Thu Jun 03 2021 22:50:45 GMT+0000 (Coordinated Universal Time)
* BUILD_COMMIT: undefined
*/
window.sheerIdPubV="undefined",(window.webpackJsonpsheerid=window.webpackJsonpsheerid||[]).push([[0],{577:function(e,t,n){"use strict";n.r(t),n.d(t,"ThreatMetrix",(function(){return r}));const r=(()=>{let e=window.hp_frame||null,t=window.tmx_frame||null,n=window.tmx_script||null;var r=r||{};return r.version=3,r.create_url=function(e,t,n,c,o){function i(){return Math.floor(2742745743359*Math.random())}function a(){return u(i())}function u(e){return(e+78364164096).toString(36)}var l=i(),s=i(),d=885187064159;s=((s=s-s%256+r.version)+l)%2742745743359,d=(d+l)%2742745743359;var p="https://"+e+"/"+(l=a()+u(l))+t,m=[(s=u(d)+u(s))+"="+n,a()+a()+"="+c];return void 0!==o&&o.length>0&&m.push(a()+a()+"="+o),p+"?"+m.join("&")},r.beacon=function(e,t,n,r){var c="turn:aa.online-metrix.net?transport=",o="1:"+t+":"+n,i={iceServers:[{urls:c+"tcp",username:o,credential:n},{urls:c+"udp",username:o,credential:n}]};try{var a=new RTCPeerConnection(i);a.createDataChannel(Math.random().toString());var u=function(){},l=function(e){a.setLocalDescription(e,u,u)};"undefined"==typeof Promise||a.createOffer.length>0?a.createOffer(l,u):a.createOffer().then(l,u)}catch(e){}},r.load_tags=function(e,t,n,c){r.beacon(e,t,n,c);var o=document.getElementsByTagName("head").item(0),i=document.createElement("script");i.id="tmx_tags_js",i.setAttribute("type","text/javascript");var a=r.create_url(e,".js",t,n,c);i.setAttribute("src",a),r.set_csp_nonce(i),o.appendChild(i)},r.load_iframe_tags=function(e,t,n,c){r.beacon(e,t,n,c);var o=r.create_url(e,".htm",t,n,c),i=document.createElement("iframe");i.title="empty",i.setAttribute("aria-disabled","true"),i.width="0",i.height="0",i.setAttribute("style","color:rgba(0,0,0,0); float:left; position:absolute; top:-200; left:-200; border:0px"),i.setAttribute("src",o),document.body.appendChild(i)},r.csp_nonce=null,r.register_csp_nonce=function(e){if(void 0!==e.currentScript&&null!==e.currentScript){var t=e.currentScript.getAttribute("nonce");null!=t&&""!==t?r.csp_nonce=t:void 0!==e.currentScript.nonce&&null!==e.currentScript.nonce&&""!==e.currentScript.nonce&&(r.csp_nonce=e.currentScript.nonce)}},r.set_csp_nonce=function(e){null!==r.csp_nonce&&(e.setAttribute("nonce",r.csp_nonce),e.getAttribute("nonce")!==r.csp_nonce&&(e.nonce=r.csp_nonce))},r.cleanup=function(){for(;null!==(e=document.getElementById("tdz_ifrm"));)e.parentElement.removeChild(e);for(;null!==(t=document.getElementById("tmx_tags_iframe"));)t.parentElement.removeChild(t);for(;null!==(n=document.getElementById("tmx_tags_js"));)n.parentElement.removeChild(n)},r.profile=function(e,t,n,c){r.cleanup(),r.register_csp_nonce(document),r.load_tags(e,t,n,c)},r.profile_iframe=function(e,t,n,c){r.cleanup(),r.register_csp_nonce(document),r.load_iframe_tags(e,t,n,c)},r})()}}]);
//# sourceMappingURL=Tmetrix.bundle.js.map