if(!window.CQ_Analytics){window.CQ_Analytics={} }CQ_Analytics.Operator=(function(){return function(){} })(); CQ_Analytics.Operator.IS="is"; CQ_Analytics.Operator.EQUALS="equals"; CQ_Analytics.Operator.NOT_EQUAL="notequal"; CQ_Analytics.Operator.GREATER="greater"; CQ_Analytics.Operator.GREATER_OR_EQUAL="greaterorequal"; CQ_Analytics.Operator.OLDER="older"; CQ_Analytics.Operator.OLDER_OR_EQUAL="olderorequal"; CQ_Analytics.Operator.LESS="less"; CQ_Analytics.Operator.LESS_OR_EQUAL="lessorequal"; CQ_Analytics.Operator.YOUNGER="younger"; CQ_Analytics.Operator.YOUNGER_OR_EQUAL="youngerorequal"; CQ_Analytics.Operator.CONTAINS="contains"; CQ_Analytics.Operator.BEGINS_WITH="beginswith"; CQ_Analytics.Operator.EXISTS="exists"; CQ_Analytics.Operator.DOES_NOT_EXIST="doesnotexist"; CQ_Analytics.Operator.formatIP=function(b){var c=String(b).match(/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/); var a=b; if(c&&c.length===5){c.shift(); a=[]; while(c.length){a.push(("00"+c.shift()).slice(-3)) }a=a.join(".") }return a }; CQ_Analytics.OperatorActions=function(){var mapping={}; var addOperator=function(name,text,operation){mapping[name]=[text,operation] }; addOperator(CQ_Analytics.Operator.EQUALS,"equals","=="); addOperator(CQ_Analytics.Operator.IS,"is","=="); addOperator(CQ_Analytics.Operator.NOT_EQUAL,"is not equal to","!="); addOperator(CQ_Analytics.Operator.GREATER,"is greater than",">"); addOperator(CQ_Analytics.Operator.GREATER_OR_EQUAL,"is equal to or greater than",">="); addOperator(CQ_Analytics.Operator.OLDER,"is older than",">"); addOperator(CQ_Analytics.Operator.OLDER_OR_EQUAL,"is equal to or older than",">="); addOperator(CQ_Analytics.Operator.LESS,"is less than","<"); addOperator(CQ_Analytics.Operator.LESS_OR_EQUAL,"is equal to or less than","<="); addOperator(CQ_Analytics.Operator.YOUNGER,"is younger than","<"); addOperator(CQ_Analytics.Operator.YOUNGER_OR_EQUAL,"is equal to or younger than","<="); addOperator(CQ_Analytics.Operator.CONTAINS,"contains",function(s1,s2){if(s1){if(s2){s1=""+s1; s2=""+s2; return s1.toLowerCase().indexOf(s2.toLowerCase())!=-1 }return true }return false }); addOperator(CQ_Analytics.Operator.BEGINS_WITH,"begins with",function(s1,s2){if(s1){if(s2){s1=""+s1; s2=""+s2; return s1.toLowerCase().indexOf(s2.toLowerCase())==0 }return true }return false }); addOperator(CQ_Analytics.Operator.EXISTS,"exists",function(s1){return !!s1 }); addOperator(CQ_Analytics.Operator.DOES_NOT_EXIST,"does not exist",function(s1){return !s1 }); var getByIndex=function(op,index){if(mapping[op]&&mapping[op][index]){return mapping[op][index] }return"" }; var escapeQuote=function(str){if(str){str=str.replace(new RegExp("\\'","ig"),str) }return str }; return{getText:function(operator){return getByIndex(operator,0) },setText:function(operator,newText){if(mapping[operator]&&mapping[operator][0]){mapping[operator][0]=newText }},getOperation:function(operator){return getByIndex(operator,1) },operate:function(object,property,operator,value,valueFormat){var op=this.getOperation(operator); op=op?op:operator; if((!valueFormat||valueFormat==="")&&(op in {"<":1,"<=":1,">":1,">=":1})&&!isNaN(parseFloat(value-0))){valueFormat="parseFloat" }try{if(object){var toEval=""; var objectValue=CQ.shared.XSS.getXSSTablePropertyValue(object,property); if(typeof op=="function"){return op.call(this,objectValue,value,valueFormat) }else{if(valueFormat){toEval=valueFormat+"('"+objectValue+"') "+op+" "+valueFormat+"('"+value+"')" }else{var s1=escapeQuote(objectValue); var s2=escapeQuote(value); toEval="'"+s1+"' "+op+" '"+s2+"'" }var b=eval(toEval); return b }}}catch(e){}return false }} }(); CQ_Analytics.Utils=new function(){return{registerDocumentEventHandler:function(c,b){var a=window.document[c]; if(typeof window.document[c]!="function"){window.document[c]=b }else{window.document[c]=function(d){if(a){a(d) }b(d) } }},eventWrapper:function(a){return function(d){var c,b; if(document.all){c=window.event.keyCode; b=window.event }else{c=(typeof(d.which)!="undefined")?d.which:0; b=d }if(b){a(b,c) }} },loadElement:function(a,b){$CQ("#"+b).load(a) },loadTeaserElement:function(a,d){var e=$CQ("#"+d).css("height"); var f=$CQ("#"+d).height(); if(f>0){$CQ("#"+d).css("height",f) }var g=function(n){if(n&&n!=""){var m=$CQ(n).css("display","none"); var h=$CQ("#"+d)[0]; $CQ("#"+d).empty().append(m); if(h&&h.parentElement){$CQ(h.parentElement).trigger("target-dom-loaded") }m.fadeIn(function(){if(e&&e!="0px"){$CQ("#"+d).css("height",e) }}) }else{if(e&&e!="0px"){$CQ("#"+d).css("height",e) }}}; var j=function(h,m){if(!CQ_Analytics.Utils.teasersCache){CQ_Analytics.Utils.teasersCache={} }CQ_Analytics.Utils.teasersCache[h]=m }; var b=function(){if(CQ_Analytics.Utils.teasersCache&&CQ_Analytics.Utils.teasersCache[a]){g(CQ_Analytics.Utils.teasersCache[a]) }else{CQ_Analytics.Utils.teasersLoading=CQ_Analytics.Utils.teasersLoading||{}; if(CQ_Analytics.Utils.teasersLoading[a]){window.setTimeout(function(){CQ_Analytics.Utils.loadTeaserElement(a,d) },100) }else{CQ_Analytics.Utils.teasersLoading[a]=true; k() }}}; var k=function(){var m=a; var h=location.href; if(typeof CQ_CONTENT_PATH!="undefined"){h=CQ_CONTENT_PATH }var n=CQ.shared.HTTP.getParameter(h,"wcmmode"); if(n){m+=(m.indexOf("?")>0?"&":"?")+"wcmmode="+n }CQ.shared.HTTP.get(m,function(s,r,p){if(r){var q=p.body; if(q){q=q.replace(new RegExp("\\n","ig"),""); q=q.replace(new RegExp("\\r","ig"),""); j(a,q); delete CQ_Analytics.Utils.teasersLoading[a]; b() }}else{j(a,"") }}) }; var c=$CQ("#"+d).children().length; if(c>0){var l=0; $CQ("#"+d).children().fadeOut(function(){var h=$CQ(this); window.setTimeout(function(){h.remove(); l++; if(l>=c){b() }},50) }) }else{b() }},clearElement:function(a){if(a){$CQ("#"+a).html("") }},indexOf:function(d,c){for(var b=0,a=d.length; b' }else{if(d&&d.indexOf&&d.indexOf("www.gravatar.com")!=-1){b.innerHTML='' }else{b.innerHTML=d }}b.title=c; b.alt=c; return b },createEditablePropertySpan:function(b,d){var a="var editSpan = this.nextSibling; this.style.display = 'none'; editSpan.style.display = 'block';"; var e="var editSpan = this.parentNode; var readSpan = this.parentNode.previousSibling;var newValue = this.value;editSpan.style.display = 'none'; readSpan.innerHTML = '"+b+" = '+value; readSpan.style.display = 'block';"; var c=document.createElement("span"); c.innerHTML=''+b+" = "+d+""; c.innerHTML+=''; c.className="ccl-data"; return c }} }; var generateURLSignature=function(a,d,c){if(a&&a.match(/^https?:\/\/maps\.googleapis\.com\//)){var b=a.replace(/^https?:\/\/[^/]*/,"").replace(/&/g,"&"); $CQ.ajax({url:CQ.shared.HTTP.externalize("/etc/cloudsettings/default/contexthub/geolocation.signature.json"),method:"get",dataType:"json",cache:false,data:{url:b}}).done(function(e,h,g){if(g&&g.responseJSON){var f=this.baseURL.replace(/&/g,"&"); f+="&client="+g.responseJSON.client; f+="&channel="+g.responseJSON.channel; f+="&signature="+g.responseJSON.signature; d(f) }else{if(typeof c==="function"){c() }}}.bind({baseURL:a})).fail(c) }else{d(a) }}; CQ_Analytics.ClientContextUtils=new function(){return{renderStoreProperty:function(f,c,b,d,e,a){if(CQ_Analytics&&CQ_Analytics.CCM){CQ_Analytics.CCM.onReady(function(){var g=function(){var h=CQ_Analytics.StoreRegistry.getStore(c); if(h){var j=function(){var n=h.getProperty(b)||a; var m=$CQ("#"+f); if(m.attr("contenteditable")&&m.attr("contenteditable")!="inherit"){return }if(typeof(n)=="string"&&((n.indexOf("/")==0&&(n.toLowerCase().indexOf(".png")!=-1||n.toLowerCase().indexOf(".jpg")!=-1||n.toLowerCase().indexOf(".gif")!=-1)||n.toLowerCase().indexOf("http")==0))){if(!n||n==""){m.children().remove(); if(CQ_Analytics.isUIAvailable){m.html(CQ.I18n.getMessage("No",null,"Ex: No address, No keywords")+" "+b) }else{m.html("No "+b) }}else{var k=""; if(m.parents(".cq-cc-thumbnail").length==0||n.toLowerCase().indexOf("http")==0||n.indexOf("/libs/wcm/mobile")==0){k=n.replace(new RegExp("&","g"),"&") }else{k="/etc/clientcontext/shared/thumbnail/content.png"; k=CQ.shared.HTTP.addParameter(k,"path",CQ_Analytics.Variables.replaceVariables(n)) }k=CQ_Analytics.Variables.replaceVariables(k); var l=m.find("div").css("background-image")||""; if(l.indexOf(k+")")===-1){if(h.fireEvent("beforepropertyrender",h,f)!==false){generateURLSignature(CQ.shared.HTTP.externalize(k),function(o){m.html(""); m.children().remove(); $CQ("
").addClass("cq-cc-thumbnail-img").css("background-image","url("+o+")").appendTo(m); h.fireEvent("propertyrender",h,f) }) }}}}else{n=CQ_Analytics.Variables.replaceVariables(n); if(CQ_Analytics.isUIAvailable){n=(!n||n=="")?CQ.I18n.getMessage("No",null,"Ex: No address, No keywords")+" "+b:n=d+n+e }else{n=(!n||n=="")?"No "+b:n=d+n+e }if(m.html()!=n){if(h.fireEvent("beforepropertyrender",h,f)!==false){m.html(n); h.fireEvent("propertyrender",h,f) }}}}; if(h.fireEvent("beforeinitialpropertyrender",h,f)!==false){j(); if(h.addListener){h.addListener("update",function(){j() }) }h.fireEvent("initialpropertyrender",h,f) }}}; CQ_Analytics.ClientContextUtils.onStoreRegistered(c,g) }) }},renderStore:function(b,a){if(CQ_Analytics&&CQ_Analytics.CCM&&b&&a){CQ_Analytics.CCM.onReady(function(){var c=function(){var d=CQ_Analytics.StoreRegistry.getStore(a); if(d){d.divId=b; var e=function(){if(d.fireEvent("beforerender",d,d.divId)!==false){d.renderer(d,d.divId); d.fireEvent("render",d,d.divId) }}; if(d.fireEvent("beforeinitialrender",d,b)!==false){e(); if(d.addListener){d.addListener("update",function(){e() }) }d.fireEvent("initialrender",d,b) }}}; CQ_Analytics.ClientContextUtils.onStoreRegistered(a,c) }) }},storesOptionsProvider:function(){var c=[]; var a=CQ_Analytics.StoreRegistry.getStores(); for(var b in a){c.push({value:b}) }return c },storePropertiesOptionsProvider:function(c,e){var b=[]; var a=CQ_Analytics.StoreRegistry.getStore(c); if(a){var g=a.getPropertyNames(); for(var d=0; d0){f.DELAYED_INIT_TIMEOUT=window.setTimeout(function(){f.DELAYED_INIT_TIMEOUT=null; e.call(f,"initialize",f) },b) }else{e.call(f,"initialize",f) }}; var a=CQ_Analytics.StoreRegistry.getStore(c); if(a){if(a.isInitialized()){d.call(a); a.addListener("initialize",function(g,f){d.call(f) }) }else{a.addListener("initialize",function(g,f){d.call(f) }) }}else{CQ_Analytics.CCM.addListener("storeregister",function(g,f){if(f.getName()==c){CQ_Analytics.ClientContextUtils.onStoreInitialized(c,e,b) }}) }},init:function(c,b,a){CQ_Analytics.ClientContextMgr.PATH=c; CQ_Analytics.ClientContextMgr.loadConfig(a,true); $CQ.ajax({url:CQ.shared.HTTP.externalize(c+"/content/jcr:content/stores.init.js"),cache:false,async:true,dataType:"script",data:{path:b}}) },initUI:function(c,a,b){CQ_Analytics.ClientContextUI.create(c,a,b) }} }; CQ_Analytics.ClientContextUtils.DEFAULT_INIT_DELAY=200; CQ_Analytics.Variables=new function(){return{containsVariable:function(a){return CQ_Analytics.Variables.getVariables(a).length>0 },getVariables:function(b){if(!b||typeof(b)!="string"){return[] }var a=b.match(new RegExp("\\$\\{([\\w/]*)\\}","ig")); return a?a:[] },replaceVariables:function(e){if(!e){return e }var f=""; var d=e; var g=CQ_Analytics.Variables.getVariables(e); while(g.length>0&&f.indexOf(g.join())==-1){for(var c=0; c1){return b[1] }}return null },replace:function(a,b,c){return a.replace(new RegExp("\\$\\{"+b+"\\}","ig"),c) }} }; CQ_Analytics.SessionPersistence=CQ.shared.ClientSidePersistence; CQ_Analytics.Cookie=CQ.shared.ClientSidePersistence.CookieHelper; CQ_Analytics.Observable=function(){this.fireEvent=function(d){if(d&&this.listeners&&!this.suppressEvents){d=d.toLowerCase(); var b=Array.prototype.slice.call(arguments,0); var e=this.listeners.slice(0); for(var c=0; c0){this.fireEvent("update",d) }}; CQ_Analytics.SessionStore.prototype.initialized=false; CQ_Analytics.SessionStore.prototype.init=function(){this.initialized=true; this.fireEvent("initialize",this) }; CQ_Analytics.SessionStore.prototype.getLabel=function(a){return a }; CQ_Analytics.SessionStore.prototype.getLink=function(a){return a }; CQ_Analytics.SessionStore.prototype.removeProperty=function(a){if(this.data==null){this.init() }if(this.data[a]){delete this.data[a] }this.fireEvent("update",a) }; CQ_Analytics.SessionStore.prototype.getPropertyNames=function(a){if(this.data==null){this.init() }a=a?a:[]; var b=new Array(); for(var c in this.data){if(CQ_Analytics.Utils.indexOf(a,c)==-1){b.push(c) }}return b }; CQ_Analytics.SessionStore.prototype.getSessionStore=function(){return this }; CQ_Analytics.SessionStore.prototype.clear=function(){this.data=null }; CQ_Analytics.SessionStore.prototype.getData=function(b){if(this.data==null){this.init() }if(b){var a={}; for(var c in this.data){if(CQ_Analytics.Utils.indexOf(b,c)==-1){a[c]=this.data[c] }}return a }else{return this.data }}; CQ_Analytics.SessionStore.prototype.reset=function(){if(this.data!=null){this.data=null; this.fireEvent("update") }}; CQ_Analytics.SessionStore.prototype.getProperty=function(b,a){if(this.data==null){this.init() }var d=this.data[b]; if(!a){var c=CQ.shared.XSS.getXSSValue(d); return c }return d }; CQ_Analytics.SessionStore.prototype.getName=function(){return this.STORENAME }; CQ_Analytics.SessionStore.prototype.addInitProperty=function(a,b){if(!this.initProperty){this.initProperty={} }this.initProperty[a]=b }; CQ_Analytics.SessionStore.prototype.getInitProperty=function(a){return this.initProperty?this.initProperty[a]:null }; CQ_Analytics.SessionStore.prototype.loadInitProperties=function(c,a){if(c){for(var b in c){this.addInitProperty(b,c[b]); if(a&&this.data&&this.data[b]===undefined){this.setProperty(b,c[b]) }}}}; CQ_Analytics.SessionStore.prototype.isInitialized=function(){return this.initialized }; CQ_Analytics.PersistedSessionStore=function(){}; CQ_Analytics.PersistedSessionStore.prototype=new CQ_Analytics.SessionStore(); CQ_Analytics.PersistedSessionStore.prototype.STOREKEY="key"; CQ_Analytics.PersistedSessionStore.prototype.setNonPersisted=function(a){if(!this.nonPersisted){this.nonPersisted={} }this.nonPersisted[a]=true }; CQ_Analytics.PersistedSessionStore.EXCLUDED_PROPERTIES_REGEX="^generated*"; CQ_Analytics.PersistedSessionStore.prototype.isPersisted=function(a){if(!this.nonPersisted){this.nonPersisted={} }return this.nonPersisted[a]!==true&&!new RegExp(CQ_Analytics.PersistedSessionStore.EXCLUDED_PROPERTIES_REGEX,"ig").test(a)&&!$CQ.isFunction(this.data[a])&&(typeof this.data[a])!="object" }; CQ_Analytics.PersistedSessionStore.prototype.getStoreKey=function(){return this.STOREKEY }; CQ_Analytics.PersistedSessionStore.prototype.persist=function(){if(this.fireEvent("beforepersist")!==false){var a=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); a.set(this.getStoreKey(),this.toString()); this.fireEvent("persist") }}; CQ_Analytics.PersistedSessionStore.prototype.setProperty=function(a,b){if(this.data==null){this.init() }this.data[a]=b; if(this.isPersisted(a)){this.persist() }this.fireEvent("update",a) }; CQ_Analytics.PersistedSessionStore.prototype.setProperties=function(b){if(this.data==null){this.init() }var d=[]; var e=false; for(var a in b){if(b.hasOwnProperty(a)){d.push(a); var c=b[a]; this.data[a]=c; if(this.isPersisted(a)){e=true }}}if(e){this.persist() }if(d.length>0){this.fireEvent("update",d) }}; CQ_Analytics.PersistedSessionStore.prototype.toString=function(){var b=null; if(this.data){var a=function(e){if(!e||typeof(e)!="string"){return e }var d=e; d=d.replace(new RegExp(",","g"),","); d=d.replace(new RegExp("=","g"),"="); d=d.replace(new RegExp("\\|","g"),"|"); return d }; for(var c in this.data){if(this.isPersisted(c)&&this.data.hasOwnProperty(c)){b=(b===null?"":b+","); b+=(c+"="+a(this.data[c])) }}}return b }; CQ_Analytics.PersistedSessionStore.prototype.parse=function(e){var d=function(h){if(!h||typeof(h)!="string"){return h }var g=h; g=g.replace(new RegExp(",","g"),","); g=g.replace(new RegExp("=","g"),"="); g=g.replace(new RegExp("|","g"),"|"); return g }; var c={}; var f=e.split(","); for(var a in f){if(f.hasOwnProperty(a)){var b=f[a].split("="); if(b.length==2){c[b[0]]=d(b[1]) }}}return c }; CQ_Analytics.PersistedSessionStore.prototype.reset=function(a){if(this.data!=null){this.data={}; this.persist(); this.data=null; if(!a){this.fireEvent("update") }}}; CQ_Analytics.PersistedSessionStore.prototype.removeProperty=function(a){if(this.data==null){this.init() }if(this.data[a]){delete this.data[a]; if(this.isPersisted(a)){this.persist() }}this.fireEvent("update",a) }; CQ_Analytics.PersistedSessionStore.prototype.clear=function(){var a=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); a.remove(this.getStoreKey()); this.data=null }; if(!CQ_Analytics.ClientContextMgr){CQ_Analytics.ClientContextMgr=function(){this.clientcontext=null; this.clientcontextToServer=null; this.stores={}; this.data=null; this.config=null; this.isConfigLoaded=false; this.areStoresLoaded=false }; CQ_Analytics.ClientContextMgr.prototype=new CQ_Analytics.PersistedSessionStore(); CQ_Analytics.ClientContextMgr.prototype.STOREKEY="CLIENTCONTEXT"; CQ_Analytics.ClientContextMgr.prototype.STORENAME="clientcontext"; CQ_Analytics.ClientContextMgr.prototype.INITIALIZATION_EVENT_TIMER=1000; CQ_Analytics.ClientContextMgr.prototype.CONFIG_PATH=CQ_Analytics.Utils.externalize("/etc/clientcontext/legacy/config.json",true); CQ_Analytics.ClientContextMgr.prototype.init=function(){if(!this.initialized){this.clientcontext={}; this.clientcontextToServer={} }var a=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); var b=a.get(this.getStoreKey()); if(b){this.data=this.parse(b) }else{this.data={} }this.initialized=true; this.fireEvent("initialize",this) }; CQ_Analytics.ClientContextMgr.prototype.getSessionId=function(){if(!this.data.sessionId){this.setSessionId(CQ_Analytics.Utils.getUID()) }return this.data.sessionId }; CQ_Analytics.ClientContextMgr.prototype.setSessionId=function(a){if(a){this.setProperty("sessionId",a) }}; CQ_Analytics.ClientContextMgr.prototype.getVisitorId=function(){return this.data.visitorId }; CQ_Analytics.ClientContextMgr.prototype.setVisitorId=function(a){this.setProperty("visitorId",a) }; CQ_Analytics.ClientContextMgr.prototype.getId=function(){var a=this.getVisitorId(); if(!a){return this.getSessionId() }return a }; CQ_Analytics.ClientContextMgr.prototype.isAnonymous=function(){var a=this.getVisitorId(); return(!a) }; CQ_Analytics.ClientContextMgr.prototype.isMode=function(a){return CQ_Analytics.ClientContextMgr.ServerStorage.isMode(a) }; CQ_Analytics.ClientContextMgr.prototype.get=function(a){if(this.clientcontext==null){this.init() }if(a){return this.clientcontextToServer }return this.clientcontext }; CQ_Analytics.ClientContextMgr.prototype.register=function(c){if(this.clientcontext==null){this.init() }var a=this; this.clientcontext[c.getName()]=c.getData(); this.stores[c.getName()]=c; CQ_Analytics.StoreRegistry.register(c); var b=this.getStoreConfig(c.getName()); if(b.stats!==false&&b.stats!="false"){this.clientcontextToServer[c.getName()]=c.getData(b.excludedFromStats) }if(this.initTimer){window.clearTimeout(this.initTimer); this.initTimer=null }var d=this.isConfigLoaded&&typeof this.config.initializationEventTimer!=="undefined"?this.config.initializationEventTimer:this.INITIALIZATION_EVENT_TIMER; this.initTimer=window.setTimeout(function(){a.fireEvent("storesinitialize"); a.areStoresInitialized=true },d); c.addListener("update",function(){a.update(c) }); CQ_Analytics.ClientContextMgr.ServerStorage.handleStoreRegistration(c); this.addListener("clear",function(){c.clear() }); this.fireEvent("storeregister",c); this.fireEvent("storeupdate",c) }; CQ_Analytics.ClientContextMgr.prototype.update=function(b){if(this.clientcontext==null){this.init() }this.clientcontext[b.getName()]=b.getData(); var a=this.getStoreConfig(b.getName()); if(a.stats!==false&&a.stats!="false"){this.clientcontextToServer[b.getName()]=b.getData(a.excludedFromStats) }this.fireEvent("storeupdate",b) }; CQ_Analytics.ClientContextMgr.prototype.startPosting=function(){return CQ_Analytics.ClientContextMgr.ServerStorage.startPosting() }; CQ_Analytics.ClientContextMgr.prototype.stopPosting=function(){return CQ_Analytics.ClientContextMgr.ServerStorage.stopPosting() }; CQ_Analytics.ClientContextMgr.prototype.post=function(){return CQ_Analytics.ClientContextMgr.ServerStorage.post() }; CQ_Analytics.ClientContextMgr.prototype.getCCMToJCR=function(){return CQ_Analytics.ClientContextMgr.ServerStorage.getCCMToJCR() }; CQ_Analytics.ClientContextMgr.prototype.getName=function(){return this.STORENAME }; CQ_Analytics.ClientContextMgr.prototype.clear=function(){this.clientcontext=null; this.clientcontextToServer=null; this.fireEvent("clear") }; CQ_Analytics.ClientContextMgr.prototype.getRegisteredStore=function(a){return this.stores&&this.stores[a]?this.stores[a]:null }; CQ_Analytics.ClientContextMgr.prototype.loadConfig=function(c,autoConfig){var setConfig=function(ccm,config){if(typeof config==="undefined"){config={} }ccm.config=config; ccm.isConfigLoaded=true; ccm.fireEvent("configloaded"); ccm.fireEvent("storesloaded"); ccm.areStoresLoaded=true }; if(c){setConfig(this,c) }else{if(!autoConfig){var params={}; params.path=CQ_Analytics.Utils.getPagePath(); params.cq_ck=new Date().valueOf(); var url=this.CONFIG_PATH; url+="?"+CQ_Analytics.Utils.urlEncode(params); CQ_Analytics.Utils.load(url,function(data,status,response){var config={}; try{config=eval("config = "+response.responseText) }catch(error){}setConfig(this,config) },this) }else{setConfig(this,{}) }}}; CQ_Analytics.ClientContextMgr.prototype.getConfig=function(){return this.config }; CQ_Analytics.ClientContextMgr.prototype.getStoreConfig=function(a){if(this.config&&this.config.configs&&this.config.configs[a]&&this.config.configs[a]["store"]){return this.config.configs[a]["store"] }return{} }; CQ_Analytics.ClientContextMgr.prototype.getEditConfig=function(a){if(this.config&&this.config.configs&&this.config.configs[a]&&this.config.configs[a]["edit"]){return this.config.configs[a]["edit"] }return{} }; CQ_Analytics.ClientContextMgr.prototype.getUIConfig=function(a){if(this.config&&this.config.configs&&this.config.configs[a]&&this.config.configs[a]["ui"]){return this.config.configs[a]["ui"] }return{} }; CQ_Analytics.ClientContextMgr.prototype.getInitialData=function(a){if(this.config&&this.config.data&&this.config.data[a]){return this.config.data[a] }return{} }; CQ_Analytics.ClientContextMgr.prototype.getStores=function(){return this.stores }; CQ_Analytics.ClientContextMgr.prototype.onReady=function(b,a){if(b){if(this.areStoresLoaded){b.call(a) }else{this.addListener("storesloaded",b,a) }}}; CQ_Analytics.ClientContextMgr=new CQ_Analytics.ClientContextMgr(); CQ_Analytics.CCM=CQ_Analytics.ClientContextMgr; CQ_Analytics.ClickstreamcloudMgr=CQ_Analytics.CCM; CQ_Analytics.ContextCloudMgr=CQ_Analytics.CCM; CQ_Analytics.ClientContextMgr.PATH=null; CQ_Analytics.ClientContextMgr.getClientContextURL=function(a){return CQ_Analytics.ClientContextMgr.PATH+a }; window.setTimeout(function(){CQ_Analytics.CCM.init() },1); CQ_Analytics.Utils.addListener(window,"unload",function(){try{for(var b in CQ_Analytics.ClientContextMgr){delete CQ_Analytics.ClientContextMgr[b] }CQ_Analytics.ClientContextMgr=null }catch(a){}CQ_Analytics.CCM=null }) }if(window.CQ_Analytics&&window.CQ_Analytics.ClientContextMgr&&!window.CQ_Analytics.ClientContextMgr.ServerStorage){CQ_Analytics.ClientContextMgr.ServerStorage=function(){this.posting=false; this.initialized=false }; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.POST_MODE_PAGELOAD=1; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.POST_MODE_TIMER=2; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.POST_MODE_DATAUPDATE=4; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.POST_TIMER=600; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.POST_PROCESS_TIMER=60; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.POST_MODE=6; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.POST_PATH="/var/statistics/"; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.init=function(){if(this.isMode(CQ_Analytics.ClientContextMgr.ServerStorage.POST_MODE_TIMER)){var a=this; var b=function(){a.timer=window.setInterval(function(){try{var d=parseInt(a.data.lastPost); var f=false; if(isNaN(d)){f=true }else{var e=new Date().getTime(); if(e>d+CQ_Analytics.ClientContextMgr.ServerStorage.POST_TIMER*1000){f=true }}}catch(c){}if(f){a.post() }},CQ_Analytics.ClientContextMgr.ServerStorage.POST_PROCESS_TIMER*1000) }; b.call(this) }this.initialized=true }; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.isMode=function(a){return(CQ_Analytics.CCM.POST_MODE&a)>0 }; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.handleStoreRegistration=function(a){if(!this.initialized){this.init() }if(this.isMode(CQ_Analytics.ClientContextMgr.ServerStorage.POST_MODE_DATAUPDATE)){a.addListener("persist",function(){CQ_Analytics.ClientContextMgr.ServerStorage.post(a) }) }}; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.startPosting=function(){this.posting=true }; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.stopPosting=function(){this.posting=false }; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.post=function(d,f){if(this.posting||f){try{var g=this.getCCMToJCR(d); var e=CQ_Analytics.Utils.getTimestamp(); g["./jcr:primaryType"]="nt:unstructured"; g["./sessionId"]=CQ_Analytics.CCM.getSessionId(); var c=this.POST_PATH+"clientcontext/"; if(CQ_Analytics.CCM.isAnonymous()){var a=CQ_Analytics.Utils.insert(CQ_Analytics.CCM.getId(),2,"/"); c+="anonymous/"+a+"/"+e }else{c+="users/"+CQ_Analytics.CCM.getId()+"/"+e }CQ_Analytics.Utils.post(c,null,g); this.lastPost=e }catch(b){}}}; CQ_Analytics.ClientContextMgr.ServerStorage.prototype.getCCMToJCR=function(g){var c=CQ_Analytics.CCM.get(true); var e={}; for(var j in c){if(!g||j==g){var a=c[j],b=encodeURIComponent(j); var f=typeof a; if(f=="object"){for(var d in a){var h=a[d]; d=d.replace(":","/"); e["./"+j+"/./"+d]=h }}else{e["./"+j]=a }}}return e }; CQ_Analytics.ClientContextMgr.ServerStorage=new CQ_Analytics.ClientContextMgr.ServerStorage(); CQ_Analytics.ClickstreamcloudMgr.POST_MODE_PAGELOAD=CQ_Analytics.ClientContextMgr.ServerStorage.POST_MODE_PAGELOAD; CQ_Analytics.ClickstreamcloudMgr.POST_MODE_TIMER=CQ_Analytics.ClientContextMgr.ServerStorage.POST_MODE_TIMER; CQ_Analytics.ClickstreamcloudMgr.POST_MODE_DATAUPDATE=CQ_Analytics.ClientContextMgr.ServerStorage.POST_MODE_DATAUPDATE; CQ_Analytics.ClickstreamcloudMgr.POST_TIMER=CQ_Analytics.ClientContextMgr.ServerStorage.POST_PROCESS_TIMER; CQ_Analytics.ClickstreamcloudMgr.POST_PROCESS_TIMER=CQ_Analytics.ClientContextMgr.ServerStorage.POST_PROCESS_TIMER; CQ_Analytics.ClickstreamcloudMgr.POST_MODE=CQ_Analytics.ClientContextMgr.ServerStorage.POST_MODE; CQ_Analytics.ClickstreamcloudMgr.POST_PATH=CQ_Analytics.ClientContextMgr.ServerStorage.POST_PATH }CQ_Analytics.Percentile={}; CQ_Analytics.Percentile.matchesPercentiles=function(b){var d=ClientContext.get("/surferinfo/percentile"); if(!d){d=Math.round(Math.random()*100); ClientContext.set("/surferinfo/percentile",d) }else{d=Number(d) }for(var c=0; cc){c=a }}}return c }; CQ_Analytics.SegmentMgr.prototype.getBoost=function(a){if(!(a instanceof Array)){a=[a] }return this.boosts[a]||0 }; CQ_Analytics.SegmentMgr.prototype.reload=function(path){var url=path; if(!url){url=this.SEGMENTATION_ROOT }if(url){if(url.indexOf(this.SEGMENT_SELECTOR)==-1){url+=this.SEGMENT_SELECTOR }try{CQ_Analytics.Utils.load(url,function(config,status,response){if(response&&response.responseText){eval(response.responseText) }},this); var response=CQ.HTTP.get(scripts[i].src) }catch(err){}}}; CQ_Analytics.SegmentMgr.prototype.getSessionStore=function(){return this }; CQ_Analytics.SegmentMgr.prototype.getProperty=function(a){return a }; CQ_Analytics.SegmentMgr.prototype.getLink=function(a){return a+".html" }; CQ_Analytics.SegmentMgr.prototype.getLabel=function(c){if(c){var b=c; var a=b.lastIndexOf("/"); if(a!=-1){b=b.substring(a+1,b.length) }var d=this.resolve(c); if(d===true){return b }else{if(d!==true){return''+b+"" }}}return c }; CQ_Analytics.SegmentMgr.prototype.getPropertyNames=function(){return this.getResolved() }; CQ_Analytics.SegmentMgr=new CQ_Analytics.SegmentMgr(); CQ_Analytics.SegmentMgr.loadSegments=function(a){CQ_Analytics.SegmentMgr.areSegmentsLoaded=false; if(!a||(a.length===0)){CQ_Analytics.SegmentMgr.areSegmentsLoaded=true; CQ_Analytics.SegmentMgr.fireEvent("segmentsload") }else{$CQ.ajax({url:CQ.shared.HTTP.externalize(a+".segment.js"),dataType:"script",async:true}).complete(function(){CQ_Analytics.SegmentMgr.areSegmentsLoaded=true; CQ_Analytics.SegmentMgr.fireEvent("segmentsload") }) }}; CQ_Analytics.SegmentMgr.renderer=function(a,c){if(a&&a.STORENAME==CQ_Analytics.SegmentMgr.STORENAME){var e=a.getPropertyNames(); var f=[]; f.push("
"); for(var d=0; d'+a.getLabel(b)+"") }f.push("
"); $CQ("#"+c).children().remove(); $CQ("#"+c).append(f.join("")) }}; CQ_Analytics.ClientContextMgr.addListener("storeupdate",CQ_Analytics.SegmentMgr.fireUpdate); CQ_Analytics.Utils.addListener(window,"unload",function(){try{for(var b in CQ_Analytics.SegmentMgr){delete CQ_Analytics.SegmentMgr[b] }}catch(a){}CQ_Analytics.SegmentMgr=null }) }if(!CQ_Analytics.StrategyMgr){CQ_Analytics.StrategyMgr=function(){this.strategies={} }; CQ_Analytics.StrategyMgr.prototype={}; CQ_Analytics.StrategyMgr.prototype.isRegistered=function(a){return !!this.strategies[a] }; CQ_Analytics.StrategyMgr.prototype.register=function(b,a){if(typeof a=="function"){this.strategies[b]=a }}; CQ_Analytics.StrategyMgr.prototype.choose=function(b,a){if(a.length==1){return a[0] }if(this.strategies[b]){return this.strategies[b].call(this,a) }return null }; CQ_Analytics.StrategyMgr=new CQ_Analytics.StrategyMgr() }CQ_Analytics.StrategyMgr.register("clickstream-score",function(h){if(h.length==1){return h[0] }var a=[]; if(window.CQ_Analytics&&window.CQ_Analytics.TagCloudMgr){var m=CQ_Analytics.TagCloudMgr.getTags(); m=m||{}; var l=-1; for(var e=0; el){a=[]; a.push(h[e]); l=g }}}}else{a=h }if(a.length==1){return a[0] }var b=null; if(window.CQ_Analytics&&window.CQ_Analytics.PageDataMgr){b=CQ_Analytics.PageDataMgr.getProperty("random") }if(!b){b=window.CQ_StrategyRandom }if(!b){b=window.CQ_StrategyRandom=Math.random() }if(parseFloat(b)>1){b=1/b }if(parseFloat(b)==1){b=0 }var c=Math.floor(b*a.length); return a[c] }); CQ_Analytics.StrategyMgr.register("first",function(a){return a[0] }); CQ_Analytics.StrategyMgr.register("random",function(c){var a=null; if(window.CQ_Analytics&&window.CQ_Analytics.PageDataMgr){a=CQ_Analytics.PageDataMgr.getProperty("random") }if(!a){a=window.CQ_StrategyRandom }if(!a){a=window.CQ_StrategyRandom=Math.random() }if(parseFloat(a)>1){a=1/a }if(parseFloat(a)==1){a=0 }var b=Math.floor(a*c.length); return c[b] }); if(!CQ_Analytics.PageDataMgr){CQ_Analytics.PageDataMgr=function(){}; CQ_Analytics.PageDataMgr.prototype=new CQ_Analytics.SessionStore(); CQ_Analytics.PageDataMgr.prototype.STORENAME="pagedata"; CQ_Analytics.PageDataMgr.prototype.FORCE_EXPERIENCE_COOKIE="cq-forceexperience"; CQ_Analytics.PageDataMgr.prototype.init=function(){this.data={}; for(var a in this.initProperty){this.data[a]=this.initProperty[a] }this.initialized=true; this.fireEvent("initialize",this); this.fireEvent("update") }; CQ_Analytics.PageDataMgr.prototype.getLabel=function(a){return a }; CQ_Analytics.PageDataMgr.prototype.getLink=function(a){return"" }; CQ_Analytics.PageDataMgr.prototype.setExperience=function(a){CQ.shared.HTTP.setCookie(CQ_Analytics.PageDataMgr.FORCE_EXPERIENCE_COOKIE,a,"/") }; CQ_Analytics.PageDataMgr.prototype.getExperience=function(){return CQ.shared.HTTP.getCookie(CQ_Analytics.PageDataMgr.FORCE_EXPERIENCE_COOKIE,"/") }; CQ_Analytics.PageDataMgr.prototype.clearExperience=function(){CQ.shared.HTTP.clearCookie(CQ_Analytics.PageDataMgr.FORCE_EXPERIENCE_COOKIE,"/") }; CQ_Analytics.PageDataMgr=new CQ_Analytics.PageDataMgr(); CQ_Analytics.CCM.addListener("configloaded",function(){this.loadInitProperties(CQ_Analytics.CCM.getInitialData(this.getName())); this.init(); CQ_Analytics.CCM.register(this) },CQ_Analytics.PageDataMgr) }CQ_Analytics.BrowserInfo=function(){var g=navigator.userAgent.toLowerCase(); var d=function(b){return b.test(g) }; var f=function(){if(d(/opera/)){return{browserFamily:"Opera",browserVersion:""} }if(d(/trident/)){var b={"7.0":"11","6.0":"10","5.0":"9","4.0":"8"}; var k=g.match(/trident\/([0-9\.]*)/); var j=""; if(k&&k.length>1){j=b[k[1]] }return{browserFamily:"IE",browserVersion:j} }if(d(/edge/)){var k=g.match(/edge\/([0-9]*)/); var j=""; if(k&&k.length>1){j=k[1] }return{browserFamily:"Edge",browserVersion:j} }if(d(/chrome/)){return{browserFamily:"Chrome",browserVersion:""} }if(d(/safari/)){if(d(/applewebkit\/4/)){return{browserFamily:"Safari",browserVersion:"2"} }if(d(/version\/3/)){return{browserFamily:"Safari",browserVersion:"3"} }if(d(/version\/4/)){return{browserFamily:"Safari",browserVersion:"4"} }if(d(/version\/5/)){return{browserFamily:"Safari",browserVersion:"5"} }if(d(/version\/6/)){return{browserFamily:"Safari",browserVersion:"6"} }return{browserFamily:"Safari",browserVersion:"7 or higher"} }if(d(/webkit/)){return{browserFamily:"WebKit",browserVersion:""} }if(d(/msie/)){if(d(/msie 6/)){return{browserFamily:"IE",browserVersion:"6"} }if(d(/msie 7/)){return{browserFamily:"IE",browserVersion:"7"} }if(d(/msie 8/)){return{browserFamily:"IE",browserVersion:"8"} }if(d(/msie 9/)){return{browserFamily:"IE",browserVersion:"9"} }if(d(/msie 10/)){return{browserFamily:"IE",browserVersion:"10"} }return{browserFamily:"IE",browserVersion:"11 or higher"} }if(d(/gecko/)){if(d(/rv:1\.8/)){return{browserFamily:"Firefox",browserVersion:"2"} }if(d(/rv:1\.9/)){return{browserFamily:"Firefox",browserVersion:"3"} }if(d(/rv:2.0/)){return{browserFamily:"Firefox",browserVersion:"4"} }if(d(/rv:5./)){return{browserFamily:"Firefox",browserVersion:"5"} }if(d(/rv:6./)){return{browserFamily:"Firefox",browserVersion:"6"} }if(d(/rv:7./)){return{browserFamily:"Firefox",browserVersion:"7"} }if(d(/rv:8./)){return{browserFamily:"Firefox",browserVersion:"8"} }if(d(/rv:9./)){return{browserFamily:"Firefox",browserVersion:"9"} }return{browserFamily:"Firefox",browserVersion:"10 or higher"} }var l=d(/adobeair/); if(l){return{browserFamily:"Adobe AIR",browserVersion:""} }return{browserFamily:"Unresolved",browserVersion:"Unresolved"} }; var e=function(){if(d(/windows 98|win98/)){return"Windows 98" }if(d(/windows nt 5.0|windows 2000/)){return"Windows 2000" }if(d(/windows nt 5.1|windows xp/)){return"Windows XP" }if(d(/windows nt 5.2/)){return"Windows Server 2003" }if(d(/windows nt 6.0/)){return"Windows Vista" }if(d(/windows nt 6.1/)){return"Windows 7" }if(d(/windows nt 6.2/)){return"Windows 8" }if(d(/windows nt 6.3/)){return"Windows 8.1" }if(d(/windows nt 10.0/)){return"Windows 10" }if(d(/windows nt 4.0|winnt4.0|winnt/)){return"Windows NT 4.0" }if(d(/windows me/)){return"Windows ME" }if(d(/mac os x/)){if(d(/ipad/)||d(/iphone/)){return"iOS" }return"Mac OS X" }if(d(/macintosh|mac os/)){return"Mac OS" }if(d(/android/)){return"Android" }if(d(/linux/)){return"Linux" }return"Unresolved" }; var c=function(){if(d(/ipad/)){return"iPad" }if(d(/iphone/)){return"iPhone" }if(d(/mobi/)){return"Mobile" }return"Desktop" }; var a=f.call(); this.browserFamily=a.browserFamily; this.browserVersion=a.browserVersion; this.OSName=e.call(); this.deviceType=c.call(); this.ua=g; var h=/^https/i.test(window.location.protocol); this.screenResolution=screen.width+"x"+screen.height }; CQ_Analytics.BrowserInfo.prototype={getBrowserName:function(){return this.browserFamily+" "+this.browserVersion },getBrowserFamily:function(){return this.browserFamily },getBrowserVersion:function(){return this.browserVersion },getOSName:function(){return this.OSName },getScreenResolution:function(){return this.screenResolution },getDeviceType:function(){return this.deviceType },getUserAgent:function(){return this.ua },isMobile:function(a){if(!a){a=this.getDeviceType() }a=a?a.toLowerCase():"desktop"; return a!="desktop" },isIE:function(a){return this.getBrowserFamily()=="IE"&&(a?this.getBrowserVersion()==a:true) },isIE6:function(){return this.isIE("6") },isIE7:function(){return this.isIE("7") },isIE8:function(){return this.isIE("8") },isIE9:function(){return this.isIE("9") }}; CQ_Analytics.BrowserInfoInstance=new CQ_Analytics.BrowserInfo(); if(!CQ_Analytics.MousePositionMgr){CQ_Analytics.MousePositionMgr=function(){this.position={x:0,y:0}; this.getPageX=function(c){var b=c.pageX; if(!b&&0!==b){b=c.clientX||0 }return b }; this.getPageY=function(b){var c=b.pageY; if(!c&&0!==c){c=b.clientY||0 }return c }; var a=this; this.timer=null; $CQ(document).bind("mousemove",function(h,g,f,l){var j=h||window.event; if(j){if(!a.timer){var d=a.getPageX(j); var k=a.getPageY(j); a.timer=setTimeout(function(){a.setPosition(d,k); a.timer=null },500) }}}); this.init() }; CQ_Analytics.MousePositionMgr.prototype=new CQ_Analytics.SessionStore(); CQ_Analytics.MousePositionMgr.prototype.STORENAME="mouseposition"; CQ_Analytics.MousePositionMgr.prototype.setPosition=function(a,b){this.position.x=a; this.position.y=b; this.fireEvent("update") }; CQ_Analytics.MousePositionMgr.prototype.getProperty=function(a){return this.position[a] }; CQ_Analytics.MousePositionMgr.prototype.getLabel=function(a){return a }; CQ_Analytics.MousePositionMgr.prototype.getLink=function(a){return"" }; CQ_Analytics.MousePositionMgr.prototype.getPropertyNames=function(){var a=new Array(); for(var b in this.position){a.push(b) }return a }; CQ_Analytics.MousePositionMgr.prototype.getSessionStore=function(){return this }; CQ_Analytics.MousePositionMgr.prototype.getData=function(a){return this.position }; CQ_Analytics.MousePositionMgr.prototype.clear=function(){this.position={} }; CQ_Analytics.MousePositionMgr=new CQ_Analytics.MousePositionMgr(); CQ_Analytics.CCM.register(CQ_Analytics.MousePositionMgr) }if(!CQ_Analytics.EventDataMgr){CQ_Analytics.EventDataMgr=function(){}; CQ_Analytics.EventDataMgr.prototype=new CQ_Analytics.SessionStore(); CQ_Analytics.EventDataMgr.prototype.STORENAME="eventdata"; CQ_Analytics.EventDataMgr.prototype.init=function(){this.data={}; for(var a in this.initProperty){this.data[a]=this.initProperty[a] }this.initialized=true; this.fireEvent("initialize",this); if(typeof(this.initProperty)!="undefined"){this.fireEvent("update") }}; CQ_Analytics.EventDataMgr.prototype.getLabel=function(a){return a }; CQ_Analytics.EventDataMgr.prototype.getLink=function(a){return"" }; CQ_Analytics.EventDataMgr=new CQ_Analytics.EventDataMgr(); CQ_Analytics.EventDataMgr.init(); CQ_Analytics.CCM.register(CQ_Analytics.EventDataMgr) }if(!window.CQ_Context){window.CQ_Context=function(){}; window.CQ_Context.prototype=new CQ_Analytics.Observable(); window.CQ_Context.prototype.getProfile=function(){return(function(){return{getUserId:function(){return this.getProperty("authorizableId") },getDisplayName:function(){var a=this.getProperty("formattedName"); if(a){return a }a=this.getProperty("displayName"); if(a){return a }return this.getUserId() },getFirstname:function(){return this.getProperty("givenName") },getLastname:function(){return this.getProperty("familyName") },getEmail:function(){return this.getProperty("email") },getProperty:function(a){if(window.CQ_Analytics&&window.CQ_Analytics.ProfileDataMgr){return CQ_Analytics.ProfileDataMgr.getProperty(a) }return"" },getProperties:function(){if(window.CQ_Analytics&&window.CQ_Analytics.ProfileDataMgr){return CQ_Analytics.ProfileDataMgr.getData() }return{} },getAvatar:function(){return this.getProperty("avatar") },onUpdate:function(a,b){if(a&&CQ_Analytics&&CQ_Analytics.ProfileDataMgr){CQ_Analytics.ProfileDataMgr.addListener("update",a,b||this) }}} })() }; window.CQ_Context=new window.CQ_Context() }CQ_Analytics.Engine=function(){window.CQ_trackTeasersStats=true; function l(){return !!(window.CQ&&CQ.WCM&&CQ.WCM.isEditMode()) }function a(){return !!(window.CQ&&CQ.WCM&&CQ.WCM.isPreviewMode()) }function e(p){var n=$CQ.Deferred(); var o=CQ.WCM.getEditable(p); if(o){n.resolve(o) }else{CQ.WCM.onEditableReady(p,function(q){n.resolve(q) }) }return n.promise() }function h(o,n){if(!CQ_Analytics.loadedTeasersStack){CQ_Analytics.loadedTeasersStack=[]; $CQ(window).unload(function(){try{var p=CQ_Analytics.loadedTeasersStack; if(p){delete CQ_Analytics.loadedTeasersStack; var r=n; for(var s=0; s'+z+"
" }for(var q=0; q"+v+"" }else{r+=v }}else{if(o.unknownSegment){u=CQ.I18n.getMessage("Experience: {0} - no match (unknown segment)",[o.teaser.title]) }else{u=CQ.I18n.getMessage("Experience: {0} - no match",[o.teaser.title]) }r+=n(u,w,o.teaser.thumbnail,false) }}r+="
"; if(p){r+=CQ.I18n.getMessage("Strategy {0} selected current teaser.",p) }else{r+=CQ.I18n.getMessage("No strategy configured, used the first match.") }r+="
"; return r }function m(p,o,n,q){p.done(function(r){if(r.teaserToolTip){r.teaserToolTip.hide(); r.teaserToolTip.remove() }r.teaserToolTip=new CQ.Ext.Tip({html:f(o,n,q),title:CQ.I18n.getMessage("Selection decision"),width:450,autoHide:false,closable:true,height:300,floating:true,autoHeight:false,bodyStyle:"overflow-y: scroll;"}); r.on(CQ.wcm.EditRollover.EVENT_SHOW_HIGHTLIGHT,function(s){if(!this.teaserInfoButton){this.teaserInfoButton=CQ.Ext.DomHelper.append("CQ",{tag:"div",cls:"x-tool x-tool-help cq-teaser-tooltip-tool"},true); this.teaserInfoButton.position("absolute"); this.teaserInfoButton.on("click",function(){var t=this.getXY(); r.teaserToolTip.setPosition(t[0]-460,t[1]-100); r.teaserToolTip.show() }) }this.teaserInfoButton.anchorTo(s.frameBottom.getEl(),"tr",[-26,-15]); this.teaserInfoButton.show() }); r.on(CQ.wcm.EditRollover.EVENT_HIDE_HIGHTLIGHT,function(s){if(this.teaserInfoButton){this.teaserInfoButton.hide() }}) }) }function k(n){n.done(function(o){if(o.teaserToolTip){o.teaserToolTip.hide(); o.teaserToolTip.remove(); o.teaserToolTip=null }}) }function c(w,v){var r=[]; var t=0; for(var p=0; p0){if(!CQ_Analytics.SegmentMgr.segments[s[0]]){q=false; if(n){n.unknownSegment=true }}}}if(q){var u=CQ_Analytics.SegmentMgr.getMaxBoost(s); if(n){n.boost=u }if(u===t){r.push(o) }else{if(u>t){r=[]; r.push(o); t=u }}}}return r }var b={}; function g(n,o){CQ_Analytics.Engine.stopTeaserLoader(n); b[n]=o }function d(p,o){if(!p||!o){return false }if(p.length!==o.length){return false }p.sort(); o.sort(); for(var n=0; nExperience: {0} - match ( boost = {1} )
',v) }else{s+=CQ.I18n.getMessage('Experience: {0} - match ( boost = {1} )
',v) }if(o==u){w.push(b[r]) }else{if(o>u){w=new Array(); w.push(b[r]); u=o }}}else{var v=[b[r]["title"],b[r].thumbnail,t]; s+=CQ.I18n.getMessage('Experience: {0} - no match
',v) }}}s+=CQ.I18n.getMessage("
Strategy {0} selected current teaser.
",f); return s }; var k=null; var h=null; var j=function(){var v=new Array(); if(CQ_Analytics.SegmentMgr){var t=0; for(var r=0; rt){v=new Array(); v.push(b[r]); t=o }}}}}if(v.length>0){var u=v[0]; if(CQ_Analytics.StrategyMgr){var s=CQ_Analytics.StrategyMgr.choose(f,v); if(s!=null){u=s }}if(!k||k.path!=u.path){k=u; var p=u.path+n; p=CQ.shared.HTTP.addSelectors(p,CQ.shared.HTTP.getSelectors(window.location.href)); CQ_Analytics.Utils.loadTeaserElement(p,g); if(window.CQ_trackTeasersStats&&a){if(!CQ_Analytics.loadedTeasersStack){CQ_Analytics.loadedTeasersStack=[]; $CQ(window).unload(function(){try{var w=CQ_Analytics.loadedTeasersStack; if(w){delete CQ_Analytics.loadedTeasersStack; var y=a; for(var z=0; zs){l=new Array(); l.push(f[p]); s=v }}}}}if(l.length>0){var o=l[0]; if(window.CQ_Analytics&&window.CQ_Analytics.StrategyMgr){var t=CQ_Analytics.StrategyMgr.choose(d,l); if(t!=null){o=t }}if(!j||j.path!=o.path){var x=j; j=o; var n=CQ.shared.HTTP.get(o.path+g); var y=n.responseText; var q=function(K,A){var H=""; if(K&&K.indexOf('id="'+A+'"')!=-1){var G=K.indexOf('id="'+A+'"'); var B=K.substring(0,G).lastIndexOf("")+1,F.lastIndexOf("0){return this.data[this.data.length-1] }else{return null }}; CQ_Analytics.ViewedProducts.prototype.mostRecentNotInCart=function(){if(!this.data){this.init() }if(!CQ_Analytics.CartMgr){return this.mostRecent() }for(var a=this.data.length-1; a>=0; a--){var b=this.data[a]; if(!CQ_Analytics.CartHelper.containsProduct(CQ_Analytics.CartMgr.getData(),b.path,1)){return b }}return null }; CQ_Analytics.ViewedProducts.prototype.recent=function(e,b){var a=[]; if(!this.data){this.init() }if(!CQ_Analytics.CartMgr){b=false }for(var c=this.data.length-1; c>=0&&e>0; c--){var d=this.data[c]; if(b&&CQ_Analytics.CartHelper.containsProduct(CQ_Analytics.CartMgr.getData(),d.path,1)){continue }a.push(d); e-- }return a }; CQ_Analytics.ViewedProducts.prototype.getData=function(a){if(!this.data){this.init() }return this.data }; CQ_Analytics.ViewedProducts.prototype.init=function(){var b=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); var d=b.get(this.getStoreKey()); d=d===null?"":new String(d); var e=d.split(";"); this.data=[]; for(var c=0; c=4){this.data.push({path:a[0],title:a[1],image:a[2],price:a[3]}) }else{if(a.length>=3){this.data.push({path:a[0],title:a[1],image:a[2],price:undefined}) }}}this.initialized=true; this.fireEvent("initialize",this); this.fireEvent("update") }; CQ_Analytics.ViewedProducts.prototype.persist=function(){if(this.fireEvent("beforepersist")!==false){var b=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); var e=[]; for(var c=0; cd){return 1 }if(e=(this.frequencies.length-1))||(this.frequencies[a]>=b)){return Math.ceil((a+1)/this.frequencies.length*c) }a++ }}; CQ_Analytics.TagCloudMgr.prototype.getTags=function(){return this.data }; CQ_Analytics.TagCloudMgr.prototype.getData=function(a){return this.getTags() }; CQ_Analytics.TagCloudMgr.prototype.getTag=function(a){return this.data[a]>0?this.data[a]:0 }; CQ_Analytics.TagCloudMgr.prototype.init=function(a){var b=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); var d=b.get(this.getStoreKey()); d=d===null?"":new String(d); this.data=this.parseTagList(d); if(a){for(var c in a){if(a.hasOwnProperty(c)){this.add(a[c]) }}}this.initialTags=this.copyObject(this.data); this.initialAddedTags=this.copyObject(this.addedTags); this.persist(); this.initialized=true; this.fireEvent("initialize",this); this.fireEvent("update") }; CQ_Analytics.TagCloudMgr.prototype.setProperty=function(a,b){if(this.data==null){this.init() }if(b>0){this.addedTags[a]=true; this.data[a]=b>0?b:0 }else{delete this.addedTags[a]; delete this.data[a] }this.persist(); this.fireEvent("update") }; CQ_Analytics.TagCloudMgr.prototype.reset=function(){this.clear(); this.fireEvent("update") }; CQ_Analytics.TagCloudMgr.prototype.getProperty=function(a){if(this.data==null){this.init() }return this.data[a]>0?this.data[a]:0 }; CQ_Analytics.TagCloudMgr.prototype.removeProperty=function(a){if(this.data==null){this.init() }this.setProperty(a,0) }; CQ_Analytics.TagCloudMgr.prototype.clear=function(){var a=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); a.remove(this.getStoreKey()); this.addedTags={}; this.data={} }; CQ_Analytics.TagCloudMgr.prototype.getLink=function(a){return"" }; CQ_Analytics.TagCloudMgr.prototype.getLabel=function(b){if(b){var c=b.split(":"); var a=c[c.length-1].split("/"); b=a[a.length-1] }return b }; CQ_Analytics.TagCloudMgr=new CQ_Analytics.TagCloudMgr(); CQ_Analytics.CCM.register(CQ_Analytics.TagCloudMgr) }if(!CQ_Analytics.SurferInfoMgr){CQ_Analytics.SurferInfoMgr=function(){}; CQ_Analytics.SurferInfoMgr.prototype=new CQ_Analytics.SessionStore(); CQ_Analytics.SurferInfoMgr.prototype.STOREKEY="SURFERINFO"; CQ_Analytics.SurferInfoMgr.prototype.STORENAME="surferinfo"; CQ_Analytics.SurferInfoMgr.prototype.init=function(){this.data={}; for(var a in this.initProperty){this.data[a]=this.initProperty[a] }this.initialized=true; this.fireEvent("initialize",this); this.fireEvent("update") }; CQ_Analytics.SurferInfoMgr.prototype.clear=function(){this.data=null; this.initProperty={} }; CQ_Analytics.SurferInfoMgr.prototype.getLabel=function(a){return a }; CQ_Analytics.SurferInfoMgr.prototype.getLink=function(a){return"" }; CQ_Analytics.SurferInfoMgr=new CQ_Analytics.SurferInfoMgr(); CQ_Analytics.CCM.addListener("configloaded",function(){var b=CQ_Analytics.BrowserInfoInstance; this.addInitProperty("browserFamily",b.getBrowserFamily()); this.addInitProperty("browserVersion",b.getBrowserVersion()); this.addInitProperty("browser","${/surferinfo/browserFamily} ${/surferinfo/browserVersion}"); this.addInitProperty("OS",b.getOSName()); this.addInitProperty("resolution",b.getScreenResolution()); this.addInitProperty("device",b.getDeviceType()); this.addInitProperty("isMobile",b.isMobile()); this.addInitProperty("userAgent",b.getUserAgent()); var a=new Date(); this.addInitProperty("day",a.getDate()); this.addInitProperty("month",a.getMonth()+1); this.addInitProperty("year",a.getFullYear()); this.addInitProperty("hours",a.getHours()); this.addInitProperty("minutes",a.getMinutes()); var c="${/surferinfo/browserFamily}"; if(b.isMobile()){c="${/surferinfo/device}" }this.addInitProperty("image",c); var d=CQ_Analytics.ClientContextMgr.getClientContextURL("/contextstores/surferinfo/resources/${/surferinfo/image}.png"); this.addInitProperty("thumbnail",d); if(window.CQ_Analytics&&window.CQ_Analytics.MousePositionMgr){CQ_Analytics.MousePositionMgr.addListener("update",function(){this.setProperty("mouse X",CQ_Analytics.MousePositionMgr.getProperty("x")); this.setProperty("mouse Y",CQ_Analytics.MousePositionMgr.getProperty("y")) },this) }this.addListener("update",function(){var f=this.getProperty("device"); var g="${/surferinfo/browserFamily}"; if(b.isMobile(f)){g="${/surferinfo/device}" }var e=this.getProperty("image"); if(e!=g){this.setProperty("image",g) }},this); this.init(); CQ_Analytics.CCM.register(this) },CQ_Analytics.SurferInfoMgr) }if(!CQ_Analytics.SocialGraphMgr){CQ_Analytics.SocialGraphMgr=CQ_Analytics.JSONPStore.registerNewInstance("socialgraph"); CQ_Analytics.CCM.addListener("configloaded",function(){CQ_Analytics.ProfileDataMgr.addListener("update",function(){var a=CQ_Analytics.ProfileDataMgr.getProperty("authorizableId"); if(a!=this.lastUid){this.fireEvent("update") }},CQ_Analytics.SocialGraphMgr) },CQ_Analytics.SocialGraphMgr) }if(window.CQ_Analytics&&window.CQ_Analytics.SegmentMgr&&!window.CQ_Analytics.SegmentMgr.isResolvedRegistered){CQ_Analytics.SegmentMgr.isResolvedRegistered=true; CQ_Analytics.CCM.addListener("configloaded",function(){CQ_Analytics.StoreRegistry.register(CQ_Analytics.SegmentMgr); CQ_Analytics.CCM.fireEvent("storeregister",CQ_Analytics.SegmentMgr) },CQ_Analytics.SegmentMgr) }if(!CQ_Analytics.RelatedProducts){CQ_Analytics.RelatedProducts=function(){this.data=null }; CQ_Analytics.RelatedProducts.prototype=new CQ_Analytics.SessionStore(); CQ_Analytics.RelatedProducts.prototype.STOREKEY="RELATEDPRODUCTS"; CQ_Analytics.RelatedProducts.prototype.STORENAME="relatedproducts"; CQ_Analytics.RelatedProducts.prototype.products=function(d,e){var a=[]; if(!this.data){this.init() }for(var b=0; b0; b++){var c=this.data[b]; if(c.relationshipType===e){a.push(c); d-- }}return a }; CQ_Analytics.RelatedProducts.prototype.getData=function(a){if(!this.data){this.init() }return this.data }; CQ_Analytics.RelatedProducts.prototype.init=function(){if(!this.data){this.data={} }else{this.fireEvent("initialize",this); this.fireEvent("update") }}; CQ_Analytics.RelatedProducts=new CQ_Analytics.RelatedProducts(); CQ_Analytics.CCM.register(CQ_Analytics.RelatedProducts) }if(!CQ_Analytics.ProfileDataMgr){CQ_Analytics.ProfileDataMgr=function(){this.addListener("beforepersist",function(){this.checkAuthorizableId() },this) }; CQ_Analytics.ProfileDataMgr.prototype=new CQ_Analytics.PersistedSessionStore(); CQ_Analytics.ProfileDataMgr.prototype.STOREKEY="PROFILEDATA"; CQ_Analytics.ProfileDataMgr.prototype.STORENAME="profile"; CQ_Analytics.ProfileDataMgr.prototype.LOADER_PATH=CQ_Analytics.Utils.externalize("/libs/cq/personalization/components/profileloader/content/load.js",true); CQ_Analytics.ProfileDataMgr.prototype.PROFILE_LOADER=CQ_Analytics.Utils.externalize("/libs/cq/personalization/components/profileloader/content/load.json",true); CQ_Analytics.ProfileDataMgr.prototype.init=function(){this.persistence=new CQ_Analytics.SessionPersistence({container:"ClientContext"}); var a=this.persistence.get(this.getStoreKey()); if(!a||a==""){this.data={}; for(var b in this.initProperty){this.data[b]=this.initProperty[b] }}else{this.data=this.parse(a) }this.persist(); this.initialized=true; this.fireEvent("initialize",this); this.fireEvent("update") }; CQ_Analytics.ProfileDataMgr.prototype.checkAuthorizableId=function(){if(!this.data){this.init() }if(this.data.authorizableId){CQ_Analytics.CCM.setVisitorId(this.data.authorizableId) }else{CQ_Analytics.CCM.setVisitorId("") }}; CQ_Analytics.ProfileDataMgr.prototype.getLabel=function(a){return a }; CQ_Analytics.ProfileDataMgr.prototype.getLink=function(a){return"" }; CQ_Analytics.ProfileDataMgr.prototype.clear=function(){if(this.persistence){this.persistence.remove(this.getStoreKey()) }this.data=null; this.initProperty={} }; CQ_Analytics.ProfileDataMgr.prototype.getLoaderURL=function(){return CQ_Analytics.ClientContextMgr.getClientContextURL("/contextstores/profiledata/loader.json") }; CQ_Analytics.ProfileDataMgr.prototype.loadProfile=function(authorizableId){var url=this.getLoaderURL(); url=CQ_Analytics.Utils.addParameter(url,"authorizableId",authorizableId); try{var object=CQ.shared.HTTP.eval(url); if(object){this.data={}; for(var p in object){this.data[p]=object[p] }this.persist(); this.fireEvent("initialize",this); this.fireEvent("update"); if(CQ_Analytics.ClickstreamcloudEditor){CQ_Analytics.ClickstreamcloudEditor.reload() }return true }}catch(error){if(console&&console.log){console.log("Error during profile loading",error) }}return false }; CQ_Analytics.ProfileDataMgr=new CQ_Analytics.ProfileDataMgr(); CQ_Analytics.CCM.addListener("configloaded",function(){this.checkAuthorizableId(); this.addListener("update",function(a,j){if(j=="birthday"||!j){var k=this.getProperty("birthday"); var l=this.getProperty("age"); var g=""; if(k){try{var c=function(o,n){var m=new Date(n.getTime()); m.setUTCHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()); var p=m.getTime()-o.getTime(); return p/(1000*60*60*24) }; var d=function(m){var n=new Date(m.getFullYear(),0,0); return c(m,n)*-1 }; var h=new Date(Date.parse(k)); if(!isNaN(h.getTime())){var f=new Date(); if(d(h)==d(f)&&h.getMonth()==f.getMonth()){g=CQ.shared.HTTP.externalize(CQ_Analytics.ClientContextMgr.getClientContextURL("/contextstores/profiledata/resources/birthday_cake.png")) }else{var b=f.getFullYear()-h.getFullYear(); if(d(h)>d(f)){g=b }else{g=Math.max(0,b-1) }}}else{g="" }}catch(e){g="" }}if(l!=g){this.setProperty("age",g) }}}); CQ_Analytics.CCM.register(this) },CQ_Analytics.ProfileDataMgr) }if(!CQ_Analytics.OrderHistoryMgr){CQ_Analytics.OrderHistoryMgr=new CQ_Analytics.SessionStore(); CQ_Analytics.OrderHistoryMgr.STOREKEY="ORDERHISTORY"; CQ_Analytics.OrderHistoryMgr.STORENAME="orderhistory"; CQ_Analytics.OrderHistoryMgr.init=function(){if(!this.data){this.data={} }else{this.fireEvent("initialize",this); this.fireEvent("update") }}; CQ_Analytics.CCM.addListener("configloaded",function(){CQ_Analytics.CCM.register(this) },CQ_Analytics.OrderHistoryMgr) }if(!CQ_Analytics.GeolocationUtils){CQ_Analytics.GeolocationUtils=new function(){var a; var d; var c=[]; var b=function(){d=true; for(var e=0; e0){c+="," }c+=this.simulatedPromotions[b].path+"="+this.simulatedPromotions[b].title }}a.set(this.STOREKEY,c); this.fireEvent("persist") }}; CQ_Analytics.CartMgr.updateSimulatedPrice=function(){if(this.simulatedTotalPrice&&this.referenceTotalPrice==this.data.totalPriceFloat){this.data.totalPriceFloat=this.simulatedTotalPrice; this.data.totalPrice=this.data.totalPrice.replace(/[0-9]+\.[0-9]+/,parseFloat(this.simulatedTotalPrice).toFixed(2)) }else{this.simulatedTotalPrice=null; this.persist() }}; CQ_Analytics.CartMgr.registerSimulatedPrice=function(a){if(this.simulatedTotalPrice){this.simulatedTotalPrice=a; this.data.totalPrice=this.data.totalPrice.replace(/[0-9]+\.[0-9]+/,parseFloat(this.simulatedTotalPrice).toFixed(2)) }else{this.referenceTotalPrice=this.data.totalPriceFloat; this.simulatedTotalPrice=a }this.persist() }; CQ_Analytics.CartMgr.addSimulatedPromotion=function(c,d){this.simulatedPromotions=this.simulatedPromotions||[]; var b=false; for(var a=0; a=0){this.simulatedPromotions.splice(b,1); if(this.resolvePromotions()){this.update() }}}; CQ_Analytics.CartMgr.getSimulatedPromotions=function(){return this.simulatedPromotions }; CQ_Analytics.CartMgr.getProperty=function(a,k){if(!this.data){this.init() }var f=this.data; try{var d=a.split("."); for(var g=0; g0){h=parseInt(b.substring(c+1,b.length-1)); b=b.substring(0,c) }f=f[b]; if(h>=0){f=f[h] }}var m=d[d.length-1]; if(!k){var l=CQ.shared.XSS.getXSSPropertyName(m); if(f[l]){return f[l] }}return f[m] }catch(j){return undefined }}; CQ_Analytics.CartMgr.validate=function(a,c){if(a=="totalPriceFloat"){var b=parseFloat(c); return b>=0 }else{if(a.indexOf(".quantity")>0){var d=parseInt(c); return d>=0 }}return true }; CQ_Analytics.CartMgr.setProperty=function(a,h){if(!this.data){this.init() }if(!this.validate(a,h)){this.fireEvent("change",a); return }if(a=="totalPriceFloat"){this.registerSimulatedPrice(h) }var e=this.data; var d=a.split("."); for(var f=0; f0){g=parseInt(b.substring(c+1,b.length-1)); b=b.substring(0,c) }if(!e[b]){e[b]={} }e=e[b]; if(g>=0){if(!e[g]){e[g]={} }e=e[g] }}var k=d[d.length-1]; e[k]=h; var j=CQ.shared.XSS.getXSSPropertyName(k); this.data[j]=CQ.shared.XSS.getXSSValue(h); this.fireEvent("change",a) }; CQ_Analytics.CartMgr.addProductToCart=function(a,b,e,d,c){this.data.entries=this.data.entries||[]; this.data.entries.push({title:CQ.shared.XSS.getXSSValue(e),quantity:1,path:CQ.shared.XSS.getXSSValue(a),pagePath:CQ.shared.XSS.getXSSValue(b),thumbnail:CQ.shared.XSS.getXSSValue(d),priceFormatted:CQ.shared.XSS.getXSSValue(c)}); this.fireEvent("change","entries") }; CQ_Analytics.CartMgr.addVoucher=function(b){this.data.vouchers=this.data.vouchers||[]; var c=false; for(var a=0; a=0){this.data.vouchers.splice(b,1); this.fireEvent("change","vouchers") }}; CQ_Analytics.CartMgr.addListener("change",function(b,c){var a=this; if(c&&c!="totalPrice"){this.resolvePromotions(); if(window.CQ_Analytics&&window.CQ_Analytics.CartMgr&&window.CQ_Analytics.CartMgr.refreshTimeout){clearTimeout(CQ_Analytics.CartMgr.refreshTimeout) }CQ_Analytics.CartMgr.refreshTimeout=setTimeout(function(){a.update() },50) }}); CQ_Analytics.CartMgr.update=function(){var a=this; if(window.ContextHub&&ContextHub.getStore("cart")){return }if(this.updateUrl){$CQ.ajax({url:this.updateUrl,type:"POST",data:{cart:JSON.stringify(a.data)},externalize:false,encodePath:false,hook:true,success:function(b){a.data=b; a.updateSimulatedPrice(); CQ_Analytics.ClientContextUtils.renderStore(CQ_Analytics.CartMgr.divId,CQ_Analytics.CartMgr.STORENAME); a.fireEvent("updatecomplete"); a.fireEvent("update") }}) }}; CQ_Analytics.CartMgr.clear=function(){if(this.data.entries){this.data.entries=[] }if(this.data.vouchers){this.data.vouchers=[] }this.data.totalPrice="0"; this.referenceTotalPrice=null; this.simulatedTotalPrice=null; this.simulatedPromotions=null }; CQ_Analytics.CartMgr.reset=function(){this.clear(); this.fireEvent("update"); this.persist(); this.update() }; CQ_Analytics.CartMgr.resolvePromotions=function(){if(!this.promotionsMap){return false }if(!this.data.promotions){this.data.promotions=[] }if(!CQ_Analytics.SegmentMgr.areSegmentsLoaded){return false }var f=CQ_Analytics.SegmentMgr.getResolved(); var e=[]; var d,b,l,m; for(d=0; d=0){m=true; break }}if(m){e.push(a.path) }}var g=this.simulatedPromotions||[]; for(d=0; d=0){l=true; break }}if(l){e.push(a.path) }}var c=false; for(d=0; d=f)){return true }}return false },containsPromotion:function(d,f,a,b){if(!f){return false }if(!a){return false }if(!b){return false }function e(h){if(h){var g=h.lastIndexOf("#"); if(g>-1){h=h.substring(0,g) }}return h }function c(n,o,h){var l=e(o); var j=n.promotions; for(var k=0; j&&k