
try{(function(){
i$.addOnLoad(function(){
var _1=document.querySelector(".stComplementaryContent");
if(i$.hasClass(_1.ownerDocument.body,"edit-mode")){
var _2=document.querySelectorAll(".stControl");
for(var i=0;i<_2.length;i++){
(function(_3){
if(_3.offsetParent!==null){
i$.bindDomEvt(_3,"onmouseenter",function(){
i$.addClass(_3,"stHover");
});
i$.bindDomEvt(_3,"onmouseleave",function(_4){
var _5=_4.toElement||_4.relatedTarget;
if(!_1.contains(_5)&&!_3.contains(_5)){
i$.removeClass(_3,"stHover");
}
});
var _6=_3.querySelectorAll(".stFocusableLink");
for(var j=0;j<_6.length;j++){
(function(_7){
i$.bindDomEvt(_7,"onfocus",function(){
if(i$.hasClass(_3,"stFocus")){
if(i$.hasClass(_3,"stHeaderVisible")){
i$.removeClass(_3,"stFocus");
}else{
i$.addClass(_3,"stHeaderVisible");
}
}else{
if(i$.hasClass(_3,"stHeaderVisible")){
i$.removeClass(_3,"stHeaderVisible");
}else{
i$.addClass(_3,"stFocus");
}
}
});
})(_6[j]);
}
}
})(_2[i]);
}
}
});
})();


}catch(e){console.log("Module 'st_skin': ",e);}
try{/*
 * On a page using the Simple Theme (or a theme derived from it), a portlet's header should only be visible in "Edit"
 * mode when hovering over the portlet, or tabbing to the portlet. A portlet's header should never be visible in "View"
 * mode.
 * 
 * This behavior is accomplished by adding event handlers to various DOM elements within the portlet. These event
 * handlers respond to a specified event ("mouseenter", "mouseleave", "focus", or "blur") by adding or removing a class
 * attribute from the top-level DOM element for the portlet ("stControl"). The display behavior for these class
 * attributes ("stHover" and "stFocus") is defined by the theme using CSS rules, which are in the file "skinLayout.css".
 */
(function() {
    // Add the skin event handlers after the DOM has been loaded.
    i$.addOnLoad(function () {
        // Only add hover and focus support to show/hide the skin header when the page is in edit mode.
        var complementaryContent = document.querySelector(".stComplementaryContent");
        if (i$.hasClass(complementaryContent.ownerDocument.body, 'edit-mode')) {
            // Find all of the top-level portlet elements (class attribute of "stControl") in the document.
            var portletElements = document.querySelectorAll(".stControl");

            // Add the event handlers to each of the top-level portlet elements.
            for (var i = 0; i < portletElements.length; i++) {
                (function(portletElement) {
                    // Only add event handlers if the portlet is visible (has a value for the "offsetParent" attribute.)
                    if (portletElement.offsetParent !== null) {
                        // Add an event handler to the portlet element for the "mouseenter" event.
                        i$.bindDomEvt(portletElement, "onmouseenter",
                            function() {
                                // Respond to a "mouseenter" event by adding the "stHover" class to the portlet element.
                                i$.addClass(portletElement, "stHover");
                            }
                        );
                        // Add an event handler to the portlet element for the "mouseleave" event.
                        i$.bindDomEvt(portletElement, "onmouseleave",
                            function(evt) {
                                // Respond to a "mouseleave" event by removing the "stHover" class from the portlet element.
                                var node = evt.toElement || evt.relatedTarget;
                                if (!complementaryContent.contains(node) && !portletElement.contains(node)) {
                                    i$.removeClass(portletElement, "stHover");
                                }
                            }
                        );
                        // Find all of the focusable link elements within the portlet.
                        var focusableLinkElements = portletElement.querySelectorAll(".stFocusableLink");

                        // Add the event handlers to each of the focusable link elements.
                        for (var j = 0; j < focusableLinkElements.length; j++) {
                            (function(focusableLinkElement) {
                                // Add an event handler to the focusable link element for the "focus" event.
                                i$.bindDomEvt(focusableLinkElement, "onfocus",
                                    function() {
                                        if (i$.hasClass(portletElement, "stFocus")) {
                                            if (i$.hasClass(portletElement, "stHeaderVisible")) {
                                                // the skin header is already displaying so remove it
                                                i$.removeClass(portletElement, "stFocus");
                                            }
                                            else {
                                                i$.addClass(portletElement, "stHeaderVisible");
                                            }    
                                        }
                                        else {
                                            if (i$.hasClass(portletElement, "stHeaderVisible")) {
                                                // second execution - don't refocus
                                                i$.removeClass(portletElement, "stHeaderVisible");
                                            }
                                            else {
                                                // Respond to a "focus" event by adding the "stFocus" class to the portlet element.
                                                i$.addClass(portletElement, "stFocus");
                                            }
                                        }
                                        
                                    }
                                );
                             })(focusableLinkElements[j]);
                        }
                        
                    }
                })(portletElements[i]);
            };
        }
    });
})();

}catch(e){console.log("Module 'st_skin': ",e);}
try{/* (C) Copyright IBM Corp. 2007  All Rights Reserved.                */
/**
 * This is the JS file for the common semantic tagging service
 */















 



 
var STSPG = {
	lang: "en",
	bidi: "ltr",
	service: "",
    contextUrl: "/wps/semanticTag",
	wpsBaseURL: "/wps",
	externalServiceEntries:'',
	isDynamicLoading : false,
	isC2AHandlerRequired : true,
	isPersonCardHandlerRequired : true,
	isActionHandlerRequired : true,
	isParsingRequired : true,
	newSametimeCommunityServer:true
};

STSPG.service={"entries":[{"id":"com.ibm.portal.action","test":"(globalTestNode.className.match(STSP.actionRE))","js":"","classnames":[".com\\.ibm\\.portal\\.action"]},{"id":"hcard","test":"(globalTestNode.className.match(STSP.hcardRE))","js":"/javascript/semanticTagPerson.js","classnames":[".vcard"]},{"id":"sametime","test":"id:hcard","js":"/javascript/semanticTagAwareness.js","classnames":[]},{"id":"c2a","test":"(globalTestNode.className.match(/(^|\\s)c2a:(source|target)(\\s|$)/)) ","js":"/javascript/semanticTagC2A.js","classnames":[".c2a\\:source",".c2a\\:target"]}]};
var externalEntries;
try{
if(STSPG.externalServiceEntries!=null&&STSPG.externalServiceEntries.length>0){
externalEntries=eval(" ("+STSPG.externalServiceEntries+")");
STSPG.service.entries=STSPG.service.entries.concat(externalEntries);
}else{
}
}
catch(e){
}


var STSP={version:"1.0",lang:STSPG.lang,bidi:STSPG.bidi,tagScope:["*"],service:STSPG.service,scripts:new Array(),actionRegistry:null,refcntAttr:"semtag_refcnt",hoverIdPrefix:"semtag_hover_",hoverIdx:0,liveElemPrefix:"semtag_live_",reMap:new Array(),actionRE:new RegExp("(^|\\s)com.ibm.portal.action(\\s|$)"),hcardRE:new RegExp("(^|\\s)vcard(\\s|$)"),specialMenuProviders:new Array(),parseElem:null,isEnablerObjectAvailable:(typeof com!=="undefined")&&(typeof com.ibm!=="undefined")&&(typeof com.ibm.mashups!=="undefined"),svcEntryPersonCard:null,isSizzleAvailable:((typeof i$!=="undefined")&&(typeof i$.query==="function")),DELAY:10,isMobile:navigator.userAgent.match(/(Android|BlackBerry|iPad|iPhone|iPod|IEMobile|Opera Mini)/ig)?true:false,init:function(_1){
var _2=STSP.DELAY;
if(STSPG.isParsingRequired===false){
STSP.svcEntryPersonCard=STSP.service.entries[1];
if(!STSP.svcEntryPersonCard.nodes){
STSP.svcEntryPersonCard.nodes=[];
}
}
var _3=STSP.isEnablerObjectAvailable;
STSP.isSizzleAvailable=((typeof i$!=="undefined")&&(typeof i$.query==="function"));
if(_3===false){
STSP.parseElem=STSP.getElementFromEvent(_1);
window.setTimeout(STSP.parseDom,STSP.DELAY);
}else{
var _4=STSP.service.entries;
var _5=_4?_4.length:0;
if(STSPG.isDynamicLoading){
for(var k=0;k<_4.length;k++){
var _6=_4[k];
if(_6.id==="hcard"){
STSP.loadScript("/javascript/attributes.js");
STSP.loadScript("/javascript/semanticTagMenu.js");
}
STSP.loadScript(_6.js);
}
}
}
if(STSPG.isActionHandlerRequired){
STSP.setCallback("com.ibm.portal.action",STSP.processActions);
}
if(!STSPG.isDynamicLoading&&STSPG.isPersonCardHandlerRequired&&(typeof SemTagMenu==="object")){
window.setTimeout(SemTagMenu.init,_2);
}
},loadConnScript:function(){
var _7=document.createElement("script");
var _8=STSP.connUrl;
var _9=_8;
_9=_8+"/profiles/portalJS/portalBizCard.js";
_9+=(_9.indexOf("?")==-1)?"?":"&";
_9+="lang="+STSP.lang;
_7.src=_9;
try{
document.body.insertBefore(_7,document.body.firstChild);
}
catch(e){
alert("Svc.loadConnScript caught: "+e);
}
},watchEvent:function(_a,_b,_c,_d){
try{
if(_a.addEventListener){
_a.addEventListener(_b,_c,_d);
}else{
if(_a.attachEvent){
_a.attachEvent("on"+_b,_c);
}
}
}
catch(e){
}
},clearEventWatch:function(_e,_f,_10,_11){
try{
if(_e.removeEventListener){
_e.removeEventListener(_f,_10,_11);
}else{
if(_e.detachEvent){
_e.detachEvent("on"+_f,_10);
}
}
}
catch(e){
}
},parseDomUsingMashupHandler:function(_12,_13){
if(STSP.isSizzleAvailable===true){
}
if(STSPG.isParsingRequired===false){
return false;
}
var _14=STSP.getService(_13);
if(_13==="com.ibm.portal.action"){
STSP.setCallback(_13,STSP.processActions);
}
if(!_14.nodes){
_14.nodes=[];
}
for(var len=0;len<_12.length;len++){
_14.nodes.push(_12[len]);
}
if(_14.callback){
_14.callback.call(this);
}
STSP.loadScript(_14.js);
try{
var _15=STSP.service.entries;
for(var k=0;k<_15.length;k++){
var _16=_15[k];
var _17=false;
if(_16.id===_14.id){
continue;
}
if(_16.test&&_16.test.match(/^id:/)){
var _18=_16.test.substr(3);
if(_18!=_14.id){
continue;
}
var _12=STSP.getNodes(_18);
if(_12&&0<_12.length){
_17=true;
}
}
if(_17&&STSPG.isDynamicLoading){
STSP.loadScript(_16.js);
}
if(_16.callback){
_16.callback.call(this);
}
}
}
catch(e){
}
},parseDom:function(_19,_1a){
if(STSPG.isParsingRequired===false){
return false;
}
if(!_1a&&_19){
_1a=STSP.getElementFromEvent(_19);
}
if(!_1a&&STSP.parseElem){
_1a=STSP.parseElem;
}else{
if(!_1a){
_1a=document;
}else{
if(typeof _1a=="string"){
_1a=document.getElementById(_1a);
}
}
}
var _1b=STSP.service.entries;
for(var j=0;j<_1b.length;j++){
var _1c=_1b[j];
if(!_1c.nodes){
_1c.nodes=[];
}else{
if(_1a==document){
while(0<_1c.nodes.length){
_1c.nodes.pop();
}
}
}
}
var _1d=new Date().getTime();
if(STSP.isSizzleAvailable===false){
STSP.traverseNodes(_1a);
var _1e=new Date().getTime();
}else{
_1d=new Date().getTime();
for(var k=0;k<_1b.length;k++){
var _1c=_1b[k];
if(_1c.classnames==null||_1c.classnames==="undefined"||_1c.classnames.length<1){
continue;
}
var _1f=typeof _1c.classnames;
if(typeof _1c.classnames==="string"){
continue;
}
var _20=_1c.classnames.join(",");
var _21;
_21=i$.query(_1c.classnames.join(","),_1a,_1c.nodes);
if(_1c.nodes.length!=_21.length){
}
}
_1e=new Date().getTime();
var _22=_1e-_1d;
}
for(var k=0;k<_1b.length;k++){
var _1c=_1b[k];
var _23=false;
if(0<_1c.nodes.length){
_23=true;
}else{
if(_1c.test&&_1c.test.match(/^id:/)){
var _24=_1c.test.substr(3);
var _25=STSP.getNodes(_24);
if(_25&&0<_25.length){
_23=true;
}
}
}
if(_23){
if(STSPG.isDynamicLoading){
if(_1c.id=="hcard"){
STSP.loadScript("/javascript/attributes.js");
STSP.loadScript("/javascript/semanticTagMenu.js");
}
var _26=typeof _1c.js;
if(typeof _1c.js==="string"){
STSP.loadScript(_1c.js);
}
}
}
if(_1c.callback){
_1c.callback.call(_1c.nodes);
}
}
STSP.parseElem=null;
},traverseNodes:function(_27){
STSP.traverse_children(_27);
},traverse_tagscope:function(_28){
var _29=STSP.service.entries;
var _2a=_28.getElementsByTagName(STSP.tagScope);
for(var i=0;i<_2a.length;i++){
var _28=_2a[i];
for(var j=0;j<_29.length;j++){
var _2b=_29[j];
if(!_2b.nodes){
_2b.nodes=new Array();
}
if(eval(_2b.test)){
_2b.nodes.push(_28);
}
}
}
},traverse_children:function(_2c){
STSP.testNode(_2c);
var _2d=(_2c&&_2c.childNodes)?_2c.childNodes:null;
if(STSPG.isPersonCardHandlerRequired&&_2c&&_2c.tagName&&_2c.tagName=="IFRAME"){
try{
if(typeof ActiveXObject!="undefined"){
var _2e=document.frames[_2c.id].document;
if(_2e){
_2d=_2e.childNodes;
}
}else{
if(_2c.contentDocument&&_2c.contentDocument.childNodes){
_2d=_2c.contentDocument.childNodes;
}
}
}
catch(e){
_2d=null;
}
var _2f=_2d?_2d.length:"is null";
if(_2d&&0<_2d.length){
var _30=SemTagMenu.includeCSS(_2d[0].parentNode);
if(_30){
STSP.watchEvent(_2c,"load",STSP.parseDom,false);
SemTagMenu.registerMenuEventHandlers(_2d[0].parentNode);
}
}
}
if(_2d==null||_2d=="undefined"){
return;
}
for(var i=0;i<_2d.length;i++){
STSP.traverse_children(_2d[i]);
}
},testNode:function(_31){
globalTestNode=_31;
if(_31==null||_31.className==null||_31.className=="undefined"||_31.tagName==null||_31.tagName=="undefined"){
return;
}
var _32=STSP.service.entries;
for(var j=0;j<_32.length;j++){
var _33=_32[j];
if(_33.test&&!_33.test.match(/^id:/)&&eval(_33.test)){
if(!_31.alreadyadded){
_31.alreadyadded=true;
_33.nodes.push(_31);
}
}
}
},getService:function(_34){
var _35=STSP.service.entries;
for(var i=0;i<_35.length;i++){
var _36=_35[i];
if(_36.id==_34){
return _36;
}
}
},setSemanticTagValue:function(_37,_38,_39){
if(!_38.semTagValues){
_38.semTagValues={};
}
_38.semTagValues[_37]=_39;
},getSemanticTagValues:function(_3a){
return _3a.semTagValues;
},getNodes:function(_3b){
var _3c=STSP.getService(_3b);
if(_3c&&_3c.test&&_3c.test.match(/^id:/)){
_3c=STSP.getService(_3c.test.substr(3));
}
if(_3c){
}
var _3d=_3c?(_3c.nodes?_3c.nodes:[]):null;
return _3d;
},setCallback:function(_3e,_3f){
var _40=STSP.getService(_3e);
if(_40){
_40.callback=_3f;
}else{
}
},loadScript:function(_41,_42){
if(!_41||_41==""){
return;
}
if(_42=="undefined"||_42==null){
_42=false;
}
if(!STSP.scripts[_41]){
STSP.scripts[_41]=true;
var _43=document.createElement("script");
var url=_41.match(/^http/)?_41:STSPG.contextUrl+_41;
url+=(url.indexOf("?")==-1)?"?":"&";
url+="language="+STSP.lang;
_43.src=url;
if(STSPG.isDynamicLoading||_42){
document.body.insertBefore(_43,document.body.firstChild);
}
}
},setSpecialMenuProvider:function(_44){
STSP.specialMenuProviders.push(_44);
},getElementsByClassName:function(_45,_46,_47,_48){
if(!_46){
_46=document.body;
}
if(!_47){
limit=0;
}
if(!_48){
_48=["*"];
}
var _49=STSP.getRegExp(_45);
if(_46&&_46.className&&_46.className.match(_49)){
var _4a=new Array(_46);
return _4a;
}
var _4b=new Array();
for(var t=0;t<_48.length;t++){
var _4c=_46.getElementsByTagName(_48[t]);
for(var i=0;i<_4c.length;i++){
var _4d=_4c[i];
if(_4d.className&&_4d.className.match(_49)){
_4b.push(_4d);
}
if(0<_47&&_47==_4b.length){
break;
}
}
}
return _4b;
},getParentByClassName:function(_4e,_4f){
if(!_4f){
return null;
}
var _50=STSP.getRegExp(_4e);
if(_4f.className&&_4f.className.match(_50)){
return _4f;
}
while(_4f.parentNode){
_4f=_4f.parentNode;
if(_4f.className&&_4f.className.match(_50)){
return _4f;
}
}
return null;
},addHover:function(_51,_52,_53,_54){
while(typeof SemTagMenu==undefined){
alert("waiting...");
}
var _55=_51.getAttribute(STSP.refcntAttr);
var _56=(_52!==null);
if(_55){
_51.setAttribute(STSP.refcntAttr,parseInt(Number(_55)+1));
if(SemTagMenu.staticHover){
var img=SemTagMenu.findHoverFromLiveElement(_51);
if(img){
STSP.watchEvent(img,"click",_53,false);
img.setAttribute("href","javascript:SemTagMenu.a11y()");
}else{
}
}else{
STSP.watchEvent(_51,"mouseover",_52,false);
}
}else{
_51.setAttribute(STSP.refcntAttr,"1");
STSP.hoverIdx++;
_51.setAttribute(STSP.liveElemPrefix+"id",STSP.hoverIdx);
if(SemTagMenu.staticHover){
var img=STSP.createHoverImage(_54);
STSP.watchEvent(img,"click",_53,false);
STSP.watchEvent(img,"keydown",SemTagMenu.a11y,false);
img.setAttribute("href","javascript:void()");
var _57=_51.nextSibling;
if(_57){
_57.parentNode.insertBefore(img,_57);
}else{
_51.parentNode.appendChild(img);
}
_51.setAttribute(STSP.hoverIdPrefix+"idx",parseInt(STSP.hoverIdx));
_51.id=STSP.liveElemPrefix+STSP.hoverIdx;
}else{
var _58=SemTagUtil.getNodeClassValue(_51);
if(_58&&0<_58.length){
_58+=" hasHover";
}else{
_58="hasHover";
}
SemTagUtil.setNodeClassValue(_51,_58);
STSP.watchEvent(_51,"mouseover",_52,false);
_51.setAttribute("tabIndex","0");
STSP.watchEvent(_51,"focus",_52,false);
STSP.watchEvent(_51,"blur",SemTagMenu.mouseout,false);
}
}
},removeHover:function(_59,_5a,_5b){
var _5c=_59.getAttribute(STSP.refcntAttr);
if(_5c){
var _5d=Number(_5c)-1;
if(_5d<0){
}
if(SemTagMenu.staticHover){
var _5e=STSP.getHoverElement(_59);
STSP.clearEventWatch(_5e,"click",_5b,false);
if(_5d==0){
_5e.parentNode.removeChild(_5e);
}
}else{
STSP.clearEventWatch(_59,"mouseover",_5a,false);
STSP.clearEventWatch(_59,"focus",_5a,false);
_59.setAttribute(STSP.refcntAttr,_5d);
if(_5d==0){
var _5f=SemTagUtil.getNodeClassValue(_59);
var _60=_5f.replace(/hasHover/,"");
SemTagUtil.setNodeClassValue(_59,_60);
_59.removeAttribute(STSP.refcntAttr);
_59.removeAttribute("tabIndex");
}
}
}
},createHoverImage:function(_61){
var img=document.createElement("img");
img.id=STSP.hoverIdPrefix+STSP.hoverIdx;
img.className=SemTagMenu.iconName;
img.setAttribute("src",STSPG.contextUrl+"/ui/menu_selected.gif");
img.setAttribute("border","0");
img.setAttribute("alt",_61);
var _62=document.createElement("a");
STSP.watchEvent(_62,"mouseover",SemTagMenu.activateHover,false);
STSP.watchEvent(_62,"mouseout",SemTagMenu.deactivateHover,false);
_62.appendChild(img);
return _62;
},getHoverElement:function(_63){
if(!_63){
return null;
}
if(SemTagMenu.staticHover){
var idx=_63.getAttribute(STSP.hoverIdPrefix+"idx");
var img=document.getElementById(STSP.hoverIdPrefix+idx);
if(img){
var _64=img.parentNode;
return _64;
}
}else{
var _65=SemTagUtil.getNodeClassValue(_63);
if(_65.match(/hasHover/)){
return _63;
}
}
return null;
},showHover:function(_66,_67,_68){
SemTagMenu.showHover(_66,_67,_68);
},setMenuData:function(_69,_6a,_6b,_6c,_6d){
SemTagMenu.setMenuData(_69,_6a,_6b,_6c,_6d);
},getMenuItemJson:function(_6e,_6f,_70,_71){
var o=_70?_70:0;
var i=_71?_71:"";
var _72={"label":_6e,"href":_6f,"order":o,"icon":i};
return _72;
},getMenuHeaderJson:function(_73,_74,_75){
if(_74!="text/html"){
return null;
}
if(_73&&0<_73.length){
var _76={"markup":_73,"order":_75};
return _76;
}else{
null;
}
},getMenuFooterJson:function(_77,_78,_79){
if(_78!="text/html"){
return null;
}
if(_77&&0<_77.length){
var _7a={"markup":_77,"order":_79};
return _7a;
}else{
null;
}
},getElementFromEvent:function(_7b){
var _7c=_7b.target?_7b.target:_7b.srcElement;
if(_7c==window){
_7c=_7c.document;
}
return _7c;
},getLiveElementFromEvent:function(_7d){
var _7e=SemTagMenu.findLiveElementFromEventSource(STSP.getElementFromEvent(_7d));
return _7e;
},getEventAbsoluteX:function(e){
var x=0;
if(e.pageX){
x=e.pageX;
}else{
if(e.clientX){
if(document.body.scrollLeft>document.documentElement.scrollLeft){
x=e.clientX+document.body.scrollLeft;
}else{
x=e.clientX+document.documentElement.scrollLeft;
}
}
}
return x;
},getEventAbsoluteY:function(e){
var y=0;
if(e.pageY){
y=e.pageY;
}else{
if(e.clientY){
if(document.body.scrollTop>document.documentElement.scrollTop){
y=e.clientY+document.body.scrollTop;
}else{
y=e.clientY+document.documentElement.scrollTop;
}
}
}
return y;
},findPosition:function(obj,_7f){
var _80=0,_81=0,_82=0;
var _83=obj.offsetWidth;
var _84;
if(obj.offsetParent){
if(_7f){
_81+=(STSP.bidi=="rtl")?0:_83;
}
_82+=obj.offsetHeight;
while(obj!=null){
_81+=obj.offsetLeft;
_82+=obj.offsetTop;
obj=obj.offsetParent;
_80++;
}
_84=[_81+(STSP.bidi=="rtl"?_83:0),_82];
return _84;
}else{
_84=[obj.x+(STSP.bidi=="rtl"?_83:0),obj.y];
return _84;
}
},createGroupJson:function(ctx,_85){
var _86={"context":ctx,"extenders":_85};
return _86;
},createActionJson:function(id,js,ctx,_87,_88,_89,url,_8a){
var i=(id&&0<id.length)?id[0].innerHTML:null;
var j=(js&&0<js.length)?js[0].innerHTML:null;
var c=(ctx&&0<ctx.length)?ctx[0].innerHTML:null;
var l=(_87&&0<_87.length)?_87[0].innerHTML:null;
var d=(_88&&0<_88.length)?_88[0].innerHTML:null;
var s=(_89&&0<_89.length)?_89[0].innerHTML:null;
var u=(url&&0<url.length)?url[0].innerHTML:null;
var o=(_8a&&0<_8a.length)?parseInt(_8a[0].innerHTML):0;
var _8b={"id":i,"impl":j,"context":c,"label":l,"description":d,"showif":s,"url":u,"order":o};
return _8b;
},parseOrder:function(_8c){
var _8d;
if(_8c==null||_8c.length==0){
_8d=0;
return _8d;
}
if(_8c.charAt(0)=="-"){
_8d=parseInt(_8c.substr(1))*-1;
return _8d;
}else{
_8d=parseInt(_8c);
return _8d;
}
},getActions:function(_8e){
var _8f;
if(!STSP.actionRegistry){
STSP.processActions();
}
for(var i=0;i<STSP.actionRegistry.length;i++){
if(STSP.actionRegistry[i].context==_8e){
_8f=STSP.actionRegistry[i].extenders;
return _8f;
}
}
_8f=STSP.actionRegistry[0].extenders;
return _8f;
},processActions:function(){
if(!STSP.actionRegistry){
STSP.actionRegistry=new Array();
STSP.actionRegistry[0]=STSP.createGroupJson("dummy",new Array());
}
var i;
var _90=STSP.getNodes("com.ibm.portal.action");
while(_90&&0<_90.length){
var _91=_90.pop();
var id=STSP.getElementsByClassName("action-id",_91);
var _92=STSP.getElementsByClassName("action-impl",_91);
var ctx=STSP.getElementsByClassName("action-context",_91);
var _93=STSP.getElementsByClassName("action-label",_91);
var _94=STSP.getElementsByClassName("action-description",_91);
var _95=STSP.getElementsByClassName("action-showif",_91);
var url=STSP.getElementsByClassName("action-url",_91);
var _96=STSP.getElementsByClassName("action-order",_91);
var _97=STSP.createActionJson(id,_92,ctx,_93,_94,_95,url,_96);
for(i=1;i<STSP.actionRegistry.length;i++){
if(STSP.actionRegistry[i].context==_97.context){
var cnt=STSP.actionRegistry[i].extenders.length;
for(var j=0;j<cnt;j++){
if(_97.id==STSP.actionRegistry[i].extenders[j].id){
break;
}
}
if(j==cnt){
STSP.actionRegistry[i].extenders.push(_97);
}
break;
}
}
if(i==STSP.actionRegistry.length){
STSP.actionRegistry[i]=STSP.createGroupJson(ctx[0].innerHTML,new Array());
STSP.actionRegistry[i].extenders.push(_97);
}
if(_97.impl){
STSP.loadScript(_97.impl,true);
}
}
for(i=0;i<STSP.actionRegistry.length;i++){
STSP.actionRegistry[i].extenders.sort(STSP.sortByOrder);
}
},sortByOrder:function(a,b){
if(a.order>b.order){
return 1;
}else{
if(a.order<b.order){
return -1;
}else{
return 0;
}
}
},getTextValue:function(_98){
if(!_98){
return "";
}
return _98.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
},getTypedValue:function(_99,_9a){
if(!_9a){
_9a="def";
}
var _9b=new Array();
var _9c=STSP.getElementsByClassName("type",_99);
var _9d=STSP.getElementsByClassName("value",_99);
var _9e="";
if(_9d.length<1){
_9e=STSP.getTextValue(_99);
}
for(var i=0;i<_9d.length;i++){
_9e+=STSP.getTextValue(_9d[i]);
}
if(_9c.length<1){
_9b[_9a]=_9e;
}else{
for(var j=0;j<_9c.length;j++){
var _9f=_9c[j];
var _a0=_9f.tagName.match(/^abbr$/i)?_9f.getAttribute("title"):STSP.getTextValue(_9f);
_9b[_a0.toLowerCase()]=_9e;
}
}
return _9b;
},findNameElementInHcard:function(_a1){
if(_a1.className!="vcard"){
_a1=STSP.getParentByClassName("vcard",_a1);
}
var _a2=STSP.getElementsByClassName("fn",_a1)[0];
if(!_a2){
_a2=STSP.getElementsByClassName("n",_a1)[0];
}
return _a2;
},getEmailFromHcard:function(_a3){
var _a4;
if(!_a3){
_a4="";
return _a4;
}
if(_a3.className!="vcard"){
_a3=STSP.getParentByClassName("vcard",_a3);
}
var _a5="";
if(_a3){
var _a6=STSP.getElementsByClassName("email",_a3)[0];
var _a7=STSP.getTypedValue(_a6,"internet");
_a5=_a7.internet;
}
_a4=_a5;
return _a4;
},findElementByNameInHcard:function(_a8,_a9){
if(_a8.className!="vcard"){
_a8=STSP.getParentByClassName("vcard",_a8);
}
var _aa=STSP.getElementsByClassName(_a9,_a8)[0];
return _aa;
},getRegExp:function(str){
var _ab=STSP.reMap[str];
if(!_ab){
_ab=new RegExp("(^|\\s)"+str+"(\\s|$)");
STSP.reMap[str]=_ab;
}
return _ab;
},addElementToHandler:function(_ac,_ad,_ae){
if(STSPG.isParsingRequired===true){
return false;
}
if(_ac==null||_ac==="undefined"){
return false;
}
var _af=STSP.service.entries;
var _b0=null;
for(var k=0;k<_af.length;k++){
var _b1=_af[k];
if(_b1.id===_ae){
_b0=_b1;
break;
}
}
if(_b0==null){
return false;
}
var _b2;
if(_ac.nodeName==="A"||_ae==="c2a"){
_b2=_ac.parentNode;
}else{
_b2=_ac;
}
if(_b2.getAttribute("alreadyAdded")==null){
if(_b0.nodes==null||_b0.nodes==="undefined"||typeof _b0.nodes!=="array"){
_b0.nodes=[];
}
_b0.nodes.push(_b2);
_b2.setAttribute("alreadyAdded",true);
if(_ae==="c2a"){
var _b3=document.getElementsByClassName("c2a:target");
for(var i=0;i<_b3.length;i++){
_b0.nodes.push(_b3.item(i));
}
}
}
_b0.callback.call(_b0.nodes);
if(_ae==="hcard"){
var _b4=typeof SemTagPerson;
if(STSPG.ifConnUrlExists==="false"&&(typeof SemTagPerson==="object")){
SemTagPerson.showHover(_ad);
}
STSP.stNI=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined"));
var _b5=typeof SemTagAwrns;
if(STSPG.isParsingRequired===false&&STSP.stNI===false&&(typeof SemTagAwrns)){
SemTagAwrns.processHcards([_b2]);
}
}
if(_ae==="c2a"&&SemTagC2A){
SemTagC2A.showHover(_ad);
}
_b0.nodes=[];
return true;
},addElementToPersonCardHandler:function(_b6,_b7){
if(STSPG.isParsingRequired===true){
return false;
}
if(_b6==null||_b6==="undefined"){
return false;
}
var _b8;
if(_b6.nodeName==="A"){
_b8=_b6.parentNode;
}else{
_b8=_b6;
}
if(_b8.getAttribute("alreadyAdded")==null){
STSP.svcEntryPersonCard.nodes.push(_b8);
_b8.setAttribute("alreadyAdded",true);
}
STSP.svcEntryPersonCard.callback.call(STSP.svcEntryPersonCard.nodes);
var _b9=typeof SemTagPerson;
if(STSPG.ifConnUrlExists==="false"&&(typeof SemTagPerson)){
SemTagPerson.showHover(_b7);
}
STSP.stNI=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined"));
var _ba=typeof SemTagAwrns;
if(STSPG.isParsingRequired===false&&STSP.stNI===false&&(typeof SemTagAwrns)){
SemTagAwrns.processHcards([_b8]);
}
STSP.svcEntryPersonCard.nodes.pop();
return true;
},registerService:function(_bb){
var _bc=STSP.service.entries;
_bc[_bc.length]=_bb;
if(STSP.isEnablerObjectAvailable&&typeof dojo!=="undefined"){
try{
dojo.addOnLoad(function(){
var _bd=new com.ibm.mashups.livetext.ConfigEntry(_bb.classnames.join(),false,"portallof",STSPG.contextUrl+"/javascript","portallof.vcard",false,_bb.id);
dojo.publish("/com/ibm/mashups/livetext/configentryadded",[_bd]);
SemTagSvc.parseDom(null,null);
});
}
catch(e){
console.error("Error occurred in registerService for service "+_bb.id+"is :"+e);
}
}
}};
var SemTagSvcConfig=null;
if((STSP.ifConnUrlExists=="true")&&(STSP.isconnServerNew===true)){
SemTagSvcConfig={isPortal:true,baseUrl:STSP.connUrl+"/profiles",loadCssFiles:true,isBidiRTL:false};
}
STSP.watchEvent(window,"load",STSP.init,false);
var SemTagSvc=STSP;
var SemTagSvcPortal=STSP;


var SemTagUtil={isGecko:(document.all?false:true),getNodeClassValue:function(_1){
var rv;
var _2;
if(SemTagUtil.isGecko){
rv=(typeof (_1.getAttribute)!="undefined")?_1.getAttribute("class"):"";
}else{
rv=_1.className;
}
_2=(typeof (rv)!="undefined"&&rv!=null)?rv:"";
return _2;
},setNodeClassValue:function(_3,_4){
if(SemTagUtil.isGecko){
_3.setAttribute("class",_4);
}else{
_3.className=_4;
}
},fireEvent:function(_5,_6){
try{
if(_5.fireEvent){
_5.fireEvent(_6);
}else{
if(_5.dispatchEvent){
_5.dispatchEvent(_6);
}
}
}
catch(e){
}
},getOwnerDocument:function(_7){
if(!_7){
return null;
}
var _8;
if(SemTagUtil.isGecko){
_8=_7.ownerDocument;
return _8;
}else{
var _9=_7;
while(_9.parentNode){
_9=_9.parentNode;
}
_8=_9;
return _8;
}
},getFrameElement:function(_a){
var _b;
if(SemTagUtil.isGecko){
var oD=_a.ownerDocument;
_b=oD.defaultView.frameElement;
return _b;
}else{
var _c=_a;
while(_c.parentNode){
_c=_c.parentNode;
}
_b=_c;
return _b;
}
},getHcardAttributeValue:function(_d,_e){
switch(_d){
case ("email"):
return SemTagUtil.getHcardTypedAttribute(_e,_d,"internet");
case ("tel"):
return SemTagUtil.getHcardTypedAttribute(_e,_d,"voice");
case ("adr"):
return SemTagUtil.getHcardTypedAttribute(_e,_d,"intl");
}
var _f=STSP.getParentByClassName("vcard",_e);
var _10=STSP.getElementsByClassName(_d,_f,1);
if(_10.length>0&&_10[0].tagName.match(/^abbr$/i)){
var _11=_10[0].getAttribute("title");
return _11;
}
switch(_d){
case ("X-person-display-inline"):
if(_10.length>0){
return true;
}else{
return false;
}
case ("fn"):
var fn=SemTagUtil.getSinglePropertyValue(_10[0]);
if(fn){
return fn;
}else{
var _11=SemTagUtil.getHcardAttributeValue("n",_e);
return _11;
}
break;
case ("X-person-header-only"):
case ("X-person-inside-inline"):
var _11=(_10&&0<_10.length);
return _11;
case ("X-sametime-resolve"):
var _12=_10[0];
var _13=(typeof (_12)!="undefined"&&_12!=null);
return _13;
case ("n"):
if(_10.length>0){
var _14=_10[0];
var _15="";
var _16=["honorific-prefix","given-name","additional-name","family-name","honorific-suffix"];
for(var i=0;i<5;i++){
var n=SemTagUtil.getSinglePropertyValue(STSP.getElementsByClassName(_16[i],_14,1)[0]);
if(n){
_15+=n+" ";
}
}
return _15;
}
var _17="";
return _17;
break;
case ("photo"):
var _18=_10[0];
if(_18){
var _13=_18.getAttribute("src");
return _13;
}else{
return;
}
break;
case ("X-sametime-status"):
var _19=_10[0];
var _13;
if(!_19){
_13="";
return _13;
}
var _1a=_19.getAttribute("value");
if(_1a){
_13=_1a;
return _13;
}else{
_13=SemTagUtil.getSinglePropertyValue(_19);
return _13;
}
break;
case ("street-address"):
case ("post-office-box"):
case ("extended-address"):
case ("locality"):
case ("region"):
case ("postal-code"):
case ("country-name"):
case ("title"):
case ("role"):
case ("org"):
default:
var _13=SemTagUtil.getSinglePropertyValue(_10[0]);
return _13;
break;
}
},getHcardTypedAttribute:function(_1b,_1c,_1d){
var _1e=new Object();
var _1f=STSP.getParentByClassName("vcard",_1b);
var _20=STSP.getElementsByClassName(_1c,_1f);
for(var i=0;i<_20.length;i++){
var _21=_20[i];
if(_1c=="email"&&_21.nodeName.toLowerCase()=="a"&&_21.href.match(/^mailto:/)){
var _22=_21.href.indexOf("?");
if(_22>-1){
_1e[_1d]=_21.href.slice(7,_22);
}else{
_1e[_1d]=_21.href.slice(7);
}
continue;
}
_1e=STSP.getTypedValue(_21,_1d);
}
return _1e;
},getSinglePropertyValue:function(_23){
if(!_23){
return false;
}
var _24=_23.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
return _24;
},crossDomainRequest:function(){
var _25=new Array();
var _26=new Array();
var _27=this;
createTimeoutFunction=function(_28){
return function(){
_27.cancelRequest(_28);
};
};
this.getScriptId=function(id){
return "_JVLN_"+id;
};
this.getScriptObject=function(id){
var _29=SemTagUtil.isGecko?this.getScriptId(id):this.$_getScriptId(id);
return document.getElementById(_29);
};
this.request=function(url,_2a,_2b,_2c,_2d){
var _2e=this.getScriptId(_2d);
if(_2b){
_25[_2d]=_2b;
}
if(_2c){
_26[_2d]=_2c;
}
var _2f=document.createElement("script");
_2f.id=_2e;
try{
_2f.src=url;
}
catch(e){
return false;
}
document.body.insertBefore(_2f,document.body.firstChild);
if(_2a){
var _30=this;
window.setTimeout(createTimeoutFunction(_2d),_2a);
}
};
this.cancelRequest=function(id){
var _31=_25[id];
_25[id]=null;
var _32=_26[id];
_26[id]=null;
if(_31){
try{
if(_31){
var evt={"target":_32};
_31.call(this,false,null,evt);
}
var _33=this.getScriptObject(id);
if(_33){
document.body.removeChild(_33);
}
}
catch(e){
}
}
};
this.dispatch=function(id,_34){
if(!id){
return;
}
try{
var _35=_25[id];
if(!_35){
}
if(_35){
var evt={"target":_26[id]};
_35.call(this,true,_34,evt);
_25[id]=null;
_26[id]=null;
var _36=this.getScriptObject(id);
if(_36){
document.body.removeChild(_36);
}
}
}
catch(e){
}
};
}};





if(typeof (ibm)=="undefined"){
ibm={};
}
if(typeof (ibm.portal)=="undefined"){
ibm.portal={};
}
if(typeof (ibm.portal.xml)=="undefined"){
ibm.portal.xml={};
}
if(typeof (ibm.portal.xml)=="undefined"){
ibm.portal.xml={};
}
ibm.portal.util={};
ibm.portal.util.cloneObject=function(_1){
var _2={};
for(i in _1){
_2[i]=_1[i];
}
return _2;
};
ibm.portal.resource={};
ibm.portal.resource.str={};
ibm.portal.resource.getString=function(_3,_4){
s=_3[_4];
s=(s==null)?_4:s;
if(arguments.length>=2){
i=1;
do{
s=s.replace("%"+i,arguments[i]);
i=i+1;
}while(i<arguments.length);
}
return s;
};
if(typeof (ibm.portal.xml)=="undefined"){
ibm.portal.xml={};
}
ibm.portal.xml.ie={};
ibm.portal.xml.gecko={};
ibm.portal.xml.getXmlHttpRequest=function(){
var _5=null;
if(typeof ActiveXObject!="undefined"){
_5=new ActiveXObject("Microsoft.XMLHTTP");
}else{
_5=new XMLHttpRequest();
}
return _5;
};
ibm.portal.xml.loadXml=function(_6){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.loadXml(_6);
}else{
return ibm.portal.xml.gecko.loadXml(_6);
}
};
ibm.portal.xml.loadXmlString=function(_7){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.loadXmlString(_7);
}else{
return ibm.portal.xml.gecko.loadXmlString(_7);
}
};
ibm.portal.xml.loadXsl=function(_8){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.loadXsl(_8);
}else{
return ibm.portal.xml.gecko.loadXsl(_8);
}
};
ibm.portal.xml.transform=function(_9,_a,_b,_c,_d){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.transform(_9,_a,_b,_c,_d);
}else{
return ibm.portal.xml.gecko.transform(_9,_a,_b,_c,_d);
}
};
ibm.portal.xml.update=function(_e,_f,xsl,_10,_11){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
var _12=ibm.portal.xml.ie.transform(_f,xsl,_10,_11,true);
ibm.portal.debug.text("XSLT result: "+_12);
_e.innerHTML+=_12;
}else{
_12=ibm.portal.xml.gecko.transform(_f,xsl,_10,_11,false);
_e.appendChild(_12.documentElement);
}
};
ibm.portal.xml.ie.XSLT_PROG_IDS=["Msxml2.XSLTemplate.6.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0","MSXML2.XSLTemplate"];
ibm.portal.xml.ie.DOM_PROG_IDS=["MSXML2.FreeThreadedDOMDocument.6.0","Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];
ibm.portal.xml.ie.FTDOM_PROG_IDS=["Msxml2.FreeThreadedDOMDocument.6.0","Msxml2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument","MSXML.FreeThreadedDOMDocument","Microsoft.FreeThreadedXMLDOM"];
ibm.portal.xml.ie._getMSXMLImpl=function(_13){
while(_13.length>0){
try{
var _14=new ActiveXObject(_13[0]);
if(_14){
return _14;
}
}
catch(err){
}
_13.splice(0,1);
}
throw new Error("No MSXML implementation exists");
};
ibm.portal.xml.ie.loadXml=function(_15){
var _16=this._getMSXMLImpl(this.DOM_PROG_IDS);
_16.async=0;
_16.resolveExternals=0;
if(!_16.load(_15)){
throw new Error("Error loading xml file "+_15);
}
return _16;
};
ibm.portal.xml.ie.loadXmlString=function(_17){
var _18=this._getMSXMLImpl(this.DOM_PROG_IDS);
_18.async=0;
_18.resolveExternals=0;
if(_17){
if(!_18.loadXML(_17)){
throw new Error("Error loading xml string "+_17);
}
}
return _18;
};
ibm.portal.xml.ie.loadXsl=function(_19){
var _1a=this._getMSXMLImpl(this.FTDOM_PROG_IDS);
_1a.async=0;
_1a.resolveExternals=0;
if(!_1a.load(_19)){
throw new Error("Error loading xsl file "+_19);
}
return _1a;
};
ibm.portal.xml.ie.transform=function(_1b,xsl,_1c,_1d,_1e){
var _1f=_1b;
var _20=xsl;
try{
if(!_20.documentElement){
_20=this.loadXsl(xsl);
}
}
catch(e){
var _21=e.message;
throw new Error(""+_21,""+_21);
}
var _22=this._getMSXMLImpl(this.XSLT_PROG_IDS);
_22.stylesheet=_20;
var _23=_22.createProcessor();
_23.input=_1f;
if(_1d){
for(var p in _1d){
_23.addParameter(p,_1d[p]);
}
}
if(_1c){
_23.addParameter("mode",_1c);
}
if(_1e){
if(!_23.transform()){
throw new Error("Error transforming xml doc "+_1f);
}
return _23.output;
}else{
var _24=this._getMSXMLImpl(this.DOM_PROG_IDS);
_24.async=false;
_24.validateOnParse=false;
_1f.transformNodeToObject(_20,_24);
return _24;
}
};
ibm.portal.xml.gecko.loadXml=function(_25){
var _26=document.implementation.createDocument("","",null);
var xhr=new XMLHttpRequest();
xhr.open("GET",_25,false);
xhr.send(null);
if(xhr.status==200){
_26=xhr.responseXML;
}else{
throw new Error("Error loading "+_25+":"+xhr.status+":"+xhr.statusText);
}
return _26;
};
ibm.portal.xml.gecko.loadXmlString=function(_27){
var _28=new DOMParser();
try{
oXmlDoc=_28.parseFromString(_27,"text/xml");
}
catch(exc){
throw new Error("Error loading xml string "+_27);
}
return oXmlDoc;
};
ibm.portal.xml.gecko.loadXsl=function(_29){
var _2a=document.implementation.createDocument("","",null);
var xhr=new XMLHttpRequest();
xhr.open("GET",_29,false);
xhr.send(null);
if(xhr.status==200){
_2a=xhr.responseXML;
}
return _2a;
};
ibm.portal.xml.gecko.transform=function(_2b,xsl,_2c,_2d,_2e){
try{
var _2f=xsl;
if(!_2f.documentElement){
alert("xslDoc is not a Document, loading it...");
_2f=this.loadXsl(xsl);
}
var _30=new XSLTProcessor();
_30.importStylesheet(_2f);
if(_2d){
for(var p in _2d){
_30.setParameter(null,p,_2d[p]);
}
}
if(_2c){
_30.setParameter(null,"mode",_2c);
}
var _31=_30.transformToDocument(_2b);
if(!_2e){
return _31;
}
resultStr=_31.documentElement.textContent;
}
catch(exc){
throw new Error("Error transforming xml doc "+exc);
}
return resultStr;
};
ibm.portal.xml.setLayerContentByXml=function(_32,xml,xsl,_33,_34){
var _35=ibm.portal.xml.transform(xml,xsl,null,_33,_34);
if(_32.innerHTML){
_32.innerHTML=_35;
}else{
var obj=document.getElementById(_32);
obj.innerHTML=_35;
}
};
ibm.portal.io={};
ibm.portal.io.sAcceptLanguage="";
ibm.portal.io.getResponseHeader=function(_36,_37){
var _38;
try{
_38=_36.getResponseHeader(_37);
}
catch(exc){
_38=null;
}
return _38;
};
ibm.portal.io.checkForError=function(_39){
var _3a=null;
var _3b=ibm.portal.io.getResponseHeader(_39,"X-IBM-REST-Error");
if(_3b){
var _3a="",_3c=ibm.portal.io.getResponseHeader(_39,"X-IBM-REST-MsgArg1");
if(_3c){
_3a=ibm.portal.resource.getString(_3b,window.decodeURIComponent(_3c));
}else{
_3a=ibm.portal.resource.getString(_3b);
}
}
return _3a;
};
ibm.portal.io.asyncRequest=function(_3d,_3e,_3f,_40){
try{
ibm.portal.io.setAsync(_3d,_3e,_3f,_40,true);
}
catch(e){
ibm.portal.io.setAsync(_3d,_3e,_3f,_40,false);
}
};
ibm.portal.io.setAsync=function(_41,_42,_43,_44,_45){
var _46=ibm.portal.xml.getXmlHttpRequest();
_46.open(_41,_42,true);
if(!_45){
_46.setRequestHeader("Accept-language","*");
}
try{
_46.onreadystatechange=function(){
if(_46.readyState==4){
_44.startUpdate();
sError=ibm.portal.io.checkForError(_46);
if(sError){
_44.handleError(""+ibm.portal.resource.getString(sError));
}else{
var _47=_46.responseText;
_44.handleData(_47);
}
}
};
_46.send(_43);
}
catch(e){
throw new Error("","");
}
};
try{
}
catch(e){
console.error(e);
}



}catch(e){console.log("Module 'wp_liveobject_framework_core': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2011, 2012 - All Rights reserved.  **/
(function(){
i$.addOnLoad(function(){
var _1="wpthemeControlHeader",_2="contextMenuInSkinIcon",_3="contextMenuInSkin",_4="contextMenu",_5="wpthemeControl",_6=document.getElementById("layoutContainers");
var _7=function(_8){
var n=_8.parentNode;
while(n&&!i$.hasClass(n,_5)){
n=n.parentNode;
}
return n;
};
var _9=i$.query("."+_2,_6);
var _a=i$.query("."+_1,_6);
if(_9.length!=_a.length){
if(_9.length==0){
console.log("Warning: The 'wp_skin_cam' theme module is on, but the skin templates have not been updated to include HTML for the Component Action Menu icon.");
}else{
console.log("Warning: The 'wp_skin_cam' theme module is on, but only some skin templates have been updated to include HTML for the Component Action Menu icon.");
}
}
for(var i in _9){
var _b=_9[i];
var _c=_7(_b);
var _d=i$.query("."+_3,_c);
if(_d.length>0){
var _e=_d[0];
_b.appendChild(_e);
if(i$.query(".wpthemeMenu",_b).length==0){
i$.createDom("span",{"class":"templateId"},i$.query(".params",_e)[0]).innerHTML="skinContentMenuTemplate";
}
i$.removeClass(_e,_3);
i$.addClass(_e,_4);
_b.style.display="";
}
if(SemTagSvc){
SemTagSvc.parseDom("skinCAM",_b);
}else{
console.log("Content Menu: Semantic tag service not available");
}
}
});
})();


}catch(e){console.log("Module 'wp_skin_cam': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved.  **/
(function(_1){
var _2="copy",_3="move",_4="link",_5="copyMove",_6="copyLink",_7="linkMove",_8="all",_9="none",_a=i$.hasClass,_b=i$.addClass,_c=i$.removeClass,_d=i$.forEach,_e=i$.toQuery,_f=i$.addQueryString,_10="ibmDndColumn",_11="ibmDndRow",_12="portal-drop-target",_13="component-container",_14="dojoDndHandle",_15="portlet-window-ref",_16="isDropTarget",_17="isDragSource",_18="ibmDndDropZoneOver",_19="ibmDndDropZonesActive",_1a="ibmDndDropZoneIllegal",_1b=ibmCfg.portalConfig,_1c=wpModules.dnd.target,_1d=wpModules.dnd.util,_1e=null,_1f=function(e){
return e||window.event;
},_20=function(e,n,v){
e.setAttribute(n,v);
},_21=function(_22){
var _23=_22.className.split(" "),id=null,i,cls,l;
for(i=0,l=_23.length;i<l;++i){
cls=_23[i];
if(cls.indexOf("id-")===0){
id=cls.substring(3);
break;
}
}
return id;
},_24=function(_25){
var n=_25;
while(n&&!_a(n,_13)){
n=n.parentElement;
}
return n;
},_26=function(_27){
var n=_27;
while(n&&!_a(n,_10)&&!_a(n,_11)){
n=n.parentElement;
}
return n;
},_28=function(_29){
var i,_2a,_2b;
for(i=0;i<_29.childNodes.length;i++){
if(_29.childNodes[i].className===_15){
_2a=_29.childNodes[i].href;
_2b=_2a.substring(_2a.lastIndexOf("#")+1);
return _2b;
}
}
},_2c=function(e){
return e.dataTransfer;
},_2d=function(e){
var _2e=wpModules.dnd.target,dt=_2c(e),_2f=dt?dt.dropEffect:null;
if(_2f===_9){
_2f=_2e.getEffectAllowed(e);
if((_2f===_3)||(_2f===_5)||(_2f===_7)||(_2f===_8)){
_2f=_3;
}else{
if((_2f===_2)||(_2f===_6)){
_2f=_2;
}else{
_2f=_4;
}
}
}
return _2f;
},_30=function(e){
return e.srcElement;
},_31=function(e){
return e.target;
},_32=function(_33){
var _34=_33.dataTransfer;
return _34;
},_35=function(_36){
var _37,_38=wpModules.dnd.target;
_37=_38.getEffectAllowed(_36);
return _37;
},_39=function(e,_3a){
var _3b=_a(_3a,_13),_3c=_3b?_3a:_24(_3a),_3d=_21(_3c),_3e={};
_3e.target=_3d;
_3e.action=_2d(e);
return _3e;
},_3f=function(_40,_41,_42){
var _43=_39(_42,_41);
return _f(ibmCfg.portalConfig.contentHandlerURI,{"uri":"dnd:lm:oid:"+_43.target+"@oid:"+_1b.currentPageOID,"source":_40.uri,"action":_43.action,"mime-type":"text/plain"});
},_44=function(_45,_46){
var _47=function(_48,_49){
var _4a=_3f(_48,_45,_49);
return _4a;
},_1c=wpModules.dnd.target,_4b,_4c=_1c.getDropTarget(_1c.getRESTValidator(_47)),_4d=function(_4e){
var _4f=_1f(_4e),_50;
_4c.drop(_4e);
_50=_1c.getDropEffect(_4f),form=_1.getElementById("dnd-drop-form");
if(form){
var _51=[],add=function(o){
_51.push(o);
},_52=ibmCfg.portalConfig.currentPageOID,_53=i$.hasClass(_45,"component-container"),_54=_53?_45:_24(_45),_55=_21(_54),_56=_28(_45);
form.action="?uri=dnd:lm:oid:"+_55+"@oid:"+_52;
add({name:"successURI",value:"nm:oid:"+_52});
add({name:"action",value:_50});
!_53&&_56&&add({name:"position",value:"lm:oid:"+_56+"@oid:"+_52});
i$.forEach(_51,function(i){
var e=_1.createElement("input");
_20(e,"value",i.value);
_20(e,"name",i.name);
_20(e,"type","hidden");
form.appendChild(e);
});
_1c.addPayload(form,_4f);
form.submit();
_4f.preventDefault();
if(_4f){
if(_4f.stopPropagation){
_4f.stopPropagation();
}else{
_4f.cancelBubble=true;
}
}
}
},_57=function(_58){
var _59=_1f(_58);
_4c.dragenter(_59);
_4b=_31(_59)||_30(_59);
_b(_45,_46);
},_5a=function(_5b){
var _5c=_1f(_5b),_5d;
_4c.dragover(_5c);
_5d=_1c.getDropEffect(_5c);
if(_5d===_9){
_b(_45,_1a);
}
},_5e=function(_5f){
var _60=_1f(_5f),t;
_4c.dragleave(_60);
t=_31(_60)||_30(_60);
if(t===_4b){
_c(_45,_46);
_c(_45,_1a);
}
},_61=function(_62){
i$.bindDomEvt(_62,"dragenter",_57);
i$.bindDomEvt(_62,"dragover",_5a);
i$.bindDomEvt(_62,"dragleave",_5e);
i$.bindDomEvt(_62,"drop",_4d);
};
return {"dragenter":_57,"dragover":_5a,"dragleave":_5e,"drop":_4d,"addEventListeners":_61};
},_63=function(){
if(_a(_1.body,"edit-mode")){
if(_1e){
_d(_1e.getNodes("dnd-target"),function(n){
if(!_a(n,_16)){
_44(n,_18).addEventListeners(n);
_b(n,_16);
var _64=_26(n);
if(_64&&!_a(_64,_16)){
_44(_64,_19).addEventListeners(_64);
_b(_64,_16);
}
}
});
}else{
console.error("Cannot handle drop targets with attribute '"+_12+"' because SemTagSvcPortal is not defined.");
}
}
},_65=function(){
if(_a(_1.body,"edit-mode")){
if(_1e){
_d(_1e.getNodes("dnd-source"),function(n){
if(!_a(n,_17)){
var _66=_1.createElement("img");
_66.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
_66.setAttribute("class","dragHandle");
_66.setAttribute("draggable","true");
n.appendChild(_66);
_1d.getDragSource(_66,_66,0,0).addEventListeners(_66);
_b(n,_17);
}
});
}
}
};
if(typeof SemTagSvcPortal!=="undefined"){
_1e=SemTagSvcPortal;
_1e.registerService({id:"dnd-target",callback:_63,classnames:["."+_12],test:""});
_1e.registerService({id:"dnd-source",callback:_65,classnames:["."+_14],test:""});
}else{
console.log("SemTagSvcPortal is undefined");
}
})(document);


}catch(e){console.log("Module 'wp_dnd_main': ",e);}
try{(function(){
    i$.merge({
	"create_element_here":"create element here"
},i$.fromPath("wpModules.dnd.nls",true));
})();
}catch(e){console.log("Module 'wp_dnd_main': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved.  **/
(function(_1,_2,_3){
var _4=_2,_5=_1,_6=_2.console,_7="component-container",_8="component-control",_9="portlet-window",_a="portlet-window-ref",_b=function(nl){
var i,ll,l=[];
for(i=0,ll=nl.length;i!==ll;l.push(nl[i++])){
}
return l;
},_c=function(_d){
var _e=new Object(),_f,_10=0,_11=0;
_e.width=_d.offsetWidth;
_e.height=_d.offsetHeight;
while(_d){
_10+=_d.offsetTop;
_11+=_d.offsetLeft;
_d=_d.offsetParent;
}
_e.left=_11;
_e.top=_10;
_f={"w":_e.width,"h":_e.height,"x":_e.left,"y":_e.top};
return _f;
},_12=function(_13,_14){
var _15;
if(_13.currentStyle){
_15=_13.currentStyle[_14];
}else{
if(_2.getComputedStyle){
_15=_1.defaultView.getComputedStyle(_13,null).getPropertyValue(_14);
}
}
return _15;
},_16=function(_17,_18,_19){
var _1a=_12(_17,_18),_1b=_1a.toLowerCase()===_19;
return _1b;
},_1c={_sortByDelta:function(p1,p2){
var _1d=p1.delta-p2.delta;
return _1d;
},_isContainedIn:function(p1,p2){
var _1e=(p1.x>=p2.x&&(p1.x+p1.w<=p2.x+p2.w))&&(p1.y>=p2.y&&(p1.y+p1.h<=p2.y+p2.h));
return _1e;
},_contains:function(p1,p2){
var _1f=(p1.x<=p2.x&&(p1.x+p1.w>=p2.x+p2.w))&&(p1.y<=p2.y&&(p1.y+p1.h>=p2.y+p2.h));
return _1f;
},_afterDelta:function(p1,p2,_20){
var l=_20==="x"?"w":"h",_21=p1[_20]-(p2[_20]+p2[l]);
return _21;
},_beforeDelta:function(p1,p2,_22){
var _23=_1c._afterDelta.call(this,p2,p1,_22);
return _23;
},_isBefore:function(p1,p2,_24){
var _25=_1c._beforeDelta.call(this,p1,p2,_24)>=0;
return _25;
},_isAfter:function(p1,p2,_26){
var _27=_1c._afterDelta.call(this,p1,p2,_26)>=0;
return _27;
}},_28=function(_29,_2a,dir){
var p=_c(_29),_2b="_beforeDelta",_2c,_2d=[],ret=[],_2e,i,k;
switch(dir){
case _3.DIRECTION_LEFT:
_2c="x";
break;
case _3.DIRECTION_RIGHT:
_2b="_afterDelta";
_2c="x";
break;
case _3.DIRECTION_UP:
_2c="y";
break;
case _3.DIRECTION_DOWN:
_2b="_afterDelta";
_2c="y";
break;
default:
_2b="_afterDelta";
_2c="y";
}
for(i=0;i<_2a.length;i++){
_2e=_2a[i];
if(!_16(_2e,"display","none")){
_2d.push({delta:_1c[_2b](_c(_2e),p,_2c),node:_2e});
}
}
_2d=_2d.sort(_1c["_sortByDelta"]);
for(k=_2d.length-1;k>=0;k--){
if(_2d[k].delta<0){
_2d.splice(0,k+1);
break;
}
ret.unshift(_2d[k].node);
}
return ret;
},_2f=function(id){
var _30=i$.query("."+id+":not(.portlet-window)")[0];
return _30;
},_31=function(_32){
var _33=_32.className,_34=_33.substring(_33.indexOf("id-")+3).split(" ")[0];
return _34;
},_35=function(_36){
var _37=_36.className,_38=_37.indexOf(_7)>=0;
return _38;
},_39=function(_3a){
var _3b=i$.query("."+_7,_3a),_3c=_3b&&_3b.length>=1?true:false;
return _3c;
},_3d=function(_3e){
var n=_3e;
while(n&&!i$.hasClass(n,_7)){
n=n.parentElement;
}
return n;
},_3f=function(_40){
var n=_40;
while(n&&!i$.hasClass(n,_8)){
n=n.parentElement;
}
return n;
},_41=function(_42){
var _43=i$.query(".component-control",_42);
return _43;
},_44=function(){
var _45=i$.query(".component-container:not(.hiddenWidgetsContainer)");
return _45;
},_46=function(_47,_48){
var _49=_3d(_47),_4a=_41(_49).filter(function(c){
return c!==_47;
}),_4b=_28(_47,_4a,_48),_4c=_4b[0];
return _4c;
},_4d=function(_4e,_4f){
var _50=_3d(_4e),_51=_44().filter(function(c){
return c!==_50;
}),_52=_28(_4e,_51,_4f),_53,i,_54=true;
for(i=0;i<_52.length;i++){
if(!_39(_52[i])){
_53=_52[i];
break;
}
}
return _53;
},_55=function(_56){
var _57=_3d(_56),_58=_41(_57),i,_59;
for(i=0;i<_58.length;i++){
if(_58[i]===_56){
_59=_58[i+1];
break;
}
}
return _59;
},_5a=function(_5b){
var _5c=_35(_5b.parentNode)?_5b.parentNode:_3d(_5b),_5d=_b(_41(_5c)),_5e=_5d.indexOf(_5b);
return _5e;
},_5f=function(_60,_61){
var idx=_5a(_60),_62=_5a(_61),_63=idx<_62;
return _63;
},_64=function(id,dir){
var _65=_2f(id),_66,_67,_68,ret;
if(_65){
_66=_46(_65,dir);
_67=null;
if(!_66){
_67=_4d(_65,dir);
}
if(_66||_67){
_68=_3d(_65);
ret={source:_65,parent:_66?_68:_67,sibling:_66,dir:dir};
return ret;
}
}
},_69=function(id,_6a){
var _6b,_6c,_6d,_6e,_6f,_70,pos="last",_71,_72,me=this,_73,_74;
_6b=_64(id,_6a.dir);
_6c=_6b.source;
_6d=_6b.sibling;
_6e=_6d?_3d(_6d):null;
_70=_6b.parent;
if(_6b){
if(_6d&&_6e&&_6e===_70){
_6f=_6d;
if(_5f(_6c,_6d)){
_6d=_55(_6d);
}
pos="before";
_73=_6d;
if(_73===null){
_73=_6f;
pos="after";
}
}else{
_73=_70;
}
}
if(_6a.target){
_74={"node":_6c,"pos":"last","refNode":_2f("id-"+_6a.target)};
}else{
_74={"node":_6c,"pos":pos,"refNode":_73};
}
return _74;
},_75=function(_76){
var i,_77,_78,_79=false;
for(i=0;i<_76.childNodes.length;i++){
if(_76.childNodes[i].className&&_76.childNodes[i].className.indexOf(_a)>=0){
_77=_76.childNodes[i].href;
_78=_77.substring(_77.lastIndexOf("#")+1);
_79=true;
}
}
if(_79!==true){
_78=(_76.className&&_76.className.indexOf(_8)>=0)?_31(_76):"";
}
return _78;
},_7a=function(e,n,v){
e.setAttribute(n,v);
},_7b=function(_7c){
var _7d=i$.byId("dnd-drop-form"),_7e=ibmCfg.portalConfig.currentPageOID,_7f=["lm:oid:"+_31(_7c.node)+"@oid:"+_7e],_80=[],add=function(o){
_80.push(o);
},_81,_82,_83,_84,_85,_86,_87,_88,e;
if(_7d){
_81=i$.hasClass(_7c.refNode,_7);
_82=_7c.refNode.className.indexOf(_9)>=0&&_7c.refNode.className.indexOf("id-")<0;
_83=_81?_7c.refNode:_3d(_7c.refNode);
_84=_31(_83);
_85=_31(_7c.refNode);
_86=_84;
_87=!_82?_75(_7c.refNode):"";
_88=!_82?_87:_84;
_7d.action=i$.addQueryString(ibmCfg.portalConfig.contentHandlerURI,{"uri":"dnd:lm:oid:"+_84+"@oid:"+_7e});
add({name:"stateURL",value:location.href});
add({name:"successURI",value:"nm:oid:"+_7e});
add({name:"action",value:"move"});
!_81&&!_82&&_88&&_88.length>0&&add({name:"position",value:"lm:oid:"+_88+"@oid:"+_7e});
i$.forEach(_7f,function(uri){
add({name:"source",value:uri});
});
i$.forEach(_80,function(i){
e=_1.createElement("input");
_7a(e,"value",i.value);
_7a(e,"name",i.name);
_7a(e,"type","hidden");
_7d.appendChild(e);
});
return _7d;
}
},_89=function(_8a){
var _8b;
if(_8a){
switch(_8a.pos){
case "last":
_8b.appendChild(_8a.node);
break;
case "before":
_8b.insertBefore(_8a.node,_8a.refNode);
break;
}
}
},_8c=function(_8d){
var _8e=_7b(_8d);
_8e.submit();
},_8f=function(id,_90){
var _91=_64("id-"+id,_90.dir),_92;
_92=(_91&&(_91.sibling||_91.parent))?true:false;
return _92;
},_93=function(id,_94){
var _95=_2f("id-"+id),_96=_2f("id-"+_94),_97;
_97={"node":_95,"pos":"last","refNode":_96};
_8c(_97);
},_98=function(id,_99){
var _9a,_9b,_9c,_9d;
if(_99.dir){
_9a=_69("id-"+id,_99);
}else{
if(_99.target){
_9c=_2f("id-"+id);
_9d=_2f("id-"+_99.target);
_9a={"node":_9c,"pos":"last","refNode":_9d};
}
}
_9b=_9a.refNode;
_8c(_9a);
},_9e=function(dir,_9f){
var _a0={"dir":dir,"target":_9f};
return _a0;
};
_3.isMovable=_8f;
_3.move=_98;
_3.newMoveInfo=_9e;
_3.DIRECTION_UP="UP";
_3.DIRECTION_DOWN="DOWN";
_3.DIRECTION_LEFT="LEFT";
_3.DIRECTION_RIGHT="RIGHT";
_3.DIRECTIONS=[_3.DIRECTION_UP,_3.DIRECTION_DOWN,_3.DIRECTION_LEFT,_3.DIRECTION_RIGHT];
})(document,window,i$.fromPath("wpModules.theme.MoveControls",true));
var DEBUG=false;


}catch(e){console.log("Module 'wp_movecontrols': ",e);}
try{(function(){
    i$.merge({
	"create_element_here":"create element here"
},i$.fromPath("wpModules.movecontrols.nls",true));
})();
}catch(e){console.log("Module 'wp_movecontrols': ",e);}
try{(function(_1){
var _1=_1,_2=_1.document,_3=wpModules.toolbar,_4=wpModules.toolbar.menuActions,_5=wpModules.theme.MoveControls,_6=i$.Promise,_7=i$.byId,_8=i$.forEach,_9={"then":function(){
}},_a=_5.newMoveInfo,_b=_a(_5.DIRECTION_UP),_c=_a(_5.DIRECTION_DOWN),_d=_a(_5.DIRECTION_LEFT),_e=_a(_5.DIRECTION_RIGHT),_f="layoutContainers",_10=function(_11){
var id=_12(_11),_13=_14(id),_15=msg("delete_control_dialog_title")||"Delete Portlet",_16=msg("confirm_delete_control_anonymous"),p=_17();
if(_13){
_16=msg("confirm_delete_control").replace("{0}",_13);
}
_18("confirm_delete_control",_15,_16).then(function(ret){
if(ret.button=="YES"){
p.resolve(_11.actionUrl);
}
});
return p;
},_19=function(_1a){
var r=_1b(_1a)&&_1c();
return r;
},_1d=function(_1e){
var _1f=msg("edit_wiring_dialog_title_anonymous"),url=_1e.actionUrl+"&returnURI=dialog:CloseModalDialog",p=_17(),_20={"url":url,"title":_1f,"modal":true,"window":_1.parent||_1,"autoResize":true,"padding":0,"callbackFn":function(_21){
if(_21&&_21.status!="CANCEL"){
p.resolve(_22().location.href);
}
}};
_23(_20);
return p;
},_24=function(_25){
var r=_1b(_25)&&_1c();
return r;
},_26=function(_27,_28){
var r=_5.isMovable(_27,_28);
return r;
},_29=function(_2a){
var id=_12(_2a),_2b=_2c(_2a);
var r=_1b(_2a)&&_1c()&&_26(id,_2b);
return r;
},_2d=function(_2e,_2f){
var r=_9;
if(_26(_2e,_2f)){
_5.move(_2e,_2f);
}
return r;
},_30=function(_31){
var id=_12(_31),_32=_2c(_31);
var r=_2d(id,_32);
return r;
},_33=function(_34){
var _35=_12(_34),_36=_37(_22()),_38=_39(_36),r=_9;
if(_38){
var _3a=_a(null,_38);
_5.move(_35,_3a);
}
return r;
},_37=function(win){
var _3b=win.document.getElementById(_f);
if(_3b&&_3b.getElementsByClassName){
var _3c=_3b.getElementsByClassName("hiddenWidgetsContainer");
if(_3c&&_3c.length>0){
var r=_3c[0];
return r;
}
}
return null;
},_39=function(_3d){
var _3e=_3d.className.split(" ");
for(var i=0,l=_3e.length;i<l;++i){
var cls=_3e[i];
if(cls.indexOf("id-")===0){
var r=cls.substring(3);
return r;
}
}
return null;
},_3f=function(_40){
var r=_1b(_40)&&_1c();
if(r){
var _41=_37(_22());
if(_41&&_41.getElementsByClassName){
var _42=_12(_40),_43=_41.getElementsByClassName("id-"+_42);
r=!_43||_43.length<=0;
}
}
return r;
},_1c=function(){
var r=_3.isEditModeActive();
return r;
},_1b=function(_44){
var r=_44.visibility!==false;
return r;
},_23=function(_45){
var _46=new wpModules.dialog.Dialog(_45);
_46.open();
},_14=function(_47){
var _48=_7("wpRegionId"+_47);
var r=_48?_49(_48):null;
return r;
},_49=function(n){
if(n.nodeType==3){
var r=n.nodeValue;
return r;
}
var c=n.childNodes;
for(var i=0,l=c.length;i<l;++i){
var r=_49(c[i]);
return r;
}
},_12=function(_4a){
var r=_4b(_4a,"wid");
return r;
},_2c=function(_4c){
var dir=_4b(_4c,"direction"),r=null;
if("up"==dir){
r=_b;
}else{
if("down"==dir){
r=_c;
}else{
if("left"==dir){
r=_d;
}else{
if("right"==dir){
r=_e;
}
}
}
}
return r;
},_4b=function(_4d,key){
var r=_4d.metadata[key];
return r;
},_22=function(){
var r=_3.getViewAreaWindow();
return r;
},_18=function(id,_4e,_4f){
var dlg=wpModules.dialog,r=dlg.confirm({"id":id,"title":_4e,"markup":"<span style=\"font-size: 1.1em;\">"+_4f+"</span>","icon":dlg.confirm.ICON.EXCLAMATION,"buttons":dlg.confirm.BUTTONS.YESNO,"window":_1.parent||_1});
return r;
},_17=function(_50){
var p=new _6();
if(_50){
p.resolve(_50);
}
return p;
},msg=function(key){
var r=_4.nls[key];
return r;
},get=function(obj,key){
var o=obj[key];
if(o){
var v=o.value;
if(v&&v.length>0){
var r=v[0];
return r;
}
}
return null;
};
_4.confirmDeleteControl=_10;
_4.isDeleteControlVisible=_19;
_4.openEditWiringDialog=_1d;
_4.isEditWiringVisible=_24;
_4.isControlMovable=_29;
_4.moveControl=_30;
_4.hideControl=_33;
_4.isHideControlVisible=_3f;
})(window);


}catch(e){console.log("Module 'wp_toolbar_controlactions': ",e);}
try{(function(){
    i$.merge({
	"no_selected_segments_desc":"No segments exist.",
	"add_content_target_btn":"Add Content",
	"content_display_field":"Configure Spot:",
	"segments_target_is":"User Matches Segment",
	"author_field":"Author:",
	"filter_custom":"Custom",
	"filter_label":"Filter:",
	"targeted_desc":"Target content to different segments (audiences). Add web content to the targeted content list. Then, map the content to segments to specify whether to display or hide content for each segment.",
	"remove_btn":"Remove",
	"error_alt_text":"Error",
	"content_properties":"Content Properties",
	"message_targeting_content_not_found":"Content item not found.",
	"set_content_item":"Set Content Item",
	"targeted_in_parentheses":"Web Content Viewer (Targeted)",
	"segments_dialog_desc":"Select segments to add or remove to your content item. You can add more segments to this list.",
	"add_content_target_dialog_title":"Add Content Target",
	"details_tab_btn":"Details",
	"add_segment_btn":"Add Segment...",
	"templates_section_title":"Contents and Templates",
	"targeted_show_page":"Show on Page",
	"appearance_popup_help":"Apply the default presentation template to the content spot. To override the default appearance, replace the presentation template with an HTML component or by selecting another template. You can have one appearance setting for the content spot.",
	"filter_managed_segments":"Managed Segments",
	"contextual_item_desc":"The displayed content item changes depending on the page context.",
	"cam_item_content":"Configure Spot",
	"message_targeted_to_specified":"This spot was previously configured to display targeted content. By saving the settings for specified content, the targeted content settings are lost. To configure this spot for specified content, continue saving the settings in this view. To keep the targeted content settings, click Cancel.",
	"desc_label":"Description",
	"create_date_field":"Created:",
	"show_segment_descriptions_btn":"Show Description",
	"prompt_managed_seg_groups":"Select segments from {0} available managed segment groups.",
	"replace_content_dialog_title":"Replace Content Item",
	"use_page_default_opt":"Use Page Default Content",
	"info_alt_text":"Information",
	"segments_header":"Segments:",
	"replace_component_dialog_title":"Replace Component",
	"segments_popup_help":"Select segments to determine who views this content. Segments help you define your target audience. For example, you can define the audience by users, device class, or other attributes.",
	"appearance_component_opt":"Component",
	"no_description":"No description available",
	"message_targeted_to_contextual":"This spot was previously configured to display targeted content. By saving the settings for contextual content, the targeted content settings are lost. To configure this spot for contextual content, continue saving the settings in this view. To keep the targeted content settings, click Cancel.",
	"use_page_default_desc":"Display the default content item for the page to selected segments.",
	"content_specified_opt":"Specified Content",
	"auth_template_field":"Authoring Template:",
	"message_unsaved_changes":"You have unsaved changes. To confirm that you want to discard your changes, click Cancel or close the form.",
	"segments_target_remove":"Remove This Segment",
	"appearance_default_opt_cf05":"Default Presentation Template",
	"seg_draft":"draft",
	"segments_desc":"Select segments to determine who views this content. For example, you can define the audience by users, device class, or other attributes.",
	"content_targeted_opt":"Targeted Content",
	"page_default_indicator":"Page Default",
	"workflow_stage":"Stage",
	"message_invalid_content_selection":"You must select a content item. For example, content items might include web articles, news, schedules, and more. The content items available to you depend on the templates that are created in a web content library.",
	"appearance_default":"Default",
	"replace_btn":"Replace",
	"appearance_field":"Appearance:",
	"location_label":"Location:",
	"filter_none":"None",
	"segments_tab_btn":"Segments",
	"last_updated_field":"Last Updated:",
	"project_field":"Project:",
	"add_btn":"Add",
	"unknown_contextual_item":"Contextual Item",
	"contextual_in_parentheses":"Web Content Viewer (Contextual)",
	"targeted_default_content":"Default Content",
	"page_default_content_title":"Page Default Content",
	"cam_item_displayed":"Displayed",
	"sel_content_item":"Select Content Item",
	"unknown_contextual_item_desc":"The displayed content item changes depending on the page context. The page default is displayed when there is no context.",
	"targeted_save_show_page":"Save and Show on Page",
	"segments_target_not":"User Does Not Match Segment",
	"filter_segments":"Segments",
	"location_field":"Location:",
	"property_value_none":"None",
	"targeted_content":"Targeted Content Items",
	"delete_targeted_item_btn":"Remove",
	"targeted_spot_title":"Targeted Content Summary",
	"warning_alt_text":"Warning",
	"select_content_opt":"Select Content Item to Display",
	"workflow_field":"Workflow:",
	"hidden_spot_title":"Hidden Spot",
	"targeted_reorder":"When you have multiple targeted content items, you can reorder the content items to set the priority. The first match displays in this spot.",
	"location_section_title":"Location",
	"loading":"Loading...",
	"pzn_popup_help_appearance":"Appearance",
	"segments_title":"Segments",
	"target_specified_content":"Display this content item to the selected segments.",
	"hide_segment_descriptions_btn":"Hide Description",
	"filter_all_segments":"All Segments",
	"hide_spot_btn":"Hide Spot",
	"save_btn":"Save",
	"targeted_item_title":"Targeted Item",
	"update_segments_btn":"Update Segments",
	"edit_authoring_template_dialog_title":"Edit Authoring Template:",
	"add_segments_title":"Add Segments",
	"workflow_stage_field":"Workflow Stage:",
	"replace_presentation_template_dialog_title":"Replace Presentation Template",
	"appearance_default_cf05":"Default Presentation Template",
	"appearance_summary":"Summary Presentation Template",
	"content_contextual_opt":"Contextual Content",
	"specified_item_desc":"This content item always displays in this spot",
	"not_found_segments_desc":"No matching segments.",
	"tooltip_managed":"Managed segments are the segment groups and segments that your developer creates and manages in a web content library.",
	"default_content_desc":"Display this content to users that are not included in segments for targeted content items.",
	"tooltip_non_managed":"Segments in this list were created with personalization rules. You see this view only if your developer previously used personalization rules to create segments.",
	"prompt_seg_groups":"Select segments from {0} available segment groups.",
	"edit_btn":"Edit",
	"more_btn":"More",
	"hide_spot_desc":"Hide this content item from selected segments.",
	"user_must_match_all_opt":"User must match all selected segments to view this content.",
	"appearance_summary_opt":"Summary Presentation Template",
	"hide_spot_opt":"Hide Spot",
	"success_alt_text":"Success",
	"edits_section_title":"Edits and Updates",
	"content_title_field":"Content Item:",
	"appearance_template_opt":"Presentation Template",
	"cam_item_show":"Show",
	"cancel_btn":"Cancel",
	"close_alt_text":"Close",
	"learn_more":"Learn More",
	"more_details":"More Details",
	"add_default_content_target_btn":"Add Default Content",
	"appearance_default_opt":"Default Appearance",
	"message_add_content_item":"You must add one or more segments to save this content item.",
	"appearance_template_opt_cf05":"Specified Presentation Template",
	"type_to_find_segments":"Find Segment",
	"done_btn":"Done",
	"edit_content_dialog_title":"Edit Content Item:"
},i$.fromPath("PznUIUtils.nls",true));
})();
}catch(e){console.log("Module 'wp_content_targeting_cam': ",e);}
try{(function(){
    i$.merge({
	"no_selected_segments_desc":"No segments exist.",
	"add_content_target_btn":"Add Content",
	"content_display_field":"Configure Spot:",
	"segments_target_is":"User Matches Segment",
	"author_field":"Author:",
	"filter_custom":"Custom",
	"filter_label":"Filter:",
	"targeted_desc":"Target content to different segments (audiences). Add web content to the targeted content list. Then, map the content to segments to specify whether to display or hide content for each segment.",
	"remove_btn":"Remove",
	"error_alt_text":"Error",
	"content_properties":"Content Properties",
	"message_targeting_content_not_found":"Content item not found.",
	"set_content_item":"Set Content Item",
	"targeted_in_parentheses":"Web Content Viewer (Targeted)",
	"segments_dialog_desc":"Select segments to add or remove to your content item. You can add more segments to this list.",
	"add_content_target_dialog_title":"Add Content Target",
	"details_tab_btn":"Details",
	"add_segment_btn":"Add Segment...",
	"templates_section_title":"Contents and Templates",
	"targeted_show_page":"Show on Page",
	"appearance_popup_help":"Apply the default presentation template to the content spot. To override the default appearance, replace the presentation template with an HTML component or by selecting another template. You can have one appearance setting for the content spot.",
	"filter_managed_segments":"Managed Segments",
	"contextual_item_desc":"The displayed content item changes depending on the page context.",
	"cam_item_content":"Configure Spot",
	"message_targeted_to_specified":"This spot was previously configured to display targeted content. By saving the settings for specified content, the targeted content settings are lost. To configure this spot for specified content, continue saving the settings in this view. To keep the targeted content settings, click Cancel.",
	"desc_label":"Description",
	"create_date_field":"Created:",
	"show_segment_descriptions_btn":"Show Description",
	"prompt_managed_seg_groups":"Select segments from {0} available managed segment groups.",
	"replace_content_dialog_title":"Replace Content Item",
	"use_page_default_opt":"Use Page Default Content",
	"info_alt_text":"Information",
	"segments_header":"Segments:",
	"replace_component_dialog_title":"Replace Component",
	"segments_popup_help":"Select segments to determine who views this content. Segments help you define your target audience. For example, you can define the audience by users, device class, or other attributes.",
	"appearance_component_opt":"Component",
	"no_description":"No description available",
	"message_targeted_to_contextual":"This spot was previously configured to display targeted content. By saving the settings for contextual content, the targeted content settings are lost. To configure this spot for contextual content, continue saving the settings in this view. To keep the targeted content settings, click Cancel.",
	"use_page_default_desc":"Display the default content item for the page to selected segments.",
	"content_specified_opt":"Specified Content",
	"auth_template_field":"Authoring Template:",
	"message_unsaved_changes":"You have unsaved changes. To confirm that you want to discard your changes, click Cancel or close the form.",
	"segments_target_remove":"Remove This Segment",
	"appearance_default_opt_cf05":"Default Presentation Template",
	"seg_draft":"draft",
	"segments_desc":"Select segments to determine who views this content. For example, you can define the audience by users, device class, or other attributes.",
	"content_targeted_opt":"Targeted Content",
	"page_default_indicator":"Page Default",
	"workflow_stage":"Stage",
	"message_invalid_content_selection":"You must select a content item. For example, content items might include web articles, news, schedules, and more. The content items available to you depend on the templates that are created in a web content library.",
	"appearance_default":"Default",
	"replace_btn":"Replace",
	"appearance_field":"Appearance:",
	"location_label":"Location:",
	"filter_none":"None",
	"segments_tab_btn":"Segments",
	"last_updated_field":"Last Updated:",
	"project_field":"Project:",
	"add_btn":"Add",
	"unknown_contextual_item":"Contextual Item",
	"contextual_in_parentheses":"Web Content Viewer (Contextual)",
	"targeted_default_content":"Default Content",
	"page_default_content_title":"Page Default Content",
	"cam_item_displayed":"Displayed",
	"sel_content_item":"Select Content Item",
	"unknown_contextual_item_desc":"The displayed content item changes depending on the page context. The page default is displayed when there is no context.",
	"targeted_save_show_page":"Save and Show on Page",
	"segments_target_not":"User Does Not Match Segment",
	"filter_segments":"Segments",
	"location_field":"Location:",
	"property_value_none":"None",
	"targeted_content":"Targeted Content Items",
	"delete_targeted_item_btn":"Remove",
	"targeted_spot_title":"Targeted Content Summary",
	"warning_alt_text":"Warning",
	"select_content_opt":"Select Content Item to Display",
	"workflow_field":"Workflow:",
	"hidden_spot_title":"Hidden Spot",
	"targeted_reorder":"When you have multiple targeted content items, you can reorder the content items to set the priority. The first match displays in this spot.",
	"location_section_title":"Location",
	"loading":"Loading...",
	"pzn_popup_help_appearance":"Appearance",
	"segments_title":"Segments",
	"target_specified_content":"Display this content item to the selected segments.",
	"hide_segment_descriptions_btn":"Hide Description",
	"filter_all_segments":"All Segments",
	"hide_spot_btn":"Hide Spot",
	"save_btn":"Save",
	"targeted_item_title":"Targeted Item",
	"update_segments_btn":"Update Segments",
	"edit_authoring_template_dialog_title":"Edit Authoring Template:",
	"add_segments_title":"Add Segments",
	"workflow_stage_field":"Workflow Stage:",
	"replace_presentation_template_dialog_title":"Replace Presentation Template",
	"appearance_default_cf05":"Default Presentation Template",
	"appearance_summary":"Summary Presentation Template",
	"content_contextual_opt":"Contextual Content",
	"specified_item_desc":"This content item always displays in this spot",
	"not_found_segments_desc":"No matching segments.",
	"tooltip_managed":"Managed segments are the segment groups and segments that your developer creates and manages in a web content library.",
	"default_content_desc":"Display this content to users that are not included in segments for targeted content items.",
	"tooltip_non_managed":"Segments in this list were created with personalization rules. You see this view only if your developer previously used personalization rules to create segments.",
	"prompt_seg_groups":"Select segments from {0} available segment groups.",
	"edit_btn":"Edit",
	"more_btn":"More",
	"hide_spot_desc":"Hide this content item from selected segments.",
	"user_must_match_all_opt":"User must match all selected segments to view this content.",
	"appearance_summary_opt":"Summary Presentation Template",
	"hide_spot_opt":"Hide Spot",
	"success_alt_text":"Success",
	"edits_section_title":"Edits and Updates",
	"content_title_field":"Content Item:",
	"appearance_template_opt":"Presentation Template",
	"cam_item_show":"Show",
	"cancel_btn":"Cancel",
	"close_alt_text":"Close",
	"learn_more":"Learn More",
	"more_details":"More Details",
	"add_default_content_target_btn":"Add Default Content",
	"appearance_default_opt":"Default Appearance",
	"message_add_content_item":"You must add one or more segments to save this content item.",
	"appearance_template_opt_cf05":"Specified Presentation Template",
	"type_to_find_segments":"Find Segment",
	"done_btn":"Done",
	"edit_content_dialog_title":"Edit Content Item:"
},i$.fromPath("PznUIUtils.nls",true));
})();
}catch(e){console.log("Module 'wp_content_targeting_cam': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2015 - All Rights reserved.  **/
(function(){
var _1=i$.fromPath("PznUIUtils",true);
_1.MSG_TYPE_ERROR="lotusError";
_1.MSG_TYPE_WARNING="lotusWarning";
_1.MSG_TYPE_INFO="lotusInfo";
_1.MSG_TYPE_SUCCESS="lotusSuccess";
_1.PATH_AUTO_CLOSE_REFRESH="wpModules.ct.pageRefresh";
_1.EL_DIALOG_POPUP_MENU=i$.byId("pznDialogPopupMenu");
_1.EL_DIALOG_POPUP_MENU_CONTAINER=i$.byId("pznDialogPopupMenuItemsContainer");
_1._pznContentSettings=null;
_1._pznDialogNavigator=null;
_1._popupHelpDialog=null;
_1._portletPageId=null;
_1._portletWindowId=null;
_1._componentId=null;
_1._altPresentationTemplatePath=null;
_1.contextPath="";
_1.pocUrlBase="";
_1.ContentSelectorPOCURL="";
_1.ComponentSelectorPOCURL="";
_1.PresentationTemplateSelectorPOCURL="";
_1.ContentEditorPOCURL="";
_1.PresentationTemplateEditorPOCURL="";
_1.ComponentEditorPOCURL="";
_1._appearanceReplaceOptions=null;
_1._contentOptions=null;
_1._contentEdited=false;
_1._currentMessageId=null;
_1._isRTL=false;
_1._autoClosed=true;
_1._segFilterOptions=[{text:"All Segments"}];
_1.escapeHTML=function(_2){
if(!_2){
return _2;
}
return _2.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");
};
_1.escapeJS=function(_3){
if(!_3){
return _3;
}
return _3.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\"/g,"\\\"").replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");
};
_1.toXML=function(_4){
if(!_4){
return _4;
}
var _5=null;
if(window.ActiveXObject){
_5=new ActiveXObject("Microsoft.XMLDOM");
_5.async="false";
_5.loadXML(_4);
}else{
var _6=new DOMParser();
_5=_6.parseFromString(_4,"text/xml");
}
return _5;
};
_1.getIframe=function(){
if(!_1._iframe){
var wp=window.parent,i;
if(wp){
var _7=wp.document.getElementsByTagName("iframe");
if(_7){
for(i=0;i<_7.length;i++){
if(_7[i].contentWindow==window){
_1._iframe=_7[i];
break;
}
}
}
}
}
return _1._iframe;
};
_1.init=function(_8){
document.body.style.backgroundColor="#ffffff";
var s=document.getElementsByTagName("section"),sc;
if(s){
for(i=0;i<s.length;i++){
if(i$.hasClass(s[i],"wpthemeControl")){
s[i].style.margin="0";
}
sc=s[i].childNodes;
for(a=0;a<sc.length;a++){
i$.removeClass(sc[a],"wpthemeOverflowAuto");
}
}
}
_1._pznContentSettings=new PznContentSettings(_8);
window.onbeforeunload=function(){
if(_1._autoClosed){
var _9=i$.fromPath(_1.PATH_AUTO_CLOSE_REFRESH,false,window.parent);
if(!_9){
_9={ctwindow:window,refresh:false};
}
if(_1.isContentEdited()){
_9.refresh=true;
i$.toPath(_1.PATH_AUTO_CLOSE_REFRESH,_9,window.parent);
}else{
_9.refresh=false;
i$.toPath(_1.PATH_AUTO_CLOSE_REFRESH,_9,window.parent);
}
if(_1.getContentSettings().isChanged()){
_1.getContentSettings().cancel();
return false;
}
}
};
};
_1.setRTL=function(_a){
if(_a){
_1._isRTL=true;
}else{
_1._isRTL=false;
}
};
_1.isRTL=function(){
return _1._isRTL;
};
_1.isInfoMode=function(){
var f=window.top.frames["wpViewFrameContainer-iframe"];
if(f){
return i$.hasClass(f.document.body,"info-mode");
}
return false;
};
_1.getContextPath=function(){
return _1.contextPath;
};
_1.setContextPath=function(cp){
_1.contextPath=cp;
};
_1.getContentSettings=function(){
return _1._pznContentSettings;
};
_1.getDialogNavigator=function(){
if(!_1._pznDialogNavigator){
_1._pznDialogNavigator=new PznDialogNavigator();
}
return _1._pznDialogNavigator;
};
_1.getContentOptions=function(){
if(_1._contentOptions==null){
_1._contentOptions=[{text:_1.escapeHTML(_1.nls["content_specified_opt"])},{text:_1.escapeHTML(_1.nls["content_contextual_opt"])},{text:_1.escapeHTML(_1.nls["content_targeted_opt"])}];
}
return _1._contentOptions;
};
_1.isContentEdited=function(){
return _1._contentEdited;
};
_1.refreshContentSettingsNavigation=function(){
var cs=_1.getContentSettings();
var _b=_1.getDialogNavigator();
if(cs&&_b){
if(cs.isSpecified()){
_b.showSpecified();
}else{
if(cs.isContextual()){
_b.showContextual();
}else{
if(cs.isTargeted()){
_b.showTargeted();
}
}
}
}
};
_1.getContextualContentId=function(){
return _1._componentId;
};
_1.renderContentTitle=function(_c){
if(!_c.divId){
return;
}
var d=i$.byId(_c.divId);
if(!d){
return;
}
var _d=[],_e=_c.wcmContentProps,_f=_e&&_e.getId();
_d.push("<div class=\"pznHeader\">");
_d.push("<img id=\"",_c.divId,"_contentItemIcon_img\" alt=\"\" src=\"",_1.getContextPath(),"/images/blank.gif\" class=\"");
if(_f&&PznContentSettings.isLrpId(_f)){
_d.push("pznDialogIconLRPContentLarge");
}else{
_d.push("pznDialogIconWcmContentLarge");
}
_d.push(" pznDialogTitleIcon lotusLeft\">");
_d.push("<div class=\"pznDialogContentItemTitle\">");
_d.push("<span id=\"",_c.divId,"_pznDialog_title\" class=\"pznDialogBoldFont pznDialogFontComputed18px\">");
if(_e){
var _10="message_targeting_content_not_found";
if(_e.isAvailable()){
_d.push(_1.escapeHTML(_e.getTitle()));
_1.hideMessage(_10);
}else{
_1.displayMessage(_1.escapeHTML(_1.nls[_10]),_1.MSG_TYPE_ERROR,_10);
}
}
_d.push("</span>");
if(_1.getDialogNavigator().isShowingContextual()){
_d.push("<span class=\"pznDialogFontComputed11px pznDialogGreyText\">&nbsp;&nbsp;",_1.escapeHTML(_1.nls["contextual_in_parentheses"]),"</span>");
}
if(_f&&!PznContentSettings.isLrpId(_f)){
_d.push("<br/>");
_d.push("<span class=\"pznDialogGreyText pznDialogFontComputed11px\">");
var ws=_e.getWorkflowState();
if(ws){
_d.push(ws);
}
if(_e.getWorkflowStage()){
if(ws){
_d.push("&nbsp;&nbsp;|&nbsp;&nbsp;");
}
_d.push(_1.escapeHTML(_1.nls["workflow_stage"]),"&nbsp;",_e.getWorkflowStage().getTitle());
}
_d.push("</span>");
}
if(_1.isInfoMode()){
if(_c.desc){
_d.push("<br/>");
_d.push("<h3 class=\"pznDescription pznDialogElementDisplayInline\">",_c.desc,"</h3>");
}
if(_c.learnMoreUrl){
_d.push("&nbsp;<a id=\"",_c.learnMoreId,"\" class=\"pznDialogFontComputed11px pznDialogBlueLink pznDialogNoWrapText\" href=\"\" ");
_d.push("onclick=\"PznUIUtils.openLearnMoreWindow('",_c.learnMoreUrl,"'); return false;\">");
_d.push(_1.escapeHTML(_1.nls["learn_more"]),"</a>");
}
}
_d.push("</div>");
_d.push("<div class=\"lotusClear\"></div>");
_d.push("</div>");
d.innerHTML=_d.join("");
};
_1.renderButtons=function(_11,_12){
var _13=null,bt="<input id=\"$id\" type=\"button\" value=\"$value\" title=\"$value\" role=\"button\" class=\"lotusBtn pznDialogBtn\" onclick=\"$onclick\" />",out=[],_14=null,_15=null,nav=_1.getDialogNavigator();
if(_11){
_15=_11.getId();
if(!PznContentSettings.isLrpId(_15)){
_14=bt.replace(/\$value/g,_1.escapeHTML(_1.nls["replace_btn"])).replace("$onclick","PznUIUtils.openContentSelector(true);return false;");
}
}
if(nav.isShowingSpecified()){
_13=i$.byId("pznSpecifiedContentBtns");
if(!_11){
out.push(bt.replace("$id","pznSpecifiedContentSetBtn").replace(/\$value/g,_1.escapeHTML(_1.nls["set_content_item"])).replace("$onclick","PznUIUtils.openContentSelector(false);return false;"));
}else{
if(_14){
out.push(_14.replace("$id","pznSpecifiedContentReplaceBtn"));
}
}
}else{
if(nav.isShowingContextual()){
_13=i$.byId("pznContextualContentBtns");
}else{
if(nav.isShowingTargetedSpot()){
_13=i$.byId("pznTargetedSpotBtns");
out.push(bt.replace("$id","pznTargetedAddContentBtn").replace(/\$value/g,_1.escapeHTML(_1.nls["add_content_target_btn"])).replace("$onclick","PznUIUtils.openAddContentTargetDialog();return false;"));
out.push(bt.replace("$id","pznTargetedHideSpotBtn").replace(/\$value/g,_1.escapeHTML(_1.nls["hide_spot_btn"])).replace("$onclick","PznUIUtils.addNewTargetedItem(PznContentSettings.HIDDEN_SPOT_ID);return false;"));
}else{
if(nav.isShowingEditTargetedItem()){
_13=i$.byId("pznTargetItemEditBtns");
if(_14){
out.push(_14.replace("$id","pznTargetItemReplaceBtn"));
}
var cep=nav.getCurrentTargetedItemEditPosition();
if(cep!=null&&cep!=PznWCMConstants.DEFAULT){
out.push(bt.replace("$id","pznTargetItemDeleteBtn").replace(/\$value/g,_1.escapeHTML(_1.nls["delete_targeted_item_btn"])).replace("$onclick","PznUIUtils.deleteTargetedContentItem("+cep+");PznUIUtils.getDialogNavigator().showTargeted();return false;"));
}
var _16=_15;
if(_11.isPageDefault()){
_16=PznContentSettings.PAGE_DEFAULT_CONTENT_ID;
}
out.push(bt.replace(/\$value/,_1.escapeHTML(_1.nls["more_btn"])+"&nbsp;&#9660;").replace(/\$value/,_1.escapeHTML(_1.nls["more_btn"])).replace("$onclick","PznUIUtils.showTagertedItemMoreMenu(this,event,'"+_16+"');return false;").replace("$id","pznTargetItemMoreBtn").replace("role=\"button\""," tabindex=\"0\" onkeydown=\"return PznUIUtils.showTagertedItemMoreMenu(this,event,'"+_16+"');\" aria-haspopup=\"true\" aria-owns=\"pznDialogPopupMenuItemsContainer\""));
}
}
}
}
if(_13){
i$.addClass(_13,"pznDialogDefaultMarginTop");
_13.innerHTML=out.join(" ");
}
};
_1.renderTabPanelControls=function(_17,_18){
var _19=i$.byId(_17);
if(_19){
_19.innerHTML="";
}
var _1a=null;
if(_18){
_1a=_18.getId();
}
var nav=_1.getDialogNavigator(),sC=nav.isShowingContextual(),sS=nav.isShowingSpecified(),_1b=nav.isShowingEditTargetedItem(),_1c=PznContentSettings.isLrpId(_1a);
if(_1b){
var cep=_1.getDialogNavigator().getCurrentTargetedItemEditPosition();
if(_1c&&cep==PznWCMConstants.DEFAULT){
return;
}
}
if(!_19||(_1c&&(sC||sS))){
return;
}
if(this.lastDiv){
this.lastDiv.innerHTML="";
}
this.lastDiv=_19;
var tct=["<td class=\"pznDialogPanelTab pznDialogPanelTabWithControl $classes\">","<a id=\"$id\" href=\"\"","onmouseover=\"PznTargetedItemEdit.tabMoused(this);\"","onmouseout=\"PznTargetedItemEdit.tabMoused(this);\"","onclick=\"PznTargetedItemEdit.tabClicked(this);return false;\"","><span class=\"pznDialogElementDisplayBlock\">$tabLabel</span>","</a></td>"].join(" ");
var tlf="<td><div class=\"pznDialogPanelTabLineFiller\">&nbsp;</div></td>";
out=["<div id=\"",_17,"Ctrls\" class=\"pznDialogPanelTabsContainer\">"];
out.push("<table class=\"pznDialogPanelTabsTable pznDialogDefaultMarginTop\" role=\"presentation\" cellspacing=\"0\" cellpadding=\"0\"><tr>");
if(_1b){
out.push(tct.replace("$classes","pznDialogPanelTabActive").replace("$id","pznDialogPanelTabSegmentsLink").replace("$tabLabel",_1.escapeHTML(_1.nls["segments_tab_btn"])));
if(!_1c){
out.push(tct.replace("$classes","").replace("$id","pznDialogPanelTabDetailsLink").replace("$tabLabel",_1.escapeHTML(_1.nls["details_tab_btn"])));
}
out.push(tlf);
}else{
if(sC||sS){
out.push(tct.replace("$classes","pznDialogPanelTabActive").replace("$id","pznDialogPanelTabDetailsLink").replace("$tabLabel",_1.escapeHTML(_1.nls["details_tab_btn"])));
out.push(tlf);
}
}
out.push("</tr></table></div>");
i$.addClass(_19,"pznDialogDefaultMarginTop");
_19.innerHTML=out.join("");
};
_1.renderContentProperties=function(_1d,_1e){
var d=i$.byId(_1e);
if(!d||!_1d||!_1d.isAvailable()||PznContentSettings.isLrpId(_1d.getId())){
if(d){
d.innerHTML="";
}
return;
}
if(_1d){
var ht="<div class=\"pznDialogContentPropertiesHeading\"><div></div><span>$label&nbsp;</span></div>";
var pt="<div class=\"pznDialogContentProperty $propClass\" $other ><div class=\"pznDialogContentPropertyText\"><span class=\"pznDialogPropertyLabel\">$label</span>$value</div>$actions</div>";
var at="<a href=\"\" alt=\"$alt\" class=\"pznDialogContentPropertyAction pznDialogBlueLink pznDialogFontComputed11px lotusRight\" onclick=\"$onclick\"><span class=\"pznDialogContentPropertyActionCtrl\">$label</span></a>";
var _1f="<img id=\"$buttonid\" src=\""+_1.getContextPath()+"/images/blank.gif"+"\" alt=\"\" class=\"pznDialogContentPropertyEditImg\" >";
var _20=function(_21){
var m=pt.replace(/\$label/g,_21.label).replace("$value",_21.value);
if(_21.action){
m=m.replace("$propClass","pznDialogMouseHighlight").replace("$actions",at.replace("$label",_21.action.label).replace("$onclick","").replace(/\$alt/g,_21.action.alt)).replace("$other","onclick=\""+_21.action.script+"\" role=\"link\"");
}else{
m=m.replace("$propClass","pznDialogNoMouseHighlight").replace("$actions","").replace("$other","");
}
return m;
};
var _22=_1d.getOther();
var out=[];
var v="";
out.push("<div class=\"pznDialogPropertiesList pznDialogFontComputed12px\">");
out.push(ht.replace("$label",_1.escapeHTML(_1.nls["templates_section_title"])));
out.push(_20({label:_1.escapeHTML(_1.nls["content_title_field"]),value:_1d.getTitle(),action:{label:_1f.replace("$buttonid",_1e+"_edit_content"),script:"PznUIUtils.openContentEditor('"+_1d.getId()+"');return false;",alt:_1.escapeHTML(_1.nls["edit_btn"])}}));
var _23=_1d.getAuthoringTemplate();
if(_23&&_23.getTitle()){
var _24=_1.AuthoringTemplateEditorPOCURL+_23.getId(),_25=_1.escapeHTML(_1.nls["edit_authoring_template_dialog_title"])+"&nbsp;"+_23.getTitle();
var _26={label:_1.escapeHTML(_1.nls["auth_template_field"]),value:_23.getTitle(),action:{label:_1f.replace("$buttonid",_1e+"_edit_auth_template"),script:"PznUIUtils.openDialog({url:'"+_24+"',title:'"+_25+"',callbackFn:PznUIUtils.dialogContentEdit});return false;",alt:_1.escapeHTML(_1.nls["edit_btn"])}};
out.push(_20(_26));
}
out.push(ht.replace("$label",_1.escapeHTML(_1.nls["edits_section_title"])));
if(_22&&_22.getDateLastModified()){
out.push(_20({label:_1.escapeHTML(_1.nls["last_updated_field"]),value:_22.getDateLastModified()}));
}
if(_22&&_22.getDateCreated()){
out.push(_20({label:_1.escapeHTML(_1.nls["create_date_field"]),value:_22.getDateCreated()}));
}
if(_1d.getAuthorName()){
out.push(_20({label:_1.escapeHTML(_1.nls["author_field"]),value:_1d.getAuthorName()}));
}
if(_1d.getWorkflow()&&_1d.getWorkflow().getTitle()){
v=_1d.getWorkflow().getTitle();
}else{
v=_1.escapeHTML(_1.nls["property_value_none"]);
}
out.push(_20({label:_1.escapeHTML(_1.nls["workflow_field"]),value:v}));
if(_1d.getWorkflowStage()){
var t=_1d.getWorkflowStage().getTitle();
if(t){
v=t;
}else{
v=_1.escapeHTML(_1.nls["property_value_none"]);
}
out.push(_20({label:_1.escapeHTML(_1.nls["workflow_stage_field"]),value:v}));
}
out.push(ht.replace("$label",_1.escapeHTML(_1.nls["location_section_title"])));
var v=_1.escapeHTML(_1.nls["property_value_none"]);
if(_22&&_22.getLocation()){
v=_22.getLocation();
}
out.push(_20({label:_1.escapeHTML(_1.nls["location_field"]),value:v.replace(/&nbsp;/g," ")}));
if(_1d.getProject()){
v=_1d.getProject().getTitle();
}else{
v=_1.escapeHTML(_1.nls["property_value_none"]);
}
out.push(_20({label:_1.escapeHTML(_1.nls["project_field"]),value:v}));
out.push("</div>");
d.innerHTML=out.join("");
}
};
_1.isAppearanceDefault=function(){
var cs=_1.getContentSettings();
if(cs&&(cs.getPresentationTemplateId()||cs.getComponentId())){
return false;
}
return true;
};
_1.renderContentAppearance=function(_27){
if(!_27){
return;
}
var d=i$.byId(_27);
if(!d){
return;
}
var o=null,_28="",out=[],cs=_1.getContentSettings(),_29={},_2a=[];
_2a.push("<a id=\"pznDialogReplaceWithMenuSelected\" href=\"\" ");
_2a.push("aria-haspopup=\"true\"  aria-owns=\"pznDialogPopupMenuItemsContainer\" tabindex=\"0\" onkeydown=\"return PznUIUtils.showAppearanceMenu(this,event,'",_27,"');\" ");
_2a.push("onclick=\"PznUIUtils.showAppearanceMenu(this,event,'",_27,"');return false;\" ");
_2a.push(" >");
_2a.push("<span class=\"pznDialogAppearance pznDialogElementDisplayBlock\">");
if(cs.getPresentationTemplateId()){
o=new PznWCMOther(cs.getPresentationTemplateId());
_28=_1.PresentationTemplateEditorPOCURL;
_2a.push("<img id=\"",_27,"_presentationTemplateIcon_img\" alt=\"\" src=\"",_1.getContextPath(),"/images/wcm_presentation_template_18.png\" class=\"lotusLeft pznDialogElementBgImageNone\">");
}else{
if(cs.getComponentId()){
o=new PznWCMOther(cs.getComponentId());
_28=_1.ComponentEditorPOCURL;
_2a.push("<img id=\"",_27,"_appearanceIcon_img\" alt=\"\" src=\"",_1.getContextPath(),"/images/blank.gif\" class=\"pznDialogComponentAppearanceIcon lotusLeft\">");
}else{
_2a.push("<img id=\"",_27,"_presentationTemplateIcon_img\" alt=\"\" src=\"",_1.getContextPath(),"/images/wcm_presentation_template_18.png\" class=\"lotusLeft pznDialogElementBgImageNone\">");
}
}
_2a.push("<span class=\"pznLabel pznDialogGreyText pznDialogFontComputed12px pznDialogBoldFont\">",_1.escapeHTML(_1.nls["appearance_field"]),"</span>");
_2a.push("<span id=\"pznDialogCurrentAppearance_",_27,"\" class=\"pznDialogDefaultColorText pznDialogFontComputed12px\">");
if(o){
_2a.push(_1.escapeHTML(o.getTitle()));
}else{
if(cs.getType()==PznContentSettings.TYPE_SUMMARY){
_2a.push(_1.escapeHTML(_1.nls["appearance_summary"]));
}else{
_2a.push(_1.escapeHTML(_1.nls["appearance_default_cf05"]));
}
}
_2a.push("&nbsp;<img id=\"",_27,"_dropDownIcon_img\" src=\"",_1.getContextPath(),"/images/blank.gif\" alt=\"\" class=\"pznDialogDropDownIcon\"><span aria-hidden=\"true\" class=\"lotusAltText\">&#9660;</span>");
_2a.push("</span>");
_2a.push("<div class=\"lotusClear\"></div>");
_2a.push("</span>");
_2a.push("</a>");
_29.mainLink=_2a.join("");
_2a.length=0;
_29.controlLinks=[];
if(_1.isInfoMode()){
_2a.push("<a id=\"pznDialogHelp_appearance\" href=\"\" class=\"pznDialogBlueLink\" onclick=\"PznUIUtils.openPopupHelp(this, '",_27,"');return false;\" aria-labelledby=\"",_27,"_help12_img\" aria-haspopup=\"true\" role=\"button\">");
_2a.push("<span class=\"\"><img id=\"",_27,"_help12_img\" class=\"pznDialogElementBgImageNone\" src=\"",_1.getContextPath(),"/images/");
if(_1._locale&&_1._locale.indexOf("ar")==0){
_2a.push("Help12_ar.png");
}else{
_2a.push("Help12.png");
}
_2a.push("\" alt=\"",_1.escapeHTML(_1.nls["pzn_popup_help_appearance"]),"\"></span></a>");
_29.controlLinks.push(_2a.join(""));
}
_2a.length=0;
if(o){
_2a.push("<a href=\"\" alt=\"",_1.escapeHTML(_1.nls["edit_btn"]),"\" class=\"pznDialogBlueLink\" onclick=\"PznUIUtils.openAppearanceEditor('",_28,"','",o.getId(),"');return false;\">");
_2a.push("<span class=\"\"><img id=\"",_27,"_edit_presnt_template\" src=\"",_1.getContextPath(),"/images/blank.gif"+"\" alt=\"\" class=\"pznDialogContentPropertyEditImg\" ></span></a>");
_29.controlLinks.push(_2a.join(""));
}
d.innerHTML=_1.getLinkControlMarkup(_29);
};
_1.getLinkControlMarkup=function(_2b){
var cl=_2b.controlLinks,out=["<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\" class=\"pznDialogLinkControlTable pznDialogMouseHighlight pznDialogElementDisplayBlock\"><tr>"];
out.push("<td style=\"width:100%\">");
out.push(_2b.mainLink);
out.push("</td>");
if(cl&&cl.length>0){
var l=_2b.controlLinks.length;
for(var i=0;i<l;i++){
out.push("<td>");
out.push("<div class=\"pznDialogSubLink pznDialogContentProperty\" >");
out.push(_2b.controlLinks[i]);
out.push("</div>");
out.push("</td>");
}
}else{
out.push("<td class=\"pznDialogCursorPointer\">&nbsp;</td>");
}
out.push("</tr></table>");
return out.join("");
};
_1.showPopupMenu=function(_2c,_2d,_2e,_2f,_30,_31,_32){
if(_2e.keyCode&&_1.isItemHidden(_1.EL_DIALOG_POPUP_MENU)){
if(_2e.keyCode!=13&&_2e.keyCode!=40&&(!(_2e.altKey&&_2e.keyCode==40))){
return false;
}
}
PznDialogPopupMenu.getInstance().show(_2c,_2d,_2e,_2f,_30,_31,_32);
_1.resize();
return true;
};
_1.hidePopupMenu=function(){
PznDialogPopupMenu.getInstance().hide(true);
};
_1.showAppearanceMenu=function(_33,_34,_35){
if(!_1.isMenuAvailable(_34)){
return false;
}
var _36=i$.byId("pznDialogPopupMenuItemsContainer");
if(_36){
_36.setAttribute("role","listbox");
}
var _37=null,cs=_1.getContentSettings(),_38=[{text:_1.escapeHTML(_1.nls["appearance_default_opt_cf05"]),selected:(cs.getType()==PznContentSettings.TYPE_CONTENT)},{text:_1.escapeHTML(_1.nls["appearance_summary_opt"]),selected:(cs.getType()==PznContentSettings.TYPE_SUMMARY)},{text:_1.escapeHTML(_1.nls["appearance_component_opt"]),selected:(cs.getType()==PznContentSettings.TYPE_COMPONENT)},{text:_1.escapeHTML(_1.nls["appearance_template_opt_cf05"]),selected:(cs.getType()==PznContentSettings.TYPE_ALTERNATE)}];
var _39=_1.showPopupMenu(_33,_38,_34,function(_3a){
var cs=_1.getContentSettings();
if(cs){
if(_3a==0){
cs.setPresentationTemplateId(null);
cs.setComponentId(null);
cs.setType(PznContentSettings.TYPE_CONTENT);
}else{
if(_3a==1){
cs.setPresentationTemplateId(null);
cs.setComponentId(null);
cs.setType(PznContentSettings.TYPE_SUMMARY);
}else{
if(_3a==2){
var sid=_1.openComponentSelection();
}else{
if(_3a==3){
var sid=_1.openPresentationTemplateSelection();
}
}
}
}
_1.renderContentAppearance(_35);
}
},{x:-80},_37,{positionAt:i$.byId("pznDialogCurrentAppearance_"+_35)});
return !_39;
};
_1.showFilterMenu=function(_3b,_3c,_3d){
if(!_1.isMenuAvailable(_3c)){
return false;
}
var _3e=i$.byId("pznDialogPopupMenuItemsContainer");
if(_3e){
_3e.setAttribute("role","listbox");
}
var _3f=null,_40=_1.getSegmentFilterOptions();
var _41=_1.showPopupMenu(_3b,_40,_3c,function(_42){
_1.handleFilterChange(_42);
SegmentSelector.doTypeAhead();
},{x:-20},_3f,{positionAt:i$.byId("pznDialogCurrentAppearance_"+_3d),multiSelect:true});
return !_41;
};
_1.handleFilterChange=function(_43){
var _44=SegmentSelector.getNonManagedFilterIndex();
var _45=SegmentSelector.getManagedFilterIndex();
var _46=SegmentSelector.haveManagedSegments()&&SegmentSelector.haveNonManagedSegments();
var _47=SegmentSelector.haveManagedSegments()&&!SegmentSelector.haveNonManagedSegments();
var _48=!SegmentSelector.haveManagedSegments()&&SegmentSelector.haveNonManagedSegments();
var _49=_46&&_43==0;
var _4a=(_46&&_43>0&&_43<_1.getSegmentFilterOptions().length-1)||(_47)||false;
if(_49){
var _4b=PznDialogPopupMenu.getInstance().isSelected(_43);
for(var i=0;i<_1.getSegmentFilterOptions().length;i++){
PznDialogPopupMenu.getInstance().select(i,!_4b);
}
}else{
if(_4a){
if(!_47){
PznDialogPopupMenu.getInstance().unSelect(0);
}
var _4b=PznDialogPopupMenu.getInstance().isSelected(_45);
if(_43==_45){
if(SegmentSelector.filterOptions&&SegmentSelector.filterOptions.length>0&&_45>=0){
var _4c=SegmentSelector.filterOptions[_45].getChildrenIndices();
i$.each(_4c,function(_4d){
PznDialogPopupMenu.getInstance().select(_4d,!_4b);
});
}
PznDialogPopupMenu.getInstance().select(_43);
}else{
PznDialogPopupMenu.getInstance().select(_43);
PznDialogPopupMenu.getInstance().unSelect(_45);
}
}else{
PznDialogPopupMenu.getInstance().select(_43);
var _4e=false;
if(SegmentSelector.filterOptions&&SegmentSelector.filterOptions.length>0&&_45>=0){
_4c=SegmentSelector.filterOptions[_45].getChildrenIndices();
_4e=i$.every(_4c,function(_4f){
return PznDialogPopupMenu.getInstance().isSelected(_4f);
});
}
if(!_4e){
PznDialogPopupMenu.getInstance().unSelect(_45);
}else{
if(!PznDialogPopupMenu.getInstance().isSelected(_45)){
PznDialogPopupMenu.getInstance().select(_45);
}
}
if(_43==_44){
if(_46){
_1.toggleSegment(PznDialogPopupMenu.getInstance().isSelected(_44)&&PznDialogPopupMenu.getInstance().isSelected(_45),0);
}else{
if(_48){
_1.toggleSegment(PznDialogPopupMenu.getInstance().isSelected(_44),0);
}else{
if(_47){
_1.toggleSegment(PznDialogPopupMenu.getInstance().isSelected(_45),0);
}
}
}
}
}
}
};
_1.toggleSegment=function(_50,_51){
if(_50){
PznDialogPopupMenu.getInstance().select(_51);
}else{
PznDialogPopupMenu.getInstance().unSelect(_51);
}
};
_1.getSegmentFilterOptions=function(){
return _1._segFilterOptions;
};
_1.clearSegmentFilterOptions=function(){
return _1._segFilterOptions=[];
};
_1.addSegmentFilterOption=function(_52,_53){
if(_53){
_1._segFilterOptions.push({text:_1.escapeHTML(_52),parentIndex:_1.getIndexOfFilterOption(_53)});
}else{
_1._segFilterOptions.push({text:_1.escapeHTML(_52)});
}
};
_1.getIndexOfFilterOption=function(_54){
for(var i=0;i<_1._segFilterOptions.length;i++){
if(_1._segFilterOptions[i].text==_54){
return i;
}
}
return -1;
};
_1.isMenuAvailable=function(_55){
if(i$.isFF&&_55.type=="click"&&_55.timeStamp==0){
return false;
}
return true;
};
_1.showContentMenu=function(_56,_57){
if(!_1.isMenuAvailable(_57)){
return false;
}
var _58=_1.getContentOptions(),nav=_1.getDialogNavigator();
for(var i=0;i<_58.length;i++){
_58[i].selected=false;
}
if(nav.isShowingSpecified()){
_58[0].selected=true;
}else{
if(nav.isShowingContextual()){
_58[1].selected=true;
}else{
if(nav.isShowingTargeted()){
_58[2].selected=true;
}
}
}
var _59=_1.showPopupMenu(_56,_58,_57,function(_5a){
if(_5a==0){
nav.showSpecified();
}else{
if(_5a==1){
nav.showContextual();
}else{
if(_5a==2){
nav.showTargeted();
}
}
}
},null,null,{positionAt:i$.byId("pznContentDisplayedStr")});
return !_59;
};
_1.showTagertedItemMoreMenu=function(_5b,_5c,_5d){
if(!_1.isMenuAvailable(_5c)){
return false;
}
var _5e=null;
var cs=_1.getContentSettings(),_5f,_60=PznContentSettings.isLrpId(_5d),_61=[{text:_1.escapeHTML(_1.nls["hide_spot_opt"])},{text:_1.escapeHTML(_1.nls["use_page_default_opt"])}],_62=cs.getRuleDataObject().getEditModeProfile(),_63=_62.getConditions(),_64=cs.isChanged()||_62.isChanged(),_65=_62.getPosition()==PznWCMConstants.DEFAULT;
var _66=i$.byId("pznTargetItemMoreBtn");
_66.setAttribute("role","combobox");
if(_60){
if(_5d==PznContentSettings.HIDDEN_SPOT_ID){
_61[0].selected=true;
}else{
if(_5d==PznContentSettings.PAGE_DEFAULT_CONTENT_ID){
_61[1].selected=true;
}
}
_61.push({text:_1.escapeHTML(_1.nls["select_content_opt"])});
}
if(_65||(_63&&_63.length>0)){
if(_64){
_5f=_1.escapeHTML(_1.nls["targeted_save_show_page"]);
}else{
_5f=_1.escapeHTML(_1.nls["targeted_show_page"]);
}
_61.push({text:_5f,separator:true});
}
var nav=_1.getDialogNavigator(),_67=_1.showPopupMenu(_5b,_61,_5c,function(_68){
if(_68==0){
_1.setContentItem(PznContentSettings.HIDDEN_SPOT_ID);
}else{
if(_68==1){
_1.setContentItem(PznContentSettings.PAGE_DEFAULT_CONTENT_ID);
}else{
if(_68==2){
if(_60){
_1.openContentSelector(true);
}else{
_1.showOnPage(_5d);
}
}else{
if(_68==3&&_60){
_1.showOnPage(_5d);
}
}
}
}
},{x:-16},_5e);
return !_67;
};
_1.showOnPage=function(_69){
var _6a=_1.getPreviewContentUrl(_69,_1._portletWindowId,_1._portletPageId),cs=_1.getContentSettings();
if(_1.saveEditModeProfile()){
cs.save(function(_6b){
});
}
window.onbeforeunload=null;
if(i$.isIE&&i$.isIE<10){
_1.getViewAreaWindow().location=_6a;
}else{
window.top.location=_6a;
}
};
_1.getPreviewContentUrl=function(_6c,_6d,_6e){
var _6f=(i$.isIE&&i$.isIE<10)?_1.getViewAreaWindow().location.href:window.top.location.href,_70=(_6f.indexOf("?")>-1)?"&":"?",url=[_6f,_70,"uri=ctpreview:"];
if(_6c){
url.push("ITEM:",_6c);
}else{
url.push("NONE");
}
url.push("&portletWindowId=",_6d,"&pageId=",_6e);
return url.join("");
};
_1.getViewAreaWindow=function(){
wu=i$.fromPath("wpModules.theme.WindowUtils");
if(wu){
result=wu.getWindow(wu.VIEW_AREA);
}else{
result=window;
}
return result;
};
_1.deleteTargetedContentItem=function(_71){
var rd=_1.getContentSettings().getRuleDataObject();
if(rd){
var r=rd.removeProfile(_71);
if(r){
return _1.updateRuleData();
}
}
return false;
};
_1.moveTargetedContentItem=function(_72,_73){
var rd=_1.getContentSettings().getRuleDataObject();
if(rd){
if(rd.moveProfile(_72,_73)){
return _1.updateRuleData();
}
}
return false;
};
_1.updateRuleData=function(){
var rd=_1.getContentSettings().getRuleDataObject();
if(rd){
_1.getContentSettings().setRuleData(rd);
_1.getDialogNavigator().updateContentAreas();
return true;
}
return false;
};
_1.saveEditModeProfile=function(){
var cs=_1.getContentSettings();
var rdo=cs.getRuleDataObject();
if(rdo){
var emp=rdo.getEditModeProfile();
if(emp){
if(emp.isChanged()){
cs.setChanged(true);
}
return rdo.saveEditModeProfile();
}
}
return false;
};
_1.discardEditModeProfile=function(){
var cs=_1.getContentSettings();
if(cs.getRuleDataObject()){
if(cs.getRuleDataObject().getEditModeProfile()){
cs.getRuleDataObject().discardEditModeProfile();
return true;
}
}
return false;
};
_1.openAppearanceEditor=function(_74,id){
id=PznWCMContent.removeValuePrefix(id);
_1.openDialog({url:_74+id,title:"&nbsp;",callbackFn:_1.dialogContentEdit});
};
_1.openDialog=function(_75){
var _76,w=window;
i$.xhrGet({url:_1.PznProfilerAliveUrl,responseType:"text",sync:true}).then(function(v){
if(!_75.window){
_75.window=top;
}
if(typeof _75.modal=="undefined"){
_75.modal=true;
}
if(typeof _75.autoResize=="undefined"){
_75.autoResize=true;
}
_76=new wpModules.dialog.Dialog(_75);
_76.open();
},function(e){
w.onbeforeunload=undefined;
_1.xhrJsonError({error:e,message:"Error session has timed out"});
});
return _76;
};
_1.displayMessage=function(_77,_78,id){
var _79="";
var _7a="";
var _7b="";
if(!_78||_78==_1.MSG_TYPE_ERROR){
_79="";
_7a="lotusIconMsgError";
_7b=_1.escapeHTML(_1.nls["error_alt_text"]);
}else{
if(_78==_1.MSG_TYPE_INFO){
_79="lotusInfo";
_7a="lotusIconMsgInfo";
_7b=_1.escapeHTML(_1.nls["info_alt_text"]);
}else{
if(_78==_1.MSG_TYPE_WARNING){
_79="lotusWarning";
_7a="lotusIconMsgWarning";
_7b=_1.escapeHTML(_1.nls["warning_alt_text"]);
}else{
if(_78==_1.MSG_TYPE_SUCCESS){
_79="lotusSuccess";
_7a="lotusIconMsgSuccess";
_7b=_1.escapeHTML(_1.nls["success_alt_text"]);
}
}
}
}
var _7c=[];
_7c.push("<div class=\"lotusMessage2 ",_79,"\">");
_7c.push("<img id=\"alertImg\" alt=\"",_7b,"\" src=\"",_1.getContextPath(),"/images/blank.gif\" class=\"lotusIcon ",_7a,"\">");
_7c.push("<span class=\"lotusAltText\">",_7b,":</span>");
_7c.push("<div class=\"lotusMessageBody\" >",_77,"</div>");
_7c.push("<a id=\"alert_close_link\" title=\"",_1.escapeHTML(_1.nls["close_alt_text"]),"\" role=\"button\" class=\"lotusDelete\" href=\"\" onclick=\"PznUIUtils.hideMessage();return false;\">");
_7c.push("<img id=\"alert_close_img\" src=\"",_1.getContextPath(),"/images/blank.gif\" alt=\"",_1.escapeHTML(_1.nls["close_alt_text"]),"\">");
_7c.push("<span class=\"lotusAltText\">X</span>");
_7c.push("</a>");
_7c.push("</div>");
_1.getDialogNavigator().messageDiv.innerHTML=_7c.join("");
_1.showItem(_1.getDialogNavigator().messageDiv);
_1.resize();
if(id){
_1._currentMessageId=id;
}else{
_1._currentMessageId=null;
}
};
_1.hideMessage=function(id){
if(id&&id!=_1._currentMessageId){
return;
}
_1.getDialogNavigator().messageDiv.innerHTML="";
_1.hideItem(_1.getDialogNavigator().messageDiv);
_1.resize();
_1._currentMessageId=null;
};
_1.showHideItem=function(_7d){
var _7e=false;
if(_7d){
if(_1.isItemHidden(_7d)){
_1.showItem(_7d);
_7e=true;
}else{
_1.hideItem(_7d);
}
_1.resize();
}
return _7e;
};
_1.showItem=function(_7f){
if(_7f){
i$.removeClass(_7f,"pznDialogElementDisplayNone");
}
};
_1.hideItem=function(_80){
if(_80){
i$.addClass(_80,"pznDialogElementDisplayNone");
}
};
_1.isItemHidden=function(_81){
if(_81){
return i$.hasClass(_81,"pznDialogElementDisplayNone");
}
};
_1.showTooltip=function(_82,_83){
if(_83){
if(i$.isIE){
_1.showTooltipForIE11(_82,_83);
}else{
var _84=_82.getBoundingClientRect();
console.log("bounds.top = "+_84.top);
_83.style.top=_82.offsetTop-25+"px";
if(_1.isRTL()){
if(_83.children[0]&&i$.hasClass(_83.children[0],"pznSgmntTooltipPointerLeft")){
i$.removeClass(_83.children[0],"pznSgmntTooltipPointerLeft");
i$.addClass(_83.children[0],"pznSgmntTooltipPointerRight");
}
var dlg=i$.query("[class='pznDialogMainContent']");
if(dlg&&dlg.length>0&&dlg[0]){
_83.style.right=(dlg[0].getBoundingClientRect().right-_84.left+10)+"px";
}
}else{
if(_83.children[0]&&i$.hasClass(_83.children[0],"pznSgmntTooltipPointerRight")){
i$.removeClass(_83.children[0],"pznSgmntTooltipPointerRight");
i$.addClass(_83.children[0],"pznSgmntTooltipPointerLeft");
}
_83.style.left=(_84.right+20)+"px";
}
}
_1.showItem(_83);
_83.focus();
}
};
_1.showTooltipForIE11=function(_85,_86){
var obj=_85,rtl=_1.isRTL(),_87=obj.offsetWidth,top=0,_88=0;
if(!isNaN(obj.offsetHeight)){
top+=obj.offsetHeight;
}
while(obj&&!isNaN(obj.offsetTop)&&!isNaN(obj.offsetLeft)){
top+=obj.offsetTop-obj.scrollTop;
_88+=obj.offsetLeft-obj.scrollLeft;
obj=obj.offsetParent;
}
var pr;
if(rtl){
pr=_88+_87;
_88=pr-_86.offsetWidth;
if(_1.isRTL()){
if(_86.children[0]&&i$.hasClass(_86.children[0],"pznSgmntTooltipPointerLeft")){
i$.removeClass(_86.children[0],"pznSgmntTooltipPointerLeft");
i$.addClass(_86.children[0],"pznSgmntTooltipPointerRight");
}
}else{
if(_86.children[0]&&i$.hasClass(_86.children[0],"pznSgmntTooltipPointerRight")){
i$.removeClass(_86.children[0],"pznSgmntTooltipPointerRight");
i$.addClass(_86.children[0],"pznSgmntTooltipPointerLeft");
}
}
}
var _89={x:32,y:-46};
if(_89){
if(_89.x){
_88+=(rtl)?-_89.x:_89.x;
}
if(_89.y){
top+=_89.y;
}
if(top<0){
top=0;
}
if(_88<0){
_88=0;
}
if(pr&&pr<_88+_86.offsetWidth){
_88-=(_88+_86.offsetWidth-pr);
}
}
_86.style.top=(top+7)+"px";
if(rtl){
var dlg=i$.query("[class='pznDialogMainContent']");
if(dlg&&dlg.length>0&&dlg[0]){
_88=(dlg[0].getBoundingClientRect().right-_88+10);
}
_86.style.right=_88+"px";
}else{
_86.style.left=_88+"px";
}
};
_1.hideTooltip=function(_8a,_8b){
if(_8b){
_1.hideItem(_8b);
}
};
_1.resize=function(){
_1.initWidth();
if(window.resize){
window.resize();
}
};
_1.initWidth=function(){
if(!_1._langWidthSet){
var _8c=_1._locale,_8d=window.resize,_8e=380;
if(!_8c){
return;
}
if(_8c.indexOf("de")==0){
_8e=420;
}else{
if(_8c.indexOf("el")==0){
_8e=425;
}
}
if(_8d){
_8d({width:_8e});
_1._langWidthSet=true;
}else{
var _8f=_1.getIframe();
if(_8f){
_8f.style.width=_8e+"px";
i$.addOnLoad(function(){
window.setTimeout(function(){
_1.resize();
},10);
},window);
}
}
}
};
_1.setContentItem=function(id){
var nav=_1.getDialogNavigator();
if(id&&id!=""){
if(nav.isShowingSpecified()){
ok=_1.getContentSettings().setContentId(id);
nav.updateContentAreas();
}else{
if(nav.isShowingTargeted()){
_1.getContentSettings().getRuleDataObject().getEditModeProfile().setName(id);
nav.updateContentAreas();
}
}
}else{
_1.displayMessage(_1.escapeHTML(_1.nls["message_invalid_content_selection"]),_1.MSG_TYPE_WARNING);
}
};
_1.dialogContentEdit=function(dr){
_1._contentEdited=true;
_1.getDialogNavigator().updateContentAreas();
};
_1.dialogDefaultTargetedContentSelection=function(dr){
if(dr&&dr[0]){
if(dr[0].selectedId){
var rd=_1.getContentSettings().getRuleDataObject();
if(!rd){
rd=PznRuleData.getInstanceWithDefaultTemplate();
}
rd.setOtherwise(dr[0].selectedId);
_1.getContentSettings().setRuleData(rd);
_1.getDialogNavigator().updateContentAreas();
}else{
_1.displayMessage(_1.escapeHTML(_1.nls["message_invalid_content_selection"]),_1.MSG_TYPE_WARNING);
}
}
};
_1.openPresentationTemplateSelection=function(){
var _90=null;
if(_1.getContentSettings().getPresentationTemplateId()!=null){
_90=_1.PresentationTemplateSelectorPOCURL+"&selection="+_1.getContentSettings().getPresentationTemplateId();
}else{
_90=_1.PresentationTemplateSelectorPOCURL;
}
_1.openDialog({url:_90,title:_1.escapeHTML(_1.nls["replace_presentation_template_dialog_title"]),callbackFn:function(dr){
if(dr&&dr[0]&&dr[0].selectedId){
if(_1.getContentSettings().setPresentationTemplateId(dr[0].selectedId)){
_1.getDialogNavigator().updateContentAreas();
}
}
}});
};
_1.openComponentSelection=function(){
var _91=null;
if(_1.getContentSettings().getComponentId()!=null){
_91=_1.ComponentSelectorPOCURL+"&selection="+_1.getContentSettings().getComponentId();
}else{
_91=_1.ComponentSelectorPOCURL;
}
_1.openDialog({url:_91,title:_1.escapeHTML(_1.nls["replace_component_dialog_title"]),callbackFn:function(dr){
if(dr&&dr[0]&&dr[0].selectedId){
if(_1.getContentSettings().setComponentId(dr[0].selectedId)){
_1.getDialogNavigator().updateContentAreas();
}
}
}});
};
_1.openContentEditor=function(_92){
_92=PznWCMContent.removeValuePrefix(_92);
var _93=PznWCMStorage.get(_92);
PznWCMStorage.remove(_92);
_1.openDialog({url:_1.ContentEditorPOCURL+_92,title:_1.escapeHTML(_1.nls["edit_content_dialog_title"])+"&nbsp;"+_93.getTitle(),callbackFn:_1.dialogContentEdit});
};
_1.openContentSelector=function(_94){
var _95=(_1.getContentSettings().getContentId()!=null)?_1.ContentSelectorPOCURL+"&selection="+_1.getContentSettings().getContentId():_1.ContentSelectorPOCURL;
var _96=(_94)?_1.escapeHTML(_1.nls["replace_content_dialog_title"]):_1.escapeHTML(_1.nls["sel_content_item"]);
_1.openDialog({url:_95,title:_96,callbackFn:function(dr){
if(dr&&dr[0]&&dr[0].selectedId){
_1.setContentItem(dr[0].selectedId);
}
}});
};
_1.openAddContentTargetDialog=function(){
_1.openDialog({url:_1.ContentSelectorPOCURL,title:_1.escapeHTML(_1.nls["add_content_target_dialog_title"]),callbackFn:function(dr){
if(dr&&dr[0]&&dr[0].selectedId){
_1.addNewTargetedItem(dr[0].selectedId);
}
}});
};
_1.addNewTargetedItem=function(_97){
_1.getContentSettings().setChanged(true);
_1.getDialogNavigator().showTargetingOverview(_97);
};
_1.openaddcontentDefaultTarget=function(){
_1.openDialog({url:_1.ContentSelectorPOCURL,title:_1.escapeHTML(_1.nls["add_content_target_dialog_title"]),callbackFn:_1.dialogDefaultTargetedContentSelection});
};
_1.openPopupHelp=function(_98,_99){
var o=_1._popupHelpDialog;
if(o!=null){
o.close();
o=null;
}
var od=false,_9a={templateStyle:"help",callbackFn:function(){
_1._popupHelpDialog=null;
},autoPosition:_98,};
if(_99=="pznctSegment"){
_9a.title=_1.escapeHTML(_1.nls["segments_title"]);
_9a.markup=_1.escapeHTML(_1.nls["segments_popup_help"]);
_9a.learnMore={url:_1.learnMoreSegmentsUrl,width:700,height:780};
_9a.metrics={width:200};
od=true;
}else{
if(_99.indexOf("Appearance")>-1){
_9a.title=_1.escapeHTML(_1.nls["pzn_popup_help_appearance"]);
_9a.markup=_1.escapeHTML(_1.nls["appearance_popup_help"]);
_9a.metrics={width:200};
od=true;
}
}
if(od){
_1._popupHelpDialog=_1.openDialog(_9a);
}
};
_1.openLearnMoreWindow=function(_9b){
window.open(_9b,"","location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,height=600,width=800",false);
};
_1.refreshPage=function(_9c){
if(_9c&&_9c.portletWindowId&&_9c.pageId){
if(i$.isIE&&i$.isIE<10){
_1.getViewAreaWindow().location=_1.getPreviewContentUrl(null,_9c.portletWindowId,_9c.pageId);
}else{
window.top.location=_1.getPreviewContentUrl(null,_9c.portletWindowId,_9c.pageId);
}
}else{
if(window.parent){
window.parent.location.reload(true);
}
}
};
_1.closeDialog=function(_9d){
_1._autoClosed=false;
if(_1.isContentEdited()){
if(_9d){
_9d.ctwindow=window;
_9d.refresh=true;
}else{
_9d={refresh:true,ctwindow:window};
}
}
window.closeDialog(_9d);
};
_1.onClose=function(_9e){
var _9f=i$.fromPath(_1.PATH_AUTO_CLOSE_REFRESH,false,window);
if(_9f){
if(_9e){
_9e.refresh=_9f.refresh;
_9e.ctwindow=_9f.ctwindow;
}else{
_9e=_9f;
}
i$.toPath(_1.PATH_AUTO_CLOSE_REFRESH,null,window);
}
if(_9e){
if(_9e.ctwindow){
_9e.ctwindow.onbeforeunload=undefined;
}
if(_9e.refresh){
_1.refreshPage(_9e);
}
}
};
_1.xhrJsonError=function(_a0){
var _a1=_a0.error.xhr.getResponseHeader("Content-Type")||"";
if((_a1.indexOf("text/html")==0)||(_a0.error.xhr.status==401)){
window.setTimeout(function(){
_1.refreshPage();
},0);
}
if(_a0.message&&console){
console.log(_a0.message);
}
};
_1.preventCache=function(_a2){
_a2+=(_a2?"&":"")+"ct.preventCache="+new Date().getTime();
return _a2;
};
})();
(function(){
PznContentSettings=function(_a3){
this.changed=false;
this.confirmCancel=true;
this.confirmNotTargeted=true;
this.pocURL=_a3;
this.ruleDataObj=null;
this.origJson=null;
this.jsonObj=null;
var _a4=this;
_a3=(i$.isIE)?PznUIUtils.preventCache(_a3):_a3;
i$.xhrGet({url:_a3,responseType:"json",sync:true}).then(function(v){
_a4.jsonObj=v.data;
},function(e){
PznUIUtils.xhrJsonError({error:e,message:"Error trying to load the PZN Content Settings feed for content item"});
});
};
PznContentSettings.TYPE_CONTENT="content";
PznContentSettings.TYPE_ELEMENT="element";
PznContentSettings.TYPE_COMPONENT="component";
PznContentSettings.TYPE_SUMMARY="summary";
PznContentSettings.TYPE_ALTERNATE="alternate";
PznContentSettings.MODE_ABS="abs";
PznContentSettings.MODE_RULE="rule";
PznContentSettings.MODE_REL="rel";
PznContentSettings.MODE_CONTEXTUAL="contextual";
PznContentSettings.LISTEN_TO_NONE="none";
PznContentSettings.LISTEN_TO_SELF="self";
PznContentSettings.LISTEN_TO_OTHER="other";
PznContentSettings.HIDDEN_SPOT_ID="LRP:HIDDEN";
PznContentSettings.PAGE_DEFAULT_CONTENT_ID="LRP:DEFAULT";
PznContentSettings.isLrpId=function(id){
return (id==PznContentSettings.HIDDEN_SPOT_ID||id==PznContentSettings.PAGE_DEFAULT_CONTENT_ID);
};
PznContentSettings.prototype={getType:function(){
if(this.jsonObj){
return this.jsonObj.type;
}
return null;
},setType:function(_a5){
if(this.jsonObj.type!=_a5){
this.jsonObj.type=_a5;
this.setChanged(true);
return true;
}
return false;
},getContentMode:function(){
if(this.jsonObj){
return this.jsonObj.contentMode;
}
return null;
},setContentMode:function(_a6){
if(_a6==PznContentSettings.MODE_CONTEXTUAL){
if(this.jsonObj.contentMode!=PznContentSettings.MODE_ABS){
this.jsonObj.contentMode=PznContentSettings.MODE_ABS;
this.jsonObj.relativePath=null;
this.setChanged(true);
}
this.setListenTo(PznContentSettings.LISTEN_TO_OTHER);
}else{
if(_a6==PznContentSettings.MODE_ABS){
if(this.getContentMode()!=PznContentSettings.MODE_ABS){
this.jsonObj.contentMode=PznContentSettings.MODE_ABS;
this.jsonObj.relativePath=null;
this.setChanged(true);
}
this.setListenTo(PznContentSettings.LISTEN_TO_NONE);
}else{
if(_a6==PznContentSettings.MODE_RULE){
if(this.getContentMode()!=PznContentSettings.MODE_RULE){
this.jsonObj.contentMode=PznContentSettings.MODE_RULE;
this.jsonObj.relativePath=null;
this.setChanged(true);
}
this.setListenTo(PznContentSettings.LISTEN_TO_NONE);
}else{
if(_a6==PznContentSettings.MODE_REL){
if(this.getContentMode()!=PznContentSettings.MODE_REL){
this.jsonObj.contentMode=PznContentSettings.MODE_REL;
this.setChanged(true);
}
this.setListenTo(PznContentSettings.LISTEN_TO_NONE);
}
}
}
}
},getContentId:function(){
if(this.jsonObj){
return this.jsonObj.contentId;
}
return null;
},setContentId:function(id){
if(!id||id.length<1){
return false;
}
if(this.jsonObj.contentId!=id){
this.jsonObj.contentId=id;
this.setChanged(true);
}
return true;
},getRelativePath:function(){
if(this.jsonObj){
return this.jsonObj.relativePath;
}
return null;
},setRelativePath:function(rp){
if(this.jsonObj.relativePath!=rp){
this.setContentMode(PznContentSettings.MODE_REL);
this.jsonObj.relativePath=rp;
this.setChanged(true);
return true;
}
return false;
},getRuleDataObject:function(){
if(this.ruleDataObj!=null){
return this.ruleDataObj;
}
if(this.jsonObj&&this.jsonObj.ruleData&&this.jsonObj.ruleData.length>0){
var _a7=i$.fromJson(this.jsonObj.ruleData);
this.ruleDataObj=new PznRuleData(_a7);
return this.ruleDataObj;
}
return null;
},toStringArray:function(_a8){
var _a9=new Array();
var len=_a8.length;
for(var i=0;i<len;i++){
_a9.push(i$.toJson(_a8[i]));
}
return _a9;
},setRuleData:function(_aa){
if(_aa){
if(_aa.toJson){
this.jsonObj.ruleData=_aa.toJson();
this.ruleDataObj=_aa;
this.setChanged(true);
return true;
}else{
this.jsonObj.ruleData=i$.toJson(_aa);
this.setChanged(true);
return true;
}
}
return false;
},getComponentId:function(){
if(this.jsonObj){
return this.jsonObj.componentId;
}
return null;
},setComponentId:function(id){
if(this.jsonObj.componentId!=id){
this.jsonObj.componentId=id;
this.jsonObj.presentationTemplateId=null;
if(id){
this.setType(PznContentSettings.TYPE_COMPONENT);
}
this.setChanged(true);
return true;
}
return false;
},getListenTo:function(){
if(this.jsonObj){
return this.jsonObj.listenTo;
}
return null;
},setListenTo:function(_ab){
if(this.getListenTo()!=_ab){
this.jsonObj.listenTo=_ab;
this.setChanged(true);
}
},getPresentationTemplateId:function(){
if(this.jsonObj){
return this.jsonObj.presentationTemplateId;
}
return null;
},setPresentationTemplateId:function(id){
if(this.jsonObj.presentationTemplateId!=id){
this.jsonObj.presentationTemplateId=id;
if(id){
this.setType(PznContentSettings.TYPE_ALTERNATE);
}
this.jsonObj.componentId=null;
this.setChanged(true);
return true;
}
return false;
},getElementName:function(){
if(this.jsonObj){
return this.jsonObj.elementName;
}
return null;
},setElementName:function(_ac){
if(this.jsonObj.elementName!=_ac){
this.setModeSpecified();
this.jsonObj.elementName=_ac;
this.jsonObj.type=PznContentSettings.TYPE_ELEMENT;
this.setChanged(true);
return true;
}
return false;
},isSpecified:function(){
return (this.getContentMode()!=PznContentSettings.MODE_RULE&&this.getListenTo()==PznContentSettings.LISTEN_TO_NONE);
},isContextual:function(){
return (this.getContentMode()!=PznContentSettings.MODE_RULE&&(this.getListenTo()!=PznContentSettings.LISTEN_TO_NONE));
},isTargeted:function(){
return (this.getContentMode()==PznContentSettings.MODE_RULE);
},setModeSpecified:function(){
this.setContentMode(PznContentSettings.MODE_ABS);
},setModeContextual:function(){
this.setContentMode(PznContentSettings.MODE_CONTEXTUAL);
},setModeTargeted:function(){
this.setContentMode(PznContentSettings.MODE_RULE);
},setChanged:function(_ad){
this.changed=_ad;
this.confirmCancel=_ad;
},isChanged:function(){
return this.changed;
},cancel:function(){
if(this.isChanged()){
if(this.confirmCancel){
PznUIUtils.displayMessage(PznUIUtils.nls["message_unsaved_changes"],PznUIUtils.MSG_TYPE_WARNING);
this.confirmCancel=false;
return false;
}
if(this.origJson){
this.jsonObj=i$.fromJson(this.origJson);
}
}
return true;
},save:function(_ae){
var nav=PznUIUtils.getDialogNavigator();
if(this.isTargeted()&&!nav.isShowingTargeted()&&this.confirmNotTargeted){
var msg;
if(nav.isShowingContextual()){
msg=PznUIUtils.nls["message_targeted_to_contextual"];
}else{
msg=PznUIUtils.nls["message_targeted_to_specified"];
}
PznUIUtils.displayMessage(msg,PznUIUtils.MSG_TYPE_WARNING);
this.confirmNotTargeted=false;
this.confirmCancel=false;
return false;
}
if(!this.getType()){
this.setType(PznContentSettings.TYPE_CONTENT);
}
if(nav.isShowingContextual()){
this.setModeContextual();
this.jsonObj.ruleData=null;
this.jsonObj.contentId=null;
}else{
if(nav.isShowingTargeted()){
this.setModeTargeted();
this.setRuleData(this.getRuleDataObject());
this.jsonObj.contentId=null;
}else{
if(nav.isShowingSpecified()){
this.setModeSpecified();
this.jsonObj.ruleData=null;
}
}
}
if(this.jsonObj){
var _af=this;
var _b0=i$.toJson(this.jsonObj,false);
var _b1={success:false};
var _b2=i$.toJson(SegmentSelector.previousState);
i$.xhrPut({url:PznUIUtils.openSegLibStateSubmitUrl+"?"+PznUIUtils.openSegLibStateSubmitParamName+"="+_b2,sync:true}).then(function(v){
console.log("posted");
},function(e){
console.log("post state returned error:"+e);
});
i$.xhrPost({url:this.pocURL,headers:{"Content-Type":"application/json"},postData:_b0,responseType:"json",sync:true}).then(function(v){
_b1.success=true;
_b1.jsonCheck=(i$.toJson(v.data)==_b0);
_b1.responseText=v.data;
if(_b1.jsonCheck){
_af.setChanged(false);
}
_ae(_b1);
},function(e){
_b1.error=e.data;
_ae(_b1);
});
return true;
}
return false;
}};
PznRuleData=function(_b3){
this.rdObj=_b3;
this.editModeProfile=null;
};
PznRuleData.getInstanceWithDefaultTemplate=function(){
var obj=new PznRuleData(null);
obj.rdObj={profileList:[],contentProfiler:{profiles:[]}};
return obj;
};
PznRuleData.prototype={toJson:function(){
return i$.toJson(this.rdObj);
},getJsonObject:function(){
return this.rdObj;
},setJsonObject:function(obj){
this.rdObj=obj;
},setProfileList:function(pl){
if(this.rdObj){
this.rdObj.profileList=pl;
return true;
}
return false;
},getProfileList:function(){
if(this.rdObj&&this.rdObj.profileList){
return this.rdObj.profileList;
}
return [];
},updateProfileList:function(){
var _b4=new Array();
this.setProfileList(_b4);
var _b5=this.getProfiles();
var len=_b5.length;
for(var i=0;i<len;i++){
var _b6=_b5[i].predicate.conditions;
var _b7=_b6.length;
for(var j=0;j<_b7;j++){
var _b8=_b6[j].right.name;
var _b9=_b8.split(".");
var _ba=_b9[0];
var _bb=_b9[1];
if(!this.isInProfileList(_ba)){
var _bc={};
_bc.profiler=_ba;
_bc.referencedProfiles=[_bb];
_b4.push(_bc);
}else{
this.addSegmentToProfileList(_ba,_bb);
}
}
}
return _b4;
},isInProfileList:function(_bd){
var pl=this.getProfileList();
var len=pl.length;
for(var i=0;i<len;i++){
if(pl[i].profiler==_bd){
return true;
}
}
return false;
},isInReferencedProfiles:function(_be,_bf){
var len=_bf.length;
for(var i=0;i<len;i++){
if(_bf[i]==_be){
return true;
}
}
return false;
},addSegmentToProfileList:function(_c0,_c1){
var pl=this.getProfileList();
var len=pl.length;
for(var i=0;i<len;i++){
if((pl[i].profiler==_c0)&&(!this.isInReferencedProfiles(_c1,pl[i].referencedProfiles))){
pl[i].referencedProfiles.push(_c1);
}
}
return pl;
},setOtherwise:function(_c2){
if(this.rdObj){
if(!this.rdObj.contentProfiler){
this.rdObj.contentProfiler={};
}
_c2=PznWCMContent.addPrefix(_c2,PznWCMConstants.PREFIX_ITEM);
this.rdObj.contentProfiler.otherwise=_c2;
}
},getOtherwise:function(){
return (this.rdObj&&this.rdObj.contentProfiler&&this.rdObj.contentProfiler.otherwise)||null;
},getEditModeProfile:function(){
return this.editModeProfile;
},setEditModeProfile:function(_c3,_c4){
this.editModeProfile=new PznEditModeProfile(_c3);
if(_c3==PznWCMConstants.NEW){
this.editModeProfile.setName(_c4);
this.editModeProfile.setOperator("or");
this.editModeProfile.setConditions([]);
}else{
if(_c3==PznWCMConstants.DEFAULT){
var _c5=null;
if(this.getOtherwise()&&this.getOtherwise().length>0){
_c5=this.getOtherwise().slice(0);
}
this.editModeProfile.setName(_c5);
}else{
var _c6=this.getProfiles()[_c3];
if(_c6){
this.editModeProfile.setName(_c6.name.slice(0));
this.editModeProfile.setOperator(_c6.predicate.operator.slice(0));
var c=_c6.predicate.conditions;
if(c&&c.length>0){
c=_c6.predicate.conditions.slice(0);
}else{
c=[];
}
this.editModeProfile.setConditions(c);
}
}
}
},saveEditModeProfile:function(){
var _c7=false;
if(this.editModeProfile){
var pos=this.editModeProfile.getPosition();
var _c8=this.editModeProfile.getName();
var _c9=this.editModeProfile.getConditions();
var _ca=this.editModeProfile.getOperator();
if(pos==PznWCMConstants.DEFAULT){
if(_c8){
this.setOtherwise(_c8);
_c7=true;
}
}else{
if(_c9&&_c9.length>0){
if(pos==PznWCMConstants.NEW){
this.addProfile(_c8,_c9,_ca);
}else{
this.setProfileName(pos,_c8);
this.setProfileConditions(pos,_c9);
this.setProfileOperator(pos,_ca);
}
_c7=true;
}else{
PznUIUtils.displayMessage(PznUIUtils.escapeHTML(PznUIUtils.nls["message_add_content_item"]),PznUIUtils.MSG_TYPE_WARNING);
}
}
if(_c7){
this.discardEditModeProfile();
}
}
return _c7;
},discardEditModeProfile:function(){
this.editModeProfile=null;
},setProfiles:function(_cb){
if(this.rdObj){
if(!this.rdObj.contentProfiler){
this.rdObj.contentProfiler={};
}
this.rdObj.contentProfiler.profiles=_cb;
this.updateProfileList();
return true;
}
return false;
},getProfiles:function(){
if(this.rdObj&&this.rdObj.contentProfiler&&this.rdObj.contentProfiler.profiles){
return this.rdObj.contentProfiler.profiles;
}
return [];
},setProfileName:function(_cc,_cd){
if(this.rdObj){
var p=this.getProfiles()[_cc];
if(p){
p.name=_cd;
return true;
}
}
return false;
},setProfileOperator:function(_ce,_cf){
if(this.rdObj){
var p=this.getProfiles()[_ce];
if(p){
if(!p.predicate){
p.predicate={};
}
p.predicate.operator=_cf;
return true;
}
}
return false;
},setProfileConditions:function(_d0,_d1){
if(this.rdObj){
var p=this.getProfiles()[_d0];
if(p){
if(!p.predicate){
p.predicate={};
}
p.predicate.conditions=_d1;
this.updateProfileList();
return true;
}
}
return false;
},addProfile:function(_d2,_d3,_d4){
if(!_d2||!_d3){
return -1;
}
if(!_d4){
_d4="or";
}
_d2=PznWCMContent.addPrefix(_d2,PznWCMConstants.PREFIX_ITEM);
var np={name:_d2,predicate:{operator:_d4,conditions:_d3}};
var l=this.getProfiles().push(np);
this.updateProfileList();
return l;
},removeProfile:function(pos){
if(pos>=0&&this.getProfiles().length>0){
this.getProfiles().splice(pos,1);
this.updateProfileList();
return true;
}
return false;
},moveProfile:function(_d5,_d6){
var pa=this.getProfiles();
var len=pa.length;
if(len>0&&_d5<len&&_d6<len){
var mi=pa.splice(_d5,1)[0];
pa.splice(_d6,0,mi);
return true;
}
return false;
},getEditingPosition:function(){
if(this.editModeProfile){
return this.editModeProfile.getPosition();
}
return null;
},getContentIdAtPosition:function(pos){
if(typeof pos!=="undefined"){
if(pos==PznWCMConstants.DEFAULT){
return PznWCMContent.removeValuePrefix(this.getOtherwise());
}else{
if(!isNaN(pos)){
profiles=this.getProfiles();
if(profiles.length>pos){
return PznWCMContent.removeValuePrefix(profiles[pos].name);
}
}
}
}
return null;
}};
PznEditModeProfile=function(_d7){
this._pos=_d7;
this._changed=false;
this._confirmCancel=true;
};
PznEditModeProfile.prototype={getPosition:function(){
return this._pos;
},getName:function(){
return this.name;
},setName:function(_d8){
_d8=PznWCMContent.addPrefix(_d8,PznWCMConstants.PREFIX_ITEM);
if(this.name&&this.name!=_d8){
this._changed=true;
}
this.name=_d8;
},getOperator:function(){
if(this.predicate){
return this.predicate.operator;
}
return null;
},setOperator:function(_d9){
if(!this.predicate){
this.predicate={};
}
if(this.predicate.operator&&this.predicate.operator!=_d9){
this._changed=true;
}
this.predicate.operator=_d9;
},getConditions:function(){
if(this.predicate){
return this.predicate.conditions;
}
return null;
},setConditions:function(_da){
if(!this.predicate){
this.predicate={};
}
if(this.predicate.conditions){
this._changed=true;
}
this.predicate.conditions=_da;
if(_da.length>0){
PznUIUtils.hideMessage();
}
},isChanged:function(){
return this._changed;
},isConfirmCancel:function(){
return this._confirmCancel;
},setConfirmCancel:function(_db){
this._confirmCancel=_db;
}};
})();
(function(){
PznWCMConstants=function(){
};
PznWCMConstants.DEFAULT="default";
PznWCMConstants.NEW="new";
PznWCMConstants.PREFIX_ITEM="ITEM:";
PznWCMConstants.VALUE_PREFIX_ARRAY=["wcmrest:","ITEM:"];
PznWCMStorage=function(){
};
PznWCMStorage._store={};
PznWCMStorage.get=function(id){
id=PznWCMContent.removeValuePrefix(id);
var pdc=(id==PznContentSettings.PAGE_DEFAULT_CONTENT_ID);
if(pdc&&PznUIUtils._pageDefaultContentId){
id=PznUIUtils._pageDefaultContentId;
}
var c=PznWCMStorage._store[id],_dc=PznContentSettings.isLrpId(id);
if(!c){
if(_dc){
c=new PznLRPContent(id);
}else{
c=new PznWCMContent(id);
PznWCMStorage._store[id]=c;
}
}
if(!_dc&&c.isContentLink()){
var _dd=c.getLinkAlternate();
if(_dd&&_dd.getId()){
c=PznWCMStorage.get(_dd.getId());
}else{
throw "PznWCMStorage Error : ContentLink : could not get id of linked content item";
}
}
if(pdc){
c.setPageDefault(true);
}else{
c.setPageDefault(false);
}
return c;
};
PznWCMStorage.remove=function(id){
id=PznWCMContent.removeValuePrefix(id);
delete PznWCMStorage._store[id];
};
PznLRPContent=function(id){
this.id=id;
};
PznLRPContent.prototype={getId:function(){
return this.id;
},getTitle:function(){
if(this.id==PznContentSettings.HIDDEN_SPOT_ID){
return PznUIUtils.escapeHTML(PznUIUtils.nls["hidden_spot_title"]);
}else{
if(this.id==PznContentSettings.PAGE_DEFAULT_CONTENT_ID){
return PznUIUtils.escapeHTML(PznUIUtils.nls["page_default_content_title"]);
}
}
return false;
},isAvailable:function(){
return this.id;
},isPageDefault:function(){
return (this.id==PznContentSettings.PAGE_DEFAULT_CONTENT_ID);
},setPageDefault:function(b){
}};
PznWCMContent=function(id){
this.jsonObj=null;
this.otherObj=null;
this.links=null;
this.available=false;
this.pdc=false;
if(PznUIUtils.pocUrlBase.indexOf("?")==-1){
var _de=PznUIUtils.pocUrlBase+"?uri=wcmrest:item/"+id+"&mime-type=application/json";
}else{
var _de=PznUIUtils.pocUrlBase+"&uri=wcmrest:item/"+id+"&mime-type=application/json";
}
var _df=this;
i$.xhrGet({url:_de,responseType:"json",sync:true}).then(function(v){
_df.jsonObj=v.data;
_df.links=(!_df.jsonObj.entry||!_df.jsonObj.entry.link)?null:_df.jsonObj.entry.link;
_df.available=true;
},function(e){
_df.available=false;
PznUIUtils.xhrJsonError({error:e,message:"Error trying to load the WCM Content Item feed for '"+id+"'"});
});
};
PznWCMContent.removeValuePrefix=function(v){
if(PznContentSettings.isLrpId(v)){
return v;
}
if(v){
var len=PznWCMConstants.VALUE_PREFIX_ARRAY.length;
for(var i=0;i<len;i++){
if(v.indexOf(PznWCMConstants.VALUE_PREFIX_ARRAY[i])>-1){
return v.substring(PznWCMConstants.VALUE_PREFIX_ARRAY[i].length);
}
}
}
return v;
};
PznWCMContent.addPrefix=function(str,_e0){
if(PznContentSettings.isLrpId(str)){
return str;
}
if(str.indexOf(_e0)!=0){
str=_e0+str;
}
return str;
};
PznWCMContent.prototype={isAvailable:function(){
return this.available;
},isPageDefault:function(){
return this.pdc;
},isContentLink:function(){
return (this.getType()==="ContentLink");
},setPageDefault:function(b){
this.pdc=b;
},getId:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.id==="undefined")?null:PznWCMContent.removeValuePrefix(this.jsonObj.entry.id);
},getTitle:function(){
if(this.jsonObj||this.jsonObj.entry||this.jsonObj.entry.title){
var t=this.jsonObj.entry.title;
if(typeof t.value!=="undefined"){
return t.value;
}else{
return t;
}
}
return null;
},getDisplayTitle:function(){
return (!this.jsonObj||!this.jsonObj.entry||!this.jsonObj.entry.displayTitle||typeof this.jsonObj.entry.displayTitle.value==="undefined")?null:this.jsonObj.entry.displayTitle.value;
},getSummary:function(){
return (!this.jsonObj||!this.jsonObj.entry||!this.jsonObj.entry.summary||typeof this.jsonObj.entry.summary.value==="undefined")?null:this.jsonObj.entry.summary;
},getName:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.name==="undefined")?null:this.jsonObj.entry.name;
},getType:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.type==="undefined")?null:this.jsonObj.entry.type;
},getUpdated:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.updated==="undefined")?null:this.jsonObj.entry.updated;
},getAuthorName:function(){
if(!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.author==="undefined"){
return null;
}
var a=this.jsonObj.entry.author[0];
if(a){
return a.name;
}
return null;
},getWorkflow:function(){
if(this.workflowObj){
return this.workflowObj;
}
var _e1=this.getLinkValue("workflow");
if(_e1!=null){
this.workflowObj=new PznWCMLinkObject(_e1);
return this.workflowObj;
}
return null;
},getWorkflowStage:function(){
if(this.workflowStageObj){
return this.workflowStageObj;
}
var _e2=this.getLinkValue("workflow-stage");
if(_e2!=null){
this.workflowStageObj=new PznWCMLinkObject(_e2);
return this.workflowStageObj;
}
return null;
},getWorkflowState:function(){
var c=this.getCategories();
for(var i in c){
if(c[i].scheme=="wcmrest:workflowState"){
return c[i].label;
}
}
return null;
},getCategories:function(){
if(!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.category==="undefined"){
return null;
}
return this.jsonObj.entry.category;
},getAuthoringTemplate:function(){
if(this.templateObj){
return this.templateObj;
}
var _e3=this.getLinkValue("content-template");
if(!_e3){
_e3=this.getOther().getAuthoringTemplateLink();
}
if(_e3!=null){
this.templateObj=new PznWCMLinkObject(_e3);
return this.templateObj;
}
return null;
},getLibrary:function(){
if(this.libraryObj){
return this.libraryObj;
}
var _e4=this.getLinkValue("library");
if(_e4!=null){
this.libraryObj=new PznWCMLinkObject(_e4);
return this.libraryObj;
}
return null;
},getLinkAlternate:function(){
if(this.linkAlternateObj){
return this.linkAlternateObj;
}
var _e5=this.getLinkValue("alternate");
if(_e5!=null){
this.linkAlternateObj=new PznWCMLinkObject(_e5);
return this.linkAlternateObj;
}
return null;
},getLinkValue:function(_e6){
if(this.links!=null){
var len=this.links.length;
for(var i=0;i<len;i++){
if(this.links[i].rel==_e6){
return this.links[i].href;
}
}
}
return null;
},getProject:function(){
if(this.projectObj){
return this.projectObj;
}
var _e7=this.getLinkValue("project");
if(_e7!=null){
this.projectObj=new PznWCMLinkObject(_e7);
return this.projectObj;
}
return null;
},getOther:function(){
if(!this.otherObj){
if(this.getId()){
this.otherObj=new PznWCMOther(PznWCMContent.removeValuePrefix(this.getId()));
}
}
return this.otherObj;
}};
PznWCMLinkObject=function(_e8){
this.jsonObj=null;
var _e9=this;
i$.xhrGet({url:""+_e8+"?mime-type=application/json",responseType:"json",sync:true}).then(function(v){
_e9.jsonObj=v.data;
},function(e){
PznUIUtils.xhrJsonError({error:e,message:"Error trying to load the WCM Link Item feed"});
});
};
PznWCMLinkObject.prototype={getId:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.id==="undefined")?null:PznWCMContent.removeValuePrefix(this.jsonObj.entry.id);
},getTitle:function(){
if(this.jsonObj||this.jsonObj.entry||this.jsonObj.entry.title){
var t=this.jsonObj.entry.title;
if(typeof t.value!=="undefined"){
return t.value;
}else{
return t;
}
}
return null;
},getName:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.name==="undefined")?null:this.jsonObj.entry.name;
},getType:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.type==="undefined")?null:this.jsonObj.entry.type;
},getDisplayTitle:function(){
return (!this.jsonObj||!this.jsonObj.entry||!this.jsonObj.entry.displayTitle||typeof this.jsonObj.entry.displayTitle.value==="undefined")?null:this.jsonObj.entry.displayTitle.value;
},getSummary:function(){
return (!this.jsonObj||!this.jsonObj.entry||!this.jsonObj.entry.summary||typeof this.jsonObj.entry.summary.value==="undefined")?null:this.jsonObj.entry.summary;
},getUpdated:function(){
return (!this.jsonObj||!this.jsonObj.entry||typeof this.jsonObj.entry.updated==="undefined")?null:this.jsonObj.entry.updated;
}};
PznWCMOther=function(id){
this.id=id;
this.jsonObj=null;
this.fallbackJsonObj=null;
var _ea="&prop=titlepathArray&prop=title&prop=dateLastMod&prop=dateCreated&prop=workflowStatus";
if(PznUIUtils.pocUrlBase.indexOf("?")==-1){
var _eb=PznUIUtils.pocUrlBase+"?uri=wcm:oid:"+id+_ea;
}else{
var _eb=PznUIUtils.pocUrlBase+"&uri=wcm:oid:"+id+_ea;
}
var _ec=this;
i$.xhrGet({url:_eb,responseType:"json",sync:true}).then(function(v){
_ec.jsonObj=v.data;
},function(e){
PznUIUtils.xhrJsonError({error:e,message:"Error trying to load the Extra WCM Content Item detail feed for '"+id+"'"});
});
};
PznWCMOther.prototype={getFallbackJson:function(){
if(this.fallbackJsonObj){
return this.fallbackJsonObj;
}
var _ed=this;
var url=PznUIUtils.pocUrlBase+"wcmrest/Content/"+this.id+"?mime-type=application%2Fjson";
i$.xhrGet({url:url,responseType:"json",sync:true}).then(function(v){
_ed.fallbackJsonObj=v.data;
},function(e){
PznUIUtils.xhrJsonError({error:e,message:"Error trying to load the fallback WCM Content Item detail feed for '"+id+"'"});
});
return this.fallbackJsonObj;
},getLocation:function(){
if(this.jsonObj&&this.jsonObj.titlepathArray){
var loc="";
var len=this.jsonObj.titlepathArray.length;
for(var i=0;i<len-1;i++){
if(i!=0){
loc+="&nbsp;&gt;&nbsp;";
}
loc+=this.jsonObj.titlepathArray[i];
}
return loc;
}
return null;
},getId:function(){
if(this.jsonObj&&this.jsonObj.id){
return this.jsonObj.id;
}
return null;
},getTitle:function(){
if(this.jsonObj&&this.jsonObj.title){
return this.jsonObj.title;
}
return null;
},getType:function(){
if(this.jsonObj&&this.jsonObj.type){
return this.jsonObj.type;
}
return null;
},getDateLastModified:function(){
if(this.jsonObj&&this.jsonObj.dateLastMod){
return this.jsonObj.dateLastMod;
}
return null;
},getDateCreated:function(){
if(this.jsonObj&&this.jsonObj.dateCreated){
return this.jsonObj.dateCreated;
}
return null;
},getWorkflowStatus:function(){
if(this.jsonObj&&this.jsonObj.workflowStatus){
return this.jsonObj.workflowStatus;
}
return null;
},isPublished:function(){
var p=this.getWorkflowStatus();
if(p=="1"){
return true;
}
return false;
},getAuthoringTemplateLink:function(){
var _ee=null;
var _ef=this.getFallbackJson();
if(_ef&&_ef.entry&&_ef.entry.link){
i$.each(_ef.entry.link,function(_f0,_f1,_f2){
if(_f0.rel=="content-template"){
_ee=_f0.href;
}
});
}
return _ee;
}};
})();
(function(){
PznDialogNavigator=function(){
this.messageDiv=i$.byId("pznDisplayMessageDiv");
this.specifiedDiv=i$.byId("pznSpecifiedContentDiv");
this.contextualDiv=i$.byId("pznContextualContentDiv");
this.contextualUnresolvedDiv=i$.byId("pznContextualUnresolvedDiv");
this.targetedDiv=i$.byId("pznTargetedContentDiv");
this.targetingOverviewDiv=i$.byId("pznTargetingOverviewDiv");
this.contentDisplayedStrEl=i$.byId("pznContentDisplayedStr");
this.pznSegmentSelectorDiv=i$.byId("pznSegmentSelectorDiv");
this.currentEditPos=null;
this.bannerContentTypeDiv=i$.byId("pznSelectContentTypeDiv");
this.bannerTargetingOverviewDiv=i$.byId("pznTargetingOverviewBannerDiv");
this.bannerSegmentSelectorDiv=i$.byId("pznSegmentSelectorBannerDiv");
this.currentDiv=null;
};
PznDialogNavigator.prototype={showTemplateAction:function(_f3){
var _f4,_f5;
if((PznUIUtils.getContentSettings().getPresentationTemplateId()==null)&&(PznUIUtils.getContentSettings().getComponentId()==null)){
_f5="templateDefault";
_f4="templateEdit";
}else{
_f5="templateEdit";
_f4="templateDefault";
}
var _f6=_f3.getElementsByTagName("li");
var len=_f6.length;
for(var i=0;i<len;i++){
var _f7=_f6[i];
if(_f7.id.indexOf(_f4,_f7.id.length-_f4.length)!=-1){
PznUIUtils.hideItem(_f7);
}else{
if(_f7.id.indexOf(_f5,_f7.id.length-_f5.length)!=-1){
PznUIUtils.showItem(_f7);
}
}
}
},showDialogArea:function(_f8,_f9){
PznUIUtils.hidePopupMenu();
if(this.currentDiv!=_f9){
this.hideAllContent();
this.showContentTypeBanner();
PznUIUtils.showItem(_f9);
this.showTemplateAction(_f9);
this.currentDiv=_f9;
if(_f8){
this.setContentDisplayedStr(_f8);
}
PznUIUtils.hideMessage();
this.updateContentAreas();
}
},showSpecified:function(){
this.showDialogArea(PznUIUtils.getContentOptions()[0].text,this.specifiedDiv);
},isShowingTargetedSpot:function(){
return this.currentDiv==this.targetedDiv;
},isShowingTargeted:function(){
return (this.currentDiv==this.targetedDiv)||(this.currentDiv==this.targetingOverviewDiv);
},isShowingSegments:function(){
return (this.currentDiv==this.pznSegmentSelectorDiv);
},showContextual:function(){
if(PznUIUtils.getContextualContentId()){
this.showDialogArea(PznUIUtils.getContentOptions()[1].text,this.contextualDiv);
}else{
this.showDialogArea(PznUIUtils.getContentOptions()[1].text,this.contextualUnresolvedDiv);
}
},showTargeted:function(){
this.showDialogArea(PznUIUtils.getContentOptions()[2].text,this.targetedDiv);
},showTargetingOverview:function(_fa,_fb){
this.currentEditPos=_fb;
PznUIUtils.hidePopupMenu();
var rdo=PznUIUtils.getContentSettings().getRuleDataObject();
if(!rdo){
rdo=PznRuleData.getInstanceWithDefaultTemplate();
}
if(_fa&&typeof _fb=="undefined"){
if(!rdo.getOtherwise()){
rdo.setOtherwise(_fa);
rdo.setEditModeProfile(PznWCMConstants.DEFAULT);
}else{
rdo.setEditModeProfile(PznWCMConstants.NEW,_fa);
}
}
if(!rdo.getEditModeProfile()&&typeof _fb!=="undefined"){
rdo.setEditModeProfile(_fb);
}
if(rdo.getEditModeProfile()){
this.hideAllContent();
this.showTargetingOverviewBanner();
PznUIUtils.showItem(this.targetingOverviewDiv);
this.currentDiv=this.targetingOverviewDiv;
this.updateContentAreas();
}
},getCurrentTargetedItemEditPosition:function(){
if(!this.isShowingEditTargetedItem()){
this.currentEditPos=null;
}
return this.currentEditPos;
},showSegmentSelector:function(){
PznUIUtils.hidePopupMenu();
this.hideAllContent();
this.showSegmentSelectorBanner();
PznUIUtils.showItem(this.pznSegmentSelectorDiv);
this.currentDiv=this.pznSegmentSelectorDiv;
this.updateContentAreas();
},updateContentAreas:function(){
if(this.isShowingSpecified()&&PznUIUtils.getContentSettings()){
var _fc=PznUIUtils.getContentSettings().getContentId(),_fd={wcmContentProps:null,divId:"pznSpecifiedContentItemTitle",desc:PznUIUtils.escapeHTML(PznUIUtils.nls["specified_item_desc"])};
if(!_fc){
_fc=PznUIUtils.getContextualContentId();
if(_fc){
PznUIUtils.getContentSettings().setContentId(_fc);
}
}
if(_fc){
var _fe=PznWCMStorage.get(_fc);
_fd.wcmContentProps=_fe;
PznUIUtils.renderContentTitle(_fd);
PznUIUtils.renderButtons(_fe);
PznUIUtils.renderTabPanelControls("pznSpecifiedPanelTab",_fe);
PznUIUtils.renderContentAppearance("pznSpecifiedContentAppearance");
PznUIUtils.renderContentProperties(_fe,"pznSpecifiedContentProperties");
}else{
PznUIUtils.renderContentTitle(_fd);
PznUIUtils.renderButtons(null);
}
}else{
if(this.isShowingContextual()){
var _fc=PznUIUtils.getContextualContentId();
if(_fc){
var _fe=PznWCMStorage.get(_fc),_fd={wcmContentProps:_fe,divId:"pznContextualContentItemTitle",desc:PznUIUtils.escapeHTML(PznUIUtils.nls["contextual_item_desc"]),learnMoreId:"openLearnMoreContextual",learnMoreUrl:PznUIUtils.learnMoreContextualUrl};
PznUIUtils.renderContentTitle(_fd);
PznUIUtils.renderButtons(_fe);
PznUIUtils.renderTabPanelControls("pznContextualContentPanelTab",_fe);
PznUIUtils.renderContentAppearance("pznContextualContentAppearance");
PznUIUtils.renderContentProperties(_fe,"pznContextualContentProperties");
}
}else{
if(this.isShowingUnresolvedContextual()){
PznUIUtils.renderContentAppearance("pznContextualContentUresolvedAppearance");
}else{
if(this.isShowingTargetedSpot()){
var _ff=i$.byId("pznDialogTargetedInfo");
if(PznUIUtils.isInfoMode()){
PznUIUtils.showItem(_ff);
}else{
PznUIUtils.hideItem(_ff);
}
PznUIUtils.renderContentAppearance("pznTargetedContentAppearance");
PznUIUtils.renderButtons(null);
PznTargetedItems.renderTargetedItems();
}else{
if(this.isShowingEditTargetedItem()){
var rdo=PznUIUtils.getContentSettings().getRuleDataObject(),_fc=null,_100=i$.byId("pznDialogTargetedItemSegmentsInfo");
if(PznUIUtils.isInfoMode()){
PznUIUtils.showItem(_100);
}else{
PznUIUtils.hideItem(_100);
}
if(rdo&&rdo.getEditModeProfile()){
_fc=rdo.getEditModeProfile().getName();
}
if(_fc){
var d=PznUIUtils.escapeHTML(PznUIUtils.nls["target_specified_content_desc"]);
if(_fc==PznContentSettings.HIDDEN_SPOT_ID){
d=PznUIUtils.escapeHTML(PznUIUtils.nls["hide_spot_desc"]);
}else{
if(_fc==PznContentSettings.PAGE_DEFAULT_CONTENT_ID){
d=PznUIUtils.escapeHTML(PznUIUtils.nls["use_page_default_desc"]);
}
}
var _101=PznWCMStorage.get(_fc),_fd={wcmContentProps:_101,divId:"pznTargetingOverviewContentItemTitle",desc:d};
PznUIUtils.renderContentTitle(_fd);
PznUIUtils.renderButtons(_101);
PznUIUtils.renderTabPanelControls("pznTargetedSpotEditPanelTab",_101);
PznUIUtils.renderContentProperties(_101,"pznTargetingOverviewContentItemProperties");
PznTargetedItemEdit.renderSegmentsArea();
}else{
this.showTargeted();
}
}else{
if(this.isShowingSegments()){
PznTargetedItemEdit.renderSelectSegments();
}
}
}
}
}
}
PznUIUtils.resize();
},isShowingContextual:function(){
return this.currentDiv==this.contextualDiv;
},isShowingUnresolvedContextual:function(){
return this.currentDiv==this.contextualUnresolvedDiv;
},isShowingSpecified:function(){
return this.currentDiv==this.specifiedDiv;
},isShowingEditTargetedItem:function(){
return this.currentDiv==this.targetingOverviewDiv;
},setContentDisplayedStr:function(str){
this.contentDisplayedStrEl.innerHTML=str;
},showContentTypeBanner:function(){
PznUIUtils.hideItem(this.bannerTargetingOverviewDiv);
PznUIUtils.showItem(this.bannerContentTypeDiv);
},showTargetingOverviewBanner:function(){
PznUIUtils.hideItem(this.bannerContentTypeDiv);
PznUIUtils.showItem(this.bannerTargetingOverviewDiv);
},showSegmentSelectorBanner:function(){
var _102=PznUIUtils.getContentSettings().getRuleDataObject(),_103=PznUIUtils.nls["targeted_item_title"];
if(_102){
var p=_102.getEditModeProfile();
if(p){
var ci=PznWCMStorage.get(p.getName());
if(ci&&ci.getTitle()){
_103=ci.getTitle();
}
}
}
SegmentSelector.setBannerTitle(_103);
PznUIUtils.hideItem(this.bannerTargetingOverviewDiv);
PznUIUtils.showItem(this.bannerSegmentSelectorDiv);
},hideAllContent:function(){
PznUIUtils.hideItem(this.specifiedDiv);
PznUIUtils.hideItem(this.contextualDiv);
PznUIUtils.hideItem(this.contextualUnresolvedDiv);
PznUIUtils.hideItem(this.targetedDiv);
PznUIUtils.hideItem(this.targetingOverviewDiv);
PznUIUtils.hideItem(this.pznSegmentSelectorDiv);
PznUIUtils.hideItem(this.bannerSegmentSelectorDiv);
}};
})();
(function(){
PznTargetedItems=function(){
};
var _104=i$.byId("pznTargetedItemsList"),_105=i$.byId("pznTargetedAddContentBtn"),_106=i$.byId("pznTargetedAddDefaultContentBtn"),_107=i$.byId("pznDefaultTargetedItem"),_108=i$.byId("pznTargetedSpotBtns");
PznTargetedItems.ERR_CONTENT_NOT_FOUND=["<span class=\"pznDialogErrorText\">",PznUIUtils.escapeHTML(PznUIUtils.nls["message_targeting_content_not_found"]),"</span>"].join("");
PznTargetedItems.getRuleDataObject=function(){
if(!PznUIUtils.getContentSettings()){
return null;
}
return PznUIUtils.getContentSettings().getRuleDataObject();
};
PznTargetedItems.renderTargetedItems=function(){
ruleData=PznTargetedItems.getRuleDataObject();
if(ruleData==null){
var _109=null;
if(PznUIUtils.getContextualContentId()){
_109=PznUIUtils.getContextualContentId();
}else{
if(PznUIUtils.getContentSettings().getContentId()){
_109=PznUIUtils.getContentSettings().getContentId();
}
}
if(_109){
PznUIUtils.showItem(_108);
PznUIUtils.showItem(_105);
PznUIUtils.hideItem(_106);
ruleData=PznRuleData.getInstanceWithDefaultTemplate();
ruleData.setOtherwise(_109);
PznUIUtils.getContentSettings().setRuleData(ruleData);
PznTargetedItems.renderDefaultTargetedItem();
}else{
PznUIUtils.hideItem(_108);
PznUIUtils.showItem(_106);
}
}else{
PznUIUtils.showItem(_108);
PznUIUtils.hideItem(_106);
var _10a=ruleData.getProfileList();
var _10b=ruleData.getProfiles();
var _10c=[];
var len=_10b.length;
for(var j=0;j<len;j++){
var _10d=_10b[j].name;
var _10e=_10b[j].predicate.operator;
var _10f=_10b[j].predicate.conditions;
var _110={};
_110.contentId=_10d;
_110.segmentsStr="<div class=\"pznDialogFontComputed11px pznDialogDefaultColorText\">";
_10c.push(_110);
var clen=_10f.length;
for(var i=0;i<clen;i++){
if(PznContentSettings.isLrpId(_10d)||_10d.indexOf("ITEM")==0){
var _111=_10f[i].right.name;
var _112=PznTargetedItems.getOperator(_10f[i].operator);
if(_111.indexOf(".")>0){
var _113=_111.substring(_111.indexOf(".")+1,_111.length);
if(i>0&&_10e=="and"){
if(_112){
_110.segmentsStr+=" + ";
}else{
_110.segmentsStr+=" ";
}
}
if(i==0){
if(_10e=="and"){
_110.segmentsStr+="<div class=\"pznDialogSegmentGreyBox pznDialogSegmentAndBox\">";
}else{
_110.segmentsStr+="<div class=\"pznDialogSegmentOrBox\">";
}
}
if(_10e=="and"&&_112){
_110.segmentsStr+=PznUIUtils.escapeHTML(_113);
}else{
var _114="pznDialogSegmentGreyBox pznDialogSegmentBoxMargin pznDialogSegmentIsBox";
var _115="";
if(!_112){
_115="- ";
_114="pznDialogSegmentIsNotBox";
if(_10e=="and"){
_114+=" pznDialogSegmentIsNotBoxInner";
}else{
_114+=" pznDialogSegmentBoxMargin";
}
}
_110.segmentsStr+="<div class=\""+_114+"\">"+_115+PznUIUtils.escapeHTML(_113)+"</div>";
}
}
}
}
_110.segmentsStr+="</div>";
_110.segmentsStr+="</div>";
}
PznTargetedItems.renderTargetedItemsList(_10c);
PznTargetedItems.renderDefaultTargetedItem();
}
};
PznTargetedItems.getOperator=function(_116){
if(_116=="includes"){
return true;
}else{
return false;
}
};
PznTargetedItems.getTitleTextClasses=function(_117){
var c="pznDialogFontComputed12px pznDialogBoldFont pznDialogDefaultColorText";
if(_117&&!PznContentSettings.isLrpId(_117.getId())&&_117.getOther()&&!_117.getOther().isPublished()){
c+=" pznDialogItalicFont";
}
return c;
};
PznTargetedItems.titleAppendTemplate="<span class=\"pznDialogFontComputed11px pznDialogGreyText\">&nbsp;&nbsp;$text</span>";
PznTargetedItems.renderTargetedItemsList=function(_118){
var _119=_118.length,out=[],_11a=PznUIUtils.getContextPath(),_11b=PznUIUtils.escapeHTML(PznUIUtils.nls["moveUp"]),_11c=PznUIUtils.escapeHTML(PznUIUtils.nls["moveDown"]),_11d=PznUIUtils.escapeHTML(PznUIUtils.nls["remove_btn"]),_11e;
if(_119>1){
_11e="pznDialogSectionRuleCellWithUpDown";
}else{
_11e="pznDialogSectionRuleCell";
}
if(_119>0){
out.push("<div class=\"pznDialogAreaHeader pznDialogFontComputed12px\">");
out.push("<span>",PznUIUtils.escapeHTML(PznUIUtils.nls["targeted_content"]),"&nbsp;</span>");
if(_119>1&&PznUIUtils.isInfoMode()){
out.push("<br/><h3 class=\"pznDescription pznDialogElementDisplayInline\">",PznUIUtils.escapeHTML(PznUIUtils.nls["targeted_reorder"]),"</h3>");
}
out.push("</div>");
out.push("<div class=\"pznDialogTargetedItemsContainer\">");
for(var pos=0;pos<_119;pos++){
var _11f=PznWCMContent.removeValuePrefix(_118[pos].contentId);
var _120=PznWCMStorage.get(_11f);
var _121="";
if(_120.available){
_121=_120.getTitle();
}
if(_121){
_121=PznUIUtils.escapeHTML(_121);
}else{
_121=PznTargetedItems.ERR_CONTENT_NOT_FOUND;
}
out.push("<div class=\"pznDialogTargetedItem\" id=\"",_11f,"\"");
if(pos==0){
out.push(" style=\"border-top-width:0");
if(_119==1){
out.push(";border-bottom-width:0");
}
out.push("\" ");
}
if(pos==(_119-1)){
out.push(" style=\"border-bottom-width:0\" ");
}
out.push(" >");
if(_119>1){
out.push("<div class=\"pznDialogMoveContainer\">");
out.push("<div class=\"pznDialogMoveRules\">");
if(pos!=0){
out.push("<a href=\"\" onclick=\"PznUIUtils.moveTargetedContentItem(",pos,",",(pos-1),");return false;\" alt=\"",_11b,"\">");
out.push("<img alt=\"\" src=\"",_11a,"/images/blank.gif\" class=\"pznDialogUpIcon\" alt=\"",_11b,"\" />");
out.push("</a>");
}else{
out.push("<span><img src=\"",_11a,"/images/blank.gif\" class=\"pznDialogUpDisabledIcon\" alt=\"",_11b,"\" /></span>");
}
out.push("</div>");
out.push("<div class=\"pznDialogMoveRules\">");
if(pos<(_119-1)){
out.push("<a href=\"\" onclick=\"PznUIUtils.moveTargetedContentItem(",pos,",",(pos+1),");return false;\" alt=\"",_11c,"\">");
out.push("<img src=\"",_11a,"/images/blank.gif\" class=\"pznDialogDownIcon\" alt=\"",_11c,"\" />");
out.push("</a>");
}else{
out.push("<span><img src=\"",_11a,"/images/blank.gif\" class=\"pznDialogDownDisabledIcon\" alt=\"",_11c,"\" /></span>");
}
out.push("</div>");
out.push("</div>");
}
out.push("<div class=\"",_11e,"\" >");
out.push("<input type=\"image\" alt=\"",_11d,"\" class=\"lotusRight pznDialogTargetedDeleteIcon\" href=\"\" onclick=\"PznUIUtils.deleteTargetedContentItem(",pos,");return false;\" src=\"",_11a,"/images/remove.gif\" />");
out.push("<a href=\"\" onclick=\"PznUIUtils.getDialogNavigator().showTargetingOverview(null,",pos,");return false;\">");
out.push("<span class=\"pznDialogElementDisplayBlock\"");
out.push("<header class=\"pznDialogSectionHeader\">");
out.push("<div class=\"pznDialogTargetedItemTitleArea\">");
if(PznContentSettings.isLrpId(_11f)){
out.push("<img src=\"",_11a,"/images/blank.gif\" alt=\"\" class=\"pznDialogIconLRPContent\">");
}else{
out.push("<img src=\"",_11a,"/images/blank.gif\" alt=\"\" class=\"pznDialogTargetedContentIcon pznDialogIconWcmContent\">");
}
out.push("<span class=\"",PznTargetedItems.getTitleTextClasses(_120),"\">",_121,"</span>");
out.push("</div>");
out.push("</header>");
out.push("<div class=\"pznDialogSectionContent\" id=\"pznDialogSectionContent",_11f,"\">");
out.push(_118[pos].segmentsStr);
out.push("</div>");
out.push("</span>");
out.push("</a>");
out.push("</div>");
out.push("<div style=\"clear:both\"></div>");
out.push("</div>");
}
out.push("</div>");
}else{
out.push("<div class=\"pznDialogDefaultTargetedItemSpace\">&nbsp;</div>");
}
_104.innerHTML=out.join("");
};
PznTargetedItems.renderDefaultTargetedItem=function(){
var out=["<div class=\"pznDialogAreaHeader pznDialogFontComputed12px pznDialogSectionSpacing\">",PznUIUtils.escapeHTML(PznUIUtils.nls["targeted_default_content"])];
if(PznUIUtils.isInfoMode()){
out.push("<br/><h3 class=\"pznDescription pznDialogElementDisplayInline\">",PznUIUtils.escapeHTML(PznUIUtils.nls["default_content_desc"]),"</h3>");
}
out.push("</div>");
var _122=PznTargetedItems.getRuleDataObject();
if(_122&&_122.getOtherwise()!=null){
var _123=PznWCMContent.removeValuePrefix(_122.getOtherwise());
var _124=PznWCMStorage.get(_123);
var _125;
if(_124.available){
_125=_124.getTitle();
}
if(_125){
_125=PznUIUtils.escapeHTML(_125);
}else{
_125=PznTargetedItems.ERR_CONTENT_NOT_FOUND;
}
out.push("<div class=\"pznDialogTargetedItemsContainer pznDialogWhiteBackground\" id=\"",_123,"\">");
out.push("<div class=\"pznDialogSectionRuleCell pznDialogTargetedDefault\" >");
out.push("<a href=\"\" onclick=\"PznUIUtils.getDialogNavigator().showTargetingOverview(null,'",PznWCMConstants.DEFAULT,"');return false;\">");
out.push("<span class=\"pznDialogElementDisplayBlock\"");
out.push("<header class=\"pznDialogSectionHeader\">");
out.push("<div class=\"pznDialogTargetedItemTitleArea\">");
if(PznContentSettings.isLrpId(_123)){
out.push("<img src=\"",PznUIUtils.getContextPath(),"/images/blank.gif\" alt=\"\" class=\"pznDialogIconLRPContent\">");
}else{
out.push("<img src=\"",PznUIUtils.getContextPath(),"/images/blank.gif\" alt=\"\" class=\"pznDialogTargetedContentIcon pznDialogIconWcmContent\">");
}
out.push("<span class=\"",PznTargetedItems.getTitleTextClasses(_124),"\">",_125,"</span>");
out.push("</div>");
out.push("</header>");
out.push("</span>");
out.push("</a>");
out.push("</div>");
out.push("</div>");
}else{
PznUIUtils.showItem(_106);
}
_107.innerHTML=out.join("");
};
})();
(function(){
PznTargetedItemEdit=function(){
};
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENTS_CONTAINER=i$.byId("pznSegmentsContainer");
PznTargetedItemEdit.EL_TARGETED_ITEM_MULTI_SEGMENTS_CONTAINER=i$.byId("pznMultiSegmentsContainer");
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX=i$.byId("pznMatchAllSegmentsCheckbox");
PznTargetedItemEdit.EL_TARGETED_ITEM_DONE_BTN=i$.byId("pznEditTargetedItemDoneBtn");
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_DIV=i$.byId("pznMatchAllSegmentsDiv");
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_TEXT=i$.byId("pznMatchAllSegmentsText");
PznTargetedItemEdit.tabPanelSegments="pznTargetedSpotEditSegments";
PznTargetedItemEdit.tabPanelDetails="pznTargetedSpotEditDetails";
PznTargetedItemEdit.tabLinkSegments="pznDialogPanelTabSegmentsLink";
PznTargetedItemEdit.tabLinkDetails="pznDialogPanelTabDetailsLink";
PznTargetedItemEdit.activeTabPanelId="pznTargetedSpotEditSegments";
PznTargetedItemEdit.getPanelId=function(tab){
if(tab.id==PznTargetedItemEdit.tabLinkSegments){
return PznTargetedItemEdit.tabPanelSegments;
}else{
return PznTargetedItemEdit.tabPanelDetails;
}
};
PznTargetedItemEdit.tabMoused=function(tab){
var _126=PznTargetedItemEdit.getPanelId(tab);
if(_126!=PznTargetedItemEdit.activeTabPanelId){
var p=tab.parentNode;
if(i$.hasClass(p,"pznDialogPanelTabActive")){
i$.removeClass(p,"pznDialogPanelTabActive");
}else{
i$.addClass(p,"pznDialogPanelTabActive");
}
}
};
PznTargetedItemEdit.tabClicked=function(tab){
var _127=PznTargetedItemEdit.getPanelId(tab);
if(_127!=PznTargetedItemEdit.activeTabPanelId){
var prev=i$.byId(PznTargetedItemEdit.activeTabPanelId);
PznUIUtils.hideItem(prev);
var tr=tab.parentNode.parentNode;
var a=tr.getElementsByTagName("a");
for(var i=0;i<a.length;i++){
i$.removeClass(a[i],"pznDialogCursorDefault");
i$.removeClass(a[i].parentNode,"pznDialogPanelTabActive");
}
i$.addClass(tab,"pznDialogCursorDefault");
i$.addClass(tab.parentNode,"pznDialogPanelTabActive");
PznTargetedItemEdit.activeTabPanelId=_127;
var cur=i$.byId(_127);
PznUIUtils.showItem(cur);
PznUIUtils.resize();
}
};
PznTargetedItemEdit.tabShowDetailsOnly=function(bool){
var sl=i$.byId(PznTargetedItemEdit.tabLinkSegments);
if(bool){
if(sl){
PznUIUtils.hideItem(sl.parentNode);
}
PznUIUtils.hideItem(i$.byId(PznTargetedItemEdit.tabPanelSegments));
PznTargetedItemEdit.activeTabPanelId="";
var dl=i$.byId(PznTargetedItemEdit.tabLinkDetails);
if(dl){
PznTargetedItemEdit.tabClicked(dl);
}
}else{
if(sl){
PznUIUtils.showItem(sl.parentNode);
PznTargetedItemEdit.tabClicked(sl);
}
}
};
PznTargetedItemEdit.getEditModeProfile=function(){
var _128=PznUIUtils.getContentSettings().getRuleDataObject();
if(_128){
return _128.getEditModeProfile();
}
return null;
};
PznTargetedItemEdit.renderSegmentsArea=function(){
var _129=PznTargetedItemEdit.getEditModeProfile();
if(!_129){
return;
}
PznTargetedItemEdit.setControlsEnabled(false);
var pos=_129.getPosition();
if(pos==PznWCMConstants.DEFAULT||typeof pos=="undefined"){
PznTargetedItemEdit.tabShowDetailsOnly(true);
PznTargetedItemEdit.setControlsEnabled(true);
}else{
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENTS_CONTAINER.innerHTML="";
PznTargetedItemEdit.EL_TARGETED_ITEM_MULTI_SEGMENTS_CONTAINER.innerHTML="";
PznTargetedItemEdit.tabShowDetailsOnly(false);
contentSegments=_129.getConditions();
PznTargetedItemEdit.setControlsEnabled(contentSegments.length>0);
if(_129.getOperator()=="or"){
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX.checked=false;
PznTargetedItemEdit.createSegmentDivs(contentSegments);
}else{
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX.checked=true;
if(contentSegments&&contentSegments.length==1){
PznTargetedItemEdit.createSegmentDivs(contentSegments);
}else{
PznTargetedItemEdit.createMultiSegmentDivs(contentSegments);
}
}
}
};
PznTargetedItemEdit.setControlsEnabled=function(_12a){
if(_12a){
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX.disabled=false;
i$.addClass(PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_DIV,"pznDialogMouseHighlight");
i$.addClass(PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_TEXT,"pznDialogCursorPointer");
}else{
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX.disabled=true;
i$.removeClass(PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_DIV,"pznDialogMouseHighlight");
i$.removeClass(PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_TEXT,"pznDialogCursorPointer");
}
};
PznTargetedItemEdit.getSegmentNameFromId=function(id){
var _12b=id.indexOf(".");
if(_12b>0){
return id.substring(_12b+1,id.length);
}
return "";
};
PznTargetedItemEdit.renderSelectSegments=function(){
var _12c=PznTargetedItemEdit.getEditModeProfile();
if(!_12c){
return;
}
var _12d=_12c.getPosition();
var _12e=_12c.getConditions();
var _12f="";
var len=_12e.length;
for(var i=0;i<len;i++){
if(i>0){
_12f+=",";
}
_12f+=_12e[i].right.name+"."+_12e[i].operator;
}
if(PznUIUtils.openSegLibState&&PznUIUtils.openSegLibState!="undefined"&&PznUIUtils.openSegLibState.length>0){
SegmentSelector.previousState=i$.fromJson(PznUIUtils.openSegLibState);
}
SegmentSelector.selectedSegments=_12f;
SegmentSelector.showSegmentList();
};
PznTargetedItemEdit.toggleCheckBox=function(evt){
if(evt){
if(evt.stopPropagation){
evt.stopPropagation();
}else{
evt.cancelBubble=true;
}
}
if(PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX.disabled){
return;
}
var _130=PznTargetedItemEdit.getEditModeProfile();
if(!_130){
return;
}
if(_130.getPosition()==PznWCMConstants.DEFAULT){
return;
}
if(_130.getOperator()=="and"){
_130.setOperator("or");
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX.checked=false;
}else{
_130.setOperator("and");
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENT_CHECKBOX.checked=true;
}
PznTargetedItemEdit.renderSegmentsArea();
PznUIUtils.resize();
};
PznTargetedItemEdit.cancel=function(){
return true;
};
PznTargetedItemEdit.translateOperatorName=function(_131){
if(_131=="includes"){
return PznUIUtils.nls["OPERATION_IS"];
}else{
return PznUIUtils.nls["OPERATION_IS_NOT"];
}
};
PznTargetedItemEdit.addSegmentLinkTemplate=["<a class=\"pznDialogBlueLink\" tabindex=\"0\" href=\"\" ","onclick=\"PznUIUtils.getDialogNavigator().showSegmentSelector();return false;\"",">","<span id=\"$id\" class=\"pznDialogAddSegmentLink pznDialogElementDisplayBlock pznDialogMouseHighlight\">",PznUIUtils.escapeHTML(PznUIUtils.nls["add_segment_btn"]),"</span>","</a>"].join("");
PznTargetedItemEdit.singleSegmentDivTemplate=["<div id=\"segContainer$segmentIdHTML\" class=\"pznDialogTargetItemSegmentContainer\">","<div class=\"pznDialogTargetedItemSegmentItem\">","<div tabindex=\"0\" class=\"$classNames\" role=\"button\" onkeydown=\"return PznTargetedItemEdit.showOperatorMenu(this,event,$index,'$negate');\">","<a id=\"pznDialogIsIsNotComboBox$segmentIdHTML\" href=\"\" tabindex=\"-1\" class=\"pznDialogFontComputed12px pznDialogElementDisplayBlock\" aria-haspopup=\"true\" role=\"button\" aria-owns=\"pznDialogPopupMenuItemsContainer\""," onkeydown=\"return PznTargetedItemEdit.showOperatorMenu(this,event,$index,'$negate');\" "," onclick=\"PznTargetedItemEdit.showOperatorMenu(this,event,$index,'$negate');return false;\">","<span class=\"pznDialogTargetedItemSegmentItemSingleLine $hover pznDialogDefaultColorText pznDialogFontComputed11px pznDialogBoldFont\">","$segmentStatusIcon<div class=\"pznDialogTargetedItemSegmentTitle\">$segmentNameHTML</div>","<img id=\"pznDialogMenuIcon$segmentIdHTML\" class=\"pznDialogTargetedItemSegmentItemDropdownImg\" alt=\"\" src=\"$contextPath/images/blank.gif\">","<span class=\"lotusAltText\">&#9660;</span>","</span>","</a>","</div>","</div>","<div class=\"lotusClear\"></div>","</div>"].join("");
PznTargetedItemEdit.createSegmentDivs=function(_132){
PznUIUtils.showItem(PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENTS_CONTAINER);
PznUIUtils.hideItem(PznTargetedItemEdit.EL_TARGETED_ITEM_MULTI_SEGMENTS_CONTAINER);
var _133=[],len=_132.length,_134=PznUIUtils.getContextPath(),_135=PznUIUtils.escapeHTML(PznUIUtils.nls["remove_btn"]);
_133.push("<div class=\"pznDialogTargetItemSegmentsParent\" >");
_133.push(PznTargetedItemEdit.addSegmentLinkTemplate.replace(/\$id/g,"pznSegmentsContainerAddSegments"));
for(var i=0;i<len;i++){
var _136=PznUIUtils.escapeHTML(_132[i].right.name),_137=PznUIUtils.escapeHTML(PznTargetedItemEdit.getSegmentNameFromId(_132[i].right.name)),_138=PznUIUtils.escapeHTML(PznTargetedItemEdit.translateOperatorName(_132[i].operator)),out=PznTargetedItemEdit.singleSegmentDivTemplate.replace(/\$segmentIdHTML/g,_136).replace(/\$index/g,""+i).replace(/\$segmentNameHTML/g,_137).replace(/\$contextPath/g,_134);
if(_132[i].operator!="includes"){
out=out.replace(/\$classNames/g,"pznDialogSegmentControl pznDialogSegmentPink").replace(/\$segmentStatusIcon/g,"<img id=\"pznDialogNegIcon"+_136+"\" class=\"pznDialogTargetedItemSegmentImg\" alt=\"\" src=\""+_134+"/images/negateSegment.png\">").replace(/\$negate/g,"true").replace(/\$hover/g,"pznDialogTargetedItemSegmentItemNotMatch");
}else{
out=out.replace(/\$classNames/g,"pznDialogSegmentControl pznDialogSegmentGrey").replace(/\$segmentStatusIcon/g,"<img id=\"pznDialogNegIcon"+_136+"\" class=\"pznDialogTargetedItemSegmentImg\" alt=\"\" src=\""+_134+"/images/segmentIcon.png\">").replace(/\$negate/g,"false").replace(/\$hover/g,"pznDialogTargetedItemSegmentItemSingleLineMatch");
}
_133.push(out);
}
_133.push("</div>");
PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENTS_CONTAINER.innerHTML=_133.join("");
};
PznTargetedItemEdit.multiSegmentDivTemplate=["<div id=\"multiSegmentsContainer_row$segmentIdHTML\">","<div tabindex=\"0\" class=\"$classNames\"  onkeydown=\"return PznTargetedItemEdit.showOperatorMenu(this,event,$index, '$negate');\" role=\"listitem\">","<a id=\"pznDialogIsIsNotComboBox$segmentIdHTML\" tabindex=\"-1\" href=\"\" class=\"pznDialogFontComputed12px pznDialogElementDisplayBlock\""," aria-haspopup=\"true\" role=\"button\" aria-owns=\"pznDialogPopupMenuItemsContainer\" onkeydown=\"return PznTargetedItemEdit.showOperatorMenu(this,event,$index, '$negate');\" "," onclick=\"PznTargetedItemEdit.showOperatorMenu(this,event,$index,'$negate');return false;\">","<span class=\"pznDialogTargetedItemSegmentItemMultiLine pznDialogDefaultColorText pznDialogFontComputed11px pznDialogBoldFont\">","$segmentStatusIcon<div class=\"pznDialogTargetedItemSegmentTitle\">$segmentNameHTML</div>","<img id=\"pznDialogMenuIcon$segmentIdHTML\" class=\"pznDialogTargetedItemSegmentItemDropdownImg\" alt=\"\" src=\"$contextPath/images/blank.gif\">","<span class=\"lotusAltText\">&#9660;</span>","</span>","</a>","</div>","<div class=\"lotusClear\"></div>","</div>"].join("");
PznTargetedItemEdit.createMultiSegmentDivs=function(_139){
PznUIUtils.showItem(PznTargetedItemEdit.EL_TARGETED_ITEM_MULTI_SEGMENTS_CONTAINER);
PznUIUtils.hideItem(PznTargetedItemEdit.EL_TARGETED_ITEM_SEGMENTS_CONTAINER);
var _13a=PznUIUtils.getContextPath(),_13b=PznUIUtils.escapeHTML(PznUIUtils.nls["remove_btn"]),_13c=[],_13d=_139.length;
_13c.push("<div class=\"pznDialogTargetItemSegmentsParent\" >");
_13c.push(PznTargetedItemEdit.addSegmentLinkTemplate.replace(/\$id/g,"pznMultiSegmentsContainerAddSegments"));
if(_13d>0){
_13c.push("<div id=\"pznTargetItemSegmentContainer\" class=\"pznDialogTargetItemSegmentContainer\" role=\"list\">");
_13c.push("<div class=\"pznDialogTargetedItemSegmentMultiItem\">");
_13c.push("<div class=\"pznDialogSegmentGreyBox\">");
for(var i=0;i<_13d;i++){
var _13e=PznUIUtils.escapeHTML(_139[i].right.name),_13f=PznUIUtils.escapeHTML(PznTargetedItemEdit.getSegmentNameFromId(_139[i].right.name)),_140=PznUIUtils.escapeHTML(PznTargetedItemEdit.translateOperatorName(_139[i].operator)),out=PznTargetedItemEdit.multiSegmentDivTemplate.replace(/\$segmentIdHTML/g,_13e).replace(/\$segmentNameHTML/g,_13f).replace(/\$nls_REMOVE/g,_13b).replace(/\$operatorNameHTML/g,_140).replace(/\$index/g,""+i).replace(/\$contextPath/g,_13a);
if(_139[i].operator!="includes"){
out=out.replace(/\$classNames/g,"pznDialogTargetedItemSegmentItemNotMatch pznDialogSegmentControl pznDialogSegmentMultiItemNotMatch").replace(/\$segmentStatusIcon/g,"<img id=\"pznDialogNegIcon"+_13e+"\" class=\"pznDialogTargetedItemSegmentImg\" alt=\"\" src=\""+_13a+"/images/negateSegment.png\">").replace(/\$negate/g,"true");
}else{
out=out.replace(/\$classNames/g,"pznDialogMouseHighlight pznDialogSegmentControl").replace(/\$segmentStatusIcon/g,"<img id=\"pznDialogNegIcon"+_13e+"\" class=\"pznDialogTargetedItemSegmentImg\" alt=\"\" src=\""+_13a+"/images/segmentIcon.png\">").replace(/\$negate/g,"false");
}
_13c.push(out);
}
_13c.push("</div>");
_13c.push("</div>");
_13c.push("<div class=\"lotusClear\"></div>");
_13c.push("</div>");
}
_13c.push("</div>");
PznTargetedItemEdit.EL_TARGETED_ITEM_MULTI_SEGMENTS_CONTAINER.innerHTML=_13c.join("");
};
PznTargetedItemEdit.showOperatorMenu=function(_141,_142,_143,_144){
if(!PznUIUtils.isMenuAvailable(_142)){
return false;
}
var nav=PznUIUtils.getDialogNavigator();
var opt=[{text:PznUIUtils.escapeHTML(PznUIUtils.nls["segments_target_is"])},{text:PznUIUtils.escapeHTML(PznUIUtils.nls["segments_target_not"])},{text:PznUIUtils.escapeHTML(PznUIUtils.nls["segments_target_remove"])}];
if(_144=="true"){
opt[1].selected=true;
}else{
opt[0].selected=true;
}
var _145=PznUIUtils.showPopupMenu(_141,opt,_142,function(_146){
PznTargetedItemEdit.changeOperator(_146,_143);
},{x:-16},null);
return !_145;
};
PznTargetedItemEdit.changeOperator=function(_147,_148){
var _149=PznTargetedItemEdit.getEditModeProfile();
if(!_149){
return;
}
var _14a=_149.getConditions();
var i=parseInt(_148);
if(_14a.length<i){
return;
}
if(_147==2){
_14a.splice(_148,1);
}else{
if(_147==1){
_14a[_148].operator="isNot";
}else{
_14a[_148].operator="includes";
}
}
PznUIUtils.getContentSettings().getRuleDataObject().getEditModeProfile().setConditions(_14a);
PznTargetedItemEdit.renderSegmentsArea();
};
})();
(function(){
SegmentSelector=function(){
};
SegmentSelector._changed=false;
SegmentSelector._showingDesc=false;
SegmentSelector.iframeWidth="";
SegmentSelector.selectedSegments="";
SegmentSelector.jsonSegments=[];
SegmentSelector._elStore={};
SegmentSelector.managedSegments=[];
SegmentSelector.segments=[];
SegmentSelector.indexToFilterClassMap=[];
SegmentSelector.filterOptions=[];
SegmentSelector.nonManagedFilterClass="nonManagedSegmentGroupFilter";
SegmentSelector.managedFilterClass="managedSegmentGroupFilter";
SegmentSelector.libraryFilterClassSuffix="LibraryFilter";
SegmentSelector.segmentsKeyedByHtmlId=new Object();
SegmentSelector.sgmtGrpsKeyedByHtmlId=new Object();
SegmentSelector.availableSegmentDivTemplate=["<div class=\"pznDialogSegmentSelectorSegment pznDialogCursorPointer \" id=\"$segmentIDXml\" "," aria-labelledby=\"$segmentIDXmlSegmentName $segmentIDXmlAddLink\""," onmouseout=\"i$.addClass(i$.byId('$segmentIDJsAddLink'),'pznDialogTransparentText');\""," onmouseover=\"if(!i$.hasClass(i$.byId('$segmentIDXml'),'pznSelected')){i$.removeClass(i$.byId('$segmentIDJsAddLink'),'pznDialogTransparentText');}\""," onblur=\"i$.addClass(i$.byId('$segmentIDJsAddLink'),'pznDialogTransparentText');\""," onfocus=\"if(!i$.hasClass(i$.byId('$segmentIDXml'),'pznSelected')){i$.removeClass(i$.byId('$segmentIDJsAddLink'),'pznDialogTransparentText');}\""," onkeypress=\"if(event.keyCode == 13 || event.charCode == 13){ i$.byId('$segmentIDXml_TitlePane').click()}\" tabindex=\"0\" role=\"treeitem\" aria-level=\"2\" ",">","<div id=\"$segmentIDXml_TitlePane\" onclick=\"if(!i$.hasClass(i$.byId('$segmentIDXml'),'pznSelected'))SegmentSelector.addSegment('$segmentIDJs','includes');else SegmentSelector.removeSegment('$segmentIDJs','$segmentNameJs');\" role=\"button\"onkeypress=\"if(event.keyCode!=9){this.onclick();}\">","<div style=\"display:inline;height:100%;padding:0 0 0 10px\" id=\"$segmentIDXmlAddLink\" class=\"pznDialogSegmentSelectorControl lotusRight pznDialogTransparentText\" >&nbsp;",,PznUIUtils.escapeHTML(PznUIUtils.nls["add_btn"]),"&nbsp;</div>","<span id=\"$segmentIDXmlRemLink\" class=\"pznDialogSegmentSelectorControl lotusRight pznDialogElementDisplayNone\">&nbsp;",,PznUIUtils.escapeHTML(PznUIUtils.nls["remove_btn"]),"&nbsp;</span>","<span id=\"$segmentIDXmlSegmentName\" title=\"$segmentNameXml\" class=\"segmentFilter pznLabel pznDialogFontComputed12px pznSgmtTruncate pznDialogDefaultColorText\">$segmentNameXml</span>","<span class=\"pznDialogSegmentSelectorSegmentDraft\">$segmentDraftXml</span>","</div>","<div class=\"lotusClear\"></div>","</div>"].join("");
(function(){
SegmentFilter=function(_14b,_14c,_14d,_14e,_14f){
this.idx=_14b;
this.title=_14c;
this.filterClass=_14d;
this.parentIdx=_14e;
if(_14f){
this.childrenIndices=_14f;
}else{
this.childrenIndices=[];
}
if(SegmentSelector.filterOptions[_14e]){
PznUIUtils.addSegmentFilterOption(_14c,SegmentSelector.filterOptions[_14e].getTitle());
}else{
PznUIUtils.addSegmentFilterOption(_14c);
}
};
SegmentFilter.prototype={addChildIndex:function(_150){
this.childrenIndices.push(_150);
PznUIUtils.getSegmentFilterOptions()[_150].parentIndex=this.idx;
},getFilterClass:function(){
return this.filterClass;
},getChildrenIndices:function(){
return this.childrenIndices;
},getTitle:function(){
return this.title;
},getIndex:function(){
return this.idx;
},getParentIndex:function(){
return this.parentIdx;
}};
})();
SegmentSelector.showSegmentList=function(){
document.body.style.backgroundColor="#ffffff";
var _151=i$.query("div[id$=\"_Container\"]");
i$.each(_151,function(_152){
_152.innerHTML="";
PznUIUtils.showItem(_152);
});
SegmentSelector.jsonSegments=[];
i$.byId("showTargetedOverViewLinked").onclick=function(){
PznUIUtils.getDialogNavigator().showTargetingOverview(null,PznUIUtils.getDialogNavigator().getCurrentTargetedItemEditPosition());
return false;
};
this.jsonObj=null;
var self=this;
var _153=(i$.isIE)?PznUIUtils.preventCache(PznUIUtils.PznProfilerListUrl):PznUIUtils.PznProfilerListUrl;
i$.xhrGet({url:_153,responseType:"text",sync:true}).then(function(v){
self.jsonObj="{ \"rules\": "+v.data+"}";
},function(e){
PznUIUtils.xhrJsonError({error:e,message:"Error trying to load the PZN Profile List"});
});
SegmentSelector.jsonParser(i$.fromJson(self.jsonObj));
SegmentSelector.addSelectedSegments();
SegmentSelector._changed=false;
SegmentSelector.showInformation();
};
SegmentSelector.hideNonManagedSegments=function(){
PznUIUtils.hideItem(i$.byId("segments"));
};
SegmentSelector.hideManagedSegments=function(){
PznUIUtils.hideItem(i$.byId("managedSegments"));
};
SegmentSelector.showNonManagedSegments=function(){
PznUIUtils.showItem(i$.byId("segments"));
};
SegmentSelector.showManagedSegments=function(){
PznUIUtils.showItem(i$.byId("managedSegments"));
};
SegmentSelector.jsonParser=function(_154){
PznUIUtils.hideItem(i$.byId("pznSegmentProgressLoading"));
PznUIUtils.showItem(i$.byId("pznDialogSegmentsSelectorContainer"));
var _155="";
SegmentSelector.segments=[];
SegmentSelector.managedSegments=[];
PznUIUtils.clearSegmentFilterOptions();
SegmentSelector.indexToFilterClassMap=[];
SegmentSelector.filterOptions=[];
if(!SegmentSelector.previousState||SegmentSelector.previousState.length==0){
SegmentSelector.previousState={};
}
var _156=_154.rules.managed&&_154.rules.managed.length>0;
var _157=_154.rules.legacy&&_154.rules.legacy.length>0;
SegmentSelector.noSegmentsExist=false;
if(!_156&&!_157){
SegmentSelector.hideManagedSegments();
SegmentSelector.hideNonManagedSegments();
SegmentSelector.showNoSegmentsInfo();
SegmentSelector.noSegmentsExist=true;
}else{
if(_156){
if(!_157){
SegmentSelector.hideNonManagedSegments();
i$.byId("managedSegments_TitlePane").children[1].innerHTML=i$.byId("segments_TitlePane").children[1].innerHTML;
SegmentSelector.allSegmentsFilter=SegmentSelector.managedFilter=SegmentSelector.filterOptions[0]=new SegmentFilter(0,PznUIUtils.nls["filter_all_segments"],SegmentSelector.managedFilterClass);
}else{
SegmentSelector.allSegmentsFilter=SegmentSelector.filterOptions[0]=new SegmentFilter(0,PznUIUtils.nls["filter_all_segments"]);
SegmentSelector.allManagedFilter=SegmentSelector.filterOptions[1]=new SegmentFilter(1,PznUIUtils.nls["filter_managed_segments"],SegmentSelector.managedFilterClass);
}
SegmentSelector.showManagedSegments();
SegmentSelector.parseRulesPerLibrary("managedSegments_Container",_154.rules.managed);
SegmentSelector.doA11y(SegmentSelector.sgmtGrpsKeyedByHtmlId);
}
if(_157){
SegmentSelector.showNonManagedSegments();
if(!_156){
SegmentSelector.hideManagedSegments();
SegmentSelector.filterOptions[0]=new SegmentFilter(0,PznUIUtils.nls["filter_all_segments"]);
PznUIUtils.hideItem(i$.byId("pznDialogSgmtContainerTitlePaneLegacy"));
}else{
SegmentSelector.segmentsFilter=SegmentSelector.filterOptions[SegmentSelector.filterOptions.length]=new SegmentFilter(SegmentSelector.filterOptions.length,PznUIUtils.nls["filter_segments"],SegmentSelector.nonManagedFilterClass);
}
var _158=_154.rules.legacy;
var _159=i$.byId("segments_Container");
var _15a=SegmentSelector.escapeHTML(PznUIUtils.nls["prompt_seg_groups"].replace("{0}",_158.length));
_159.setAttribute("aria-label",_15a);
_159.setAttribute("role","tree");
var _15b=SegmentSelector.parseSegmentGroups("segments_Container","",_158,false);
SegmentSelector.doA11y(_15b);
}
}
var _15c=[];
if(!SegmentSelector.isSearchCriteriaDefault()){
if(SegmentSelector.previousState){
_15c=SegmentSelector.previousState.filters;
if(_15c){
i$.forEach(_15c,function(idx){
PznDialogPopupMenu.getInstance().select(idx,true);
});
}else{
PznDialogPopupMenu.getInstance().select(0,true);
PznUIUtils.handleFilterChange(0);
}
}else{
PznDialogPopupMenu.getInstance().select(0,true);
PznUIUtils.handleFilterChange(0);
}
PznDialogPopupMenu.getInstance().setSelectedFilterLabel();
if(SegmentSelector.previousState&&SegmentSelector.previousState.searchString&&SegmentSelector.previousState.searchString.length>0){
i$.byId("pznDialogSearchInput").value=SegmentSelector.previousState.searchString;
}
SegmentSelector.doTypeAhead();
if(SegmentSelector.previousState&&SegmentSelector.previousState.lastAddedSgmt){
var _15d=SegmentSelector.previousState.lastAddedSgmt.split(".")[0];
SegmentSelector.openSection(undefined,_15d);
}
}else{
PznDialogPopupMenu.getInstance().select(0,true);
if(SegmentSelector.previousState&&SegmentSelector.previousState.lastAddedSgmt){
var _15d=SegmentSelector.previousState.lastAddedSgmt.split(".")[0];
SegmentSelector.openSection(undefined,_15d);
}
}
PznUIUtils.resize();
};
SegmentSelector.doA11y=function(_15e){
var _15f=new Array();
var i=0;
i$.each(_15e,function(_160){
_15f.push(SegmentSelector.getHtmlIdFromSgmtGrpId(_160));
});
i=0;
var _161="_TitlePane";
i$.each(_15f,function(_162){
var _163=i$.byId(_162);
var _164="",_165="";
if(i<_15f.length-1){
_164=_15f[i+1]+_161;
}
if(i>0){
_165=_15f[i-1]+_161;
}
titlePaneDiv=i$.byId(_162+_161);
if(titlePaneDiv){
titlePaneDiv.setAttribute("data-a11y-first",_15f[0]+_161);
titlePaneDiv.setAttribute("data-a11y-last",_15f[_15f.length-1]+_161);
titlePaneDiv.setAttribute("data-a11y-up",_165);
titlePaneDiv.setAttribute("data-a11y-down",_164);
var _166=_15f[i]+".";
var _167=i$.query("div[id^='"+_166+"']");
if(_167&&_167.length>0){
titlePaneDiv.setAttribute("data-a11y-next",_167[0].id);
}
i++;
i$.bindDomEvt(titlePaneDiv,"keydown",function(evt){
wpModules.a11y.navigateSequence(this,evt);
});
i$.bindDomEvt(titlePaneDiv,"keydown",function(evt){
var _168=evt.target;
if(evt.keyCode==40){
var _169=_168.getAttribute("data-a11y-down");
if(_169){
var _16a=i$.byId(_169);
if(_16a){
_16a.setAttribute("aria-selected",true);
}
}
}
if(evt.keyCode==38){
var _16b=_168.getAttribute("data-a11y-up");
if(_16b){
var _16c=i$.byId(_16b);
if(_16c){
_16c.setAttribute("aria-selected",true);
}
}
}
if(evt.keyCode==39||evt.charCode==39){
var _16d=_168.id.split("_TitlePane")[0];
SegmentSelector.openSection(evt,_16d);
}
if(evt.keyCode==37||evt.charCode==37){
var _16d=_168.id.split("_TitlePane")[0];
SegmentSelector.closeSection(evt,_16d);
}
if(evt.keyCode==13||evt.charCode==13){
_168.click();
}
});
}
});
};
SegmentSelector.isSearchCriteriaDefault=function(){
var _16e=SegmentSelector.previousState.filters;
return _16e&&_16e.length==1&&_16e[0]==0&&(SegmentSelector.previousState.searchString==undefined||i$.trim(SegmentSelector.previousState.searchString).length==0||SegmentSelector.previousState.searchString=="Find Segment");
};
SegmentSelector.parseRulesPerLibrary=function(_16f,_170){
if(_170.length>0){
i$.byId(_16f).setAttribute("role","tree");
var i=SegmentSelector.filterOptions.length;
var _171=0;
for(var idx=i,_172=0;_172<_170.length;idx++,_172++){
var _173=_170[_172];
var _174=""+_173.libuuid+SegmentSelector.libraryFilterClassSuffix;
var _175=SegmentSelector.getManagedFilterIndex();
SegmentSelector.filterOptions[idx]=new SegmentFilter(idx,_173.libtitle,_174,_175);
if(SegmentSelector.filterOptions[_175]){
SegmentSelector.filterOptions[_175].addChildIndex(idx);
}
SegmentSelector.parseSegmentGroups(_16f,_173.libtitle+"/"+"Segments",_173.rules,_174,true);
_171+=_173.rules.length;
}
var _176=i$.byId("managedSegments_Container");
var _177=SegmentSelector.escapeHTML(PznUIUtils.nls["prompt_managed_seg_groups"].replace("{0}",_171));
_176.setAttribute("aria-label",_177);
_176.setAttribute("role","tree");
}
};
SegmentSelector.getCurrentLibraryTitle=function(){
var rdo=PznUIUtils.getContentSettings().getRuleDataObject();
if(rdo&&rdo.getEditModeProfile()){
contentId=rdo.getEditModeProfile().getName();
}
other=PznWCMStorage.get(contentId).getOther();
if(other.jsonObj.titlepathArray&&other.jsonObj.titlepathArray.length>1){
return other.jsonObj.titlepathArray[0];
}
return undefined;
};
SegmentSelector.parseSegmentGroups=function(_178,_179,_17a,_17b,_17c){
var _17d="_TitlePane";
var _17e=i$.byId(_178);
var _17f=new Object();
for(var i=0;i<_17a.length;i++){
var _180=_17a[i];
var _181=new Array();
var _182=SegmentSelector.escapeHTML(""+_17a[i].uuid).replace(/ /g,"_");
SegmentSelector.sgmtGrpsKeyedByHtmlId[_182]=_17a[i].uuid;
var _183=i$.createDom("div",{"id":_182,},_17e);
if(_17c){
_183.className+=" "+SegmentSelector.managedFilterClass+" "+_17b;
}else{
_183.className+=" "+SegmentSelector.nonManagedFilterClass;
_17f[_182]=_17a[i].uuid;
}
var _184=SegmentSelector.createSgmtGrpTitleBar(_182,_180);
SegmentSelector.processSegments(_182,_179,_180,_181,_17c);
var _185=i$.createDom("div",{"id":_182+"_Container","class":" pznSgmtGrpContainer pznDialogElementDisplayNone"},i$.byId(_182));
SegmentSelector.createSegmentDiv(_185,_179,_181);
SegmentSelector.createSgmtGrpInfo(_185,_180);
for(var j=0;j<_181.length;j++){
var _186=i$.byId(SegmentSelector.getHtmlIdFromSegmentId(_181[j].id));
var _187="",_188="";
if(j<_181.length-1){
_187=SegmentSelector.getHtmlIdFromSegmentId(_181[j+1].id);
}
if(j>0){
_188=SegmentSelector.getHtmlIdFromSegmentId(_181[j-1].id);
}
if(j==_181.length-1){
}
if(_186){
_186.setAttribute("data-a11y-first",SegmentSelector.getHtmlIdFromSegmentId(_181[0].id));
_186.setAttribute("data-a11y-last",SegmentSelector.getHtmlIdFromSegmentId(_181[_181.length-1].id));
_186.setAttribute("data-a11y-up",_188);
_186.setAttribute("data-a11y-down",_187);
_186.setAttribute("data-a11y-prev",_182+"_TitlePane");
i$.bindDomEvt(_186,"keydown",function(evt){
wpModules.a11y.navigateSequence(this,evt);
});
i$.bindDomEvt(_186,"keydown",function(evt){
var _189=evt.target;
if(evt.keyCode==40){
var _18a=_189.getAttribute("data-a11y-down");
var _18b=i$.byId(_18a);
if(_18b){
_18b.setAttribute("aria-selected",true);
}
}
if(evt.keyCode==38){
var _18c=_189.getAttribute("data-a11y-up");
var _18d=i$.byId(_18c);
if(_18d){
_18d.setAttribute("aria-selected",true);
}
}
});
}
}
}
return _17f;
};
SegmentSelector.createSgmtGrpInfo=function(_18e,_18f){
var id=SegmentSelector.getHtmlIdFromSgmtGrpId(_18f.uuid)+"_info";
var _190=i$.createDom("div",{"id":id,"class":" pznDialogDisplayNone"},_18e);
var _191=id+"_TitlePane";
var _192=i$.createDom("div",{"id":id+"_TitlePane","tabindex":0,"role":"treeitem","aria-expanded":false,"aria-label":SegmentSelector.escapeHTML(PznUIUtils.nls["more_details"]),"class":"pznSgmtGrpInfoHeader pznDialogGreyText pznDialogFontComputed11px","onclick":"SegmentSelector.toggleSegmentContainer(event,'"+id+"')","onKeydown":"if(event.keyCode == 13) {event.target.click();}"},_190);
i$.createDom("img",{"id":_191+"Twistee","class":"pznDialogSegmentContainerHide","alt":"","src":PznUIUtils.getContextPath()+"/images/blank.gif",},_192);
_192.innerHTML+=SegmentSelector.escapeHTML(PznUIUtils.nls["more_details"]);
var _193=i$.createDom("div",{"id":id+"_Container","class":"pznDialogGreyText pznDialogFontComputed11px pznDialogElementDisplayNone pznSgmtInfoBorder"},_190);
var desc=_18f.description!=undefined&&_18f.description.length>0?_18f.description:SegmentSelector.escapeHTML(PznUIUtils.nls["no_description"]);
i$.createDom("p",{"class":"pznSgmtInfoPadding","tabindex":"0","aria-label":desc,"role":"treeitem"},_193).innerHTML+=desc;
if(_18f.titlepath){
var _194="";
i$.each(_18f.titlepath,function(_195){
_194+=_195+"/";
});
var _196=SegmentSelector.escapeHTML(PznUIUtils.nls["location_label"]);
i$.createDom("p",{"class":"pznSgmtInfoPadding","tabindex":"0","aria-label":_196+_194,"role":"treeitem"},_193).innerHTML+="<b> "+_196+" </b>"+_194;
}
};
SegmentSelector.createSgmtGrpTitleBar=function(_197,_198){
var _199=SegmentSelector.getHtmlIdFromSgmtGrpId(_198.uuid)+"_TitlePane";
var _19a=_198.titlepath;
var _19b=_198.title?_198.title:_198.name;
var _19c=i$.byId(_197);
var _19d=i$.createDom("div",{"id":_199,"tabindex":0,"aria-level":1,"role":"treeitem","aria-expanded":false,"onclick":"SegmentSelector.toggleSegmentContainer(event,'"+SegmentSelector.getHtmlIdFromSgmtGrpId(_198.uuid)+"')","class":"pznDialogSgmtGrpTitlePane pznDialogDisplayNone"},_19c);
i$.createDom("img",{"id":_199+"Twistee","class":"pznDialogSegmentContainerHide","alt":"","src":PznUIUtils.getContextPath()+"/images/blank.gif",},_19d);
var _19e=i$.createDom("span",{"id":_199+"Text","class":"pznSgmtTruncate",},_19d);
var _19f=i$.createDom("span",{"id":_199+"seperator","class":"pznDialogVerticalAlignMiddle",},_19d);
var _1a0=i$.createDom("span",{"id":_199+"SegCount","class":"pznDialogVerticalAlignMiddle",},_19d);
_19e.title=_19e.innerHTML+=_19b;
_19f.title=_19f.innerHTML=" - ";
var _1a1=_198.profiles&&_198.profiles.length;
_1a0.title=_1a0.innerHTML=_1a1;
_19d.setAttribute("aria-label",_19b);
if(_198.draft){
var _1a2=i$.createDom("span",{"class":"pznDialogSegmentSelectorSegmentDraft"},_19d);
_1a2.innerHTML+=SegmentSelector.escapeHTML(PznUIUtils.nls["seg_draft"]);
}
return _19d;
};
SegmentSelector.getRulesFromAllLibraries=function(_1a3){
var s=new Array();
i$.forEach(_1a3,function(_1a4){
for(var i=0;i<_1a4.rules.length;i++){
s.push(_1a4.rules[i]);
}
});
return s;
};
SegmentSelector.processSegments=function(_1a5,_1a6,_1a7,_1a8,_1a9){
var _1aa=null;
var _1ab=0;
var _1ac={};
_1aa=_1a7.profiles;
var i=0;
_1ab=_1aa.length;
for(;i<_1ab;i++){
var _1ad=_1a7.name;
if(!_1ad){
_1ad=_1a7.title;
}
_1ac={"rulename":""+_1ad,"description":""+_1a7.description,"name":""+_1aa[i].name,"ruleId":""+_1a7.uuid,"id":""+_1a7.uuid+"."+_1aa[i].name,"draft":_1a7.draft};
if(_1a9){
_1ac.titlepath=[].concat.apply(new Array(_1a6),_1a7.titlepath);
}
if(_1a7.draft){
_1ac.draft=_1a7.draft;
}
if(_1a9){
SegmentSelector.managedSegments.push(_1ac);
}else{
SegmentSelector.segments.push(_1ac);
}
_1a8.push(_1ac);
}
};
SegmentSelector.fixDuplicates=function(_1ae){
var _1af=[];
_1af=_1af.concat.apply(_1af,_1ae);
var _1b0=_1af.length;
var i=0;
var _1b1="";
var _1b2=-1;
for(;i<_1b0;i++){
_1b1=_1af[i].rulename;
_1b2=SegmentSelector.nextIndexOf(_1b1,_1af,i);
var _1b3="_TitlePane";
if(_1b2!=-1){
SegmentSelector.showTitlePath(_1af[i].ruleId+_1b3,_1af[i].titlepath);
SegmentSelector.showTitlePath(_1af[_1b2].ruleId+_1b3,_1af[_1b2].titlepath);
_1b2=SegmentSelector.nextIndexOf(_1b1,_1af,_1b2);
while(_1b2!=-1){
SegmentSelector.showTitlePath(_1af[i].ruleId+_1b3,_1af[i].titlepath);
SegmentSelector.showTitlePath(_1af[_1b2].ruleId+_1b3,_1af[_1b2].titlepath);
_1b2=SegmentSelector.nextIndexOf(_1b1,_1af,_1b2);
}
}
}
};
SegmentSelector.showTitlePath=function(_1b4,_1b5){
if(_1b5&&i$.isArray(_1b5)&&_1b5.length>0){
var path="Location: ";
i$.each(_1b5,function(_1b6){
path+=_1b6+"/";
});
var _1b7=i$.byId(_1b4);
if(_1b7){
_1b7.title=path;
}
}
};
SegmentSelector.createSegmentDiv=function(_1b8,_1b9,_1ba){
var _1bb="";
var _1bc="";
var _1bd="";
var _1be="";
var _1bf="";
var _1c0=false;
var _1c1=SegmentSelector.escapeHTML(PznUIUtils.nls["desc_label"])+"&nbsp;&nbsp;";
var _1c2=SegmentSelector.escapeHTML(PznUIUtils.nls["location_label"])+"&nbsp;&nbsp;";
var _1c3=SegmentSelector.escapeHTML(PznUIUtils.nls["seg_draft"]);
var _1c4="";
var _1c5=false;
var _1c6=_1ba.length;
var i=0;
var _1c7;
var _1c8=new Array();
for(;i<_1c6;i++){
_1c7=_1ba[i];
_1bb=SegmentSelector.escapeHTML(""+_1c7.name);
_1bc=SegmentSelector.escapeHTML(""+_1c7.id).replace(/ /g,"_");
_1bd=SegmentSelector.escapeHTML(""+_1c7.description);
_1be=SegmentSelector.escapeJS(""+_1c7.name);
_1bf=SegmentSelector.escapeJS(""+_1c7.id).replace(/ /g,"_");
i$.each(_1c7.titlepath,function(_1c9){
_1c4+=_1c9+"/";
});
SegmentSelector.segmentsKeyedByHtmlId[_1bc]=_1c7.id;
var out=SegmentSelector.availableSegmentDivTemplate.replace(/\$segmentIDXml/g,_1bc).replace(/\$segmentDescriptionLabelXml/g,_1c1).replace(/\$segmentDescriptionXml/g,_1bd).replace(/\$segmentNameJs/g,_1be).replace(/\$segmentIDJs/g,_1bf).replace(/\$segmentNameXml/g,_1bb);
if(_1b9){
out=out.replace(/\$segmentLocationLabelXML /g,_1c2).replace(/\$segmentLocationXml/g,_1c4);
}else{
out=out.replace(/\$segmentLocationLabelXML/g,"").replace(/\$segmentLocationXml/g,"");
}
_1c5=_1c7.draft;
if(_1c5){
out=out.replace(/\$segmentDraftXml/g,_1c3);
}else{
out=out.replace(/\$segmentDraftXml/g,"");
}
_1c8.push(out);
}
i$.createDom("img",{"id":_1bc+"Twistee","class":"pznDialogSegmentContainerHide pznDialogDisplayNone","alt":"","src":PznUIUtils.getContextPath()+"/images/blank.gif",},i$.byId(_1bc));
_1b8.innerHTML=_1c8.join("");
};
SegmentSelector.getSegmentDivForTitleSpanId=function(_1ca){
var _1cb=_1ca.split("SegmentName")[0];
return i$.byId(_1cb);
};
SegmentSelector.openTwistee=function(_1cc){
var _1cd=_1cc+"_TitlePane";
var _1ce=i$.byId(_1cd+"Twistee");
i$.addClass(_1ce,"pznDialogSegmentContainerShow");
i$.removeClass(_1ce,"pznDialogSegmentContainerHide");
var _1cf=i$.byId(_1cd);
if(_1cf){
_1cf.setAttribute("aria-expanded",true);
}
};
SegmentSelector.closeTwistee=function(_1d0){
var _1d1=_1d0+"_TitlePane";
var _1d2=i$.byId(_1d1+"Twistee");
var _1d3=i$.byId(_1d1);
if(_1d3){
_1d3.setAttribute("aria-expanded",false);
}
i$.removeClass(_1d2,"pznDialogSegmentContainerShow");
i$.addClass(_1d2,"pznDialogSegmentContainerHide");
};
SegmentSelector.isTwistee=function(_1d4){
if(_1d4){
var a=_1d4.split("Twistee");
if(a&&a.length>1&&a[a.length-1].length==0){
return true;
}
}
return false;
};
SegmentSelector.toggleSegmentContainer=function(_1d5,_1d6){
var _1d7=i$.byId(_1d6+"_Container");
var _1d8=_1d6+"_TitlePaneTwistee";
if(PznUIUtils.isItemHidden(_1d7)){
SegmentSelector.openSection(_1d5,_1d6);
}else{
SegmentSelector.closeSection(_1d5,_1d6);
}
PznUIUtils.resize();
if(_1d5&&_1d5.target){
if(i$.isIE){
if(_1d5.target.ownerDocument&&_1d5.target.ownerDocument.frames&&_1d5.target.ownerDocument.frames.frameElement&&_1d5.target.ownerDocument.frames.frameElement.contentWindow){
var y=0;
var _1d9=_1d5.target;
if(_1d9.offsetParent){
do{
y+=_1d9.offsetTop;
}while(_1d9=_1d9.offsetParent);
}
_1d5.target.ownerDocument.frames.frameElement.contentWindow.scroll(0,y);
}
}else{
_1d5.target.scrollIntoView();
}
}
};
SegmentSelector.isSectionClosed=function(_1da,_1db){
var _1dc=i$.byId(_1db+"_Container");
return PznUIUtils.isItemHidden(_1dc);
};
SegmentSelector.openSection=function(_1dd,_1de){
var _1df=i$.byId(_1de+"_Container");
PznUIUtils.showItem(_1df);
SegmentSelector.openTwistee(_1de);
};
SegmentSelector.closeSection=function(_1e0,_1e1){
var _1e2=i$.byId(_1e1+"_Container");
PznUIUtils.hideItem(_1e2);
SegmentSelector.closeTwistee(_1e1);
};
SegmentSelector.addSelectedSegments=function(){
if(typeof SegmentSelector.selectedSegments!=="undefined"){
SegmentSelector.selectedSegments=SegmentSelector.selectedSegments.replace(/^\s+|\s+$/g,"").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,"\"").replace(/&#39;/g,"'");
if(SegmentSelector.selectedSegments!==""){
var _1e3=SegmentSelector.selectedSegments.split(",");
var _1e4=_1e3.length;
for(var i=0;i<_1e4;i++){
var li=_1e3[i].lastIndexOf("."),id=_1e3[i].substr(0,li),_1e5=_1e3[i].substr(li+1);
this.addSegment(id,_1e5);
}
}
}
};
SegmentSelector.addSegment=function(id,_1e6){
try{
if(event&&event.target&&event.target.nodeName=="IMG"){
return;
}
}
catch(err){
console.debug("SegmentSelector.addSegment: event is undefined.");
}
if(this.setSegmentSelected(id)){
this.createAddedSegmentDiv(id,_1e6);
SegmentSelector._changed=true;
}
SegmentSelector.showInformation();
SegmentSelector.previousState.lastAddedSgmt=id;
};
SegmentSelector.removeSegment=function(id,name){
try{
if(event&&event.target&&event.target.nodeName=="IMG"){
return;
}
}
catch(err){
console.debug("SegmentSelector.removeSegment: event is undefined.");
}
this.removeAddedSegmentDiv(id);
this.setSegmentUnselected(id);
SegmentSelector._changed=true;
};
SegmentSelector.createAddedSegmentDiv=function(_1e7,_1e8){
var _1e9={"left":{"source":"/.personalization/objects/ibmpersonalization:aoRequest","name":"pzn.targeted.segments","type":"list","isDynamic":"true"},"operator":"includes","right":{"name":"PLACEHOLDER","type":"string"}};
if(SegmentSelector.segmentsKeyedByHtmlId[_1e7]){
_1e9.right.name=SegmentSelector.segmentsKeyedByHtmlId[_1e7];
}else{
_1e9.right.name=_1e7;
}
_1e9.operator=_1e8;
SegmentSelector.jsonSegments.push(_1e9);
};
SegmentSelector.removeAddedSegmentDiv=function(id){
var _1ea=SegmentSelector.jsonSegments.length,_1eb=SegmentSelector.jsonSegments,i=0;
for(;i<_1ea;i++){
if(_1eb[i].right.name==SegmentSelector.segmentsKeyedByHtmlId[id]){
_1eb.splice(i,1);
break;
}
}
SegmentSelector.jsonSegments=_1eb;
};
SegmentSelector.getHtmlIdFromSegmentId=function(_1ec){
var _1ed;
for(key in SegmentSelector.segmentsKeyedByHtmlId){
if(SegmentSelector.segmentsKeyedByHtmlId[key]==_1ec){
_1ed=key;
break;
}
}
return _1ed;
};
SegmentSelector.getHtmlIdFromSgmtGrpId=function(_1ee){
var _1ef;
for(key in SegmentSelector.sgmtGrpsKeyedByHtmlId){
if(SegmentSelector.sgmtGrpsKeyedByHtmlId[key]==_1ee){
_1ef=key;
break;
}
}
return _1ef;
};
SegmentSelector.setSegmentSelected=function(_1f0){
var _1f1=SegmentSelector.getHtmlIdFromSegmentId(_1f0);
if(!_1f1){
_1f1=_1f0;
}
var _1f2=i$.byId(_1f1),_1f3=i$.byId(_1f1+"AddLink"),_1f4=i$.byId(_1f1+"RemLink");
if(!_1f2){
return false;
}
i$.addClass(_1f2,"pznSelected");
_1f2.setAttribute("aria-labelledby",_1f1+"SegmentName "+_1f1+"RemLink");
PznUIUtils.hideItem(_1f3);
PznUIUtils.showItem(_1f4);
return true;
};
SegmentSelector.setSegmentUnselected=function(_1f5){
var _1f6=_1f5;
var _1f7=i$.byId(_1f6),_1f8=i$.byId(_1f6+"AddLink"),_1f9=i$.byId(_1f6+"RemLink");
if(!_1f7){
return false;
}
i$.removeClass(_1f7,"pznSelected");
_1f7.setAttribute("aria-labelledby",_1f6+"SegmentName "+_1f6+"AddLink");
PznUIUtils.showItem(_1f8);
PznUIUtils.hideItem(_1f9);
SegmentSelector.showInformation();
return true;
};
SegmentSelector.showInformation=function(){
if(!PznUIUtils.isInfoMode()){
return;
}
var _1fa=(SegmentSelector.segments)?SegmentSelector.segments.length>0:false,_1fb=(SegmentSelector.managedSegments)?SegmentSelector.managedSegments.length>0:false,_1fc=i$.byId("pznDialogSegmentsInfo"),_1fd=i$.byId("pznSelectedSegmentsNoSelectionInfo");
var _1fe=i$.byId("pznDialogSearchInput").value;
if(!(_1fe==SegmentSelector.escapeHTML(PznUIUtils.nls["type_to_find_segments"]))&&_1fe!=""){
SegmentSelector.doTypeAhead();
}else{
if(_1fa||_1fb){
PznUIUtils.showItem(_1fc);
PznUIUtils.hideItem(_1fd);
}else{
PznUIUtils.showItem(_1fd);
PznUIUtils.hideItem(_1fc);
}
SegmentSelector.hideNotFoundSegmentsInfo();
PznUIUtils.resize();
}
};
SegmentSelector.showDescriptions=function(show){
var link=i$.byId("pznDialogSegementSelectorDescriptionLink");
link.innerHTML="";
var _1ff=i$.query("div[id^='pznAvailableSegmentsContainer']");
i$.each(_1ff,function(_200){
var divs=_200.getElementsByTagName("span");
var l=divs.length;
for(var i=0;i<l;i++){
if(divs[i].id.indexOf("pznDescription")>-1){
if(show){
PznUIUtils.showItem(divs[i]);
}else{
PznUIUtils.hideItem(divs[i]);
}
}
}
});
if(show){
link.innerHTML=PznUIUtils.escapeHTML(PznUIUtils.nls["hide_segment_descriptions_btn"]);
}else{
link.innerHTML=PznUIUtils.escapeHTML(PznUIUtils.nls["show_segment_descriptions_btn"]);
}
SegmentSelector._showingDesc=show;
PznUIUtils.resize();
};
SegmentSelector.toggleDescriptions=function(){
if(SegmentSelector._showingDesc){
SegmentSelector.showDescriptions(false);
}else{
SegmentSelector.showDescriptions(true);
}
};
SegmentSelector.getFilterClassForIndex=function(_201){
if(SegmentSelector.filterOptions[_201]){
return SegmentSelector.filterOptions[_201].getFilterClass();
}else{
console.debug("SegmentSelector.filterOptions["+_201+"] doesnt exist");
return undefined;
}
};
SegmentSelector.doTypeAhead=function(_202){
if(SegmentSelector.noSegmentsExist){
return;
}
var _203=false;
var _204=false;
var _205=false;
SegmentSelector._changed=true;
var str=i$.byId("pznDialogSearchInput").value;
if(str==SegmentSelector.escapeHTML(PznUIUtils.nls["type_to_find_segments"])){
str="";
}
var _206=new RegExp(str.replace("^\\s*",""),"i");
var _207=[];
if(PznDialogPopupMenu.getInstance().isHidden()){
_207=PznDialogPopupMenu.getInstance().getSelectedIndices();
}else{
i$.each(i$.query("img[class*= 'pznDialogPopupMenuSelectedImg']"),function(_208){
_207.push(parseInt(_208.parentNode.getAttribute("menuindex")));
});
}
if(_207&&_207.length>0){
var _209=_207.indexOf(0)>-1;
var _20a=_207.indexOf(SegmentSelector.filterOptions.indexOf(SegmentSelector.allManagedFilter))>-1;
var _20b=_207.indexOf(SegmentSelector.filterOptions.indexOf(SegmentSelector.segmentsFilter))>-1;
if(_209){
_203=SegmentSelector.searchSegmentGroups(_206,true);
_204=SegmentSelector.searchSegmentGroups(_206,false);
}else{
if(_20b){
_204=SegmentSelector.searchSegmentGroups(_206,false);
}else{
SegmentSelector.hideNonManagedSegments();
}
if(_20a){
_203=SegmentSelector.searchSegmentGroups(_206,true);
}else{
var _20c=[];
i$.each(_207,function(_20d){
var _20e=SegmentSelector.getFilterClassForIndex(_20d);
if(_20e.indexOf(SegmentSelector.libraryFilterClassSuffix)>-1){
_20c.push(_20e);
}
});
if(_20c.length>0){
_203=SegmentSelector.searchSegmentGroups(_206,true,_20c);
}else{
SegmentSelector.hideManagedSegments();
}
}
}
}
if(!_203&&!_204){
SegmentSelector.hideNoSegmentsInfo();
SegmentSelector.hideManagedSegments();
SegmentSelector.hideNonManagedSegments();
SegmentSelector.hideAddSegmentsInfomodeMessage();
SegmentSelector.showNotFoundSegmentsInfo();
}else{
SegmentSelector.hideNoSegmentsInfo();
SegmentSelector.hideNotFoundSegmentsInfo();
if(PznUIUtils.isInfoMode()){
SegmentSelector.showAddSegmentsInfomodeMessage();
}
if(_203){
SegmentSelector.showManagedSegments();
}
if(_204){
SegmentSelector.showNonManagedSegments();
}
}
PznUIUtils.resize();
};
SegmentSelector.searchSegmentGroups=function(_20f,_210,_211){
var _212=false;
var _213,_214;
if(_210){
_213=i$.byId("managedSegments_Container");
_214=SegmentSelector.managedFilterClass;
}else{
_213=i$.byId("segments_Container");
_214=SegmentSelector.nonManagedFilterClass;
}
if(_213){
var _215=i$.query("div[class*=\""+_214+"\"]");
i$.forEach(i$.query("div[class*=\""+_214+"\"]:(div[class*=\"pznDialogElementDisplayNone\"])"),function(_216){
PznUIUtils.showItem(_216);
i$.forEach(i$.query("div[class*=\"pznDialogSegmentSelectorSegment\"]:(div[class*=\"pznDialogElementDisplayNone\"])",_216),function(_217){
PznUIUtils.showItem(_217);
});
});
var _218=false;
if(_211){
_218=i$.some(_211,function(_219){
if(_219.indexOf(SegmentSelector.libraryFilterClassSuffix)>0){
return true;
}
});
}
if(_218){
var _21a="div[class*=\""+_214+"\"]";
i$.forEach(_211,function(_21b){
_21a+=":not(div[class*=\""+_21b+"\"])";
});
i$.forEach(i$.query(_21a),function(_21c){
PznUIUtils.hideItem(_21c);
if(_215.indexOf(_21c)>-1){
_215.splice(_215.indexOf(_21c),1);
}
});
}
i$.each(_215,function(_21d){
var _21e=i$.byId(_21d.id+"_TitlePane");
var _21f=_21e.childNodes[1].textContent;
if(_20f.test(_21f)){
_212=true;
SegmentSelector.closeSection(undefined,_21d.id);
}else{
_212|=SegmentSelector.searchSegmentsForGroup(_21d,_20f);
}
SegmentSelector.updateSgmtCount(_21d);
return;
});
if(!_212){
if(_210){
SegmentSelector.hideManagedSegments();
}else{
SegmentSelector.hideNonManagedSegments();
}
}
}
return _212;
};
SegmentSelector.searchSegmentsForGroup=function(_220,_221){
var _222=false;
var _223=i$.byId(_220.id+"_Container");
if(_223){
var _224=i$.query("span[class^=\"segmentFilter\"]",_223);
i$.each(_224,function(_225){
var _226=SegmentSelector.getSegmentDivForTitleSpanId(_225.id);
if(_221.test(_225.innerHTML)){
_222=true;
SegmentSelector.openSection(undefined,_220.id);
PznUIUtils.showItem(_226);
return;
}else{
PznUIUtils.hideItem(_226);
_222|=false;
}
});
if(!_222){
PznUIUtils.hideItem(_220);
}
}
return _222;
};
SegmentSelector.searchLibrarySegmentGroups=function(_227,_228){
var _229=false;
var _22a=i$.query("div[class*=\""+_227+"\"]");
i$.each(_22a,function(_22b){
var _22c=i$.byId(_22b.id+"_TitlePane");
var _22d=_22c.childNodes[1].textContent;
if(_228.test(_22d)){
_229=true;
return;
}else{
_229|=SegmentSelector.searchManagedSegmentsForGroup(managedSgmtGrp,_228);
}
});
return _229;
};
SegmentSelector.updateSgmtCount=function(_22e){
var _22f=i$.query("div[class *='pznDialogSegmentSelectorSegment']:not(div[class *='pznDialogElementDisplayNone'])",_22e);
if(_22f&&_22f.length>0){
var _230=i$.byId(_22e.id+"_TitlePaneSegCount");
if(_230){
_230.innerHTML=_22f.length;
}
}
};
SegmentSelector.showNoSegmentsInfo=function(){
PznUIUtils.showItem(i$.byId("pznSelectedSegmentsNoSelectionInfo"));
};
SegmentSelector.hideNoSegmentsInfo=function(){
PznUIUtils.hideItem(i$.byId("pznSelectedSegmentsNoSelectionInfo"));
};
SegmentSelector.showAddSegmentsInfomodeMessage=function(){
PznUIUtils.showItem(i$.byId("pznDialogSegmentsInfo"));
};
SegmentSelector.hideAddSegmentsInfomodeMessage=function(){
PznUIUtils.hideItem(i$.byId("pznDialogSegmentsInfo"));
};
SegmentSelector.showNotFoundSegmentsInfo=function(){
PznUIUtils.showItem(i$.byId("pznSelectedSegmentsNotFoundInfo"));
};
SegmentSelector.hideNotFoundSegmentsInfo=function(){
PznUIUtils.hideItem(i$.byId("pznSelectedSegmentsNotFoundInfo"));
};
SegmentSelector.resetTypeAhead=function(){
i$.byId("pznDialogSearchInput").value="";
SegmentSelector.doTypeAhead();
};
SegmentSelector.getNonManagedFilterIndex=function(){
for(var i=0;i<SegmentSelector.filterOptions.length;i++){
filter=SegmentSelector.filterOptions[i];
if(filter.filterClass==SegmentSelector.nonManagedFilterClass){
return filter.getIndex();
}
}
return -1;
};
SegmentSelector.getManagedFilterIndex=function(){
for(var i=0;i<SegmentSelector.filterOptions.length;i++){
filter=SegmentSelector.filterOptions[i];
if(filter.filterClass==SegmentSelector.managedFilterClass){
return filter.getIndex();
}
}
return -1;
};
SegmentSelector.haveManagedSegments=function(){
return (SegmentSelector.managedSegments)?SegmentSelector.managedSegments.length>0:false;
};
SegmentSelector.haveNonManagedSegments=function(){
return (SegmentSelector.segments)?SegmentSelector.segments.length>0:false;
};
SegmentSelector.setBannerTitle=function(_231){
i$.byId("pznSegmentSelectorBannerTitle").innerHTML=_231;
};
SegmentSelector.Save=function(){
if(SegmentSelector._changed||PznDialogPopupMenu.getInstance().isDirty()){
var rd=PznUIUtils.getContentSettings().getRuleDataObject();
if(rd&&rd.getEditModeProfile()){
if(SegmentSelector.jsonSegments){
rd.getEditModeProfile().setConditions(SegmentSelector.jsonSegments);
}
}
SegmentSelector.previousState.filters=PznDialogPopupMenu.getInstance().getSelectedIndices();
SegmentSelector.previousState.searchString=i$.byId("pznDialogSearchInput").value;
PznUIUtils.openSegLibState=i$.toJson(SegmentSelector.previousState);
}
SegmentSelector._changed=false;
PznUIUtils.getDialogNavigator().showTargetingOverview(null,PznUIUtils.getDialogNavigator().getCurrentTargetedItemEditPosition());
return false;
};
SegmentSelector.Cancel=function(){
SegmentSelector._changed=false;
PznUIUtils.getDialogNavigator().showTargetingOverview(null,PznUIUtils.getDialogNavigator().getCurrentTargetedItemEditPosition());
return false;
};
SegmentSelector.escapeHTML=function(text){
return text.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");
};
SegmentSelector.escapeJS=function(text){
return text.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\"/g,"\\\"").replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");
};
SegmentSelector.nextIndexOf=function(text,_232,_233){
var len=_232.length;
var i=_233+1;
for(;i<len;i++){
if(_232[i].rulename==text){
return i;
}
}
return -1;
};
})();
(function(){
PznDialogPopupMenu=function(){
this.keyPos=null;
this.parent=null;
this.popupDiv=PznUIUtils.EL_DIALOG_POPUP_MENU;
this.menuContainer=PznUIUtils.EL_DIALOG_POPUP_MENU_CONTAINER;
this.mouseActive=null;
this.callback=null;
this.disabled=null;
this.multiSelect=false;
this.selectedIndices=[];
this._dirty=false;
};
PznDialogPopupMenu._pznDialogPopupMenu=null;
PznDialogPopupMenu.getInstance=function(){
if(!PznDialogPopupMenu._pznDialogPopupMenu){
PznDialogPopupMenu._pznDialogPopupMenu=new PznDialogPopupMenu();
}
return PznDialogPopupMenu._pznDialogPopupMenu;
};
PznDialogPopupMenu.prototype={show:function(_234,_235,evt,_236,_237,_238,args){
if(!this.popupDiv){
this.popupDiv=PznUIUtils.EL_DIALOG_POPUP_MENU;
}
if(!this.menuContainer){
this.menuContainer=PznUIUtils.EL_DIALOG_POPUP_MENU_CONTAINER;
}
if(this.parent){
if(this.parent!=_234){
this.hide(true);
}
}
this.args=(args)?args:{};
if(!this.args.positionAt){
this.args.positionAt=_234;
}
if(this.args.multiSelect){
this.multiSelect=true;
}
this.ieBodyFocus=true;
this.parent=_234;
var ref=this;
this.parent.focus();
this.parent.onblur=function(){
if((i$.isIE&&ref.ieBodyFocus)||!ref.hide(false)){
ref.ieBodyFocus=false;
setTimeout(function(){
ref.parent.focus();
},10);
}
};
this.callback=_236;
this.disabled=_238;
if(PznUIUtils.isItemHidden(this.popupDiv)){
this.cleanPopup();
if(_235&&_235.length>0){
var _239=-1,len=_235.length;
for(var i=0;i<len;i++){
if(_235[i].separator){
i$.createDom("hr",{"class":"pznDialogPopupMenuItemSeparator"},this.menuContainer);
}
var mi=i$.createDom("div",{"menuIndex":i,"id":i,"aria-selected":"false","role":"option",},this.menuContainer),out=["<img src=\""+PznUIUtils.getContextPath()+"/images/blank.gif\" class=\"pznDialogPopupMenuItemImg"];
if(_235[i].selected||(this.args&&this.args.multiSelect&&this.selectedIndices&&this.selectedIndices.indexOf(i)>-1)){
out.push(" pznDialogPopupMenuSelectedImg");
mi.setAttribute("aria-selected","true");
_239=i;
if(this.args&&this.args.multiSelect&&this.selectedIndices.indexOf(parseInt(i))==-1){
this.selectedIndices.push(parseInt(i));
}
}
out.push("\" alt=\"\" >");
out.push(_235[i].text);
if(_235[i].parentIndex&&_235[i].parentIndex>-1){
}
mi.innerHTML=out.join("");
i$.addClass(mi,"pznDialogPopupMenuItem");
if(_235[i].parentIndex!=undefined&&_235[i].parentIndex>-1){
i$.addClass(mi,"pznDialogPopupSubMenuBtn");
}
if(this.isPositionDisabled(i)){
i$.addClass(mi,"pznDialogDisabledItemText");
}
i$.bindDomEvt(mi,"click",function(evt){
ref.keyPos=ref.getEventMenuIndex(evt);
ref.setValue();
return false;
});
i$.bindDomEvt(mi,"mouseout",function(){
ref.mouseOut();
});
i$.bindDomEvt(mi,"mouseover",function(evt){
var i=ref.getEventMenuIndex(evt);
ref.mouseOver(i);
});
}
PznUIUtils.showItem(this.popupDiv);
this.setMenuPosition(_237);
if(_239>-1){
this.keyPos=_239;
this.setSelected();
}else{
for(var a=0;a<len;a++){
if(!this.isPositionDisabled(a)){
this.keyPos=a;
this.setSelected();
break;
}
}
}
}
}else{
if(evt.keyCode==38&&evt.altKey){
this.hide(true);
}
if(evt.keyCode==40){
if(typeof this.keyPos==="undefined"){
this.keyPos=0;
}else{
this.keyPos++;
}
this.setSelected();
}else{
if(evt.keyCode==38){
if(typeof this.keyPos==="undefined"){
this.keyPos=this.menuContainer.getElementsByTagName("div").length-1;
}else{
this.keyPos--;
}
this.setSelected();
}else{
if(evt.keyCode==13||evt.keyCode==39){
if(typeof this.keyPos!=="undefined"){
this.setValue();
}
}else{
if(evt.keyCode==27||evt.keyCode==37){
this.hide(true);
}
}
}
}
}
if(_235&&_235.length>1){
var _23a=(String.fromCharCode(evt.keyCode)).toLowerCase();
valueText="",checkPos=0;
for(var i=0;i<_235.length;i++){
valueText=_235[i].text;
if(valueText){
if(PznUIUtils.isRTL()){
checkPos=valueText.length-1;
}
if((_23a==(valueText.charAt(checkPos)).toLowerCase())){
this.selectByLetter(this.keyPos,_23a,_235);
break;
}
}
}
}
},isHidden:function(){
return PznUIUtils.isItemHidden(this.popupDiv);
},select:function(_23b,_23c){
var _23d=i$.byId(_23b);
_23b=parseInt(_23b);
if(_23d){
if(_23c){
i$.addClass(_23d.childNodes[0],"pznDialogPopupMenuSelectedImg");
if(this.selectedIndices.indexOf(_23b)==-1){
this.selectedIndices.push(_23b);
}
}else{
if(i$.hasClass(_23d.childNodes[0],"pznDialogPopupMenuSelectedImg")){
i$.removeClass(_23d.childNodes[0],"pznDialogPopupMenuSelectedImg");
if(this.selectedIndices.indexOf(_23b)>-1){
this.selectedIndices.splice(this.selectedIndices.indexOf(_23b),1);
}
}else{
i$.addClass(_23d.childNodes[0],"pznDialogPopupMenuSelectedImg");
if(this.selectedIndices.indexOf(_23b)==-1){
this.selectedIndices.push(_23b);
}
}
}
PznUIUtils.resize();
}else{
if(_23c){
if(this.selectedIndices.indexOf(_23b)==-1){
this.selectedIndices.push(_23b);
}
}
}
this._dirty=true;
},isSelected:function(idx){
var _23e=i$.byId(idx);
idx=parseInt(idx);
if(_23e){
return i$.hasClass(_23e.childNodes[0],"pznDialogPopupMenuSelectedImg");
}else{
return this.selectedIndices&&this.selectedIndices.length>0&&this.selectedIndices.indexOf(idx)>-1;
}
},unSelect:function(idx){
var _23f=i$.byId(idx);
idx=parseInt(idx);
if(_23f){
i$.removeClass(_23f.childNodes[0],"pznDialogPopupMenuSelectedImg");
if(this.selectedIndices.indexOf(idx)>-1){
this.selectedIndices.splice(this.selectedIndices.indexOf(idx),1);
}
}
this._dirty=true;
},isDirty:function(){
return this._dirty;
},toggle:function(idx){
var _240=i$.byId(idx);
if(i$.hasClass(_240.childNodes[0],"pznDialogPopupMenuSelectedImg")){
PznDialogPopupMenu.getInstance().unSelect(idx);
}else{
PznDialogPopupMenu.getInstance().select(idx);
}
},selectByLetter:function(elem,_241,_242){
var _243=this.keyPos,_244=this.getStartCharacterPosition(_242[this.keyPos]);
if(_241==(_242[this.keyPos].text.charAt(_244)).toLowerCase()){
if(this.keyPos==2){
_243=0;
}else{
_243++;
}
if(_242[_243]){
_244=this.getStartCharacterPosition(_242[_243]);
if(_241==(_242[_243].text.charAt(_244)).toLowerCase()){
this.keyPos=_243;
this.setSelected();
}else{
if(_243==2){
_243=0;
}else{
_243++;
}
if(_242[_243]){
_244=this.getStartCharacterPosition(_242[_243]);
if(_241==(_242[_243].text.charAt(_244)).toLowerCase()){
this.keyPos=_243;
this.setSelected();
}
}
}
}
}else{
var i;
for(i=0;i<_242.length;i++){
_244=this.getStartCharacterPosition(_242[i]);
if(_241==(_242[i].text.charAt(_244)).toLowerCase()){
break;
}
}
this.keyPos=i;
this.setSelected();
}
},getStartCharacterPosition:function(_245){
if(PznUIUtils.isRTL()){
return _245.text.length-1;
}else{
return 0;
}
},isPositionDisabled:function(pos){
if(this.disabled){
var dl=this.disabled.length;
for(var i=0;i<dl;i++){
if(pos==this.disabled[i]){
return true;
}
}
}
return false;
},getEventMenuIndex:function(evt){
var _246=null;
if(evt.target){
if(evt.target.hasAttribute("menuIndex")){
_246=evt.target.getAttribute("menuIndex");
}else{
_246=evt.target.parentNode.getAttribute("menuIndex");
}
}else{
if(evt.srcElement){
if(evt.srcElement.hasAttribute("menuIndex")){
_246=evt.srcElement.getAttribute("menuIndex");
}else{
_246=evt.srcElement.parentNode.getAttribute("menuIndex");
}
}
}
return _246;
},setMenuPosition:function(_247){
var obj=this.args.positionAt,rtl=PznUIUtils.isRTL(),_248=obj.offsetWidth,top=0,left=0;
if(!isNaN(obj.offsetHeight)){
top+=obj.offsetHeight;
}
while(obj&&!isNaN(obj.offsetTop)&&!isNaN(obj.offsetLeft)){
top+=obj.offsetTop-obj.scrollTop;
left+=obj.offsetLeft-obj.scrollLeft;
obj=obj.offsetParent;
}
var pr;
if(rtl){
pr=left+_248;
left=pr-this.popupDiv.offsetWidth;
}
if(_247){
if(_247.x){
left+=(rtl)?-_247.x:_247.x;
}
if(_247.y){
top+=(rtl)?-_247.y:_247.y;
}
if(top<0){
top=0;
}
if(left<0){
left=0;
}
if(pr&&pr<left+this.popupDiv.offsetWidth){
left-=(left+this.popupDiv.offsetWidth-pr);
}
}
this.popupDiv.style.top=(top+5)+"px";
this.popupDiv.style.left=(left+0)+"px";
},setSelected:function(){
var mc=this.menuContainer,_249=mc.getElementsByTagName("div"),c=_249.length,pos=this.keyPos;
if(pos>(c-1)){
pos=0;
}
if(pos<0){
pos=c-1;
}
if(this.isPositionDisabled(pos)){
for(var a=0;a<c;a++){
if(a!=pos){
if(!this.isPositionDisabled(a)){
pos=a;
break;
}
}
}
}
this.keyPos=pos;
for(var i=0;i<c;i++){
i$.removeClass(_249[i],"pznDialogPopupMenuSelected");
}
i$.addClass(_249[pos],"pznDialogPopupMenuSelected");
if(this.parent){
this.parent.setAttribute("aria-activedescendant",pos);
}
},setValue:function(){
if(!this.isPositionDisabled(this.keyPos)){
if(this.callback){
this.callback(this.keyPos);
}
if(this.args&&this.args.multiSelect){
this.hide(false);
}else{
this.hide(true);
this.parent.focus();
}
}
},mouseOver:function(pos){
this.keyPos=pos;
this.setSelected();
this.mouseActive=true;
},mouseOut:function(){
this.mouseActive=false;
},getSelectedIndices:function(){
return this.selectedIndices;
},hide:function(_24a){
if(!_24a&&this.mouseActive){
return false;
}
var _24b=this.selectedIndices;
if(this.args&&this.args.multiSelect){
i$.each(i$.query("img[class*= 'pznDialogPopupMenuSelectedImg']"),function(_24c){
var idx=parseInt(_24c.parentNode.getAttribute("menuindex"));
if(_24b.indexOf(idx)==-1){
_24b.push(_24c.parentNode.getAttribute("menuindex"));
}
});
this.setSelectedFilterLabel();
}
this.mouseActive=false;
PznUIUtils.hideItem(this.popupDiv);
this.cleanPopup();
this.keyPos=null;
PznUIUtils.resize();
return true;
},setSelectedFilterLabel:function(){
var _24d;
if(this.isSelected(0)&&SegmentSelector.filterOptions[0]){
_24d=SegmentSelector.filterOptions[0].getTitle();
}else{
if(this.selectedIndices.length==1&&SegmentSelector.filterOptions[this.selectedIndices[0]]){
_24d=SegmentSelector.filterOptions[this.selectedIndices[0]].getTitle();
}else{
if(this.selectedIndices.length>1){
var _24e=this.selectedIndices;
var _24f=[];
i$.forEach(SegmentSelector.filterOptions,function(_250){
if(_24f.indexOf(_250.getIndex())==-1){
_24f.push(_250.getIndex());
}
});
var _251=[];
var _252=this;
i$.forEach(_24e,function(idx){
if(SegmentSelector.filterOptions[idx]){
var _253=SegmentSelector.filterOptions[idx].getChildrenIndices();
_24e=_24e.filter(function(el){
return _253.indexOf(el)<0;
});
if(_253&&_253.length>0){
_251=_24f.filter(function(el){
return _253.indexOf(el)<0;
});
_251.splice(_251.indexOf(0),1);
if(_24e.length>1&&_24e.length==_251.length){
_24d=SegmentSelector.filterOptions[0].getTitle();
_252.select(0);
return false;
}else{
if(_24e.length==1){
_24d=SegmentSelector.filterOptions[_24e[0]].getTitle();
}
}
}else{
var _254=SegmentSelector.filterOptions[idx].getParentIndex();
if((_254==0||_254==1)&&_24e.indexOf(_254)==-1){
_24d=PznUIUtils.escapeHTML(PznUIUtils.nls["filter_custom"]);
return false;
}
}
}
});
if(_24d&&i$.trim(_24d).length==0){
_24d=PznUIUtils.escapeHTML(PznUIUtils.nls["filter_custom"]);
}
}else{
_24d=PznUIUtils.escapeHTML(PznUIUtils.nls["filter_none"]);
}
}
}
if(_24d==undefined||i$.trim(_24d).length==0){
_24d=PznUIUtils.escapeHTML(PznUIUtils.nls["filter_none"]);
}
i$.byId("pznSgmtFilterSelected").innerHTML=_24d;
},cleanPopup:function(){
while(this.menuContainer.firstChild){
this.menuContainer.removeChild(this.menuContainer.firstChild);
}
}};
})();


}catch(e){console.log("Module 'wp_content_targeting_cam': ",e);}