text: BX.namespace("BX.Landing");BX.Landing.EditComponent=function(){this.actionCloseId=BX("action-close");if(this.actionCloseId){BX.bind(this.actionCloseId,"click",BX.delegate(this.actionClose,this))}};BX.Landing.EditComponent.prototype={actionClose:function(){if(typeof top.BX.SidePanel!=="undefined"){setTimeout(function(){top.BX.SidePanel.Instance.close()},300);top.BX.SidePanel.Instance.postMessage(window,"landingEditClose",{})}}};BX.Landing.SelectColor=function(e){this.id=e.id?e.id:"";this.options=e.options?e.options:[];this.value=e.value?e.value:"";this.DOM={}};BX.Landing.SelectColor.prototype={show:function(){this.checkValue();this.initSectionSelector()},checkValue:function(){if(!this.options[this.value]){this.value=Object.keys(this.options)[0]}},initSectionSelector:function(){this.DOM.sectionWrap=BX(this.id+"_select_color_wrap");this.DOM.sectionInput=BX(this.id+"_select_color");this.DOM.sectionSelect=this.DOM.sectionWrap.appendChild(BX.create("DIV",{props:{className:"select-color-field"}}));this.DOM.sectionSelectInner=this.DOM.sectionSelect.appendChild(BX.create("DIV",{props:{className:"select-color-field-icon"},style:{backgroundColor:this.options[this.value].color}}));this.DOM.sectionSelectInnerText=this.DOM.sectionSelect.appendChild(BX.create("SPAN",{text:this.options[this.value].name}));BX.bind(this.DOM.sectionSelect,"click",n);var e=this,t=this.options;function n(){if(e.sectionMenu&&e.sectionMenu.popupWindow&&e.sectionMenu.popupWindow.isShown()){return e.sectionMenu.close()}var n,o=[],i;for(var s in t){o.push({id:"bx-select-color-option-"+s,text:BX.util.htmlspecialchars(t[s].name),color:t[s].color,className:"select-color-popup-menu-item "+(t[s].class?t[s].class:""),onclick:function(n){return function(){var o=t[n];e.DOM.sectionInput.value=n;e.DOM.sectionSelectInner.style.backgroundColor=o.color;e.DOM.sectionSelectInnerText.innerHTML=BX.util.htmlspecialchars(o.name);e.sectionMenu.close()}}(s)})}e.sectionMenu=BX.PopupMenu.create("selectColor"+e.id,e.DOM.sectionSelect,o,{closeByEsc:true,autoHide:true,offsetTop:0,offsetLeft:0});e.sectionMenu.popupWindow.contentContainer.style.maxHeight="300px";e.sectionMenu.popupWindow.setWidth(e.DOM.sectionSelect.offsetWidth-2);e.sectionMenu.show();for(n=0;n<e.sectionMenu.menuItems.length;n++){if(e.sectionMenu.menuItems[n].layout.item){i=e.sectionMenu.menuItems[n].layout.item.querySelector(".menu-popup-item-icon");if(i){i.style.backgroundColor=e.sectionMenu.menuItems[n].color}}}BX.addClass(e.DOM.sectionSelect,"active");BX.addCustomEvent(e.sectionMenu.popupWindow,"onPopupClose",function(){BX.removeClass(e.DOM.sectionSelect,"active");e.sectionMenu=null;BX.PopupMenu.destroy("selectColor"+e.id)})}}};BX.Landing.SelectLang=function(e){this.id=e.id?e.id:"";this.options=e.options?e.options:[];this.value=e.value?e.value:"";this.DOM={}};BX.Landing.SelectLang.prototype={show:function(){this.initSectionSelector()},initSectionSelector:function(){this.DOM.sectionWrap=BX(this.id+"_select_lang_wrap");this.DOM.sectionInput=BX(this.id+"_select_lang");this.DOM.sectionSelect=this.DOM.sectionWrap.appendChild(BX.create("DIV",{props:{className:"select-lang-field"}}));this.DOM.sectionSelectInnerText=this.DOM.sectionSelect.appendChild(BX.create("SPAN",{text:this.options[this.value]}));BX.bind(this.DOM.sectionSelect,"click",n);var e=this,t=this.options;function n(){if(e.sectionMenu&&e.sectionMenu.popupWindow&&e.sectionMenu.popupWindow.isShown()){return e.sectionMenu.close()}var n=[];for(var o in t){n.push({id:"bx-select-color-option-"+o,text:BX.util.htmlspecialchars(t[o]),className:"language-icon menu-popup-no-icon",onclick:function(n){return function(){var o=t[n];e.DOM.sectionInput.value=n;e.DOM.sectionSelectInnerText.innerHTML=BX.util.htmlspecialchars(o);e.sectionMenu.close()}}(o)})}e.sectionMenu=BX.PopupMenu.create("selectLang"+e.id,e.DOM.sectionSelect,n,{closeByEsc:true,autoHide:true,offsetTop:0,offsetLeft:0});e.sectionMenu.popupWindow.contentContainer.style.maxHeight="300px";e.sectionMenu.popupWindow.setWidth(e.DOM.sectionSelect.offsetWidth-2);e.sectionMenu.show();BX.addClass(e.DOM.sectionSelect,"active");BX.addCustomEvent(e.sectionMenu.popupWindow,"onPopupClose",function(){BX.removeClass(e.DOM.sectionSelect,"active");e.sectionMenu=null;BX.PopupMenu.destroy("selectLang"+e.id)})}}};BX.ready(function(){var e=[].slice.call(document.querySelectorAll(".landing-frame-btn"));for(var t=0,n=e.length;t<n;t++){BX.bind(e[t],"click",function(){top.BX.SidePanel.Instance.open(this.getAttribute("href"),{width:1e3,allowChangeHistory:false,events:{onClose:function(e){if(e.slider.url.indexOf("save=Y")!==-1||e.slider.url.indexOf("switch=Y")!==-1){window.location.reload()}}}});BX.PreventDefault()})}});function showAllColors(){var e=document.getElementById("set-colors");for(var t=0;t<e.childNodes.length;t++){e.childNodes[t].hidden=false}var n=document.getElementById("link-all-colors");n.hidden=true}
  //# sourceMappingURL=script.map.js