/* Copyright (c) 2008-2022, Quantcast Corp. https://www.quantcast.com/legal/license */ !function(window){function RequireDependencyError(t){Error.apply(this),this.name="RequireDependencyError",this.message=t||""}RequireDependencyError.prototype=Error.prototype;var amd={},definitions={};amd.require=function(t,e){"function"==typeof t&&(e=t,t=[]);for(var n=[],r=0;r0;)e.shift()()};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",n,!1),window.attachEvent("onload",n)),this.ready=function(n){t?n():e.push(n)}}return(new t).ready}),define("quant/promise",[],function(){function t(u){var c,s,f=[],l=e,p=function(t){return t},d=function(t,e,n,r){try{var a=t(r);o(a)?(a.then(e),a.catch(n)):e(a)}catch(t){n(t)}},h=function(t){c=t,l=n,f.forEach(function(e){e.push(t),d.apply(0,e)})},v=function(t){s=t,l=r,f.forEach(function(e){e[r](t)})},g=function(t,e,n){return function(r){d(t,e,n,r)}};try{u(h,v)}catch(t){v(t)}return{then:function(o){switch(l){case e:return new t(function(t,e){f.push([o,t,e])});case n:return a(o(c));case r:return i(s)}},catch:function(o){switch(l){case e:return new t(function(t,e){f.push([p,t,g(o,t,e)])});case n:return a(c);case r:return a(o(s))}}}}var e=0,n=1,r=2,o=function(t){return"object"==typeof t&&"then"in t&&"function"==typeof t.then},a=function(t){return o(t)?t:{then:function(e){return a(e(t))},catch:function(){return this}}},i=function(t){return{then:function(){return this},catch:function(e){return a(e(t))}}};return t.resolve=a,t.reject=i,t.all=function(t){return t.length?t.map(function(t){return t.then(function(t){return[t]})}).reduce(function(t,e){return t.then(function(t){return e.then(function(e){return t.concat(e)})})}):a([])},t}),define("quant/loader",["quant/ready","quant/promise"],function(t,e){function n(n,r){var o,a=[];t(function(){o=r.getElementsByTagName("head")[0]});var i=function(t){var e=new Image;return e.src=t,e};this.image=function(t){return new e(function(e,n){var r=i(t);a.push(r),r.onload=function(){e(r),a.shift(),delete r.onload,delete r.onerror},r.onerror=n})},this.beacon=function(t){var e=n.navigator;e&&e.sendBeacon?e.sendBeacon(t):i(t)};var u=function(t,e,n){var o=r.createElement("script");o.type="text/javascript",o.src=t;var a=function(){e(o),o.onreadystatechange=null,o.onload=null,o.onerror=null};return o.onload=a,o.onreadystatechange=function(){o.readyState in{loaded:1,complete:1}&&a()},o.onerror=n,o};this.script=function(n){return new e(function(e,r){t(function(){var t=u(n,e,r);o.firstChild?o.insertBefore(t,o.firstChild):o.appendChild(t)})})}}return n}),define("quant/event",[],function(){function t(){this.add=function(t,e,n){t.addEventListener?t.addEventListener(e,n):"function"==typeof jQuery?jQuery(t).on(e,n):t.attachEvent&&t.attachEvent("on"+e,n)},this.remove=function(t,e,n){t.removeEventListener?t.removeEventListener(e,n):"function"==typeof jQuery?jQuery(t).off(e,n):t.detachEvent&&t.detachEvent("on"+e,n)},this.trigger=function(t,e,n){var r=t.ownerDocument;if(t.dispatchEvent&&r.createEvent){var o=r.createEvent("Event");if(o.initEvent(e,!0,!0),void 0!==n)for(var a in n)a in o||(o[a]=n[a]);t.dispatchEvent(o)}else"function"==typeof jQuery&&jQuery(t).trigger(e,n)}}return new t}),define("quant/consent/truste",["quant/promise","quant/event","quant/dateutils"],function(t,e,n){return function(r,o,a,i,u,c,s,f){var l,p={},d=function(t){var e=t.source[0];return"p"+t.consent[0]+("a"==e?"e":"i")};l="object"==typeof i&&"function"==typeof i.callApi?function(e,n,r,o){var a=i.callApi(n,o,f,u,r);return e.cm=d(a),t.resolve(!0)}:function(i,c,s,l){return r.depth>0&&(e.add(o,"message",function(t){var e=t.data;if("string"==typeof e&&e.indexOf("PrivacyManagerAPI")>0)try{e=JSON.parse(e)}catch(t){return}else if(void 0!==e.PrivacyManagerAPI){var n=e.PrivacyManagerAPI;i.cm=d(n)}}),a.postMessage(JSON.stringify({PrivacyManagerAPI:{timestamp:n.nowTimestamp(),action:c,self:l,domain:f,authority:u,type:s}}),"*")),t.resolve(!0)},this.consent=function(t){return l(t,"getConsent",c,s)},this.parameters=p}}),define("quant/consent/uspapi",["quant/promise","quant/event","quant/dateutils"],function(t,e,n){return function(r,o,a,i){var u;if("function"==typeof o.__uspapi)u=function(e,n){return new t(function(t,e){o.__uspapi("getUSPData",n,function(n){n&&"string"==typeof n.uspString?t(n):e(n)})}).catch(function(t){return a.error("[USPAPI] unsuccessful: ",t),!0})};else{var c=(r.locate(i),{});e.add(o,"message",function(t){var e=t.data;if("string"==typeof e&&"{"==e[0])try{e=JSON.parse(e)}catch(t){return}if(Object.prototype.hasOwnProperty.call(e,"__uspapiReturn")){var n=e.__uspapiReturn,r=n.callId,o=c[r];if(void 0===o)return;n.success?o[0](n.returnValue):o[1](n.returnValue)}}),u=function(e,o){var a=r.locate(i);if(void 0===a)return t.resolve(void 0);var u=n.nowTimestamp();return new t(function(t,n){c[u]=[t,n],a.postMessage({__uspapiCall:{command:e,version:o,callId:u}})})}}this.consent=function(t){return u("getUSPData",1).then(function(e){return e&&"string"==typeof e.uspString&&(t.us_privacy=e.uspString),!0})}}}),define("quant/consent/manager",["quant/promise"],function(t){return function(e){var n,r={},o=function(o){return void 0===n&&(n=t.all(e.map(function(t){return t.consent(r)})).then(function(t){return t.reduce(function(t,e){return t&&e},!0)})),n.then(function(t){if(t)return o()})};this.consent=o,this.wrap=function(t){return function(){var e=this,n=arguments;return o(function(){return t.apply(e,n)})}},this.parameters=r}}),define("quant/consent/tcf2.0",["quant/promise","quant/event","quant/dateutils"],function(t,e,n){function r(t,e){var n=e.gdprApplies,r=e.purpose,o=e.vendor,a=o&&o.consents&&o.consents[c],i=o&&o.legitimateInterests&&o.legitimateInterests[c],u=e.publisher?e.publisher.restrictions:{};return!n||t.map(function(t){var e=!!r.consents&&r.consents[t],n=!!r.legitimateInterests&&r.legitimateInterests[t],o=u&&u[t]?u[t][c]:null;return 0!==o&&(!(!a||!e||2===o||-1==f.indexOf(t)&&1!==o)||!(1===o||!i||!n||-1!=l.indexOf(t)||-1!=f.indexOf(t)&&2!==o))}).reduce(function(t,e){return t&&e},!0)}function o(o,c,f,l){var g,m;if("function"==typeof c.__tcfapi)m=function(e,n){return new t(function(t,r){c.__tcfapi(e,p,function(n,o){if(o){var a=n.eventStatus;e===d&&n.gdprApplies&&"useractioncomplete"!==a&&"tcloaded"!==a||t(n)}else r(n)},n)})};else{var y={},q={};e.add(c,"message",function(t){var e=t.data;if(void 0===e)return void f.error(a+"Recieved undefined message");if("string"==typeof e&&"{"==e[0])try{e=JSON.parse(e)}catch(t){return}if(Object.prototype.hasOwnProperty.call(e,h)){var n=e[h],r=n.callId,o=y[r];if(void 0===o)return;var c=n.returnValue;n.success?q[r]===d&&c.gdprApplies&&"useractioncomplete"!==c.eventStatus&&"tcloaded"!==c.eventStatus||o[i](c):o[u](c)}}),m=function(e,r){var a=o.locate(l);if(void 0===a)return t.resolve({gdprApplies:!1});var i=n.nowTimestamp();return new t(function(t,n){y[i]=[t,n],q[i]=e;var o={};o[v]={command:e,parameter:r,version:p,callId:i},a.postMessage(JSON.stringify(o),"*")})}}this.consent=function(t){return void 0===g&&(g=m(d).then(function(e){return e.gdprApplies&&"false"!=e.gdprApplies?(t.gdpr=1,t.gdpr_consent=e.tcString):t.gdpr=t.gdpr||0,r(s,e)}).catch(function(e){return f.error("[TCF2.0] unsuccessful: ",e),t.gdpr=t.gdpr||0,!0})),g}}var a="[TCF2]: ",i=0,u=1,c=11,s=["1","3","7","8","9","10"],f=["1","3"],l=["1","3"],p=2,d="addEventListener",h="__tcfapiReturn",v="__tcfapiCall";return o.resolveConsent=r,o}),define("quant/qtrack",[],function(){function t(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function e(e,n,a){for(var i=0;i0;)n.apply(n,window.qtrack.q.shift())}}),define("quant/hashing",[],function(){function t(){function t(t){return unescape(encodeURIComponent(t))}function e(t,e){return e>>>t|e<<32-t}function n(t){return e(2,t)^e(13,t)^e(22,t)}function r(t){return e(6,t)^e(11,t)^e(25,t)}function o(t){return e(7,t)^e(18,t)^t>>>3}function a(t){return e(17,t)^e(19,t)^t>>>10}function i(t,e,n){return t&e^~t&n}function u(t,e,n){return t&e^t&n^e&n}this.FNV=function(t){var e,n,r,o;return e=2166136261,n=3386659096,r=c(e,t),o=c(n,t),Math.round(Math.abs(r*o)/65536).toString(16)};var c=function(t,e){var n;for(n=0;n>>0;for(p[l-1][14]=Math.floor(v),p[l-1][15]=g,d=0;d>>0;var q=s[0],w=s[1],_=s[2],b=s[3],x=s[4],O=s[5],E=s[6],S=s[7];for(y=0;y<64;y++){var j=S+r(x)+i(x,O,E)+c[y]+m[y],C=n(q)+u(q,w,_);S=E,E=O,O=x,x=b+j>>>0,b=_,_=w,w=q,q=j+C>>>0}s[0]=s[0]+q>>>0,s[1]=s[1]+w>>>0,s[2]=s[2]+_>>>0,s[3]=s[3]+b>>>0,s[4]=s[4]+x>>>0,s[5]=s[5]+O>>>0,s[6]=s[6]+E>>>0,s[7]=s[7]+S>>>0}for(S=0;S0||"number"==e||"boolean"==e};return function(n,r,o,a,i){var u,c={},s=null,f=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,l=/^[A-Fa-f0-9]{64}$/,p=2;for(u in r)Object.prototype.hasOwnProperty.call(r,u)&&e(r[u])&&("uid"!==u&&"uh"!==u?"qacct"!==u&&(c[u+n]=encodeURIComponent(r[u])):(r[u].match(l)?(p=1,s=r[u].toLowerCase()):(r[u].match(f)&&(p=0,r[u]=r[u].toLowerCase()),""!==r[u]&&(s=t.SHA256(r[u]))),delete r[u]));for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&e(o[u])&&!c[u+n]&&(c[u+n]=encodeURIComponent(o[u]));return c["rf"+n]=""+i,"string"==typeof s&&(r.uh=s,c["uh"+n]=encodeURIComponent(s)),c["uht"+n]=""+p,c["a"+n]=a,c}}),define("quant/storage-experiment",["quant/dateutils"],function(t){function e(t){var e=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return e&&e.pop()||""}function n(e,n,r){var o=new Date;o.setTime(t.nowTimestamp()+r),document.cookie=e+"="+n+";expires="+o.toUTCString()+";path=/"}function r(){try{var e=window.localStorage.getItem(i);if(e){var n=t.nowTimestamp()-parseInt(e);return Math.floor(n/1e3)}return window.localStorage.setItem(i,""+t.nowTimestamp()),0}catch(t){return-1}}function o(r){try{var o=e(u);if(o){var a=t.nowTimestamp()-parseInt(o);return Math.floor(a/1e3)}return n(u,t.nowTimestamp(),r),0}catch(t){return-1}}function a(t){var e=r(),n=o(t),a=[];return e>0&&a.push("sxl="+e),n>0&&a.push("sxc="+n),a.length>0?";"+a.join(";"):""}var i="qcSxl",u="qcSxc";return{getUrlParameters:a}}),define("quant/session",["quant/dateutils"],function(t){var e=function(){var e=t.nowTimestamp();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})};if(!window.sessionStorage)return e();var n=window.sessionStorage.getItem("qcSes");return n||(n=e(),window.sessionStorage.setItem("qcSes",n),n)}),define("src/quant.js",["quant/origin","quant/windows","quant/log","quant/loader","quant/consent/truste","quant/consent/uspapi","quant/consent/manager","quant/consent/tcf2.0","quant/qtrack","quant/normalize","quant/hashing","quant/storage-experiment","quant/session","quant/dateutils"],function(t,e,n,r,o,a,i,u,c,s,f,l,p,d){return void 0===window.__qc&&(window.__qc=function(c,h,v){if(c.__qc)return c.__qc;var g,m,y,q,w,_,b,x,O,E,S,j,C,I,P,T,A,k,D,R,M,U,z,L,N,V,B,J,Q,F,G,H,$,W,Z,K,X,Y,tt,et,nt,rt,ot,at,it,ut,ct=t(h),st=new e(c,c.top),ft=new r(c,h),lt=new n(ft,"quantcount.com"),pt=new i([new o(st,c,c.top,c.PrivacyManagerAPI,"truste.com","advertising","quantserve.com",ct),new a(st,c,lt,"__uspapiLocator"),new u(st,c,lt,"__tcfapiLocator")]),dt=["a","ce","cm","dst","enc","fpa","fpan","je","ns","ogl","rf","tzo","sr","sxl","sxc","ses"],ht=["4dcfa7079941","127fdf7967f31","588ab9292a3f","32f92b0727e5","22f9aa38dfd3","a4abfe8f3e04","18b66bc1325c","958e70ea2f28","bdbf0cb4bbb","65118a0d557","40a1d9db1864","18ae3d985046","3b26460f55d"],vt=!1,gt=!1,mt=0,yt=[],qt=[],wt=[],_t=[],bt={},xt=0,Ot=null,Et={},St={},jt=null,Ct=[].slice;!function(){var t;t=h.createElement("script"),g="async"in t?1:t.readyState?2:3,t=null}();var It=function(t){try{return{init:x,hash:f.SHA256,push:O,rules:H,require:require,hasRules:W,defaults:Y,fire:T,__qc:function(){return!0}}[t].apply(null,Ct.call(arguments,1))}catch(t){return lt.error(t),!1}};return It.evts=0,It.v=2,It.SD=ht,It.qpixelsent=[],G=function(t){var e,n=t?t.length||0:0;for(e=0;e0)){V();for(t in St)Object.prototype.hasOwnProperty.call(St,t)&&St[t]&&(e=St[t],n.push(e),delete St[t]);1==n.length&&C(n[0]),n.length>1&&C(n)}},nt=function(){var t,e,n,r=[];for(n=_t.slice(0),t=0;t0?1:0,et()},H=function(){var t,e,n,r=!0,o=!1;if(arguments.length){for(n=function(t){r?tt(t):C(t,!0),o=!0},t=0;t1?s[i].slice(1):[],o=o.concat(t.v),a=r.apply(null,o),u={qacct:t.p,event:"rule"};for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&"qacct"!==c&&(u[c]=a[c]);e(u)}catch(t){continue}},m=function(t){return t.replace(/\./g,"%2E").replace(/,/g,"%2C")},y=function(t){return void 0!==t&&null!=t},q=function(){return Math.round(2147483647*Math.random())},w=function(t){var e,n,r,o="",a=h.cookie;return a?(e=a.indexOf(t+"="),n=e+t.length+1,e>-1&&(r=a.indexOf(";",n),r<0&&(r=a.length),o=a.substring(n,r)),o):o},j=function(t){return"P0-"+q()+"-"+t.getTime()},S=function(t,e,n){return["__qca=",t,"; expires=",e.toGMTString(),"; path=/; domain=",n].join("")},E=function(){var t,e,n,r,o,a,i,u,c,s=["","",""];if(1===mt)return s[0]=";fpan=u;fpa=",s;for(t=f.FNV(ct),r=0;r0||jt?(0===n.length&&(n=jt,s[1]=S(jt,new Date(e.getTime()+338688e5),ct)),s[0]=";fpan=0;fpa="+n):(jt=j(e),s[1]=S(jt,new Date(e.getTime()+338688e5),ct),s[0]=";fpan=1;fpa="+jt),o=w("_pubcid"),a=w("_pubcid_optout"),i=o.length>0?o:w("_sharedID"),u=w("_pbjs_id_optout"),c=u.length>0||"1"===a,!c&&i.length>0?s[2]=";pbc="+i:s[2]=";pbc=",s},_=function(){var t=E()[1];t&&(h.cookie=t)},b=function(t){h.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; domain="+ct},F=function(t){var e,n;if(t&&"object"===B(t))for(n=0;n=1e3)return encodeURIComponent(i);y(o)&&y(o.attributes)&&y(o.attributes.property)&&y(o.attributes.property.value)&&y(o.content)&&(e=o.attributes.property.value,n=o.content,e.length>3&&"og:"===e.substring(0,3)&&(i.length>0&&(i+=","),r=n.length>80?80:n.length,i+=m(e.substring(3,e.length))+"."+m(n.substring(0,r))))}return encodeURIComponent(i)},C=function(t,e,n){var r,o,a,i,u,s,f,g,m,w,_,b,x=q(),O="",S="",j="",C="",I="1",T=[];if(mt=0,y(It.qpixelsent)||(It.qpixelsent=[]),y(t)){if("object"===(w=B(t)))a=k("",t,e);else if("array"===w)for(u=0;u