Your IP : 18.117.135.132
(function(){"use strict";BX.namespace("BX.Landing");var e=BX.Landing.Utils.clone;var n={"Landing::addBlock":BX.message("LANDING_ACTION_ERROR__ADD_BLOCK"),"Landing::deleteBlock":BX.message("LANDING_ACTION_ERROR__DELETE_BLOCK"),"Landing::upBlock":BX.message("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Landing::downBlock":BX.message("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Landing::showBlock":BX.message("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Landing::hideBlock":BX.message("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Block::cloneCard":BX.message("LANDING_ACTION_ERROR__CLONE_CARD"),"Block::removeCard":BX.message("LANDING_ACTION_ERROR__DELETE_CARD"),"Block::updateStyles":BX.message("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Block::updateNodes":BX.message("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Site::getList":BX.message("LANDING_ACTION_ERROR__SITE_GET_LIST"),"Block::getList":BX.message("LANDING_ACTION_ERROR__BLOCK_GET_LIST"),"Utils::uploadFile":BX.message("LANDING_ACTION_ERROR__UPLOAD_FILE"),UNKNOWN_ACTION:BX.message("LANDING_ACTION_ERROR__UNKNOWN_ACTION")};BX.Landing.ErrorManager=function(){this.stack=[];this.showTimeout=null};BX.Landing.ErrorManager.getInstance=function(){if(!top.BX.Landing.ErrorManager.instance){top.BX.Landing.ErrorManager.instance=new BX.Landing.ErrorManager}return top.BX.Landing.ErrorManager.instance};BX.Landing.ErrorManager.prototype={add:function(e){if(e.type==="error"){e.action=e.action in n?e.action:"UNKNOWN_ACTION";this.stack.push({action:e.action,description:n[e.action]});return this.show()}},show:function(){clearTimeout(this.showTimeout);this.showTimeout=setTimeout(function(){var n=e(this.stack);this.stack=[];var a=n.map(this.createErrorMessage,this).join("");BX.Landing.UI.Panel.Alert.getInstance().show("error",a)}.bind(this),100)},createErrorMessage:function(e){return'<div class="landing-ui-error-item">'+e.description+"</div>"}}})();