/** v2.13.0 | MIT Licensed */;!function(h){"use strict";var e,d=h.document,v=h.location,m={timeout:10,debug:!1,version:!1},g={modules:{},status:{},event:{},callback:{}},r=function(){this.v="2.13.0"},t=h.LAYUI_GLOBAL||{},b=(e=d.currentScript&&"SCRIPT"===d.currentScript.tagName.toUpperCase()?d.currentScript.src:function(){for(var e,t=d.getElementsByTagName("script"),n=t.length-1,r=n;01e3*m.timeout/5?j(o+" is not a valid module","error"):void((i?layui[o]=h[a.api]:g.status[o])?u():setTimeout(t,5))}()},0===n.length||layui["layui.all"]&&E[o]?u():(p=i?a.src:a,y=(E[o]?y+"modules/":p?"":m.base)+(p=(p=p||o).replace(/\s/g,"").replace(/\.js[^\/\.]*$/,""))+".js",!g.modules[o]&&layui[o]&&(g.modules[o]=y),g.modules[o]?c():(l=d.getElementsByTagName("head")[0],(s=d.createElement("script"))["async"]=!0,s.charset="utf-8",s.src=y+((p=!0===m.version?m.v||(new Date).getTime():m.version||"")?"?v="+p:""),l.appendChild(s),N(s,function(){l.removeChild(s),c()},function(){l.removeChild(s)}),g.modules[o]=y))),f},r.prototype.modules=Object.assign({},E),r.prototype.extend=function(e){var t,n,r=m.base||"",o=/^\{\/\}/;for(t in e=e||{})this[t]||this.modules[t]?j("the "+t+" module already exists, extend failure"):("string"==typeof(n=e[t])&&(n=((r=o.test(n)?"":r)+n).replace(o,"")),this.modules[t]=n);return this},r.prototype.disuse=function(e){var n=this;return e=n.isArray(e)?e:[e],n.each(e,function(e,t){delete n[t],delete E[t],delete n.modules[t],delete g.status[t],delete g.modules[t]}),n},r.prototype.getStyle=function(e,t){e=e.currentStyle||h.getComputedStyle(e,null);return e.getPropertyValue?e.getPropertyValue(t):e.getAttribute(t.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""}))},r.prototype.link=function(n,r,o){var a,i=this,e=d.getElementsByTagName("head")[0],t="function"==typeof r;if("string"==typeof r&&(o=r),"object"==typeof n)return a="array"===i.type(o),i.each(n,function(e,t){i.link(t,e===n.length-1&&r,a&&o[e])});o="layuicss-"+(o=o||n.replace(/^(#|(http(s?)):\/\/|\/\/)|\.|\/|\?.+/g,""));var u=d.getElementById(o);return u||((u=d.createElement("link")).href=n+(m.debug?"?v="+(new Date).getTime():""),u.rel="stylesheet",u.id=o,e.appendChild(u)),"complete"===u.__lay_readyState__?t&&r(u):N(u,function(){u.__lay_readyState__="complete",t&&r(u)},function(){j(n+" load error","error"),e.removeChild(u)}),i},r.prototype.addcss=function(e,t,n){return layui.link(m.dir+"css/"+e,t,n)},r.prototype.factory=function(e){if(layui[e])return"function"==typeof m.callback[e]?m.callback[e]:null},r.prototype.img=function(e,t,n){var r=new Image;if(r.src=e,r.complete)return t(r);r.onload=function(){r.onload=null,"function"==typeof t&&t(r)},r.onerror=function(e){r.onerror=null,"function"==typeof n&&n(e)}},r.prototype.router=r.prototype.hash=function(e){var n={path:[],pathname:[],search:{},hash:((e=e||v.hash).match(/[^#](#.*$)/)||[])[1]||"",href:""};return/^#/.test(e)&&(e=e.replace(/^#/,""),e=(n.href=e).replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(e,function(e,t){/^\w+=/.test(t)?(t=t.split("="),n.search[t[0]]=t[1]):n.path.push(t)}),n.pathname=n.path),n},r.prototype.url=function(e){var o,t,n=this;return{pathname:(e?((e.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):v.pathname).replace(/^\//,"").split("/"),search:(o={},t=(e?((e.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):v.search).replace(/^\?+/,"").split("&"),n.each(t,function(e,t){var n=t.indexOf("="),r=n<0?t.substr(0,t.length):0!==n&&t.substr(0,n);r&&(o[r]=0(d.innerHeight||p.documentElement.clientHeight)},h.getStyleRules=function(e,n){if(e)return e=(e=e.sheet||e.styleSheet||{}).cssRules||e.rules,"function"==typeof n&&layui.each(e,function(e,t){if(n(t,e))return!0}),e},h.style=function(e){e=e||{};var t=h.elem("style"),n=e.text||"",r=e.target;if(n)return"styleSheet"in t?(t.setAttribute("type","text/css"),t.styleSheet.cssText=n):t.innerHTML=n,t.id="LAY-STYLE-"+(e.id||(n=h.style.index||0,h.style.index++,"DF-"+n)),r&&((e=h(r).find("#"+t.id))[0]&&e.remove(),h(r).append(t)),t},h.position=function(e,t,n){var r,i,o,c,a,u,s,l,f;t&&(n=n||{},e!==p&&e!==h("body")[0]||(n.clickType="right"),r="right"===n.clickType?{left:(r=n.e||d.event||{}).clientX,top:r.clientY,right:r.clientX,bottom:r.clientY}:e.getBoundingClientRect(),a=t.offsetWidth,u=t.offsetHeight,i=function(e){return p.body[e=e?"scrollLeft":"scrollTop"]|p.documentElement[e]},o=function(e){return p.documentElement[e?"clientWidth":"clientHeight"]},c="margin"in n?n.margin:5,f=r.left,"center"===n.align?f-=(a-e.offsetWidth)/2:"right"===n.align&&(f=f-a+e.offsetWidth),(f=f+a+c>o("width")?o("width")-a-c:f)o()&&(r.top>u+c&&r.top<=o()?a=r.top-u-2*c:n.allowBottomOut||(a=o()-u-2*c)<0&&(a=0)),(u=n.position)&&(t.style.position=u),s=n.offset?n.offset[0]:0,l=n.offset?n.offset[1]:0,t.style.left=f+("fixed"===u?0:i(1))+s+"px",t.style.top=a+("fixed"===u?0:i())+l+"px",h.hasScrollbar()||(f=t.getBoundingClientRect(),!n.SYSTEM_RELOAD&&f.bottom+c>o()&&(n.SYSTEM_RELOAD=!0,setTimeout(function(){h.position(e,t,n)},50))))},h.options=function(e,t){if(t="object"==typeof t?t:{attr:t},e===p)return{};var e=h(e),n=t.attr||"lay-options",e=e.attr(n);try{return new Function("return "+(e||"{}"))()}catch(r){return layui.hint().error(t.errorText||[n+'="'+e+'"',"\n parseerror: "+r].join("\n"),"error"),{}}},h.isTopElem=function(n){var e=[p,h("body")[0]],r=!1;return h.each(e,function(e,t){if(t===n)return r=!0}),r},h.clipboard={writeText:function(n){var r=String(n.text);function e(){var e=p.createElement("textarea");e.value=r,e.style.position="fixed",e.style.opacity="0",e.style.top="0px",e.style.left="0px",p.body.appendChild(e),e.select();try{p.execCommand("copy"),"function"==typeof n.done&&n.done()}catch(t){"function"==typeof n.error&&n.error(t)}finally{e.remove?e.remove():p.body.removeChild(e)}}navigator&&"clipboard"in navigator?navigator.clipboard.writeText(r).then(n.done,function(){e()}):e()}},h.passiveSupported=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});d.addEventListener("test",null,t),d.removeEventListener("test",null,t)}catch(n){}return e}(),h.touchEventsSupported=function(){return"ontouchstart"in d},h.touchSwipe=function(e,t){var n,r,i,o,c=t,a=h(e)[0],u=!("preventDefault"in c)||c.preventDefault;a&&h.touchEventsSupported()&&(n={pointerStart:{x:0,y:0},pointerEnd:{x:0,y:0},distanceX:0,distanceY:0,direction:"none",timeStart:null},t=function(e){1===e.touches.length&&(a.addEventListener("touchmove",r,!!h.passiveSupported&&{passive:!1}),a.addEventListener("touchend",i),a.addEventListener("touchcancel",i),n.timeStart=Date.now(),n.pointerStart.x=n.pointerEnd.x=e.touches[0].clientX,n.pointerStart.y=n.pointerEnd.y=e.touches[0].clientY,n.distanceX=n.distanceY=0,n.direction="none",c.onTouchStart)&&c.onTouchStart(e,n)},r=function(e){u&&e.preventDefault(),n.pointerEnd.x=e.touches[0].clientX,n.pointerEnd.y=e.touches[0].clientY,n.distanceX=n.pointerStart.x-n.pointerEnd.x,n.distanceY=n.pointerStart.y-n.pointerEnd.y,Math.abs(n.distanceX)>Math.abs(n.distanceY)?n.direction=0]|&(?=#?[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?=#?[a-zA-Z0-9]+;?)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e},h.unescape=function(e){return e===undefined||null===e?"":String(e).replace(/\"/g,'"').replace(/\'/g,"'").replace(/\>/g,">").replace(/\</g,"<").replace(/\&/g,"&")},n=0,r=null,function(e){e=e||"id";var t=(new Date).getTime();return t===r?n++:(n=0,r=t),e+"-"+t+"-"+Math.floor(1e4*Math.random())+"-"+n});h.createSharedResizeObserver=function(r){var i,o,c;return"undefined"==typeof d.ResizeObserver?(d.console&&console.log("ResizeObserver is not supported in this browser."),null):(i="lay-"+(r=r||"")+"-resizeobserver-key",o={},c=new ResizeObserver(function(e){for(var t=0;t]|&(?=#?[a-zA-Z0-9]+)/g;return e===undefined||null===e?"":r.test(e+="")?e.replace(r,function(e){return"&#"+e.charCodeAt(0)+";"}):e}},m=function(e,r){return new RegExp(e,r||"g")},g=function(e,r,t){r=r||{};var e="Laytpl "+((r=Object.assign({errorContext:""},r)).type||"")+"Error: "+e,n=r.errorContext;return delete r.errorContext,"object"==typeof console&&console.error(e,"\n",n,"\n",r),"function"==typeof t&&t(r),e},o={open:"{{",close:"}}",cache:!0,condense:!0,tagStyle:""},t=function(e,r){var t=this;r=t.config=Object.assign({template:e},o,r),t.vars=Object.assign({include:function(e,r){e=document.getElementById(e),e=e?e.innerHTML:"";return e?t.render(e,r):""}},n),t.compile(r.template)},r=(t.prototype.render=function(r,t){var n=this,o=n.config,c=r?n.compile(r):n.compilerCache||n.compile(o.template),e=function(){t=t||o.data||{};try{return c(t)}catch(e){return r=r||o.template,g(e,{errorContext:n.extractErrorContext(r,t),template:r,type:"Render"},o.error)}}();return o.cache&&!r&&(n.compilerCache=c),e},t.prototype.compile=function(e){var t=this,o=t.config,c=o.open,a=o.close,i=o.condense,u=m,l="\u2028";if("string"!=typeof e||!e)return function(){return""};var p=function(e,r){e=["(?:"+c+(e[0]||"")+"\\s*)","("+(e[1]||"[\\s\\S]")+"*?)","(?:\\s*"+(e[2]||"")+a+")"];return(r=r||{}).before&&e.unshift(r.before),r.after&&e.push(r.after),u(e.join(""))},r=i?["",""]:["(?:(?:\\n)*\\s*)","(?:\\s*?)"],f={before:r[0],after:r[1]},s=function(e,r){return e=(e=i?e:e.replace(u(l),r?"":"\n")).replace(/\\(\\|")/g,"$1")},n=t.parse=function(e){var n,r,t;return(e=e||"")&&(e=(e=(e=i?e.replace(/\t/g," ").replace(/\s+/g," "):e).replace(u("([}\\]])"+a),"$1 "+a).replace(/(?=\\|")/g,"\\").replace(/\r?\n/g,i?"":l)).replace(p(["!","","!"],f),function(e,r){return r=r.replace(u(c+"|"+a),function(e){return e.replace(/(?=.)/g,"\\")})}),n=function(e){return['";',e,'__laytpl__+="'].join("\n")},r=function(e,r,t){return t&&(r="-"===r?"":"_escape",t=s(t,!0))?n("__laytpl__+="+r+"("+t+");"):""},t=function(e,r){return r?(r=s(r),n(r)):""},e="modern"===o.tagStyle?(e=(e=e.replace(p(["#"],f),"")).replace(p(["(=|-)"]),r)).replace(p([],f),t):(e=e.replace(p(["#"],f),t)).replace(p(["(=|-)*"]),r),i||(e=e.replace(u(l),"\\n"))),e},r=t.createCompiler=function(e,r){return r=r||d(e),new Function("laytpl","return "+r)(t.vars)},d=t.createBuilder=function(e,r){return r=r||["function(d){",'"use strict";','var __laytpl__="",'+function(){var e,r=[];for(e in t.vars)r.push(("escape"===e?"_":"")+e+"=laytpl."+e);return r.join(",")}()+";",'__laytpl__="'+n(e)+'";',"return __laytpl__;","};"].join("\n")};try{return r(e)}catch(y){return delete t.compilerCache,function(){return g(y,{errorContext:t.extractErrorContext(e),template:e,type:"Compile"},o.error)}}},t.prototype.extractErrorContext=function(e,r){var t=1,o=e.split(/\r?\n/g),n=(e=e.replace(/(?=^)/gm,function(){return"/*LINE:"+t+++"*/"}),this.createBuilder(e)),c=n.split(/\r?\n/),a="laytpl.builder.map";try{n+="\n//# sourceURL="+a;var i=this.createCompiler(e,n);r&&i(r)}catch(l){var e=m(a.replace(/\./g,"\\.")+":(\\d+)","i"),n=(l.stack.match(e)||[])[1]||0,u=function(e,r){var r=r?/\/\*LINE:(\d+)\*\/[^*]*$/:/\/\*LINE:(\d+)\*\//;return!(r=(String(c[e-1]).match(r)||[])[1])&&0n.pages?n.curr=n.pages:n.curr<1&&(n.curr=1),l<0?l=1:l>n.pages&&(l=n.pages),n.prev="prev"in n?n.prev:p.$t("laypage.prev"),n.next="next"in n?n.next:p.$t("laypage.next"),n.pages>l?Math.ceil((n.curr+(1'+n.prev+"":"",page:function(){var e=[];if(n.count<1)return"";1'+(n.first||1)+"");var a=Math.floor((l-1)/2),t=1n.pages?n.pages:a:l;for(i-t...');t<=i;t++)t===n.curr?e.push('"+t+""):e.push(''+t+"");return n.pages>l&&n.pages>i&&!1!==n.last&&(i+1...'),0!==l)&&e.push(''+(n.last||n.pages)+""),e.join("")}(),next:n.next?''+n.next+"":"",count:''+("object"==typeof n.countText?n.countText[0]+n.count+n.countText[1]:p.$t("laypage.total",{total:n.count}))+"",limit:(i=['"),refresh:['','',""].join(""),skip:[''+(e="object"==typeof n.skipText?n.skipText:[p.$t("laypage.goto"),p.$t("laypage.page"),p.$t("laypage.confirm")])[0],'',e[1]+'",""].join("")};return['
',(t=[],layui.each(n.layout,function(e,a){u[a]&&t.push(u[a])}),t.join("")),"
"].join("")},t.prototype.jump=function(e,a){if(e){var t=this,i=t.config,n=e.children,l=e[c]("button")[0],r=e[c]("input")[0],e=e[c]("select")[0],u=function(){var e=Number(r.value.replace(/\s|\D/g,""));e&&(i.curr=e,t.render())};if(a)return u();for(var p=0,s=n.length;pi.pages||(i.curr=e,t.render())});e&&o.on(e,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),l&&o.on(l,"click",function(){u()})}},t.prototype.skip=function(t){var i,e;t&&(i=this,e=t[c]("input")[0])&&o.on(e,"keyup",function(e){var a=this.value,e=e.keyCode;/^(37|38|39|40)$/.test(e)||(/\D/.test(a)&&(this.value=a.replace(/\D/,"")),13===e&&i.jump(t,!0))})},t.prototype.render=function(e){var a=this,t=a.config,i=a.type(),n=a.view(),i=(2===i?t.elem&&(t.elem.innerHTML=n):3===i?t.elem.html(n):l[r](t.elem)&&(l[r](t.elem).innerHTML=n),t.jump&&t.jump(t,e),l[r]("layui-laypage-"+t.index));a.jump(i),t.hash&&!e&&(location.hash="!"+t.hash+"="+t.curr),a.skip(i)},{render:function(e){return new t(e).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(a,e,t){return a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1),this}});e("laypage",o)});layui.define(["lay","i18n"],function(e){"use strict";var M=layui.lay,a=layui.i18n,n="laydate",r="lay-"+n+"-id",o="zh-CN",l=["eu-ES","ja-JP","km-KH","ko-KR","pt-BR","si-LK","ms-MY","ug-CN","zh-CN","zh-HK","zh-TW"];function h(e){if("string"!=typeof e||e.length<=1)return e;for(var t="",a=0;a'+s.selectTime+""),(l.range||"datetime"!==l.type||l.fullPanel)&&p.push(''),M.each(l.btns,function(e,t){var a=s.tools[t]||"btn";l.range&&"now"===t||(d&&"clear"===t&&(a=s.tools.reset),n.push(''+a+""))}),p.push('"),p.join(""))),l.shortcuts&&(m.appendChild(t),M(t).html((i=[],M.each(l.shortcuts,function(e,t){i.push('
  • '+t.text+"
  • ")}),i.join(""))).find("li").on("click",function(e){var t=l.shortcuts[this.dataset.index]||{},t=("function"==typeof t.value?t.value():t.value)||[],n=(layui.isArray(t)||(t=[t]),l.type),t=(M.each(t,function(e,t){var a=[l.dateTime,o.endDate][e];"time"===n&&"date"!==layui.type(t)?o.EXP_IF.test(t)&&(t=(t.match(o.EXP_SPLIT)||[]).slice(1),M.extend(a,{hours:0|t[0],minutes:0|t[2],seconds:0|t[4]})):M.extend(a,o.systemDate("date"===layui.type(t)?t:new Date(t))),"time"!==n&&"datetime"!==n||(o[["startTime","endTime"][e]]={hours:a.hours,minutes:a.minutes,seconds:a.seconds}),0===e?o.startDate=M.extend({},a):o.endState=!0,"year"===n||"month"===n||"time"===n?o.listYM[e]=[a.year,a.month+1]:e&&o.autoCalendarModel.auto&&o.autoCalendarModel()}),o.checkDate("limit").calendar(null,null,"init"),M(o.footer).find("."+S).removeClass(C));t&&"date"===t.attr("lay-type")&&t[0].click(),o.done(null,"change"),M(this).addClass(k),"static"!==l.position&&o.setValue(o.parse()).done().remove()})),M.each(u,function(e,t){m.appendChild(t)}),l.showBottom&&m.appendChild(e),M.elem("style")),f=[],g=!0,t=(M.each(l.theme,function(e,t){g&&/^#/.test(t)?(g=!(r=!0),f.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}",-1!==l.theme.indexOf("circle")?"":"#{{id}} .layui-this{background-color:{{theme}} !important;}","#{{id}} .laydate-day-now{color:{{theme}} !important;}","#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,o.elemID).replace(/{{theme}}/g,t))):!g&&/^#/.test(t)&&f.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}","#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,o.elemID).replace(/{{theme}}/g,t))}),l.shortcuts&&l.range&&f.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g,o.elemID)),f.length&&(f=f.join(""),"styleSheet"in p?(p.setAttribute("type","text/css"),p.styleSheet.cssText=f):p.innerHTML=f,r&&M(m).addClass("laydate-theme-molv"),m.appendChild(p)),o.remove(w.thisElemDate),D.thisId=l.id,d?l.elem.append(m):(document.body.appendChild(m),o.position()),l.shade?'
    ':"");m.insertAdjacentHTML("beforebegin",t),o.checkDate().calendar(null,0,"init"),o.changeEvent(),w.thisElemDate=o.elemID,o.renderAdditional(),"function"==typeof l.ready&&l.ready(M.extend({},l.dateTime,{month:l.dateTime.month+1})),o.preview()},w.prototype.remove=function(e){var t=this,a=t.config,n=M("#"+(e||t.elemID));return n[0]&&(n.hasClass(v)||t.checkDate(function(){n.remove(),delete t.startDate,delete t.endDate,delete t.endState,delete t.startTime,delete t.endTime,delete D.thisId,"function"==typeof a.close&&a.close(t)}),M("."+x).remove()),t},w.prototype.position=function(){var e=this.config;return M.position(e.elem[0],this.elem,{position:e.position}),this},w.prototype.hint=function(e){var t=this,a=(t.config,M.elem("div",{"class":i}));t.elem&&(a.innerHTML=(e="object"==typeof e?e||{}:{content:e}).content||"",M(t.elem).find("."+i).remove(),t.elem.appendChild(a),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){M(t.elem).find("."+i).remove()},"ms"in e?e.ms:3e3))},w.prototype.getAsYM=function(e,t,a){return a?t--:t++,t<0&&(t=11,e--),11p[1]&&(e.year=p[1],l=!0),11t)&&(e.date=t,l=!0)},c=function(n,i,r){var o=["startTime","endTime"];i=(i.match(s.EXP_SPLIT)||[]).slice(1),r=r||0,d.range&&(s[o[r]]=s[o[r]]||{}),M.each(s.format,function(e,t){var a=parseFloat(i[e]);i[e].lengths.getDateTime(d.max)?(o=d.dateTime=M.extend({},d.max),i=!0):s.getDateTime(o)s.getDateTime(d.max))&&(s.endDate=M.extend({},d.max),i=!0),s.startTime={hours:d.dateTime.hours,minutes:d.dateTime.minutes,seconds:d.dateTime.seconds},s.endTime={hours:s.endDate.hours,minutes:s.endDate.minutes,seconds:s.endDate.seconds},"month"===d.type)&&(d.dateTime.date=1,s.endDate.date=1),i&&u&&(s.setValue(s.parse()),s.hint("value "+r.invalidDatePrompt+r.autoResetPrompt)),s.startDate=s.startDate||u&&M.extend({},d.dateTime),s.autoCalendarModel.auto&&s.autoCalendarModel(),s.endState=!d.range||!s.rangeLinked||!(!s.startDate||!s.endDate),e&&e()),s},w.prototype.markRender=function(e,a,t){var n;"object"==typeof t?M.each(t||{},function(e,t){e=e.split("-");e[0]!=a[0]&&0!=e[0]||e[1]!=a[1]&&0!=e[1]||e[2]!=a[2]||(n=t||a[2])}):"string"==typeof t&&(n=t||a[2]),n&&e.find("div").html(''+n+"")},w.prototype.mark=function(t,a){var n=this,e=n.config,i=function(e){n.markRender(t,a,e)};return e.calendar&&e.lang===o&&i(n.markerOfChineseFestivals),"function"==typeof e.mark?e.mark({year:a[0],month:a[1],date:a[2]},i):"object"==typeof e.mark&&i(e.mark),n},w.prototype.holidaysRender=function(o,l,e){var s=["holidays","workdays"],d=function(e,t,a){e.find("div").html(["",a,""].join(""))};"array"===layui.type(e)?M.each(e,function(r,e){M.each(e,function(e,t){var a,n,i;t=t,a=o.attr("lay-ymd"),n=t.split("-"),i=a.split("-"),M.each(n,function(e,t){n[e]=parseInt(t,10)}),M.each(i,function(e,t){i[e]=parseInt(t,10)}),n.join("-")===i.join("-")&&d(o,s[r],l[2])})}):"string"==typeof e&&-1!==s.indexOf(e)&&d(o,e,l[2])},w.prototype.holidays=function(t,a){var n=this,e=n.config,i=function(e){n.holidaysRender(t,a,e)};return"function"==typeof e.holidays?e.holidays({year:a[0],month:a[1],date:a[2]},i):"array"===layui.type(e.holidays)&&i(e.holidays),n},w.prototype.cellRender=function(t,e,a){var n=this.config;return"function"==typeof n.cellRender&&n.cellRender(e,function(e){"string"==typeof e?M(t).html(e):"object"==typeof e&&M(t).html("").append(M(e)[0])},{originElem:t,type:a}),this},w.prototype.startOfYear=function(e){e=new Date(e);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e},w.prototype.endOfYear=function(e){var e=new Date(e),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e},w.prototype.startOfMonth=function(e){e=new Date(e);return e.setDate(1),e.setHours(0,0,0,0),e},w.prototype.endOfMonth=function(e){var e=new Date(e),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e},w.prototype.addDays=function(e,t){e=new Date(e);return t&&e.setDate(e.getDate()+t),e},w.prototype.isDisabledYearOrMonth=function(e,t,a){for(var n=this,i=n.config,r="year"===t?n.startOfYear(e):n.startOfMonth(e),t="year"===t?n.endOfYear(e):n.endOfMonth(e),o=Math.floor((t.getTime()-r.getTime())/864e5)+1,l=0,s=0;s(t.time?0:41)?i.endDate:e.dateTime;return M.each({now:M.extend({},a,t.date||{}),min:e.min,max:e.max},function(e,a){var n;r[e]=i.newDate(M.extend({year:a.year,month:"year"===t.type?0:a.month,date:"year"===t.type||"month"===t.type?1:a.date},(n={},M.each(t.time,function(e,t){n[t]=a[t]}),n))).getTime()}),a=r.nowp[1]&&(d.year=p[1],s.hint(m.invalidDatePrompt)),s.firstDate||(s.firstDate=M.extend({},d)),n.setFullYear(d.year,d.month,1),r=(n.getDay()+(7-a.weekStart))%7,o=D.getEndDate(d.month||12,d.year),l=D.getEndDate(d.month+1,d.year),M.each(y,function(e,t){var a,n=[d.year,d.month];(t=M(t)).removeAttr("class"),e"+n[2]+""),s.mark(t,n).holidays(t,n).limit({elem:t,date:{year:n[0],month:n[1]-1,date:n[2]},index:e,rangeType:i,disabledType:"date"}),s.cellRender(t,{year:n[0],month:n[1],date:n[2]},"date")}),M(c[0]).attr("lay-ym",d.year+"-"+(d.month+1)),M(c[1]).attr("lay-ym",d.year+"-"+(d.month+1)),s.panelYM||(s.panelYM={}),s.panelYM[i]={year:d.year,month:d.month},h(d.year+m.literal.year)),y=h(m.months[d.month]);return m.monthBeforeYear?(M(c[0]).attr("lay-type","month").html(y),M(c[1]).attr("lay-type","year").html(n)):(M(c[0]).attr("lay-type","year").html(n),M(c[1]).attr("lay-type","month").html(y)),u&&(a.range?!e&&"init"===t||(s.listYM=[[(s.startDate||a.dateTime).year,(s.startDate||a.dateTime).month+1],[s.endDate.year,s.endDate.month+1]],s.list(a.type,0).list(a.type,1),"time"===a.type?s.setBtnStatus(!0,M.extend({},s.systemDate(),s.startTime),M.extend({},s.systemDate(),s.endTime)):s.setBtnStatus(!0)):(s.listYM=[[d.year,d.month+1]],s.list(a.type,0))),a.range&&"init"===t&&(s.rangeLinked?(m=s.getAsYM(d.year,d.month,i?"sub":null),s.calendar(M.extend({},d,{year:m[0],month:m[1]}),1-i)):s.calendar(null,1-i)),a.range||(n=["hours","minutes","seconds"],s.limit({elem:M(s.footer).find(".laydate-btns-now"),date:s.systemDate(/^(datetime|time)$/.test(a.type)?new Date:null),index:0,time:n,disabledType:"datetime"}),s.limit({elem:M(s.footer).find(I),index:0,time:n,disabledType:"datetime"})),s.setBtnStatus(),M(s.shortcut).find("li."+k).removeClass(k),a.range&&!u&&"init"!==t&&s.stampRange(),s},w.prototype.list=function(n,i){var r,o,e,a,l,s,d=this,m=d.config,u=d.rangeLinked?m.dateTime:[m.dateTime,d.endDate][i],y=d.i18nMessages,c=m.range&&"date"!==m.type&&"datetime"!==m.type,h=M.elem("ul",{"class":b+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[n]}),t=d.elemHeader[i],p=M(t[2]).find("span"),f=d.elemCont[i||0],g=M(f).find("."+b)[0],D=y.monthBeforeYear,v=y.literal.year,T=d.listYM[i]||{},x=["hours","minutes","seconds"],w=["startTime","endTime"][i];return T[0]<1&&(T[0]=1),"year"===n?(e=r=T[0]-7,r<1&&(e=r=1),M.each(new Array(15),function(e){var t=M.elem("li",{"lay-ym":r}),a={year:r,month:0,date:1};r==T[0]&&M(t).addClass(k),t.innerHTML=r+v,h.appendChild(t),d.limit({elem:M(t),date:a,index:i,type:n,rangeType:i,disabledType:"date"}),d.cellRender(t,{year:r,month:1,date:1},"year"),r++}),M(p[D?1:0]).attr("lay-ym",r-8+"-"+T[1]).html(e+v+" - "+(r-1+v))):"month"===n?(M.each(new Array(12),function(e){var t=M.elem("li",{"lay-ym":e}),a={year:T[0],month:e,date:1};e+1==T[1]&&M(t).addClass(k),t.innerHTML=y.months[e],h.appendChild(t),d.limit({elem:M(t),date:a,index:i,type:n,rangeType:i,disabledType:"date"}),d.cellRender(t,{year:T[0],month:e+1,date:1},"month")}),M(p[D?1:0]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+v)):"time"===n&&(o=function(){M(h).find("ol").each(function(a,e){M(e).find("li").each(function(e,t){d.limit({elem:M(t),date:[{hours:e},{hours:d[w].hours,minutes:e},{hours:d[w].hours,minutes:d[w].minutes,seconds:e}][a],index:i,rangeType:i,disabledType:"time",time:[["hours"],["hours","minutes"],["hours","minutes","seconds"]][a]})})}),m.range||d.limit({elem:M(d.footer).find(I),date:d[w],index:0,time:["hours","minutes","seconds"],disabledType:"datetime"})},m.range?d[w]||(d[w]="startTime"===w?u:d.endDate):d[w]=u,M.each([24,60,60],function(t,e){var a=M.elem("li"),n=["

    "+y.time[t]+"

      "];M.each(new Array(e),function(e){n.push(""+M.digit(e,2)+"")}),a.innerHTML=n.join("")+"
    ",h.appendChild(a)}),o(),e=-1!==m.format.indexOf("H"),D=-1!==m.format.indexOf("m"),p=-1!==m.format.indexOf("s"),a=h.children,l=0,M.each([e,D,p],function(e,t){t||(a[e].className+=" layui-hide",l++)}),h.className+=" laydate-time-list-hide-"+l),g&&f.removeChild(g),f.appendChild(h),"year"===n||"month"===n?(M(d.elemMain[i]).addClass("laydate-ym-show"),M(h).find("li").on("click",function(){var e,t,a=0|M(this).attr("lay-ym");M(this).hasClass(C)||(d.rangeLinked?M.extend(u,{year:"year"===n?a:T[0],month:"year"===n?T[1]-1:a}):u[n]=a,e=-1!==["year","month"].indexOf(m.type),t="year"===n&&-1!==["date","datetime"].indexOf(m.type),e||t?(M(h).find("."+k).removeClass(k),M(this).addClass(k),("month"===m.type&&"year"===n||t)&&(d.listYM[i][0]=a,c&&((i?d.endDate:u).year=a),d.list("month",i))):(d.checkDate("limit").calendar(u,i,"init"),d.closeList()),m.range||d.limit({type:n,elem:M(d.footer).find(I),date:u,disabledType:"datetime"}),d.setBtnStatus(),!m.range&&m.autoConfirm&&("month"===m.type&&"month"===n||"year"===m.type&&"year"===n)&&d.setValue(d.parse()).done().remove(),d.autoCalendarModel.auto&&!d.rangeLinked?d.choose(M(f).find("td.layui-this"),i):d.endState&&d.done(null,"change"),M(d.footer).find("."+S).removeClass(C))})):(D=M.elem("span",{"class":E}),s=function(){M(h).find("ol").each(function(e){var a=this,t=M(a).find("li");a.scrollTop=30*(d[w][x[e]]-2),a.scrollTop<=0&&t.each(function(e,t){if(!M(this).hasClass(C))return a.scrollTop=30*(e-2),!0})})},p=M(t[2]).find("."+E),s(),D.innerHTML=m.range?[y.startTime,y.endTime][i]:y.selectTime,M(d.elemMain[i]).addClass("laydate-time-show"),p[0]&&p.remove(),t[2].appendChild(D),(g=M(h).find("ol")).each(function(t){var a=this;M(a).find("li").on("click",function(){var e=0|this.innerHTML;M(this).hasClass(C)||(m.range?d[w][x[t]]=e:u[x[t]]=e,M(a).find("."+k).removeClass(k),M(this).addClass(k),o(),s(),!d.endDate&&"time"!==m.type&&"datetime"!==m.type||d.done(null,"change"),d.setBtnStatus())})}),layui.device().mobile&&g.css({overflowY:"auto",touchAction:"pan-y"})),d},w.prototype.listYM=[],w.prototype.closeList=function(){var a=this;a.config;M.each(a.elemCont,function(e,t){M(this).find("."+b).remove(),M(a.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")}),M(a.elem).find("."+E).remove()},w.prototype.setBtnStatus=function(e,t,a){var n=this,i=n.config,r=n.i18nMessages,o=M(n.footer).find(I),l="datetime"===i.type||"time"===i.type?["hours","minutes","seconds"]:undefined;i.range&&(t=t||(n.rangeLinked?n.startDate:i.dateTime),a=a||n.endDate,i=!n.endState||n.newDate(t).getTime()>n.newDate(a).getTime(),n.limit({date:t,disabledType:"datetime",time:l,rangeType:0})||n.limit({date:a,disabledType:"datetime",time:l,rangeType:1})?o.addClass(C):o[i?"addClass":"removeClass"](C),e)&&i&&n.hint(r.rangeOrderPrompt)},w.prototype.parse=function(e,t){var a=this,n=a.config,i=a.rangeLinked?a.startDate:n.dateTime,t=t||("end"==e?M.extend({},a.endDate,a.endTime):n.range?M.extend({},i||n.dateTime,a.startTime):n.dateTime),i=D.parse(t,a.format,1);return n.range&&e===undefined?i+" "+a.rangeStr+" "+a.parse("end"):i},w.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},w.prototype.getDateTime=function(e){return this.newDate(e).getTime()},w.prototype.formatToDisplay=function(e,t){var a=this,n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");Object.defineProperty(e,"value",M.extend({},n,{get:function(){return this.getAttribute("lay-date")},set:function(e){n.set.call(this,t.call(a,e)),this.setAttribute("lay-date",e)}}))},w.prototype.setValue=function(e){var t,a=this,n=a.config,i=n.elem[0];return"static"!==n.position&&(e=e||"",a.isInput(i)?M(i).val(e):(t=a.rangeElem)?("array"!==layui.type(e)&&(e=e.split(" "+a.rangeStr+" ")),t[0].val(e[0]||""),t[1].val(e[1]||"")):(0===M(i).find("*").length&&(t="function"==typeof n.formatToDisplay?n.formatToDisplay(e):e,M(i).html(t)),M(i).attr("lay-date",e))),a},w.prototype.preview=function(){var e,t=this,a=t.config;a.isPreview&&(e=M(t.elem).find("."+T),t=!a.range||(t.rangeLinked?t.endState:t.endDate)?t.parse():"",e.html(t),e.html())&&(t="array"===layui.type(a.theme)?a.theme[0]:a.theme,e.css({color:/^#/.test(String(t))?t:"#16b777"}),setTimeout(function(){e.css({color:"#777"})},300))},w.prototype.renderAdditional=function(){this.config.fullPanel&&this.list("time",0)},w.prototype.stampRange=function(){var n,i=this,r=i.config,o=i.rangeLinked?i.startDate:r.dateTime,e=M(i.elem).find("td");r.range&&!i.endState&&M(i.footer).find(I).addClass(C),o=o&&i.newDate({year:o.year,month:o.month,date:o.date}).getTime(),n=i.endState&&i.endDate&&i.newDate({year:i.endDate.year,month:i.endDate.month,date:i.endDate.date}).getTime(),M.each(e,function(e,t){var a=M(t).attr("lay-ymd").split("-"),a=i.newDate({year:a[0],month:a[1]-1,date:a[2]}).getTime();r.rangeLinked&&!i.startDate&&a===i.newDate(i.systemDate()).getTime()&&M(t).addClass(M(t).hasClass(u)||M(t).hasClass(y)?"":"laydate-day-now"),M(t).removeClass(m+" "+k),a!==o&&a!==n||(i.rangeLinked||!i.rangeLinked&&(e<42?a===o:a===n))&&M(t).addClass(M(t).hasClass(u)||M(t).hasClass(y)?m:k),on.getDateTime(i.max)&&(n[t]={hours:i.max.hours,minutes:i.max.minutes,seconds:i.max.seconds},M.extend(r,n[t])))}),a||(n.startDate=M.extend({},r)),n.endState&&!n.limit({date:n.rangeLinked?n.startDate:n.thisDateTime(1-a),disabledType:"date"})&&(((o=n.endState&&n.autoCalendarModel.auto?n.autoCalendarModel():o)||n.rangeLinked&&n.endState)&&n.newDate(n.startDate)>n.newDate(n.endDate)&&(n.startDate.year===n.endDate.year&&n.startDate.month===n.endDate.month&&n.startDate.date===n.endDate.date&&(l=n.startTime,n.startTime=n.endTime,n.endTime=l),l=n.startDate,n.startDate=M.extend({},n.endDate,n.startTime),i.dateTime=M.extend({},n.startDate),n.endDate=M.extend({},l,n.endTime)),o)&&(i.dateTime=M.extend({},n.startDate)),n.rangeLinked?(e=n.checkPanelDate(r,t),l=M.extend({},r),s=o||e&&e.needFullRender?"init":null,e=e?e.index:t,n.calendar(l,e,s)):n.calendar(null,a,o?"init":null),n.endState&&n.done(null,"change")):"static"===i.position?n.calendar().done().done(null,"change"):"date"===i.type?i.autoConfirm?n.setValue(n.parse()).done().remove():n.calendar().done(null,"change"):"datetime"===i.type&&n.calendar().done(null,"change"))},w.prototype.tool=function(t,e){var a=this,n=a.config,i=a.i18nMessages,r=n.dateTime,o="static"===n.position,l={datetime:function(){M(t).hasClass(C)||(a.list("time",0),n.range&&a.list("time",1),M(t).attr("lay-type","date").html(a.i18nMessages.selectDate))},date:function(){a.closeList(),M(t).attr("lay-type","datetime").html(a.i18nMessages.selectTime)},clear:function(){o&&(M.extend(r,a.firstDate),a.calendar()),n.range&&(delete n.dateTime,delete a.endDate,delete a.startTime,delete a.endTime),a.setValue(""),a.done(null,"onClear").done(["",{},{}]).remove()},now:function(){var e=new Date;if(M(t).hasClass(C))return a.hint(i.tools.now+", "+i.invalidDatePrompt);M.extend(r,a.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),a.setValue(a.parse()),o&&a.calendar(),a.done(null,"onNow").done().remove()},confirm:function(){var e;if(n.range){if(M(t).hasClass(C))return e="time"===n.type?a.startTime&&a.endTime&&a.newDate(a.startTime)>a.newDate(a.endTime):a.startDate&&a.endDate&&a.newDate(M.extend({},a.startDate,a.startTime||{}))>a.newDate(M.extend({},a.endDate,a.endTime||{})),a.hint(e?i.rangeOrderPrompt:i.invalidDatePrompt)}else if(M(t).hasClass(C))return a.hint(i.invalidDatePrompt);a.setValue(a.parse()),a.done(null,"onConfirm").done().remove()}};l[e]&&l[e]()},w.prototype.change=function(n){var i=this,r=i.config,o=i.thisDateTime(n),l=r.range&&("year"===r.type||"month"===r.type),s=i.elemCont[n||0],d=i.listYM[n],e=function(e){var t=M(s).find(".laydate-year-list")[0],a=M(s).find(".laydate-month-list")[0];return t&&(d[0]=e?d[0]-15:d[0]+15,i.list("year",n)),a&&(e?d[0]--:d[0]++,i.list("month",n)),(t||a)&&(M.extend(o,{year:d[0]}),l&&(o.year=d[0]),r.range||i.done(null,"change"),r.range||i.limit({elem:M(i.footer).find(I),date:{year:d[0],month:t?0:d[1]-1},disabledType:"datetime"})),i.setBtnStatus(),t||a};return{prevYear:function(){e("sub")||(i.rangeLinked?(r.dateTime.year--,i.checkDate("limit").calendar(null,null,"init")):(o.year--,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change")))},prevMonth:function(){var e,t;i.rangeLinked?(t=i.panelYM[0],t=i.getAsYM(t.year,t.month,"sub"),e=M.extend({},r.dateTime,i.panelYM[0],{year:t[0],month:t[1]}),i.checkDate("limit").calendar(e,null,"init")):(t=i.getAsYM(o.year,o.month,"sub"),M.extend(o,{year:t[0],month:t[1]}),i.checkDate("limit").calendar(null,null,"init"),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change"))},nextMonth:function(){var e,t;i.rangeLinked?(t=i.panelYM[0],t=i.getAsYM(t.year,t.month),e=M.extend({},r.dateTime,i.panelYM[0],{year:t[0],month:t[1]}),i.checkDate("limit").calendar(e,null,"init")):(t=i.getAsYM(o.year,o.month),M.extend(o,{year:t[0],month:t[1]}),i.checkDate("limit").calendar(null,null,"init"),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change"))},nextYear:function(){e()||(i.rangeLinked?(r.dateTime.year++,i.checkDate("limit").calendar(null,0,"init")):(o.year++,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(M(s).find("td.layui-this"),n):i.done(null,"change")))}}},w.prototype.changeEvent=function(){var i=this;i.config;M(i.elem).on("click",function(e){M.stope(e)}).on("mousedown",function(e){M.stope(e)}),M.each(i.elemHeader,function(n,e){M(e[0]).on("click",function(e){i.change(n).prevYear()}),M(e[1]).on("click",function(e){i.change(n).prevMonth()}),M(e[2]).find("span").on("click",function(e){var t=M(this),a=t.attr("lay-ym"),t=t.attr("lay-type");a&&(a=a.split("-"),i.listYM[n]=[0|a[0],0|a[1]],i.list(t,n),M(i.footer).find("."+S).addClass(C))}),M(e[3]).on("click",function(e){i.change(n).nextMonth()}),M(e[4]).on("click",function(e){i.change(n).nextYear()})}),M.each(i.table,function(e,t){M(t).find("td").on("click",function(){i.choose(M(this),e)})}),M(i.footer).find("span").on("click",function(){var e=M(this).attr("lay-type");i.tool(this,e)})},w.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())||/INPUT|TEXTAREA/.test(e.tagName)},w.prototype.events=function(){var e,t=this,a=t.config;a.elem[0]&&!a.elem[0].eventHandler&&(a.elem.on(a.trigger,e=function(){D.thisId!==a.id&&t.render()}),a.elem[0].eventHandler=!0,a.eventElem.on(a.trigger,e),t.unbind=function(){t.remove(),a.elem.off(a.trigger,e),a.elem.removeAttr("lay-key"),a.elem.removeAttr(r),a.elem[0].eventHandler=!1,a.eventElem.off(a.trigger,e),a.eventElem.removeAttr("lay-key"),delete d.that[a.id]})},M(document).on("mousedown",function(e){var t,a;D.thisId&&(t=d.getThis(D.thisId))&&(a=t.config,e.target===a.elem[0]||e.target===a.eventElem[0]||e.target===M(a.closeStop)[0]||a.elem[0]&&a.elem[0].contains(e.target)||t.remove())}).on("keydown",function(e){var t;D.thisId&&(t=d.getThis(D.thisId))&&"static"!==t.config.position&&13===e.keyCode&&M("#"+t.elemID)[0]&&t.elemID===w.thisElemDate&&(e.preventDefault(),M(t.footer).find(I)[0].click())}),M(window).on("resize",function(){if(D.thisId){var e=d.getThis(D.thisId);if(e)return!(!e.elem||!M(".layui-laydate")[0])&&void e.position()}}),d.that={},d.getThis=function(e){var t=d.that[e];return t||layui.hint().error(e?n+" instance with ID '"+e+"' not found":"ID argument required"),t},D.render=function(e){e=new w(e);return d.call(e)},D.reload=function(e,t){e=d.getThis(e);if(e)return e.reload(t)},D.getInst=function(e){e=d.getThis(e);if(e)return e.inst},D.hint=function(e,t){e=d.getThis(e);if(e)return e.hint(t)},D.unbind=function(e){e=d.getThis(e);if(e)return e.unbind()},D.close=function(e){e=d.getThis(e||D.thisId);if(e)return e.remove()},D.parse=function(a,n,i){return a=a||{},n=((n="string"==typeof n?d.formatArr(n):n)||[]).concat(),M.each(n,function(e,t){/yyyy|y/.test(t)?n[e]=M.digit(a.year,t.length):/MM|M/.test(t)?n[e]=M.digit(a.month+(i||0),t.length):/dd|d/.test(t)?n[e]=M.digit(a.date,t.length):/HH|H/.test(t)?n[e]=M.digit(a.hours,t.length):/mm|m/.test(t)?n[e]=M.digit(a.minutes,t.length):/ss|s/.test(t)&&(n[e]=M.digit(a.seconds,t.length))}),n.join("")},D.getEndDate=function(e,t){var a=new Date;return a.setFullYear(t||a.getFullYear(),e||a.getMonth()+1,1),new Date(a.getTime()-864e5).getDate()},e(n,D)});!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(T,M){"use strict";var t=[],R=Object.getPrototypeOf,a=t.slice,I=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},W=t.push,b=t.indexOf,F={},$=F.toString,B=F.hasOwnProperty,_=B.toString,z=_.call(Object),g={},v=function v(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},X=function X(e){return null!=e&&e===e.window},C=T.document,U={type:!0,src:!0,nonce:!0,noModule:!0};function V(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in U)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function G(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?F[$.call(e)]||"object":typeof e}var e="3.7.1",Y=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};function J(e){var t=!!e&&"length"in e&&e.length,n=G(e);return!v(e)&&!X(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+n+")"+n+"*"),xe=new RegExp(n+"|>"),be=new RegExp(s),we=new RegExp("^"+e+"$"),Te={ID:new RegExp("^#("+e+")"),CLASS:new RegExp("^\\.("+e+")"),TAG:new RegExp("^("+e+"|[*])"),ATTR:new RegExp("^"+o),PSEUDO:new RegExp("^"+s),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+n+"*(even|odd|(([+-]|)(\\d*)n|)"+n+"*(?:([+-]|)"+n+"*(\\d+)|))"+n+"*\\)|)","i"),bool:new RegExp("^(?:"+ge+")$","i"),needsContext:new RegExp("^"+n+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+n+"*((?:-\\d)?\\d*)"+n+"*\\)|)(?=[^-]|$)","i")},Ce=/^(?:input|select|textarea|button)$/i,Se=/^h\d$/i,Ee=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ke=/[+~]/,f=new RegExp("\\\\[\\da-fA-F]{1,6}"+n+"?|\\\\([^\\r\\n\\f])","g"),d=function(e,t){e="0x"+e.slice(1)-65536;return t||(e<0?String.fromCharCode(65536+e):String.fromCharCode(e>>10|55296,1023&e|56320))},je=function(){Oe()},Ae=Ie(function(e){return!0===e.disabled&&x(e,"fieldset")},{dir:"parentNode",next:"legend"});try{j.apply(t=a.call(i.childNodes),i.childNodes),t[i.childNodes.length].nodeType}catch(sr){j={apply:function(e,t){ue.apply(e,a.call(t))},call:function(e){ue.apply(e,a.call(arguments,1))}}}function N(e,t,n,r){var i,o,s,a,u,l,c=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!r&&(Oe(t),t=t||E,k)){if(11!==f&&(a=Ee.exec(e)))if(i=a[1]){if(9===f){if(!(l=t.getElementById(i)))return n;if(l.id===i)return j.call(n,l),n}else if(c&&(l=c.getElementById(i))&&N.contains(t,l)&&l.id===i)return j.call(n,l),n}else{if(a[2])return j.apply(n,t.getElementsByTagName(e)),n;if((i=a[3])&&t.getElementsByClassName)return j.apply(n,t.getElementsByClassName(i)),n}if(!(pe[e+" "]||p&&p.test(e))){if(l=e,c=t,1===f&&(xe.test(e)||ve.test(e))){for((c=ke.test(e)&&He(t.parentNode)||t)==t&&g.scope||((s=t.getAttribute("id"))?s=S.escapeSelector(s):t.setAttribute("id",s=A)),o=(u=Me(e)).length;o--;)u[o]=(s?"#"+s:":scope")+" "+Re(u[o]);l=u.join(",")}try{return j.apply(n,c.querySelectorAll(l)),n}catch(d){pe(e,!0)}finally{s===A&&t.removeAttribute("id")}}}return _e(e.replace(ee,"$1"),t,n,r)}function De(){var n=[];function r(e,t){return n.push(e+" ")>w.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function u(e){return e[A]=!0,e}function Ne(e){var t=E.createElement("fieldset");try{return!!e(t)}catch(sr){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function qe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function Le(s){return u(function(o){return o=+o,u(function(e,t){for(var n,r=s([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function He(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function Oe(e){var e=e?e.ownerDocument||e:i;return e!=E&&9===e.nodeType&&e.documentElement&&(r=(E=e).documentElement,k=!S.isXMLDoc(E),ae=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&i!=E&&(e=E.defaultView)&&e.top!==e&&e.addEventListener("unload",je),g.getById=Ne(function(e){return r.appendChild(e).id=S.expando,!E.getElementsByName||!E.getElementsByName(S.expando).length}),g.disconnectedMatch=Ne(function(e){return ae.call(e,"*")}),g.scope=Ne(function(){return E.querySelectorAll(":scope")}),g.cssHas=Ne(function(){try{E.querySelector(":has(*,:jqfake)")}catch(sr){return 1}}),g.getById?(w.filter.ID=function(e){var t=e.replace(f,d);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&k)return(e=t.getElementById(e))?[e]:[]}):(w.filter.ID=function(e){var t=e.replace(f,d);return function(e){e="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&k){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},w.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&k)return t.getElementsByClassName(e)},p=[],Ne(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||p.push("\\["+n+"*(?:value|"+ge+")"),e.querySelectorAll("[id~="+A+"-]").length||p.push("~="),e.querySelectorAll("a#"+A+"+*").length||p.push(".#.+[+~]"),e.querySelectorAll(":checked").length||p.push(":checked"),(t=E.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(t=E.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||p.push("\\["+n+"*name"+n+"*="+n+"*(?:''|\"\")")}),g.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),he=function(e,t){var n;return e===t?(se=!0,0):(n=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===E||e.ownerDocument==i&&N.contains(i,e)?-1:t===E||t.ownerDocument==i&&N.contains(i,t)?1:oe?b.call(oe,e)-b.call(oe,t):0:4&n?-1:1)}),E}for(re in N.matches=function(e,t){return N(e,null,null,t)},N.matchesSelector=function(e,t){if(Oe(e),k&&!pe[t+" "]&&(!p||!p.test(t)))try{var n=ae.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(sr){pe(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(f,d),e[3]=(e[3]||e[4]||e[5]||"").replace(f,d),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||N.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&N.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Te.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&be.test(n)&&(t=(t=Me(n,!0))&&n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(f,d).toLowerCase();return"*"===e?function(){return!0}:function(e){return x(e,t)}},CLASS:function(e){var t=ce[e+" "];return t||(t=new RegExp("(^|"+n+")"+e+"("+n+"|$)"))&&ce(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(e){e=N.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===r:"!="===n?e!==r:"^="===n?r&&0===e.indexOf(r):"*="===n?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Ge(e,n,r){return v(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/,Ke=((S.fn.init=function(e,t,n){if(e){if(n=n||Ye,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):v(e)?n.ready!==undefined?n.ready(e):e(S):S.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:Je.exec(e))||!r[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),Ve.test(r[1])&&S.isPlainObject(t))for(var r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r])}else(n=C.getElementById(r[2]))&&(this[0]=n,this.length=1)}return this}).prototype=S.fn,Ye=S(C),/^(?:parents|prev(?:Until|All))/),Qe={children:!0,contents:!0,next:!0,prev:!0};function Ze(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Et=/^$|^module$|\/(?:java|ecma)script/i,h=(o=C.createDocumentFragment().appendChild(C.createElement("div")),(s=C.createElement("input")).setAttribute("type","radio"),s.setAttribute("checked","checked"),s.setAttribute("name","t"),o.appendChild(s),g.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,o.innerHTML="",g.noCloneChecked=!!o.cloneNode(!0).lastChild.defaultValue,o.innerHTML="",g.option=!!o.lastChild,{thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]});function y(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x(e,t)?S.merge([e],n):n}function kt(e,t){for(var n=0,r=e.length;n",""]);var jt=/<|&#?\w+;/;function At(e,t,n,r,i){for(var o,s,a,u,l,c=t.createDocumentFragment(),f=[],d=0,p=e.length;d\s*$/g;function Rt(e,t){return x(e,"table")&&x(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function It(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Wt(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ft(e,t){var n,r,i,o;if(1===t.nodeType){if(m.hasData(e)&&(o=m.get(e).events))for(i in m.remove(t,"handle events"),o)for(n=0,r=o[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}}),[]),ir=/(=)\?(?=&|$)|\?\?/,or=(S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=rr.pop()||S.expando+"_"+Hn.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,s=!1!==e.jsonp&&(ir.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ir.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(ir,"$1"+r):!1!==e.jsonp&&(e.url+=(On.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=T[r],T[r]=function(){o=arguments},n.always(function(){i===undefined?S(T).removeProp(r):T[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,rr.push(r)),o&&v(i)&&i(o[0]),o=i=undefined}),"script"}),g.createHTMLDocument=((e=C.implementation.createHTMLDocument("").body).innerHTML="
    ",2===e.childNodes.length),S.parseHTML=function(e,t,n){var r;return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),r=!n&&[],(n=Ve.exec(e))?[t.createElement(n[1])]:(n=At([e],t,r),r&&r.length&&S(r).remove(),S.merge([],n.childNodes)))},S.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,s,a=S.css(e,"position"),u=S(e),l={};"static"===a&&(e.style.position="relative"),o=u.offset(),r=S.css(e,"top"),s=S.css(e,"left"),a=("absolute"===a||"fixed"===a)&&-1<(r+s).indexOf("auto")?(i=(a=u.position()).top,a.left):(i=parseFloat(r)||0,parseFloat(s)||0),null!=(t=v(t)?t.call(e,n,S.extend({},o)):t).top&&(l.top=t.top-o.top+i),null!=t.left&&(l.left=t.left-o.left+a),"using"in t?t.using.call(e,l):u.css(l)}},S.fn.extend({offset:function(t){var e,n;return arguments.length?t===undefined?this:this.each(function(e){S.offset.setOffset(this,t,e)}):(n=this[0])?n.getClientRects().length?(e=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||yt})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return c(this,function(e,t,n){var r;if(X(e)?r=e:9===e.nodeType&&(r=e.defaultView),n===undefined)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=on(g.pixelPosition,function(e,t){if(t)return t=rn(e,n),Jt.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(s,a){S.each({padding:"inner"+s,content:a,"":"outer"+s},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return c(this,function(e,t,n){var r;return X(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+s],r["scroll"+s],e.body["offset"+s],r["offset"+s],r["client"+s])):n===undefined?S.css(e,t,i):S.style(e,t,n,i)},a,n?e:undefined,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0'+(s?a.title[0]:a.title)+"":"";return a.zIndex=o,t([a.shade?'
    ':"",'
    '+(e&&2!=a.type?"":s)+"'+(n=["layui-icon-tips","layui-icon-success","layui-icon-error","layui-icon-question","layui-icon-lock","layui-icon-face-cry","layui-icon-face-smile"],o="layui-anim layui-anim-rotate layui-anim-loop",0==a.type&&-1!==a.icon?'':3==a.type?(i=["layui-icon-loading","layui-icon-loading-1"],2==a.icon?'
    ':''):"")+((1!=a.type||!e)&&a.content||"")+'
    '+(n=[],r&&(n.push(''),n.push('')),a.closeBtn&&n.push(''),n.join(""))+"
    "+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t,i=0,n=a.btn.length;i'+a.btn[i]+"";return'
    '+e+"
    "}():"")+(a.resize?'':"")+""],s,h('
    ')),this},i.pt.creat=function(){var e,t,i,n,a=this,o=a.config,s=a.index,r="object"==typeof(f=o.content),l=h("body"),c=function(e){var t;o.shift&&(o.anim=o.shift),u.anim[o.anim]&&(t="layer-anim "+u.anim[o.anim],e.addClass(t).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){h(this).removeClass(t)}))};if(o.id&&h("."+u[0]).find("#"+o.id)[0])e=h("#"+o.id).closest("."+u[0]),t=e.attr("times"),i=e.data("config"),n=h("#"+u.SHADE+t),"min"===(e.data("maxminStatus")||{})?b.restore(t):i.hideOnClose&&(n.show(),e.show(),c(e),setTimeout(function(){n.css({opacity:n.data(y)})},10));else{switch(o.removeFocus&&document.activeElement&&document.activeElement.blur(),"string"==typeof o.area&&(o.area="auto"===o.area?["",""]:[o.area,""]),6==b.ie&&(o.fixed=!1),o.type){case 0:o.btn="btn"in o?o.btn:x.$t("layer.confirm"),b.closeAll("dialog");break;case 2:var f=o.content=r?o.content:[o.content||"","auto"];o.content='';break;case 3:delete o.title,delete o.closeBtn,-1===o.icon&&o.icon,b.closeAll("loading");break;case 4:r||(o.content=[o.content,"body"]),o.follow=o.content[1],o.content=o.content[0]+'',delete o.title,o.tips="object"==typeof o.tips?o.tips:[o.tips,!0],o.tipsMore||b.closeAll("tips")}a.vessel(r,function(e,t,i){l.append(e[0]),r?2==o.type||4==o.type?h("body").append(e[1]):f.parents("."+u[0])[0]||(f.data("display",f.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),h("#"+u[0]+s).find("."+u[5]).before(t)):l.append(e[1]),h("#"+u.MOVE)[0]||l.append(d.moveElem=i),a.layero=h("#"+u[0]+s),a.shadeo=h("#"+u.SHADE+s),o.scrollbar||d.setScrollbar(s)}).auto(s),a.shadeo.css({"background-color":o.shade[1]||"#000",opacity:o.shade[0]||o.shade,transition:o.shade[2]||""}),a.shadeo.data(y,o.shade[0]||o.shade),2==o.type&&6==b.ie&&a.layero.find("iframe").attr("src",f[0]),4==o.type?a.tips():(a.offset(),parseInt(d.getStyle(document.getElementById(u.MOVE),"z-index"))||(a.layero.css("visibility","hidden"),b.ready(function(){a.offset(),a.layero.css("visibility","visible")}))),!o.fixed||d.events.resize[a.index]||(d.events.resize[a.index]=function(){a.resize()},g.on("resize",d.events.resize[a.index])),a.layero.data("config",o),o.time<=0||setTimeout(function(){b.close(a.index)},o.time),a.move().callback(),c(a.layero)}},i.pt.resize=function(){var e=this,t=e.config;e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(e.index),4==t.type&&e.tips()},i.pt.auto=function(e){var t=this.config,i=h("#"+u[0]+e),n=((""===t.area[0]||"auto"===t.area[0])&&0t.maxWidth)&&i.width(t.maxWidth),[i.innerWidth(),i.innerHeight()]),a=i.find(u[1]).outerHeight()||0,o=i.find("."+u[6]).outerHeight()||0,e=function(e){(e=i.find(e)).height(n[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===t.type?e("iframe"):""===t.area[1]||"auto"===t.area[1]?0t.maxHeight?(n[1]=t.maxHeight,e("."+u[5])):t.fixed&&n[1]>=g.height()&&(n[1]=g.height(),e("."+u[5])):e("."+u[5]),this},i.pt.offset=function(){var e=this.config,t=this.layero,t=d.updatePosition(t,e);this.offsetTop=t.offsetTop,this.offsetLeft=t.offsetLeft},i.pt.tips=function(){var e=this.config,t=this.layero,i=[t.outerWidth(),t.outerHeight()],n=h(e.follow),a={width:(n=n[0]?n:h("body")).outerWidth(),height:n.outerHeight(),top:n.offset().top,left:n.offset().left},o=t.find(".layui-layer-TipsG"),n=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0'):e.removeClass("layui-layer-btn-is-loading").removeAttr("disabled").find(".layui-layer-btn-loading-icon").remove()},i.pt.callback=function(){var n=this,a=n.layero,o=n.config;n.openLayer(),o.success&&(2==o.type?a.find("iframe").on("load",function(){o.success(a,n.index,n)}):o.success(a,n.index,n)),6==b.ie&&n.IE6(a),a.find("."+u[6]).children("a").on("click",function(){var e,t=h(this),i=t.index();t.attr("disabled")||(o.btnAsync?(e=0===i?o.yes||o.btn1:o["btn"+(i+1)],n.loading=function(e){n.btnLoading(t,e)},e?d.promiseLikeResolve(e.call(o,n.index,a,n)).then(function(e){!1!==e&&b.close(n.index)},function(e){e!==m&&p.console&&p.console.error("layer error hint: "+e)}):b.close(n.index)):0===i?o.yes?o.yes(n.index,a,n):o.btn1?o.btn1(n.index,a,n):b.close(n.index):!1!==(o["btn"+(i+1)]&&o["btn"+(i+1)](n.index,a,n))&&b.close(n.index))}),a.find("."+u[7]).on("click",function(){!1!==(o.cancel&&o.cancel(n.index,a,n))&&b.close(n.index)}),o.shadeClose&&n.shadeo.on("click",function(){b.close(n.index)}),a.find(".layui-layer-min").on("click",function(){!1!==(o.min&&o.min(a,n.index,n))&&b.min(n.index,o)}),a.find(".layui-layer-max").on("click",function(){h(this).hasClass("layui-layer-maxmin")?(b.restore(n.index),o.restore&&o.restore(a,n.index,n)):(b.full(n.index,o),setTimeout(function(){o.full&&o.full(a,n.index,n)},100))}),o.end&&(d.end[n.index]=o.end),o.beforeEnd&&(d.beforeEnd[n.index]=h.proxy(o.beforeEnd,o,a,n.index,n))},d.reselect=function(){h.each(h("select"),function(e,t){var i=h(this);i.parents("."+u[0])[0]||1==i.attr("layer")&&h("."+u[0]).length<1&&i.removeAttr("layer").show()})},i.pt.IE6=function(e){h("select").each(function(e,t){var i=h(this);i.parents("."+u[0])[0]||"none"!==i.css("display")&&i.attr({layer:"1"}).hide()})},i.pt.openLayer=function(){b.zIndex=this.config.zIndex,b.setTop=function(e){return b.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",function(){b.zIndex++,e.css("z-index",b.zIndex+1)}),b.zIndex}},d.record=function(e){if(!e[0])return p.console&&console.error("index error");var t=e.attr("type"),i=e.find(".layui-layer-content"),t=t===d.type[2]?i.children("iframe"):i,n=[e[0].style.width||d.getStyle(e[0],"width"),e[0].style.height||d.getStyle(e[0],"height"),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:n}),i.data(l,d.getStyle(t[0],"height"))},d.setScrollbar=function(e){u.html.css("overflow","hidden")},d.restScrollbar=function(t){u.html.css("overflow")&&0===h("."+u[0]).filter(function(){var e=h(this);return!1===(e.data("config")||{}).scrollbar&&"min"!==e.data("maxminStatus")&&e.attr("times")!==String(t)}).length&&u.html.css("overflow","")},d.promiseLikeResolve=function(e){var t=h.Deferred();return e&&"function"==typeof e.then?e.then(t.resolve,t.reject):t.resolve(e),t.promise()},d.updatePosition=function(e,t){var i=[e.outerWidth(),e.outerHeight()],n={offsetTop:(g.height()-i[1])/2,offsetLeft:(g.width()-i[0])/2};return"object"==typeof t.offset?(n.offsetTop=t.offset[0],n.offsetLeft=t.offset[1]||n.offsetLeft):"auto"!==t.offset&&("t"===t.offset?n.offsetTop=0:"r"===t.offset?n.offsetLeft=g.width()-i[0]:"b"===t.offset?n.offsetTop=g.height()-i[1]:"l"===t.offset?n.offsetLeft=0:"lt"===t.offset?(n.offsetTop=0,n.offsetLeft=0):"lb"===t.offset?(n.offsetTop=g.height()-i[1],n.offsetLeft=0):"rt"===t.offset?(n.offsetTop=0,n.offsetLeft=g.width()-i[0]):"rb"===t.offset?(n.offsetTop=g.height()-i[1],n.offsetLeft=g.width()-i[0]):n.offsetTop=t.offset),t.fixed||(n.offsetTop=/%$/.test(n.offsetTop)?g.height()*parseFloat(n.offsetTop)/100:parseFloat(n.offsetTop),n.offsetLeft=/%$/.test(n.offsetLeft)?g.width()*parseFloat(n.offsetLeft)/100:parseFloat(n.offsetLeft),n.offsetTop+=g.scrollTop(),n.offsetLeft+=g.scrollLeft()),"min"===e.data("maxminStatus")&&(n.offsetTop=g.height()-(e.find(u[1]).outerHeight()||0),n.offsetLeft=e.css("left")),e.css({top:n.offsetTop,left:n.offsetLeft}),n},(p.layer=b).getChildFrame=function(e,t){return t=t||h("."+u[4]).attr("times"),h("#"+u[0]+t).find("iframe").contents().find(e)},b.getFrameIndex=function(e){if(e)return h("#"+e).parents("."+u[4]).attr("times")},b.iframeAuto=function(e){var t,i,n,a,o;e&&(i=(t=h("#"+u[0]+e)).data("config"),e=b.getChildFrame("html",e).outerHeight(),n=t.find(u[1]).outerHeight()||0,a=t.find("."+u[6]).outerHeight()||0,(o="maxHeight"in i?i.maxHeight:g.height())&&(e=Math.min(e,o-n-a)),t.css({height:e+n+a}),t.find("iframe").css({height:e}),d.updatePosition(t,i))},b.iframeSrc=function(e,t){h("#"+u[0]+e).find("iframe").attr("src",t)},b.style=function(e,t,i){var e=h("#"+u[0]+e),n=e.find(".layui-layer-content"),a=e.attr("type"),o=e.find(u[1]).outerHeight()||0,s=e.find("."+u[6]).outerHeight()||0;e.attr("minLeft");a!==d.type[3]&&a!==d.type[4]&&(i||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-o-s<=64&&(t.height=64+o+s)),e.css(t),s=e.find("."+u[6]).outerHeight()||0,a===d.type[2]?e.find("iframe").css({height:("number"==typeof t.height?t.height:e.height())-o-s}):n.css({height:("number"==typeof t.height?t.height:e.height())-o-s-parseFloat(n.css("padding-top"))-parseFloat(n.css("padding-bottom"))}))},b.min=function(e,t){var i,n,a,o,s,r,l=h("#"+u[0]+e),c=l.data("maxminStatus");"min"!==c&&("max"===c&&b.restore(e),l.data("maxminStatus","min"),t=t||l.data("config")||{},c=h("#"+u.SHADE+e),i=l.find(".layui-layer-min"),n=l.find(u[1]).outerHeight()||0,o=(a="string"==typeof(o=l.attr("minLeft")))?o:181*d.minStackIndex+"px",s=l.css("position"),r={width:180,height:n,position:"fixed",overflow:"hidden"},d.record(l),0g.width()&&(o=g.width()-180-(d.minStackArr.edgeIndex=d.minStackArr.edgeIndex||0,d.minStackArr.edgeIndex+=3))<0&&(o=0),t.minStack&&(r.left=o,r.top=g.height()-n,a||d.minStackIndex++,l.attr("minLeft",o)),l.attr("position",s),b.style(e,r,!0),i.hide(),"page"===l.attr("type")&&l.find(u[4]).hide(),d.restScrollbar(e),c.hide())},b.restore=function(e){var t=h("#"+u[0]+e),i=h("#"+u.SHADE+e),n=t.find(".layui-layer-content"),a=t.attr("area").split(","),o=t.attr("type"),s=t.data("config")||{},r=n.data(l);t.removeData("maxminStatus"),b.style(e,{width:a[0],height:a[1],top:parseFloat(a[2]),left:parseFloat(a[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===o&&t.find(u[4]).show(),s.scrollbar?d.restScrollbar(e):d.setScrollbar(e),r!==m&&(n.removeData(l),(o===d.type[2]?n.children("iframe"):n).css({height:r})),i.show()},b.full=function(t){var i=h("#"+u[0]+t),e=i.data("maxminStatus");"max"!==e&&("min"===e&&b.restore(t),i.data("maxminStatus","max"),d.record(i),d.setScrollbar(t),setTimeout(function(){var e="fixed"===i.css("position");b.style(t,{top:e?0:g.scrollTop(),left:e?0:g.scrollLeft(),width:"100%",height:"100%"},!0),i.find(".layui-layer-min").hide()},100))},b.title=function(e,t){h("#"+u[0]+(t||b.index)).find(u[1]).html(e)},b.close=function(s,r){var e,t,l=(e=h("."+u[0]).children("#"+s).closest("."+u[0]))[0]?(s=e.attr("times"),e):h("#"+u[0]+s),c=l.attr("type"),i=l.data("config")||{},f=i.id&&i.hideOnClose;l[0]&&(t=function(){var o={slideDown:"layer-anim-slide-down-out",slideLeft:"layer-anim-slide-left-out",slideUp:"layer-anim-slide-up-out",slideRight:"layer-anim-slide-right-out"}[i.anim]||"layer-anim-close",e=function(){var e="layui-layer-wrap";if(f)return l.removeClass("layer-anim "+o),l.hide();if(c===d.type[1]&&"object"===l.attr("conType")){l.children(":not(."+u[5]+")").remove();for(var t=l.find("."+e),i=0;i<2;i++)t.unwrap();t.css("display",t.data("display")).removeClass(e)}else{if(c===d.type[2])try{var n=h("#"+u[4]+s)[0];n.contentWindow.document.write(""),n.contentWindow.close(),l.find("."+u[5])[0].removeChild(n)}catch(a){}l[0].innerHTML="",l.remove()}"function"==typeof d.end[s]&&d.end[s](),delete d.end[s],"function"==typeof r&&r(),d.events.resize[s]&&(g.off("resize",d.events.resize[s]),delete d.events.resize[s])},t=h("#"+u.SHADE+s);b.ie&&b.ie<10||!i.isOutAnim?t[f?"hide":"remove"]():(t.css({opacity:0}),setTimeout(function(){t[f?"hide":"remove"]()},350)),i.isOutAnim&&l.addClass("layer-anim "+o),6==b.ie&&d.reselect(),d.restScrollbar(s),"string"==typeof l.attr("minLeft")&&(d.minStackIndex--,d.minStackArr.push(l.attr("minLeft"))),b.ie&&b.ie<10||!i.isOutAnim?e():setTimeout(function(){e()},200)},f||"function"!=typeof d.beforeEnd[s]?(delete d.beforeEnd[s],t()):d.promiseLikeResolve(d.beforeEnd[s]()).then(function(e){!1!==e&&(delete d.beforeEnd[s],t())},function(e){e!==m&&p.console&&p.console.error("layer error hint: "+e)}))},b.closeAll=function(n,a){"function"==typeof n&&(a=n,n=null);var o=h("."+u[0]);h.each(o,function(e){var t=h(this),i=n?t.attr("type")===n:1;i&&b.close(t.attr("times"),e===o.length-1?a:null)}),0===o.length&&"function"==typeof a&&a()},b.closeLast=function(i,e){var t,n=[],a=h.isArray(i);h("string"==typeof i?".layui-layer-"+i:".layui-layer").each(function(e,t){t=h(t);if(a&&-1===i.indexOf(t.attr("type"))||"none"===t.css("display"))return!0;n.push(Number(t.attr("times")))}),0":'"),s=i.success;return delete i.success,b.open(h.extend({type:1,btn:[x.$t("layer.confirm"),x.$t("layer.cancel")],content:o,skin:"layui-layer-prompt"+w("prompt"),maxWidth:g.width(),success:function(e){(a=e.find(".layui-layer-input")).val(i.value||"").focus(),"function"==typeof s&&s(e)},resize:!1,yes:function(e){var t=a.val();t.length>(i.maxlength||500)?b.tips(x.$t("layer.prompt.InputLengthPrompt",{length:i.maxlength||500}),a,{tips:1}):n&&n(t,e,a)}},i))},b.tab=function(n){var a=(n=n||{}).tab||{},o="layui-this",s=n.success;return delete n.success,b.open(h.extend({type:1,skin:"layui-layer-tab"+w("tab"),resize:!1,title:function(){var e=a.length,t=1,i="";if(0'+a[0].title+"";t"+a[t].title+"";return i}(),content:'
      '+function(){var e=a.length,t=1,i="";if(0'+(a[0].content||"no content")+"";t'+(a[t].content||"no content")+"";return i}()+"
    ",success:function(e){var t=e.find(".layui-layer-title").children(),i=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var e=h(this),t=e.index();e.addClass(o).siblings().removeClass(o),i.eq(t).show().siblings().hide(),"function"==typeof n.change&&n.change(t)}),"function"==typeof s&&s(e)}},n))},b.photos=function(n,e,a){var s={};if((n=h.extend(!0,{toolbar:!0,footer:!0},n)).photos){var t=!("string"==typeof n.photos||n.photos instanceof h),i=t?n.photos:{},o=i.data||[],r=i.start||0,l=n.success;if(s.imgIndex=1+(0|r),n.img=n.img||"img",delete n.success,t){if(0===o.length)return b.msg(x.$t("layer.photos.noData"))}else{var c=h(n.photos),f=function(){o=[],c.find(n.img).each(function(e){var t=h(this);t.attr("layer-index",e),o.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("lay-src")||t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(f(),e||c.on("click",n.img,function(){f();var e=h(this).attr("layer-index");b.photos(h.extend(n,{photos:{start:e,data:o,tab:n.tab},full:n.full}),!0)}),!e)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=o.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>o.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){var t;s.end||(t=e.keyCode,e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&b.close(s.index))},s.tabimg=function(e){if(!(o.length<=1))return i.start=s.imgIndex-1,b.close(s.index),b.photos(n,!0,e)},s.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},s.image={},s.getTransform=function(e){var t=[],i=e.rotate,n=e.scaleX,e=e.scale;return s.isNumber(i)&&0!==i&&t.push("rotate("+i+"deg)"),s.isNumber(n)&&1!==n&&t.push("scaleX("+n+")"),s.isNumber(e)&&t.push("scale("+e+")"),t.length?t.join(" "):"none"},s.event=function(e,i,n){var a,o;s.main.find(".layui-layer-photos-prev").on("click",function(e){e.preventDefault(),s.imgprev(!0)}),s.main.find(".layui-layer-photos-next").on("click",function(e){e.preventDefault(),s.imgnext(!0)}),h(document).on("keyup",s.keyup),e.off("click").on("click","*[toolbar-event]",function(){var e=h(this);switch(e.attr("toolbar-event")){case"rotate":s.image.rotate=((s.image.rotate||0)+Number(e.attr("data-option")))%360,s.imgElem.css({transform:s.getTransform(s.image)});break;case"scalex":s.image.scaleX=-1===s.image.scaleX?1:-1,s.imgElem.css({transform:s.getTransform(s.image)});break;case"zoom":var t=Number(e.attr("data-option"));s.image.scale=(s.image.scale||1)+t,t<0&&s.image.scale<0-t&&(s.image.scale=0-t),s.imgElem.css({transform:s.getTransform(s.image)});break;case"reset":s.image.scaleX=1,s.image.scale=1,s.image.rotate=0,s.imgElem.css({transform:"none"});break;case"close":b.close(i)}n.offset(),n.auto(i)}),s.main.on("mousewheel DOMMouseScroll",function(e){var t=e.originalEvent.wheelDelta||-e.originalEvent.detail,i=s.main.find('[toolbar-event="zoom"]');(0n)&&("left"===t.direction?s.imgnext(!0):"right"===t.direction&&s.imgprev(!0))},h.each([n.shadeo,s.main],function(e,t){a.touchSwipe(t,{onTouchEnd:o})}))},s.loadi=b.load(1,{shade:!("shade"in n)&&[.9,m,"unset"],scrollbar:!1});var t=o[r].src,d=function(e){b.close(s.loadi);var t,i=o[r].alt||"";a&&(n.anim=-1),s.index=b.open(h.extend({type:1,id:"layui-layer-photos",area:(e=[e.width,e.height],t=[h(p).width()-100,h(p).height()-100],!n.full&&(t[0]'+i+''+(t=['
    '],1','','',"
    "].join("")),n.toolbar&&t.push(['
    ','','','','','','',"
    "].join("")),n.footer&&t.push(['"].join("")),t.push(""),t.join(""))+"",success:function(e,t,i){s.main=e.find(".layer-layer-photos-main"),s.footer=e.find(".layui-layer-photos-footer"),s.imgElem=s.main.children("img"),s.event(e,t,i),n.tab&&n.tab(o[r],e),"function"==typeof l&&l(e)},end:function(){s.end=!0,h(document).off("keyup",s.keyup)}},n))},u=function(){b.close(s.loadi),b.msg(''+x.$t("layer.photos.urlError.prompt")+"",{time:3e4,btn:[x.$t("layer.photos.urlError.confirm"),x.$t("layer.photos.urlError.cancel")],yes:function(){1").addClass(r));layui.each(i.bars,function(t,e){var n=s('
  • ');n.addClass(e.icon).attr({"lay-type":e.type,style:e.style||(i.bgcolor?"background-color: "+i.bgcolor:"")}).html(e.content),n.on("click",function(){var t=s(this).attr("lay-type");"top"===t&&("body"===i.target?s("html,body"):c).animate({scrollTop:0},i.duration),"function"==typeof i.click&&i.click.call(this,t)}),"object"===layui.type(i.on)&&layui.each(i.on,function(t,e){n.on(t,function(){var t=s(this).attr("lay-type");"function"==typeof e&&e.call(this,t)})}),"top"===e.type&&(n.addClass("layui-fixbar-top"),o=n),l.append(n)}),u.find("."+r).remove(),"object"==typeof i.css&&l.css(i.css),u.append(l),o&&(e=function e(){return c.scrollTop()>=i.margin?t||(o.show(),t=1):t&&(o.hide(),t=0),e}()),c.on("scroll",function(){e&&(clearTimeout(n),n=setTimeout(function(){e()},100))})},countdown:function(i){i=s.extend(!0,{date:new Date,now:new Date},i);var o=arguments,r=(1r-t.margin||u."+w,O=function(e){var i=this;i.index=++a.index,i.config=c.extend({},i.config,a.config,e),i.stopClickOutsideEvent=c.noop,i.stopResizeEvent=c.noop,i.init()};O.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:[200,300],shade:0,accordion:!1,closeOnClick:!0},O.prototype.reload=function(e,i){var t=this;t.config=c.extend({},t.config,e),t.init(!0,i)},O.prototype.init=function(e,i){var t=this,n=t.config,o=c(n.elem);return 1",(t="href"in i?''+a+"":a,n?'
    '+t+("parent"===l?'':"group"===l&&s.isAllowSpread?'':"")+"
    ":'
    '+t+"
    "),"
  • "].join(""))).data("item",i),n&&(o=c('
    '),t=c("
      "),"parent"===l?(o.append(u(t,i[d.children])),a.append(o)):a.append(u(t,i[d.children]))),r.append(a))}),r},t=['
      ',"
      "].join(""),n=s.content||(n=c('
        '),0'+r.$t("dropdown.noData")+""),n),o=v.findMainElem(s.id);"reloadData"===e&&o.length?(i=a.mainElem=o).html(n):((i=a.mainElem=c(t)).append(n),i.addClass(s.className),i.attr("style",s.style),a.remove(s.id),s.target.append(i),s.elem.data(y,!0),e=s.shade?'
        ':"",o=c(e),"touchstart"==f&&o.on(f,function(e){e.preventDefault()}),i.before(o),"mouseenter"===s.trigger&&i.on("mouseenter",function(){clearTimeout(a.timer)}).on("mouseleave",function(){a.delayRemove()})),a.position(),i.find(".layui-menu").on(f,function(e){layui.stope(e)}),i.find(".layui-menu li").on("click",function(e){var i=c(this),t=i.data("item")||{},n=t[d.children]&&0n.width()&&(t.addClass(b),(i=t[0].getBoundingClientRect()).left<0)&&t.removeClass(b),i.bottom>n.height())&&t.eq(0).css("margin-top",-(i.bottom-n.height()+5))}).on("mouseleave",t,function(e){var i=c(this).children("."+o);i.removeClass(b),i.css("margin-top",0)}),a.close=function(e){e=v.getThis(e);return e?(e.remove(),v.call(e)):this},a.open=function(e){e=v.getThis(e);return e?(e.render(),v.call(e)):this},a.reload=function(e,i,t){e=v.getThis(e);return e?(e.reload(i,t),v.call(e)):this},a.reloadData=function(){var t=c.extend([],arguments),n=(t[2]="reloadData",new RegExp("^("+["data","templet","content"].join("|")+")$"));return layui.each(t[1],function(e,i){n.test(e)||delete t[1][e]}),a.reload.apply(null,t)},a.render=function(e){e=new O(e);return v.call(e)},e(s,a)});layui.define("component",function(e){"use strict";var E=layui.$,I=layui.lay,t=layui.component({name:"slider",config:{type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,tipsAlways:!1,input:!1,range:!1,height:200,disabled:!1,theme:"#16baaa"},CONST:{ELEM_VIEW:"layui-slider",SLIDER_BAR:"layui-slider-bar",SLIDER_WRAP:"layui-slider-wrap",SLIDER_WRAP_BTN:"layui-slider-wrap-btn",SLIDER_TIPS:"layui-slider-tips",SLIDER_INPUT:"layui-slider-input",SLIDER_INPUT_TXT:"layui-slider-input-txt",SLIDER_INPUT_BTN:"layui-slider-input-btn",ELEM_HOVER:"layui-slider-hover"},render:function(e){var t,a=this,n=a.config,i=(n.step<=0&&(n.step=1),n.maxn.max&&(n.value=n.max),s=(n.value-n.min)/(n.max-n.min)*100+"%"),n.disabled?"#c2c2c2":n.theme),l='
        '+(n.tips?'
        ":"")+'
        '+(n.range?'
        ':"")+"
        ",s=E(n.elem),o=s.next("."+S.ELEM_VIEW);if(o[0]&&o.remove(),a.elemTemp=E(l),n.range?(a.elemTemp.find("."+S.SLIDER_WRAP).eq(0).data("value",n.value[0]),a.elemTemp.find("."+S.SLIDER_WRAP).eq(1).data("value",n.value[1])):a.elemTemp.find("."+S.SLIDER_WRAP).data("value",n.value),s.html(a.elemTemp),"vertical"===n.type&&a.elemTemp.height(n.height+"px"),n.showstep){for(var r=(n.max-n.min)/n.step,u="",c=1;c<1+r;c++){var d=100*c/r;d<100&&(u+='
        ')}a.elemTemp.append(u)}function p(e){e=e.parent().data("value"),e=n.setTips?n.setTips(e):e;a.elemTemp.find("."+S.SLIDER_TIPS).html(e)}function m(e){var t="vertical"===n.type?n.height:a.elemTemp[0].offsetWidth,i=a.elemTemp.find("."+S.SLIDER_WRAP);return("vertical"===n.type?t-e.parent()[0].offsetTop-i.height():e.parent()[0].offsetLeft)/t*100}function v(e){"vertical"===n.type?a.elemTemp.find("."+S.SLIDER_TIPS).css({bottom:e+"%","margin-bottom":"20px",display:"inline-block"}):a.elemTemp.find("."+S.SLIDER_TIPS).css({left:e+"%",display:"inline-block"})}n.input&&!n.range&&(i=E('
        '),s.css("position","relative"),s.append(i),s.find("."+S.SLIDER_INPUT_TXT).children("input").val(n.value),"vertical"===n.type?i.css({left:0,top:-48}):a.elemTemp.css("margin-right",i.outerWidth()+15)),n.disabled?(a.elemTemp.addClass(S.CLASS_DISABLED),a.elemTemp.find("."+S.SLIDER_WRAP_BTN).addClass(S.CLASS_DISABLED)):a.slide(),n.tips&&(n.tipsAlways?(p(o=a.elemTemp.find("."+S.SLIDER_WRAP_BTN)),v(m(o))):a.elemTemp.find("."+S.SLIDER_WRAP_BTN).on("mouseover",function(){p(E(this));var e=m(E(this));clearTimeout(t),t=setTimeout(function(){v(e)},300)}).on("mouseout",function(){clearTimeout(t),n.tipsAlways||a.elemTemp.find("."+S.SLIDER_TIPS).css("display","none")}))},extendsInstance:function(){var i=this,a=i.config;return{setValue:function(e,t){return e=(e=e>a.max?a.max:e)a[1]&&a.reverse(),u.value=c.range?a:l,c.change&&c.change(u.value),"done"===i&&c.done&&c.done(u.value)},y=function(e){var t=e/p()*100/v,i=Math.round(t)*v;return i=e==p()?Math.ceil(t)*v:i},T=E(['
        p()?p():t)/p()*100/v;h(t,o),r.addClass(S.ELEM_HOVER),d.find("."+S.SLIDER_TIPS).show(),e.preventDefault()},a=function(e){r.removeClass(S.ELEM_HOVER),c.tipsAlways||setTimeout(function(){d.find("."+S.SLIDER_TIPS).hide()},e)},n=function(){a&&a(I.touchEventsSupported()?1e3:0),T.remove(),c.done&&c.done(u.value),I.touchEventsSupported()&&(t[0].removeEventListener("touchmove",i,!!I.passiveSupported&&{passive:!1}),t[0].removeEventListener("touchend",n),t[0].removeEventListener("touchcancel",n))},E("#LAY-slider-moving")[0]||E("body").append(T),T.on("mousemove",i),T.on("mouseup",n).on("mouseleave",n),I.touchEventsSupported()&&(t[0].addEventListener("touchmove",i,!!I.passiveSupported&&{passive:!1}),t[0].addEventListener("touchend",n),t[0].addEventListener("touchcancel",n))})}),d.on("click",function(e){var t=E("."+S.SLIDER_WRAP_BTN),i=E(this);!t.is(event.target)&&0===t.has(event.target).length&&t.length&&(i=(t=(t=(t="vertical"===c.type?p()-e.clientY+i.offset().top-E(window).scrollTop():e.clientX-i.offset().left-E(window).scrollLeft())<0?0:t)>p()?p():t)/p()*100/v,t=c.range?"vertical"===c.type?Math.abs(t-parseInt(E(m[0]).css("bottom")))>Math.abs(t-parseInt(E(m[1]).css("bottom")))?1:0:Math.abs(t-m[0].offsetLeft)>Math.abs(t-m[1].offsetLeft)?1:0:0,h(i,t,"done"),e.preventDefault())}),o.children("."+S.SLIDER_INPUT_BTN).children("i").each(function(t){E(this).on("click",function(){r=o.children("."+S.SLIDER_INPUT_TXT).children("input").val();var e=((r=1==t?r-c.stepc.max?c.max:Number(r)+c.step)-c.min)/(c.max-c.min)*100/v;h(e,0,"done")})});var a=function(){var e=this.value,e=(e=(e=(e=isNaN(e)?0:e)c.max?c.max:e,((this.value=e)-c.min)/(c.max-c.min)*100/v);h(e,0,"done")};o.children("."+S.SLIDER_INPUT_TXT).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),a.call(this))}).on("change",a)},e(S.MOD_NAME,t)});layui.define(["i18n","component"],function(e){"use strict";var I=layui.$,P=layui.lay,n=layui.i18n,i=layui.device().mobile?"click":"mousedown",o=layui.component({name:"colorpicker",config:{color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#16baaa","#16b777","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#393D49","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},CONST:{ELEM:"layui-colorpicker",ELEM_MAIN:".layui-colorpicker-main",ICON_PICKER_DOWN:"layui-icon-down",ICON_PICKER_CLOSE:"layui-icon-close",PICKER_TRIG_SPAN:"layui-colorpicker-trigger-span",PICKER_TRIG_I:"layui-colorpicker-trigger-i",PICKER_SIDE:"layui-colorpicker-side",PICKER_SIDE_SLIDER:"layui-colorpicker-side-slider",PICKER_BASIS:"layui-colorpicker-basis",PICKER_ALPHA_BG:"layui-colorpicker-alpha-bgcolor",PICKER_ALPHA_SLIDER:"layui-colorpicker-alpha-slider",PICKER_BASIS_CUR:"layui-colorpicker-basis-cursor",PICKER_INPUT:"layui-colorpicker-main-input"},beforeInit:function(){this.stopClickOutsideEvent=I.noop,this.stopResizeEvent=I.noop,S.PICKER_OPENED=S.MOD_ID+"-opened"},beforeRender:function(){this.config.target=I("body")},render:function(){var e=this,i=e.config,o=I(['
        ',"",'','',"","","
        "].join("")),t=i.elem;i.size&&o.addClass("layui-colorpicker-"+i.size),t.addClass("layui-inline").html(e.elemColorBox=o),e.color=e.elemColorBox.find("."+S.PICKER_TRIG_SPAN)[0].style.background}}),k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),t=Math.max(e.r,e.g,e.b),n=t-o;return i.b=t,i.s=0!==t?255*n/t:0,0!==i.s?e.r==t?i.h=(e.g-e.b)/n:e.g==t?i.h=2+(e.b-e.r)/n:i.h=4+(e.r-e.g)/n:i.h=-1,t===o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},E=function(e){var i,o={},t=e.h,n=255*e.s/100,e=255*e.b/100;return 0==n?o.r=o.g=o.b=e:(e=t%60*((i=e)-(n=(255-n)*e/255))/60,(t=360===t?0:t)<60?(o.r=i,o.b=n,o.g=n+e):t<120?(o.g=i,o.b=n,o.r=i-e):t<180?(o.g=i,o.r=n,o.b=n+e):t<240?(o.b=i,o.r=n,o.g=i-e):t<300?(o.b=i,o.g=n,o.r=n+e):t<360?(o.r=i,o.g=n,o.b=i-e):(o.r=0,o.g=0,o.b=0)),{r:Math.round(o.r),g:Math.round(o.g),b:Math.round(o.b)}},_=function(e){var e=E(e),o=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];return I.each(o,function(e,i){1===i.length&&(o[e]="0"+i)}),o.join("")},R=function(e){e=e.match(/[0-9]{1,3}/g)||[];return{r:e[0],g:e[1],b:e[2]}},K=I(window),S=(I(document),o.CONST),t=o.Class;t.prototype.renderPicker=function(){var o,e=this,i=e.config,t=e.elemPicker=I(['
        ','
        ','
        ','
        ','
        ','
        ',"
        ",'
        ','
        ',"
        ","
        ",'
        ','
        ','
        ',"
        ","
        ",i.predefine?(o=['
        '],layui.each(i.colors,function(e,i){o.push(['
        ','
        ',"
        "].join(""))}),o.push("
        "),o.join("")):"",'
        ','
        ','',"
        ",'
        ','",'","","
        "].join(""));e.removePicker(i.id),i.target.append(t),i.elem.data(S.PICKER_OPENED,!0),e.position(),e.pickerEvents(),e.onClickOutside(),e.autoUpdatePosition()},t.prototype.removePicker=function(e){var i=this,o=i.config,e=I("#layui-colorpicker"+(e||i.index));return i.stopClickOutsideEvent(),i.stopResizeEvent(),e[0]&&(e.remove(),o.elem.removeData(S.PICKER_OPENED),"function"==typeof o.close)&&o.close(i.color),i},t.prototype.position=function(){var e=this,i=e.config;return P.position(e.bindElem||e.elemColorBox[0],e.elemPicker[0],{position:i.position,align:"center"}),e},t.prototype.val=function(){var e,i=this,o=(i.config,i.elemColorBox.find("."+S.PICKER_TRIG_SPAN)),t=i.elemPicker.find("."+S.PICKER_INPUT),n=o[0].style.backgroundColor;n?(e=k(R(n)),o=o.attr("lay-type"),i.select(e.h,e.s,e.b),"torgb"===o?t.find("input").val(n):"rgba"===o?(o=R(n),3===(n.match(/[0-9]{1,3}/g)||[]).length?(t.find("input").val("rgba("+o.r+", "+o.g+", "+o.b+", 1)"),i.elemPicker.find("."+S.PICKER_ALPHA_SLIDER).css("left",280)):(t.find("input").val(n),n=280*n.slice(n.lastIndexOf(",")+1,n.length-1),i.elemPicker.find("."+S.PICKER_ALPHA_SLIDER).css("left",n)),i.elemPicker.find("."+S.PICKER_ALPHA_BG)[0].style.background="linear-gradient(to right, rgba("+o.r+", "+o.g+", "+o.b+", 0), rgb("+o.r+", "+o.g+", "+o.b+"))"):t.find("input").val("#"+_(e))):(i.select(0,100,100),t.find("input").val(""),i.elemPicker.find("."+S.PICKER_ALPHA_BG)[0].style.background="",i.elemPicker.find("."+S.PICKER_ALPHA_SLIDER).css("left",280))},t.prototype.side=function(){var r=this,l=r.config,c=r.elemColorBox.find("."+S.PICKER_TRIG_SPAN),s=c.attr("lay-type"),a=r.elemPicker.find("."+S.PICKER_SIDE),o=r.elemPicker.find("."+S.PICKER_SIDE_SLIDER),u=r.elemPicker.find("."+S.PICKER_BASIS),t=r.elemPicker.find("."+S.PICKER_BASIS_CUR),d=r.elemPicker.find("."+S.PICKER_ALPHA_BG),f=r.elemPicker.find("."+S.PICKER_ALPHA_SLIDER),p=o[0].offsetTop/180*360,g=100-t[0].offsetTop/180*100,v=t[0].offsetLeft/260*100,h=Math.round(f[0].offsetLeft/280*100)/100,m=r.elemColorBox.find("."+S.PICKER_TRIG_I),e=r.elemPicker.find(".layui-colorpicker-pre").children("div"),b=function(e,i,o,t){r.select(e,i,o);var n=E({h:e,s:i,b:o}),e=_({h:e,s:i,b:o}),i=r.elemPicker.find("."+S.PICKER_INPUT).find("input");m.addClass(S.ICON_PICKER_DOWN).removeClass(S.ICON_PICKER_CLOSE),c[0].style.background="rgb("+n.r+", "+n.g+", "+n.b+")","torgb"===s?i.val("rgb("+n.r+", "+n.g+", "+n.b+")"):"rgba"===s?(f.css("left",280*t),i.val("rgba("+n.r+", "+n.g+", "+n.b+", "+t+")"),c[0].style.background="rgba("+n.r+", "+n.g+", "+n.b+", "+t+")",d[0].style.background="linear-gradient(to right, rgba("+n.r+", "+n.g+", "+n.b+", 0), rgb("+n.r+", "+n.g+", "+n.b+"))"):i.val("#"+e),l.change&&l.change(I.trim(r.elemPicker.find("."+S.PICKER_INPUT).find("input").val()))},i=I(['
        '].join("")),y=function(e){I("#LAY-colorpicker-moving")[0]||I("body").append(i),i.on("mousemove",e),i.on("mouseup",function(){i.remove()}).on("mouseleave",function(){i.remove()})},n=!0,C=!0;o.on("mousedown",function(e,i){var t=this.offsetTop,n=(e.clientY===undefined?i:e).clientY;C&&layui.stope(e),y(function(e){var i=t+(e.clientY-n),o=a[0].offsetHeight,o=(i=o<(i=i<0?0:i)?o:i)/180*360;b(p=o,v,g,h),e.preventDefault()}),e.preventDefault()}),a.on("mousedown",function(e){var i=e.clientY-I(this).offset().top+K.scrollTop(),i=(i=(i=i<0?0:i)>this.offsetHeight?this.offsetHeight:i)/180*360;b(p=i,v,g,h),e.preventDefault(),n&&o.trigger("mousedown",e)}),t.on("mousedown",function(e,i){var r=this.offsetTop,l=this.offsetLeft,c=(e.clientY===undefined?i:e).clientY,s=(e.clientX===undefined?i:e).clientX;C&&layui.stope(e),y(function(e){var i=r+(e.clientY-c),o=l+(e.clientX-s),t=u[0].offsetHeight,n=u[0].offsetWidth,n=(o=n<(o=o<0?0:o)?n:o)/260*100,o=100-(i=t<(i=i<0?0:i)?t:i)/180*100;b(p,v=n,g=o,h),e.preventDefault()}),e.preventDefault()}),u.on("mousedown",function(e){var i=e.clientY-I(this).offset().top+K.scrollTop(),o=e.clientX-I(this).offset().left+K.scrollLeft(),o=((i=i<0?0:i)>this.offsetHeight&&(i=this.offsetHeight),(o=(o=o<0?0:o)>this.offsetWidth?this.offsetWidth:o)/260*100),i=100-i/180*100;b(p,v=o,g=i,h),layui.stope(e),e.preventDefault(),n&&t.trigger("mousedown",e)}),f.on("mousedown",function(e,i){var t=this.offsetLeft,n=(e.clientX===undefined?i:e).clientX;C&&layui.stope(e),y(function(e){var i=t+(e.clientX-n),o=d[0].offsetWidth,o=(o<(i=i<0?0:i)&&(i=o),Math.round(i/280*100)/100);b(p,v,g,h=o),e.preventDefault()}),e.preventDefault()}),d.on("mousedown",function(e){var i=e.clientX-I(this).offset().left,i=((i=i<0?0:i)>this.offsetWidth&&(i=this.offsetWidth),Math.round(i/280*100)/100);b(p,v,g,h=i),e.preventDefault(),n&&f.trigger("mousedown",e)}),e.each(function(){I(this).on("click",function(){I(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e=this.style.backgroundColor,i=k(R(e)),o=e.slice(e.lastIndexOf(",")+1,e.length-1);p=i.h,v=i.s,g=i.b,3===(e.match(/[0-9]{1,3}/g)||[]).length&&(o=1),h=o,b(i.h,i.s,i.b,o)})}),P.touchEventsSupported()&&layui.each([{elem:a,eventType:"mousedown"},{elem:d,eventType:"mousedown"},{elem:u,eventType:"mousedown"}],function(e,t){P.touchSwipe(t.elem,{onTouchStart:function(){C=n=!1},onTouchMove:function(e){var i,o;e=e,i=t.eventType,e=e.touches[0],(o=document.createEvent("MouseEvent")).initMouseEvent(i,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(o)},onTouchEnd:function(){i.remove(),C=n=!0}})})},t.prototype.select=function(e,i,o,t){this.config;var n=_({h:e,s:100,b:100}),e=(_({h:e,s:i,b:o}),e/360*180),o=180-o/100*180,i=i/100*260,r=this.elemPicker.find("."+S.PICKER_BASIS)[0];this.elemPicker.find("."+S.PICKER_SIDE_SLIDER).css("top",e),r.style.background="#"+n,this.elemPicker.find("."+S.PICKER_BASIS_CUR).css({top:o/r.offsetHeight*100+"%",left:i/r.offsetWidth*100+"%"})},t.prototype.pickerEvents=function(){var c=this,s=c.config,a=c.elemColorBox.find("."+S.PICKER_TRIG_SPAN),u=c.elemPicker.find("."+S.PICKER_INPUT+" input"),o={clear:function(e){a[0].style.background="",c.elemColorBox.find("."+S.PICKER_TRIG_I).removeClass(S.ICON_PICKER_DOWN).addClass(S.ICON_PICKER_CLOSE),c.color="",s.done&&s.done(""),c.removePicker()},confirm:function(e,i){var o,t,n,r,l=I.trim(u.val());-1>16,g:(65280&n)>>8,b:255&n},t=k(r),a[0].style.background=o="#"+_(t),c.elemColorBox.find("."+S.PICKER_TRIG_I).removeClass(S.ICON_PICKER_CLOSE).addClass(S.ICON_PICKER_DOWN)),"change"===i?(c.select(t.h,t.s,t.b,i),s.change&&s.change(o)):(c.color=l,s.done&&s.done(l),c.removePicker())}};c.elemPicker.on("click","*[colorpicker-events]",function(){var e=I(this),i=e.attr("colorpicker-events");o[i]&&o[i].call(this,e)}),u.on("keyup",function(e){var i=I(this);o.confirm.call(this,i,13===e.keyCode?null:"change")})},t.prototype.events=function(){var e=this,i=e.config;e.elemColorBox.on("click",function(){i.elem.data(S.PICKER_OPENED)?e.removePicker():(e.renderPicker(),e.val(),e.side())})},t.prototype.onClickOutside=function(){var t=this,n=t.config,e=(t.stopClickOutsideEvent(),P.onClickOutside(t.elemPicker[0],function(e){var i,o=t.elemColorBox.find("."+S.PICKER_TRIG_SPAN);t.color?(i=k(R(t.color)),t.select(i.h,i.s,i.b)):t.elemColorBox.find("."+S.PICKER_TRIG_I).removeClass(S.ICON_PICKER_DOWN).addClass(S.ICON_PICKER_CLOSE),o[0].style.background=t.color||"","function"==typeof n.cancel&&n.cancel(t.color),t.removePicker()},{ignore:[n.elem[0]],event:i,capture:!1}));t.stopClickOutsideEvent=function(){e(),t.stopClickOutsideEvent=I.noop}},t.prototype.autoUpdatePosition=function(){var e=this,i=(e.config,"resize.lay_colorpicker_resize"),o=(e.stopResizeEvent(),function(){e.position()});K.on(i,o),e.stopResizeEvent=function(){K.off(i,o),e.stopResizeEvent=I.noop}},e(S.MOD_NAME,o)});layui.define("component",function(e){"use strict";var d=layui.$,s="element",t=layui.component({name:"tab",config:{elem:".layui-tab"},CONST:{ELEM:"layui-tab",HEADER:"layui-tab-title",CLOSE:"layui-tab-close",MORE:"layui-tab-more",BAR:"layui-tab-bar"},render:function(){var e=this.config;o.tabAuto(null,e.elem)}}),u=t.CONST,a=d(window),i=d(document),o={tabClick:function(e){var t=(e=e||{}).options||{},a=e.liElem||d(this),i=t.headerElem?a.parent():a.parents(".layui-tab").eq(0),t=t.bodyElem?d(t.bodyElem):i.children(".layui-tab-content").children(".layui-tab-item"),l=a.find("a"),l="javascript:;"!==l.attr("href")&&"_blank"===l.attr("target"),n="string"==typeof a.attr("lay-unselect"),r=i.attr("lay-filter"),c=a.attr("lay-id"),o="index"in e?e.index:a.parent().children("li").index(a);if(!e.force){var e=a.siblings("."+u.CLASS_THIS);if(!1===layui.event.call(this,s,"tabBeforeChange("+r+")",{elem:i,from:{index:a.parent().children("li").index(e),id:e.attr("lay-id")},to:{index:o,id:c}}))return}l||n||(a.addClass(u.CLASS_THIS).siblings().removeClass(u.CLASS_THIS),(c?e=(e=t.filter('[lay-id="'+c+'"]')).length?e:t.eq(o):t.eq(o)).addClass(u.CLASS_SHOW).siblings().removeClass(u.CLASS_SHOW)),layui.event.call(this,s,"tab("+r+")",{elem:i,index:o,id:c})},tabDelete:function(e){var t=(e=e||{}).liElem||d(this).parent(),a=t.parent().children("li").index(t),i=t.closest(".layui-tab"),l=i.children(".layui-tab-content").children(".layui-tab-item"),n=i.attr("lay-filter"),r=t.attr("lay-id");if(!e.force&&!1===layui.event.call(t[0],s,"tabBeforeDelete("+n+")",{elem:i,index:a,id:r}))return;t.hasClass(u.CLASS_THIS)&&(t.next()[0]&&t.next().is("li")?o.tabClick.call(t.next()[0],{index:a+1}):t.prev()[0]&&t.prev().is("li")&&o.tabClick.call(t.prev()[0],null,a-1)),t.remove(),(r?e=(e=l.filter('[lay-id="'+r+'"]')).length?e:l.eq(a):l.eq(a)).remove(),setTimeout(function(){o.tabAuto(null,i)},50),layui.event.call(this,s,"tabDelete("+n+")",{elem:i,index:a,id:r})},tabAuto:function(l,e){(e||d(".layui-tab")).each(function(){var e=d(this),a=e.children("."+u.HEADER),t='lay-stope="tabmore"',t=d(''),i=e.attr("lay-allowclose");i&&"false"!==i&&a.find("li").each(function(){var e,t=d(this);t.find("."+u.CLOSE)[0]||"false"===t.attr("lay-allowclose")||((e=d('')).on("click",function(e){o.tabDelete.call(this,{e:e})}),t.append(e))}),"string"!=typeof e.attr("lay-unauto")&&(a.prop("scrollWidth")>a.outerWidth()+1||a.find("li").length&&a.height()>(i=a.find("li").eq(0).height())+i/2?("change"===l&&a.data("LAY_TAB_CHANGE")&&a.addClass(u.MORE),a.find("."+u.BAR)[0]||(a.append(t),e.attr("overflow",""),t.on("click",function(e){var t=a.hasClass(u.MORE);a[t?"removeClass":"addClass"](u.MORE)}))):(a.find("."+u.BAR).remove(),e.removeAttr("overflow")))})},hideTabMore:function(e){var t=d("."+u.HEADER);!0!==e&&"tabmore"===d(e.target).attr("lay-stope")||(t.removeClass(u.MORE),t.find("."+u.BAR).attr("title",""))}};d.extend(t,{tabAdd:function(e,t){var a,i=d(".layui-tab[lay-filter="+e+"]"),l=i.children("."+u.HEADER),n=l.children("."+u.BAR),r=i.children(".layui-tab-content"),c=""+(t.title||"unnaming")+"";return n[0]?n.before(c):l.append(c),r.append('
        "+(t.content||"")+"
        "),t.change&&this.tabChange(e,t.id),l.data("LAY_TAB_CHANGE",t.change),o.tabAuto(t.change?"change":null,i),this},tabDelete:function(e,t,a){e=d(".layui-tab[lay-filter="+e+"]").children("."+u.HEADER).find('>li[lay-id="'+t+'"]');return o.tabDelete.call(e[0],{liElem:e,force:a}),this},tabChange:function(e,t,a){e=d(".layui-tab[lay-filter="+e+"]").children("."+u.HEADER).find('>li[lay-id="'+t+'"]');return o.tabClick.call(e[0],{liElem:e,force:a}),this},tab:function(a){a=a||{},i.on("click",a.headerElem,function(e){var t=d(a.headerElem).index(d(this));o.tabClick.call(this,{index:t,options:a})})}}),i.on("click","."+u.HEADER+" li",o.tabClick),a.on("resize.lay_tab_auto_resize",o.tabAuto),e(u.MOD_NAME,t)});layui.define("component",function(i){"use strict";var _=layui.$,f=layui.device(),a=layui.component({name:"nav",config:{elem:".layui-nav"},CONST:{NAV_ELEM:".layui-nav",NAV_ITEM:"layui-nav-item",NAV_BAR:"layui-nav-bar",NAV_TREE:"layui-nav-tree",NAV_CHILD:"layui-nav-child",NAV_CHILD_C:"layui-nav-child-c",NAV_MORE:"layui-nav-more",NAV_DOWN:"layui-icon-down",NAV_ANIM:"layui-anim layui-anim-upbit"},render:function(){var i=this.config,l={},o={},c={};i.elem.each(function(i){var a=_(this),s=_(''),e=a.find("."+r.NAV_ITEM),t=a.find("."+r.NAV_BAR);t[0]&&t.remove(),a.append(s),(a.hasClass(r.NAV_TREE)?e.find("dd,>."+r.NAV_TITLE):e).off("mouseenter.lay_nav").on("mouseenter.lay_nav",function(){!function(i,a,s){var e,t=_(this),n=t.find("."+r.NAV_CHILD);a.hasClass(r.NAV_TREE)?n[0]||(e=t.children(".layui-nav-title"),i.css({top:t.offset().top-a.offset().top+a.scrollTop(),height:(e[0]?e:t).outerHeight(),opacity:1})):(n.addClass(r.NAV_ANIM),n.hasClass(r.NAV_CHILD_C)&&n.css({left:-(n.outerWidth()-t.width())/2}),n[0]?i.css({left:i.position().left+i.width()/2,width:0,opacity:0}):i.css({left:t.position().left+parseFloat(t.css("marginLeft")),top:t.position().top+t.height()-i.height()}),l[s]=setTimeout(function(){i.css({width:n[0]?0:t.width(),opacity:n[0]?0:1})},f.ie&&f.ie<10?0:200),clearTimeout(c[s]),"block"===n.css("display")&&clearTimeout(o[s]),o[s]=setTimeout(function(){n.addClass(r.CLASS_SHOW),t.find("."+r.NAV_MORE).addClass(r.NAV_MORE+"d")},300))}.call(this,s,a,i)}).off("mouseleave.lay_nav").on("mouseleave.lay_nav",function(){a.hasClass(r.NAV_TREE)?s.css({height:0,opacity:0}):(clearTimeout(o[i]),o[i]=setTimeout(function(){a.find("."+r.NAV_CHILD).removeClass(r.CLASS_SHOW),a.find("."+r.NAV_MORE).removeClass(r.NAV_MORE+"d")},300))}),a.off("mouseleave.lay_nav").on("mouseleave.lay_nav",function(){clearTimeout(l[i]),c[i]=setTimeout(function(){a.hasClass(r.NAV_TREE)||s.css({width:0,left:s.position().left+s.width()/2,opacity:0})},200)}),e.find("a").each(function(){var i=_(this),a="click.lay_nav_click";i.siblings("."+r.NAV_CHILD)[0]&&!i.children("."+r.NAV_MORE)[0]&&i.append(''),i.off(a,n.clickThis).on(a,n.clickThis)})})}}),n={clickThis:function(){var i=_(this),a=i.closest(r.NAV_ELEM),s=a.attr("lay-filter"),e=i.parent(),t=i.siblings("."+r.NAV_CHILD),n="string"==typeof e.attr("lay-unselect");if("javascript:;"!==i.attr("href")&&"_blank"===i.attr("target")||n||t[0]||(a.find("."+r.CLASS_THIS).removeClass(r.CLASS_THIS),e.addClass(r.CLASS_THIS)),a.hasClass(r.NAV_TREE)){var n=r.NAV_ITEM+"ed",l=!e.hasClass(n),o=function(){_(this).css({display:""}),a.children("."+r.NAV_BAR).css({opacity:0})};if(t.is(":animated"))return;t.removeClass(r.NAV_ANIM),t[0]&&(l?(t.slideDown(200,o),e.addClass(n)):(e.removeClass(n),t.show().slideUp(200,o)),"string"!=typeof a.attr("lay-accordion")&&"all"!==a.attr("lay-shrink")||((l=e.siblings("."+n)).removeClass(n),l.children("."+r.NAV_CHILD).show().stop().slideUp(200,o)))}layui.event.call(this,"element","nav("+s+")",i)}},r=a.CONST;i(r.MOD_NAME,a)});layui.define("component",function(n){"use strict";var t=layui.$,i=layui.component({name:"breadcrumb",config:{elem:".layui-breadcrumb"},render:function(){this.config.elem.each(function(){var n=t(this),i="lay-separator",e=n.attr(i)||"/",a=n.find("a");a.next("span["+i+"]")[0]||(a.each(function(n){n!==a.length-1&&t(this).after(""+e+"")}),n.css("visibility","visible"))})}});n(i.CONST.MOD_NAME,i)});layui.define("component",function(t){"use strict";var r=layui.$,e=layui.component({name:"progress",config:{elem:".layui-progress"},CONST:{ELEM:"layui-progress"},render:function(){this.config.elem.each(function(){var t=r(this),e=t.find(".layui-progress-bar"),n=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(n)?100*new Function("return "+n)()+"%":n}),t.attr("lay-showpercent")&&setTimeout(function(){e.html(''+n+"")},350)})}}),i=e.CONST;r.extend(e,{setValue:function(t,e){var n="layui-progress",t=r("."+n+"[lay-filter="+t+"]").find("."+n+"-bar"),n=t.find("."+n+"-text");return t.css("width",function(){return/^.+\/.+$/.test(e)?100*new Function("return "+e)()+"%":e}).attr("lay-percent",e),n.text(e),this}}),t(i.MOD_NAME,e)});layui.define("component",function(l){"use strict";var t=layui.$,i=layui.component({name:"collapse",config:{elem:".layui-collapse"},render:function(){this.config.elem.each(function(){t(this).find(".layui-colla-item").each(function(){var l=t(this),i=l.find(".layui-colla-title"),a=l.find(".layui-colla-content"),e="none"===a.css("display"),s="click.lay_collapse_click";i.find(".layui-colla-icon").remove(),i.append(''),l[e?"removeClass":"addClass"](u.CLASS_SHOW),a.hasClass(u.CLASS_SHOW)&&a.removeClass(u.CLASS_SHOW),i.off(s,n.titleClick).on(s,n.titleClick)})})}}),n={titleClick:function(){var l=t(this),i=l.closest(".layui-collapse"),a=i.attr("lay-filter"),e=".layui-colla-content",s=l.parent(".layui-colla-item"),n=l.siblings(e),c="none"===n.css("display"),i="string"==typeof i.attr("lay-accordion"),o=function(){t(this).css("display","")};n.is(":animated")||(c?(n.slideDown(200,o),s.addClass(u.CLASS_SHOW)):(s.removeClass(u.CLASS_SHOW),n.show().slideUp(200,o)),i&&((i=s.siblings("."+u.CLASS_SHOW)).removeClass(u.CLASS_SHOW),i.children(e).show().slideUp(200,o)),layui.event.call(this,"element","collapse("+a+")",{title:l,content:n,show:c}))}},u=i.CONST;l(u.MOD_NAME,i)});layui.define(["component","tab","nav","breadcrumb","progress","collapse"],function(e){"use strict";var n=layui.$,a=layui.tab,r=layui.progress,t=layui.component({name:"element",CONST:{MOD_NAME:"element"}}),l=t.CONST;n.extend(t,{render:function(e,a){var r="string"==typeof a&&a?'[lay-filter="'+a+'"]':"",t={tab:".layui-tab"+r,nav:".layui-nav"+r,breadcrumb:".layui-breadcrumb"+r,progress:".layui-progress"+r,collapse:".layui-collapse"+r};if(!e||t[e])return e&&"object"==typeof a&&a instanceof n?layui[e].render({elem:a}):t[e]?layui[e].render({elem:t[e]}):layui.each(t,function(e){layui[e].render({elem:t[e]})})},tabAdd:a.tabAdd,tabDelete:a.tabDelete,tabChange:a.tabChange,tab:a.tab,progress:r.setValue}),t.init=t.render,n(function(){t.render()}),e(l.MOD_NAME,t)});layui.define(["lay","i18n","layer"],function(e){"use strict";var F=layui.$,a=layui.lay,i=layui.layer,R=layui.device(),T=layui.i18n,t="upload",f="layui_"+t+"_index",w={config:{},index:layui[t]?layui[t].index+1e4:0,set:function(e){var i=this;return i.config=F.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,t,e,i)}},o=function(){var i=this,e=i.config.id;return{upload:function(e){i.upload.call(i,e)},reload:function(e){i.reload.call(i,e)},config:(o.that[e]=i).config}},l="layui-upload-file",r="layui-upload-form",L="layui-upload-iframe",E="layui-upload-choose",O="UPLOADING",D=function(e){var i=this;i.index=++w.index,i.config=F.extend({},i.config,w.config,e),i.render()};D.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",force:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1,text:{"cross-domain":"Cross-domain requests are not supported","data-format-error":"Please return JSON data format","check-error":"",error:"","limit-number":null,"limit-size":null}},D.prototype.reload=function(e){var i=this;i.config=F.extend({},i.config,e),i.render(!0)},D.prototype.render=function(e){var i=this,t=i.config,n=F(t.elem);return 1"].join("")),n=i.elem.next();(n.hasClass(l)||n.hasClass(r))&&n.remove(),R.ie&&R.ie<10&&i.elem.wrap('
        '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(t),R.ie&&R.ie<10&&e.initIE()},D.prototype.initIE=function(){var t,e=this.config,i=F(''),n=F(['
        ',"
        "].join(""));F("#"+L)[0]||F("body").append(i),e.elem.next().hasClass(r)||(this.elemFile.wrap(n),e.elem.next("."+r).append((t=[],layui.each(e.data,function(e,i){i="function"==typeof i?i():i,t.push('')}),t.join(""))))},D.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},D.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},D.prototype.preview=function(n){window.FileReader&&layui.each(this.chooseFiles,function(e,i){var t=new FileReader;t.readAsDataURL(i),t.onload=function(){n&&n(e,i,this.result)}})},D.prototype.upload=function(e,i){var t,n,a,o,l,u=this,s=u.config,f=s.text||{},r=u.elemFile[0],c=function(){return e||u.files||u.chooseFiles||r.files},d=function(){var a=0,o=0,l=c(),r=function(){s.multiple&&a+o===u.fileLength&&"function"==typeof s.allDone&&s.allDone({total:u.fileLength,successful:a,failed:o})},t=function(t){var n=new FormData,i=function(e){t.unified?layui.each(l,function(e,i){delete i[O]}):delete e[O]};if(layui.each(s.data,function(e,i){i="function"==typeof i?t.unified?i():i(t.index,t.file):i,n.append(e,i)}),t.unified)layui.each(l,function(e,i){i[O]||(i[O]=!0,n.append(s.field,i))});else{if(t.file[O])return;n.append(s.field,t.file),t.file[O]=!0}var e={url:s.url,type:"post",data:n,dataType:s.dataType||"json",contentType:!1,processData:!1,headers:s.headers||{},success:function(e){s.unified?a+=u.fileLength:a++,m(t.index,e),r(t.index),i(t.file)},error:function(e){s.unified?o+=u.fileLength:o++,u.msg(f.error||["Upload failed, please try again.","status: "+(e.status||"")+" - "+(e.statusText||"error")].join("
        ")),g(t.index,e.responseText,e),r(t.index),i(t.file)}};"function"==typeof s.progress&&(e.xhr=function(){var e=F.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){var i;e.lengthComputable&&(i=Math.floor(e.loaded/e.total*100),s.progress(i,(s.item||s.elem)[0],e,t.index))}),e}),F.ajax(e)};s.unified?t({unified:!0,index:0}):layui.each(l,function(e,i){t({index:e,file:i})})},p=function(){var n=F("#"+L);u.elemFile.parent().submit(),clearInterval(D.timer),D.timer=setInterval(function(){var e,i=n.contents().find("body");try{e=i.text()}catch(t){u.msg(f["cross-domain"]),clearInterval(D.timer),g()}e&&(clearInterval(D.timer),i.html(""),m(0,e))},30)},h=function(e){if("json"===s.force&&"object"!=typeof e)try{return{status:"CONVERTED",data:JSON.parse(e)}}catch(i){return u.msg(f["data-format-error"]),{status:"FORMAT_ERROR",data:{}}}return{status:"DO_NOTHING",data:{}}},m=function(e,i){u.elemFile.next("."+E).remove(),r.value="";var t=h(i);switch(t.status){case"CONVERTED":i=t.data;break;case"FORMAT_ERROR":return}"function"==typeof s.done&&s.done(i,e||0,function(e){u.upload(e)})},g=function(e,i,t){s.auto&&(r.value="");var n=h(i);switch(n.status){case"CONVERTED":i=n.data;break;case"FORMAT_ERROR":return}"function"==typeof s.error&&s.error(e||0,function(e){u.upload(e)},i,t)},v=s.exts,y=(n=[],layui.each(e||u.chooseFiles,function(e,i){n.push(i.name)}),n),x={preview:function(e){u.preview(e)},upload:function(e,i){var t={};t[e]=i,u.upload(t)},pushFile:function(){return u.files=u.files||{},layui.each(u.chooseFiles,function(e,i){u.files[e]=i}),u.files},resetFile:function(e,i,t){i=new File([i],t);u.files=u.files||{},u.files[e]=i},getChooseFiles:function(){return u.chooseFiles}},b={file:T.$t("upload.fileType.file"),images:T.$t("upload.fileType.image"),video:T.$t("upload.fileType.video"),audio:T.$t("upload.fileType.audio")}[s.accept]||T.$t("upload.fileType.file"),y=0===y.length?r.value.match(/[^\/\\]+\..+/g)||[]:y;if(0!==y.length){switch(s.accept){case"file":layui.each(y,function(e,i){if(v&&!RegExp(".\\.("+v+")$","i").test(escape(i)))return t=!0});break;case"video":layui.each(y,function(e,i){if(!RegExp(".\\.("+(v||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(i)))return t=!0});break;case"audio":layui.each(y,function(e,i){if(!RegExp(".\\.("+(v||"mp3|wav|mid")+")$","i").test(escape(i)))return t=!0});break;default:layui.each(y,function(e,i){if(!RegExp(".\\.("+(v||"jpg|png|gif|bmp|jpeg|svg|webp")+")$","i").test(escape(i)))return t=!0})}if(t)return u.msg(f["check-error"]||T.$t("upload.validateMessages.fileExtensionError",{fileType:b})),r.value="";if("choose"!==i&&!s.auto||(s.choose&&s.choose(x),"choose"!==i)){if(u.fileLength=(a=0,b=c(),layui.each(b,function(){a++}),a),s.number&&u.fileLength>s.number)return u.msg("function"==typeof f["limit-number"]?f["limit-number"](s,u.fileLength):T.$t("upload.validateMessages.filesOverLengthLimit",{length:s.number})+"
        "+T.$t("upload.validateMessages.currentFilesLength",{length:u.fileLength}));if(01024*s.size&&(i=1<=(i=s.size/1024)?i.toFixed(2)+"MB":s.size+"KB",r.value="",o=i)}),o)return u.msg("function"==typeof f["limit-size"]?f["limit-size"](s,o):T.$t("upload.validateMessages.fileOverSizeLimit",{size:o}));l=function(){if(R.ie)return(9'+e+"")},r=function(t){var n=!0;return layui.each(a.files,function(e,i){if(!(n=!(i.name===t.name)))return!0}),n},u=function(e){var t=function(e){e.ext=e.name.substr(e.name.lastIndexOf(".")+1).toLowerCase(),e.sizes=w.util.parseSize(e.size)};return e instanceof FileList?layui.each(e,function(e,i){t(i)}):t(e),e},s=function(e){var t;return(e=e||[]).length?a.files?(t=[],layui.each(e,function(e,i){r(i)&&t.push(u(i))}),t):u(e):[]};n.elem.off("upload.start").on("upload.start",function(){var e=F(this);a.config.item=e,a.elemFile[0].click()}),R.ie&&R.ie<10||n.elem.off("upload.over").on("upload.over",function(){F(this).attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){F(this).removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(e,i){var t=F(this),i=s(i.originalEvent.dataTransfer.files);t.removeAttr("lay-over"),o(i),n.auto?a.upload():l(i)}),a.elemFile.on("change",function(){var e=s(this.files);0!==e.length&&(o(e),n.auto?a.upload():l(e))}),n.bindAction.off("upload.action").on("upload.action",function(){a.upload()}),n.elem.data(f)||(n.elem.on("click",function(){a.isFile()||F(this).trigger("upload.start")}),n.drag&&n.elem.on("dragover",function(e){e.preventDefault(),F(this).trigger("upload.over")}).on("dragleave",function(e){F(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),F(this).trigger("upload.drop",e)}),n.bindAction.on("click",function(){F(this).trigger("upload.action")}),n.elem.data(f,n.id))},w.util={parseSize:function(e,i){var t,n;return i=i||2,null!=e&&e?(t="string"==typeof e?parseFloat(e):e,n=Math.floor(Math.log(t)/Math.log(1024)),(e=(e=t/Math.pow(1024,n))%1==0?e:parseFloat(e.toFixed(i)))+["Bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"][n]):"0"},promiseLikeResolve:function(e){var i=F.Deferred();return e&&"function"==typeof e.then?e.then(i.resolve,i.reject):i.resolve(e),i.promise()}},o.that={},o.getThis=function(e){var i=o.that[e];return i||hint.error(e?t+" instance with ID '"+e+"' not found":"ID argument required"),i},w.render=function(e){e=new D(e);return o.call(e)},e(t,w)});layui.define(["lay","i18n","layer","util"],function(e){"use strict";var _=layui.$,h=layui.layer,p=layui.util,O=layui.lay,l=layui.hint(),$=(layui.device(),layui.i18n),T="form",f=".layui-form",M="layui-this",E="layui-hide",A="layui-disabled",y="layui-input-number-invalid",I=O.createSharedResizeObserver(T),v=O.ie&&8===parseFloat(O.ie)||void 0===Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"checked"),t=function(){this.config={verify:{required:function(e){if(!/[\S]+/.test(e)||e===undefined||null===e)return $.$t("form.validateMessages.required")},phone:function(e){if(e&&!/^1\d{10}$/.test(e))return $.$t("form.validateMessages.phone")},email:function(e){if(e&&!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e))return $.$t("form.validateMessages.email")},url:function(e){if(e&&!/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/.test(e))return $.$t("form.validateMessages.url")},number:function(e){if(e&&isNaN(e))return $.$t("form.validateMessages.number")},date:function(e){if(e&&!/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(e))return $.$t("form.validateMessages.date")},identity:function(e){if(e&&!/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(e))return $.$t("form.validateMessages.identity")}},autocomplete:null}},i=(t.prototype.set=function(e){return _.extend(!0,this.config,e),this},t.prototype.verify=function(e){return _.extend(!0,this.config.verify,e),this},t.prototype.getFormElem=function(e){return _(f+(e?'[lay-filter="'+e+'"]':""))},t.prototype.on=function(e,t){return layui.onevent.call(this,T,e,t)},t.prototype.val=function(e,o){return this.getFormElem(e).each(function(e,t){var i,a,n,l,r=_(this);for(i in o)O.hasOwn(o,i)&&(n=o[i],(l=r.find('[name="'+i+'"]'))[0])&&("checkbox"===(a=l[0].type)?l[0].checked=n:"radio"===a?l.each(function(){this.checked=this.value==n+""}):l.val(n))}),r.render(null,e),this.getValue(e)},t.prototype.getValue=function(e,t){t=t||this.getFormElem(e);var n={},l={},e=t.find("input,select,textarea");return layui.each(e,function(e,t){var i,a=_(this);t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name&&(/^.*\[\]$/.test(t.name)&&(i=t.name.match(/^(.*)\[\]$/g)[0],n[i]=0|n[i],i=t.name.replace(/^(.*)\[\]$/,"$1["+n[i]+++"]")),/^(checkbox|radio)$/.test(t.type)&&!t.checked||(l[i||t.name]="SELECT"===this.tagName&&"string"==typeof this.getAttribute("multiple")?a.val()||[]:this.value))}),l},t.prototype.render=function(e,t){var d=this,i=d.config,a=_(f+(t?'[lay-filter="'+t+'"]':"")),n={input:function(e){var e=e||a.find("input,textarea"),h=(i.autocomplete&&e.attr("autocomplete",i.autocomplete),function(e,t){var i=e.val(),a=Number(i),n=Number(e.attr("step"))||1,l=Number(e.attr("min")),r=Number(e.attr("max")),o=Number(e.attr("lay-precision")),s="click"!==t&&""===i,c="init"===t,u=isNaN(a),d="string"==typeof e.attr("lay-step-strictly");if(e.toggleClass(y,u),!u){if("click"===t){if("text"===e[0].type&&"string"==typeof e.attr("readonly"))return;a=!!_(this).index()?a-n:a+n}u=function(e){return((e.toString().match(/\.(\d+$)/)||[])[1]||"").length},o=0<=o?o:Math.max(u(n),u(i));s||(c||r<=(a=(a=d?Math.round(a/n)*n:a)<=l?l:a)&&(a=r),0===o?a=parseInt(a):0'),e=layui.isArray(i.value)?i.value:[i.value],e=_((a=[],layui.each(e,function(e,t){a.push('')}),a.join(""))),n=(t.append(e),i.split&&t.addClass("layui-input-split"),i.className&&t.addClass(i.className),r.next("."+u)),l=(n[0]&&n.remove(),r.parent().hasClass(s)||r.wrap('
        '),r.next("."+c));l[0]?((n=l.find("."+u))[0]&&n.remove(),l.prepend(t),r.css("padding-right",function(){return(r.closest(".layui-input-group")[0]?0:l.outerWidth())+t.outerWidth()})):(t.addClass(c),r.after(t)),"auto"===i.show&&d(t,r.val()),"function"==typeof i.init&&i.init.call(this,r,i),r.on("input propertychange",function(){var e=this.value;"auto"===i.show&&d(t,e)}),r.on("blur",function(){"function"==typeof i.blur&&i.blur.call(this,r,i)}),e.on("click",function(){var e=r.attr("lay-filter");_(this).hasClass(A)||("function"==typeof i.click&&i.click.call(this,r,i),layui.event.call(this,T,"input-affix("+e+")",{elem:r[0],affix:o,options:i}))})},p={eye:{value:"eye-invisible",click:function(e,t){var i="LAY_FORM_INPUT_AFFIX_SHOW",a=e.data(i);e.attr("type",a?"password":"text").data(i,!a),n({value:a?"eye-invisible":"eye"})}},clear:{value:"clear",click:function(e){e.val("").focus(),d(_(this).parent(),null)},show:"auto",disabled:e},number:{value:["up","down"],split:!0,className:"layui-input-number",disabled:r.is("[disabled]"),init:function(a){var e,n,l,t,i,r;"text"!==a.attr("type")&&"text"!==a[0].type||(l=n=!(e=".lay_input_number"),t="string"==typeof a.attr("readonly"),i="string"==typeof a.attr("lay-wheel"),r=a.next(".layui-input-number").children("i"),a.attr("lay-input-mirror",a.val()),a.off(e),a.on("keydown"+e,function(e){n=!1,8!==e.keyCode&&46!==e.keyCode||(n=!0),t||2!==r.length||38!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),r.eq(38===e.keyCode?0:1).click())}),a.on("input"+e+" propertychange"+e,function(e){var t,i;l||"propertychange"===e.type&&"value"!==e.originalEvent.propertyName||(n||""===(e=this.value)||"00"!==e.slice(0,2)&&!e.match(/\s/g)&&!((t=e.match(/\./g))&&1=Math.abs(e.deltaY)?e.deltaX:e.deltaY):"mousewheel"===e.type?t=-e.originalEvent.wheelDelta:"DOMMouseScroll"===e.type&&(t=e.originalEvent.detail),r.eq(0S.height()&&t<=e&&l.addClass(x+"up"),h(),s&&g.off("mousedown.lay_select_ieph").on("mousedown.lay_select_ieph",function(){m[0].__ieph=!0,setTimeout(function(){m[0].__ieph=!1},60)}),n=O.onClickOutside((a?l:g)[0],function(){p(),k&&m.val(k)},{ignore:v,detectIframe:!0,capture:!1})},p=function(e){v.parent().removeClass(x+"ed "+x+"up"),m.blur(),u&&g.children("."+N).remove(),"function"==typeof n&&(n(),n=null),a&&(l.detach(),_(window).off("resize.lay_select_resize"),I)&&I.unobserve(l[0]),e||f(m.val(),function(e){var t=y[0].selectedIndex;e&&(k=_(y[0].options[t]).prop("text"),0===t&&k===m.attr("placeholder")&&(k=""),m.val(k||""))})},h=function(){var e,t,i=g.children("dd."+M);i[0]&&(e=i.position().top,t=g.height(),i=i.height(),t").addClass(N).attr("lay-value",n).text(n),a=(i=g.children().eq(0)).hasClass("layui-select-tips"),i[a?"after":"before"](t)):e?g.find("."+w)[0]||g.append('

        '+$.$t("form.select.noMatch")+"

        "):g.find("."+w).remove()},"keyup"),""===n&&(y.val(""),g.find("."+M).removeClass(M),(y[0].options[0]||{}).value||g.children("dd:eq(0)").addClass(M),g.find("."+w).remove(),u)&&g.children("."+N).remove(),void h()))},50)).on("blur",function(e){var t=y[0].selectedIndex;k=_(y[0].options[t]).prop("text"),0===t&&k===m.attr("placeholder")&&(k=""),setTimeout(function(){f(m.val(),function(e){k||m.val("")},"blur")},200)}),g.on("click","dd",function(){var e,t,i=_(this),a=i.attr("lay-value"),n=y.attr("lay-filter");return i.hasClass(A)||(u&&i.hasClass(N)&&(t=(e=_("
        "].join(""));i.after(l),function(i,a){var n=_(this),e=n.attr("lay-skin")||"primary",t="switch"===e,e="primary"===e;n.off(u).on(u,function(e){var t=n.attr("lay-filter");n[0].disabled||(n[0].indeterminate=n[0].indeterminate,n[0].checked=n[0].checked,layui.event.call(n[0],T,a[2]+"("+t+")",{elem:n[0],value:n[0].value,othis:i}))}),i.on("click",function(){n.closest("label").length||n.trigger("click")}),d.syncAppearanceOnPropChanged(this,"checked",function(){var e;t&&(e=(i.next("*[lay-checkbox]")[0]?i.next().html():n.attr("title")||"").split("|"),i.children("div").html(!this.checked&&e[1]||e[0])),i.toggleClass(a[1],this.checked)}),e&&d.syncAppearanceOnPropChanged(this,"indeterminate",function(){this.indeterminate?i.children("."+c.ICON).removeClass(c.ICON_OK).addClass(c.SUBTRA):i.children("."+c.ICON).removeClass(c.SUBTRA).addClass(c.ICON_OK)})}.call(this,l,r)})},radio:function(e){var s="layui-form-radio",c=["layui-icon-radio","layui-icon-circle"],e=e||a.find("input[type=radio]"),u="click.lay_radio_click";e.each(function(e,t){var i=_(this),a=i.next("."+s),n=this.disabled,l=i.attr("lay-skin");if(i.closest("[lay-ignore]").length)return i.show();v&&m.call(t,"lay-form-sync-checked",t.checked),a[0]&&a.remove();var a=p.escape(t.title||""),r=[],o=(i.next("[lay-radio]")[0]&&(a=(o=i.next()).html()||"",1",'',"
        "+a+"
        ","
        "].join("")));i.after(o),function(i){var a=_(this),n="layui-anim-scaleSpring";a.off(u).on(u,function(){var e=a.attr("lay-filter");a[0].disabled||(a[0].checked=!0,layui.event.call(a[0],T,"radio("+e+")",{elem:a[0],value:a[0].value,othis:i}))}),i.on("click",function(){a.closest("label").length||a.trigger("click")}),d.syncAppearanceOnPropChanged(this,"checked",function(){var e,t=this;t.checked?(i.addClass(s+"ed"),i.children(".layui-icon").addClass(n+" "+c[0]),e=a.parents(f).find("input[name="+t.name.replace(/(\.|#|\[|\])/g,"\\$1")+"]"),layui.each(e,function(){t!==this&&(this.checked=!1)})):(i.removeClass(s+"ed"),i.children(".layui-icon").removeClass(n+" "+c[0]).addClass(c[1]))})}.call(this,o)})}},t=function(){layui.each(n,function(e,t){t()})};return"object"===layui.type(e)?_(e).is(f)?(a=_(e),t()):e.each(function(e,t){var i=_(t);i.closest(f).length&&("SELECT"===t.tagName?n.select(i):"INPUT"===t.tagName&&("checkbox"===(t=t.type)||"radio"===t?n[t](i):n.input(i)))}):e?n[e]?n[e]():l.error('[form] "'+e+'" is an unsupported form element type'):t(),d},t.prototype.syncAppearanceOnPropChanged=v?function(e,t,i){var a=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,t);Object.defineProperty(e,t,O.extend({},a,{get:function(){return"string"==typeof this.getAttribute("lay-form-sync-"+t)},set:function(e){m.call(this,"lay-form-sync-"+t,e),i.call(this)}}))}:function(e,t,i){var a=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,t);Object.defineProperty(e,t,O.extend({},a,{get:function(){return a.get.call(this)},set:function(e){a.set.call(this,e),i.call(this)}}))},t.prototype.validate=function(e){var u,d=this.config.verify,p="layui-form-danger";return!(e=_(e))[0]||(e.attr("lay-verify")!==undefined||!1!==this.validate(e.find("*[lay-verify]")))&&(layui.each(e,function(e,r){var o=_(this),t=(o.attr("lay-verify")||"").split("|"),s=o.attr("lay-vertype"),c="string"==typeof(c=o.val())?_.trim(c):c;if(o.removeClass(p),layui.each(t,function(e,t){var i="",a=d[t];if(a){var n="function"==typeof a?i=a(c,r):!a[0].test(c),l="select"===r.tagName.toLowerCase()||/^(checkbox|radio)$/.test(r.type),i=i||a[1];if("required"===t&&(i=o.attr("lay-reqtext")||i),n)return"tips"===s?h.tips(i,!o.closest("[lay-ignore]").length&&l?o.next():o,{tips:1}):"alert"===s?h.alert(i,{title:$.$t("form.verifyErrorPromptTitle"),shadeClose:!0}):/\b(string|number)\b/.test(typeof i)&&h.msg(i,{icon:5,shift:6}),setTimeout(function(){(l?o.next().find("input"):r).focus()},7),o.addClass(p),u=!0}}),u)return u}),!u)},t.prototype.submit=function(e,t){var i={},a=_(this),e="string"==typeof e?e:a.attr("lay-filter"),n=this.getFormElem?this.getFormElem(e):a.parents(f).eq(0),l=n.find("*[lay-verify]");return!!r.validate(l)&&(i=r.getValue(null,n),l={elem:this.getFormElem?window.event&&window.event.target:this,form:(this.getFormElem?n:a.parents("form"))[0],field:i},"function"==typeof t&&t(l),layui.event.call(this,T,"submit("+e+")",l))});function m(e,t){var i=!!t,t=2===arguments.length&&!t;return null!==this.getAttribute(e)?i||(this.removeAttribute(e),!1):!t&&(this.setAttribute(e,""),!0)}var g=["-",".","e","E","+"];var r=new t,t=_(document),S=_(window);_(function(){r.render()}),t.on("reset",f,function(){var e=_(this).attr("lay-filter");setTimeout(function(){r.render(null,e)},50)}),t.on("submit",f,i).on("click","*[lay-submit]",i),e(T,r)});layui.define(["lay","i18n","laytpl","laypage","form","util"],function(c){"use strict";var f=layui.$,d=layui.lay,m=layui.laytpl,p=layui.laypage,g=layui.layer,i=layui.form,v=layui.util,b=layui.hint(),x=layui.device(),s=layui.i18n,w={config:{checkName:"LAY_CHECKED",indexName:"LAY_INDEX",initIndexName:"LAY_INDEX_INIT",numbersName:"LAY_NUM",disabledName:"LAY_DISABLED"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){return this.config=f.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,R,e,t)}},k=function(){var a=this,e=a.config,i=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){w.reloadData(i,e,t)},setColsWidth:function(){a.setColsWidth.call(a)},resize:function(){a.resize.call(a)}}},C=function(e){var t=k.that[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},l=function(e){var t=k.config[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},T=function(e){var t=this.config||{},a=(e=e||{}).item3,i=e.content;"numbers"===a.type&&(i=e.tplData[w.config.numbersName]);("escape"in a?a:t).escape&&(i=v.escape(i));t=e.text&&a.exportTemplet||a.templet||a.toolbar;return t&&(i="function"==typeof t?t.call(a,e.tplData,e.obj):m(function(e){try{return d(e).html()}catch(t){return e}}(t)||String(i)).render(f.extend({LAY_COL:a},e.tplData))),e.text?f("
        "+i+"
        ").text():i},R="table",N="lay-"+R+"-id",u=".layui-table",_="layui-hide",h="layui-hide-v",y="layui-none",F="layui-table-view",P=".layui-table-header",W=".layui-table-body",I=".layui-table-fixed",O=".layui-table-fixed-r",B=".layui-table-pageview",D=".layui-table-sort",H="layui-table-checked",E="layui-table-edit",L="layui-table-hover",K="laytable-cell-group",S="layui-table-col-special",M="layui-table-tool-panel",A="layui-table-expanded",G="layui-table-disabled-transition",r="layui-table-fixed-height-patch",j="LAY_TABLE_MOVE_DICT",n=d.createSharedResizeObserver(R),e=function(e){return['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',(e=e||{}).fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
        ','
        ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{-item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
        ","
        "].join("")},t=['',"","
        "].join(""),Y=[,"{{# if(d.data.toolbar){ }}",'
        ','
        ','
        ',"
        ","{{# } }}",'
        ',"{{# if(d.data.loading){ }}",'
        ','
        ','{{# if(typeof d.data.loading === "string"){ }}',"{{- d.data.loading}}","{{# } else{ }}",'',"{{# } }}","
        ","
        ","{{# } }}","{{# var left, right; }}",'
        ',e(),"
        ",'
        ',t,"
        ","{{# if(left){ }}",'
        ','
        ',e({fixed:!0}),"
        ",'
        ',t,"
        ","
        ","{{# }; }}","{{# if(right){ }}",'
        ','
        ',e({fixed:"right"}),'
        ',"
        ",'
        ',t,"
        ","
        ","{{# }; }}","
        ","{{# if(d.data.totalRow){ }}",'
        ','','',"
        ","
        ","{{# } }}",'
        ','
        ',"
        "].join(""),o=f(window),z=f(document),a=function(e){var t=this;t.index=++w.index,t.config=f.extend({},t.config,w.config,e),t.unobserveResize=f.noop,t.render()},$=(a.prototype.config={limit:10,loading:!0,escape:!0,cellMinWidth:60,cellMaxWidth:Number.MAX_VALUE,editTrigger:"click",defaultToolbar:["filter","exports","print"],defaultContextmenu:!0,autoSort:!0,cols:[]},a.prototype.render=function(e){var t=this,a=t.config,i=(a.elem=f(a.elem),a.where=a.where||{},a.id="id"in a?a.id:a.elem.attr("id")||t.index);if(k.that[i]&&k.that[i]!==t&&k.that[i].dispose(),k.that[i]=t,(k.config[i]=a).request=f.extend({pageName:"page",limitName:"limit"},a.request),a.response=f.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},a.response),null!==a.page&&"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,t.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),a.text=f.extend(!0,{none:s.$t("table.noData")},a.text),!a.elem[0])return t;if(a.elem.attr("lay-filter")||a.elem.attr("lay-filter",a.id),"reloadData"===e)return t.pullData(t.page,{type:"reloadData"});a.index=t.index,t.key=a.id||a.index,t.setInit(),a.height&&/^full-.+$/.test(a.height)?(t.fullHeightGap=a.height.split("-")[1],a.height=o.height()-(parseFloat(t.fullHeightGap)||0)):a.height&&/^#\w+\S*-.+$/.test(a.height)?(i=a.height.split("-"),t.parentHeightGap=i.pop(),t.parentDiv=i.join("-"),a.height=f(t.parentDiv).height()-(parseFloat(t.parentHeightGap)||0)):"function"==typeof a.height&&(t.customHeightFunc=a.height,a.height=t.customHeightFunc());var l,e=a.elem,i=e.next("."+F),n=t.elem=f("
        ");n.addClass((l=[F,F+"-"+t.index,"layui-form","layui-border-box"],a.className&&l.push(a.className),l.join(" "))).attr(((l={"lay-filter":"LAY-TABLE-FORM-DF-"+t.index,style:(l=[],a.width&&l.push("width:"+a.width+"px;"),l.join(""))})[N]=a.id,l)).html(m(Y,{open:"{{",close:"}}",tagStyle:"legacy"}).render({data:a,index:t.index,i18nMessages:{table_sort_asc:s.$t("table.sort.asc"),table_sort_desc:s.$t("table.sort.desc")}})),t.renderStyle(),i[0]&&i.remove(),e.after(n),t.layTool=n.find(".layui-table-tool"),t.layBox=n.find(".layui-table-box"),t.layHeader=n.find(P),t.layMain=n.find(".layui-table-main"),t.layBody=n.find(W),t.layFixed=n.find(I),t.layFixLeft=n.find(".layui-table-fixed-l"),t.layFixRight=n.find(O),t.layTotal=n.find(".layui-table-total"),t.layPage=n.find(".layui-table-page"),t.renderToolbar(),t.renderPagebar(),t.fullSize(),t.setColsWidth({isInit:!0}),t.pullData(t.page),t.events(),t.observeResize()},a.prototype.initOpts=function(e){this.config;e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||{checkbox:50,radio:50,space:30,numbers:60}[e.type])},a.prototype.setInit=function(e){var n,a,r=this,d=r.config;if(d.clientWidth=d.width||(n=function(e){var t,a;e=e||d.elem.parent(),t=r.getContentWidth(e);try{a="none"===e.css("display")}catch(l){}var i=e.parent();return e[0]&&i&&i[0]&&(!t||a)?n(i):t})(),"width"===e)return d.clientWidth;d.height=d.maxHeight||d.height,d.css&&-1===d.css.indexOf(F)&&(a=d.css.split("}"),layui.each(a,function(e,t){t&&(a[e]="."+F+"-"+r.index+" "+t)}),d.css=a.join("}"));var c=function(a,e,i,l){var n,o;l?(l.key=[d.index,a,i].join("-"),l.colspan=l.colspan||0,l.rowspan=l.rowspan||0,r.initOpts(l),(n=a+(parseInt(l.rowspan)||1)) td:hover > .layui-table-cell{overflow: auto;}"].concat(x.ie?[".layui-table-edit{height: "+i+";}","td[data-edit]:hover:after{height: "+i+";}"]:[]),function(e,t){t&&o.push(a+" "+t)})),l.css&&o.push(l.css),o.push("."+r+"{height:auto;}"),d.style({target:this.elem[0],text:o.join(""),id:"DF-table-"+n})},a.prototype.renderToolbar=function(){var l,o=this,e=o.config,r=e.elem.attr("lay-filter"),t=['
        ','
        ','
        '].join(""),a=o.layTool.find(".layui-table-tool-temp"),n=("default"===e.toolbar?a.html(t):"string"==typeof e.toolbar&&(t=f(e.toolbar).html()||"")&&a.html(m(t).render(e)),{filter:{title:s.$t("table.tools.filter.title"),layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols",onClick:function(e){var a,n=e.config;(0,e.openPanel)({list:(a=[],o.eachCols(function(e,t){t.field&&"normal"==t.type&&a.push('
      • "+(t.fieldTitle||t.title||t.field)+"
      • ").text())+'" lay-filter="LAY_TABLE_TOOL_COLS">')}),a.join("")),done:function(){i.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var e=f(e.elem),t=this.checked,a=e.data("key"),i=o.col(a),l=i.hide,e=e.data("parentkey");i.key&&(i.hide=!t,o.elem.find('*[data-key="'+a+'"]')[t?"removeClass":"addClass"](_),l!=i.hide&&o.setParentCol(!t,e),o.resize(),layui.event.call(this,R,"colToggled("+r+")",{col:i,config:n}))})}})}},exports:{title:s.$t("table.tools.export.title"),layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export",onClick:function(e){var t=e.data,a=e.config,i=e.openPanel,e=e.elem;if(!t.length)return g.tips(s.$t("table.tools.export.noDataPrompt"),e,{tips:3});x.ie?g.tips(s.$t("table.tools.export.compatPrompt"),e,{tips:3}):i({list:['
      • '+s.$t("table.tools.export.csvText")+"
      • "].join(""),done:function(e,t){t.on("click",function(){var e=f(this).data("type");w.exportFile.call(o,a.id,null,e)})}})}},print:{title:s.$t("table.tools.print.title"),layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print",onClick:function(e){var t=e.data,e=e.elem;if(!t.length)return g.tips(s.$t("table.tools.print.noDataPrompt"),e,{tips:3});var t=window.open("about:blank","_blank"),e=[""].join(""),a=f(o.layHeader.html());a.append(o.layMain.find("table").html()),a.append(o.layTotal.find("table").html()),a.find("th.layui-table-patch").remove(),a.find("thead>tr>th."+S).filter(function(e,t){return!f(t).children("."+K).length}).remove(),a.find("tbody>tr>td."+S).remove(),t.document.write(e+a.prop("outerHTML")),t.document.close(),layui.device("edg").edg?(t.onafterprint=t.close,t.print()):(t.print(),t.close())}}});"object"==typeof e.defaultToolbar&&(l=[],e.defaultToolbar=f.map(e.defaultToolbar,function(e,t){var a="string"==typeof e,i=a?n[e]:e;return i&&(!(i=i.name&&n[i.name]?f.extend({},n[i.name],i):i).name&&a&&(i.name=e),l.push('
        ')),i}),o.layTool.find(".layui-table-tool-self").html(l.join("")))},a.prototype.renderPagebar=function(){var e,t=this.config,a=this.layPagebar=f('
        ');t.pagebar&&((e=f(t.pagebar).html()||"")&&a.append(m(e).render(t)),this.layPage.append(a))},a.prototype.setParentCol=function(e,t){var a=this.config,i=this.layHeader.find('th[data-key="'+t+'"]'),l=parseInt(i.attr("colspan"))||0;i[0]&&(t=t.split("-"),t=a.cols[t[1]][t[2]],e?l--:l++,i.attr("colspan",l),i[l?"removeClass":"addClass"](_),t.colspan2=l,t.hide=l<1,a=i.data("parentkey"))&&this.setParentCol(e,a)},a.prototype.setColsPatch=function(){var a=this,e=a.config;layui.each(e.cols,function(e,t){layui.each(t,function(e,t){t.hide&&a.setParentCol(t.hide,t.parentKey)})})},a.prototype.setGroupWidth=function(i){var e,l=this;l.config.cols.length<=1||((e=l.layHeader.find((i?"th[data-key="+i.data("parentkey")+"]>":"")+"."+K)).css("width",0),layui.each(e.get().reverse(),function(){var e=f(this),t=e.parent().data("key"),a=0;l.layHeader.eq(0).find("th[data-parentkey="+t+"]").width(function(e,t){f(this).hasClass(_)||0o.layMain.prop("clientHeight")&&(e.style.width=parseFloat(e.style.width)-i+"px")}),!p&&y?h.width(o.getContentWidth(l)):h.width("auto"),o.setGroupWidth()},a.prototype.resize=function(){var e=this;e.layMain&&("isConnected"in e.layMain[0]?e.layMain[0].isConnected:f.contains(document.body,e.layMain[0]))&&(e.fullSize(),e.setColsWidth(),e.scrollPatch())},a.prototype.reload=function(e,t,a){var i=this;e=e||{},delete i.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete i.config[e]}),i.config=f.extend(t,{},i.config,e),"reloadData"!==a&&(layui.each(i.config.cols,function(e,t){layui.each(t,function(e,t){delete t.colspan2})}),delete i.config.HAS_SET_COLS_PATCH),i.render(a)},a.prototype.errorView=function(e){var t=this,a=t.layMain.find("."+y),e=f('
        '+(e||"Error")+"
        ");a[0]&&(t.layNone.remove(),a.remove()),t.layFixed.addClass(_),t.layMain.find("tbody").html(""),t.layMain.append(t.layNone=e),t.layTotal.addClass(h),t.layPage.find(B).addClass(h),w.cache[t.key]=[],t.syncCheckAll(),t.renderForm(),t.setColsWidth(),t.loading(!1)},a.prototype.page=1,a.prototype.pullData=function(i,l){var e,t,n=this,o=n.config,a=(o.HAS_SET_COLS_PATCH||n.setColsPatch(),o.HAS_SET_COLS_PATCH=!0,o.request),r=o.response,d=function(){"object"==typeof o.initSort&&n.sort({field:o.initSort.field,type:o.initSort.type,reloadType:l.type})},c=function(e,t){n.setColsWidth(),n.loading(!1),"function"==typeof o.done&&o.done(e,i,e[r.countName],t)};l=l||{},"function"==typeof o.before&&o.before(o),n.startTime=(new Date).getTime(),l.renderData?((e={})[r.dataName]=w.cache[n.key],e[r.countName]=o.url?"object"===layui.type(o.page)?o.page.count:e[r.dataName].length:o.data.length,"object"==typeof o.totalRow&&(e[r.totalRowName]=f.extend({},n.totalRow)),n.renderData({res:e,curr:i,count:e[r.countName],type:l.type,sort:!0}),c(e,"renderData")):o.url?(t={},o.page&&(t[a.pageName]=i,t[a.limitName]=o.limit),a=f.extend(t,o.where),o.contentType&&0==o.contentType.indexOf("application/json")&&(a=JSON.stringify(a)),n.loading(!0),t={type:o.method||"get",url:o.url,contentType:o.contentType,data:a,dataType:o.dataType||"json",jsonpCallback:o.jsonpCallback,headers:o.headers||{},complete:"function"==typeof o.complete?o.complete:undefined,success:function(e){var t,a;(e="function"==typeof o.parseData?o.parseData(e)||e:e)[r.statusName]!=r.statusCode?n.errorView(e[r.msgName]||s.$t("table.dataFormatError",{statusName:r.statusName,statusCode:r.statusCode})):(t=e[r.countName],(a=Math.ceil(t/o.limit)||1)','
        "+function(){var e,t=f.extend(!0,{LAY_COL:l},o),a=w.config.checkName,i=w.config.disabledName;switch(l.type){case"checkbox":return'';case"radio":return'';case"numbers":return c}return l.toolbar?m(f(l.toolbar).html()||"").render(t):T.call(s,{item3:l,content:n,tplData:t})}(),"
        "].join(""),i.push(e),l.fixed&&"right"!==l.fixed&&r.push(e),"right"===l.fixed&&d.push(e))}),e=['data-index="'+e+'"'],o[w.config.checkName]&&e.push('class="'+H+'"'),e=e.join(" "),h.push(""+i.join("")+""),y.push(""+r.join("")+""),p.push(""+d.join("")+""))}),{trs:h,trs_fixed:y,trs_fixed_r:p}},w.getTrHtml=function(e,t){e=C(e);return e.getTrHtml(t,null,e.page)},a.prototype.renderData=function(e){var a=this,i=a.config,t=e.res,l=e.curr,n=a.count=e.count,o=e.sort,r=t[i.response.dataName]||[],t=t[i.response.totalRowName],d=[],c=[],s=[],u=function(){if(!o&&a.sortKey)return a.sort({field:a.sortKey.field,type:a.sortKey.sort,pull:!0,reloadType:e.type});a.getTrHtml(r,o,l,{trs:d,trs_fixed:c,trs_fixed_r:s}),"fixed"===i.scrollPos&&"reloadData"===e.type||a.layBody.scrollTop(0),"reset"===i.scrollPos&&a.layBody.scrollLeft(0),a.layMain.find("."+y).remove(),a.layMain.find("tbody").html(d.join("")),a.layFixLeft.find("tbody").html(c.join("")),a.layFixRight.find("tbody").html(s.join("")),a.syncCheckAll(),a.renderForm(),a.fullSize(),a.haveInit?a.scrollPatch():setTimeout(function(){a.scrollPatch()},50),a.haveInit=!0,a.needSyncFixedRowHeight&&a.calcFixedRowHeight(),g.close(a.tipsIndex)};return w.cache[a.key]=r,a.layTotal[0==r.length?"addClass":"removeClass"](h),a.layPage[i.page||i.pagebar?"removeClass":"addClass"](_),a.layPage.find(B)[!i.page||0==n||0===r.length&&1==l?"addClass":"removeClass"](h),0===r.length?a.errorView(i.text.none):(a.layFixLeft.removeClass(_),o?u():(u(),a.renderTotal(r,t),a.layTotal&&a.layTotal.removeClass(_),void(i.page&&(i.page=f.extend({elem:"layui-table-page"+i.index,count:n,limit:i.limit,limits:i.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(a.page=e.curr,i.limit=e.limit,a.pullData(e.curr))}},i.page),i.page.count=n,p.render(i.page)))))},w.renderData=function(e){e=C(e);e&&e.pullData(e.page,{renderData:!0,type:"reloadData"})},a.prototype.renderTotal=function(e,o){var r,d=this,c=d.config,s={};c.totalRow&&(layui.each(e,function(e,i){"array"===layui.type(i)&&0===i.length||d.eachCols(function(e,t){var e=t.field||e,a=i[e];t.totalRow&&(s[e]=(s[e]||0)+(parseFloat(a)||0))})}),d.dataTotal=[],r=[],d.eachCols(function(e,t){var e=t.field||e,a=o&&o[t.field],i="totalRowDecimals"in t?t.totalRowDecimals:2,i=s[e]?parseFloat(s[e]||0).toFixed(i):"",i=(n=t.totalRowText||"",(l={LAY_COL:t})[e]=i,l=t.totalRow&&T.call(d,{item3:t,content:i,tplData:l})||n,a||l),l="string"==typeof(n=t.totalRow||c.totalRow)?m(n).render(f.extend({TOTAL_NUMS:a||s[e],TOTAL_ROW:o||{},LAY_COL:t},t)):i,n=(t.field&&d.dataTotal.push({field:t.field,total:f("
        "+l+"
        ").text()}),['','
        "+l,"
        "].join(""));r.push(n)}),e=d.layTotal.find(".layui-table-patch"),d.layTotal.find("tbody").html(""+r.join("")+(e.length?e.get(0).outerHTML:"")+""))},a.prototype.getColElem=function(e,t){return e.eq(0).find(".laytable-cell-"+t+":eq(0)")},a.prototype.renderForm=function(e){this.config;var t=this.elem.attr("lay-filter");i.render(e,t)},a.prototype.renderFormByElem=function(a){layui.each(["input","select"],function(e,t){i.render(a.find(t))})},a.prototype.syncCheckAll=function(){var a,e=this,i=e.config,t=e.layHeader.find('input[name="layTableCheckbox"]'),l=w.checkStatus(e.key);t[0]&&(a=l.isAll,e.eachCols(function(e,t){"checkbox"===t.type&&(t[i.checkName]=a)}),t.prop({checked:l.isAll,indeterminate:!l.isAll&&l.data.length}))},a.prototype.setRowActive=function(e,t,a){this.config;e=this.layBody.find('tr[data-index="'+e+'"]');if(t=t||"layui-table-click",a)return e.removeClass(t);e.addClass(t),e.siblings("tr").removeClass(t)},a.prototype.setRowChecked=function(i){var a,e,l,t,n,o,r,d=this,c=d.config,s="all"===i.index,u="array"===layui.type(i.index),h=s||u;c.tree&&c.tree.view||h&&(d.layBox.addClass(G),"radio"===i.type)||(u&&(a={},layui.each(i.index,function(e,t){a[t]=!0}),i.index=a),e=d.layBody.children(".layui-table").children("tbody"),r=h?"tr":'tr[data-index="'+i.index+'"]',r=e.children(r),e=s?r:r.filter(u?function(){var e=f(this).data("index");return i.index[e]}:'[data-index="'+i.index+'"]'),i=f.extend({type:"checkbox"},i),l=w.cache[d.key],t="checked"in i,n=function(e){return"radio"===i.type||(t?i.checked:!e)},e.each(function(){var e=f(this),t=e.attr("data-index"),a=l[t];t&&"array"!==layui.type(a)&&!a[c.disabledName]&&(a=a[c.checkName]=n(e.hasClass(H)),e.toggleClass(H,!!a),"radio"===i.type)&&(o=t,e.siblings().removeClass(H))}),o&&layui.each(l,function(e,t){Number(o)!==Number(e)&&delete t[c.checkName]}),r=(u=(s=e.children("td").children(".layui-table-cell").children('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[i.type]||"checkbox")+'"]:not(:disabled)')).last()).closest(O),("radio"===i.type&&r.hasClass(_)?s.first():s).prop("checked",n(u.prop("checked"))),d.syncCheckAll(),h&&setTimeout(function(){d.layBox.removeClass(G)},100))},a.prototype.sort=function(l){var e,t=this,a={},i=t.config,n=i.elem.attr("lay-filter"),o=w.cache[t.key];"string"==typeof(l=l||{}).field&&(r=l.field,t.layHeader.find("th").each(function(e,t){var a=f(this),i=a.data("field");if(i===l.field)return l.field=a,r=i,!1}));try{var r=r||l.field.data("field"),d=l.field.data("key");if(t.sortKey&&!l.pull&&r===t.sortKey.field&&l.type===t.sortKey.sort)return;var c=t.layHeader.find("th .laytable-cell-"+d).find(D);t.layHeader.find("th").find(D).removeAttr("lay-sort"),c.attr("lay-sort",l.type||null),t.layFixed.find("th")}catch(s){b.error("Table modules: sort field '"+r+"' not matched")}t.sortKey={field:r,sort:l.type},i.autoSort&&("asc"===l.type?e=layui.sort(o,r,null,!0):"desc"===l.type?e=layui.sort(o,r,!0,!0):(e=layui.sort(o,w.config.initIndexName,null,!0),delete t.sortKey,delete i.initSort)),a[i.response.dataName]=e||o,t.renderData({res:a,curr:t.page,count:t.count,sort:!0,type:l.reloadType}),l.fromEvent&&(i.initSort={field:r,type:l.type},layui.event.call(l.field,R,"sort("+n+")",f.extend({config:i},i.initSort)))},a.prototype.loading=function(e){this.config.loading&&this.layBox.find(".layui-table-init").toggleClass(_,!e)},a.prototype.cssRules=function(t,a){var e=this.elem.children("style")[0];d.getStyleRules(e,function(e){if(e.selectorText===".laytable-cell-"+t)return a(e),!0})},a.prototype.fullSize=function(){var e,a,i=this,t=i.config,l=t.height;i.fullHeightGap?(l=o.height()-i.fullHeightGap)<135&&(l=135):i.parentDiv&&i.parentHeightGap?(l=f(i.parentDiv).height()-i.parentHeightGap)<135&&(l=135):i.customHeightFunc&&(l=i.customHeightFunc())<135&&(l=135),1
        ')).find("div").css({width:a}),e.find("tr").append(t)):e.find(".layui-table-patch").remove()};n(e.layHeader),n(e.layTotal);n=e.layMain.height()-i;e.layFixed.find(W).css("height",t.height()>=n?n:"auto").scrollTop(e.layMain.scrollTop()),e.layFixRight[w.cache[e.key]&&w.cache[e.key].length&&0');a.html(t),s.height&&a.css("max-height",s.height-(c.layTool.outerHeight()||50)),i.find("."+M)[0]||i.append(a),c.renderForm(),a.on("click",function(e){layui.stope(e)}),e.done&&e.done(a,t)};layui.stope(e),z.trigger("table.tool.panel.remove"),g.close(c.tipsIndex),layui.each(s.defaultToolbar,function(e,t){if(t.layEvent===a)return"function"==typeof t.onClick&&t.onClick({data:l,config:s,openPanel:n,elem:i}),!0}),layui.event.call(this,R,"toolbar("+o+")",f.extend({event:a,config:s},{}))}),c.layHeader.on("click","*[lay-event]",function(e){var t=f(this),a=t.attr("lay-event"),t=t.closest("th").data("key"),t=c.col(t);layui.event.call(this,R,"colTool("+o+")",f.extend({event:a,config:s,col:t},{}))}),c.layPagebar.on("click","*[lay-event]",function(e){var t=f(this).attr("lay-event");layui.event.call(this,R,"pagebar("+o+")",f.extend({event:t,config:s},{}))}),e.on("mousemove",function(e){var t=f(this),a=t.offset().left,e=e.clientX-a;t.data("unresize")||k.eventMoveElem||(d.allowResize=t.width()-e<=10,r.css("cursor",d.allowResize?"col-resize":""))}).on("mouseleave",function(){f(this);k.eventMoveElem||(d.allowResize=!1,r.css("cursor",""))}).on("mousedown",function(e){var t,a=f(this);d.allowResize&&(t=a.data("key"),e.preventDefault(),d.offset=[e.clientX,e.clientY],c.cssRules(t,function(e){var t=e.style.width||a.outerWidth();d.rule=e,d.ruleWidth=parseFloat(t),d.minWidth=a.data("minwidth")||s.cellMinWidth,d.maxWidth=a.data("maxwidth")||s.cellMaxWidth}),a.data(j,d),k.eventMoveElem=a)}),k.docEvent||z.on("mousemove",function(e){var t,a;k.eventMoveElem&&(t=k.eventMoveElem.data(j)||{},k.eventMoveElem.data("resizing",1),e.preventDefault(),t.rule)&&(e=t.ruleWidth+e.clientX-t.offset[0],a=k.eventMoveElem.closest("."+F).attr(N),a=C(a))&&((e=et.maxWidth&&(e=t.maxWidth),t.rule.style.width=e+"px",a.setGroupWidth(k.eventMoveElem),g.close(c.tipsIndex))}).on("mouseup",function(e){var t,a,i,l,n;k.eventMoveElem&&(i=(t=k.eventMoveElem).closest("."+F).attr(N),a=C(i))&&(i=t.data("key"),l=a.col(i),n=a.config.elem.attr("lay-filter"),d={},r.css("cursor",""),a.scrollPatch(),t.removeData(j),delete k.eventMoveElem,a.cssRules(i,function(e){l.width=parseFloat(e.style.width),layui.event.call(t[0],R,"colResized("+n+")",{col:l,config:a.config})}))}),k.docEvent=!0,e.on("click",function(e){var t=f(this),a=t.find(D),i=a.attr("lay-sort");if(!a[0]||1===t.data("resizing"))return t.removeData("resizing");c.sort({field:t,type:"asc"===i?"desc":"desc"===i?null:"asc",fromEvent:!0})}).find(D+" .layui-edge ").on("click",function(e){var t=f(this),a=t.index(),t=t.parents("th").eq(0).data("field");layui.stope(e),0===a?c.sort({field:t,type:"asc",fromEvent:!0}):c.sort({field:t,type:"desc",fromEvent:!0})}),c.commonMember=function(e){var a=f(this).parents("tr").eq(0).data("index"),t=c.layBody.find('tr[data-index="'+a+'"]'),i=(w.cache[c.key]||[])[a]||{},l={tr:t,config:s,data:w.clearCacheKey(i),dataCache:i,index:a,del:function(){w.cache[c.key][a]=[],t.remove(),c.scrollPatch()},update:function(e,t){c.updateRow({index:a,data:e=e||{},related:t},function(e,t){l.data[e]=t})},setRowChecked:function(e){c.setRowChecked(f.extend({index:a},e))}};return f.extend(l,e)}),t=(c.elem.on("click",'input[name="layTableCheckbox"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=(c.layBody.find('input[name="layTableCheckbox"]'),t.parents("tr").eq(0).data("index")),l=t[0].checked,n="layTableAllChoose"===t.attr("lay-filter");t[0].disabled||(n?c.setRowChecked({index:"all",checked:l}):c.setRowChecked({index:i,checked:l}),layui.stope(e),layui.event.call(t[0],R,"checkbox("+o+")",h.call(t[0],{checked:l,type:n?"all":"one",getCol:function(){return c.col(a.data("key"))}})))}),c.elem.on("click",'input[lay-type="layTableRadio"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=t[0].checked,l=t.parents("tr").eq(0).data("index");if(layui.stope(e),t[0].disabled)return!1;c.setRowChecked({type:"radio",index:l}),layui.event.call(t[0],R,"radio("+o+")",h.call(t[0],{checked:i,getCol:function(){return c.col(a.data("key"))}}))}),c.layBody.on("mouseenter","tr",function(){var e=f(this),t=e.index();e.data("off")||((e=c.layBody.find("tr:eq("+t+")")).addClass(L),c.needSyncFixedRowHeight&&c.fixedRowHeightPatchOnHover(this,e,!0))}).on("mouseleave","tr",function(){var e=f(this),t=e.index();e.data("off")||((e=c.layBody.find("tr:eq("+t+")")).removeClass(L),c.needSyncFixedRowHeight&&c.fixedRowHeightPatchOnHover(this,e,!1))}).on("click","tr",function(e){t.call(this,"row",e)}).on("dblclick","tr",function(e){t.call(this,"rowDouble",e)}).on("contextmenu","tr",function(e){s.defaultContextmenu||e.preventDefault(),t.call(this,"rowContextmenu",e)}),function(e,t){var a=f(this);if(!a.data("off")){if("rowContextmenu"!==e){var i=[".layui-form-checkbox",".layui-form-switch",".layui-form-radio","[lay-unrow]",'[lay-type="layTableCheckbox"]','[lay-type="layTableRadio"]'].join(",");if(f(t.target).is(i)||f(t.target).closest(i)[0])return}layui.event.call(this,R,e+"("+o+")",h.call(a.children("td")[0],{e:t}))}}),n=function(e,t){var a,i,l;(e=f(e)).data("off")||(l=e.data("field"),i=e.data("key"),i=c.col(i),a=e.closest("tr").data("index"),a=w.cache[c.key][a],e.children(u),(i="function"==typeof i.edit?i.edit(a):i.edit)&&((i=f("textarea"===i?'':''))[0].value=(l=e.data("content")||a[l])===undefined||null===l?"":l,e.find("."+E)[0]||e.append(i),i.focus(),t)&&layui.stope(t))},i=(c.layBody.on("change","."+E,function(){var e=f(this),t=e.parent(),a=this.value,i=e.parent().data("field"),e=e.closest("tr").data("index"),e=w.cache[c.key][e],l=h.call(t[0],{value:a,field:i,oldValue:e[i],td:t,reedit:function(){setTimeout(function(){n(l.td);var e={};e[i]=l.oldValue,l.update(e)})},getCol:function(){return c.col(t.data("key"))}}),e={};e[i]=a,l.update(e),layui.event.call(t[0],R,"edit("+o+")",l)}).on("blur","."+E,function(){f(this).remove()}),c.layBody.on(s.editTrigger,"td",function(e){n(this,e)}).on("mouseenter","td",function(){a.call(this)}).on("mouseleave","td",function(){a.call(this,"hide")}),c.layTotal.on("mouseenter","td",function(){a.call(this)}).on("mouseleave","td",function(){a.call(this,"hide")}),"layui-table-grid-down"),a=function(e){var t=f(this),a=t.children(u);t.data("off")||t.parent().hasClass(A)||(e?t.find(".layui-table-grid-down").remove():!(a.prop("scrollWidth")>a.prop("clientWidth")||0'))},l=function(e,t){var a=f(this),i=a.parent(),l=i.data("key"),n=c.col(l),o=i.parent().data("index"),r=i.children(u),i="layui-table-cell-c",d=f('');"tips"===(t=t||n.expandedMode||s.cellExpandedMode)?c.tipsIndex=g.tips(['
        ',r.html(),"
        ",''].join(""),r[0],{tips:[3,""],time:-1,anim:-1,maxWidth:x.ios||x.android?300:c.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){g.close(t)})}}):(c.elem.find("."+i).trigger("click"),c.cssRules(l,function(e){var t=e.style.width,a=n.expandedWidth||s.cellExpandedWidth;a.layui-table-body>table>tbody>tr"),i=e.layFixRight.find(">.layui-table-body>table>tbody>tr"),t=t.find(">tbody>tr"),l=[];t.each(function(){l.push(e.getElementSize(this).height)}),a.length&&a.each(function(e){l[e]&&(this.style.height=l[e]+"px")}),i.length&&i.each(function(e){l[e]&&(this.style.height=l[e]+"px")})},a.prototype.fixedRowHeightPatchOnHover=function(t,e,a){var i,l=this,n=l.elem.children("style")[0],o="."+r;e.toggleClass(r,a),a?d.getStyleRules(n,function(e){e.selectorText===o&&e.style.setProperty("height",l.getElementSize(t).height+"px","important")}):(d.getStyleRules(n,function(e){e.selectorText===o&&e.style.setProperty("height","auto")}),(e=e.filter(function(){var e=f(this),t=0tr").each(function(i){n.cols[i]=[],f(this).children().each(function(e){var t=f(this),a=t.attr("lay-data"),a=d.options(this,{attr:a?"lay-data":null,errorText:r+(a||t.attr("lay-options"))}),t=f.extend({title:t.text(),colspan:parseInt(t.attr("colspan"))||1,rowspan:parseInt(t.attr("rowspan"))||1},a);n.cols[i].push(t)})}),e.find("tbody>tr")),t=w.render(n);!a.length||o.data||t.config.url||(l=0,w.eachCols(t.config.id,function(e,i){a.each(function(e){n.data[e]=n.data[e]||{};var t=f(this),a=i.field;n.data[e][a]=t.children("td").eq(l).html()}),l++}),t.reloadData({data:n.data}))}),this},k.that={},k.config={},function(a,i,e,l){var n,o;l.colGroup&&(n=0,a++,l.CHILD_COLS=[],o=e+(parseInt(l.rowspan)||1),layui.each(i[o],function(e,t){t.parentKey?t.parentKey===l.key&&(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),$(a,i,o,t)):t.PARENT_COL_INDEX||1<=n&&n==(l.colspan||1)||(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),n+=parseInt(1td').filter('[data-field="'+e+'"]')}}})).replace(/"/g,'""'),n.push(a='"'+a+'"')):t.field&&"normal"!==t.type&&0==i&&(u[t.field]=!0)}),c.push(n.join(","))}),o&&layui.each(o.dataTotal,function(e,t){u[t.field]||s.push('"'+(t.total||"")+'"')}),d.join(",")+"\r\n"+c.join("\r\n")+"\r\n"+s.join(","))),r.download=(a.title||l.title||"table_"+(l.index||""))+"."+i,document.body.appendChild(r),r.click(),document.body.removeChild(r)},w.getOptions=l,w.hideCol=function(e,l){var n=C(e);n&&("boolean"===layui.type(l)?n.eachCols(function(e,t){var a=t.key,i=n.col(a),t=t.parentKey;i.hide!=l&&(i=i.hide=l,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](_),n.setParentCol(i,t))}):(l=layui.isArray(l)?l:[l],layui.each(l,function(e,l){n.eachCols(function(e,t){var a,i;l.field===t.field&&(a=t.key,i=n.col(a),t=t.parentKey,"hide"in l)&&i.hide!=l.hide&&(i=i.hide=!!l.hide,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](_),n.setParentCol(i,t))})})),f("."+M).remove(),n.resize())},w.reload=function(e,t,a,i){if(l(e))return(e=C(e)).reload(t,a,i),k.call(e)},w.reloadData=function(){var a=f.extend([],arguments),i=(a[3]="reloadData",new RegExp("^("+["elem","id","cols","width","height","maxHeight","toolbar","defaultToolbar","className","css","pagebar"].join("|")+")$"));return layui.each(a[1],function(e,t){i.test(e)&&delete a[1][e]}),w.reload.apply(null,a)},w.render=function(e){e=new a(e);return k.call(e)},w.clearCacheKey=function(e){return delete(e=f.extend({},e))[w.config.checkName],delete e[w.config.indexName],delete e[w.config.initIndexName],delete e[w.config.numbersName],delete e[w.config.disabledName],e},f(function(){w.init()}),c(R,w)});layui.define(["table"],function(e){"use strict";var P=layui.$,h=layui.form,B=layui.table,y=layui.hint(),j={config:{},on:B.on,eachCols:B.eachCols,index:B.index,set:function(e){var t=this;return t.config=P.extend({},t.config,e),t},resize:B.resize,getOptions:B.getOptions,hideCol:B.hideCol,renderData:B.renderData},i=function(){var a=this,e=a.config,n=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){j.reloadData(n,e,t)}}},F=function(e){var t=i.that[e];return t||y.error(e?"The treeTable instance with ID '"+e+"' not found":"ID argument required"),t||null},L="lay-table-id",q="layui-hide",s=".layui-table-body",R=".layui-table-main",Y=".layui-table-fixed-l",z=".layui-table-fixed-r",d="layui-table-checked",m="layui-table-tree",H="LAY_DATA_INDEX",b="LAY_DATA_INDEX_HISTORY",f="LAY_PARENT_INDEX",g="LAY_CHECKBOX_HALF",X="LAY_EXPAND",V="LAY_HAS_EXPANDED",U="LAY_ASYNC_STATUS",n=["all","parent","children","none"],t=/<[^>]+?>/,p=["flexIconClose","flexIconOpen","iconClose","iconOpen","iconLeaf","icon"],a=function(e){var t=this;t.index=++j.index,t.config=P.extend(!0,{},t.config,j.config,e),t.init(),t.render()},x=function(n,i,e){var d=B.cache[n];layui.each(e||d,function(e,t){var a=t[H]||"";-1!==a.indexOf("-")&&(d[a]=t),t[i]&&x(n,i,t[i])})},l=function(l,a,e){var r=F(l),o=("reloadData"!==e&&(r.status={expand:{}}),P.extend(!0,{},r.getOptions(),a)),n=o.tree,c=n.customName.children,i=n.customName.id,d=(delete a.hasNumberCol,delete a.hasChecboxCol,delete a.hasRadioCol,B.eachCols(null,function(e,t){"numbers"===t.type?a.hasNumberCol=!0:"checkbox"===t.type?a.hasChecboxCol=!0:"radio"===t.type&&(a.hasRadioCol=!0)},o.cols),a.parseData),u=a.done;"reloadData"===e&&"fixed"===o.scrollPos&&(r.scrollTopCache=r.config.elem.next().find(s).scrollTop()),o.url?e&&(!d||d.mod)||(a.parseData=function(){var e=this,t=arguments,a=t[0],t=("function"===layui.type(d)&&(a=d.apply(e,t)||t[0]),e.response.dataName);return n.data.isSimpleData&&!n["async"].enable&&(a[t]=r.flatToTree(a[t])),N(a[t],function(e){e[X]=X in e?e[X]:e[i]!==undefined&&r.status.expand[e[i]]},c),e.autoSort&&e.initSort&&e.initSort.type&&layui.sort(a[t],e.initSort.field,"desc"===e.initSort.type,!0),r.initData(a[t]),a},a.parseData.mod=!0):a.data!==undefined&&(a.data=a.data||[],n.data.isSimpleData&&(a.data=r.flatToTree(a.data)),r.initData(a.data)),e&&(!u||u.mod)||(a.done=function(){var e,t=arguments,a=t[3],n="renderData"===a,i=(n||delete r.isExpandAll,this.elem.next()),d=(r.updateStatus(null,{LAY_HAS_EXPANDED:!1}),x(l,c),i.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));if(d.length&&(e=j.checkStatus(l),d.prop({checked:e.isAll&&e.data.length,indeterminate:!e.isAll&&e.data.length})),!n&&o.autoSort&&o.initSort&&o.initSort.type&&j.sort(l),r.renderTreeTable(i),"reloadData"===a&&"fixed"===this.scrollPos&&i.find(s).scrollTop(r.scrollTopCache),"function"===layui.type(u))return u.apply(this,t)},a.done.mod=!0),a&&a.tree&&a.tree.view&&layui.each(p,function(e,t){a.tree.view[t]!==undefined&&(a.tree.view[t]=r.normalizedIcon(a.tree.view[t]))})};a.prototype.init=function(){var e=this.config,t=e.tree.data.cascade,t=(-1===n.indexOf(t)&&(e.tree.data.cascade="all"),B.render(P.extend({},e,{data:[],url:"",done:null}))),a=t.config.id;(i.that[a]=this).tableIns=t,l(a,e)},a.prototype.config={tree:{customName:{children:"children",isParent:"isParent",name:"name",id:"id",pid:"parentId",icon:"icon"},view:{indent:14,flexIconClose:'',flexIconOpen:'',showIcon:!0,icon:"",iconClose:'',iconOpen:'',iconLeaf:'',showFlexIconIfNotParent:!1,dblClickExpand:!0,expandAllDefault:!1},data:{isSimpleData:!1,rootPid:null,cascade:"all"},"async":{enable:!1,url:"",type:null,contentType:null,headers:null,where:null,autoParam:[]},callback:{beforeExpand:null,onExpand:null}}},a.prototype.normalizedIcon=function(e){return e?t.test(e)?e:'':""},a.prototype.getOptions=function(){return this.tableIns?B.getOptions(this.tableIns.config.id):this.config},a.prototype.flatToTree=function(e){var n,i,d,l,r,o,c,u,t=this.getOptions(),a=t.tree,s=a.customName;return e=e||B.cache[t.id],t=e,n=s.id,i=s.pid,d=s.children,l=a.data.rootPid,n=n||"id",i=i||"parentId",d=d||"children",c={},u=[],layui.each(t,function(e,t){r=n+t[n],o=n+t[i],c[r]||(c[r]={},c[r][d]=[]);var a={};a[d]=c[r][d],c[r]=P.extend({},t,a),((l?c[r][i]===l:!c[r][i])?u:(c[o]||(c[o]={},c[o][d]=[]),c[o][d])).push(c[r])}),u},a.prototype.treeToFlat=function(e,n,i){var d=this,l=d.getOptions().tree.customName,r=l.children,o=l.pid,c=[];return layui.each(e,function(e,t){var e=(i?i+"-":"")+e,a=P.extend({},t);a[o]="undefined"!=typeof t[o]?t[o]:n,c.push(a),c=c.concat(d.treeToFlat(t[r],t[l.id],e))}),c},a.prototype.getTreeNode=function(e){var t,a=this;return e?(t=a.getOptions().tree,t.customName,{data:e,dataIndex:e[H],getParentNode:function(){return a.getNodeByIndex(e[f])}}):y.error("Node data not found")},a.prototype.getNodeByIndex=function(t){var a,e,n=this,i=n.getNodeDataByIndex(t);return i?((e=n.getOptions()).tree.customName.parent,a=e.id,(e={data:i,dataIndex:i[H],getParentNode:function(){return n.getNodeByIndex(i[f])},update:function(e){return j.updateNode(a,t,e)},remove:function(){return j.removeNode(a,t)},expand:function(e){return j.expandNode(a,P.extend({},e,{index:t}))},setChecked:function(e){return j.setRowChecked(a,P.extend({},e,{index:t}))}}).dataIndex=t,e):y.error("Node data not found by index: "+t)},a.prototype.getNodeById=function(a){var e=this.getOptions(),n=e.tree.customName.id,i="",e=j.getData(e.id,!0);if(layui.each(e,function(e,t){if(t[n]===a)return i=t[H],!0}),i)return this.getNodeByIndex(i)},a.prototype.getNodeDataByIndex=function(e,t,a){var n=this.getOptions(),i=n.tree,n=B.cache[n.id],d=n[e];if("delete"!==a&&d)return P.extend(d,a),t?P.extend({},d):d;for(var l=n,r=String(e).split("-"),o=0,c=i.customName.children;o
        '),I=function(e){p[U]="success",p[f.children]=e,u.initData(p[f.children],p[H]),K(t,!0,!x&&n,i,d,l)},D=b.format,"function"===layui.type(D)?D(p,c,I):(C=P.extend({},b.where||c.where),D=b.autoParam,layui.each(D,function(e,t){t=t.split("=");C[t[0].trim()]=p[(t[1]||t[0]).trim()]}),(D=b.contentType||c.contentType)&&0==D.indexOf("application/json")&&(C=JSON.stringify(C)),S=b.method||c.method,T=b.dataType||c.dataType,_=b.jsonpCallback||c.jsonpCallback,k=b.headers||c.headers,w=b.parseData||c.parseData,O=b.response||c.response,b={type:S||"get",url:g,contentType:D,data:C,dataType:T||"json",jsonpCallback:_,headers:k||{},success:function(e){(e="function"==typeof w?w.call(c,e)||e:e)[O.statusName]!=O.statusCode?(p[U]="error",p[X]=!1,v.html('')):I(e[O.dataName])},error:function(e,t){p[U]="error",p[X]=!1,"function"==typeof c.error&&c.error(e,t)}},c.ajax?c.ajax(b,"treeNodes"):P.ajax(b)),m;p[V]=!0,N.length&&(!c.initSort||c.url&&!c.autoSort||((S=c.initSort).type?layui.sort(N,S.field,"desc"===S.type,!0):layui.sort(N,B.config.indexName,null,!0)),u.initData(p[f.children],p[H]),g=B.getTrHtml(o,N,null,null,e),E={trs:P(g.trs.join("")),trs_fixed:P(g.trs_fixed.join("")),trs_fixed_r:P(g.trs_fixed_r.join(""))},A=(e.split("-").length-1||0)+1,layui.each(N,function(e,t){E.trs.eq(e).attr({"data-index":t[H],"lay-data-index":t[H],"data-level":A}).data("index",t[H]),E.trs_fixed.eq(e).attr({"data-index":t[H],"lay-data-index":t[H],"data-level":A}).data("index",t[H]),E.trs_fixed_r.eq(e).attr({"data-index":t[H],"lay-data-index":t[H],"data-level":A}).data("index",t[H])}),r.find(R).find('tbody tr[lay-data-index="'+e+'"]').after(E.trs),r.find(Y).find('tbody tr[lay-data-index="'+e+'"]').after(E.trs_fixed),r.find(z).find('tbody tr[lay-data-index="'+e+'"]').after(E.trs_fixed_r),u.renderTreeTable(E.trs,A),n)&&!x&&layui.each(N,function(e,t){K({dataIndex:t[H],trElem:r.find('tr[lay-data-index="'+t[H]+'"]').first(),tableViewElem:r,tableId:o,options:c},a,n,i,d,l)})}else u.isExpandAll=!1,(n&&!x?(layui.each(N,function(e,t){K({dataIndex:t[H],trElem:r.find('tr[lay-data-index="'+t[H]+'"]').first(),tableViewElem:r,tableId:o,options:c},a,n,i,d,l)}),r.find(N.map(function(e,t,a){return'tr[lay-data-index="'+e[H]+'"]'}).join(","))):(D=u.treeToFlat(N,p[f.id],e),r.find(D.map(function(e,t,a){return'tr[lay-data-index="'+e[H]+'"]'}).join(",")))).addClass(q);J("resize-"+o,function(){j.resize(o)},0)(),d&&"loading"!==p[U]&&(T=s.callback.onExpand,"function"===layui.type(T))&&T(o,p,h),"function"===layui.type(l)&&"loading"!==p[U]&&l(o,p,h)}return m},v=(j.expandNode=function(e,t){var a,n,i,d,e=F(e);if(e)return a=(t=t||{}).index,n=t.expandFlag,i=t.inherit,d=t.callbackFlag,e=e.getOptions().elem.next(),K({trElem:e.find('tr[lay-data-index="'+a+'"]').first()},n,i,null,d,t.done)},j.expandAll=function(a,e){if("boolean"!==layui.type(e))return y.error('treeTable.expandAll param "expandFlag" must be a boolean value.');var t=F(a);if(t){t.isExpandAll=e;var n=t.getOptions(),i=n.tree,d=n.elem.next(),l=i.customName.isParent,r=i.customName.id,o=i.view.showFlexIconIfNotParent;if(e){e=j.getData(a,!0);if(i["async"].enable){var c=!0;if(layui.each(e,function(e,t){if(t[l]&&!t[U])return!(c=!1)}),!c)return void layui.each(j.getData(a),function(e,t){j.expandNode(a,{index:t[H],expandFlag:!0,inherit:!0})})}var u=!0;if(layui.each(e,function(e,t){if(t[l]&&!t[V])return!(u=!1)}),u)t.updateStatus(null,function(e){(e[l]||o)&&(e[X]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),d.find('tbody tr[data-level!="0"]').removeClass(q),d.find(".layui-table-tree-flexIcon").html(i.view.flexIconOpen),i.view.showIcon&&d.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconOpen);else{if(t.updateStatus(null,function(e){(e[l]||o)&&(e[X]=!0,e[V]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),n.initSort&&n.initSort.type&&n.autoSort)return j.sort(a);var s,n=B.getTrHtml(a,e),f={trs:P(n.trs.join("")),trs_fixed:P(n.trs_fixed.join("")),trs_fixed_r:P(n.trs_fixed_r.join(""))};layui.each(e,function(e,t){var a=t[H].split("-").length-1;s={"data-index":t[H],"lay-data-index":t[H],"data-level":a},f.trs.eq(e).attr(s).data("index",t[H]),f.trs_fixed.eq(e).attr(s).data("index",t[H]),f.trs_fixed_r.eq(e).attr(s).data("index",t[H])}),layui.each(["main","fixed-l","fixed-r"],function(e,t){d.find(".layui-table-"+t+" tbody").html(f[["trs","trs_fixed","trs_fixed_r"][e]])}),t.renderTreeTable(d,0,!1)}}else t.updateStatus(null,function(e){(e[l]||o)&&(e[X]=!1,e[r]!==undefined)&&(t.status.expand[e[r]]=!1)}),d.find('.layui-table-box tbody tr[data-level!="0"]').addClass(q),d.find(".layui-table-tree-flexIcon").html(i.view.flexIconClose),i.view.showIcon&&d.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconClose);j.resize(a)}},a.prototype.updateNodeIcon=function(e){var t=this.getOptions().tree||{},a=e.scopeEl,n=e.isExpand,e=e.isParent;a.find(".layui-table-tree-flexIcon").css("visibility",e||t.view.showFlexIconIfNotParent?"visible":"hidden").html(n?t.view.flexIconOpen:t.view.flexIconClose),t.view.showIcon&&(a=a.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom)"),n=e?n?t.view.iconOpen:t.view.iconClose:t.view.iconLeaf,a.toggleClass("layui-table-tree-iconLeaf",!e).html(n))},a.prototype.renderTreeTable=function(e,t,a){var d=this,n=d.getOptions(),l=n.elem.next(),i=(l.hasClass(m)||l.addClass(m),n.id),r=n.tree||{},o=(r.data,r.view||{}),c=r.customName||{},u=c.isParent,s=(l.attr("lay-filter"),d),f=n.data.length,y=((t=t||0)||(l.find(".layui-table-body tr:not([data-level])").attr("data-level",t),layui.each(B.cache[i],function(e,t){f&&(t[H]=String(e));t=t[H];l.find('.layui-table-main tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t),l.find('.layui-table-fixed-l tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t),l.find('.layui-table-fixed-r tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t)})),null),p=c.name,x=o.indent||14;if(layui.each(e.find('td[data-field="'+p+'"]'),function(e,t){var a,n,i=(t=P(t)).closest("tr"),t=t.children(".layui-table-cell");t.hasClass("layui-table-tree-item")||(n=i.attr("lay-data-index"))&&(i=l.find('tr[lay-data-index="'+n+'"]'),(a=s.getNodeDataByIndex(n))[X]&&a[u]&&((y=y||{})[n]=!0),a[g]&&i.find('input[type="checkbox"][name="layTableCheckbox"]').prop("indeterminate",!0),n=t.html(),(t=i.find('td[data-field="'+p+'"]>div.layui-table-cell')).addClass("layui-table-tree-item"),t.html(['
        ',a[X]?o.flexIconOpen:o.flexIconClose,"
        ",o.showIcon?'
        '+(d.normalizedIcon(a[c.icon])||o.icon||(a[u]?a[X]?o.iconOpen:o.iconClose:o.iconLeaf)||"")+"
        ":"",n].join("")).find(".layui-table-tree-flexIcon").on("click",function(e){layui.stope(e),K({trElem:i},null,null,null,!0)}))}),!t&&r.view.expandAllDefault&&d.isExpandAll===undefined)return j.expandAll(i,!0);(!1!==a&&y?(layui.each(y,function(e,t){e=l.find('tr[lay-data-index="'+e+'"]');e.find(".layui-table-tree-flexIcon").html(o.flexIconOpen),K({trElem:e.first()},!0)}),J("renderTreeTable2-"+i,function(){h.render(P(".layui-table-tree["+L+'="'+i+'"]'))},0)):J("renderTreeTable-"+i,function(){n.hasNumberCol&&v(d),h.render(P(".layui-table-tree["+L+'="'+i+'"]'))},0))()},function(a){var e=a.getOptions(),t=e.elem.next(),n=0,i=t.find(".layui-table-main tbody tr"),d=t.find(".layui-table-fixed-l tbody tr"),l=t.find(".layui-table-fixed-r tbody tr");layui.each(a.treeToFlat(B.cache[e.id]),function(e,t){t.LAY_HIDE||(a.getNodeDataByIndex(t[H]).LAY_NUM=++n,i.eq(e).find(".laytable-cell-numbers").html(n),d.eq(e).find(".laytable-cell-numbers").html(n),l.eq(e).find(".laytable-cell-numbers").html(n))})}),N=(a.prototype.render=function(e){var t=this;t.tableIns=B["reloadData"===e?"reloadData":"reload"](t.tableIns.config.id,P.extend(!0,{},t.config)),t.config=t.tableIns.config},a.prototype.reload=function(e,t,a){var n=this;e=e||{},delete n.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete n.config[e]}),l(n.getOptions().id,e,a||!0),n.config=P.extend(t,{},n.config,e),n.render(a)},j.reloadData=function(){var e=P.extend(!0,[],arguments);return e[3]="reloadData",j.reload.apply(null,e)},function(e,a,n,i){var d=[];return layui.each(e,function(e,t){"function"===layui.type(a)?a(t):P.extend(t,a),d.push(P.extend({},t)),i||(d=d.concat(N(t[n],a,n,i)))}),d}),o=(a.prototype.updateStatus=function(e,t,a){var n=this.getOptions(),i=n.tree;return e=e||B.cache[n.id],N(e,t,i.customName.children,a)},a.prototype.getTableData=function(){var e=this.getOptions();return B.cache[e.id]},j.updateStatus=function(e,t,a){var e=F(e),n=e.getOptions();return a=a||(n.url?B.cache[n.id]:n.data),e.updateStatus(a,t)},j.sort=function(e){var t,a,i,d,n,l=F(e);l&&(n=(t=l.getOptions()).tree,a=j.getData(e),i=n.customName.children,d=function(e,a,n){layui.sort(e,a,n,!0),layui.each(e,function(e,t){d(t[i]||[],a,n)})},t.autoSort)&&((n=t.initSort).type?d(a,n.field,"desc"===n.type):d(a,B.config.indexName,null),B.cache[e]=a,l.initData(a),j.renderData(e))},function(n){var t=n.config.id,i=F(t),a=n.data=j.getNodeDataByIndex(t,n.index),d=a[H],l=(n.dataIndex=d,n.update);n.update=function(){var e=arguments,t=(P.extend(i.getNodeDataByIndex(d),e[0]),l.apply(this,e)),a=n.config.tree.customName.name;return a in e[0]&&n.tr.find('td[data-field="'+a+'"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"),i.renderTreeTable(n.tr,n.tr.attr("data-level"),!1),t},n.del=function(){j.removeNode(t,a)},n.setRowChecked=function(e){j.setRowChecked(t,{index:a,checked:e})}}),u=(j.updateNode=function(e,a,t){var n,i,d,l,r,o=F(e);o&&((l=o.getOptions()).tree,l=(n=l.elem.next()).find('tr[lay-data-index="'+a+'"]'),i=l.attr("data-index"),d=l.attr("data-level"),t)&&(l=o.getNodeDataByIndex(a,!1,t),r=B.getTrHtml(e,[l]),layui.each(["main","fixed-l","fixed-r"],function(e,t){n.find(".layui-table-"+t+' tbody tr[lay-data-index="'+a+'"]').replaceWith(P(r[["trs","trs_fixed","trs_fixed_r"][e]].join("")).attr({"data-index":i,"lay-data-index":a,"data-level":d}).data("index",i))}),o.renderTreeTable(n.find('tr[lay-data-index="'+a+'"]'),d))},j.removeNode=function(e,t,a){var n,i,d,l,r,o,c,u,s=F(e);s&&(i=(u=(n=s.getOptions()).tree).customName.isParent,d=u.customName.children,l=n.elem.next(),r=[],o=B.cache[e],t=s.getNodeDataByIndex("string"===layui.type(t)?t:t[H],!1,"delete"),c=s.getNodeDataByIndex(t[f]),s.updateCheckStatus(c),u=s.treeToFlat([t],t[u.customName.pid],t[f]),layui.each(u,function(e,t){t=t[H];r.push('tr[lay-data-index="'+t+'"]'),-1!==t.indexOf("-")&&delete o[t]}),l.find(r.join(",")).remove(),t=s.initData(),function(){for(var e in o)-1!==e.indexOf("-")&&e!==o[e][H]&&delete o[e]}(),layui.each(s.treeToFlat(t),function(e,t){t[b]&&t[b]!==t[H]&&l.find('tr[lay-data-index="'+t[b]+'"]').attr({"data-index":t[H],"lay-data-index":t[H]}).data("index",t[H])}),layui.each(o,function(e,t){l.find('tr[data-level="0"][lay-data-index="'+t[H]+'"]').attr("data-index",e).data("index",e)}),n.hasNumberCol&&v(s),c&&(u=l.find('tr[lay-data-index="'+c[H]+'"]'),a||(c[i]=!(!c[d]||!c[d].length)),s.updateNodeIcon({scopeEl:u,isExpand:c[X],isParent:c[i]})),j.resize(e))},j.addNodes=function(e,t){var a=F(e);if(a){var n=a.getOptions(),i=n.tree,d=n.elem.next(),l=B.config.checkName,r=(t=t||{}).parentIndex,o=t.index,c=t.data,t=t.focus,u=(r="number"===layui.type(r)?r.toString():r)?a.getNodeDataByIndex(r):null,o="number"===layui.type(o)?o:-1,c=P.extend(!0,[],layui.isArray(c)?c:[c]);layui.each(c,function(e,t){l in t||!u||(t[l]=u[l])}),a.getTableData();if(u){var s=i.customName.isParent,f=i.customName.children;u[s]=!0;var y=(y=u[f])?(p=y.splice(-1===o?y.length:o),u[f]=y.concat(c,p)):u[f]=c,f=(a.updateStatus(y,function(e){(e[s]||i.view.showFlexIconIfNotParent)&&(e[V]=!1)}),a.treeToFlat(y));d.find(f.map(function(e){return'tr[lay-data-index="'+e[H]+'"]'}).join(",")).remove(),a.initData(),u[V]=!1,u[U]="local",K({trElem:d.find('tr[lay-data-index="'+r+'"]')},!0)}else{var p=B.cache[e].splice(-1===o?B.cache[e].length:o);if(B.cache[e]=B.cache[e].concat(c,p),n.url||(n.page?(y=n.page,n.data.splice.apply(n.data,[y.limit*(y.curr-1),y.limit].concat(B.cache[e]))):n.data=B.cache[e]),a.initData(),d.find(".layui-none").length)return B.renderData(e),c;var x,f=B.getTrHtml(e,c),h={trs:P(f.trs.join("")),trs_fixed:P(f.trs_fixed.join("")),trs_fixed_r:P(f.trs_fixed_r.join(""))},r=(layui.each(c,function(e,t){x={"data-index":t[H],"lay-data-index":t[H],"data-level":"0"},h.trs.eq(e).attr(x).data("index",t[H]),h.trs_fixed.eq(e).attr(x).data("index",t[H]),h.trs_fixed_r.eq(e).attr(x).data("index",t[H])}),parseInt(c[0][H])-1),y=d.find(R),n=d.find(Y),f=d.find(z);-1==r?y.find('tr[data-level="0"][data-index="0"]')[0]?(y.find('tr[data-level="0"][data-index="0"]').before(h.trs),n.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed_r)):(y.find("tbody").prepend(h.trs),n.find("tbody").prepend(h.trs_fixed),f.find("tbody").prepend(h.trs_fixed_r)):-1===o?(y.find("tbody").append(h.trs),n.find("tbody").append(h.trs_fixed),f.find("tbody").append(h.trs_fixed_r)):(r=p[0][b],y.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs),n.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed_r)),layui.each(B.cache[e],function(e,t){d.find('tr[data-level="0"][lay-data-index="'+t[H]+'"]').attr("data-index",e).data("index",e)}),a.renderTreeTable(d.find(c.map(function(e,t,a){return'tr[lay-data-index="'+e[H]+'"]'}).join(",")))}return a.updateCheckStatus(u),u&&(o=d.find('tr[lay-data-index="'+u[H]+'"]'),a.updateNodeIcon({scopeEl:o,isExpand:u[X],isParent:u[s]})),j.resize(e),t&&d.find(R).find('tr[lay-data-index="'+c[0][H]+'"]').get(0).scrollIntoViewIfNeeded(),c}},j.checkStatus=function(e,n){var i,t,a,d=F(e);if(d)return d=d.getOptions().tree,i=B.config.checkName,t=j.getData(e,!0).filter(function(e,t,a){return e[i]||n&&e[g]}),a=!0,layui.each("all"===d.data.cascade?B.cache[e]:j.getData(e,!0),function(e,t){if(!t[i])return!(a=!1)}),{data:t,isAll:a}},j.on("sort",function(e){var e=e.config,t=e.elem.next(),e=e.id;t.hasClass(m)&&j.sort(e)}),j.on("row",function(e){e.config.elem.next().hasClass(m)&&o(e)}),j.on("rowDouble",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&(o(e),(t.tree||{}).view.dblClickExpand)&&K({trElem:e.tr.first()},null,null,null,!0)}),j.on("rowContextmenu",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&o(e)}),j.on("tool",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&o(e)}),j.on("edit",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(m)&&(o(e),e.field===t.tree.customName.name)&&((a={})[e.field]=e.value,e.update(a))}),j.on("radio",function(e){var t=e.config,a=t.elem.next(),t=t.id;a.hasClass(m)&&(a=F(t),o(e),u.call(a,e.tr,e.checked))}),a.prototype.setRowCheckedClass=function(e,t){var a=this.getOptions(),n=(e.data("index"),a.elem.next());e[t?"addClass":"removeClass"](d),e.each(function(){var e=P(this).data("index");n.find('.layui-table-fixed-r tbody tr[data-index="'+e+'"]')[t?"addClass":"removeClass"](d)})},a.prototype.updateCheckStatus=function(e,t){var a,n,i,d,l,r,o,c=this,u=c.getOptions();return!!u.hasChecboxCol&&(a=u.tree,n=u.id,i=u.elem.next(),d=B.config.checkName,"all"!==(l=a.data.cascade)&&"parent"!==l||!e||(l=c.updateParentCheckStatus(e,"boolean"===layui.type(t)?t:null),layui.each(l,function(e,t){var a=i.find('tr[lay-data-index="'+t[H]+'"] input[name="layTableCheckbox"]:not(:disabled)'),n=t[d];c.setRowCheckedClass(a.closest("tr"),n),a.prop({checked:n,indeterminate:t[g]})})),o=!(r=!0),0<(e=(e="all"===a.data.cascade?B.cache[n]:j.getData(n,!0)).filter(function(e){return!e[u.disabledName]})).length?layui.each(e,function(e,t){if((t[d]||t[g])&&(o=!0),t[d]||(r=!1),o&&!r)return!0}):r=!1,o=o&&!r,i.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({checked:r,indeterminate:o}),r)},a.prototype.updateParentCheckStatus=function(a,n){var i,e=this.getOptions(),t=e.tree,e=e.id,d=B.config.checkName,t=t.customName.children,l=[];return!(a[g]=!1)===n?a[t].length?layui.each(a[t],function(e,t){if(!t[d])return n=!1,a[g]=!0}):n=!1:!1===n?layui.each(a[t],function(e,t){if(t[d]||t[g])return a[g]=!0}):(n=!1,i=0,layui.each(a[t],function(e,t){t[d]&&i++}),n=a[t].length?a[t].length===i:a[d],a[g]=!n&&0li"],n.bodyElem=["."+C.CONST.BODY+":eq(0)",">."+C.CONST.ITEM],n.getContainer=function(){var e=n.documentElem||t.elem;return{header:{elem:e.find(n.headerElem[0]),items:e.find(n.headerElem.join(""))},body:{elem:e.find(n.bodyElem[0]),items:e.find(n.bodyElem.join(""))}}},"array"===layui.type(t.header)?"string"==typeof t.header[0]?(n.headerElem=t.header.concat(),n.documentElem=p(document)):(n.elemView=p('
        '),t.className&&n.elemView.addClass(t.className),a=p('
          '),i=p('
          '),layui.each(t.header,function(e,t){t=n.renderHeaderItem(t);a.append(t)}),layui.each(t.body,function(e,t){t=n.renderBodyItem(t);i.append(t)}),n.elemView.append(a).append(i),t.elem.html(n.elemView)):n.renderClose(),"array"===layui.type(t.body)&&"string"==typeof t.body[0]&&(n.documentElem=p(document),n.bodyElem=t.body.concat()),n.data());"index"in t&&e.index!=t.index?n.change(n.findHeaderItem(t.index),!0):-1===e.index&&n.change(n.findHeaderItem(0),!0),n.roll("auto"),t.elem.hasClass(C.CONST.CLASS_HIDEV)&&t.elem.removeClass(C.CONST.CLASS_HIDEV),"function"==typeof t.afterRender&&t.afterRender(e),layui.event.call(t.elem[0],C.CONST.MOD_NAME,"afterRender("+t.id+")",e)},events:function(){var e,t=this,a=t.config,i=t.getContainer(),n=C.CONST.MOD_NAME,i=(t.documentElem?i.header:a).elem,a=a.trigger+(".lay_"+n+"_trigger"),n=t.documentElem?t.headerElem[1]:t.headerElem.join("");i.off(a).on(a,n,function(){t.change(p(this))}),r.onresize||(p(window).on("resize",function(){clearTimeout(e),e=setTimeout(function(){layui.each(C.cache.id,function(e){e=C.getInst(e);e&&e.roll("init")})},50)}),r.onresize=!0)}}),r={},t=C.Class;t.prototype.add=function(e){var t,a,i=this,n=(i.config,i.getContainer()),r=i.renderHeaderItem(e),d=i.renderBodyItem(e),o=i.data();e=p.extend({active:!0},e),/(before|after)/.test(e.mode)?(a=(t=e.hasOwnProperty("index"))?i.findHeaderItem(e.index):o.thisHeaderItem,t=t?i.findBodyItem(e.index):o.thisHeaderItem,a[e.mode](r),t[e.mode](d)):(a={prepend:"prepend",append:"append"}[e.mode||"append"]||"append",n.header.elem[a](r),n.body.elem[a](d)),e.active?i.change(r,!0):i.roll("auto"),"function"==typeof e.done&&e.done(p.extend(o,{headerItem:r,bodyItem:d}))},t.prototype.close=function(e,t){if(e&&e[0]){var a=this,i=a.config,n=e.attr("lay-id"),r=e.index();if("false"!==e.attr("lay-closable")){var d=a.data();if(!t)if(!1===layui.event.call(e[0],C.CONST.MOD_NAME,"beforeClose("+i.id+")",p.extend(d,{index:r})))return;e.hasClass(C.CONST.CLASS_THIS)&&(e.next()[0]?a.change(e.next(),!0):e.prev()[0]&&a.change(e.prev(),!0)),a.findBodyItem(n||r).remove(),e.remove(),a.roll("auto",r);d=a.data();layui.event.call(d.thisHeaderItem[0],C.CONST.MOD_NAME,"afterClose("+i.id+")",d)}}},t.prototype.closeMult=function(i,e){var n=this,t=n.config,a=n.getContainer(),r=n.data(),d=a.header.items,a=(a.body.items,'[lay-closable="false"]'),o=(e=e===undefined?r.index:e,n.findHeaderItem(e)),l=(n.findBodyItem(e),o.index()),r=("false"!==r.thisHeaderItem.attr("lay-closable")&&("all"!==i&&i?e!==r.index&&n.change(o,!0):(e=d.filter(":gt("+r.index+")"+a).eq(0),o=p(d.filter(":lt("+r.index+")"+a).get().reverse()).eq(0),e[0]?n.change(e,!0):o[0]&&n.change(o,!0))),d.each(function(e){var t=p(this),a=t.attr("lay-id"),a=n.findBodyItem(a||e);"false"!==t.attr("lay-closable")&&("other"===i&&e!==l||"right"===i&&l");return t.html(e.title||"New Tab").attr("lay-id",e.id),this.appendClose(t,e),t},t.prototype.renderBodyItem=function(e){var t=this.config,t=p(e.bodyItem||t.bodyItem||'
          ');return t.html(e.content||"").attr("lay-id",e.id),t},t.prototype.appendClose=function(e,t){var a=this;a.config.closable&&(0==(t=t||{}).closable&&e.attr("lay-closable","false"),"false"===e.attr("lay-closable")||e.find("."+C.CONST.CLOSE)[0]||((t=p('')).on("click",function(){return a.close(p(this).parent()),!1}),e.append(t)))},t.prototype.renderClose=function(){var t=this,a=t.config;t.getContainer().header.items.each(function(){var e=p(this);a.closable?t.appendClose(e):e.find("."+C.CONST.CLOSE).remove()})},t.prototype.roll=function(e,i){var n=this,t=n.config,a=n.getContainer(),r=a.header.elem,d=a.header.items,a=r.prop("scrollWidth"),o=Math.ceil(r.outerWidth()),l=r.data("left")||0,s="scroll"===t.headerMode,c="layui-tabs-scroll",f="layui-tabs-bar",u=["layui-icon-prev","layui-icon-next"],m={elem:p('
          '),bar:p(['
          ','','',"
          "].join(""))};if("normal"!==t.headerMode){var h,y=r.parent("."+c);if(s||!s&&o=o-l)return r.css("left",-a).data("left",-a),!1}),l=r.data("left")||0,y.find("."+u[0])[l<0?"removeClass":"addClass"](C.CONST.CLASS_DISABLED),y.find("."+u[1])[0')),n=(e.tree(a),i.elem);if(n[0]){if(e.elem=a,e.elemNone=L('
          '+i.text.none+"
          "),n.html(e.elem),0==e.elem.find("."+C.ELEM_SET).length)return e.elem.append(e.elemNone);i.showCheckbox&&e.renderForm("checkbox"),e.elem.find("."+C.ELEM_SET).each(function(){var e=L(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(C.ELEM_LINE_SHORT),e.next()[0]||e.parents("."+C.ELEM_SET).eq(0).next()[0]||e.addClass(C.ELEM_LINE_SHORT)})}},extendsInstance:function(){var i=this;i.config;return{getChecked:function(){return i.getChecked.call(i)},setChecked:function(e){return i.setChecked.call(i,e)}}}}),C=a.CONST,n=a.Class;n.prototype.reload=function(e,i){var a=this;layui.each(e,function(e,i){"array"===layui.type(i)&&delete a.config[e]}),a.config=L.extend(!0,{},a.config,e),a.init(!0,i)},n.prototype.renderForm=function(e){i.render(e,"LAY-tree-"+this.index)},n.prototype.tree=function(r,e){var d=this,E=d.config,s=E.customName,e=e||E.data;layui.each(e,function(e,i){var a,n,t=i[s.children]&&0"),c=L(['
          ','
          ','
          ',E.showLine?t?'':'':'',E.showCheckbox?'':"",E.isJump&&i.href?''+(i[s.title]||i.label||E.text.defaultNodeName)+"":''+(i[s.title]||i.label||E.text.defaultNodeName)+"","
          ",E.edit?(a={add:'',update:'',del:''},n=['
          '],!0===E.edit&&(E.edit=["update","del"]),"object"==typeof E.edit?(layui.each(E.edit,function(e,i){n.push(a[i]||"")}),n.join("")+"
          "):void 0):"","
          ","
          "].join(""));t&&(c.append(l),d.tree(l,i[s.children])),r.append(c),c.prev("."+C.ELEM_SET)[0]&&c.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),t||c.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),d.spread(c,i),E.showCheckbox&&(i.checked&&d.checkids.push(i[s.id]),d.checkClick(c,i)),E.edit&&d.operate(c,i)})},n.prototype.spread=function(n,t){var l=this,c=l.config,e=n.children("."+C.ELEM_ENTRY),i=e.children("."+C.ELEM_MAIN),a=i.find('input[same="layuiTreeCheck"]'),r=e.find("."+C.ICON_CLICK),e=e.find("."+C.ELEM_TEXT),d=c.onlyIconControl?r:i,E="";d.on("click",function(e){var i=n.children("."+C.ELEM_PACK),a=(d.children(".layui-icon")[0]?d:d.find(".layui-tree-icon")).children(".layui-icon");i[0]?n.hasClass(C.ELEM_SPREAD)?(n.removeClass(C.ELEM_SPREAD),i.slideUp(200),a.removeClass(C.ICON_SUB).addClass(C.ICON_ADD),l.updateFieldValue(t,"spread",!1)):(n.addClass(C.ELEM_SPREAD),i.slideDown(200),a.addClass(C.ICON_SUB).removeClass(C.ICON_ADD),l.updateFieldValue(t,"spread",!0),c.accordion&&((i=n.siblings("."+C.ELEM_SET)).removeClass(C.ELEM_SPREAD),i.children("."+C.ELEM_PACK).slideUp(200),i.find(".layui-tree-icon").children(".layui-icon").removeClass(C.ICON_SUB).addClass(C.ICON_ADD))):E="normal"}),e.on("click",function(){L(this).hasClass(C.CLASS_DISABLED)||(E=n.hasClass(C.ELEM_SPREAD)?c.onlyIconControl?"open":"close":c.onlyIconControl?"close":"open",a[0]&&l.updateFieldValue(t,"checked",a.prop("checked")),c.click&&c.click({elem:n,state:E,data:t}))})},n.prototype.updateFieldValue=function(e,i,a){i in e&&(e[i]=a)},n.prototype.syncCheckedState=function(e,i,l){var c,t,r=this,d=r.config.customName,E=e.prop("checked"),a=e.closest("."+C.ELEM_SET);e.prop("disabled")||(t=function(e){var i,a,n;e.parents("."+C.ELEM_SET)[0]&&(a=(e=e.parent("."+C.ELEM_PACK)).parent(),(n=e.prev().find('input[same="layuiTreeCheck"]')).prop("disabled")||(E?n.prop("checked",E):(e.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||n.prop("checked",!1)),t(a)))},(c=function(e,i){var n,t=i[d.children];t&&0!==t.length&&(n=e.children("."+C.ELEM_PACK).children("."+C.ELEM_SET)).children("."+C.ELEM_ENTRY).find('input[same="layuiTreeCheck"]').each(function(e){var i,a;this.disabled||(i=t[e],a=!l&&"checked"in i?i.checked:E,this.checked=a,r.updateFieldValue(i,"checked",a),i[d.children]&&c(n.eq(e),i))})})(a,i),t(a),r.renderForm("checkbox"))},n.prototype.checkClick=function(a,n){var t=this,l=t.config,e=a.children("."+C.ELEM_ENTRY).children("."+C.ELEM_MAIN);e.on("click",'input[same="layuiTreeCheck"]',layui.stope),e.on("click",'input[same="layuiTreeCheck"]+',function(e){layui.stope(e);var e=L(this).prev(),i=e.prop("checked");e.prop("disabled")||(t.syncCheckedState(e,n,"manual"),t.updateFieldValue(n,"checked",i),l.oncheck&&l.oncheck({elem:a,checked:i,data:n}))})},n.prototype.operate=function(r,d){var E=this,s=E.config,o=s.customName,e=r.children("."+C.ELEM_ENTRY),h=e.children("."+C.ELEM_MAIN);e.children(".layui-tree-btnGroup").on("click",".layui-icon",function(e){layui.stope(e);var i,e=L(this).data("type"),n=r.children("."+C.ELEM_PACK),t={data:d,type:e,elem:r};if("add"==e){n[0]||(s.showLine?(h.find("."+C.ICON_CLICK).addClass("layui-tree-icon"),h.find("."+C.ICON_CLICK).children(".layui-icon").addClass(C.ICON_ADD).removeClass("layui-icon-leaf")):h.find(".layui-tree-iconArrow").removeClass(C.CLASS_HIDE),r.append('
          '));var a,l=s.operate&&s.operate(t),c={};if(c[o.title]=s.text.defaultNodeName,c[o.id]=l,E.tree(r.children("."+C.ELEM_PACK),[c]),s.showLine&&(n[0]?(n.hasClass(C.ELEM_EXTEND)||n.addClass(C.ELEM_EXTEND),r.find("."+C.ELEM_PACK).each(function(){L(this).children("."+C.ELEM_SET).last().addClass(C.ELEM_LINE_SHORT)}),(n.children("."+C.ELEM_SET).last().prev().hasClass(C.ELEM_LINE_SHORT)?n.children("."+C.ELEM_SET).last().prev():n.children("."+C.ELEM_SET).last()).removeClass(C.ELEM_LINE_SHORT),!r.parent("."+C.ELEM_PACK)[0]&&r.next()[0]&&n.children("."+C.ELEM_SET).last().removeClass(C.ELEM_LINE_SHORT)):(l=r.siblings("."+C.ELEM_SET),a=1,c=r.parent("."+C.ELEM_PACK),layui.each(l,function(e,i){L(i).children("."+C.ELEM_PACK)[0]||(a=0)}),(1==a?(l.children("."+C.ELEM_PACK).addClass(C.ELEM_SHOW),l.children("."+C.ELEM_PACK).children("."+C.ELEM_SET).removeClass(C.ELEM_LINE_SHORT),r.children("."+C.ELEM_PACK).addClass(C.ELEM_SHOW),c.removeClass(C.ELEM_EXTEND),c.children("."+C.ELEM_SET).last().children("."+C.ELEM_PACK).children("."+C.ELEM_SET).last()):r.children("."+C.ELEM_PACK).children("."+C.ELEM_SET)).addClass(C.ELEM_LINE_SHORT))),!s.showCheckbox)return;h.find('input[same="layuiTreeCheck"]')[0].checked&&(r.children("."+C.ELEM_PACK).children("."+C.ELEM_SET).last().find('input[same="layuiTreeCheck"]')[0].checked=!0),E.renderForm("checkbox")}else"update"==e?(l=h.children("."+C.ELEM_TEXT).html(),h.children("."+C.ELEM_TEXT).html(""),h.append(''),h.children(".layui-tree-editInput").val(u.unescape(l)).focus(),i=function(e){var i=u.escape(e.val().trim())||s.text.defaultNodeName;e.remove(),h.children("."+C.ELEM_TEXT).html(i),t.data[o.title]=i,s.operate&&s.operate(t)},h.children(".layui-tree-editInput").blur(function(){i(L(this))}),h.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),i(L(this)))})):(c=p.$t("tree.deleteNodePrompt",{name:d[o.title]||""}),_.confirm(c,function(e){var l,a,i;s.operate&&s.operate(t),t.status="remove",_.close(e),r.prev("."+C.ELEM_SET)[0]||r.next("."+C.ELEM_SET)[0]||r.parent("."+C.ELEM_PACK)[0]?(r.siblings("."+C.ELEM_SET).children("."+C.ELEM_ENTRY)[0]?(s.showCheckbox&&(l=function(e){var i,a,n,t;e.parents("."+C.ELEM_SET)[0]&&(i=e.siblings("."+C.ELEM_SET).children("."+C.ELEM_ENTRY),a=(e=e.parent("."+C.ELEM_PACK).prev()).find('input[same="layuiTreeCheck"]')[0],n=1,(t=0)==a.checked)&&(i.each(function(e,i){i=L(i).find('input[same="layuiTreeCheck"]')[0];0!=i.checked||i.disabled||(n=0),i.disabled||(t=1)}),1==n)&&1==t&&(a.checked=!0,E.renderForm("checkbox"),l(e.parent("."+C.ELEM_SET)))})(r),s.showLine&&(e=r.siblings("."+C.ELEM_SET),a=1,i=r.parent("."+C.ELEM_PACK),layui.each(e,function(e,i){L(i).children("."+C.ELEM_PACK)[0]||(a=0)}),1==a?(n[0]||(i.removeClass(C.ELEM_EXTEND),e.children("."+C.ELEM_PACK).addClass(C.ELEM_SHOW),e.children("."+C.ELEM_PACK).children("."+C.ELEM_SET).removeClass(C.ELEM_LINE_SHORT)),(r.next()[0]?i.children("."+C.ELEM_SET).last():r.prev()).children("."+C.ELEM_PACK).children("."+C.ELEM_SET).last().addClass(C.ELEM_LINE_SHORT),r.next()[0]||r.parents("."+C.ELEM_SET)[1]||r.parents("."+C.ELEM_SET).eq(0).next()[0]||r.prev("."+C.ELEM_SET).addClass(C.ELEM_LINE_SHORT)):!r.next()[0]&&r.hasClass(C.ELEM_LINE_SHORT)&&r.prev().addClass(C.ELEM_LINE_SHORT))):(e=r.parent("."+C.ELEM_PACK).prev(),s.showLine?(e.find("."+C.ICON_CLICK).removeClass("layui-tree-icon"),e.find("."+C.ICON_CLICK).children(".layui-icon").removeClass(C.ICON_SUB).addClass("layui-icon-leaf"),(i=e.parents("."+C.ELEM_PACK).eq(0)).addClass(C.ELEM_EXTEND),i.children("."+C.ELEM_SET).each(function(){L(this).children("."+C.ELEM_PACK).children("."+C.ELEM_SET).last().addClass(C.ELEM_LINE_SHORT)})):e.find(".layui-tree-iconArrow").addClass(C.CLASS_HIDE),r.parents("."+C.ELEM_SET).eq(0).removeClass(C.ELEM_SPREAD),r.parent("."+C.ELEM_PACK).remove()),r.remove()):(r.remove(),E.elem.append(E.elemNone))}))})},n.prototype.events=function(){var i=this,t=i.config;i.setChecked(i.checkids),i.elem.find(".layui-tree-search").on("keyup",function(){var e=L(this),a=e.val(),e=e.nextAll(),n=[];e.find("."+C.ELEM_TEXT).each(function(){var i,e=L(this).parents("."+C.ELEM_ENTRY);-1!=L(this).html().indexOf(a)&&(n.push(L(this).parent()),(i=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+C.ELEM_PACK)[0]&&i(e.parent("."+C.ELEM_PACK).parent("."+C.ELEM_SET))})(e.parent("."+C.ELEM_SET)))}),e.find("."+C.ELEM_ENTRY).each(function(){var e=L(this).parent("."+C.ELEM_SET);e.hasClass("layui-tree-searchShow")||e.addClass(C.CLASS_HIDE)}),0==e.find(".layui-tree-searchShow").length&&i.elem.append(i.elemNone),t.onsearch&&t.onsearch({elem:n})}),i.elem.find(".layui-tree-search").on("keydown",function(){L(this).nextAll().find("."+C.ELEM_ENTRY).each(function(){L(this).parent("."+C.ELEM_SET).removeClass("layui-tree-searchShow "+C.CLASS_HIDE)}),L(".layui-tree-emptyText")[0]&&L(".layui-tree-emptyText").remove()})},n.prototype.getChecked=function(){var t=this,e=t.config,l=e.customName,i=[],a=[],c=(t.elem.find(".layui-form-checked").each(function(){i.push(L(this).prev()[0].value)}),function(e,n){layui.each(e,function(e,a){layui.each(i,function(e,i){if(a[l.id]==i)return t.updateFieldValue(a,"checked",!0),delete(i=L.extend({},a))[l.children],n.push(i),a[l.children]&&(i[l.children]=[],c(a[l.children],i[l.children])),!0})})});return c(L.extend({},e.data),a),a},n.prototype.setChecked=function(e){var c=this,r=c.config.flatData;"object"!=typeof e&&(e=[e]),c.elem.find("."+C.ELEM_SET).each(function(a){var n=L(this).data("id"),t=L(this).children("."+C.ELEM_ENTRY).find('input[same="layuiTreeCheck"]'),l=t.prop("checked");layui.each(e,function(e,i){return n!=i||t.prop("disabled")||l?void 0:(t.prop("checked",!0),c.syncCheckedState(t,r[a]),!0)})})},L.extend(a,{getChecked:function(e){e=a.getInst(e);if(e)return e.getChecked()},setChecked:function(e,i){e=a.getInst(e);if(e)return e.setChecked(i)}}),e(C.MOD_NAME,a)});layui.define(["i18n","laytpl","component","form"],function(e){"use strict";var i=layui.i18n,l=layui.laytpl,o=layui.$,a=layui.form,t=layui.component({name:"transfer",config:{width:200,height:360,data:[],value:[],showSearch:!1,id:""},CONST:{ELEM:"layui-transfer",ELEM_BOX:"layui-transfer-box",ELEM_HEADER:"layui-transfer-header",ELEM_SEARCH:"layui-transfer-search",ELEM_ACTIVE:"layui-transfer-active",ELEM_DATA:"layui-transfer-data",BTN_DISABLED:"layui-btn-disabled"},beforeRender:function(e){this.config=o.extend({title:i.$t("transfer.title"),text:{none:i.$t("transfer.noData"),searchNone:i.$t("transfer.noMatch")}},this.config,e)},render:function(){var e=this,a=e.config,t=function(e){return['
          ','
          ','","
          ","{{ if(d.data.showSearch){ }}",'","{{ } }}",'
            ',"
            "].join("")},t=['
            ',t({index:0,checkAllName:"layTransferLeftCheckAll"}),'
            ','",'","
            ",t({index:1,checkAllName:"layTransferRightCheckAll"}),"
            "].join(""),t=e.elem=o(l(t,{open:"{{",close:"}}",tagStyle:"modern"}).render({data:a,index:e.index})),n=a.elem;n[0]&&(a.data=a.data||[],a.value=a.value||[],n.html(e.elem),e.layBox=e.elem.find("."+d.ELEM_BOX),e.layHeader=e.elem.find("."+d.ELEM_HEADER),e.laySearch=e.elem.find("."+d.ELEM_SEARCH),e.layData=t.find("."+d.ELEM_DATA),e.layBtn=t.find("."+d.ELEM_ACTIVE+" .layui-btn"),e.layBox.css({width:a.width,height:a.height}),e.layData.css({height:(n=a.height-e.layHeader.outerHeight(),a.showSearch&&(n-=e.laySearch.outerHeight()),n-2)}),e.renderData(),e.events())},extendsInstance:function(){var e=this;e.config;return{getData:function(){return e.getData.call(e)}}}}),d=t.CONST,n=t.Class;n.prototype.renderData=function(){var e=this,a=e.config,l=[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}];e.parseData(function(t){var n=t.selected?1:0,i=["
          • ",'',"
          • "].join("");n?layui.each(a.value,function(e,a){a==t.value&&t.selected&&(l[n].views[e]=i)}):l[n].views.push(i),delete t.selected}),e.layData.eq(0).html(l[0].views.join("")),e.layData.eq(1).html(l[1].views.join("")),e.renderCheckBtn()},n.prototype.renderForm=function(e){a.render(e,"LAY-transfer-"+this.index)},n.prototype.renderCheckBtn=function(c){var r=this,s=r.config;c=c||{},r.layBox.each(function(e){var a=o(this),t=a.find("."+d.ELEM_DATA),a=a.find("."+d.ELEM_HEADER).find('input[type="checkbox"]'),n=t.find('input[type="checkbox"]'),i=0,l=!1;n.each(function(){var e=o(this).data("hide");(this.checked||this.disabled||e)&&i++,this.checked&&!e&&(l=!0)}),a.prop("checked",l&&i===n.length),r.layBtn.eq(e)[l?"removeClass":"addClass"](d.BTN_DISABLED),c.stopNone||(n=t.children("li:not(."+d.CLASS_HIDE+")").length,r.noneView(t,n?"":s.text.none))}),r.renderForm("checkbox")},n.prototype.noneView=function(e,a){var t=o('

            '+(a||"")+"

            ");e.find("."+d.CLASS_NONE)[0]&&e.find("."+d.CLASS_NONE).remove(),a.replace(/\s/g,"")&&e.append(t)},n.prototype.setValue=function(){var e=this,a=e.config,t=[];return e.layBox.eq(1).find("."+d.ELEM_DATA+' input[type="checkbox"]').each(function(){o(this).data("hide")||t.push(this.value)}),a.value=t,e},n.prototype.parseData=function(a){var n=this.config,i=[];return layui.each(n.data,function(e,t){t=("function"==typeof n.parseData?n.parseData(t):t)||t,i.push(t=o.extend({},t)),layui.each(n.value,function(e,a){a==t.value&&(t.selected=!0)}),a&&a(t)}),n.data=i,this},n.prototype.getData=function(e){var a=this.config,n=[];return this.setValue(),layui.each(e||a.value,function(e,t){layui.each(a.data,function(e,a){delete a.selected,t==a.value&&n.push(a)})}),n},n.prototype.transfer=function(e,a){var t,n=this,i=n.config,l=n.layBox.eq(e),c=[],a=(a?((t=(a=a).find('input[type="checkbox"]'))[0].checked=!1,l.siblings("."+d.ELEM_BOX).find("."+d.ELEM_DATA).append(a.clone()),a.remove(),c.push(t[0].value),n.setValue()):l.each(function(e){o(this).find("."+d.ELEM_DATA).children("li").each(function(){var e=o(this),a=e.find('input[type="checkbox"]'),t=a.data("hide");a[0].checked&&!t&&(a[0].checked=!1,l.siblings("."+d.ELEM_BOX).find("."+d.ELEM_DATA).append(e.clone()),e.remove(),c.push(a[0].value)),n.setValue()})}),n.renderCheckBtn(),l.siblings("."+d.ELEM_BOX).find("."+d.ELEM_SEARCH+" input"));""!==a.val()&&a.trigger("keyup"),i.onchange&&i.onchange(n.getData(c),e)},n.prototype.events=function(){var i=this,l=i.config;i.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var e=o(this).prev(),a=e[0].checked,t=e.parents("."+d.ELEM_BOX).eq(0).find("."+d.ELEM_DATA);e[0].disabled||("all"===e.attr("lay-type")&&t.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=a)}),setTimeout(function(){i.renderCheckBtn({stopNone:!0})},0))}),i.elem.on("dblclick","."+d.ELEM_DATA+">li",function(e){var a=o(this),t=a.children('input[type="checkbox"]'),n=a.parent().parent().data("index");t[0].disabled||!1!==("function"==typeof l.dblclick?l.dblclick({elem:a,data:i.getData([t[0].value])[0],index:n}):null)&&i.transfer(n,a)}),i.layBtn.on("click",function(){var e=o(this),a=e.data("index");e.hasClass(d.BTN_DISABLED)||i.transfer(a)}),i.laySearch.find("input").on("keyup",function(){var n=this.value,e=o(this).parents("."+d.ELEM_SEARCH).eq(0).siblings("."+d.ELEM_DATA),a=e.children("li"),a=(a.each(function(){var e=o(this),a=e.find('input[type="checkbox"]'),t=a[0].title,t=("cs"!==l.showSearch&&(t=t.toLowerCase(),n=n.toLowerCase()),-1!==t.indexOf(n));e[t?"removeClass":"addClass"](d.CLASS_HIDE),a.data("hide",!t)}),i.renderCheckBtn(),a.length===e.children("li."+d.CLASS_HIDE).length);i.noneView(e,a?l.text.searchNone:"")})},o.extend(t,{getData:function(e){e=t.getInst(e);if(e)return e.getData()}}),e(d.MOD_NAME,t)});layui.define("component",function(e){"use strict";var o=layui.$,i=layui.lay,t=layui.component({name:"carousel",config:{width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},CONST:{ELEM:"layui-carousel",ELEM_ITEM:">*[carousel-item]>*",ELEM_LEFT:"layui-carousel-left",ELEM_RIGHT:"layui-carousel-right",ELEM_PREV:"layui-carousel-prev",ELEM_NEXT:"layui-carousel-next",ELEM_ARROW:"layui-carousel-arrow",ELEM_IND:"layui-carousel-ind"},render:function(){var e=this,i=e.config;e.elemItem=i.elem.find(s.ELEM_ITEM),i.index<0&&(i.index=0),i.index>=e.elemItem.length&&(i.index=e.elemItem.length-1),i.interval<800&&(i.interval=800),i.full?i.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):i.elem.css({width:i.width,height:i.height}),i.elem.attr("lay-anim",i.anim),e.elemItem.eq(i.index).addClass(s.CLASS_THIS),e.indicator(),e.arrow(),e.autoplay()},extendsInstance:function(){var i=this;i.config;return{elemInd:i.elemInd,elemItem:i.elemItem,timer:i.timer,"goto":function(e){i["goto"](e)}}}}),s=t.CONST,n=t.Class;n.prototype.prevIndex=function(){var e=this.config.index-1;return e=e<0?this.elemItem.length-1:e},n.prototype.nextIndex=function(){var e=this.config.index+1;return e=e>=this.elemItem.length?0:e},n.prototype.addIndex=function(e){var i=this.config;i.index=i.index+(e=e||1),i.index>=this.elemItem.length&&(i.index=0)},n.prototype.subIndex=function(e){var i=this.config;i.index=i.index-(e=e||1),i.index<0&&(i.index=this.elemItem.length-1)},n.prototype.autoplay=function(){var e=this,i=e.config,t=e.elemItem.length;i.autoplay&&(clearInterval(e.timer),1',''].join(""));e.elem.attr("lay-arrow",e.arrow),e.elem.find("."+s.ELEM_ARROW)[0]&&e.elem.find("."+s.ELEM_ARROW).remove(),1t.index?i.slide("add",e-t.index):e
              ',(i=[],layui.each(e.elemItem,function(e){i.push("")}),i.join("")),"
            "].join(""));t.elem.attr("lay-indicator",t.indicator),t.elem.find("."+s.ELEM_IND)[0]&&t.elem.find("."+s.ELEM_IND).remove(),1n[a?"height":"width"]()/3)&&o.slide(0"),i=1;i<=a.length;i++){var n='
          • ";a.half&&parseInt(a.value)!==a.value&&i==Math.ceil(a.value)?t=t+'
          • ":t+=n}t+="",a.text&&(t+=''+a.value+"");var s=a.elem,o=s.next("."+c.ELEM);o[0]&&o.remove(),e.elemTemplate=u(t),a.span=e.elemTemplate.next("span"),a.setText&&a.setText(a.value),s.html(e.elemTemplate),s.addClass("layui-inline"),a.readonly||e.action()},extendsInstance:function(){var a=this,l=a.config;return{setvalue:function(e){l.value=e,a.render()}}}}),c=l.CONST;l.Class.prototype.action=function(){var n=this.config,t=this.elemTemplate,i=t.find("i").width(),l=t.children("li");l.each(function(e){var a=e+1,l=u(this);l.on("click",function(e){n.value=a,n.half&&e.pageX-u(this).offset().left<=i/2&&(n.value=n.value-.5),n.text&&t.next("span").text(n.value),n.choose&&n.choose(n.value),n.setText&&n.setText(n.value)}),l.on("mousemove",function(e){t.find("i").each(function(){u(this).addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF)}),t.find("i:lt("+a+")").each(function(){u(this).addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE)}),n.half&&e.pageX-u(this).offset().left<=i/2&&l.children("i").addClass(c.ICON_RATE_HALF).removeClass(c.ICON_RATE_SOLID)}),l.on("mouseleave",function(){t.find("i").each(function(){u(this).addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF)}),t.find("i:lt("+Math.floor(n.value)+")").each(function(){u(this).addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE)}),n.half&&parseInt(n.value)!==n.value&&t.children("li:eq("+Math.floor(n.value)+")").children("i").addClass(c.ICON_RATE_HALF).removeClass(c.ICON_SOLID_RATE)})}),a.touchSwipe(t,{onTouchMove:function(e,a){var i;Date.now()-a.timeStart<=200||(a=e.touches[0].pageX,e=t.width()/n.length,a=(a-t.offset().left)/e,(i=(i=(e=a%1)<=.5&&n.half?.5+(a-e):Math.ceil(a))>n.length?n.length:i)<0&&(i=0),l.each(function(e){var a=u(this).children("i"),l=Math.ceil(i)-e==1,t=Math.ceil(i)>e,e=i-e==.5;t?(a.addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE),n.half&&e&&a.addClass(c.ICON_RATE_HALF).removeClass(c.ICON_RATE_SOLID)):a.addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF),a.toggleClass("layui-rate-hover",l)}),n.value=i,n.text&&t.next("span").text(n.value),n.setText&&n.setText(n.value))},onTouchEnd:function(e,a){Date.now()-a.timeStart<=200||(t.find("i").removeClass("layui-rate-hover"),n.choose&&n.choose(n.value),n.setText&&n.setText(n.value))}})},e(c.MOD_NAME,l)});layui.define(["i18n","component"],function(o){"use strict";var L=layui.$,g=layui.i18n,v=layui.component({name:"flow",CONST:{ELEM_LOAD:'',ELEM_MORE:"layui-flow-more",FLOW_SCROLL_EVENTS:"scroll.lay_flow_scroll",LAZYIMG_SCROLL_EVENTS:"scroll.lay_flow_lazyimg_scroll"},render:function(){var i,n,r=this.config,c=0,o=r.elem;if(o[0]){var e,a=L(r.scrollElem||document),m="mb"in r?r.mb:50,l=!("isAuto"in r)||r.isAuto,t=r.moreText||g.$t("flow.loadMore"),f=r.end||g.$t("flow.noMore"),s="top"===(r.direction||"bottom"),u=r.scrollElem&&r.scrollElem!==document,d=""+t+"",E=L('"),p=(o.find("."+T.ELEM_MORE).remove(),o[s?"prepend":"append"](E),function(o,e){var l=u?a.prop("scrollHeight"):document.documentElement.scrollHeight,t=a.scrollTop();E[s?"after":"before"](o),(e=0==e||null)?E.html(f):y.html(d),n=e,i=null,r.isLazyimg&&v.lazyimg({elem:r.elem.find("img[lay-src]"),scrollElem:r.scrollElem,direction:r.direction,id:r.id}),s&&(o=u?a.prop("scrollHeight"):document.documentElement.scrollHeight,1===c?a.scrollTop(o):1=i&&o<=n&&e.attr("lay-src")&&(l=e.attr("lay-src"),layui.img(l,function(){var o=t.eq(u);e.attr("src",l).removeAttr("lay-src"),o[0]&&E(o),u++},function(){e.removeAttr("lay-src")}))};if(o)l(o);else for(var r=0;r"),preview:"Preview"},wordWrap:!0,lang:"text",highlighter:!1,langMarker:!1,highlightLine:{focus:{range:"",comment:!1,classActiveLine:"layui-code-line-has-focus",classActivePre:"layui-code-has-focused-lines"},hl:{comment:!1,classActiveLine:"layui-code-line-highlighted"},"++":{comment:!1,classActiveLine:"layui-code-line-diff-add"},"--":{comment:!1,classActiveLine:"layui-code-line-diff-remove"}}},O=layui.code?layui.code.index+1e4:0,P=function(e){return String(e).replace(/\s+$/,"").replace(/^\n|\n$/,"")},R=function(e){return"string"!=typeof e?[]:A.map(e.split(","),function(e){var e=e.split("-"),t=parseInt(e[0],10),e=parseInt(e[1],10);return t&&e?A.map(new Array(e-t+1),function(e,i){return t+i}):t||undefined})},H=/(?:\/\/|\/\*{1,2}||-->)?/;e("code",function(r,e){var u,a,i,t,l,n,o,c,s,d,y,p,E,h,f,v,m,L,g,M,_,C={config:r=A.extend(!0,{},j,r),reload:function(e){layui.code(this.updateOptions(e))},updateOptions:function(e){return delete(e=e||{}).elem,A.extend(!0,r,e)},reloadCode:function(e){layui.code(this.updateOptions(e),"reloadCode")}},w=A(r.elem);return 1',r.ln?['
            ',x.digit(i+1)+".","
            "].join(""):"",'
            ',(d.needParseComment?e.replace(H,""):e)||" ","
            ",""].join("")}),d.preClass&&u.addClass(d.preClass),{lines:s,html:e}},t=r.code,l=function(e){return"function"==typeof r.codeParse?r.codeParse(e,r):e},"reloadCode"===e?u.children(".layui-code-wrap").html(w(l(t)).html):(n=layui.code.index=++O,u.attr("lay-code-index",n),(M=T.CDDE_DATA_CLASS in u.data())&&u.attr("class",u.data(T.CDDE_DATA_CLASS)||""),M||u.data(T.CDDE_DATA_CLASS,u.attr("class")),o={copy:{className:"file-b",title:[W.$t("code.copy")],event:function(e){var i=x.unescape(l(r.code)),t="function"==typeof r.onCopy;lay.clipboard.writeText({text:i,done:function(){if(t&&!1===r.onCopy(i,!0))return;N.msg(W.$t("code.copied"),{icon:1})},error:function(){if(t&&!1===r.onCopy(i,!1))return;N.msg(W.$t("code.copyError"),{icon:2})}})}}},function b(){var e=u.parent("."+T.ELEM_PREVIEW),i=e.children("."+T.ELEM_TAB),t=e.children("."+T.ELEM_ITEM+"-preview");return i.remove(),t.remove(),e[0]&&u.unwrap(),b}(),r.preview&&(M="LAY-CODE-DF-"+n,h=r.layout||["code","preview"],c="iframe"===r.preview,E=A('
            '),_=A('
            '),s=A('
            '),g=A('
            '),d=A('
            '),r.id&&E.attr("id",r.id),E.addClass(r.className),_.attr("lay-filter",M),layui.each(h,function(e,i){var t=A('
          • ');0===e&&t.addClass("layui-this"),t.html(r.text[i]),s.append(t)}),A.extend(o,{full:{className:"screen-full",title:[W.$t("code.maximize"),W.$t("code.restore")],event:function(e){var e=e.elem,i=e.closest("."+T.ELEM_PREVIEW),t="layui-icon-"+this.className,a="layui-icon-screen-restore",l=this.title,n=A("html,body"),o="layui-scrollbar-hide";e.hasClass(t)?(i.addClass(T.ELEM_FULL),e.removeClass(t).addClass(a),e.attr("title",l[1]),n.addClass(o)):(i.removeClass(T.ELEM_FULL),e.removeClass(a).addClass(t),e.attr("title",l[0]),n.removeClass(o))}},window:{className:"release",title:[W.$t("code.preview")],event:function(e){x.openWin({content:l(r.code)})}}}),r.copy&&("array"===layui.type(r.tools)?-1===r.tools.indexOf("copy")&&r.tools.unshift("copy"):r.tools=["copy"]),d.on("click",">i",function(){var e=A(this),i=e.data("type"),e={elem:e,type:i,options:r,rawCode:r.code,finalCode:x.unescape(l(r.code))};o[i]&&"function"==typeof o[i].event&&o[i].event(e),"function"==typeof r.toolsEvent&&r.toolsEvent(e)}),r.addTools&&r.tools&&(r.tools=[].concat(r.tools,r.addTools)),layui.each(r.tools,function(e,i){var t="object"==typeof i,a=t?i:o[i]||{className:i,title:[i]},l=a.className||a.type,n=a.title||[""],t=t?a.type||l:i;t&&(o[t]||((i={})[t]=a,A.extend(o,i)),d.append(''))}),u.addClass(T.ELEM_ITEM).wrap(E),_.append(s),r.tools&&_.append(d),u.before(_),c&&g.html(''),y=function(e){var i=e.children("iframe")[0];c&&i?i.srcdoc=l(r.code):e.html(r.code),setTimeout(function(){"function"==typeof r.done&&r.done({container:e,options:r,render:function(){S.render(e.find(".layui-form")),I.render(),D.render({elem:["."+T.ELEM_PREVIEW,".layui-tabs"].join(" ")})}})},3)},"preview"===h[0]?(g.addClass(T.ELEM_SHOW),u.before(g),y(g)):u.addClass(T.ELEM_SHOW).after(g),r.previewStyle=[r.style,r.previewStyle].join(""),g.attr("style",r.previewStyle),I.on("tab("+M+")",function(e){var i=A(this),t=A(e.elem).closest("."+T.ELEM_PREVIEW).find("."+T.ELEM_ITEM),e=t.eq(e.index);t.removeClass(T.ELEM_SHOW),e.addClass(T.ELEM_SHOW),"preview"===i.attr("lay-id")&&y(e),L()})),p=A(''),u.addClass((E=["layui-code-view layui-border-box"],r.wordWrap||E.push("layui-code-nowrap"),E.join(" "))),(_=r.theme||r.skin)&&(u.removeClass("layui-code-theme-dark layui-code-theme-light"),u.addClass("layui-code-theme-"+_)),r.highlighter&&u.addClass([r.highlighter,"language-"+r.lang,"layui-code-hl"].join(" ")),h=w(r.encode?x.escape(l(t)):t),f=h.lines,u.html(p.html(h.html)),r.ln&&u.append('
            '),r.height&&p.css("max-height",r.height),r.codeStyle=[r.style,r.codeStyle].join(""),r.codeStyle&&p.attr("style",function(e,i){return(i||"")+r.codeStyle}),v=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(e,i){e.style["padding-left"]=i+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(e,i){e.style.width=i+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(e,i){e.style.width=i+"px"}}],m=lay.style({target:u[0],id:"DF-code-"+n,text:A.map(A.map(v,function(e){return e.selector}),function(e,i){return['.layui-code-view[lay-code-index="'+n+'"]',e].join(" ")}).join("")}),L=function b(){var e,a;return r.ln&&(e=Math.floor(f.length/100),a=p.children("."+T.ELEM_LINE).last().children("."+T.ELEM_LINE_NUM).outerWidth(),u.addClass(T.ELEM_LN_MODE),e)&&a>T.LINE_RAW_WIDTH&&lay.getStyleRules(m,function(e,i){try{v[i].setValue(e,a)}catch(t){}}),b}(),r.header&&((g=A('
            ')).html(r.title||r.text.code),u.prepend(g)),M=A('
            '),r.copy&&!r.preview&&((_=A(['','',""].join(""))).on("click",function(){o.copy.event()}),M.append(_)),r.langMarker&&M.append(''+r.lang+""),r.about&&M.append(r.about),u.append(M),r.preview||setTimeout(function(){"function"==typeof r.done&&r.done({})},3),r.elem.length===1+n&&"function"==typeof r.allDone&&r.allDone())),C})}),layui["layui.all"]||layui.addcss("modules/code.css?v=6","skincodecss");