/* This software Connector and its source code are the property of Contxtful Technologies Inc. Use of this script is Subject to the terms and conditions of the License Agreement. As a subscriber, you agree that you are solely responsible for providing all appropriate and legally required disclosures pertaining to the use and removal of the Connector(s) and obtain any legally required consents as needed, and you agree that it will defend, indemnify and hold Contxtful Technologies Inc. harmless from and against any and all third-party claims stemming from or related to the use of Tags as provided herein. */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(f){var k=0;return function(){return ka){var b=void 0;a=Math.round(Math.random()*(void 0===b?100:b))m;m++){var d=h&255;l[t++]=d;h=(h-d)/256}}function e(h){if("undefined"!==typeof h&&h.length)for(var m=0;m=ia)return;1==Pa&&(-1!==["FIRST","STOP","TRIGGER","MANUAL"].indexOf(d)||5>v.counter||1==Qa?eb():F={});F.ctxtpc=v.counter;n.postCount=v.counter;1==y&&setTimeout(function(){v({autopost:y,noRawData:x,async:w})},250);n.tBrowser=f();n.other=ca(F);n.uField=ca(ka);n.cParam=ca(la);var z=1E3* ((new Date).getTime()-L);if(z<2E3*G||1==x){var ma=0;n.ctxtReq=ca(Ra);n.eDesc="WEB_"+d+"_POST";0==v.counter?n.key=na+"_STATS":"RUNTIME"===d?n.eDesc="WEB_RUNTIME":"RUNTIME"!==d&&"FIRST_POST"!==d&&"TRAFFIC"!==d&&u!=C&&(z=z*C/u);n.url="";n.originUrl="";n.uaStr="";if("FIRST"==d||"STOP"==d||5>v.counter||1==Qa)n.url=window.location.href,n.originUrl=document.referrer,n.uaStr="NaN";for(var D in n)n[D]=encodeURIComponent(n[D]);if(0==x){n.key="TRAFFIC"==d||"MANUAL"==d?na+"_"+d:na+"_STATS";D=function(kb){return 0!= kb};var B;var E=0;if(U.some(D)||da.some(D)||ea.some(D)){I.sensorsWorking=!0;var P=1}else I.sensorsWorking=!1,P=0;D=oa.some(D)||pa.some(D)||qa.some(D)?1:0;for(B=E=0;Blb?!0:!1:E>mb?!0:!1;B=D&P;E=3*(P+D+B);1==V&&0==Pa&&ja();var W=a;if("TRIGGER"==d||"MANUAL"==d)W=C;ma="undefined"!==typeof O&&0c;c++)g=a&255,a>>=8,b[c]=g;a=Oa(b,e);"undefined"!==typeof a&&Q(a);return a}}function M(a,b,c,e){e=void 0=== e?-1:e;-1!=e?c.AddFloat32Array(a.slice(b,e)):(b!=C&&c.AddFloat32Array(a.slice(b,C)),0!=b&&(b>C&&(b=C),c.AddFloat32Array(a.slice(0,b))))}function ob(){fa>G&&(L+=fa-G);v({async:Y,CtxtEvent:"RUNTIME",dataSize:0});L=(new Date).getTime();v.counter>=Da&&(clearInterval(R),R=null,v({noRawData:!0,async:!0,CtxtEvent:"STOP"}))}function Ea(){Z=!0;null===R&&1==X&&(L=(new Date).getTime(),f(),ClearDiscreteEvents(),Na(Fa)||(xa=!1,R=setInterval(ob,fa)))}function Ga(a){0==u&&(L=(new Date).getTime(),f(),1==X&&ClearDiscreteEvents()); null==a.acceleration.x&&null==a.acceleration.y&&null==a.acceleration.z&&1==X?Ea():Z=!1;var b=Ha?-1:1;null!=a.accelerationIncludingGravity?(U[u]=b*a.accelerationIncludingGravity.x,da[u]=b*a.accelerationIncludingGravity.y,ea[u]=b*a.accelerationIncludingGravity.z):(U[u]=0,da[u]=0,ea[u]=0);null!=a.acceleration?(ya[u]=b*a.acceleration.x,za[u]=b*a.acceleration.y,Aa[u]=b*a.acceleration.z):(ya[u]=0,za[u]=0,Aa[u]=0);null!=a.rotationRate?(oa[u]=a.rotationRate.alpha*Ia,pa[u]=a.rotationRate.beta*Ia,qa[u]=a.rotationRate.gamma* Ia):(oa[u]=0,pa[u]=0,qa[u]=0);a=(new Date).getTime()-L;"undefined"===typeof aa||isNaN(aa)||(G=1E3*aa);a>G/2&&(C=Ua(u,G/a),Ja=!0);u+=1;1==V&&a>pb&&(a=C,C=u,Z=!1,v({async:Y,CtxtEvent:"TRAFFIC",dataSize:u}),C=a,V=!1);1==Ja&&u>=C&&(0==Va&&(v({async:Y,CtxtEvent:"RUNTIME",dataSize:C}),Ka=(new Date).getTime()),L-Ka>=fa&&(v({async:Y,CtxtEvent:"RUNTIME",dataSize:C}),Ka=L),Va+=1,u=0,Ja=!1)}function Ua(a,b,c){a=Math.round(a*b);if(void 0===c||c){c=1;if(!a||a&a-1)for(;c>=1;)e<<=1;b=e}a=c-aJ&&(a=J);return a}function Wa(a){a=void 0===a?"FIRST":a;I.sampling=!0;if("undefined"!=typeof Dfp)if(Dfp.setReceptivity()){if("legacy"===S||q())V=!1}else"undefined"===typeof contxtful_config&&Xa(),q()&&(ta=1);"undefined"!==typeof screen&&(F.w=screen.width,F.y=screen.height,F.z=window.devicePixelRatio);gb(a);u=0;"DeviceMotionEvent"in window?(window.addEventListener("devicemotion",Ga,!1),Ha&&Ea(),setTimeout(window.removeEventListener,18E5,"devicemotion",Ga)): Ea();1==X&&startScreenSensors()}function ja(){I.sampling&&(I.sampling=!1,v({noRawData:!0,async:!0,CtxtEvent:"STOP"}),window.removeEventListener("devicemotion",Ga),1==X&&stopScreenSensors(),null!=R&&(clearInterval(R),R=null),null!=Ya&&(clearInterval(Ya),Z=!1))}function Xa(){if("undefined"!=typeof Dfp)try{if(!Dfp.callbackInjection("-1",Dfp.getLookAlike()))Za();else if(!p()){var a=void 0,b=void 0;a=void 0===a?"WEB_TRAFFIC_POST":a;b=void 0===b?"":b;var c={url:encodeURIComponent(window.location.href), originURL:encodeURIComponent(document.referrer),key:na+"_TRAFFIC",eDesc:a,userIdInternal:n.userIdInternal,userIdClient:n.userIdClient,tBrowser:f(),other:encodeURIComponent(b)};1==xa&&(c.Acq="N");a=void 0;a=void 0===a?!0:a;var e=va(0,c);e.AddObj(c);var g=e.GetBuffer();Ta(!0,!0,g,!0,!1,a);r(JSON.stringify(Dfp.getLookAlike()))}}catch(l){Za()}}function Za(){$a++;2>=$a&&setTimeout(function(){Xa()},500)}var I={cicalls:[],ptim:[],clc:0,sicalls:[]},T=document.currentScript.getAttribute("src"),G=1E3,C=Ua(32* G/1E3,2),n={},Ra={},ka={},F={},la={},L=0,nb=-1,ua="Y",La=0,aa=1,ha=100,Ba="cracq",Ca="ctxtfl.com/",sa="ctxtfl.com/";Ca=k("PostDomain",Ca)+"/";sa=k("PostDomain",sa)+"/";Ba=k("PostPath",Ba);var jb=!0,ia=5,Fa=0,Da=5,S="legacy",N=!1;Da=k("DesktopMaxPost",Da);Fa=k("DesktopPercentage",Fa);N=k("DesktopEnabled",N);S=k("CertificationMode",S);"undefined"!=typeof contxtful_config&&contxtful_config.hasOwnProperty("manual")&&1==contxtful_config.manual&&(S="high-precision");var Y=!0,V=!1,ta=0,Pa=!0,mb=16,lb=4, na=function(){var a="undefined"!=typeof contxtful_config?contxtful_config.tag_id:K(T).id;if(20b;b++){var e=c[b].charCodeAt();if(e<"0".charCodeAt()||e>"9".charCodeAt()&&e<"A".charCodeAt()||e>"Z".charCodeAt()&&e<"a".charCodeAt()||e>"z".charCodeAt()){b=!1;break b}}b=!0}if(b){b="";for(e=0;e4*e-3?e=0:(e=Math.floor(4*e-3),100