/** * @version v6.21.8 * @copyright Copyright 2016 Krux Digital, Inc. All Rights Reserved. */ !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={"exports":{},"id":r,"loaded":!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){var r,i,o,s;null==(i=null!=window.Krux?window.Krux:window.Krux=function(){window.Krux.q.push(arguments)}).q&&(i.q=[]),r=window.Krux,o=n(2),s=/kxdebug=?(trace|debug|info|warn|error|silent)?/.exec(window.document.cookie),s?s[1]?o.setLevel(s[1],!1):o.setLevel("debug",!1):o.setLevel("silent",!1),r.commit&&!r.ns||(null==r.commit&&(r.commit=1),t.exports=window.Krux=function(t,e){var i,o,s;if(null==e.params&&(e.params={}),o=e.params.control_tag_namespace,window.Krux=r,i=n(4).init(o,function(){return n(62).call}))switch(!1){case"proxy"!==(null!=(s=r.q[0])?s[0]:void 0):r.q.shift(),n(35).server(e);break;case"marketer"!==e.params.client_type:n(25).init(i,e);break;default:n(94).init(i,e)}})},function(t,e,n){var r;r=n(3),t.exports=r.getLogger("Krux")},function(t,e,n){var r,i;!function(o,s){"use strict";r=s,i="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return typeof console!==a&&(void 0!==console[t]?e(console,t):void 0!==console.log?e(console,"log"):s)}function e(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function n(t,e,n){return function(){typeof console!==a&&(r.call(this,e,n),this[t].apply(this,arguments))}}function r(t,e){for(var n=0;n=0&&e<=l.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(c=e,n!==!1&&o(e),r.call(l,e,t),typeof console===a&&e=0&&o0?0:a-1;return arguments.length<3&&(i=n[s?s[u]:u],u+=t),e(n,r,i,s,u,a)}}function o(t){return function(e,n,r){n=S(n,r);for(var i=N(e),o=t>0?0:i-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(d.call(r,s,a),x.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=O};x.each=x.forEach=function(t,e,n){e=k(e,n);var r,i;if(R(t))for(r=0,i=t.length;r=0},x.invoke=function(t,e){var n=d.call(arguments,2),r=x.isFunction(e);return x.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},x.pluck=function(t,e){return x.map(t,x.property(e))},x.where=function(t,e){return x.filter(t,x.matcher(e))},x.findWhere=function(t,e){return x.find(t,x.matcher(e))},x.max=function(t,e,n){var r,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=R(t)?t:x.values(t);for(var a=0,u=t.length;ao&&(o=r)}else e=S(e,n),x.each(t,function(t,n,r){i=e(t,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},x.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t){t=R(t)?t:x.values(t);for(var a=0,u=t.length;ar||void 0===n)return 1;if(ne?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(u,l)),o}},x.debounce=function(t,e,n){var r,i,o,s,a,u=function(){var c=x.now()-s;c=0?r=setTimeout(u,e-c):(r=null,n||(a=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=x.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(a=t.apply(o,i),o=i=null),a}},x.wrap=function(t,e){return x.partial(e,t)},x.negate=function(t){return function(){return!t.apply(this,arguments)}},x.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},x.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},x.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},x.once=x.partial(x.before,2);var P=!{"toString":null}.propertyIsEnumerable("toString"),D=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(t){if(!x.isObject(t))return[];if(v)return v(t);var e=[];for(var n in t)x.has(t,n)&&e.push(n);return P&&a(t,e),e},x.allKeys=function(t){if(!x.isObject(t))return[];var e=[];for(var n in t)e.push(n);return P&&a(t,e),e},x.values=function(t){for(var e=x.keys(t),n=e.length,r=Array(n),i=0;i":">",'"':""","'":"'","`":"`"},B=x.invert(U),j=function(t){var e=function(e){return t[e]},n="(?:"+x.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};x.escape=j(U),x.unescape=j(B),x.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),x.isFunction(r)?r.call(t):r};var F=0;x.uniqueId=function(t){var e=++F+"";return t?t+e:e},x.templateSettings={"evaluate":/<%([\s\S]+?)%>/g,"interpolate":/<%=([\s\S]+?)%>/g,"escape":/<%-([\s\S]+?)%>/g};var q=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+K[t]};x.template=function(t,e,n){!e&&n&&(e=n),e=x.defaults({},e,x.templateSettings);var r=RegExp([(e.escape||q).source,(e.interpolate||q).source,(e.evaluate||q).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,a){return o+=t.slice(i,a).replace(z,H),i=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return s.call(this,t,x)},u=e.variable||"obj";return a.source="function("+u+"){\n"+o+"}",a},x.chain=function(t){var e=x(t);return e._chain=!0,e};var Y=function(t,e){return t._chain?x(e).chain():e};x.mixin=function(t){x.each(x.functions(t),function(e){var n=x[e]=t[e];x.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),Y(this,n.apply(x,t))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];x.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Y(this,n)}}),x.each(["concat","join","slice"],function(t){var e=l[t];x.prototype[t]=function(){return Y(this,e.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return x}.apply(e,r),!(void 0!==i&&(t.exports=i))}).call(this)},function(t,e,n){t.exports=function(t){switch(t){case"config":return n(7);case"data":return n(15);case"dom":return n(19);case"events":return n(10);case"feature":return n(11);case"http":return n(21);case"json":return n(8);case"marketer":return n(25);case"ns":return n(4);case"pixel":return n(28);case"routes":return n(62);case"scrape":return n(61);case"segments":return n(33);case"sha1":return n(44);case"sizzle":return n(19);case"sniff":return n(12);case"store":return n(9);case"tag":return n(88);case"test":return n(32);case"underscore":return n(5);case"util":return n(13);default:return}}},function(t,e,n){var r,i,o,s,a,u,c,l=function(t,e){return function(){return t.apply(e,arguments)}},f=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty,p=[].slice;o=n(5),a=n(8),u=n(9),i=n(18),c=n(13),r=function(t){function e(){this._pointerPair=l(this._pointerPair,this),this._makeWatchers=l(this._makeWatchers,this),this.toString=l(this.toString,this),this.toJSON=l(this.toJSON,this),this.destroy=l(this.destroy,this),this.persist=l(this.persist,this),this.has=l(this.has,this),this.remove=l(this.remove,this),this.set=l(this.set,this),this.param=l(this.param,this),this.get=l(this.get,this),e.__super__.constructor.apply(this,arguments),this._handles=[],this._persisted=[],this._defaults={"confid":"no-confid"}}return f(e,t),e.prototype.get=function(t,e){var n,r;if(n=this._pointerPair(t),r=o.isString(n[1])?c.deref(n[0],n[1]):n[0],o.isString(r)){if(/^\d{1,12}$/.test(r))return Number(r);if(/^(true|false)$/.test(r))return"true"===r}return null!=r?r:e},e.prototype.param=function(t,e){return this.get("params."+t,e)},e.prototype.set=function(t,e){var n,r;return r=this._pointerPair(t),o.isString(r[1])?(n=c.deref(r[0],r[1]),r[0][r[1]]=e,this._fire("set",t,n,e)):i.prototype.set.apply(this,arguments),this},e.prototype.remove=function(t){var e,n;return n=this._pointerPair(t),o.isString(n[1])?(e=c.deref(n[0],n[1]),delete n[0][n[1]],this._fire("remove",t,e,void 0)):i.prototype.remove.apply(this,arguments),this},e.prototype.has=function(t){return e.__super__.has.call(this,t)||null!=this.get(t)},e.prototype.persist=function(){var t,e,n,r,i,s;return e=1<=arguments.length?p.call(arguments,0):[],e=o.difference(e,this._persisted),n=function(t){return function(e){t.has(e,!0)&&u.set(e,t.get(e))}}(this),e=function(){var i,s,a;for(a=[],i=0,s=e.length;i0&&!this._has(t)&&(o=t.split("."),s=o[0],e=!0),a=i.prototype.get.call(this,s),e&&(r=o.slice(1,o.length-1).join("."),r&&(a=c.deref(a,r)),n=o.pop()),[a,n]},e}(i),s=void 0,e.Config=r,e.init=function(t){return!t&&s||(s=new r(t)),s},e.param=function(t,n){return e.init().param(t,n)},e.get=function(t,n){return e.init().get(t,n)},e.set=function(t,n){return e.init().set(t,n)},e.remove=function(t){return e.init().remove(t)},e.has=function(t){return e.init().has(t)}},function(t,e){e.stringify=function(t,e){return null==e&&(e=""),null!=t?window.JSON.stringify(t):e},e.parse=function(t,e){return null==e&&(e={}),null!=t&&""!==t?window.JSON.parse(t):e}},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,S,E,T,A=[].slice;i=n(5),l=n(10),h=n(11),_=n(8),w=n(4),k=n(14),S=n(13),E=n(16),v=function(){try{return window.localStorage}catch(t){return c=t,null}}(),T=["set","get","remove","count","namespace"],f=T.concat(["clear","count","forEach"]),e.whitelist=E.init(E.ALL),e.allowAll=i.bind(e.whitelist.allowAll,e.whitelist),e.allowNone=i.bind(e.whitelist.allowNone,e.whitelist),e.allowOnly=i.bind(e.whitelist.allowOnly,e.whitelist),e.SECONDS=k.SECONDS,e.MINUTES=k.MINUTES,e.HOURS=k.HOURS,e.DAYS=k.DAYS,e.READY_EVENT=r="store:ready",x=function(t){return new Date(i.now()+1e3*t)},o=function(t){return e.prefix&&0!==t.indexOf(e.prefix)&&(t=e.prefix+t),t},b=function(t){return e.prefix?t.replace(new RegExp("^"+e.prefix),""):t},u={"domain":function(t){return"; domain="+t}},d=function(t){return e.whitelist.has(b(t))||e.whitelist.has(t)},e.cookie=a={"_COOKIE_START":"(?:^|\\s|;)","set":function(t,e,n,r){return d(t)?a._set.apply(a,arguments):""},"get":function(t,e){var n,r,i;return null==e&&(e=""),i=""+a._COOKIE_START+t+"=([^;]*)",n=null!=(r=window.document.cookie)?r.match(i):void 0,null!=n?window.decodeURIComponent(n[1]):e},"count":function(t,e,n){return null==e&&(e=1),null==n&&(n=k.endOfDay()),a.set(t,Number(a.get(t,0))+e,n)},"remove":function(t,e){null==e&&(e={}),a._set(t,0,-1,e)},"namespace":function(t){var e,n;return e={},n=new RegExp(""+a._COOKIE_START+t+"([^=]*)=([^;]*)","g"),window.document.cookie.replace(n,function(t,n){e[decodeURIComponent(t)]=decodeURIComponent(n)}),e},"forEach":function(t){return null==t&&(t=function(t,e){}),m.until(function(e,n){return t(e,n),!1})},"until":function(t){var n,r,i,o,s,a,u;for(null==t&&(t=S.yes),s=window.document.cookie.split(/\s*;\s*/),n=0,i=s.length;no;r=0<=o?++i:--i)n=t.charCodeAt(r),e+=function(){switch(!1){case!(n<256):return 1;case!(n<65536):return 2;case!(n<16777216):return 3;default:return 4}}();return 2*e},e.rate=function(t){return Math.random()<=t},e.cleanEmail=function(t){return null==t&&(t=""),t.toLowerCase().replace(/\s+/g,"").replace(/\+[^@]+@gmail/,"@gmail").replace(/\+[^@]+@googlemail/,"@googlemail")},e.numberToRangeBucket=function(t,e,n,r){var i,o;return null==n&&(n=0),null==r&&(r=Infinity),tr?r+"+":(i=e*Math.ceil(t/e),o=i-e,o+"-"+i)},e.collapse=function(t,e,n){var i;return null==e&&(e="."),null==n&&(n=10),i=function(t,o,s,a){var u,c;switch(null==s&&(s={}),null==a&&(a=n),!1){case!(a<0):break;case!!r.isObject(t):s[o]=t;break;default:for(u in t)c=t[u],null!=c&&i(c,""+(null!=o?o+e:"")+u,s,a-1)}return s},r.isObject(t)?i(t):{}}},function(t,e,n){var r,i,o;r=n(5),i=n(15),o=function(t){return function(){return i.set(t,r.now())}},e.start=o("started"),e.end=o("ended"),e.SECONDS=1,e.MINUTES=60,e.HOURS=60*e.MINUTES,e.DAYS=24*e.HOURS,e.MONTHS=30*e.DAYS,e.YEARS=365*e.MONTHS,e.endOfDay=function(){var t;return t=new Date(r.now()+864e5),(new Date(t.getFullYear(),t.getMonth(),t.getDate())-new Date)/1e3}},function(t,e,n){var r,i,o,s,a,u,c,l={}.hasOwnProperty;r=n(5),i=n(10),c=n(13),e.root=a={},o=function(t){return/_/.test(t)?t:"_"+t},e.get=function(t,e){var n;return null!=(n=a[o(t)])?n:e},e.set=function(t,n){var o,s,a;return r.isString(t)?(s=u(t,n),i.fire("data:change",{"key":t,"value":s}),s):function(){var n;n=[];for(o in t)l.call(t,o)&&(a=t[o],n.push(e.set(o,a)));return n}()},e.setSilently=u=function(t,e){return a[o(t)]=e},e.remove=function(t){delete a[t]},e.append=function(t,n){var i,s,a;return r.isString(t)?(t=o(t),s=null!=e.get(t)?e.get(t):[],r.isArray(s)||(s=[s]),s.push(n),e.set(t,r.uniq(s))):function(){var n;n=[];for(i in t)l.call(t,i)&&(a=t[i],n.push(e.append(i,a)));return n}()},e.raw=function(){return a},e.namespace=s=function(t,n){var r,o,s,u;return s=t+"_",u=new RegExp(s+"(.+)"),r=c.attributes({"get":function(t){return e.get(s+t)},"set":function(t,n){return e.set(s+t,n)},"all":function(){var t,e,n,r;n={};for(t in a)l.call(a,t)&&(r=a[t],e=t.match(u),null!=e&&(n[e[1]]=r));return n},"values":n}),o=void 0,r.change=function(t){o||(o=[],i.on("data:change",function(e){var n,r;if(u.test(e.key))for(n=0,r=o.length;n"),e;if(e(">"),"string"==typeof o)e(o);else for(c=0,l=o.length;c"),e},p=function(t,e,n){var r;return null==e&&(e={}),null==n&&(n=[]),r="string"!=typeof t?t:{"tagName":t,"attributes":e,"children":n},K(r).data()},x=function(t){var e;return e=window.document.createElement("div"),e.innerHTML=t,e.childNodes},b=function(t){return x(t)[0]},e.byId=function(t){return(null!=t?t.nodeType:void 0)?t:window.document.getElementById(t)},e.head=w=function(t){return null==t&&(t=window.document),t.head||t.getElementsByTagName("head")[0]},e.document=function(t){return t.document||t.ownerDocument||t},e.window=function(t){var n,r;return n=e.document(t),null!=(r=n.parentWindow)?r:n.defaultView},e.create=e.createElement=function(){var t;return t=1<=arguments.length?Y.call(arguments,0):[],b(p.apply(null,t))},e.remove=C=function(t){t.parentNode.removeChild(t)},e.isNode=function(t){return!!t.nodeType},e.before=h=function(t,e){t.parentNode.insertBefore(e,t)},e.append=l=function(t,e){t.appendChild(e)},e.after=function(t,e){var n;return n=t.nextSibling,n?h(n,e):l(t.parentNode,e)},e.prepend=function(t,e){var n;return n=t.firstChild,n?h(n,e):l(t,e)},e.insert=function(t,n,r){return 3===arguments.length?e[t](n,r):(r=t,h(window.document.getElementsByTagName("script")[0],r))},e.replace=function(t,e){return h(t,e),C(t)},e.scriptEval=function(t){var e;e=window.document.createElement("script"),e.text=t,w(window.document).appendChild(e)},e.winEval=function(t,e){var n;return t.kxeval||(n="(function(){,\n var win = this;,\n win.kxeval = win.execScript ? ,\n function(expr){return win.execScript(expr);} :,\n function(expr){return win.eval(expr);};,\n})();",t.execScript?t.execScript(n):t["eval"](n)),t.kxeval(e)},e.childElements=function(t){var e,n,r,i,o,s;for(n=[],s=null!=(o=null!=t?t.childNodes:void 0)?o:[],r=0,i=s.length;r-1||D.ie&&D.version<8||D.ff&&D.version<4||!window.document.readyState||function(){var t;try{return null==(null!=(t=window.JSON)&&"function"==typeof t.parse?t.parse("true"):void 0)}catch(t){return!0}}()||null==window.document.querySelectorAll},e.init=u.once(function(){var t;if(N.trace(o,"init called"),/^(complete|loaded)$/.test(window.document.readyState))_(i)();else{if(D.ie){c(window,i,_(s)),t=!1;try{t=null==window.frameElement}catch(t){}window.document.documentElement.doScroll&&t&&d()}for(I in P)z.call(P,I)&&(B=P[I],c(B.target,B.nativeName,_(I)))}window.setTimeout(function(){return _(i)({"timedout":!0})},6e3)})},function(t,e,n){var r,i,o,s;i=n(5),s=n(19),o={"target":null,"targetAction":"append","html":"","attr":{}},e.IFrame=r=function(){function t(t){this.options=i.extend({},o,t||{}),this.node=s.createElement("iframe",this.options.attr),"function"==typeof this.options.onload&&s.onload(this.node,this.options.onload),this.insert(),this.options.attr.src&&!this.options.html||this.html(this.options.html||"")}return t.prototype.insert=function(){var t,e,n;e=this.options,t=e.targetAction,n=e.target||window.document.body,s.insert(t,n,this.node)},t.prototype.html=function(t){var e;e=this.doc(),t.match(/^/)||(t=""+t+""),e.open(),e.write(t),e.close()},t.prototype.win=i.memoize(function(t){return t.contentWindow}),t.prototype.doc=i.memoize(function(e){try{return t.window(e).document}catch(t){}}),t}()},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w={}.hasOwnProperty;i=n(5),u=n(15),c=n(10),l=n(11),h=n(8),g=n(12),v=n(13),y=n(22),e.protocol=d="https:"===window.location.protocol?"https:":"http:",r=e.REQUEST_ID_KEY="request_id",e.maxUrlLength=g.is===g.Browsers.IE?2030:8e3,e.param=p=function(t,e){var n;return n=i.isString(e)||i.isNumber(e)?e:h.stringify(e),encodeURIComponent(t)+"="+encodeURIComponent(n)},m=function(t,e){return t.match(/^\/\//)&&(t=d+t),e.length>0?t+"?"+e.join("&"):t},f=i.compose(function(t){return t.length>e.maxUrlLength},m),a=function(t,e){return[r+"="+e].concat(t)},s=function(t){return t+"&pageview=false"},o=function(t){return n(7).init().get("params.first_party_uid",!1)&&!l.hasThirdPartyCookies()&&(null==t.data&&(t.data={}),t.data._kuid=u.get("user")),t},e.srcs=_=function(t){var e,n,r,o,s,u,c,l,h,d,g,_,v;if(t=i.clone(t),_=t.url=t.url||"no_url",h=y.v4(),g=i.partial(m,_),n=i.partial(f,_),c=function(){var e,n;e=t.data,n=[];for(o in e)w.call(e,o)&&(v=e[o],null!=v&&""!==v&&n.push(p(o,v)));return n}(),t.noClip)return[g(c)];for(e=function(t,r){var i;for(r=r||[],i=[],t=a(t,h);n(t)&&t.length;)i.push(t.pop());return r.push(t),i.length>0&&t.length>0?e(i,r):(1===r.length&&r[0].shift(),r)},l=e(c),d=[],r=0,s=l.length;r1&&c.fire("http:error",{"code":"overflow","message":"Too many params for a single URL (max = "+e.maxUrlLength+").\nUsing first URL chunk; use http#srcs instead to handle long URLs"}),i.head(n)},e.willClip=function(t){var n;return n=e.src(i.extend({"noClip":!0},t)),n.length>e.maxUrlLength&&n.length-e.maxUrlLength},e.pixel=function(t){var n,r,i,a,u;try{for(a=_(o(t)),n=r=0,i=a.length;r0?s(u):u);c.fire("http:pixel",t)}catch(t){}},e.createImage=function(t){return(new Image).src=t},e.ping=function(t){var n,r,i,s;try{r=o(t),i=function(){var t,e;t=r.data,e=[];for(n in t)w.call(t,n)&&(s=t[n],null!=s&&""!==s&&e.push(p(n,s)));return e}(),e.createImage(m(r.url,i))}catch(t){}},e.jsonp=function(t){return n(24).call(o(t))},e.clearRequestList=function(){return n(24).clear()}},function(t,e,n){function r(t,e){var n=e||0,r=a;return r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]}function i(t,e,n){var i=e&&n||0,o=e||[];t=t||{};var s=void 0!==t.clockseq?t.clockseq:h,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),u=void 0!==t.nsecs?t.nsecs:d+1,c=a-p+(u-d)/1e4;if(c<0&&void 0===t.clockseq&&(s=s+1&16383),(c<0||a>p)&&void 0===t.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=a,d=u,h=s,a+=122192928e5;var l=(1e4*(268435455&a)+u)%4294967296;o[i++]=l>>>24&255,o[i++]=l>>>16&255,o[i++]=l>>>8&255,o[i++]=255&l;var g=a/4294967296*1e4&268435455;o[i++]=g>>>8&255,o[i++]=255&g,o[i++]=g>>>24&15|16,o[i++]=g>>>16&255,o[i++]=s>>>8|128,o[i++]=255&s;for(var _=t.node||f,m=0;m<6;++m)o[i+m]=_[m];return e?e:r(o)}function o(t,e,n){var i=e&&n||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var o=t.random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;++a)e[i+a]=o[a];return e||r(o)}for(var s=n(23),a=[],u={},c=0;c<256;++c)a[c]=(c+256).toString(16).substr(1),u[a[c]]=c;var l=s(),f=[1|l[0],l[1],l[2],l[3],l[4],l[5]],h=16383&(l[6]<<8|l[7]),p=0,d=0,g=o;g.v1=i,g.v4=o,t.exports=g},function(t,e){(function(e){var n,r=e.crypto||e.msCrypto;if(r&&r.getRandomValues){var i=new Uint8Array(16);n=function(){return r.getRandomValues(i),i}}if(!n){var o=new Array(16);n=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}t.exports=n}).call(e,function(){return this}())},function(t,e,n){var r,i,o,s;i=n(10),o=n(21),s=n(4),e.createScript=function(t){var e,n;return n=window.document.createElement("script"),n.type="text/javascript",n.src=t,e=window.document.getElementsByTagName("script")[0],e.parentNode.insertBefore(n,e)},e.Request=r=function(){function t(e){var n,r;if(null==e.data&&(e.data={}),this.options=e,!e.callback)throw new Error("Callback name is required");for(n in e)r=e[n],this[n]=r;this.self&&(this.done=function(t){var e;return(e=this.self).done.apply(e,t)},this.fail=function(t){var e;return(e=this.self).fail.apply(e,t)}),this.plantReceiver(),this.src=o.src(this),t.all.push(this)}return t.all=[],t.prototype.fail=function(t){var e;e=t&&t.status||"unknown",i.fire("error",{"message":"jsonp failed with status "+e+" src: "+this.src})},t.prototype.done=function(){},t.prototype.receive=function(t){return this.time.end=new Date,t.status?"200"===String(t.status)?this.done(t.body):this.fail(t):this.done(t)},t.prototype.plantReceiver=function(){var t;t=this.options.callback,this.data.callback=s.path+"."+t,s.self[t]=function(t){return function(){t.receive.apply(t,arguments)}}(this)},t.prototype.sendInline=function(){var t;return t='',window.document.write(t),this},t.prototype.send=function(){return this.time={"start":new Date},this.inline?this.sendInline():e.createScript(this.src),this},t.clear=function(){return t.all=[]},t}(),e.call=function(t){return new r(t).send()},e.clear=r.clear},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,S,E,T,A,O,N,R,I,C,M,P;s=n(5),a=n(26),c=n(7),l=n(27),f=n(15),h=n(19),p=n(10),d=n(11),g=n(64),_=n(67),v=n(68),y=n(69),b=n(29),x=n(35),k=n(70).tag,S=n(71),E=n(61),T=n(33),A=n(87),O=n(30),N=n(9),R=n(88),I=n(32),C=n(92),M=n(14),o=n(31),P=n(13),r="data-kx-id",i=/^https?:\/\/([a-z0-9_\-\.]+\.)?krxd\.net(:\d{1,5})?(\/|$)/i,u=function(t,e){return h.attr(e,r,t),e},e.getParams=m=function(t){return P.urlParams(h.attr(t,"src"))},e.next=w=function(t){var e;if(e=s.find(h.find("script[src*='"+t+"']"),function(t){return!h.attr(t,r)&&i.test(t.src)}),!e)throw new Error("No node found for "+t);return e},e.init=function(t,e){var n,r,i,x,E,P,D,L,U,B;if(E=new Date,n=c.init(e),r=n.get("confid"),B=r+"-"+E.getTime(),M.start(),R.claimOneTimers(n.get("tags")),h.init(),y.init(),f.init(),f.set("tags",n.get("tags")||[]),f.user_attr=f.namespace("user_attr"),f.page_attr=f.namespace("page_attr"),f.set("confid",r),f.set("domain",h.baseDomain(window.location.host)),f.set("schema_version",n.get("app.schema_version")),f.set("site",f.get("site")||n.get("site.name")||f.get("domain")),f.set("siteid",f.get("siteid")||n.get("site.id")),f.set("pubid",f.get("pubid")||n.get("publisher.uuid")),n.get("params.no_pii")&&(f.set("pixel_data__knopii",1),f.user_attr("kx_lang",null),f.user_attr("kx_tech_browser_language",null)),f.set("tags",n.get("tags")),f.set("url",window.location.href),f.set("config",n.toJSON()),f.set("pageview_uid",(new o).toLongId()),f.set("version_bucket",n.get("params.control_tag_version")),h.safeMode())return p.onOnce("dom:load",s.bind(p.fireOnce,null,"report")),void M.end();if(x=u(B,w(r)),P=m(x),D=n.get("services"),!D||!D.impression)throw new Error("impression service not specified");P.url=D.impression,f.namespace("url",n.get("services")),f.namespace("config_param",n.get("params")),I.init(),C.init(),N.init(),T.init(),b.init(),_.init(),n.get("params.fingerprint")&&!b.isOptOut()&&g.init(N),n.get("params.first_party_uid")&&!d.hasThirdPartyCookies()&&(i=N.get("kuid")||(new o).toShortId(),f.set("user",i),b.storeKuid()),U=function(){var t,e,n,r;for(n=f.get("tags")||[],r=[],t=0,e=n.length;t0))return v.fetch()},500))},e.stringifyValue=S=function(t){var e;return null==t&&(t=""),o.isArray(t)?function(){var n,r,i;for(i=[],n=0,r=t.length;n3e4?-1:n},o.extend(I,{"t_navigation_type":O.type,"t_dns":d("domainLookup"),"t_tcp":d("connect"),"t_http_request":d("request"),"t_http_response":d("response"),"t_content_ready":d("navigationStart","domInteractive"),"t_window_load":d("navigationStart","loadEventStart"), "t_redirect":d("redirect")})),q=n(61),Y=f.happened("user_data_response"),N=n(4),y=N.isDefault?r:r[N.name]||{},o.extend(I,{"interchange_ran":y.hasOwnProperty("user"),"store_user":y.user,"store_segs":y.segments,"dart_user":q.dart("u"),"dart_segs":q.dart("ksgmnt")||q.dart("ksg"),"userdata_was_requested":!!f.happened("user_data_request"),"userdata_did_respond":!!Y,"store_user_after":k.get("user"),"store_segs_after":k.get("segs")}),A=window.location.href.split("#")[0],p=q.link_rel("canonical")||q.opengraph("url")||A,A!==p&&(I._kurl_=p),Y&&o.extend(I,{"userdata_user":[Y.kuid,Y.kuid_long],"userdata_segs":[].concat(function(){var t,e;t=Y.segments,e=[];for(l in t)T.call(t,l)&&(W=t[l],e.push(W));return e}())}),R=k.get("org_user_id"),null!=R&&""!==R?(m.info(i,"Found org_user_id existy. Adding '_kuid="+R+"' to pixel."),o.extend(I,{"_kuid":R})):u.param("target_fingerprint",!1)&&!h.hasThirdPartyCookies()&&(m.info(i,"Found target_fingerprint param truthy and no third party cookies. Adding _kuid="+c.get("fp_id")),o.extend(I,{"_kuid":c.get("fp_id")})),u.param("no_pii",!1)?(m.info(i,"Found no_pii param truthy. Adding browser_bucket="+x.browser+", browser_version="+x.version),o.extend(I,{"browser_bucket":x.browser,"browser_version":x.version})):u.param("fingerprint",!1)&&(_=c.get("fp"),v=c.get("fp_id"),m.info(i,"Found fingerprint param truthy. Adding kfuid="+v+", kxfp="+_),o.extend(I,{"kfuid":v,"kxfp":_})),L={"user":"_kua_","page":"_kpa_"};for(H in L){C=L[H],U=c[H+"_attr"]();for(S in U)$=U[S],I[C+S]=$}try{F=window.sessionStorage}catch(t){g=t,F=null}if(F)try{I.sview=F.krux_views=+(F.krux_views||0)+1}catch(t){}for(B=c.get("tags"),w=b=0,E=B.length;b=10)&&(t=A.deref("doNotTrack"),null==t&&(t=A.deref("navigator.doNotTrack")),/(?:yes|1)/i.test(t))},e.isOptOut=_=function(){return Boolean(y||c.get("dnt",!1)||E()||g())},e.storeKuid=S=function(t){var e,n;null==t&&(t=l.get("user")||("function"==typeof k.get?k.get("kuid"):void 0)),n="function"==typeof k.get?k.get("org_user_id"):void 0,y||null==t&&!n||(l.set("user",n||t),e=function(){switch(!1){case""===n:return n;case!c.param("dfp_premium",!1):return a.fromShort(t).toLongId();default:return t}}(),"function"==typeof k.set&&k.set("user",e,s),"function"==typeof k.set&&k.set("kuid",t,s),x.timeDeltaOnce("set_kuid"),f.fire(i.USER_UPDATE,{"kuid":e,"short":t,"long":a.fromShort(t).toLongId()}))},e.handler=function(t){var e;f.fire(i.RESPONSE,t),e=t._kuid_||t.kuid,t.optout||/^(?:OPTOUT|DNT)$/i.test(t._kuid_||"")?v():null!=t&&null==(null!=t?t.optout:void 0)&&null==e||v(!1),S(e)},e.handleOptOut=function(t,e){var n,r,o;return null==e&&(e=u.noop),null==t?_():t===_()?void e(null,m()):(r=function(){f.off(i.CHANGE,o),f.off(i.ERROR,n)},o=function(t){return e(null,t),r()},n=function(t){return e(new Error(t.message),t),r()},f.on(i.CHANGE,o),f.on(i.ERROR,n),void v(t))},e.init=function(){var t;f.onOnce("dom:load",function(){return p(e.handler)}),t=function(){g()?v(!0,!0):_()&&v(),f.off(k.READY_EVENT,t)},f.onOnce(k.READY_EVENT,t)}},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w;i=n(5),s=n(7),a=n(15),c=n(10),f=n(21),d=n(2),_=n(12),o=n(13).collapse,r="[stats]",u={"count":{},"time":{}},e.get=l=function(t,e){return u[t][e]},e.set=g=function(t,e,n){u[t][e]=n},e.time=m=function(t,e){d.debug(r,"timing:",t,"at value",e),g("time",t,e)},e.timeOnce=w=i.memoize(m),e.timeDelta=v=function(t,e){var n,o,s;return null==e&&(e=i.now()),n=null!=(o=window.performance)&&null!=(s=o.timing)?s.navigationStart:void 0,null!=n?m(t,e-n):void d.warn(r,"skipping timeDelta for",t,"; no navigationStart available")},e.timeDeltaOnce=y=i.memoize(v),e.inc=h=function(t){var e;e=l("count",t)||0,g("count",t,e+1)},e.incPath=p=function(t){var e;e=t.split("."),i.times(e.length,function(t){h(i.first(e,t+1).join("."))})},e.init=i.once(function(){var t,e,n,r,i,l,d,g,m;if(d=s.param("controltag_performance_stats_export",!1),g=0,t="."+_.bucket,e="."+a.get("config_param_control_tag_version"),m=e+t,p("views"+m),n=null!=(i=window.performance)&&null!=(l=i.timing)?l.navigationStart:void 0,null!=n&&w("nav_start",Math.floor(n)),y("start",a.get("started")),c.onOnce("tag:started",function(){return y("tags_first")}),c.onOnce("dom:ready",function(){return y("dom_ready")}),c.onOnce("dom:load",function(){return y("dom_load")}),c.on("social",function(t){h(t.provider+"."+t.action)}),c.on("tag:done",function(){p("tags_delivered"+m)}),r=0,c.on("error",function(){var t;try{if(r>10)return;r++,p("js_errors"+m)}catch(e){return void(t=e)}}),g=".alpha"===e||d?1:".beta"===e||".steady"===e||".stable"===e?.01:.001,Math.random()8||f.test(t)||("function"==typeof t.indexOf?t.indexOf(h):void 0)!==-1},t.fromShort=function(e){return new t(t.isFallback(e)?e:c.SHORT_CODEC.decode(e))},t.fromLong=function(e){return new t(t.isFallback(e)?e:c.LONG_CODEC.decode(e))},t}();e["default"]=p},function(t,e){var n=function(t){void 0==t&&(t=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_seed(t)};n.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0}},n.prototype.init_by_array=function(t,e){var n,r,i;for(this.init_seed(19650218),n=1,r=0,i=this.N>e?this.N:e;i;i--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+t[r]+r,this.mt[n]>>>=0,n++,r++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),r>=e&&(r=0)}for(i=this.N-1;i;i--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648},n.prototype.random_int=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n>>1^e[1&t];for(;n>>1^e[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0},n.prototype.random_int31=function(){return this.random_int()>>>1},n.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},n.prototype.random=function(){return this.random_int()*(1/4294967296)},n.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},n.prototype.random_long=function(){var t=this.random_int()>>>5,e=this.random_int()>>>6;return(67108864*t+e)*(1/9007199254740992)},t.exports=n},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var r=e.Codec=function(){function t(e){n(this,t),this.charMap=e,this.indexMap={};for(var r=this.charMap.length,i=0;i0;){var r=t%e;t=Math.floor(t/e),n.push(this.charMap[r])}return n.reverse().join("")},t.prototype.decode=function(t){for(var e=t.length,n=0,r=0;rh&&(h=a,_=y);e.failureGroup=_.code+(_.data?":"+_.data:""),e.phase=s.happened("dom:load")?"after_load":s.happened("dom:ready")?"after_ready_before_load":"before_ready"}s.fire("test:all_done",{"status":w})},e.init=r.once(function(){s.on("pixel",c),s.on("dom:beforeunload",c),s.on("dom:unload",c)})},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,S,E,T,A,O,N,R,I,C,M,P,D,L,U,B,j,F,q,K,z,H,Y,$,W={}.hasOwnProperty,V=[].slice,G=[].indexOf||function(t){for(var e=0,n=this.length;es[e]):return-1;default:return 1}}),q.timeDeltaOnce("proxy_segments"),B(a),e.set("segs",S.stringify(s))})})},F=function(t){return null==t&&(t=r),t===r?"segs":"segs_"+t},e.bucket=f=function(t){var e;return null==t&&(t=r),e=K.get(F(t)),e?e.split(","):[]},e.rete=L=l.once(function(){var t,e,n,r,i;for(t=new c,r=_.get("config_segments",[]),e=0,n=r.length;e=0)return r.push(n)});else for(e=0,s=t.length;e0&&o>0&&n.length>o&&(t=function(){var t,e,r;for(r=[],t=0,e=s.length;t=0&&r.push(a);return r}().slice(0,o),_.set("user_segments",t),K.set("segs",t.join(","),i)))},e.handleUserDataResponse=b=function(t){var e,n,r,s,a,u;if(s=t.segments,r=t.kuid,a=t.technographics,R.storeKuid(r),null!=s)if(l.isArray(s))K.set(F(),s.join(","),i);else if(l.isObject(s))for(e in s)u=s[e],K.set(F(e),u.join(","),i);null!=a&&(K.set("tech",$.paramString(a),o),C()),p.param("fingerprint")&&(n=null!=t.kfuid?t.kfuid:_.get("fp"),K.set("fp_id",n,R.USER_ID_TTL),_.set("fp_id",n)),h(),m.fire("user_data_response",t)},e.readTechFromStore=C=function(){var t,e,n,r;if(n=K.get("tech")){if(1!==_.get("pixel_data__knopii")){e=$.parseKeyValues(n);for(t in e)r=e[t],_.set("user_attr_kx_tech_"+t,r)}return!0}return!1},e.fetch=y=function(){m.fireOnce("user_data_request"),x.jsonp(w)},e.init=l.once(function(){var t,n,i,o,a,u,c,f;if(d(),null!=O&&_.set("user_segments",O.split(",")),e.allRealtime=l.pluck(_.get("config_segments"),"id"),u=K.get("org_user_id"),u&&(w.data._kuid=u),n=null!=(c=null!=(f=p.param("buckets"))?f.split(/\s*,\s*/):void 0)?c:[],n.length>0&&(G.call(n,r)<0&&n.push(r),w.data.buckets=n.join(","),T.debug(s,"Found "+n.length+" buckets (including default).")),p.param("fingerprint",!1)&&(o=_.get("fp"),w.data.kxfp=o,a=_.get("fp_id"),(null!=a?a.length:void 0)!==(null!=o?o.length:void 0)&&(w.data.kfuid=a)),C()||(w.data.technographics=1),!_.get("segWait")){switch(_.set("segWait",1,5*Y.MINUTES),p.param("user_data_timing")){case"asap":y();break;case"ready":m.onOnce("dom:ready",y);break;default:m.onOnce("dom:load",y)}m.fire("user_data_fetch_scheduled")}return K.get("segs"),p.param("store_realtime_segments",!1)&&(z(),m.on("tag:done",z),m.onOnce("pixel",z),m.onOnce("dom:beforeunload",z)),h(),t=K.get("allsegs")?K.get("allsegs").split(","):[],_.set("all_user_segments",t),p.param("optimize_realtime_segments",!1)?(m.on("data:change",function(t){var e,n,r;if(e=t.key,r=t.value,n=L().results(),L().set("$"+e,r),l.difference(L().results(),n).length>0)return h()}),_.user_attr.change(h),_.page_attr.change(h)):(i=l.throttle(h,100),_.user_attr.change(i),_.page_attr.change(i)),_.namespace("event").change(h),H.module("segments",function(t){m.happened("user_data_fetch_scheduled")&&t("user_data_response",m.happened("user_data_response"))})})},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k;for(r=n(5),s=n(15),k=n(13),a={},u={},e.isIdDelivered=d=function(t){var e;return(null!=(e=r.find(s.get("tags",[]),function(e){return e.id===t}))?e.delivered:void 0)===!0},e.getDelimiter=h=function(t){return s.get(t+"DELIM")},e.setDelimiter=b=function(t,e){h(t)!==e&&s.setSilently(t+"DELIM",e)},e.get=f=function(t,e){var n,i;return i=s.get(t),e&&b(t,e),e=h(t),r.isArray(i)?i:e?i?null!=(n="function"==typeof i.split?i.split(e):void 0)?n:[i]:[]:i},e.parse=y=function(t){var e,n,i,o,s,a,u,c,l,h;switch(!1){case!!r.isString(t):return t;case!(s=t.match(/^\$([^:]+)(?::(.*))?$/)):return f(s[1],s[2]);case!(s=t.match(/^\[\s*((?:"|').*(?:"|'))\s*]$/)):for(u=s[1].replace(/(?:^\s*["'])|(?:["']\s*$)/g,"").split(/(?:['"]\s*,\s*['"])/),l=[],e=0,i=u.length;e":return function(t,e){return t>e};case"<=":return function(t,e){return t<=e};case">=":return function(t,e){return t>=e};case"==":return function(t,e){return t===e};case"!=":return function(t,e){return t!==e};default:return function(){return!1}}},w=["<",">","<=",">=","==","!="],p=0,g=w.length;p=c;a=0<=c?++u:--u)(o[a]!==window||e.self)&&l(o[a],t,e.domain)},e.listen=function(t,e){var n;return n=r.defaults(e||{},{"origin":i,"strict":!0,"win":window}),o.on(n.win,"message",function(e){var i;n.strict&&0!==String(e.origin||"").indexOf(n.origin)||t.call(this,{"data":function(){if(!r.isString(e.data)||!a(e.data))return e.data;try{return u.parse(e.data)}catch(t){return i=t,c.error("Got error while parsing message",i)}}(),"event":e})})},e.init=function(t){i=t}},function(t,e,n){var r,i,o,s,a,u,c=function(t,e){return function(){return t.apply(e,arguments)}};o=n(5),s=n(2),a=n(29),u=n(22),i=n(41).OPTOUT,t.exports=r=function(){function t(t,e){this.uid=t,this.broker=e,this._handleSuccess=c(this._handleSuccess,this),this._publish=c(this._publish,this),this.remove=c(this.remove,this),this.count=c(this.count,this),this.clear=c(this.clear,this),this.set=c(this.set,this),this.get=c(this.get,this),this.stop=c(this.stop,this),this.run=c(this.run,this),this.inFlight={}}var e;return e="[proxy/client] ",t.prototype.run=function(){return this.broker.run(),this.handle=this.broker.subscribe(this.uid,this._handleSuccess),this.handle=this.broker.subscribe("id",this._handleId),this},t.prototype.stop=function(){var t;return null!=(t=this.handle)&&t.remove(),this},t.prototype.get=function(t,e){return this._publish({"action":"get","key":t},e)},t.prototype.set=function(t,e,n){return this._publish({"action":"set","key":t,"value":e},n)},t.prototype.clear=function(t){return this._publish({"action":"clear"},t)},t.prototype.count=function(t,e,n){return this._publish({"action":"count","key":t,"delta":e},n)},t.prototype.remove=function(t,e){return this._publish({"action":"remove","key":t},e)},t.prototype._publish=function(t,e){var n;return null==e&&(e=o.noop),n=u(),t.uid=n,this.broker.publish(this.uid,t),this.inFlight[n]=e,this},t.prototype._handleId=function(t,n){var r,o;return r=n.current,o=n.previous,r===i?(s.info(e,"Found "+i+" signal; opting user out."),a.optOut()):o===i&&null!=r?(s.info(e,"Found transition from "+i+" signal to "+r+"; opting user back in."),a.optOut(!1),a.storeKuid(r)):o!==r?(s.info(e,"Found KUID change from "+o+" to "+r+"; updating LS."),a.storeKuid(r)):void 0},t.prototype._handleSuccess=function(t,e){var n,r;r=e.uid,"function"==typeof(n=this.inFlight)[r]&&n[r](t,e),delete this.inFlight[r]},t}()},function(t,e,n){var r,i,o,s,a=function(t,e){return function(){return t.apply(e,arguments)}};o=n(2),s=n(14),i=n(31),t.exports=r=function(){function t(t,e,n){this.cookieStore=t,this.primaryStore=e,this.watchers=null!=n?n:[],this._poll=a(this._poll,this),this._stop=a(this._stop,this),this.watch=a(this.watch,this),this.run=a(this.run,this),this.put=a(this.put,this),this.optout=a(this.optout,this),this.isOptOut=a(this.isOptOut,this),this.get=a(this.get,this)}var e,n,r,u,c,l;return e={"domain":".krxd.net"},n=1e3,r="[proxy/id] ",u="_kuid_",c="OPTOUT",l=6*s.MONTHS,t.prototype.get=function(){return this.cookieStore.get(u)},t.prototype.isOptOut=function(){return this.get()===c},t.prototype.optout=function(){return o.info(r,"Opting user out"),this.cookieStore.set(u,c,l,e),this.primaryStore.forEach(function(t){return function(e,n){return t.primaryStore.remove(n)}}(this))},t.prototype.put=function(){return this.cookieStore.set(u,this.cookieStore.get(u,(new i).toShortId()),l,e),this.get()},t.prototype.run=function(){return this._stop(),this._poll(),this},t.prototype.watch=function(t){return this.watchers.push(t)},t.prototype._stop=function(){return this.handle&&clearInterval(this._handle),this.handle=null},t.prototype._poll=function(){var t;return t=this.get(),this._handle=window.setInterval(function(e){return function(){var n,i,s,a,u;if(n=e.put(),n!==t){for(o.info(r,"Transitioning ID from "+t+" to "+n),n===c&&e.optout(),a=e.watchers,i=0,s=a.length;ie},t.prototype._trim=function(){try{this.isOverSize()&&(i.info("[proxy/cookie-cutter] Found "+this.store.size()+" bytes of cookies, trimming."),this.store.until(function(t){return function(e,r){return!(r in n)&&(t.store.remove(r,{"domain":".krxd.net"}),!t.isOverSize())}}(this)))}catch(t){}},t}()},function(t,e,n){var r,i,o,s,a,u,c=function(t,e){return function(){return t.apply(e,arguments)}};o=n(19),s=n(8),a=n(44),u=n(14),i=n(5),t.exports=r=function(){function t(t,e,n,r){this.key=t,this.store=e,this.cookies=null!=r&&r,this._read=c(this._read,this),this._persist=c(this._persist,this),this._listen=c(this._listen,this),this.set=c(this.set,this),this.remove=c(this.remove,this),this.count=c(this.count,this),this.clear=c(this.clear,this),this.get=c(this.get,this),this.run=c(this.run,this),this.cache={},this.checksum="",this.ttl=function(){return(n.param("realtime_segments_90d_ttl",!1)?90:3)*u.DAYS}}return t.prototype.run=function(){var t;return this.cache=null!=(t=this._read())?t:{},this.store.until(),this.cookies||o.on(window,"storage",this._listen),this},t.prototype.get=function(t){var e;return null!=(e=this.cache[t])?e:""},t.prototype.clear=function(){return this.cache={},this._persist()},t.prototype.count=function(t,e){var n;return null==e&&(e=1),n=Number(this.get(t)),(null==n||i.isNaN(n))&&(n=0),this.set(t,n+e),this.get(t)},t.prototype.remove=function(t){return delete this.cache[t],this._persist()},t.prototype.set=function(t,e){return this.cache[t]=String(e),this._persist()},t.prototype._listen=function(t){var e;e=t.key,e===this.key&&this.checksum!==a.hash(this.store.get(this.key))&&(this.cache=this._read())},t.prototype._persist=function(){return this.store.set(this.key,s.stringify(this.cache),this.ttl()),this},t.prototype._read=function(){var t;return t=this.store.get(this.key),this.checksum=a.hash(t),s.parse(t)},t}()},function(t,e,n){var r;r=n(45),e.hash=function(t,e){return null==e&&(e="utf-8"),r("sha1").update(t,e).digest("hex")}},function(t,e,n){var e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};e.sha=n(46),e.sha1=n(53),e.sha224=n(54),e.sha256=n(55),e.sha384=n(56),e.sha512=n(57)},function(t,e,n){(function(e){function r(){this.init(),this._w=l,u.call(this,64,56)}function i(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function s(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var a=n(51),u=n(52),c=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);a(r,u),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,a=0|this._c,u=0|this._d,l=0|this._e,f=0;f<16;++f)e[f]=t.readInt32BE(4*f);for(;f<80;++f)e[f]=e[f-3]^e[f-8]^e[f-14]^e[f-16];for(var h=0;h<80;++h){var p=~~(h/20),d=i(n)+s(p,r,a,u)+l+e[h]+c[p]|0;l=u,u=a,a=o(r),r=n,n=d}this._a=n+this._a|0,this._b=r+this._b|0,this._c=a+this._c|0,this._d=u+this._d|0,this._e=l+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(47).Buffer)},function(t,e,n){(function(t,r){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={"__proto__":Uint8Array.prototype,"foo":function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,n){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function _(e){return+e!=e&&(e=0),t.alloc(+e)}function m(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(i)return Y(e).length;n=(""+n).toLowerCase(),i=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,n);case"utf8":case"utf-8":return N(this,e,n);case"ascii":return I(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function w(e,n,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:b(e,n,r,i,o);if("number"==typeof n)return n=255&n,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,r):Uint8Array.prototype.lastIndexOf.call(e,n,r):b(e,[n],r,i,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var f=!0,h=0;hi&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,l,f;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(s=f))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function L(e,n,r,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||ne.length)throw new RangeError("Index out of range")}function U(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function B(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,i){return i||j(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function q(t,e,n,r,i){return i||j(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function K(t){if(t=z(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function $(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function V(t){return J.toByteArray(K(t))}function G(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Q(t){return t!==t}var J=n(48),X=n(49),Z=n(50);e.Buffer=t,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{"value":null,"configurable":!0})),t.alloc=function(t,e,n){return c(null,t,e,n)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,o=0,s=Math.min(r,i);o0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,r,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=r-n,u=Math.min(s,a),c=this.slice(i,o),l=e.slice(n,r),f=0;fi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,t,e,n);case"utf8":case"utf-8":return k(this,t,e,n);case"ascii":return S(this,t,e,n);case"latin1":case"binary":return E(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{"type":"Buffer","data":Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e=0|e,n=0|n,!r){var i=Math.pow(2,8*n)-1;L(this,t,e,n,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):U(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):U(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):B(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):B(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):U(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):U(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):B(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n=0|n,r||L(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):B(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--o)e[o+n]=this[o+r];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=n;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function r(t){return 3*t.length/4-n(t)}function i(t){var e,r,i,o,s,a,u=t.length;s=n(t),a=new l(3*u/4-s),i=s>0?u-4:u;var f=0;for(e=0,r=0;e>16&255,a[f++]=o>>8&255,a[f++]=255&o;return 2===s?(o=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[f++]=255&o):1===s&&(o=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[f++]=o>>8&255,a[f++]=255&o),a}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,n){for(var r,i=[],s=e;sl?l:c+a));return 1===r?(e=t[n-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=r,e.toByteArray=i,e.fromByteArray=a;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=f.length;h>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{"constructor":{"value":t,"enumerable":!1,"writable":!0,"configurable":!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){(function(e){function n(t,n){this._block=new e(t),this._finalSize=n,this._blockSize=t,this._len=0,this._s=0}n.prototype.update=function(t,n){"string"==typeof t&&(n=n||"utf8",t=new e(t,n));for(var r=this._len+=t.length,i=this._s||0,o=0,s=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n}).call(e,n(47).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=f,c.call(this,64,56)}function i(t){return t<<1|t>>>31}function o(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function a(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}var u=n(51),c=n(52),l=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);u(r,c),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,u=0|this._c,c=0|this._d,f=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=i(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var p=0;p<80;++p){var d=~~(p/20),g=o(n)+a(d,r,u,c)+f+e[p]+l[d]|0;f=c,c=u,u=s(r),r=n,n=g}this._a=n+this._a|0,this._b=r+this._b|0,this._c=u+this._c|0,this._d=c+this._d|0,this._e=f+this._e|0},r.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=r}).call(e,n(47).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,64,56)}var i=n(51),o=n(55),s=n(52),a=new Array(64);i(r,o),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var t=new e(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=r}).call(e,n(47).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=p,f.call(this,64,56)}function i(t,e,n){return n^t&(e^n)}function o(t,e,n){return t&e|n&(t|e)}function s(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function a(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function u(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function c(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var l=n(51),f=n(52),h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);l(r,f),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,l=0|this._c,f=0|this._d,p=0|this._e,d=0|this._f,g=0|this._g,_=0|this._h,m=0;m<16;++m)e[m]=t.readInt32BE(4*m);for(;m<64;++m)e[m]=c(e[m-2])+e[m-7]+u(e[m-15])+e[m-16]|0;for(var v=0;v<64;++v){var y=_+a(p)+i(p,d,g)+h[v]+e[v]|0,w=s(n)+o(n,r,l)|0;_=g,g=d,d=p,p=f+y|0,f=l,l=r,r=n,n=y+w|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=l+this._c|0,this._d=f+this._d|0,this._e=p+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=_+this._h|0},r.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=r}).call(e,n(47).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=a,s.call(this,128,112)}var i=n(51),o=n(57),s=n(52),a=new Array(160);i(r,o),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),n},t.exports=r}).call(e,n(47).Buffer)},function(t,e,n){(function(e){function r(){this.init(),this._w=_,d.call(this,128,112); }function i(t,e,n){return n^t&(e^n)}function o(t,e,n){return t&e|n&(t|e)}function s(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function a(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function u(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function c(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function l(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function f(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function h(t,e){return t>>>0>>0?1:0}var p=n(51),d=n(52),g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_=new Array(160);p(r,d),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,p=0|this._ch,d=0|this._dh,_=0|this._eh,m=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,b=0|this._bl,x=0|this._cl,k=0|this._dl,S=0|this._el,E=0|this._fl,T=0|this._gl,A=0|this._hl,O=0;O<32;O+=2)e[O]=t.readInt32BE(4*O),e[O+1]=t.readInt32BE(4*O+4);for(;O<160;O+=2){var N=e[O-30],R=e[O-30+1],I=u(N,R),C=c(R,N);N=e[O-4],R=e[O-4+1];var M=l(N,R),P=f(R,N),D=e[O-14],L=e[O-14+1],U=e[O-32],B=e[O-32+1],j=C+L|0,F=I+D+h(j,C)|0;j=j+P|0,F=F+M+h(j,P)|0,j=j+B|0,F=F+U+h(j,B)|0,e[O]=F,e[O+1]=j}for(var q=0;q<160;q+=2){F=e[q],j=e[q+1];var K=o(n,r,p),z=o(w,b,x),H=s(n,w),Y=s(w,n),$=a(_,S),W=a(S,_),V=g[q],G=g[q+1],Q=i(_,m,v),J=i(S,E,T),X=A+W|0,Z=y+$+h(X,A)|0;X=X+J|0,Z=Z+Q+h(X,J)|0,X=X+G|0,Z=Z+V+h(X,G)|0,X=X+j|0,Z=Z+F+h(X,j)|0;var tt=Y+z|0,et=H+K+h(tt,Y)|0;y=v,A=T,v=m,T=E,m=_,E=S,S=k+X|0,_=d+Z+h(S,k)|0,d=p,k=x,p=r,x=b,r=n,b=w,w=X+tt|0,n=Z+et+h(w,X)|0}this._al=this._al+w|0,this._bl=this._bl+b|0,this._cl=this._cl+x|0,this._dl=this._dl+k|0,this._el=this._el+S|0,this._fl=this._fl+E|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+n+h(this._al,w)|0,this._bh=this._bh+r+h(this._bl,b)|0,this._ch=this._ch+p+h(this._cl,x)|0,this._dh=this._dh+d+h(this._dl,k)|0,this._eh=this._eh+_+h(this._el,S)|0,this._fh=this._fh+m+h(this._fl,E)|0,this._gh=this._gh+v+h(this._gl,T)|0,this._hh=this._hh+y+h(this._hl,A)|0},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),n},t.exports=r}).call(e,n(47).Buffer)},function(t,e,n){var r,i,o=function(t,e){return function(){return t.apply(e,arguments)}},s=[].indexOf||function(t){for(var e=0,n=this.length;e=0&&(o=this[r](n),i={"uid":a},null!=o&&(i.value=o),this.broker.publish(t,i))},t}()},function(t,e){var n,r=function(t,e){return function(){return t.apply(e,arguments)}},i=[].slice;t.exports=n=function(){function t(){this.toArray=r(this.toArray,this),this.clear=r(this.clear,this),this.listen=r(this.listen,this),this.push=r(this.push,this),this._happened=[],this._listeners=[]}return t.prototype.push=function(){var t,e,n,r,o,s,a,u,c;for(n=1<=arguments.length?i.call(arguments,0):[],(u=this._happened).push.apply(u,n),r=0,s=n.length;r=0)return!0;return!1},e.isMatch=function(t){return"intersects"===t},e}(r),w=function(t){function e(){return this._assert=M(this._assert,this),e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype._assert=function(){return!e.__super__._assert.apply(this,arguments)},e.isMatch=function(t){return"notIntersects"===t},e}(p),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.isMatch=function(t){return"contains"===t},e}(p),v=function(t){function e(){return this._assert=M(this._assert,this),e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype._assert=function(){return!e.__super__._assert.apply(this,arguments)},e.isMatch=function(t){return"notContains"===t},e}(a),T=function(t){function e(){return this._assert=M(this._assert,this),e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype._assert=function(t,e){var n,r,i,o;for(o=this.operands,n=0,r=o.length;ne},e.isMatch=function(t){return">"===t},e}(s),d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t<=e},e.isMatch=function(t){return"<="===t},e}(s),f=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t>=e},e.isMatch=function(t){return">="===t},e}(s),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t===e},e.isMatch=function(t){return"=="===t||"equals"===t},e}(s),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.compare=function(t,e){return t!==e},e.isMatch=function(t){return"!="===t||"notEquals"===t},e}(s),o=function(t){function e(){var t,e,n,r,i,o;for(e=arguments[0],i=2<=arguments.length?U.call(arguments,1):[],this.id=e,this.operands=i,this.productions=[],o=this.operands,t=0,n=o.length;t0))return!1;for(n=0,r=e.length;n0;){i=h.shift();for(a in i)if(E.call(i,a))if(_=i[a],S.isPrimitive(_))c(a,_);else if(r.isArray(_))for(s=0,u=_.length;s0))return[];switch(!1){case"text"!==a&&"value"!==a:e=h[a],s=function(){var t,n,r;for(r=[],t=0,n=s.length;t1?n.apply(n,r.tail(e)):n:r.isFunction(t)?t.call(null,h):(i=s(t))?i[1].apply(null,e):void c.push(r.toArray(e))},e.understands=function(t){return!!s(t)},e.replay=f=function(){var t,e,n,i;for(i=r.clone(c),c.length=0,e=0,n=i.length;e=0})}},e.keys=o(i),e.pluckAll=s=function(t,e){var n,r,i,o,s,a,c,f,h;for(null==e&&(e=u.yes),n=u.deref(t),n.length||(n=function(){var t;t=[];for(i in n)l.call(n,i)&&(f=n[i],t.push(f));return t}()),c=[],r=0,s=n.length;r10*Math.random())return;_.push(t.msg),t.type+="-postload",u.push(t),h.pixel(l()),u=[]}else u.push(t)},g=function(t){var e;return e=/https*:\/\/([^\/]+)\/([^?\/]+)/.exec(t),e&&"apiservices.krxd.net"===e[1]?"service:"+e[2]:e&&e[1].indexOf("krxd.net")>-1?"controltag":""},e.errorTypes=a=["controltag","tag","test","http","js"],d=window.onerror||function(){return!1},window.onerror=function(t,e,n){var r,i;try{return"string"!=typeof t?d.apply(window,arguments):(i=g(e)||"js",f({"type":i,"url":e,"line":n,"msg":t}),d.apply(window,arguments))}catch(t){r=t,p.error("Error in the error handler",r)}return d.apply(window,arguments)},e.sortByPriority=v=function(t){var e;return e=function(t){var e;return e=r.indexOf(a,t.type),e!==-1?e:a.length},r.clone(t).sort(function(t,n){var r,i;return r=e(t),i=e(n),ri?1:0})},i=void 0,e.getPixelOptions=l=function(t){var e,n;for(e=t||{"url":o.get("url_log"),"data":{"control_tag_version":window.Krux.version,"commit":window.Krux.commit,"pubid":o.get("pubid"),"siteid":o.get("siteid"),"site_name":o.get("site"),"browser_bucket":m.bucket,"version_bucket":i,"lang":m.lang,"log_version":1.1,"errors":v(u)}},n=e.data.errors;h.willClip(e)&&n.length;)n.pop();return e},e.init=r.once(function(){return c.on("tag:fail",function(t){f({"type":"tag","tagid":t.id,"msg":t.error})}),c.on("test:fail",function(t){f({"type":"test","msg":t.code+": "+t.data})}),c.on("test:all_done",function(){var t;t="alpha"===o.get("config_param_control_tag_version")?1:.1,u.length>0&&y.rate(t)&&(h.pixel(l()),c.fire("jslog.pixel",{"errors":u.length}),u=[])}),c.on("http:error",function(t){f({"type":"http","msg":t.code+": "+t.message})})})},function(t,e,n){var r,i,o,s,a,u,c,l,f;r=n(5),i=n(7),o=n(15),a=n(34),f=n(13),s=f.rewriter({"country":"user_attr_kx_geo_country","sub_section":"subsection","segment":"user_segments"}),c=f.rewriter({"=":"is","!=":"isnt","before":"<","after":">"}),l=function(t){return t=String(t),t.match(/,/)?"["+t.split(", ").join(",")+"]":t},e.expression=u=function(t){var e,n,i,o,u,f,h;if(n=c(t.operator),u=s(t.name),e=t.delimiter,h=r.isArray(t.value)?"["+t.value.join(",")+"]":l(t.value),o=function(t,e,n){var r,i,o,s;for(o=[],r=0,i=t.length;r=3||i.param("tag_source",!1)||(t=r.extend({},t,{"criteria":["and"].concat(function(){var n,r,i,o;if(t.criteria){for(i=t.criteria,o=[],n=0,r=i.length;n0?(c.debug("Received live response for "+t),"function"==typeof p&&p(r),i={},i[t]=r,l.handleResponse(i,e,n,f)):w()},"fail":w}):(c.debug("Not enabled for "+t),w())}},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w;a=n(5),u=n(73),c=n(15),l=n(19),o=n(77),f=n(67),h=n(78),p=n(8),d=n(2),g=n(62),v=n(81),_=n(44),m=n(9),y=n(13),w=n(22),s=5e3,i=window.location.protocol+"//"+window.location.host+window.location.pathname,r=window.location.protocol+"//apiservices.krxd.net/click_tracker/track",e.compileTemplate=function(t){var e,n;if(null==t)throw new Error("Content connector requires a template");if(n=l.byId(t),null==n)throw new Error("Could not find content connector template for '"+t+"'.");if(e=l.text(n),null==e)throw new Error("Could not get content connector template for '"+t+"'.");return h.compile(e)},e.getUrlWithTracking=function(t,e){var n,r,i,o;i=y.urlParams(t),t=t.split("?")[0];for(n in e)o=e[n],i[n]=o;return r=y.paramString(i),r.length>0?t+"?"+r:t},e.computeFinalRecommendations=function(t,e){var n,r,s,c,l,f,h,g,m,v,y,w,b,x,k;for(d.getLevel()<=1&&d.debug("Computing final recommendations for "+p.stringify(t)),w=e.algorithms,l=0,m=w.length;le.rank?-1:t.rank0){for(g=0,y=r.length;g0&&e.renderResponse(c,i)},e.handleTimeout=function(t,n){var r,i,o,s,a;for(d.warn("Timed out"),s={},a=n.algorithms,r=0,o=a.length;rthis.maxFrequencies)for(n=function(){var e,n,i;e=this.table,i=[];for(r in e)n=e[r],t=n[0],l=n[1],i.push([r,l]);return i}.call(this),n.sort(function(t,e){return t[1]>e[1]?-1:t[1]0?new t(e):new i(e)},t}(),t.exports.NoopFrequencyTable=i=function(){function t(t,e){this.cap=t,this.table=null!=e?e:{}}return t.prototype.get=function(t){return[0,0]},t.prototype.increment=function(t,e){},t.prototype.save=function(){},t}()},function(t,e,n){var r=n(79);r.Template=n(80).Template,r.template=r.Template,t.exports=r},function(t,e,n){!function(t){function e(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function n(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function r(t,e,n){if(e.charAt(n)!=t.charAt(0))return!1;for(var r=1,i=t.length;r0;){if(f=e.shift(),l&&"<"==l.tag&&!(f.tag in b))throw new Error("Illegal content in < super tag.");if(t.tags[f.tag]<=t.tags["$"]||o(f,a))r.push(f),f.nodes=i(e,f.tag,r,a);else{if("/"==f.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+f.n);if(c=r.pop(),f.n!=c.n&&!s(f.n,c.n,a))throw new Error("Nesting error: "+c.n+" vs. "+f.n);return c.end=f.i,u}"\n"==f.tag&&(f.last=0==e.length||"\n"==e[0].tag)}u.push(f)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return u}function o(t,e){for(var n=0,r=e.length;n":7,"=":8,"_v":9,"{":10,"&":11,"_t":12},t.scan=function(i,o){function s(){v.length>0&&(y.push({"tag":"_t","text":new String(v)}),v="")}function a(){for(var e=!0,n=x;n"==n.tag&&(n.indent=y[r].text.toString()),y.splice(r,1));else e||y.push({"tag":"\n"});w=!1,x=y.length}function c(t,e){var r="="+S,i=t.indexOf(r,e),o=n(t.substring(t.indexOf("=",e)+1,i)).split(" ");return k=o[0],S=o[o.length-1],i+r.length-1}var l=i.length,f=0,h=1,p=2,g=f,_=null,m=null,v="",y=[],w=!1,b=0,x=0,k="{{",S="}}";for(o&&(o=o.split(" "),k=o[0],S=o[1]),b=0;b":f,"<":function(e,n){var r={"partials":{},"code":"","subs":{},"inPartial":!0};t.walk(e.nodes,r);var i=n.partials[f(e,n)];i.subs=r.subs,i.partials=r.partials},"$":function(e,n){var r={"subs":{},"code":"","partials":n.partials,"prefix":e.n};t.walk(e.nodes,r),n.subs[e.n]=r.code,n.inPartial||(n.code+='t.sub("'+c(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=p('"\\n"'+(t.last?"":" + i"))},"_v":function(t,e){e.code+="t.b(t.v(t."+l(t.n)+'("'+c(t.n)+'",c,p,0)));'},"_t":function(t,e){e.code+=p('"'+c(t.text)+'"')},"{":h,"&":h},t.walk=function(e,n){for(var r,i=0,o=e.length;i=0;c--)if(s=n[c],o=e(t,s,u),void 0!==o){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,n,r)),o):!i&&""},"ls":function(t,e,n,i,o){var s=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(r(t.call(e,i)),e,n)),this.options.delimiters=s,!1},"ct":function(t,e,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,n)},"b":function(t){this.buf+=t},"fl":function(){var t=this.buf;return this.buf="",t},"ms":function(t,e,n,r,i,o,s){var a,u=e[e.length-1],c=t.call(u);return"function"==typeof c?!!r||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,a.substring(i,o),s)):c},"mv":function(t,e,n){var i=e[e.length-1],o=t.call(i);return"function"==typeof o?this.ct(r(o.call(i)),i,n):o},"sub":function(t,e,n,r){var i=this.subs[t];i&&(this.activeSub=t,i(e,n,this,r),this.activeSub=!1)}};var o=/&/g,s=//g,u=/\'/g,c=/\"/g,l=/[&<>\"\']/,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},function(t,e,n){var r,i,o,s,a,u,c,l,f,h,p,d,g,_,m,v,y,w,b,x,k,S,E,T,A,O,N,R,I;i=n(5),s=n(15),a=n(19),u=n(10),c=n(34),l=n(67),h=n(17),p=n(8),d=n(2),m=n(4),w=n(82),x=n(9),T=n(32),N=n(13),I=n(39),r="[tag-delivery]",A=function(){return new Date-s.get("started")},f=function(t){var e;return t&&t.nodeType?t:t&&(e=t.match(/^(head|body)$/))?window.document[e[1]]:window.document.getElementById(t)},k=null,e.forget=function(t){return t.metCriteria=void 0,t.time={},t.delivered=!1,t},S={},s.set("tagsByName",S),e.uniqueName=O=function(t){var e,n;if(!t.named){for(n=t.name,e=1;null!=S[n];)e++,n=t.name+"_"+e;t.name=n,t.named=!0,S[n]=t}},R=function(t,e,n,i){var o,s,a,u,c;t.root=e,null==t.content&&(t.content=""),null==t.template_replacement&&(t.template_replacement=!0),a=t.template_replacement?b(t.content):t.content,c=window.Krux,s=function(){m.isDefault||(d.debug(r,"taking global for",m.name),window.Krux=m.self),k=E(),k.tag={"id":t.id,"name":t.name,"method":t.method,"target":t.target,"target_action":t.target_action}},o=function(){m.isDefault||(d.debug(r,"returning global to original from",m.name),window.Krux=c),k=null};try{return w(e,a,{"afterDequeue":s,"afterStreamStart":o,"done":n,"error":i,"name":t.name,"releaseAsync":!0})}catch(t){return u=t,i(u)}},e.getTagContext=function(t){return null!=k?k[t]:void 0},y=function(t,e){var n,r;return r=t.target?f(t.target):a.kxhead||window.document.getElementsByTagName("script")[0].parentNode,r&&(n=t.target_action||"append",a[n](r,e)),r},o=function(t){var e;return e={"class":"kxtag","data-id":t.id},e["class"]+=t.target?" kxtargeted":" kxinvisible",e},g={"eval":function(t,e,n){var r;try{t.content&&/\S/.test(t.content)&&!function(t){return window["eval"].call(window,t)}(t.content)}catch(t){r=t,n(r)}e()},"apply":function(t,e,n){var i,o,s;s=void 0,o=window.Krux,m.isDefault||(d.debug(r,"taking global for",m.name),window.Krux=m.self);try{s=t.content.apply(null)}catch(t){i=t,n(i)}finally{m.isDefault||(d.debug(r,"returning global to original from",m.name),window.Krux=o)}return e(),s},"document":function(t,e,n){var r,i;return r=a.createElement("span",o(t)),i=y(t,r),i?R(t,r,e,n):e(),r},"iframeCommon":function(t,e,n,r){var i,s,u,c,l;return i=o(t),i.width=i.height=0,i.scrolling="no",i.style="overflow:hidden;",c=t.name.match(/(\d+)x(\d+)/),c&&(i.width=c[1]+"px",i.height=c[2]+"px"),s=a.createElement("iframe",i),l=y(t,s),l?(u=s.contentWindow.document,u.open(),u.write(''),r.leaveOpen||u.close(),r.onIframe&&r.onIframe(s),s.contentWindow.Krux=window.Krux,R(t,s.contentWindow.document.body,e,n)):e(),s},"nativeIframe":function(t,e,n,r){return r.leaveOpen=!0,g.iframeCommon(t,e,n,r)},"iframe":function(t,e,n,r){return g.iframeCommon(t,e,n,r)}},e.templateData=E=function(){var t;return{"id":null!=(t=s.get("currentTag"))?t.id:void 0,"pubid":s.get("pubid"),"site":s.get("site"),"geo":p.stringify(l.get()),"now":new Date}},e.runTemplate=b=function(t){var e,n,r;t=t.replace(/\{\{\s*([^}]+)\s*}}/g,"{{$1}}"),n=E();for(e in n)r=n[e],t=t.replace("{{"+e+"}}",r);return t},e.meetsCriteria=function(t){var e,n,i,o;if(t.once_per_page&&v.has(t))return t.metCriteria=!1;if(null==t.criteria)return t.metCriteria=!0;s.set("now",new Date),t.freq_cap&&s.set("tag_deliveries_today",+x.get("tag"+t.id+".day",0)),o={"currentTag":t,"frequency":+x.get("visits"),"geolocation":l.get("country"),"throttle":t.random,"url":document.location.href};for(e in o)i=o[e],s.setSilently(e,i);d.trace(r,"Considering tag",t.id,t.criteria),n=t.metCriteria=c.evaluate(t.criteria);for(e in o)s.remove(e);return n},_=0,v=m.self._oneTimeTags=m.self._oneTimeTags||h.create(function(t){return t.id}),e.deliver=function(t,e){var n,o,s,a,c,l;if(null==e&&(e={}),d.trace(r,"Will deliver",t.id,t),c=t.once_per_page,c&&v.has(t))return v.get(t).id;O(t),t.id=t.id||_++,t.time={"mode":"async","start":A()},null==t.method&&(t.method=i.isFunction(t.content)?"apply":"document"),t.delivered=!0,s=function(){t.time.end=A(),t.time.duration=t.time.end-t.time.start},a=function(e){t.error=e&&e.message&&e||{"message":"unknown error"},u.fire("tag:fail",{"id":t.id,"alias":t.name,"error":t.error.message}),d.debug(r,"Tag "+t.id+" failed")},u.fire("tag:started",{"id":t.id,"alias":t.name}),n=function(){s(),t.freq_cap&&x.count("tag"+t.id+".day"),d.debug(r,"Tag "+t.id+" done"),u.fire("tag:done",{"id":t.id,"alias":t.name}),"function"==typeof e.done&&e.done()};try{l=g[t.method](t,n,a,e),c&&v.put({"id":t.id})}catch(e){o=e,d.error(r,"Unable to deliver tag w/ ID: "+t.id),a(o)}return l},e.claimOneTimers=function(t){var e,n,r,o;null!=t&&(r=function(){var e,n,r;for(r=[],e=0,n=t.length;e=l.lastStart,a.name),l.lastStart=o)})})},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={"exports":{},"id":r,"loaded":!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(1),o=r(i);t.exports=o["default"]},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(){}function s(){var t=_.shift();if(t){var e=p.last(t);e.afterDequeue(),t.stream=a.apply(void 0,t),e.afterStreamStart()}}function a(t,e,n){function r(t){t=n.beforeWrite(t),m.write(t),n.afterWrite(t)}m=new f["default"](t,n),m.id=g++,m.name=n.name||m.id,u.streams[m.name]=m;var i=t.ownerDocument,a={"close":i.close,"open":i.open,"write":i.write,"writeln":i.writeln};c(i,{"close":o,"open":o,"write":function(){for(var t=arguments.length,e=Array(t),n=0;n2&&void 0!==arguments[2]?arguments[2]:null,r=d+e;h.existy(n)&&""!==n?t.setAttribute(r,n):t.removeAttribute(r)}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.root=e,this.options=n,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new l["default"]("",{"autoFix":n.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],a(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();h.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={"type":"function","value":t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,n=void 0,r=void 0,i=[];(e=this.parser.readToken())&&!(n=h.isScript(e))&&!(r=h.isStyle(e));)e=this.options.beforeWriteToken(e),e&&i.push(e);i.length>0&&this._writeStaticTokens(i),n&&this._handleScriptToken(e),r&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,p&&(e.proxyInnerHTML=this.proxyRoot.innerHTML),this._walkChunk(),p&&(e.actualInnerHTML=this.root.innerHTML),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,n=[],r=[],i=[],o=t.length,s=0;s)/," "+d+"id="+c+" $1")),a.attrs.id!==_&&a.attrs.id!==g&&i.push("atomicTag"===a.type?"":"<"+a.tagName+" "+d+"proxyof="+c+(a.unary?" />":">"))}}else r.push(u),i.push("endTag"===a.type?u:"")}return{"tokens":t,"raw":n.join(""),"actual":r.join(""),"proxy":i.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];h.existy(t=e.shift());){var n=1===t.nodeType,r=n&&s(t,"proxyof");if(!r){n&&(this.actuals[s(t,"id")]=t,a(t,"id"));var i=t.parentNode&&s(t.parentNode,"proxyof");i&&this.actuals[i].appendChild(t)}e.unshift.apply(e,h.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,n=this.parser.clear();n&&this.writeQueue.unshift(n),t.src=t.attrs.src||t.attrs.SRC,t=this.options.beforeWriteToken(t),t&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,g),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),h.eachKey(t.attrs,function(t,n){e.setAttribute(t,n)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('');var n=this.doc.getElementById(e);n&&n.parentNode.replaceChild(t,n)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({"msg":"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var n=this._buildScript(t),r=this._shouldRelease(n),i=this.options.afterAsync;t.src&&(n.src=t.src,this._scriptLoadHandler(n,r?i:function(){e(),i()}));try{this._insertCursor(n,_),n.src&&!r||e()}catch(t){this.options.error(t),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return h.eachKey(t.attrs,function(t,n){e.setAttribute(t,n)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function n(){t=t.onload=t.onreadystatechange=t.onerror=null}function r(){n(),null!=e&&e(),e=null}function i(t){n(),s(t),null!=e&&e(),e=null}function o(t,e){var n=t["on"+e];null!=n&&(t["_on"+e]=n)}var s=this.options.error;o(t,"load"),o(t,"error"),u(t,{"onload":function(){if(t._onload)try{t._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){i({"msg":"onload handler failed "+e+" @ "+t.src})}r()},"onerror":function(){if(t._onerror)try{t._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void i({"msg":"onerror handler failed "+e+" @ "+t.src})}i({"msg":"remote script failed "+t.src})},"onreadystatechange":function(){/^(loaded|complete)$/.test(t.readyState)&&r()}})},t.prototype._shouldRelease=function(t){var e=/^script$/i.test(t.nodeName);return!e||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e["default"]=m},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={"exports":{},"id":r,"loaded":!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(1),o=r(i);t.exports=o["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]); return e["default"]=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var s=n(2),a=i(s),u=n(3),c=i(u),l=n(6),f=r(l),h=n(5),p={"comment":/^");if(e>=0)return new c.CommentToken(t.substr(4,e-1),e+3)}function i(t){var e=t.indexOf("<");return new c.CharsToken(e>=0?e:t.length)}function o(t){var e=t.indexOf(">");if(e!==-1){var n=t.match(l.startTag);if(n){var r=function(){var t={},e={},r=n[2];return n[2].replace(l.attr,function(n,i){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",e[arguments[5]]=!0):t[i]=arguments[2]||arguments[3]||arguments[4]||l.fillAttr.test(i)&&i||"":t[i]="",r=r.replace(n,"")}),{"v":new c.StartTagToken(n[1],n[0].length,t,e,(!!n[3]),r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===("undefined"==typeof r?"undefined":u(r)))return r.v}}}function s(t){var e=o(t);if(e){var n=t.slice(e.length);if(n.match(new RegExp("","i"))){var r=n.match(new RegExp("([\\s\\S]*?)","i"));if(r)return new c.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}}function a(t){var e=t.match(l.endTag);if(e)return new c.EndTagToken(e[1],e[0].length)}e.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.comment=r,e.chars=i,e.startTag=o,e.atomicTag=s,e.endTag=a;var c=n(4),l={"startTag":/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,"endTag":/^<\/([\-A-Za-z0-9_]+)[^>]*>/,"attr":/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,"fillAttr":/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var i=n(5),o=(e.Token=function t(e,n){r(this,t),this.type=e,this.length=n,this.text=""},e.CommentToken=function(){function t(e,n){r(this,t),this.type="comment",this.length=n||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"