!function(){(function(t,e){function n(t){return function(e,n,i){if(n)t[e]={when:function(){try{return n.call(t[e])}catch(t){return console&&console.warn('[when()@VisitorSegment("'+e+'")]',"Continuing despite error.",t),null}},setup:function(){try{return i.call(t[e])}catch(t){return console&&console.warn('[setup()@VisitorSegment("'+e+'")]',"Continuing despite error.",t),null}}},i&&(t[e]._setupResult=!!t[e].call(t[e]));else if(t[e])return t[e].when.call(t[e],t[e]._setupResult)}}function i(){var t=navigator.userAgent;return!!(t.match(/Android/i)||t.match(/webOS/i)||t.match(/iPhone/i)||t.match(/iPad/i)||t.match(/iPod/i)||t.match(/BlackBerry/i)||t.match(/Kindle/i)||t.match(/Windows Phone/i)||t.match(/IEMobile/i))}function a(t){var e=localStorage.getItem("_vsData")||"{}";return JSON.parse(e)[t]}function r(t,e){var n=localStorage.getItem("_vsData")||"{}",n=JSON.parse(n);n[t]=e,e=JSON.stringify(n),localStorage.removeItem("_vsData"),localStorage.setItem("_vsData",e)}var s=t._vsdata=t._vsdata||{},o=function(t,e,i){return n(s).call(this,t,e,i)};o.clone=function(t){var e;if(t)if(null===s||"object"!=typeof s)e=s;else{t=s.constructor();for(e in s)s.hasOwnProperty(e)&&(t[e]=s[e]);e=t}else e=s;return n(e)};var c={};o.resolve=function(t,e){c[t]||(c[t]=[]),setTimeout(function(){c[t].resolved=!0,c[t].argsobj=e;var n,i,a=c[t];for(i=0;a.length,n=a[i];i++)n.fn(e)},0)},o.done=function(t,e){t&&e&&(c[t]||(c[t]=[]),c[t].resolved?e(c[t].argsobj):"function"==typeof e&&c[t].push({fn:e}))},o.Deferred=function(t){this.done=function(e){o.done(t,e)},this.resolve=function(e){o.resolve(t,e)}},o("desktop",function(){return!i()}),o("!mobile",function(){return!o("mobile")}),o("mobile",function(){return i()}),o("touch",function(){return!!("ontouchstart"in t)}),o("!touch",function(){return!o("touch")}),o("first_visit",function(){var t=a("first_time_start"),e=a("first_time_end");return t&&!e&&18e5<=(new Date).getTime()-new Date(t).getTime()?(r("first_time_end",!0),!1):t?!e:(r("first_time_start",(new Date).getTime()),!0)}),t.VisitorSegment=o})(window),function(t,e,i){function a(t,e){function n(t){this.$dw=a,this.length=0,this._add=function(t,e){var n=e.length;return m.each(t,function(t,i){e[n+t]=i,e.length++}),e},this._add(t,this),this.toArray=function(){var t=[];for(var e in this)this[e]instanceof a.Variant&&t.push(this[e]);return t}}this._id=i,this._config={},this._testData={},this._ignoreBlacklist=i,this._state="uninitialized",this._handlers=[],this._dispatches={},this._id=t||this._id,this._visitor=e||new this.Visitor({},n),_[this._id]=this,this._handlers=f[this._id]||this._handlers,n.prototype=this.$plugins;var a=this;this._makeResult=function(t){var e=t||[];return e.constructor!==Array&&(e=[e]),new n(e)}}function r(t,e,i,a){var r=[];return m.each(e,function(t,e){var i=e.customOptions,a="";if(i)for(n in i)i.hasOwnProperty(n)&&(a+=[n,i[n]].join("="));r.push(e.name+a)}),[t,r.sort().join(""),!!i,a].join("")}function s(t,e,n){var i;return m.each(t,function(t,a){if(a[e]==n)return i=a,!1}),i}function o(t){if(!t)throw new Error("invalid name");return t.toLowerCase()}function c(t){return{name:"Dw__"+t,visit:"Dw__"+t+"__visit",blacklisted:"Dw__"+t+"__blstd",compute:"Dw__"+t+"__cmpted",hash:"Dw__"+t+"__hash",phash:"Dw__"+t+"__phash"}}function l(){return Math.random(0,1)}function u(t,e,n){return t>=e&&t<=n}function h(t,e){var n,i={};for(n in t[e])"boolean"==typeof t[e][n]&&(i[n]=!!t[e][n]);return i}function p(e){var n,i,a,r=e||{},s=0,o=[];for(i in r)a=t(i),a=a&&a.constructor==Boolean,a&&o.push(i),r.hasOwnProperty(i)&&(n=n||!!r[i]&&!!a,r[i]&&s++);return{match:o,value:!(0!==s?!n:1==Object.keys(r).length)}}var m={each:function(t,e){for(var n,i=0;i<t.length&&("boolean"!=typeof(n=e(i,t[i]))||n);i++);},remove:function(t,e){return e>-1&&t.splice(e,1),t},addClass:function(t,e){t.classList.add(e)},removeClass:function(t,e){t.classList.remove(e)}},f={};if(e._dw&&e._dw.constructor===Array){for(var d=0;d<e._dw.length;d++)f[e._dw[d][0]]||(f[e._dw[d][0]]=[]),f[e._dw[d][0]].push(e._dw[d].slice(1,e._dw[d].length));e._dw.$plugins&&(a.prototype.$plugins=e._dw.$plugins)}var _={};e._dw=a,a.prototype.collections=function(t){if(!t)return this._collections;this._collections=t},a.prototype.init=function(){function t(){e.applyData.call(e,e.collections.call(e)),"initialized"!=e._state&&e.dispatch.call(e,"ready"),e._state="initialized",e.dispatch.call(e,"init")}this.disabled=!this.collections(),this.dispatch("before");var e=this;this.deferSegments()?this.push(["segments-done",t]):t()},a.prototype.config=function(t){this._config.trackValueDelimiter=t.trackValueDelimiter,this._config.deferSegments=t.deferSegments,this.collections(t.collections||[])},a.prototype.version=function(){return"2.0.0"},a.prototype.id=function(){return this._id},a.prototype.push=function(t){this._dispatches[t[0]]&&t[1]&&t[1](this,this._dispatches[t[0]]?this._dispatches[t[0]].data:i),this._handlers.push(t)},a.prototype.dispatch=function(t,e){var n=this;this._dispatches[t]={ts:(new Date).getTime(),data:e},this._handlers.length&&m.each(this._handlers,function(e,i){i[0]==t&&i[1]&&i[1](n,n._dispatches[t].data)})},a.prototype.state=function(){return this._state},a.prototype.trackValueDelimiter=function(){return this._config.trackValueDelimiter},a.prototype.deferSegments=function(){return this._config.deferSegments},a.prototype.applyData=function(t){var e;this.disabled||!this._detectLocalStorage()||this._isOptOut()||(e=this._datastore={tests:[]},this._ignoreBlacklist=this._getLocalItem("Dw__ib"),m.each(t||[],function(t,n){"boolean"!=typeof n.disabled||n.disabled||Array.prototype.push.apply(e.tests,n.tests)}),this.collection(e))},a.prototype.collection=function(t){function e(t){if(!t.name)throw new Error("missing name");var e=new this.Test(t,this);switch(0==Object.keys(e).length&&e.constructor==Object||(this._testData[t.name]=e),e.state){case"registered":this.dispatch("variant-register",t.name);break;case"deregistered":this.dispatch("variant-deregister",t.name);break;case"persisted":this.dispatch("variant-persist",t.name)}return this.dispatch("variant-done",t.name),e}var n,i=this,a=[],r=[];t.disabled||(n=t.tests||[],m.each(n,function(t,e){e["x-linked"]?a.push(e):r.push(e)}),m.each(a,function(t,n){if(n=e.call(i,n),n.variation&&n.variation.run)return!1}),m.each(r,function(t,n){e.call(i,n)}))},a.prototype.ignoreBlacklist=function(t){t?(this._ignoreBlacklist="yes",this._setLocalItem("Dw__ib","yes")):(this._ignoreBlacklist=i,this._removeLocalItem("Dw__ib"))},a.prototype.optOut=function(){this._setLocalItem("Dw__OO","yes")},a.prototype.getVariant=function(t,e,n){function a(t){var n=!r.disabled&&r._testData[t]||{},i=n.variation||new r.Variant(n,r);return e||!n.variation||i.historic||(i.historic=!0),i}var r=this;if("."==t[0])return this.$commands[t].call(this);t=t.constructor!==Array?[t]:t;var s=[];return m.each(t,function(t,e){var n=r.getTest(e),o=r._testData[e],c=o&&o.variation?o.variation.historic:i;r._testData[e]=new r.Test(n._originalData,r),r._testData[e].variation&&(r._testData[e].variation.historic=c),s.push(a(e))}),n?s:this._makeResult(s)},a.prototype.use=function(t){this.getVariant(t,!1,!1)},a.prototype.get=function(t){return this.getVariant(t,!1,!1)},a.prototype.getTestOf=function(t){return t.getTest()},a.prototype.getToolkitOf=function(t){return t.getToolkit()},a.prototype.set=function(t,e){var n=_[this.id()];n&&0==this.find({name:t,run:!0}).length&&(n._mset=n._mset||{},n._mset[t]={},n._mset[t][e]=!0)},a.prototype.$commands={".get_history":function(){return this.find({historic:!0})}},a.prototype.segment=t,a.prototype.find=function(t){var e=this,n=t||{},i=[];return m.each(this.collections(),function(t,a){m.each(a.tests,function(t,a){var r=0,s=e.getVariant(a.name,!0,!0)[0];for(var o in n)n[o]instanceof RegExp?(n[o].test(a[o])||"string"==typeof s.name&&n[o].test(s[o]))&&r++:(a[o]===n[o]||"string"==typeof s.name&&s[o]===n[o])&&r++;r==Object.keys(n).length&&i.push(s)})}),this._makeResult(i)},a.prototype.clear=function(){delete _[this.id()]._mset;var t=this;m.each(this.collections(),function(e,n){m.each(n.tests,function(e,n){t._deregisterVariant(n.name)})})},a.prototype.$handlers={applyClass:function(t,e,n){m.removeClass(this,"dw-not-loaded"),m.addClass(this,"dw-"+e+"-"+n+"-"+t)}},a.prototype.applyClass=function(t,e,n){var i=function(t){var e=t.split(".");return{test:e[0],variant:e[1]}}(e),a=this.getVariant(i.test),r=a.is(i.variant);i.test&&i.variant&&(this.$handlers.applyClass.call(t,r,i.test,i.variant),n&&n.call(t,r,i.test,i.variant))},a.prototype.$plugins=a.prototype.$plugins||{},a.prototype.$plugins.add=function(t){return t="string"==typeof t?this.$dw.getVariant(t):t,this.$dw._makeResult(this._add(t,this)),this},a.prototype.$plugins.is=function(t){function e(t,e){return!!t&&t===e.name}var n=!!this.length;return m.each(this,function(i,a){e(t,a)||(n=!1)}),n},a.prototype.$plugins.clear=function(t){var e=this.$dw;m.each(this,function(t,n){e._deregisterVariant(n.$tc.name)})},a.prototype.$plugins.has=function(t){function e(t,e){return!!t&&t===e.name}var n=!1;return m.each(this,function(i,a){e(t,a)&&(n=!0)}),n},a.prototype.$plugins.toTrackVar=function(t,e,n){function i(t,n){if(n.trackvars){var i=[],a=t||(n.trackvars[0]?n.trackvars[0].name:"");return m.each(n.trackvars,function(t,e){o(a)===o(e.name)&&i.push(e.value)}),(i=i.join(s))&&(e?e+s:"")+i}}var a=this.$dw,r=[],s=n||a.trackValueDelimiter();return m.each(this,function(e,n){var a=i(t,n);a&&r.push(a)}),r.join(s)},a.prototype.$plugins.getTrackVar=a.prototype.$plugins.toTrackVar,a.prototype._deregisterVariant=function(t){var e=c(t);this._removeLocalItem(e.name),this._removeLocalItem(e.visit),this._removeLocalItem(e.blacklisted),this._removeLocalItem(e.compute),this._removeLocalItem(e.hash),this._removeLocalItem(e.phash)},a.prototype._detectLocalStorage=function(){var t="_adwi_";try{return this._setLocalItem(t,t),this._removeLocalItem(t),!0}catch(t){return!1}},a.prototype._isOptOut=function(){return"yes"==this._getLocalItem("Dw__OO")},a.prototype._removeLocalItem=function(t){var e=[t,this.id()].join("|");localStorage.removeItem(e)},a.prototype._getLocalItem=function(t){var e=[t,this.id()].join("|");try{return localStorage.getItem(e)}catch(t){return null}},a.prototype._setLocalItem=function(t,e){var n=[t,this.id()].join("|");this._getLocalItem(n)&&this._removeLocalItem(n);try{return localStorage.setItem(n,e)}catch(t){return i}},a.prototype.getTest=function(t){return this._testData[t]||new this.Test({},this)},a.prototype.visitor=function(){return this._visitor},a.prototype.Visitor=function(t,e){this.has=function(t){function n(t){var e=t instanceof a.prototype.Variant?t.getTest():t||{};return"registered"==e.state||"persisted"==e.state}var i;return e&&t instanceof e?m.each(t.toArray(),function(t,e){if(!(i=n(e)))return!1}):i=n(t),i}},a.prototype.Variant=function(t,e){var n=t||{};this.nocollect=!n.collect,this.historic=n.historic||!1,this.run=n.run||!1;var i=n.variation||{};this.getTest=function(){return e.getTest(n.name)},this.name=i.name||"",this.trackvars=i.track||[],this.customOptions=i.customOptions||{}},a.prototype.Test=function(t,e){var n=t.name||"",a=c(n),r=t.increment||0,s=t.variations||[],o=t["x-persist"]||!1,l=t.blacklist&&t.blacklist.referrers||[],u="yes"==e._getLocalItem(a.blacklisted),m={domains:l,segment:h(t,"segment")};this._originalData=t,this.data=function(t,e){if(e==i)return this._originalData[t];this._originalData[t]=e},this.getToolkit=function(){return e};var f=p(m.segment);this.segments=m.segment?f.match:[];var d=!!m.segment&&f.value;u||e._getLocalItem(a.blacklisted)||(u=e._isBlacklisted(m.domains)||!d,e._setLocalItem(a.blacklisted,u?"yes":"no"));var _=!!s.length,g=s.length&&new e.Variant(e._registerVariant(n,s,u,r,d,o),e);this.name=n,_&&t.active&&!g.nocollect&&(this.variation=g);var v=_&&t.active?t.defaultTrack:[];u&&Array.prototype.push.apply(v,t.blacklist?t.blacklist.track:[]),(v.length&&g.nocollect||!_||!g||!d)&&(this.variation=new e.Variant({name:n,variation:{track:d?v:[]}},e)),_&&g&&d?g&&g.run?this.state="registered":this.state="persisted":(e._deregisterVariant(n),this.state="deregistered")},a.prototype._registerVariant=function(t,e,n,i,a,o){var h=c(t),p={cur:o?r(t,[],!1,i):r(t,e,n,i),old:o?this._getLocalItem(h.phash):this._getLocalItem(h.hash)},f=this._getLocalItem(h.name),d="yes"==this._getLocalItem(h.visit),g="yes"==this._getLocalItem(h.compute),v=function(t,e){var t=parseFloat(t.customOptions.target),e=parseFloat(e.customOptions.target);return t<e?-1:t>e?1:0},y=_[this.id()],w=s(e,"name",f),k=!(!a||(g||n||"string"==typeof f||w)&&(!g||p.cur==p.old));if(k)if(y._mset&&y._mset[t])m.each(e,function(e,n){y._mset[t][n.name]&&(w=n)});else{e.sort(v);var b=[],D=0,I=0;m.each(e,function(t,e){var n=e.customOptions&&e.customOptions.target;if(n){n=parseFloat(n)/100,D+=n;var i={value:[I,D]};I+=n,b.push(i)}});var L=l();m.each(b,function(t,e){u(L,e.value[0],e.value[1])&&(f=t)}),w=e[f]}w?this._setLocalItem(h.name,w.name):this._setLocalItem(h.name,"_default"),this._setLocalItem(h.visit,"yes"),this._setLocalItem(h.compute,"yes"),this._setLocalItem(h.hash,p.cur),this._setLocalItem(h.phash,p.cur);var O=w&&(!n||d)&&{name:t,variation:w,collect:!0};return O||(O={name:t}),O.run=k,O},a.prototype._isBlacklisted=function(t){function e(t){return t.replace(/\./g,"\\.").replace(/\-/g,"\\-")}function n(t){var n=new RegExp("^(http://)?(www\\.)?"+e(t),"gi");return!t&&!document.referrer||(t&&document.referrer.match(n)||[]).length>0}var i,a=t||[];return this._ignoreBlacklist||m.each(a,function(t,e){return!(i=n(e))}),i},t("darwin-toolkit:v2.0.0",function(){return!0}),e._dw.push=function(t){_[t[0]]?(_[t[0]]._dispatches[t[1]]&&t[2]&&t[2](_[t[0]]),_[t[0]]._handlers.push(t.slice(1,t.length))):(f[t[0]]||(f[t[0]]=[]),f[t[0]].push(t.slice(1,t.length)))},e._dw}(VisitorSegment,this),function(t){var e=new t("global"),n={};n.trackValueDelimiter=",",n.deferSegments=!0,n.collections=[{name:"cpc",disabled:!1,tests:[{name:"cpc-cem1677",active:!1,"x-persist":!0,"x-status":"1","x-linked":"0",increment:0,segment:{reg:!0},_token:"4996e5",variations:[{customOptions:{target:"50"},name:"control",track:[{name:"ensighten",dynamic:!1,value:"cpc-cem1677:control"},{name:"ensighten",dynamic:!1,value:"cpc-cem1677-4996e5"}]},{customOptions:{target:"50"},name:"experience",track:[{name:"ensighten",dynamic:!1,value:"cpc-cem1677:experience"},{name:"ensighten",dynamic:!1,value:"cpc-cem1677-4996e5"}]}],defaultTrack:[{name:"ensighten",dynamic:!1,value:"cpc-cem1677:default"},{name:"ensighten",dynamic:!1,value:"cpc-cem1677-4996e5"}]},{name:"cpc-cem1229",active:!1,"x-persist":!0,"x-status":"1","x-linked":"0",increment:0,segment:{regwall:!0},_token:"7ad8fb",variations:[{customOptions:{target:"100"},name:"control",track:[{name:"ensighten",dynamic:!1,value:"cpc-cem1229:control"},{name:"ensighten",dynamic:!1,value:"cpc-cem1229-7ad8fb"}]}],defaultTrack:[{name:"ensighten",dynamic:!1,value:"cpc-cem1229:default"},{name:"ensighten",dynamic:!1,value:"cpc-cem1229-7ad8fb"}]},{name:"cpc-cem1591",active:!1,"x-persist":!0,"x-status":"1","x-linked":"0",increment:0,segment:{reg:!0},_token:"6f7572",variations:[{customOptions:{target:"50"},name:"control",track:[{name:"ensighten",dynamic:!1,value:"cpc-cem1591:control"},{name:"ensighten",dynamic:!1,value:"cpc-cem1591-6f7572"}]},{customOptions:{target:"50"},name:"experience",track:[{name:"ensighten",dynamic:!1,value:"cpc-cem1591:experience"},{name:"ensighten",dynamic:!1,value:"cpc-cem1591-6f7572"}]}],defaultTrack:[{name:"ensighten",dynamic:!1,value:"cpc-cem1591:default"},{name:"ensighten",dynamic:!1,value:"cpc-cem1591-6f7572"}]}]}],e.config(n),this.__dwCallback__?this.__dwCallback__(e):e.init()}(this._dw)}();