/*! layer mobile-v2.0.0 Web 通用弹出层组件 MIT License */(function(h){"use strict";var l=document,b="querySelectorAll",d="getElementsByClassName",m=function(t){return l[b](t)},x={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},i={extend:function(t){var e=JSON.parse(JSON.stringify(x));for(var n in t)e[n]=t[n];return e},timer:{},end:{}};i.touch=function(t,e){t.addEventListener("click",function(n){e.call(this,n)},!1)};var y=0,r=["layui-m-layer"],p=function(t){var e=this;e.config=i.extend(t),e.view()};p.prototype.view=function(){var t=this,e=t.config,n=l.createElement("div");t.id=n.id=r[0]+y,n.setAttribute("class",r[0]+" "+r[0]+(e.type||0)),n.setAttribute("index",y);var o=function(){var s=typeof e.title=="object";return e.title?'
'+(s?e.title[0]:e.title)+"
":""}(),a=function(){typeof e.btn=="string"&&(e.btn=[e.btn]);var s,v=(e.btn||[]).length;return v!==0&&e.btn?(s=''+e.btn[0]+"",v===2&&(s=''+e.btn[1]+""+s),''+s+"
"):""}();if(e.fixed||(e.top=e.hasOwnProperty("top")?e.top:100,e.style=e.style||"",e.style+=" top:"+(l.body.scrollTop+e.top)+"px"),e.type===2&&(e.content=''+(e.content||"")+"
"),e.skin&&(e.anim="up"),e.skin==="msg"&&(e.shade=!1),n.innerHTML=(e.shade?"':"")+'",!e.type||e.type===2){var u=l[d](r[0]+e.type),c=u.length;c>=1&&layer.close(u[0].getAttribute("index"))}document.body.appendChild(n);var f=t.elem=m("#"+t.id)[0];e.success&&e.success(f),t.index=y++,t.action(e,f)},p.prototype.action=function(t,e){var n=this;t.time&&(i.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*t.time));var o=function(){var s=this.getAttribute("type");s==0?(t.no&&t.no(),layer.close(n.index)):t.yes?t.yes(n.index):layer.close(n.index)};if(t.btn)for(var a=e[d]("layui-m-layerbtn")[0].children,u=a.length,c=0;c