text: /*!
   * msgbox v1.0.0 (https://github.com/reamd/msgbox.git)
   * Copyright 2016 reamd
   * Licensed under MIT
   */
  
  !function(a,b){"use strict";"function"==typeof define&&define.amd?define("msgBox",[],function(){return b}):"object"==typeof exports?module.exports.msgBox=b:a.msgBox=b}("undefined"!=typeof window?window:this,function(a){var b=document.createElement("div"),c=document.createAttribute("class"),d="",e="",f="",g="",h="",i="",j=this;this.width=a.width||"",this.minWidth=a.minWidth||"0",this.maxWidth=a.maxWidth||"100%",this.height=a.height||"",this.title=a.title||"",this.body=a.body||"",this.btnLabel=a.btnLabel||[],this.visible="boolean"!=typeof a.visible||a.visible,this.isClose="boolean"!=typeof a.isClose||a.isClose,this.openMsg=function(){this.classOpt("noScroll",!0),b.setAttribute("class","ui-dialog show")},this.closeMsg=function(){document.body.removeChild(b),this.classOpt("noScroll",!1)},this.complete=a.callback||function(){},this.firstCallback=a.firstCallback||function(){},this.secondCallback=a.secondCallback||function(){j.closeMsg()},this.classOpt=function(a,b){var c=document.body.getAttribute("class"),d="";if(b)if(c){if(c.indexOf(a)>-1)return;c+=" "+a,document.body.setAttribute("class",c)}else document.body.setAttribute("class",a);else c&&c===a?document.body.removeAttribute("class"):(c.indexOf(" "+a+" ")>-1?d=" "+a+" ":c.indexOf(" "+a)>-1?d=" "+a:c.indexOf(a+" ")>-1&&(d=a+" "),document.body.setAttribute("class",c.replace(d,"")))},this.width?(d='style="width:'+this.width+";min-width:"+this.minWidth+";max-width:"+this.maxWidth+'"',this.height&&(d='style="width:'+this.width+";min-width:"+this.minWidth+";max-width:"+this.maxWidth+";height:"+this.height+'"')):this.height&&(d='style="height:'+this.height+'"'),e=""===this.title?"<h3>&nbsp;</h3>":"<h3>"+this.title+"</h3>",h="<div>"+this.body+"</div>",this.isClose&&(f='<span class="ui-dialog-close" onFocus="this.blur()"></span>'),"[object Array]"===Object.prototype.toString.call(this.btnLabel)&&(1===this.btnLabel.length?i='<button class="save alone" onFocus="this.blur()">'+this.btnLabel[0]+"</button>":this.btnLabel.length>1&&(i='<button class="save" onFocus="this.blur()">'+this.btnLabel[0]+'</button><button class="cancel" onFocus="this.blur()">'+this.btnLabel[1]+"</button>")),this.visible?(c.value="ui-dialog show",this.classOpt("noScroll",!0)):c.value="ui-dialog",b.setAttributeNode(c),b.innerHTML='<div class="ui-dialog-cnt" '+d+'><div class="ui-dialog-hd">'+e+f+'</div><div class="ui-dialog-bd">'+g+h+'</div><div class="ui-dialog-ft">'+i+"</div></div>",document.body.insertBefore(b,document.body.firstChild),b.firstChild.getAttribute("style")?b.firstChild.setAttribute("style",b.firstChild.getAttribute("style")+";margin-top:-"+b.firstChild.offsetHeight/2+"px"):b.firstChild.setAttribute("style","margin-top:-"+b.firstChild.offsetHeight/2+"px"),setTimeout(this.complete,0),setTimeout(function(){j.isClose&&b.firstChild.firstChild.lastChild.addEventListener("click",function(){j.closeMsg()},!1),1===j.btnLabel.length?b.firstChild.childNodes[2].firstChild.addEventListener("click",j.firstCallback,!1):j.btnLabel.length>1&&(b.firstChild.childNodes[2].firstChild.addEventListener("click",j.firstCallback,!1),b.firstChild.childNodes[2].lastChild.addEventListener("click",j.secondCallback,!1))},0)});