(function(he){"use strict";var x,Q=he.document,K=he.location,Y={timeout:10,debug:!1,version:!1},M={modules:{},status:{},event:{},callback:{}},y=function(){this.v="2.11.5"},d=he.LAYUI_GLOBAL||{},A=(x=Q.currentScript&&Q.currentScript.tagName.toUpperCase()==="SCRIPT"?Q.currentScript.src:(function(){for(var C,a=Q.getElementsByTagName("script"),p=a.length-1,u=p;01e3*Y.timeout/5?I(s+" is not a valid module","error"):void((S?layui[s]=he[f.api]:M.status[s])?P():setTimeout(g,5))})()},C.length===0||layui["layui.all"]&&T[s]?P():(X=S?f.src:f,o=(T[s]?o+"modules/":X?"":Y.base)+(X=(X=X||s).replace(/\s/g,"").replace(/\.js[^\/\.]*$/,""))+".js",!M.modules[s]&&layui[s]&&(M.modules[s]=o),M.modules[s]?n():(R=Q.getElementsByTagName("head")[0],(k=Q.createElement("script")).async=!0,k.charset="utf-8",k.src=o+((X=Y.version===!0?Y.v||new Date().getTime():Y.version||"")?"?v="+X:""),R.appendChild(k),_(k,function(){R.removeChild(k),n()},function(){R.removeChild(k)}),M.modules[s]=o))),c},y.prototype.modules=Object.assign({},T),y.prototype.extend=function(C){var a,p,u=Y.base||"",s=/^\{\/\}/;for(a in C=C||{})this[a]||this.modules[a]?I("the "+a+" module already exists, extend failure"):(typeof(p=C[a])=="string"&&(p=((u=s.test(p)?"":u)+p).replace(s,"")),this.modules[a]=p);return this},y.prototype.disuse=function(C){var a=this;return C=a.isArray(C)?C:[C],a.each(C,function(p,u){delete a[u],delete T[u],delete a.modules[u],delete M.status[u],delete M.modules[u]}),a},y.prototype.getStyle=function(C,a){return C=C.currentStyle||he.getComputedStyle(C,null),C.getPropertyValue?C.getPropertyValue(a):C.getAttribute(a.replace(/-(\w)/g,function(p,u){return u?u.toUpperCase():""}))},y.prototype.link=function(C,a,p){var u,s=this,f=Q.getElementsByTagName("head")[0],S=typeof a=="function";if(typeof a=="string"&&(p=a),typeof C=="object")return u=s.type(p)==="array",s.each(C,function(n,R){s.link(R,n===C.length-1&&a,u&&p[n])});p="layuicss-"+(p=p||C.replace(/^(#|(http(s?)):\/\/|\/\/)|\.|\/|\?.+/g,""));var P=Q.getElementById(p);return P||((P=Q.createElement("link")).href=C+(Y.debug?"?v="+new Date().getTime():""),P.rel="stylesheet",P.id=p,f.appendChild(P)),P.__lay_readyState__==="complete"?S&&a(P):_(P,function(){P.__lay_readyState__="complete",S&&a(P)},function(){I(C+" load error","error"),f.removeChild(P)}),s},y.prototype.addcss=function(C,a,p){return layui.link(Y.dir+"css/"+C,a,p)},y.prototype.factory=function(C){if(layui[C])return typeof Y.callback[C]=="function"?Y.callback[C]:null},y.prototype.img=function(C,a,p){var u=new Image;if(u.src=C,u.complete)return a(u);u.onload=function(){u.onload=null,typeof a=="function"&&a(u)},u.onerror=function(s){u.onerror=null,typeof p=="function"&&p(s)}},y.prototype.router=y.prototype.hash=function(C){var a={path:[],pathname:[],search:{},hash:((C=C||K.hash).match(/[^#](#.*$)/)||[])[1]||"",href:""};return/^#/.test(C)&&(C=C.replace(/^#/,""),C=(a.href=C).replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(C,function(p,u){/^\w+=/.test(u)?(u=u.split("="),a.search[u[0]]=u[1]):a.path.push(u)}),a.pathname=a.path),a},y.prototype.url=function(C){var a,p,u=this;return{pathname:(C?((C.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):K.pathname).replace(/^\//,"").split("/"),search:(a={},p=(C?((C.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):K.search).replace(/^\?+/,"").split("&"),u.each(p,function(s,f){var S=f.indexOf("="),P=S<0?f.substr(0,f.length):S!==0&&f.substr(0,S);P&&(a[P]=0(he.innerHeight||Q.documentElement.clientHeight)},K.getStyleRules=function(y,d){if(y)return y=(y=y.sheet||y.styleSheet||{}).cssRules||y.rules,typeof d=="function"&&layui.each(y,function(A,I){if(d(I,A))return!0}),y},K.style=function(y){y=y||{};var d=K.elem("style"),A=y.text||"",I=y.target;if(A)return"styleSheet"in d?(d.setAttribute("type","text/css"),d.styleSheet.cssText=A):d.innerHTML=A,d.id="LAY-STYLE-"+(y.id||(A=K.style.index||0,K.style.index++,"DF-"+A)),I&&((y=K(I).find("#"+d.id))[0]&&y.remove(),K(I).append(d)),d},K.position=function(y,d,A){var I,T,_,ee,C,a,p,u,s;d&&(A=A||{},y!==Q&&y!==K("body")[0]||(A.clickType="right"),I=A.clickType==="right"?{left:(I=A.e||he.event||{}).clientX,top:I.clientY,right:I.clientX,bottom:I.clientY}:y.getBoundingClientRect(),a=d.offsetWidth,p=d.offsetHeight,T=function(f){return Q.body[f=f?"scrollLeft":"scrollTop"]|Q.documentElement[f]},_=function(f){return Q.documentElement[f?"clientWidth":"clientHeight"]},ee="margin"in A?A.margin:5,s=I.left,C=I.bottom,A.align==="center"?s-=(a-y.offsetWidth)/2:A.align==="right"&&(s=s-a+y.offsetWidth),(s=s+a+ee>_("width")?_("width")-a-ee:s)_()&&(I.top>p+ee&&I.top<=_()?C=I.top-p-2*ee:A.allowBottomOut||(C=_()-p-2*ee)<0&&(C=0)),(a=A.position)&&(d.style.position=a),p=A.offset?A.offset[0]:0,u=A.offset?A.offset[1]:0,d.style.left=s+(a==="fixed"?0:T(1))+p+"px",d.style.top=C+(a==="fixed"?0:T())+u+"px",K.hasScrollbar()||(s=d.getBoundingClientRect(),!A.SYSTEM_RELOAD&&s.bottom+ee>_()&&(A.SYSTEM_RELOAD=!0,setTimeout(function(){K.position(y,d,A)},50))))},K.options=function(I,d){if(d=typeof d=="object"?d:{attr:d},I===Q)return{};var I=K(I),A=d.attr||"lay-options",I=I.attr(A);try{return new Function("return "+(I||"{}"))()}catch(T){return layui.hint().error(d.errorText||[A+'="'+I+'"',` parseerror: `+T].join(` `),"error"),{}}},K.isTopElem=function(y){var d=[Q,K("body")[0]],A=!1;return K.each(d,function(I,T){if(T===y)return A=!0}),A},K.clipboard={writeText:function(y){var d=String(y.text);function A(){var I=Q.createElement("textarea");I.value=d,I.style.position="fixed",I.style.opacity="0",I.style.top="0px",I.style.left="0px",Q.body.appendChild(I),I.select();try{Q.execCommand("copy"),typeof y.done=="function"&&y.done()}catch(T){typeof y.error=="function"&&y.error(T)}finally{I.remove?I.remove():Q.body.removeChild(I)}}navigator&&"clipboard"in navigator?navigator.clipboard.writeText(d).then(y.done,function(){A()}):A()}},K.passiveSupported=(function(){var y=!1;try{var d=Object.defineProperty({},"passive",{get:function(){y=!0}});he.addEventListener("test",null,d),he.removeEventListener("test",null,d)}catch(A){}return y})(),K.touchEventsSupported=function(){return"ontouchstart"in he},K.touchSwipe=function(y,d){var A,I,T,_=d,ee=K(y)[0],C=!("preventDefault"in _)||_.preventDefault;ee&&K.touchEventsSupported()&&(A={pointerStart:{x:0,y:0},pointerEnd:{x:0,y:0},distanceX:0,distanceY:0,direction:"none",timeStart:null},d=function(a){a.touches.length===1&&(ee.addEventListener("touchmove",I,!!K.passiveSupported&&{passive:!1}),ee.addEventListener("touchend",T),ee.addEventListener("touchcancel",T),A.timeStart=Date.now(),A.pointerStart.x=A.pointerEnd.x=a.touches[0].clientX,A.pointerStart.y=A.pointerEnd.y=a.touches[0].clientY,A.distanceX=A.distanceY=0,A.direction="none",_.onTouchStart)&&_.onTouchStart(a,A)},I=function(a){C&&a.preventDefault(),A.pointerEnd.x=a.touches[0].clientX,A.pointerEnd.y=a.touches[0].clientY,A.distanceX=A.pointerStart.x-A.pointerEnd.x,A.distanceY=A.pointerStart.y-A.pointerEnd.y,Math.abs(A.distanceX)>Math.abs(A.distanceY)?A.direction=0]|&(?=#?[a-zA-Z0-9]+)/g;return d==null?"":A.test(d+="")?d.replace(A,function(I){return"&#"+I.charCodeAt(0)+";"}):d}},Q=function(d,A){return new RegExp(d,A||"g")},K=function(T,A,I){A=A||{};var T="Laytpl "+((A=Object.assign({errorContext:""},A)).type||"")+"Error: "+T,_=A.errorContext;return delete A.errorContext,typeof console=="object"&&console.error(T,` `,_,` `,A),typeof I=="function"&&I(A),T},Y={open:"{{",close:"}}",cache:!0,condense:!0,tagStyle:""},M=function(d,A){var I=this;A=I.config=Object.assign({template:d},Y,A),I.vars=Object.assign({include:function(T,_){return T=document.getElementById(T),T=T?T.innerHTML:"",T?I.render(T,_):""}},x),I.compile(A.template)},y=(M.prototype.render=function(d,A){var I=this,T=I.config,_=d?I.compile(d):I.compilerCache||I.compile(T.template),ee=(function(){A=A||T.data||{};try{return _(A)}catch(C){return d=d||T.template,K(C,{errorContext:I.extractErrorContext(d,A),template:d,type:"Render"},T.error)}})();return T.cache&&!d&&(I.compilerCache=_),ee},M.prototype.compile=function(d){var A=this,I=A.config,T=I.open,_=I.close,ee=I.condense,C=Q,a="\u2028";if(typeof d!="string"||!d)return function(){return""};var p=function(n,R){return n=["(?:"+T+(n[0]||"")+"\\s*)","("+(n[1]||"[\\s\\S]")+"*?)","(?:\\s*"+(n[2]||"")+_+")"],(R=R||{}).before&&n.unshift(R.before),R.after&&n.push(R.after),C(n.join(""))},S=ee?["",""]:["(?:(?:\\n)*\\s*)","(?:\\s*?)"],u={before:S[0],after:S[1]},s=function(n,R){return n=(n=ee?n:n.replace(C(a),R?"":` `)).replace(/\\(\\|")/g,"$1")},f=A.parse=function(n){var R,k,X;return(n=n||"")&&(n=(n=(n=ee?n.replace(/\t/g," ").replace(/\s+/g," "):n).replace(C("([}\\]])"+_),"$1 "+_).replace(/(?=\\|")/g,"\\").replace(/\r?\n/g,ee?"":a)).replace(p(["!","","!"],u),function(c,o){return o=o.replace(C(T+"|"+_),function(r){return r.replace(/(?=.)/g,"\\")})}),R=function(c){return['";',c,'__laytpl__+="'].join(` `)},k=function(c,o,r){return r&&(o=o==="-"?"":"_escape",r=s(r,!0))?R("__laytpl__+="+o+"("+r+");"):""},X=function(c,o){return o?(o=s(o),R(o)):""},n=I.tagStyle==="modern"?(n=(n=n.replace(p(["#"],u),"")).replace(p(["(=|-)"]),k)).replace(p([],u),X):(n=n.replace(p(["#"],u),X)).replace(p(["(=|-)*"]),k),ee||(n=n.replace(C(a),"\\n"))),n},S=A.createCompiler=function(n,R){return R=R||P(n),new Function("laytpl","return "+R)(A.vars)},P=A.createBuilder=function(n,R){return R=R||["function(d){",'"use strict";','var __laytpl__="",'+(function(){var k,X=[];for(k in A.vars)X.push((k==="escape"?"_":"")+k+"=laytpl."+k);return X.join(",")})()+";",'__laytpl__="'+f(n)+'";',"return __laytpl__;","};"].join(` `)};try{return S(d)}catch(n){return delete A.compilerCache,function(){return K(n,{errorContext:A.extractErrorContext(d),template:d,type:"Compile"},I.error)}}},M.prototype.extractErrorContext=function(d,A){var I=1,T=d.split(/\r?\n/g),_=(d=d.replace(/(?=^)/gm,function(){return"/*LINE:"+I+++"*/"}),this.createBuilder(d)),ee=_.split(/\r?\n/),C="laytpl.builder.map";try{_+=` //# sourceURL=`+C;var a=this.createCompiler(d,_);A&&a(A)}catch(P){var d=Q(C.replace(/\./g,"\\.")+":(\\d+)","i"),_=(P.stack.match(d)||[])[1]||0,p=function(X,o){var o=o?/\/\*LINE:(\d+)\*\/[^*]*$/:/\/\*LINE:(\d+)\*\//;return!(o=(String(ee[X-1]).match(o)||[])[1])&&0T.pages?T.curr=T.pages:T.curr<1&&(T.curr=1),_<0?_=1:_>T.pages&&(_=T.pages),T.prev="prev"in T?T.prev:"上一页",T.next="next"in T?T.next:"下一页",T.pages>_?Math.ceil((T.curr+(1<_?1:0))/(0<_?_:1)):1),C={prev:T.prev?''+T.prev+"":"",page:(function(){var a=[];if(T.count<1)return"";1'+(T.first||1)+"");var p=Math.floor((_-1)/2),u=1T.pages?T.pages:p:_;for(s-u<_-1&&(u=s-_+1),T.first!==!1&&2...');u<=s;u++)u===T.curr?a.push('"+u+""):a.push(''+u+"");return T.pages>_&&T.pages>s&&T.last!==!1&&(s+1...'),_!==0)&&a.push(''+(T.last||T.pages)+""),a.join("")})(),next:T.next?''+T.next+"":"",count:''+(A=typeof T.countText=="object"?T.countText:["共 "," 条"])[0]+T.count+A[1]+"",limit:(d=['"),refresh:['','',""].join(""),skip:[''+(A=typeof T.skipText=="object"?T.skipText:["到第","页","确定"])[0],'',A[1]+'",""].join("")};return['
',(I=[],layui.each(T.layout,function(a,p){C[p]&&I.push(C[p])}),I.join("")),"
"].join("")},M.prototype.jump=function(d,A){if(d){var I=this,T=I.config,_=d.children,ee=d[K]("button")[0],C=d[K]("input")[0],d=d[K]("select")[0],a=function(){var f=Number(C.value.replace(/\s|\D/g,""));f&&(T.curr=f,I.render())};if(A)return a();for(var p=0,u=_.length;pT.pages||(T.curr=f,I.render())});d&&y.on(d,"change",function(){var f=this.value;T.curr*f>T.count&&(T.curr=Math.ceil(T.count/f)),T.limit=f,I.render()}),ee&&y.on(ee,"click",function(){a()})}},M.prototype.skip=function(d){var A,I;d&&(A=this,I=d[K]("input")[0])&&y.on(I,"keyup",function(ee){var _=this.value,ee=ee.keyCode;/^(37|38|39|40)$/.test(ee)||(/\D/.test(_)&&(this.value=_.replace(/\D/,"")),ee===13&&A.jump(d,!0))})},M.prototype.render=function(d){var A=this,I=A.config,_=A.type(),T=A.view(),_=(_===2?I.elem&&(I.elem.innerHTML=T):_===3?I.elem.html(T):x[Q](I.elem)&&(x[Q](I.elem).innerHTML=T),I.jump&&I.jump(I,d),x[Q]("layui-laypage-"+I.index));A.jump(_),I.hash&&!d&&(location.hash="!"+I.hash+"="+I.curr),A.skip(_)},{render:function(d){return new M(d).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(d,A,I){return d.attachEvent?d.attachEvent("on"+A,function(T){T.target=T.srcElement,I.call(d,T)}):d.addEventListener(A,I,!1),this}});he("laypage",y)}),(function(he,x){"use strict";var Q=he.layui&&layui.define,K={getPath:he.lay&&lay.getPath?lay.getPath:"",link:function(c,o,r){d.path&&he.lay&&lay.layui&&lay.layui.link(d.path+c,o,r)}},Y=he.LAYUI_GLOBAL||{},M="laydate",y="lay-"+M+"-id",d={v:"5.6.0",config:{weekStart:0},index:he.laydate&&he.laydate.v?1e5:0,path:Y.laydate_dir||K.getPath,set:function(c){var o=this;return o.config=lay.extend({},o.config,c),o},ready:function(c){var o="laydate",r=(Q?"modules/":"")+"laydate.css?v="+d.v;return Q?layui["layui.all"]?typeof c=="function"&&c():layui.addcss(r,c,o):K.link(r,c,o),this}},A=function(){var c=this,o=c.config.id;return(A.that[o]=c).inst={hint:function(r){c.hint.call(c,r)},reload:function(r){c.reload.call(c,r)},config:c.config}},I="layui-this",T="laydate-disabled",_=[100,2e5],ee="layui-laydate-static",C="layui-laydate-list",a="laydate-selected",p="layui-laydate-hint",u="laydate-day-prev",s="laydate-day-next",f=".laydate-btns-confirm",S="laydate-time-text",P="laydate-btns-time",n="layui-laydate-preview",R="layui-laydate-shade",k=function(c){var o,r=this,g=(r.index=++d.index,r.config=lay.extend({},r.config,d.config,c),lay(c.elem||r.config.elem));return 1请重新选择",invalidDate:"不在有效日期或时间范围内",formatError:["日期格式不合法
必须遵循下述格式:
","
已为你重置"],preview:"当前选中的结果"},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"},timeout:"End time cannot be less than start Time
Please re-select",invalidDate:"Invalid date",formatError:["The date format error
Must be followed:
","
It has been reset"],preview:"The selected result"}};return c[this.config.lang]||c.cn},k.prototype.markerOfChineseFestivals={"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-10-1":"国庆","0-12-25":"圣诞"},k.prototype.reload=function(c){this.config=lay.extend({},this.config,c),this.init()},k.prototype.init=function(){var c=this,o=c.config,r=o.position==="static",g={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};o.elem=lay(o.elem),o.eventElem=lay(o.eventElem),o.elem[0]&&(layui.type(o.theme)!=="array"&&(o.theme=[o.theme]),o.fullPanel&&(o.type!=="datetime"||o.range)&&delete o.fullPanel,c.rangeStr=o.range?typeof o.range=="string"?o.range:"-":"",c.rangeLinked=!(!o.range||!o.rangeLinked||o.type!=="date"&&o.type!=="datetime"),c.autoCalendarModel=function(){var w=c.rangeLinked;return c.rangeLinked=o.range&&(o.type==="date"||o.type==="datetime")&&(!c.startDate||!c.endDate||c.startDate&&c.endDate&&c.startDate.year===c.endDate.year&&c.startDate.month===c.endDate.month),lay(c.elem)[c.rangeLinked?"addClass":"removeClass"]("layui-laydate-linkage"),c.rangeLinked!=w},c.autoCalendarModel.auto=c.rangeLinked&&o.rangeLinked==="auto",layui.type(o.range)==="array"&&(c.rangeElem=[lay(o.range[0]),lay(o.range[1])]),g[o.type]||(he.console&&console.error&&console.error("laydate type error:'"+o.type+"' is not supported"),o.type="date"),o.format===g.date&&(o.format=g[o.type]||g.date),c.format=A.formatArr(o.format),o.weekStart&&!/^[0-6]$/.test(o.weekStart)&&(g=c.lang(),o.weekStart=g.weeks.indexOf(o.weekStart),o.weekStart===-1)&&(o.weekStart=0),c.EXP_IF="",c.EXP_SPLIT="",lay.each(c.format,function(w,F){w=new RegExp(X).test(F)?"\\d{"+(new RegExp(X).test(c.format[w===0?w+1:w-1]||"")?/^yyyy|y$/.test(F)?4:F.length:/^yyyy$/.test(F)?"1,4":/^y$/.test(F)?"1,308":"1,2")+"}":"\\"+F,c.EXP_IF=c.EXP_IF+w,c.EXP_SPLIT=c.EXP_SPLIT+"("+w+")"}),c.EXP_IF_ONE=new RegExp("^"+c.EXP_IF+"$"),c.EXP_IF=new RegExp("^"+(o.range?c.EXP_IF+"\\s\\"+c.rangeStr+"\\s"+c.EXP_IF:c.EXP_IF)+"$"),c.EXP_SPLIT=new RegExp("^"+c.EXP_SPLIT+"$",""),c.isInput(o.elem[0])||o.trigger==="focus"&&(o.trigger="click"),o.elem.attr("lay-key",c.index),o.eventElem.attr("lay-key",c.index),o.elem.attr(y,o.id),lay.each(["min","max"],function(ne,F){var te=[],re=[];if(typeof o[F]=="number")var O=o[F],z=new Date,z=c.newDate({year:z.getFullYear(),month:z.getMonth(),date:z.getDate(),hours:ne?23:0,minutes:ne?59:0,seconds:ne?59:0}).getTime(),ne=new Date(O?O<864e5?z+864e5*O:O:z),te=[ne.getFullYear(),ne.getMonth()+1,ne.getDate()],re=[ne.getHours(),ne.getMinutes(),ne.getSeconds()];else if(typeof o[F]=="string")te=(o[F].match(/\d+-\d+-\d+/)||[""])[0].split("-"),re=(o[F].match(/\d+:\d+:\d+/)||[""])[0].split(":");else if(typeof o[F]=="object")return o[F];o[F]={year:0|te[0]||new Date().getFullYear(),month:te[1]?(0|te[1])-1:new Date().getMonth(),date:0|te[2]||new Date().getDate(),hours:0|re[0],minutes:0|re[1],seconds:0|re[2]}}),c.elemID="layui-laydate"+o.elem.attr("lay-key"),(o.show||r)&&c.render(),r||c.events(),typeof o.formatToDisplay=="function"&&(c.isInput(o.elem[0])?c.formatToDisplay(o.elem[0],o.formatToDisplay):(g=c.rangeElem)&&(c.formatToDisplay(g[0][0],o.formatToDisplay),c.formatToDisplay(g[1][0],o.formatToDisplay))),o.value)&&o.isInitValue&&(layui.type(o.value)==="date"?c.setValue(c.parse(0,c.systemDate(o.value))):c.setValue(o.value))},k.prototype.render=function(){var c,o,r,g,w=this,F=w.config,O=w.lang(),z=F.position==="static",ne=w.elem=lay.elem("div",{id:w.elemID,class:["layui-laydate",F.range?" layui-laydate-range":"",w.rangeLinked?" layui-laydate-linkage":"",z?" "+ee:"",F.fullPanel?" laydate-theme-fullpanel":"",(c="",lay.each(F.theme,function(m,h){h==="default"||/^#/.test(h)||(c+=" laydate-theme-"+h)}),c)].join("")}),te=w.elemMain=[],re=w.elemHeader=[],D=w.elemCont=[],v=w.table=[],L=w.footer=lay.elem("div",{class:"layui-laydate-footer"}),oe=w.shortcut=lay.elem("ul",{class:"layui-laydate-shortcut"}),j=(F.zIndex&&(ne.style.zIndex=F.zIndex),lay.each(new Array(2),function(m){if(!F.range&&0'+O.timeTips+""),(F.range||F.type!=="datetime"||F.fullPanel)&&j.push(''),lay.each(F.btns,function(m,h){var E=O.tools[h]||"btn";F.range&&h==="now"||(z&&h==="clear"&&(E=F.lang==="cn"?"重置":"Reset"),o.push(''+E+""))}),j.push('"),j.join(""))),F.shortcuts&&(ne.appendChild(oe),lay(oe).html((r=[],lay.each(F.shortcuts,function(m,h){r.push('
  • '+h.text+"
  • ")}),r.join(""))).find("li").on("click",function(m){var E=F.shortcuts[this.dataset.index]||{},E=(typeof E.value=="function"?E.value():E.value)||[],h=(layui.isArray(E)||(E=[E]),F.type),E=(lay.each(E,function(W,G){var B=[F.dateTime,w.endDate][W];h==="time"&&layui.type(G)!=="date"?w.EXP_IF.test(G)&&(G=(G.match(w.EXP_SPLIT)||[]).slice(1),lay.extend(B,{hours:0|G[0],minutes:0|G[2],seconds:0|G[4]})):lay.extend(B,w.systemDate(layui.type(G)==="date"?G:new Date(G))),h!=="time"&&h!=="datetime"||(w[["startTime","endTime"][W]]={hours:B.hours,minutes:B.minutes,seconds:B.seconds}),W===0?w.startDate=lay.extend({},B):w.endState=!0,h==="year"||h==="month"||h==="time"?w.listYM[W]=[B.year,B.month+1]:W&&w.autoCalendarModel.auto&&w.autoCalendarModel()}),w.checkDate("limit").calendar(null,null,"init"),lay(w.footer).find("."+P).removeClass(T));E&&E.attr("lay-type")==="date"&&E[0].click(),w.done(null,"change"),lay(this).addClass(I),F.position!=="static"&&w.setValue(w.parse()).done().remove()})),lay.each(te,function(m,h){ne.appendChild(h)}),F.showBottom&&ne.appendChild(L),lay.elem("style")),J=[],$=!0,oe=(lay.each(F.theme,function(m,h){$&&/^#/.test(h)?($=!(g=!0),J.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}",F.theme.indexOf("circle")!==-1?"":"#{{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,w.elemID).replace(/{{theme}}/g,h))):!$&&/^#/.test(h)&&J.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}","#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,w.elemID).replace(/{{theme}}/g,h))}),F.shortcuts&&F.range&&J.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g,w.elemID)),J.length&&(J=J.join(""),"styleSheet"in j?(j.setAttribute("type","text/css"),j.styleSheet.cssText=J):j.innerHTML=J,g&&lay(ne).addClass("laydate-theme-molv"),ne.appendChild(j)),w.remove(k.thisElemDate),d.thisId=F.id,z?F.elem.append(ne):(x.body.appendChild(ne),w.position()),F.shade?'
    ':"");ne.insertAdjacentHTML("beforebegin",oe),w.checkDate().calendar(null,0,"init"),w.changeEvent(),k.thisElemDate=w.elemID,w.renderAdditional(),typeof F.ready=="function"&&F.ready(lay.extend({},F.dateTime,{month:F.dateTime.month+1})),w.preview()},k.prototype.remove=function(c){var o=this,r=o.config,g=lay("#"+(c||o.elemID));return g[0]&&(g.hasClass(ee)||o.checkDate(function(){g.remove(),delete o.startDate,delete o.endDate,delete o.endState,delete o.startTime,delete o.endTime,delete d.thisId,typeof r.close=="function"&&r.close(o)}),lay("."+R).remove()),o},k.prototype.position=function(){var c=this.config;return lay.position(c.elem[0],this.elem,{position:c.position}),this},k.prototype.hint=function(c){var o=this,r=(o.config,lay.elem("div",{class:p}));o.elem&&(r.innerHTML=(c=typeof c=="object"?c||{}:{content:c}).content||"",lay(o.elem).find("."+p).remove(),o.elem.appendChild(r),clearTimeout(o.hinTimer),o.hinTimer=setTimeout(function(){lay(o.elem).find("."+p).remove()},"ms"in c?c.ms:3e3))},k.prototype.getAsYM=function(c,o,r){return r?o--:o++,o<0&&(o=11,c--),11_[1]&&(j.year=_[1],r=!0),11o)&&(j.date=o,r=!0)},L=function(j,J,$){var oe=["startTime","endTime"];J=(J.match(O.EXP_SPLIT)||[]).slice(1),$=$||0,z.range&&(O[oe[$]]=O[oe[$]]||{}),lay.each(O.format,function(m,h){var E=parseFloat(J[m]);J[m].lengthO.getDateTime(z.max)?(te=z.dateTime=lay.extend({},z.max),F=!0):O.getDateTime(te)O.getDateTime(z.max))&&(O.endDate=lay.extend({},z.max),F=!0),O.startTime={hours:z.dateTime.hours,minutes:z.dateTime.minutes,seconds:z.dateTime.seconds},O.endTime={hours:O.endDate.hours,minutes:O.endDate.minutes,seconds:O.endDate.seconds},z.type==="month")&&(z.dateTime.date=1,O.endDate.date=1),F&&D&&(O.setValue(O.parse()),O.hint("value "+ne.invalidDate+ne.formatError[1])),O.startDate=O.startDate||D&&lay.extend({},z.dateTime),O.autoCalendarModel.auto&&O.autoCalendarModel(),O.endState=!z.range||!O.rangeLinked||!(!O.startDate||!O.endDate),c&&c()),O},k.prototype.markRender=function(c,o,r){var g;typeof r=="object"?lay.each(r||{},function(w,F){w=w.split("-"),w[0]!=o[0]&&w[0]!=0||w[1]!=o[1]&&w[1]!=0||w[2]!=o[2]||(g=F||o[2])}):typeof r=="string"&&(g=r||o[2]),g&&c.find("div").html(''+g+"")},k.prototype.mark=function(c,o){var r=this,g=r.config,w=function(F){r.markRender(c,o,F)};return g.calendar&&g.lang==="cn"&&w(r.markerOfChineseFestivals),typeof g.mark=="function"?g.mark({year:o[0],month:o[1],date:o[2]},w):typeof g.mark=="object"&&w(g.mark),r},k.prototype.holidaysRender=function(c,o,r){var g=["holidays","workdays"],w=function(F,O,z){F.find("div").html(["",z,""].join(""))};layui.type(r)==="array"?lay.each(r,function(F,O){lay.each(O,function(z,ne){var te,re,D;ne=ne,te=c.attr("lay-ymd"),re=ne.split("-"),D=te.split("-"),lay.each(re,function(v,L){re[v]=parseInt(L,10)}),lay.each(D,function(v,L){D[v]=parseInt(L,10)}),re.join("-")===D.join("-")&&w(c,g[F],o[2])})}):typeof r=="string"&&g.indexOf(r)!==-1&&w(c,r,o[2])},k.prototype.holidays=function(c,o){var r=this,g=r.config,w=function(F){r.holidaysRender(c,o,F)};return typeof g.holidays=="function"?g.holidays({year:o[0],month:o[1],date:o[2]},w):layui.type(g.holidays)==="array"&&w(g.holidays),r},k.prototype.cellRender=function(c,o,r){var g=this.config;return typeof g.cellRender=="function"&&g.cellRender(o,function(w){typeof w=="string"?lay(c).html(w):typeof w=="object"&&lay(c).html("").append(lay(w)[0])},{originElem:c,type:r}),this},k.prototype.startOfYear=function(c){return c=new Date(c),c.setFullYear(c.getFullYear(),0,1),c.setHours(0,0,0,0),c},k.prototype.endOfYear=function(o){var o=new Date(o),r=o.getFullYear();return o.setFullYear(r+1,0,0),o.setHours(23,59,59,999),o},k.prototype.startOfMonth=function(c){return c=new Date(c),c.setDate(1),c.setHours(0,0,0,0),c},k.prototype.endOfMonth=function(o){var o=new Date(o),r=o.getMonth();return o.setFullYear(o.getFullYear(),r+1,0),o.setHours(23,59,59,999),o},k.prototype.addDays=function(c,o){return c=new Date(c),o&&c.setDate(c.getDate()+o),c},k.prototype.isDisabledYearOrMonth=function(c,o,r){for(var g=this,w=g.config,F=o==="year"?g.startOfYear(c):g.startOfMonth(c),o=o==="year"?g.endOfYear(c):g.endOfMonth(c),O=Math.floor((o.getTime()-F.getTime())/864e5)+1,z=0,ne=0;ne(c.time?0:41)?o.endDate:r.dateTime;return lay.each({now:lay.extend({},w,c.date||{}),min:r.min,max:r.max},function(F,O){var z;g[F]=o.newDate(lay.extend({year:O.year,month:c.type==="year"?0:O.month,date:c.type==="year"||c.type==="month"?1:O.date},(z={},lay.each(c.time,function(ne,te){z[te]=O[te]}),z))).getTime()}),w=g.now_[1]&&(ne.year=_[1],O.hint(re.invalidDate)),O.firstDate||(O.firstDate=lay.extend({},ne)),te.setFullYear(ne.year,ne.month,1),g=(te.getDay()+(7-z.weekStart))%7,w=d.getEndDate(ne.month||12,ne.year),F=d.getEndDate(ne.month+1,ne.year),lay.each(v,function(j,J){var $,oe=[ne.year,ne.month];(J=lay(J)).removeAttr("class"),j"+oe[2]+""),O.mark(J,oe).holidays(J,oe).limit({elem:J,date:{year:oe[0],month:oe[1]-1,date:oe[2]},index:j,rangeType:o,disabledType:"date"}),O.cellRender(J,{year:oe[0],month:oe[1],date:oe[2]},"date")}),lay(L[0]).attr("lay-ym",ne.year+"-"+(ne.month+1)),lay(L[1]).attr("lay-ym",ne.year+"-"+(ne.month+1)),O.panelYM||(O.panelYM={}),O.panelYM[o]={year:ne.year,month:ne.month},z.lang==="cn"?(lay(L[0]).attr("lay-type","year").html(ne.year+" 年"),lay(L[1]).attr("lay-type","month").html(ne.month+1+" 月")):(lay(L[0]).attr("lay-type","month").html(re.month[ne.month]),lay(L[1]).attr("lay-type","year").html(ne.year)),D&&(z.range?!c&&r==="init"||(O.listYM=[[(O.startDate||z.dateTime).year,(O.startDate||z.dateTime).month+1],[O.endDate.year,O.endDate.month+1]],O.list(z.type,0).list(z.type,1),z.type==="time"?O.setBtnStatus("时间",lay.extend({},O.systemDate(),O.startTime),lay.extend({},O.systemDate(),O.endTime)):O.setBtnStatus(!0)):(O.listYM=[[ne.year,ne.month+1]],O.list(z.type,0))),z.range&&r==="init"&&(O.rangeLinked?(te=O.getAsYM(ne.year,ne.month,o?"sub":null),O.calendar(lay.extend({},ne,{year:te[0],month:te[1]}),1-o)):O.calendar(null,1-o)),z.range||(v=["hours","minutes","seconds"],O.limit({elem:lay(O.footer).find(".laydate-btns-now"),date:O.systemDate(/^(datetime|time)$/.test(z.type)?new Date:null),index:0,time:v,disabledType:"datetime"}),O.limit({elem:lay(O.footer).find(f),index:0,time:v,disabledType:"datetime"})),O.setBtnStatus(),lay(O.shortcut).find("li."+I).removeClass(I),z.range&&!D&&r!=="init"&&O.stampRange(),O},k.prototype.list=function(c,o){var r,g,w,F,O,z,ne,te=this,re=te.config,D=te.rangeLinked?re.dateTime:[re.dateTime,te.endDate][o],v=te.lang(),L=re.range&&re.type!=="date"&&re.type!=="datetime",j=lay.elem("ul",{class:C+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[c]}),J=te.elemHeader[o],$=lay(J[2]).find("span"),oe=te.elemCont[o||0],m=lay(oe).find("."+C)[0],h=re.lang==="cn",E=h?"年":"",W=te.listYM[o]||{},G=["hours","minutes","seconds"],B=["startTime","endTime"][o];return W[0]<1&&(W[0]=1),c==="year"?(w=r=W[0]-7,r<1&&(w=r=1),lay.each(new Array(15),function(U){var q=lay.elem("li",{"lay-ym":r}),ae={year:r,month:0,date:1};r==W[0]&&lay(q).addClass(I),q.innerHTML=r+E,j.appendChild(q),te.limit({elem:lay(q),date:ae,index:o,type:c,rangeType:o,disabledType:"date"}),te.cellRender(q,{year:r,month:1,date:1},"year"),r++}),lay($[h?0:1]).attr("lay-ym",r-8+"-"+W[1]).html(w+E+" - "+(r-1)+E)):c==="month"?(lay.each(new Array(12),function(U){var q=lay.elem("li",{"lay-ym":U}),ae={year:W[0],month:U,date:1};U+1==W[1]&&lay(q).addClass(I),q.innerHTML=v.month[U]+(h?"月":""),j.appendChild(q),te.limit({elem:lay(q),date:ae,index:o,type:c,rangeType:o,disabledType:"date"}),te.cellRender(q,{year:W[0],month:U+1,date:1},"month")}),lay($[h?0:1]).attr("lay-ym",W[0]+"-"+W[1]).html(W[0]+E)):c==="time"&&(g=function(){lay(j).find("ol").each(function(U,q){lay(q).find("li").each(function(ae,le){te.limit({elem:lay(le),date:[{hours:ae},{hours:te[B].hours,minutes:ae},{hours:te[B].hours,minutes:te[B].minutes,seconds:ae}][U],index:o,rangeType:o,disabledType:"time",time:[["hours"],["hours","minutes"],["hours","minutes","seconds"]][U]})})}),re.range||te.limit({elem:lay(te.footer).find(f),date:te[B],index:0,time:["hours","minutes","seconds"],disabledType:"datetime"})},re.range?te[B]||(te[B]=B==="startTime"?D:te.endDate):te[B]=D,lay.each([24,60,60],function(U,q){var ae=lay.elem("li"),le=["

    "+v.time[U]+"

      "];lay.each(new Array(q),function(de){le.push(""+lay.digit(de,2)+"")}),ae.innerHTML=le.join("")+"
    ",j.appendChild(ae)}),g(),w=re.format.indexOf("H")!==-1,$=re.format.indexOf("m")!==-1,ne=re.format.indexOf("s")!==-1,F=j.children,O=0,lay.each([w,$,ne],function(U,q){q||(F[U].className+=" layui-hide",O++)}),j.className+=" laydate-time-list-hide-"+O),m&&oe.removeChild(m),oe.appendChild(j),c==="year"||c==="month"?(lay(te.elemMain[o]).addClass("laydate-ym-show"),lay(j).find("li").on("click",function(){var U,q,ae=0|lay(this).attr("lay-ym");lay(this).hasClass(T)||(te.rangeLinked?lay.extend(D,{year:c==="year"?ae:W[0],month:c==="year"?W[1]-1:ae}):D[c]=ae,U=["year","month"].indexOf(re.type)!==-1,q=c==="year"&&["date","datetime"].indexOf(re.type)!==-1,U||q?(lay(j).find("."+I).removeClass(I),lay(this).addClass(I),(re.type==="month"&&c==="year"||q)&&(te.listYM[o][0]=ae,L&&((o?te.endDate:D).year=ae),te.list("month",o))):(te.checkDate("limit").calendar(D,o,"init"),te.closeList()),re.range||te.limit({type:c,elem:lay(te.footer).find(f),date:D,disabledType:"datetime"}),te.setBtnStatus(),!re.range&&re.autoConfirm&&(re.type==="month"&&c==="month"||re.type==="year"&&c==="year")&&te.setValue(te.parse()).done().remove(),te.autoCalendarModel.auto&&!te.rangeLinked?te.choose(lay(oe).find("td.layui-this"),o):te.endState&&te.done(null,"change"),lay(te.footer).find("."+P).removeClass(T))})):($=lay.elem("span",{class:S}),z=function(){lay(j).find("ol").each(function(U){var q=this,ae=lay(q).find("li");q.scrollTop=30*(te[B][G[U]]-2),q.scrollTop<=0&&ae.each(function(le,de){if(!lay(this).hasClass(T))return q.scrollTop=30*(le-2),!0})})},ne=lay(J[2]).find("."+S),z(),$.innerHTML=re.range?[v.startTime,v.endTime][o]:v.timeTips,lay(te.elemMain[o]).addClass("laydate-time-show"),ne[0]&&ne.remove(),J[2].appendChild($),(m=lay(j).find("ol")).each(function(U){var q=this;lay(q).find("li").on("click",function(){var ae=0|this.innerHTML;lay(this).hasClass(T)||(re.range?te[B][G[U]]=ae:D[G[U]]=ae,lay(q).find("."+I).removeClass(I),lay(this).addClass(I),g(),z(),!te.endDate&&re.type!=="time"&&re.type!=="datetime"||te.done(null,"change"),te.setBtnStatus())})}),layui.device().mobile&&m.css({overflowY:"auto",touchAction:"pan-y"})),te},k.prototype.listYM=[],k.prototype.closeList=function(){var c=this;c.config,lay.each(c.elemCont,function(o,r){lay(this).find("."+C).remove(),lay(c.elemMain[o]).removeClass("laydate-ym-show laydate-time-show")}),lay(c.elem).find("."+S).remove()},k.prototype.setBtnStatus=function(c,o,r){var g=this,w=g.config,F=g.lang(),O=lay(g.footer).find(f),z=w.type==="datetime"||w.type==="time"?["hours","minutes","seconds"]:void 0;w.range&&(o=o||(g.rangeLinked?g.startDate:w.dateTime),r=r||g.endDate,w=!g.endState||g.newDate(o).getTime()>g.newDate(r).getTime(),g.limit({date:o,disabledType:"datetime",time:z,rangeType:0})||g.limit({date:r,disabledType:"datetime",time:z,rangeType:1})?O.addClass(T):O[w?"addClass":"removeClass"](T),c)&&w&&g.hint(typeof c=="string"?F.timeout.replace(/\u65e5\u671f/g,c):F.timeout)},k.prototype.parse=function(c,w){var r=this,g=r.config,F=r.rangeLinked?r.startDate:g.dateTime,w=w||(c=="end"?lay.extend({},r.endDate,r.endTime):g.range?lay.extend({},F||g.dateTime,r.startTime):g.dateTime),F=d.parse(w,r.format,1);return g.range&&c===void 0?F+" "+r.rangeStr+" "+r.parse("end"):F},k.prototype.newDate=function(c){return c=c||{},new Date(c.year||1,c.month||0,c.date||1,c.hours||0,c.minutes||0,c.seconds||0)},k.prototype.getDateTime=function(c){return this.newDate(c).getTime()},k.prototype.formatToDisplay=function(c,o){var r=this,g=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");Object.defineProperty(c,"value",lay.extend({},g,{get:function(){return this.getAttribute("lay-date")},set:function(w){g.set.call(this,o.call(r,w)),this.setAttribute("lay-date",w)}}))},k.prototype.setValue=function(c){var o,r=this,g=r.config,w=g.elem[0];return g.position!=="static"&&(c=c||"",r.isInput(w)?lay(w).val(c):(o=r.rangeElem)?(layui.type(c)!=="array"&&(c=c.split(" "+r.rangeStr+" ")),o[0].val(c[0]||""),o[1].val(c[1]||"")):(lay(w).find("*").length===0&&(o=typeof g.formatToDisplay=="function"?g.formatToDisplay(c):c,lay(w).html(o)),lay(w).attr("lay-date",c))),r},k.prototype.preview=function(){var c,o=this,r=o.config;r.isPreview&&(c=lay(o.elem).find("."+n),r=!r.range||(o.rangeLinked?o.endState:o.endDate)?o.parse():"",c.html(r),c.html())&&(c.css({color:"#16b777"}),setTimeout(function(){c.css({color:"#777"})},300))},k.prototype.renderAdditional=function(){this.config.fullPanel&&this.list("time",0)},k.prototype.stampRange=function(){var c,o=this,r=o.config,g=o.rangeLinked?o.startDate:r.dateTime,w=lay(o.elem).find("td");r.range&&!o.endState&&lay(o.footer).find(f).addClass(T),g=g&&o.newDate({year:g.year,month:g.month,date:g.date}).getTime(),c=o.endState&&o.endDate&&o.newDate({year:o.endDate.year,month:o.endDate.month,date:o.endDate.date}).getTime(),lay.each(w,function(F,O){var z=lay(O).attr("lay-ymd").split("-"),z=o.newDate({year:z[0],month:z[1]-1,date:z[2]}).getTime();r.rangeLinked&&!o.startDate&&z===o.newDate(o.systemDate()).getTime()&&lay(O).addClass(lay(O).hasClass(u)||lay(O).hasClass(s)?"":"laydate-day-now"),lay(O).removeClass(a+" "+I),z!==g&&z!==c||(o.rangeLinked||!o.rangeLinked&&(F<42?z===g:z===c))&&lay(O).addClass(lay(O).hasClass(u)||lay(O).hasClass(s)?a:I),gr.getDateTime(g.max)&&(r[re]={hours:g.max.hours,minutes:g.max.minutes,seconds:g.max.seconds},lay.extend(F,r[re])))}),o||(r.startDate=lay.extend({},F)),r.endState&&!r.limit({date:r.rangeLinked?r.startDate:r.thisDateTime(1-o),disabledType:"date"})&&(((O=r.endState&&r.autoCalendarModel.auto?r.autoCalendarModel():O)||r.rangeLinked&&r.endState)&&r.newDate(r.startDate)>r.newDate(r.endDate)&&(r.startDate.year===r.endDate.year&&r.startDate.month===r.endDate.month&&r.startDate.date===r.endDate.date&&(z=r.startTime,r.startTime=r.endTime,r.endTime=z),z=r.startDate,r.startDate=lay.extend({},r.endDate,r.startTime),g.dateTime=lay.extend({},r.startDate),r.endDate=lay.extend({},z,r.endTime)),O)&&(g.dateTime=lay.extend({},r.startDate)),r.rangeLinked?(c=r.checkPanelDate(F,w),z=lay.extend({},F),ne=O||c&&c.needFullRender?"init":null,c=c?c.index:w,r.calendar(z,c,ne)):r.calendar(null,o,O?"init":null),r.endState&&r.done(null,"change")):g.position==="static"?r.calendar().done().done(null,"change"):g.type==="date"?g.autoConfirm?r.setValue(r.parse()).done().remove():r.calendar().done(null,"change"):g.type==="datetime"&&r.calendar().done(null,"change"))},k.prototype.tool=function(c,o){var r=this,g=r.config,w=r.lang(),F=g.dateTime,O=g.position==="static",z={datetime:function(){lay(c).hasClass(T)||(r.list("time",0),g.range&&r.list("time",1),lay(c).attr("lay-type","date").html(r.lang().dateTips))},date:function(){r.closeList(),lay(c).attr("lay-type","datetime").html(r.lang().timeTips)},clear:function(){O&&(lay.extend(F,r.firstDate),r.calendar()),g.range&&(delete g.dateTime,delete r.endDate,delete r.startTime,delete r.endTime),r.setValue(""),r.done(null,"onClear").done(["",{},{}]).remove()},now:function(){var ne=new Date;if(lay(c).hasClass(T))return r.hint(w.tools.now+", "+w.invalidDate);lay.extend(F,r.systemDate(),{hours:ne.getHours(),minutes:ne.getMinutes(),seconds:ne.getSeconds()}),r.setValue(r.parse()),O&&r.calendar(),r.done(null,"onNow").done().remove()},confirm:function(){if(g.range){if(lay(c).hasClass(T))return(g.type==="time"?r.startTime&&r.endTime&&r.newDate(r.startTime)>r.newDate(r.endTime):r.startDate&&r.endDate&&r.newDate(lay.extend({},r.startDate,r.startTime||{}))>r.newDate(lay.extend({},r.endDate,r.endTime||{})))?r.hint(g.type==="time"?w.timeout.replace(/\u65e5\u671f/g,"时间"):w.timeout):r.hint(w.invalidDate)}else if(lay(c).hasClass(T))return r.hint(w.invalidDate);r.setValue(r.parse()),r.done(null,"onConfirm").done().remove()}};z[o]&&z[o]()},k.prototype.change=function(c){var o=this,r=o.config,g=o.thisDateTime(c),w=r.range&&(r.type==="year"||r.type==="month"),F=o.elemCont[c||0],O=o.listYM[c],z=function(ne){var te=lay(F).find(".laydate-year-list")[0],re=lay(F).find(".laydate-month-list")[0];return te&&(O[0]=ne?O[0]-15:O[0]+15,o.list("year",c)),re&&(ne?O[0]--:O[0]++,o.list("month",c)),(te||re)&&(lay.extend(g,{year:O[0]}),w&&(g.year=O[0]),r.range||o.done(null,"change"),r.range||o.limit({elem:lay(o.footer).find(f),date:{year:O[0],month:te?0:O[1]-1},disabledType:"datetime"})),o.setBtnStatus(),te||re};return{prevYear:function(){z("sub")||(o.rangeLinked?(r.dateTime.year--,o.checkDate("limit").calendar(null,null,"init")):(g.year--,o.checkDate("limit").calendar(null,c),o.autoCalendarModel.auto?o.choose(lay(F).find("td.layui-this"),c):o.done(null,"change")))},prevMonth:function(){var ne,te;o.rangeLinked?(te=o.panelYM[0],te=o.getAsYM(te.year,te.month,"sub"),ne=lay.extend({},r.dateTime,o.panelYM[0],{year:te[0],month:te[1]}),o.checkDate("limit").calendar(ne,null,"init")):(te=o.getAsYM(g.year,g.month,"sub"),lay.extend(g,{year:te[0],month:te[1]}),o.checkDate("limit").calendar(null,null,"init"),o.autoCalendarModel.auto?o.choose(lay(F).find("td.layui-this"),c):o.done(null,"change"))},nextMonth:function(){var ne,te;o.rangeLinked?(te=o.panelYM[0],te=o.getAsYM(te.year,te.month),ne=lay.extend({},r.dateTime,o.panelYM[0],{year:te[0],month:te[1]}),o.checkDate("limit").calendar(ne,null,"init")):(te=o.getAsYM(g.year,g.month),lay.extend(g,{year:te[0],month:te[1]}),o.checkDate("limit").calendar(null,null,"init"),o.autoCalendarModel.auto?o.choose(lay(F).find("td.layui-this"),c):o.done(null,"change"))},nextYear:function(){z()||(o.rangeLinked?(r.dateTime.year++,o.checkDate("limit").calendar(null,0,"init")):(g.year++,o.checkDate("limit").calendar(null,c),o.autoCalendarModel.auto?o.choose(lay(F).find("td.layui-this"),c):o.done(null,"change")))}}},k.prototype.changeEvent=function(){var c=this;c.config,lay(c.elem).on("click",function(o){lay.stope(o)}).on("mousedown",function(o){lay.stope(o)}),lay.each(c.elemHeader,function(o,r){lay(r[0]).on("click",function(g){c.change(o).prevYear()}),lay(r[1]).on("click",function(g){c.change(o).prevMonth()}),lay(r[2]).find("span").on("click",function(g){var F=lay(this),w=F.attr("lay-ym"),F=F.attr("lay-type");w&&(w=w.split("-"),c.listYM[o]=[0|w[0],0|w[1]],c.list(F,o),lay(c.footer).find("."+P).addClass(T))}),lay(r[3]).on("click",function(g){c.change(o).nextMonth()}),lay(r[4]).on("click",function(g){c.change(o).nextYear()})}),lay.each(c.table,function(o,r){lay(r).find("td").on("click",function(){c.choose(lay(this),o)})}),lay(c.footer).find("span").on("click",function(){var o=lay(this).attr("lay-type");c.tool(this,o)})},k.prototype.isInput=function(c){return/input|textarea/.test(c.tagName.toLocaleLowerCase())||/INPUT|TEXTAREA/.test(c.tagName)},k.prototype.events=function(){var c,o=this,r=o.config;r.elem[0]&&!r.elem[0].eventHandler&&(r.elem.on(r.trigger,c=function(){d.thisId!==r.id&&o.render()}),r.elem[0].eventHandler=!0,r.eventElem.on(r.trigger,c),o.unbind=function(){o.remove(),r.elem.off(r.trigger,c),r.elem.removeAttr("lay-key"),r.elem.removeAttr(y),r.elem[0].eventHandler=!1,r.eventElem.off(r.trigger,c),r.eventElem.removeAttr("lay-key"),delete A.that[r.id]})},A.that={},A.getThis=function(c){var o=A.that[c];return!o&&Q&&layui.hint().error(c?M+" instance with ID '"+c+"' not found":"ID argument required"),o},K.run=function(c){c(x).on("mousedown",function(o){var r,g;d.thisId&&(r=A.getThis(d.thisId))&&(g=r.config,o.target===g.elem[0]||o.target===g.eventElem[0]||o.target===c(g.closeStop)[0]||g.elem[0]&&g.elem[0].contains(o.target)||r.remove())}).on("keydown",function(o){var r;d.thisId&&(r=A.getThis(d.thisId))&&r.config.position!=="static"&&o.keyCode===13&&c("#"+r.elemID)[0]&&r.elemID===k.thisElemDate&&(o.preventDefault(),c(r.footer).find(f)[0].click())}),c(he).on("resize",function(){if(d.thisId){var o=A.getThis(d.thisId);if(o)return!(!o.elem||!c(".layui-laydate")[0])&&void o.position()}})},d.render=function(c){return c=new k(c),A.call(c)},d.reload=function(c,o){if(c=A.getThis(c),c)return c.reload(o)},d.getInst=function(c){if(c=A.getThis(c),c)return c.inst},d.hint=function(c,o){if(c=A.getThis(c),c)return c.hint(o)},d.unbind=function(c){if(c=A.getThis(c),c)return c.unbind()},d.close=function(c){if(c=A.getThis(c||d.thisId),c)return c.remove()},d.parse=function(c,o,r){return c=c||{},o=((o=typeof o=="string"?A.formatArr(o):o)||[]).concat(),lay.each(o,function(g,w){/yyyy|y/.test(w)?o[g]=lay.digit(c.year,w.length):/MM|M/.test(w)?o[g]=lay.digit(c.month+(r||0),w.length):/dd|d/.test(w)?o[g]=lay.digit(c.date,w.length):/HH|H/.test(w)?o[g]=lay.digit(c.hours,w.length):/mm|m/.test(w)?o[g]=lay.digit(c.minutes,w.length):/ss|s/.test(w)&&(o[g]=lay.digit(c.seconds,w.length))}),o.join("")},d.getEndDate=function(c,o){var r=new Date;return r.setFullYear(o||r.getFullYear(),c||r.getMonth()+1,1),new Date(r.getTime()-864e5).getDate()},Q?(d.ready(),layui.define("lay",function(c){d.path=layui.cache.dir,K.run(lay),c(M,d)})):typeof define=="function"&&define.amd?define(function(){return K.run(lay),d}):(d.ready(),K.run(he.lay),he.laydate=d)})(window,window.document),(function(he,x){"use strict";typeof module=="object"&&typeof module.exports=="object"?module.exports=he.document?x(he):function(Q){if(Q.document)return x(Q);throw new Error("jQuery requires a window with a document")}:x(he)})(typeof window!="undefined"?window:this,function(he,x){"use strict";var Q=[],K=Object.getPrototypeOf,Y=Q.slice,M=Q.flat?function(e){return Q.flat.call(e)}:function(e){return Q.concat.apply([],e)},y=Q.push,d=Q.indexOf,A={},I=A.toString,T=A.hasOwnProperty,_=T.toString,ee=_.call(Object),C={},a=function(t){return typeof t=="function"&&typeof t.nodeType!="number"&&typeof t.item!="function"},p=function(t){return t!=null&&t===t.window},u=he.document,s={type:!0,src:!0,nonce:!0,noModule:!0};function f(e,t,i){var l,b,N=(i=i||u).createElement("script");if(N.text=e,t)for(l in s)(b=t[l]||t.getAttribute&&t.getAttribute(l))&&N.setAttribute(l,b);i.head.appendChild(N).parentNode.removeChild(N)}function S(e){return e==null?e+"":typeof e=="object"||typeof e=="function"?A[I.call(e)]||"object":typeof e}var $e="3.7.1",P=/HTML$/i,n=function(e,t){return new n.fn.init(e,t)};function R(e){var t=!!e&&"length"in e&&e.length,i=S(e);return!a(e)&&!p(e)&&(i==="array"||t===0||typeof t=="number"&&0+~]|"+r+")"+r+"*"),pe=new RegExp(r+"|>"),ue=new RegExp(ce),fe=new RegExp("^"+$e+"$"),Ce={ID:new RegExp("^#("+$e+")"),CLASS:new RegExp("^\\.("+$e+")"),TAG:new RegExp("^("+$e+"|[*])"),ATTR:new RegExp("^"+de),PSEUDO:new RegExp("^"+ce),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+le+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},De=/^(?:input|select|textarea|button)$/i,Se=/^h\d$/i,ke=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Le=/[+~]/,Ie=new RegExp("\\\\[\\da-fA-F]{1,6}"+r+"?|\\\\([^\\r\\n\\f])","g"),Re=function(e,t){return e="0x"+e.slice(1)-65536,t||(e<0?String.fromCharCode(65536+e):String.fromCharCode(e>>10|55296,1023&e|56320))},qe=function(){ot()},We=jt(function(e){return e.disabled===!0&&k(e,"fieldset")},{dir:"parentNode",next:"legend"});try{m.apply(Q=Y.call($.childNodes),$.childNodes),Q[$.childNodes.length].nodeType}catch(e){m={apply:function(t,i){oe.apply(t,Y.call(i))},call:function(t){oe.apply(t,Y.call(arguments,1))}}}function je(e,t,i,l){var b,N,H,V,Z,se,ie=t&&t.ownerDocument,me=t?t.nodeType:9;if(i=i||[],typeof e!="string"||!e||me!==1&&me!==9&&me!==11)return i;if(!l&&(ot(t),t=t||D,L)){if(me!==11&&(V=ke.exec(e)))if(b=V[1]){if(me===9){if(!(se=t.getElementById(b)))return i;if(se.id===b)return m.call(i,se),i}else if(ie&&(se=ie.getElementById(b))&&je.contains(t,se)&&se.id===b)return m.call(i,se),i}else{if(V[2])return m.apply(i,t.getElementsByTagName(e)),i;if((b=V[3])&&t.getElementsByClassName)return m.apply(i,t.getElementsByClassName(b)),i}if(!(q[e+" "]||j&&j.test(e))){if(se=e,ie=t,me===1&&(pe.test(e)||ve.test(e))){for((ie=Le.test(e)&&Vt(t.parentNode)||t)==t&&C.scope||((H=t.getAttribute("id"))?H=n.escapeSelector(H):t.setAttribute("id",H=h)),N=(Z=kt(e)).length;N--;)Z[N]=(H?"#"+H:":scope")+" "+_t(Z[N]);se=Z.join(",")}try{return m.apply(i,ie.querySelectorAll(se)),i}catch(xe){q(e,!0)}finally{H===h&&t.removeAttribute("id")}}}return xn(e.replace(g,"$1"),t,i,l)}function Be(){var e=[];function t(i,l){return e.push(i+" ")>z.cacheLength&&delete t[e.shift()],t[i+" "]=l}return t}function Fe(e){return e[h]=!0,e}function ft(e){var t=D.createElement("fieldset");try{return!!e(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function gn(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&We(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function st(e){return Fe(function(t){return t=+t,Fe(function(i,l){for(var b,N=e([],i.length,t),H=N.length;H--;)i[b=N[H]]&&(i[b]=!(l[b]=i[b]))})})}function Vt(e){return e&&typeof e.getElementsByTagName!="undefined"&&e}function ot(t){var t=t?t.ownerDocument||t:$;return t!=D&&t.nodeType===9&&t.documentElement&&(v=(D=t).documentElement,L=!n.isXMLDoc(D),J=v.matches||v.webkitMatchesSelector||v.msMatchesSelector,v.msMatchesSelector&&$!=D&&(t=D.defaultView)&&t.top!==t&&t.addEventListener("unload",qe),C.getById=ft(function(i){return v.appendChild(i).id=n.expando,!D.getElementsByName||!D.getElementsByName(n.expando).length}),C.disconnectedMatch=ft(function(i){return J.call(i,"*")}),C.scope=ft(function(){return D.querySelectorAll(":scope")}),C.cssHas=ft(function(){try{D.querySelector(":has(*,:jqfake)")}catch(i){return 1}}),C.getById?(z.filter.ID=function(i){var l=i.replace(Ie,Re);return function(b){return b.getAttribute("id")===l}},z.find.ID=function(i,l){if(typeof l.getElementById!="undefined"&&L)return(i=l.getElementById(i))?[i]:[]}):(z.filter.ID=function(i){var l=i.replace(Ie,Re);return function(b){return b=typeof b.getAttributeNode!="undefined"&&b.getAttributeNode("id"),b&&b.value===l}},z.find.ID=function(i,l){if(typeof l.getElementById!="undefined"&&L){var b,N,H,V=l.getElementById(i);if(V){if((b=V.getAttributeNode("id"))&&b.value===i)return[V];for(H=l.getElementsByName(i),N=0;V=H[N++];)if((b=V.getAttributeNode("id"))&&b.value===i)return[V]}return[]}}),z.find.TAG=function(i,l){return typeof l.getElementsByTagName!="undefined"?l.getElementsByTagName(i):l.querySelectorAll(i)},z.find.CLASS=function(i,l){if(typeof l.getElementsByClassName!="undefined"&&L)return l.getElementsByClassName(i)},j=[],ft(function(i){var l;v.appendChild(i).innerHTML="",i.querySelectorAll("[selected]").length||j.push("\\["+r+"*(?:value|"+le+")"),i.querySelectorAll("[id~="+h+"-]").length||j.push("~="),i.querySelectorAll("a#"+h+"+*").length||j.push(".#.+[+~]"),i.querySelectorAll(":checked").length||j.push(":checked"),(l=D.createElement("input")).setAttribute("type","hidden"),i.appendChild(l).setAttribute("name","D"),v.appendChild(i).disabled=!0,i.querySelectorAll(":disabled").length!==2&&j.push(":enabled",":disabled"),(l=D.createElement("input")).setAttribute("name",""),i.appendChild(l),i.querySelectorAll("[name='']").length||j.push("\\["+r+"*name"+r+"*="+r+`*(?:''|"")`)}),C.cssHas||j.push(":has"),j=j.length&&new RegExp(j.join("|")),ae=function(i,l){var b;return i===l?(re=!0,0):(b=!i.compareDocumentPosition-!l.compareDocumentPosition)||(1&(b=(i.ownerDocument||i)==(l.ownerDocument||l)?i.compareDocumentPosition(l):1)||!C.sortDetached&&l.compareDocumentPosition(i)===b?i===D||i.ownerDocument==$&&je.contains($,i)?-1:l===D||l.ownerDocument==$&&je.contains($,l)?1:te?d.call(te,i)-d.call(te,l):0:4&b?-1:1)}),D}for(O in je.matches=function(e,t){return je(e,null,null,t)},je.matchesSelector=function(e,t){if(ot(e),L&&!q[t+" "]&&(!j||!j.test(t)))try{var i=J.call(e,t);if(i||C.disconnectedMatch||e.document&&e.document.nodeType!==11)return i}catch(l){q(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(Ie,Re),e[3]=(e[3]||e[4]||e[5]||"").replace(Ie,Re),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||je.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&je.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return Ce.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&ue.test(i)&&(t=(t=kt(i,!0))&&i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ie,Re).toLowerCase();return e==="*"?function(){return!0}:function(i){return k(i,t)}},CLASS:function(e){var t=G[e+" "];return t||(t=new RegExp("(^|"+r+")"+e+"("+r+"|$)"))&&G(e,function(i){return t.test(typeof i.className=="string"&&i.className||typeof i.getAttribute!="undefined"&&i.getAttribute("class")||"")})},ATTR:function(e,t,i){return function(l){return l=je.attr(l,e),l==null?t==="!=":!t||(l+="",t==="="?l===i:t==="!="?l!==i:t==="^="?i&&l.indexOf(i)===0:t==="*="?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Jt(e,t,i){return a(t)?n.grep(e,function(l,b){return!!t.call(l,b,l)!==i}):t.nodeType?n.grep(e,function(l){return l===t!==i}):typeof t!="string"?n.grep(e,function(l){return-1)[^>]*|#([\w-]+))$/,si=((n.fn.init=function(e,t,i){if(e){if(i=i||kn,typeof e!="string")return e.nodeType?(this[0]=e,this.length=1,this):a(e)?i.ready!==void 0?i.ready(e):e(n):n.makeArray(e,this);if(!(l=e[0]==="<"&&e[e.length-1]===">"&&3<=e.length?[null,e,null]:li.exec(e))||!l[1]&&t)return(!t||t.jquery?t||i:this.constructor(t)).find(e);if(l[1]){if(t=t instanceof n?t[0]:t,n.merge(this,n.parseHTML(l[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),wn.test(l[1])&&n.isPlainObject(t))for(var l in t)a(this[l])?this[l](t[l]):this.attr(l,t[l])}else(i=u.getElementById(l[2]))&&(this[0]=i,this.length=1)}return this}).prototype=n.fn,kn=n(u),/^(?:parents|prev(?:Until|All))/),ci={children:!0,contents:!0,next:!0,prev:!0};function Tn(e,t){for(;(e=e[t])&&e.nodeType!==1;);return e}n.fn.extend({has:function(e){var t=n(e,this),i=t.length;return this.filter(function(){for(var l=0;l\x20\t\r\n\f]*)/i,An=/^$|^module$|\/(?:java|ecma)script/i,Ue=(de=u.createDocumentFragment().appendChild(u.createElement("div")),(ce=u.createElement("input")).setAttribute("type","radio"),ce.setAttribute("checked","checked"),ce.setAttribute("name","t"),de.appendChild(ce),C.checkClone=de.cloneNode(!0).cloneNode(!0).lastChild.checked,de.innerHTML="",C.noCloneChecked=!!de.cloneNode(!0).lastChild.defaultValue,de.innerHTML="",C.option=!!de.lastChild,{thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]});function Ve(e,t){var i=typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll(t||"*"):[];return t===void 0||t&&k(e,t)?n.merge([e],i):i}function Qt(e,t){for(var i=0,l=e.length;i",""]);var gi=/<|&#?\w+;/;function Ln(e,t,i,l,b){for(var N,H,V,Z,se,ie=t.createDocumentFragment(),me=[],xe=0,ge=e.length;xe\s*$/g;function _n(e,t){return k(e,"table")&&k(t.nodeType!==11?t:t.firstChild,"tr")&&n(e).children("tbody")[0]||e}function Ci(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function wi(e){return(e.type||"").slice(0,5)==="true/"?e.type=e.type.slice(5):e.removeAttribute("type"),e}function jn(e,t){var i,l,b,N;if(t.nodeType===1){if(Ne.hasData(e)&&(N=Ne.get(e).events))for(b in Ne.remove(t,"handle events"),N)for(i=0,l=N[b].length;i").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(N){t.remove(),i=null,N&&b(N.type==="error"?404:200,N.type)}),u.head.appendChild(t[0])},abort:function(){i&&i()}}}),[]),pn=/(=)\?(?=&|$)|\?\?/,Wi=(n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ri.pop()||n.expando+"_"+Zn.guid++;return this[e]=!0,e}}),n.ajaxPrefilter("json jsonp",function(e,t,i){var l,b,N,H=e.jsonp!==!1&&(pn.test(e.url)?"url":typeof e.data=="string"&&(e.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&pn.test(e.data)&&"data");if(H||e.dataTypes[0]==="jsonp")return l=e.jsonpCallback=a(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,H?e[H]=e[H].replace(pn,"$1"+l):e.jsonp!==!1&&(e.url+=(cn.test(e.url)?"&":"?")+e.jsonp+"="+l),e.converters["script json"]=function(){return N||n.error(l+" was not called"),N[0]},e.dataTypes[0]="json",b=he[l],he[l]=function(){N=arguments},i.always(function(){b===void 0?n(he).removeProp(l):he[l]=b,e[l]&&(e.jsonpCallback=t.jsonpCallback,ri.push(l)),N&&a(b)&&b(N[0]),N=b=void 0}),"script"}),C.createHTMLDocument=(($e=u.implementation.createHTMLDocument("").body).innerHTML="
    ",$e.childNodes.length===2),n.parseHTML=function(e,t,i){var l;return typeof e!="string"?[]:(typeof t=="boolean"&&(i=t,t=!1),t||(C.createHTMLDocument?((l=(t=u.implementation.createHTMLDocument("")).createElement("base")).href=u.location.href,t.head.appendChild(l)):t=u),l=!i&&[],(i=wn.exec(e))?[t.createElement(i[1])]:(i=Ln([e],t,l),l&&l.length&&n(l).remove(),n.merge([],i.childNodes)))},n.fn.load=function(e,t,i){var l,b,N,H=this,V=e.indexOf(" ");return-1").append(n.parseHTML(Z)).find(l):Z)}).always(i&&function(Z,se){H.each(function(){i.apply(this,N||[Z.responseText,se,Z])})}),this},n.expr.pseudos.animated=function(e){return n.grep(n.timers,function(t){return e===t.elem}).length},n.offset={setOffset:function(e,t,i){var l,b,N,H,V=n.css(e,"position"),Z=n(e),se={};V==="static"&&(e.style.position="relative"),N=Z.offset(),l=n.css(e,"top"),H=n.css(e,"left"),V=(V==="absolute"||V==="fixed")&&-1<(l+H).indexOf("auto")?(b=(V=Z.position()).top,V.left):(b=parseFloat(l)||0,parseFloat(H)||0),(t=a(t)?t.call(e,i,n.extend({},N)):t).top!=null&&(se.top=t.top-N.top+b),t.left!=null&&(se.left=t.left-N.left+V),"using"in t?t.using.call(e,se):Z.css(se)}},n.fn.extend({offset:function(e){var t,i;return arguments.length?e===void 0?this:this.each(function(l){n.offset.setOffset(this,e,l)}):(i=this[0])?i.getClientRects().length?(t=i.getBoundingClientRect(),i=i.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,l=this[0],b={top:0,left:0};if(n.css(l,"position")==="fixed")t=l.getBoundingClientRect();else{for(t=this.offset(),i=l.ownerDocument,e=l.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&n.css(e,"position")==="static";)e=e.parentNode;e&&e!==l&&e.nodeType===1&&((b=n(e).offset()).top+=n.css(e,"borderTopWidth",!0),b.left+=n.css(e,"borderLeftWidth",!0))}return{top:t.top-b.top-n.css(l,"marginTop",!0),left:t.left-b.left-n.css(l,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&n.css(e,"position")==="static";)e=e.offsetParent;return e||ct})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var i=t==="pageYOffset";n.fn[e]=function(l){return tt(this,function(b,N,H){var V;if(p(b)?V=b:b.nodeType===9&&(V=b.defaultView),H===void 0)return V?V[t]:b[N];V?V.scrollTo(i?V.pageXOffset:H,i?H:V.pageYOffset):b[N]=H},e,l,arguments.length)}}),n.each(["top","left"],function(e,t){n.cssHooks[t]=Wn(C.pixelPosition,function(i,l){if(l)return l=It(i,t),nn.test(l)?n(i).position()[t]+"px":l})}),n.each({Height:"height",Width:"width"},function(e,t){n.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,l){n.fn[l]=function(b,N){var H=arguments.length&&(i||typeof b!="boolean"),V=i||(b===!0||N===!0?"margin":"border");return tt(this,function(Z,se,ie){var me;return p(Z)?l.indexOf("outer")===0?Z["inner"+e]:Z.document.documentElement["client"+e]:Z.nodeType===9?(me=Z.documentElement,Math.max(Z.body["scroll"+e],me["scroll"+e],Z.body["offset"+e],me["offset"+e],me["client"+e])):ie===void 0?n.css(Z,se,V):n.style(Z,se,ie,V)},t,H?b:void 0,H)}})}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){n.fn[t]=function(i){return this.on(t,i)}}),n.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,l){return this.on(t,e,i,l)},undelegate:function(e,t,i){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),n.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,t){n.fn[t]=function(i,l){return 0'+(n?f.title[0]:f.title)+""+(f.title1?n?f.title1[0]:f.title1:"")+"":"";return f.zIndex=S,p([f.shade?'
    ':"",'
    '+(a&&f.type!=2?"":n)+"'+(s=["layui-icon-tips","layui-icon-success","layui-icon-error","layui-icon-question","layui-icon-lock","layui-icon-face-cry","layui-icon-face-smile"],S="layui-anim layui-anim-rotate layui-anim-loop",f.type==0&&f.icon!==-1?'':f.type==3?(u=["layui-icon-loading","layui-icon-loading-1"],f.icon==2?'
    ':''):"")+((f.type!=1||!a)&&f.content||"")+'
    '+(s=[],P&&(s.push(''),s.push('')),f.closeBtn&&s.push(''),s.join(""))+"
    "+(f.btn?(function(){var R="";typeof f.btn=="string"&&(f.btn=[f.btn]);for(var k,X=0,c=f.btn.length;X'+f.btn[X]+"";return'
    '+R+"
    "})():"")+(f.resize?'':"")+""],n,Q('
    ')),this},A.pt.creat=function(){var a,p,u,s,f=this,S=f.config,P=f.index,n=typeof(X=S.content)=="object",R=Q("body"),k=function(c){var o;S.shift&&(S.anim=S.shift),I.anim[S.anim]&&(o="layer-anim "+I.anim[S.anim],c.addClass(o).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){Q(this).removeClass(o)}))};if(S.id&&Q("."+I[0]).find("#"+S.id)[0])a=Q("#"+S.id).closest("."+I[0]),p=a.attr("times"),u=a.data("config"),s=Q("#"+I.SHADE+p),(a.data("maxminStatus")||{})==="min"?d.restore(p):u.hideOnClose&&(s.show(),a.show(),k(a),setTimeout(function(){s.css({opacity:s.data(T)})},10));else{switch(S.removeFocus&&document.activeElement&&document.activeElement.blur(),typeof S.area=="string"&&(S.area=S.area==="auto"?["",""]:[S.area,""]),d.ie==6&&(S.fixed=!1),S.type){case 0:S.btn="btn"in S?S.btn:y.btn[0],d.closeAll("dialog");break;case 2:var X=S.content=n?S.content:[S.content||"","auto"];S.content='';break;case 3:delete S.title,delete S.closeBtn,S.icon===-1&&S.icon,d.closeAll("loading");break;case 4:n||(S.content=[S.content,"body"]),S.follow=S.content[1],S.content=S.content[0]+'',delete S.title,S.tips=typeof S.tips=="object"?S.tips:[S.tips,!0],S.tipsMore||d.closeAll("tips")}f.vessel(n,function(c,o,r){R.append(c[0]),n?S.type==2||S.type==4?Q("body").append(c[1]):X.parents("."+I[0])[0]||(X.data("display",X.css("display")).show().addClass("layui-layer-wrap").wrap(c[1]),Q("#"+I[0]+P).find("."+I[5]).before(o)):R.append(c[1]),Q("#"+I.MOVE)[0]||R.append(y.moveElem=r),f.layero=Q("#"+I[0]+P),f.shadeo=Q("#"+I.SHADE+P),S.scrollbar||y.setScrollbar(P)}).auto(P),f.shadeo.css({"background-color":S.shade[1]||"#000",opacity:S.shade[0]||S.shade,transition:S.shade[2]||""}),f.shadeo.data(T,S.shade[0]||S.shade),S.type==2&&d.ie==6&&f.layero.find("iframe").attr("src",X[0]),S.type==4?f.tips():(f.offset(),parseInt(y.getStyle(document.getElementById(I.MOVE),"z-index"))||(f.layero.css("visibility","hidden"),d.ready(function(){f.offset(),f.layero.css("visibility","visible")}))),!S.fixed||y.events.resize[f.index]||(y.events.resize[f.index]=function(){f.resize()},K.on("resize",y.events.resize[f.index])),f.layero.data("config",S),S.time<=0||setTimeout(function(){d.close(f.index)},S.time),f.move().callback(),k(f.layero)}},A.pt.resize=function(){var a=this,p=a.config;a.offset(),(/^\d+%$/.test(p.area[0])||/^\d+%$/.test(p.area[1]))&&a.auto(a.index),p.type==4&&a.tips()},A.pt.auto=function(P){var p=this.config,u=Q("#"+I[0]+P),s=((p.area[0]===""||p.area[0]==="auto")&&0p.maxWidth)&&u.width(p.maxWidth),[u.innerWidth(),u.innerHeight()]),f=u.find(I[1]).outerHeight()||0,S=u.find("."+I[6]).outerHeight()||0,P=function(n){(n=u.find(n)).height(s[1]-f-S-2*(0|parseFloat(n.css("padding-top"))))};return p.type===2?P("iframe"):p.area[1]===""||p.area[1]==="auto"?0p.maxHeight?(s[1]=p.maxHeight,P("."+I[5])):p.fixed&&s[1]>=K.height()&&(s[1]=K.height(),P("."+I[5])):P("."+I[5]),this},A.pt.offset=function(){var a=this,p=a.config,u=a.layero,s=[u.outerWidth(),u.outerHeight()],f=typeof p.offset=="object";a.offsetTop=(K.height()-s[1])/2,a.offsetLeft=(K.width()-s[0])/2,f?(a.offsetTop=p.offset[0],a.offsetLeft=p.offset[1]||a.offsetLeft):p.offset!=="auto"&&(p.offset==="t"?a.offsetTop=0:p.offset==="r"?a.offsetLeft=K.width()-s[0]:p.offset==="b"?a.offsetTop=K.height()-s[1]:p.offset==="l"?a.offsetLeft=0:p.offset==="lt"?(a.offsetTop=0,a.offsetLeft=0):p.offset==="lb"?(a.offsetTop=K.height()-s[1],a.offsetLeft=0):p.offset==="rt"?(a.offsetTop=0,a.offsetLeft=K.width()-s[0]):p.offset==="rb"?(a.offsetTop=K.height()-s[1],a.offsetLeft=K.width()-s[0]):a.offsetTop=p.offset),p.fixed||(a.offsetTop=/%$/.test(a.offsetTop)?K.height()*parseFloat(a.offsetTop)/100:parseFloat(a.offsetTop),a.offsetLeft=/%$/.test(a.offsetLeft)?K.width()*parseFloat(a.offsetLeft)/100:parseFloat(a.offsetLeft),a.offsetTop+=K.scrollTop(),a.offsetLeft+=K.scrollLeft()),u.data("maxminStatus")==="min"&&(a.offsetTop=K.height()-(u.find(I[1]).outerHeight()||0),a.offsetLeft=u.css("left")),u.css({top:a.offsetTop,left:a.offsetLeft})},A.pt.tips=function(){var a=this.config,p=this.layero,u=[p.outerWidth(),p.outerHeight()],S=Q(a.follow),s={width:(S=S[0]?S:Q("body")).outerWidth(),height:S.outerHeight(),top:S.offset().top,left:S.offset().left},f=p.find(".layui-layer-TipsG"),S=a.tips[0];a.tips[1]||f.remove(),s.autoLeft=function(){0'):a.removeClass("layui-layer-btn-is-loading").removeAttr("disabled").find(".layui-layer-btn-loading-icon").remove()},A.pt.callback=function(){var a=this,p=a.layero,u=a.config;a.openLayer(),u.success&&(u.type==2?p.find("iframe").on("load",function(){u.success(p,a.index,a)}):u.success(p,a.index,a)),d.ie==6&&a.IE6(p),p.find("."+I[6]).children("a").on("click",function(){var s,f=Q(this),S=f.index();f.attr("disabled")||(u.btnAsync?(s=S===0?u.yes||u.btn1:u["btn"+(S+1)],a.loading=function(P){a.btnLoading(f,P)},s?y.promiseLikeResolve(s.call(u,a.index,p,a)).then(function(P){P!==!1&&d.close(a.index)},function(P){P!==x&&he.console&&he.console.error("layer error hint: "+P)}):d.close(a.index)):S===0?u.yes?u.yes(a.index,p,a):u.btn1?u.btn1(a.index,p,a):d.close(a.index):(u["btn"+(S+1)]&&u["btn"+(S+1)](a.index,p,a))!==!1&&d.close(a.index))}),p.find("."+I[7]).on("click",function(){(u.cancel&&u.cancel(a.index,p,a))!==!1&&d.close(a.index)}),u.shadeClose&&a.shadeo.on("click",function(){d.close(a.index)}),p.find(".layui-layer-min").on("click",function(){(u.min&&u.min(p,a.index,a))!==!1&&d.min(a.index,u)}),p.find(".layui-layer-max").on("click",function(){Q(this).hasClass("layui-layer-maxmin")?(d.restore(a.index),u.restore&&u.restore(p,a.index,a)):(d.full(a.index,u),setTimeout(function(){u.full&&u.full(p,a.index,a)},100))}),u.end&&(y.end[a.index]=u.end),u.beforeEnd&&(y.beforeEnd[a.index]=Q.proxy(u.beforeEnd,u,p,a.index,a))},y.reselect=function(){Q.each(Q("select"),function(a,p){var u=Q(this);u.parents("."+I[0])[0]||u.attr("layer")==1&&Q("."+I[0]).length<1&&u.removeAttr("layer").show()})},A.pt.IE6=function(a){Q("select").each(function(p,u){var s=Q(this);s.parents("."+I[0])[0]||s.css("display")!=="none"&&s.attr({layer:"1"}).hide()})},A.pt.openLayer=function(){d.zIndex=this.config.zIndex,d.setTop=function(a){return d.zIndex=parseInt(a[0].style.zIndex),a.on("mousedown",function(){d.zIndex++,a.css("z-index",d.zIndex+1)}),d.zIndex}},y.record=function(a){if(!a[0])return he.console&&console.error("index error");var u=a.attr("type"),p=a.find(".layui-layer-content"),u=u===y.type[2]?p.children("iframe"):p,s=[a[0].style.width||y.getStyle(a[0],"width"),a[0].style.height||y.getStyle(a[0],"height"),a.position().top,a.position().left+parseFloat(a.css("margin-left"))];a.find(".layui-layer-max").addClass("layui-layer-maxmin"),a.attr({area:s}),p.data(_,y.getStyle(u[0],"height"))},y.setScrollbar=function(a){I.html.css("overflow","hidden")},y.restScrollbar=function(a){I.html.css("overflow")&&Q("."+I[0]).filter(function(){var p=Q(this);return(p.data("config")||{}).scrollbar===!1&&p.data("maxminStatus")!=="min"&&p.attr("times")!==String(a)}).length===0&&I.html.css("overflow","")},y.promiseLikeResolve=function(a){var p=Q.Deferred();return a&&typeof a.then=="function"?a.then(p.resolve,p.reject):p.resolve(a),p.promise()},(he.layer=d).getChildFrame=function(a,p){return p=p||Q("."+I[4]).attr("times"),Q("#"+I[0]+p).find("iframe").contents().find(a)},d.getFrameIndex=function(a){if(a)return Q("#"+a).parents("."+I[4]).attr("times")},d.iframeAuto=function(a){var p,u,s;a&&(p=d.getChildFrame("html",a).outerHeight(),u=(a=Q("#"+I[0]+a)).find(I[1]).outerHeight()||0,s=a.find("."+I[6]).outerHeight()||0,a.css({height:p+u+s}),a.find("iframe").css({height:p}))},d.iframeSrc=function(a,p){Q("#"+I[0]+a).find("iframe").attr("src",p)},d.style=function(s,p,u){var s=Q("#"+I[0]+s),f=s.find(".layui-layer-content"),S=s.attr("type"),P=s.find(I[1]).outerHeight()||0,n=s.find("."+I[6]).outerHeight()||0;s.attr("minLeft"),S!==y.type[3]&&S!==y.type[4]&&(u||(parseFloat(p.width)<=260&&(p.width=260),parseFloat(p.height)-P-n<=64&&(p.height=64+P+n)),s.css(p),n=s.find("."+I[6]).outerHeight()||0,S===y.type[2]?s.find("iframe").css({height:(typeof p.height=="number"?p.height:s.height())-P-n}):f.css({height:(typeof p.height=="number"?p.height:s.height())-P-n-parseFloat(f.css("padding-top"))-parseFloat(f.css("padding-bottom"))}))},d.min=function(a,p){var u,s,f,S,P,n,R=Q("#"+I[0]+a),k=R.data("maxminStatus");k!=="min"&&(k==="max"&&d.restore(a),R.data("maxminStatus","min"),p=p||R.data("config")||{},k=Q("#"+I.SHADE+a),u=R.find(".layui-layer-min"),s=R.find(I[1]).outerHeight()||0,S=(f=typeof(S=R.attr("minLeft"))=="string")?S:181*y.minStackIndex+"px",P=R.css("position"),n={width:180,height:s,position:"fixed",overflow:"hidden"},y.record(R),0K.width()&&(S=K.width()-180-(y.minStackArr.edgeIndex=y.minStackArr.edgeIndex||0,y.minStackArr.edgeIndex+=3))<0&&(S=0),p.minStack&&(n.left=S,n.top=K.height()-s,f||y.minStackIndex++,R.attr("minLeft",S)),R.attr("position",P),d.style(a,n,!0),u.hide(),R.attr("type")==="page"&&R.find(I[4]).hide(),y.restScrollbar(a),k.hide())},d.restore=function(a){var p=Q("#"+I[0]+a),u=Q("#"+I.SHADE+a),s=p.find(".layui-layer-content"),f=p.attr("area").split(","),S=p.attr("type"),P=p.data("config")||{},n=s.data(_);p.removeData("maxminStatus"),d.style(a,{width:f[0],height:f[1],top:parseFloat(f[2]),left:parseFloat(f[3]),position:p.attr("position"),overflow:"visible"},!0),p.find(".layui-layer-max").removeClass("layui-layer-maxmin"),p.find(".layui-layer-min").show(),S==="page"&&p.find(I[4]).show(),P.scrollbar?y.restScrollbar(a):y.setScrollbar(a),n!==x&&(s.removeData(_),(S===y.type[2]?s.children("iframe"):s).css({height:n})),u.show()},d.full=function(a){var p=Q("#"+I[0]+a),u=p.data("maxminStatus");u!=="max"&&(u==="min"&&d.restore(a),p.data("maxminStatus","max"),y.record(p),y.setScrollbar(a),setTimeout(function(){var s=p.css("position")==="fixed";d.style(a,{top:s?0:K.scrollTop(),left:s?0:K.scrollLeft(),width:"100%",height:"100%"},!0),p.find(".layui-layer-min").hide()},100))},d.title=function(a,p){Q("#"+I[0]+(p||d.index)).find(I[1]).html(a)},d.close=function(a,p){var u,s,f=(u=Q("."+I[0]).children("#"+a).closest("."+I[0]))[0]?(a=u.attr("times"),u):Q("#"+I[0]+a),S=f.attr("type"),P=f.data("config")||{},n=P.id&&P.hideOnClose;f[0]&&(s=function(){var R={slideDown:"layer-anim-slide-down-out",slideLeft:"layer-anim-slide-left-out",slideUp:"layer-anim-slide-up-out",slideRight:"layer-anim-slide-right-out"}[P.anim]||"layer-anim-close",k=function(){var c="layui-layer-wrap";if(n)return f.removeClass("layer-anim "+R),f.hide();if(S===y.type[1]&&f.attr("conType")==="object"){f.children(":not(."+I[5]+")").remove();for(var o=f.find("."+c),r=0;r<2;r++)o.unwrap();o.css("display",o.data("display")).removeClass(c)}else{if(S===y.type[2])try{var g=Q("#"+I[4]+a)[0];g.contentWindow.document.write(""),g.contentWindow.close(),f.find("."+I[5])[0].removeChild(g)}catch(w){}f[0].innerHTML="",f.remove()}typeof y.end[a]=="function"&&y.end[a](),delete y.end[a],typeof p=="function"&&p(),y.events.resize[a]&&(K.off("resize",y.events.resize[a]),delete y.events.resize[a])},X=Q("#"+I.SHADE+a);d.ie&&d.ie<10||!P.isOutAnim?X[n?"hide":"remove"]():(X.css({opacity:0}),setTimeout(function(){X[n?"hide":"remove"]()},350)),P.isOutAnim&&f.addClass("layer-anim "+R),d.ie==6&&y.reselect(),y.restScrollbar(a),typeof f.attr("minLeft")=="string"&&(y.minStackIndex--,y.minStackArr.push(f.attr("minLeft"))),d.ie&&d.ie<10||!P.isOutAnim?k():setTimeout(function(){k()},200)},n||typeof y.beforeEnd[a]!="function"?(delete y.beforeEnd[a],s()):y.promiseLikeResolve(y.beforeEnd[a]()).then(function(R){R!==!1&&(delete y.beforeEnd[a],s())},function(R){R!==x&&he.console&&he.console.error("layer error hint: "+R)}))},d.closeAll=function(a,p){typeof a=="function"&&(p=a,a=null);var u=Q("."+I[0]);Q.each(u,function(s){var f=Q(this),S=a?f.attr("type")===a:1;S&&d.close(f.attr("times"),s===u.length-1?p:null)}),u.length===0&&typeof p=="function"&&p()},d.closeLast=function(a,p){var u,s=[],f=Q.isArray(a);Q(typeof a=="string"?".layui-layer-"+a:".layui-layer").each(function(S,P){if(P=Q(P),f&&a.indexOf(P.attr("type"))===-1||P.css("display")==="none")return!0;s.push(Number(P.attr("times")))}),0":'",P=a.success;return delete a.success,d.open(Q.extend({type:1,btn:["确定","取消"],content:S,skin:"layui-layer-prompt"+C("prompt"),maxWidth:K.width(),success:function(n){(f=n.find(".layui-layer-input")).val(a.value||"").focus(),typeof P=="function"&&P(n)},resize:!1,yes:function(n){var R=f.val();R.length>(a.maxlength||500)?d.tips("最多输入"+(a.maxlength||500)+"个字符",f,{tips:1}):p&&p(R,n,f)}},a))},d.tab=function(a){var p=(a=a||{}).tab||{},u="layui-this",s=a.success;return delete a.success,d.open(Q.extend({type:1,skin:"layui-layer-tab"+C("tab"),resize:!1,title:(function(){var f=p.length,S=1,P="";if(0'+p[0].title+"";S"+p[S].title+"";return P})(),content:'
      '+(function(){var f=p.length,S=1,P="";if(0'+(p[0].content||"no content")+"";S'+(p[S].content||"no content")+"";return P})()+"
    ",success:function(f){var S=f.find(".layui-layer-title").children(),P=f.find(".layui-layer-tabmain").children();S.on("mousedown",function(R){R.stopPropagation?R.stopPropagation():R.cancelBubble=!0;var R=Q(this),k=R.index();R.addClass(u).siblings().removeClass(u),P.eq(k).show().siblings().hide(),typeof a.change=="function"&&a.change(k)}),typeof s=="function"&&s(f)}},a))},d.photos=function(a,p,u){var s={};if((a=Q.extend(!0,{toolbar:!0,footer:!0},a)).photos){var X=!(typeof a.photos=="string"||a.photos instanceof Q),f=X?a.photos:{},S=f.data||[],P=f.start||0,n=a.success;if(s.imgIndex=1+(0|P),a.img=a.img||"img",delete a.success,X){if(S.length===0)return d.msg("没有图片")}else{var R=Q(a.photos),k=function(){S=[],R.find(a.img).each(function(g){var w=Q(this);w.attr("layer-index",g),S.push({alt:w.attr("alt"),pid:w.attr("layer-pid"),src:w.attr("lay-src")||w.attr("layer-src")||w.attr("src"),thumb:w.attr("src")})})};if(k(),p||R.on("click",a.img,function(){k();var g=Q(this).attr("layer-index");d.photos(Q.extend(a,{photos:{start:g,data:S,tab:a.tab},full:a.full}),!0)}),!p)return}s.imgprev=function(g){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=S.length),s.tabimg(g)},s.imgnext=function(g,w){s.imgIndex++,s.imgIndex>S.length&&(s.imgIndex=1,w)||s.tabimg(g)},s.keyup=function(g){var w;s.end||(w=g.keyCode,g.preventDefault(),w===37?s.imgprev(!0):w===39?s.imgnext(!0):w===27&&d.close(s.index))},s.tabimg=function(g){if(!(S.length<=1))return f.start=s.imgIndex-1,d.close(s.index),d.photos(a,!0,g)},s.isNumber=function(g){return typeof g=="number"&&!isNaN(g)},s.image={},s.getTransform=function(z){var w=[],F=z.rotate,O=z.scaleX,z=z.scale;return s.isNumber(F)&&F!==0&&w.push("rotate("+F+"deg)"),s.isNumber(O)&&O!==1&&w.push("scaleX("+O+")"),s.isNumber(z)&&w.push("scale("+z+")"),w.length?w.join(" "):"none"},s.event=function(g,w,F){var O,z;s.main.find(".layui-layer-photos-prev").on("click",function(ne){ne.preventDefault(),s.imgprev(!0)}),s.main.find(".layui-layer-photos-next").on("click",function(ne){ne.preventDefault(),s.imgnext(!0)}),Q(document).on("keyup",s.keyup),g.off("click").on("click","*[toolbar-event]",function(){var ne=Q(this);switch(ne.attr("toolbar-event")){case"rotate":s.image.rotate=((s.image.rotate||0)+Number(ne.attr("data-option")))%360,s.imgElem.css({transform:s.getTransform(s.image)});break;case"scalex":s.image.scaleX=s.image.scaleX===-1?1:-1,s.imgElem.css({transform:s.getTransform(s.image)});break;case"zoom":var te=Number(ne.attr("data-option"));s.image.scale=(s.image.scale||1)+te,te<0&&s.image.scale<0-te&&(s.image.scale=0-te),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":d.close(w)}F.offset(),F.auto(w)}),s.main.on("mousewheel DOMMouseScroll",function(ne){var te=ne.originalEvent.wheelDelta||-ne.originalEvent.detail,re=s.main.find('[toolbar-event="zoom"]');(0D)&&(te.direction==="left"?s.imgnext(!0):te.direction==="right"&&s.imgprev(!0))},Q.each([F.shadeo,s.main],function(ne,te){O.touchSwipe(te,{onTouchEnd:z})}))},s.loadi=d.load(1,{shade:!("shade"in a)&&[.9,x,"unset"],scrollbar:!1});var X=S[P].src,c=function(g){d.close(s.loadi);var w,F=S[P].alt||"";u&&(a.anim=-1),s.index=d.open(Q.extend({type:1,id:"layui-layer-photos",area:(g=[g.width,g.height],w=[Q(he).width()-100,Q(he).height()-100],!a.full&&(w[0]'+F+''+(w=['
    '],1','','',"
    "].join("")),a.toolbar&&w.push(['
    ','','','','','','',"
    "].join("")),a.footer&&w.push(['"].join("")),w.push(""),w.join(""))+"",success:function(O,z,ne){s.main=O.find(".layer-layer-photos-main"),s.footer=O.find(".layui-layer-photos-footer"),s.imgElem=s.main.children("img"),s.event(O,z,ne),a.tab&&a.tab(S[P],O),typeof n=="function"&&n(O)},end:function(){s.end=!0,Q(document).off("keyup",s.keyup)}},a))},o=function(){d.close(s.loadi),d.msg("当前图片地址异常,
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1").addClass(I));layui.each(Y.bars,function(a,p){var u=x('
  • ');u.addClass(p.icon).attr({"lay-type":p.type,style:p.style||(Y.bgcolor?"background-color: "+Y.bgcolor:"")}).html(p.content),u.on("click",function(){var s=x(this).attr("lay-type");s==="top"&&(Y.target==="body"?x("html,body"):ee).animate({scrollTop:0},Y.duration),typeof Y.click=="function"&&Y.click.call(this,s)}),layui.type(Y.on)==="object"&&layui.each(Y.on,function(s,f){u.on(s,function(){var S=x(this).attr("lay-type");typeof f=="function"&&f.call(this,S)})}),p.type==="top"&&(u.addClass("layui-fixbar-top"),M=u),C.append(u)}),_.find("."+I).remove(),typeof Y.css=="object"&&C.css(Y.css),_.append(C),M&&(d=(function a(){return ee.scrollTop()>=Y.margin?y||(M.show(),y=1):y&&(M.hide(),y=0),a})()),ee.on("scroll",function(){d&&(clearTimeout(A),A=setTimeout(function(){d()},100))})},countdown:function(Y){Y=x.extend(!0,{date:new Date,now:new Date},Y);var M=arguments,y=(1]|&(?=#?[a-zA-Z0-9]+)/g.test(Y+="")?Y.replace(/&(?=#?[a-zA-Z0-9]+;?)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):Y},unescape:function(Y){return Y==null?"":String(Y).replace(/\"/g,'"').replace(/\'/g,"'").replace(/\>/g,">").replace(/\</g,"<").replace(/\&/g,"&")},openWin:function(Y){var M=(Y=Y||{}).window||window.open(Y.url||"",Y.target,Y.specs);Y.url||(M.document.open("text/html","replace"),M.document.write(Y.content||""),M.document.close())},toVisibleArea:function(Y){var M,y,d,A,I,T,_,ee;(Y=x.extend({margin:160,duration:200,type:"y"},Y)).scrollElem[0]&&Y.thisElem[0]&&(M=Y.scrollElem,_=Y.thisElem,d=(I=Y.type==="y")?"top":"left",A=M[y=I?"scrollTop":"scrollLeft"](),I=M[I?"height":"width"](),T=M.offset()[d],ee={},(_=_.offset()[d]-T)>I-Y.margin||_."+u,c=function(o){var r=this;r.index=++_.index,r.config=Y.extend({},r.config,_.config,o),r.init()};c.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:[200,300],shade:0,accordion:!1,closeOnClick:!0},c.prototype.reload=function(o,r){var g=this;g.config=Y.extend({},g.config,o),g.init(!0,r)},c.prototype.init=function(o,r){var g=this,w=g.config,F=Y(w.elem);return 1",(j="href"in L?''+oe+"":oe,J?'
    '+j+(m==="parent"?'':m==="group"&&w.isAllowSpread?'':"")+"
    ":'
    '+j+"
    "),"
  • "].join(""))).data("item",L),J&&($=Y('
    '),j=Y("
      "),m==="parent"?($.append(O(j,L[F.children])),oe.append($)):oe.append(O(j,L[F.children]))),re.append(oe))}),re},z=['
      ',"
      "].join(""),ne=w.content||(ne=Y('
        '),0暂无数据'),ne),te=ee.findMainElem(w.id);o==="reloadData"&&te.length?(r=g.mainElem=te).html(ne):((r=g.mainElem=Y(z)).append(ne),r.addClass(w.className),r.attr("style",w.style),g.remove(_.thisId),w.target.append(r),w.elem.data(I,!0),o=w.shade?'
        ':"",r.before(o),w.trigger==="mouseenter"&&r.on("mouseenter",function(){clearTimeout(ee.timer)}).on("mouseleave",function(){g.delayRemove()})),g.position(),_.thisId=w.id,r.find(".layui-menu").on(d,function(re){layui.stope(re)}),r.find(".layui-menu li").on("click",function(re){var D=Y(this),v=D.data("item")||{},L=v[F.children]&&0x.width()&&(g.addClass(R),(r=g[0].getBoundingClientRect()).left<0)&&g.removeClass(R),r.bottom>x.height())&&g.eq(0).css("margin-top",-(r.bottom-x.height()+5))}).on("mouseleave",K,function(o){var r=Y(this).children("."+n);r.removeClass(R),r.css("margin-top",0)}),_.close=function(o){return o=ee.getThis(o),o?(o.remove(),ee.call(o)):this},_.open=function(o){return o=ee.getThis(o),o?(o.render(),ee.call(o)):this},_.reload=function(o,r,g){return o=ee.getThis(o),o?(o.reload(r,g),ee.call(o)):this},_.reloadData=function(){var o=Y.extend([],arguments),r=(o[2]="reloadData",new RegExp("^("+["data","templet","content"].join("|")+")$"));return layui.each(o[1],function(g,w){r.test(g)||delete o[1][g]}),_.reload.apply(null,o)},_.render=function(o){return o=new c(o),ee.call(o)},he(A,_)}),layui.define(["jquery","lay"],function(he){"use strict";var x=layui.$,Q=layui.lay,K={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(C){var a=this;return a.config=x.extend({},a.config,C),a},on:function(C,a){return layui.onevent.call(this,Y,C,a)}},Y="slider",M="layui-disabled",y="layui-slider-bar",d="layui-slider-wrap",A="layui-slider-wrap-btn",I="layui-slider-tips",T="layui-slider-input-txt",_="layui-slider-hover",ee=function(C){var a=this;a.index=++K.index,a.config=x.extend({},a.config,K.config,C),a.render()};ee.prototype.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"},ee.prototype.precision=function(){var C=this.config,C=x.map([C.min,C.max,C.step],function(a,p){return a=String(a).split("."),a[1]?a[1].length:0});return Math.max.apply(null,C)},ee.prototype.render=function(){var C=this,a=C.config,u=x(a.elem);if(1a.max&&(a.value=a.max),f=(a.value-a.min)/(a.max-a.min)*100+"%");var p,u=a.disabled?"#c2c2c2":a.theme,s='
        '+(a.tips?'
        ":"")+'
        '+(a.range?'
        ':"")+"
        ",f=x(a.elem),S=f.next(".layui-slider");if(S[0]&&S.remove(),C.elemTemp=x(s),a.range?(C.elemTemp.find("."+d).eq(0).data("value",a.value[0]),C.elemTemp.find("."+d).eq(1).data("value",a.value[1])):C.elemTemp.find("."+d).data("value",a.value),f.html(C.elemTemp),a.type==="vertical"&&C.elemTemp.height(a.height+"px"),a.showstep){for(var P=(a.max-a.min)/a.step,n="",R=1;R<1+P;R++){var k=100*R/P;k<100&&(n+='
        ')}C.elemTemp.append(n)}function X(r){r=r.parent().data("value"),r=a.setTips?a.setTips(r):r,C.elemTemp.find("."+I).html(r)}function c(r){var g=a.type==="vertical"?a.height:C.elemTemp[0].offsetWidth,w=C.elemTemp.find("."+d);return(a.type==="vertical"?g-r.parent()[0].offsetTop-w.height():r.parent()[0].offsetLeft)/g*100}function o(r){a.type==="vertical"?C.elemTemp.find("."+I).css({bottom:r+"%","margin-bottom":"20px",display:"inline-block"}):C.elemTemp.find("."+I).css({left:r+"%",display:"inline-block"})}a.input&&!a.range&&(u=x('
        '),f.css("position","relative"),f.append(u),f.find("."+T).children("input").val(a.value),a.type==="vertical"?u.css({left:0,top:-48}):C.elemTemp.css("margin-right",u.outerWidth()+15)),a.disabled?(C.elemTemp.addClass(M),C.elemTemp.find("."+A).addClass(M)):C.slide(),a.tips&&(a.tipsAlways?(X(S=C.elemTemp.find("."+A)),o(c(S))):C.elemTemp.find("."+A).on("mouseover",function(){X(x(this));var r=c(x(this));clearTimeout(p),p=setTimeout(function(){o(r)},300)}).on("mouseout",function(){clearTimeout(p),a.tipsAlways||C.elemTemp.find("."+I).css("display","none")}))},ee.prototype.slide=function(C,a,p){var u=this,s=u.config,f=u.elemTemp,S=function(){return s.type==="vertical"?s.height:f[0].offsetWidth},P=f.find("."+d),n=f.next(".layui-slider-input"),R=n.children("."+T).children("input").val(),k=100/((s.max-s.min)/s.step),X=u.precision(),c=function(w,F,O){w=(w=100<(w=100z[1]&&z.reverse(),u.value=s.range?z:re,s.change&&s.change(u.value),O==="done"&&s.done&&s.done(u.value)},o=function(w){var F=w/S()*100/k,O=Math.round(F)*k;return O=w==S()?Math.ceil(F)*k:O},r=x(['
        S()?S():j)/S()*100/k;c(j,w),F.addClass(_),f.find("."+I).show(),L.preventDefault()},te=function(L){F.removeClass(_),s.tipsAlways||setTimeout(function(){f.find("."+I).hide()},L)},re=function(){te&&te(Q.touchEventsSupported()?1e3:0),r.remove(),s.done&&s.done(u.value),Q.touchEventsSupported()&&(z[0].removeEventListener("touchmove",ne,!!Q.passiveSupported&&{passive:!1}),z[0].removeEventListener("touchend",re),z[0].removeEventListener("touchcancel",re))},x("#LAY-slider-moving")[0]||x("body").append(r),r.on("mousemove",ne),r.on("mouseup",re).on("mouseleave",re),Q.touchEventsSupported()&&(z[0].addEventListener("touchmove",ne,!!Q.passiveSupported&&{passive:!1}),z[0].addEventListener("touchend",re),z[0].addEventListener("touchcancel",re))})}),f.on("click",function(w){var F=x("."+A),O=x(this);!F.is(event.target)&&F.has(event.target).length===0&&F.length&&(O=(F=(F=(F=s.type==="vertical"?S()-w.clientY+O.offset().top-x(window).scrollTop():w.clientX-O.offset().left-x(window).scrollLeft())<0?0:F)>S()?S():F)/S()*100/k,F=s.range?s.type==="vertical"?Math.abs(F-parseInt(x(P[0]).css("bottom")))>Math.abs(F-parseInt(x(P[1]).css("bottom")))?1:0:Math.abs(F-P[0].offsetLeft)>Math.abs(F-P[1].offsetLeft)?1:0:0,c(O,F,"done"),w.preventDefault())}),n.children(".layui-slider-input-btn").children("i").each(function(w){x(this).on("click",function(){R=n.children("."+T).children("input").val();var F=((R=w==1?R-s.steps.max?s.max:Number(R)+s.step)-s.min)/(s.max-s.min)*100/k;c(F,0,"done")})});var g=function(){var w=this.value,w=(w=(w=(w=isNaN(w)?0:w)s.max?s.max:w,((this.value=w)-s.min)/(s.max-s.min)*100/k);c(w,0,"done")};n.children("."+T).children("input").on("keydown",function(w){w.keyCode===13&&(w.preventDefault(),g.call(this))}).on("change",g)},ee.prototype.events=function(){this.config},K.render=function(C){return C=new ee(C),function(){var a=this,p=a.config;return{setValue:function(u,s){return u=(u=u>p.max?p.max:u)',"",'','',"","","
        "].join("")),F=g.elem=x(g.elem);g.size&&w.addClass("layui-colorpicker-"+g.size),F.addClass("layui-inline").html(r.elemColorBox=w),g.id="id"in g?g.id:F.attr("id")||r.index,r.color=r.elemColorBox.find("."+ee)[0].style.background,r.events()},o.prototype.renderPicker=function(){var r,g=this,w=g.config,F=g.elemColorBox[0],O=g.elemPicker=x(['
        ','
        ','
        ','
        ','
        ','
        ',"
        ",'
        ','
        ',"
        ","
        ",'
        ','
        ','
        ',"
        ","
        ",w.predefine?(r=['
        '],layui.each(w.colors,function(z,ne){r.push(['
        ','
        ',"
        "].join(""))}),r.push("
        "),r.join("")):"",'
        ','
        ','',"
        ",'
        ','','',"","
        "].join(""));g.elemColorBox.find("."+ee)[0],x(I)[0]&&x(I).data("index")==g.index?g.removePicker(o.thisElemInd):(g.removePicker(o.thisElemInd),x("body").append(O)),M.thisId=w.id,o.thisElemInd=g.index,o.thisColor=F.style.background,g.position(),g.pickerEvents()},o.prototype.removePicker=function(w){var g=this.config,w=x("#layui-colorpicker"+(w||this.index));return w[0]&&(w.remove(),delete M.thisId,typeof g.close=="function")&&g.close(this.color),this},o.prototype.position=function(){var r=this,g=r.config;return Q.position(r.bindElem||r.elemColorBox[0],r.elemPicker[0],{position:g.position,align:"center"}),r},o.prototype.val=function(){var r,g=this,w=(g.config,g.elemColorBox.find("."+ee)),F=g.elemPicker.find("."+S),O=w[0].style.backgroundColor;O?(r=P(k(O)),w=w.attr("lay-type"),g.select(r.h,r.s,r.b),w==="torgb"?F.find("input").val(O):w==="rgba"?(w=k(O),(O.match(/[0-9]{1,3}/g)||[]).length===3?(F.find("input").val("rgba("+w.r+", "+w.g+", "+w.b+", 1)"),g.elemPicker.find("."+s).css("left",280)):(F.find("input").val(O),O=280*O.slice(O.lastIndexOf(",")+1,O.length-1),g.elemPicker.find("."+s).css("left",O)),g.elemPicker.find("."+u)[0].style.background="linear-gradient(to right, rgba("+w.r+", "+w.g+", "+w.b+", 0), rgb("+w.r+", "+w.g+", "+w.b+"))"):F.find("input").val("#"+R(r))):(g.select(0,100,100),F.find("input").val(""),g.elemPicker.find("."+u)[0].style.background="",g.elemPicker.find("."+s).css("left",280))},o.prototype.side=function(){var r=this,g=r.config,w=r.elemColorBox.find("."+ee),F=w.attr("lay-type"),O=r.elemPicker.find(".layui-colorpicker-side"),z=r.elemPicker.find("."+a),ne=r.elemPicker.find("."+p),te=r.elemPicker.find("."+f),re=r.elemPicker.find("."+u),D=r.elemPicker.find("."+s),v=z[0].offsetTop/180*360,L=100-te[0].offsetTop/180*100,j=te[0].offsetLeft/260*100,J=Math.round(D[0].offsetLeft/280*100)/100,$=r.elemColorBox.find("."+C),oe=r.elemPicker.find(".layui-colorpicker-pre").children("div"),m=function(de,ce,q,ae){r.select(de,ce,q);var le=n({h:de,s:ce,b:q}),de=R({h:de,s:ce,b:q}),ce=r.elemPicker.find("."+S).find("input");$.addClass(T).removeClass(_),w[0].style.background="rgb("+le.r+", "+le.g+", "+le.b+")",F==="torgb"?ce.val("rgb("+le.r+", "+le.g+", "+le.b+")"):F==="rgba"?(D.css("left",280*ae),ce.val("rgba("+le.r+", "+le.g+", "+le.b+", "+ae+")"),w[0].style.background="rgba("+le.r+", "+le.g+", "+le.b+", "+ae+")",re[0].style.background="linear-gradient(to right, rgba("+le.r+", "+le.g+", "+le.b+", 0), rgb("+le.r+", "+le.g+", "+le.b+"))"):ce.val("#"+de),g.change&&g.change(x.trim(r.elemPicker.find("."+S).find("input").val()))},h=x(['
        '].join("")),E=function(B){x("#LAY-colorpicker-moving")[0]||x("body").append(h),h.on("mousemove",B),h.on("mouseup",function(){h.remove()}).on("mouseleave",function(){h.remove()})},W=!0,G=!0;z.on("mousedown",function(B,U){var q=this.offsetTop,ae=(B.clientY===void 0?U:B).clientY;G&&layui.stope(B),E(function(le){var de=q+(le.clientY-ae),ce=O[0].offsetHeight,ce=(de=ce<(de=de<0?0:de)?ce:de)/180*360;m(v=ce,j,L,J),le.preventDefault()}),B.preventDefault()}),O.on("mousedown",function(B){var U=B.clientY-x(this).offset().top+X.scrollTop(),U=(U=(U=U<0?0:U)>this.offsetHeight?this.offsetHeight:U)/180*360;m(v=U,j,L,J),B.preventDefault(),W&&z.trigger("mousedown",B)}),te.on("mousedown",function(B,U){var q=this.offsetTop,ae=this.offsetLeft,le=(B.clientY===void 0?U:B).clientY,de=(B.clientX===void 0?U:B).clientX;G&&layui.stope(B),E(function(ce){var ye=q+(ce.clientY-le),pe=ae+(ce.clientX-de),we=ne[0].offsetHeight,ve=ne[0].offsetWidth,ve=(pe=ve<(pe=pe<0?0:pe)?ve:pe)/260*100,pe=100-(ye=we<(ye=ye<0?0:ye)?we:ye)/180*100;m(v,j=ve,L=pe,J),ce.preventDefault()}),B.preventDefault()}),ne.on("mousedown",function(B){var q=B.clientY-x(this).offset().top+X.scrollTop(),U=B.clientX-x(this).offset().left+X.scrollLeft(),U=((q=q<0?0:q)>this.offsetHeight&&(q=this.offsetHeight),(U=(U=U<0?0:U)>this.offsetWidth?this.offsetWidth:U)/260*100),q=100-q/180*100;m(v,j=U,L=q,J),layui.stope(B),B.preventDefault(),W&&te.trigger("mousedown",B)}),D.on("mousedown",function(B,U){var q=this.offsetLeft,ae=(B.clientX===void 0?U:B).clientX;G&&layui.stope(B),E(function(le){var de=q+(le.clientX-ae),ce=re[0].offsetWidth,ce=(ce<(de=de<0?0:de)&&(de=ce),Math.round(de/280*100)/100);m(v,j,L,J=ce),le.preventDefault()}),B.preventDefault()}),re.on("mousedown",function(B){var U=B.clientX-x(this).offset().left,U=((U=U<0?0:U)>this.offsetWidth&&(U=this.offsetWidth),Math.round(U/280*100)/100);m(v,j,L,J=U),B.preventDefault(),W&&D.trigger("mousedown",B)}),oe.each(function(){x(this).on("click",function(){x(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var B=this.style.backgroundColor,U=P(k(B)),q=B.slice(B.lastIndexOf(",")+1,B.length-1);v=U.h,j=U.s,L=U.b,(B.match(/[0-9]{1,3}/g)||[]).length===3&&(q=1),J=q,m(U.h,U.s,U.b,q)})}),Q.touchEventsSupported()&&layui.each([{elem:O,eventType:"mousedown"},{elem:re,eventType:"mousedown"},{elem:ne,eventType:"mousedown"}],function(B,U){Q.touchSwipe(U.elem,{onTouchStart:function(){G=W=!1},onTouchMove:function(q){var ae,le;q=q,ae=U.eventType,q=q.touches[0],(le=document.createEvent("MouseEvent")).initMouseEvent(ae,!0,!0,window,1,q.screenX,q.screenY,q.clientX,q.clientY,!1,!1,!1,!1,0,null),q.target.dispatchEvent(le)},onTouchEnd:function(){h.remove(),G=W=!0}})})},o.prototype.select=function(z,te,ne,F){this.config;var O=R({h:z,s:100,b:100}),z=(R({h:z,s:te,b:ne}),z/360*180),ne=180-ne/100*180,te=te/100*260,re=this.elemPicker.find("."+p)[0];this.elemPicker.find("."+a).css("top",z),re.style.background="#"+O,this.elemPicker.find("."+f).css({top:ne/re.offsetHeight*100+"%",left:te/re.offsetWidth*100+"%"})},o.prototype.pickerEvents=function(){var r=this,g=r.config,w=r.elemColorBox.find("."+ee),F=r.elemPicker.find("."+S+" input"),O={clear:function(z){w[0].style.background="",r.elemColorBox.find("."+C).removeClass(T).addClass(_),r.color="",g.done&&g.done(""),r.removePicker()},confirm:function(z,ne){var te,re,D,v,L=x.trim(F.val());-1>16,g:(65280&D)>>8,b:255&D},re=P(v),w[0].style.background=te="#"+R(re),r.elemColorBox.find("."+C).removeClass(_).addClass(T)),ne==="change"?(r.select(re.h,re.s,re.b,ne),g.change&&g.change(te)):(r.color=L,g.done&&g.done(L),r.removePicker())}};r.elemPicker.on("click","*[colorpicker-events]",function(){var z=x(this),ne=z.attr("colorpicker-events");O[ne]&&O[ne].call(this,z)}),F.on("keyup",function(z){var ne=x(this);O.confirm.call(this,ne,z.keyCode===13?null:"change")})},o.prototype.events=function(){var r=this;r.config,r.elemColorBox.on("click",function(){r.renderPicker(),x(I)[0]&&(r.val(),r.side())})},c.on(Y,function(r){var g,w,F;M.thisId&&(g=y.getThis(M.thisId))&&(w=g.config,F=g.elemColorBox.find("."+ee),x(r.target).hasClass(A)||x(r.target).parents("."+A)[0]||x(r.target).hasClass(I.replace(/\./g,""))||x(r.target).parents(I)[0]||g.elemPicker&&(g.color?(r=P(k(g.color)),g.select(r.h,r.s,r.b)):g.elemColorBox.find("."+C).removeClass(T).addClass(_),F[0].style.background=g.color||"",typeof w.cancel=="function"&&w.cancel(g.color),g.removePicker()))}),X.on("resize",function(){if(M.thisId){var r=y.getThis(M.thisId);if(r)return!(!r.elemPicker||!x(I)[0])&&void r.position()}}),y.that={},y.getThis=function(r){var g=y.that[r];return g||K.error(r?d+" instance with ID '"+r+"' not found":"ID argument required"),g},M.render=function(r){return r=new o(r),y.call(r)},he(d,M)}),layui.define("jquery",function(he){"use strict";var x=layui.$,Q=(layui.hint(),layui.device()),K="element",Y="layui-this",M="layui-show",y=".layui-tab-title",d=function(){this.config={}},A=(d.prototype.set=function(f){return x.extend(!0,this.config,f),this},d.prototype.on=function(f,S){return layui.onevent.call(this,K,f,S)},d.prototype.tabAdd=function(f,S){var P,n=x(".layui-tab[lay-filter="+f+"]"),R=n.children(y),k=R.children(".layui-tab-bar"),X=n.children(".layui-tab-content"),c=""+(S.title||"unnaming")+"";return R.find("li").eq(0).after(c),X.append('
        "+(S.content||"")+"
        "),S.change&&this.tabChange(f,S.id),R.data("LAY_TAB_CHANGE",S.change),p.tabAuto(S.change?"change":null,n),this},d.prototype.tabDelete=function(f,S,P){return f=x(".layui-tab[lay-filter="+f+"]").children(y).find('>li[lay-id="'+S+'"]'),p.tabDelete.call(f[0],{liElem:f,force:P}),this},d.prototype.tabChange=function(f,S,P){return f=x(".layui-tab[lay-filter="+f+"]").children(y).find('>li[lay-id="'+S+'"]'),p.tabClick.call(f[0],{liElem:f,force:P}),this},d.prototype.tab=function(f){f=f||{},s.on("click",f.headerElem,function(S){var P=x(f.headerElem).index(x(this));p.tabClick.call(this,{index:P,options:f})})},d.prototype.progress=function(P,S){var n="layui-progress",P=x("."+n+"[lay-filter="+P+"]").find("."+n+"-bar"),n=P.find("."+n+"-text");return P.css("width",function(){return/^.+\/.+$/.test(S)?100*new Function("return "+S)()+"%":S}).attr("lay-percent",S),n.text(S),this},".layui-nav"),I="layui-nav-item",T="layui-nav-bar",_="layui-nav-tree",ee="layui-nav-child",C="layui-nav-more",a="layui-anim layui-anim-upbit",p={tabClick:function(f){var n=(f=f||{}).options||{},S=f.liElem||x(this),P=n.headerElem?S.parent():S.parents(".layui-tab").eq(0),n=n.bodyElem?x(n.bodyElem):P.children(".layui-tab-content").children(".layui-tab-item"),R=S.find("a"),R=R.attr("href")!=="javascript:;"&&R.attr("target")==="_blank",k=typeof S.attr("lay-unselect")=="string",X=P.attr("lay-filter"),c=S.attr("lay-id"),o="index"in f?f.index:S.parent().children("li").index(S);if(!f.force){var f=S.siblings("."+Y);if(layui.event.call(this,K,"tabBeforeChange("+X+")",{elem:P,from:{index:S.parent().children("li").index(f),id:f.attr("lay-id")},to:{index:o,id:c}})===!1)return}R||k||(S.addClass(Y).siblings().removeClass(Y),(c?f=(f=n.filter('[lay-id="'+c+'"]')).length?f:n.eq(o):n.eq(o)).addClass(M).siblings().removeClass(M)),layui.event.call(this,K,"tab("+X+")",{elem:P,index:o,id:c})},tabDelete:function(f){var S=(f=f||{}).liElem||x(this).parent(),P=S.parent().children("li").index(S),n=S.closest(".layui-tab"),R=n.children(".layui-tab-content").children(".layui-tab-item"),k=n.attr("lay-filter"),X=S.attr("lay-id");!f.force&&layui.event.call(S[0],K,"tabBeforeDelete("+k+")",{elem:n,index:P,id:X})===!1||(S.hasClass(Y)&&(S.next()[0]&&S.next().is("li")?p.tabClick.call(S.next()[0],{index:P+1}):S.prev()[0]&&S.prev().is("li")&&p.tabClick.call(S.prev()[0],null,P-1)),S.remove(),(X?f=(f=R.filter('[lay-id="'+X+'"]')).length?f:R.eq(P):R.eq(P)).remove(),setTimeout(function(){p.tabAuto(null,n)},50),layui.event.call(this,K,"tabDelete("+k+")",{elem:n,index:P,id:X}))},tabAuto:function(f,S){var P="layui-tab-more",n="layui-tab-bar",R="layui-tab-close",k=this;(S||x(".layui-tab")).each(function(){var X=x(this),c=X.children(".layui-tab-title"),o=(X.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),o=x(''),r=(k===window&&Q.ie,X.attr("lay-allowclose"));r&&r!=="false"&&c.find("li").each(function(){var g,w=x(this);w.find("."+R)[0]||w.attr("lay-allowclose")==="false"||((g=x('')).on("click",function(F){p.tabDelete.call(this,{e:F})}),w.append(g))}),typeof X.attr("lay-unauto")!="string"&&(c.prop("scrollWidth")>c.outerWidth()+1||c.find("li").length&&c.height()>(r=c.find("li").eq(0).height())+r/2?(f==="change"&&c.data("LAY_TAB_CHANGE")&&c.addClass(P),c.find("."+n)[0]||(c.append(o),X.attr("overflow",""),o.on("click",function(g){var w=c.hasClass(P);c[w?"removeClass":"addClass"](P)}))):(c.find("."+n).remove(),X.removeAttr("overflow")))})},hideTabMore:function(f){var S=x(".layui-tab-title");f!==!0&&x(f.target).attr("lay-stope")==="tabmore"||(S.removeClass("layui-tab-more"),S.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var f=x(this),S=f.closest(A),P=S.attr("lay-filter"),n=f.parent(),R=f.siblings("."+ee),k=typeof n.attr("lay-unselect")=="string";if(f.attr("href")!=="javascript:;"&&f.attr("target")==="_blank"||k||R[0]||(S.find("."+Y).removeClass(Y),n.addClass(Y)),S.hasClass(_)){var k=I+"ed",X=!n.hasClass(k),c=function(){x(this).css({display:""}),S.children("."+T).css({opacity:0})};if(R.is(":animated"))return;R.removeClass(a),R[0]&&(X?(R.slideDown(200,c),n.addClass(k)):(n.removeClass(k),R.show().slideUp(200,c)),typeof S.attr("lay-accordion")!="string"&&S.attr("lay-shrink")!=="all"||((X=n.siblings("."+k)).removeClass(k),X.children("."+ee).show().stop().slideUp(200,c)))}layui.event.call(this,K,"nav("+P+")",f)},collapse:function(){var f=x(this),X=f.closest(".layui-collapse"),S=X.attr("lay-filter"),P=".layui-colla-content",n=f.parent(".layui-colla-item"),R=f.siblings(P),k=R.css("display")==="none",X=typeof X.attr("lay-accordion")=="string",c=function(){x(this).css("display","")};R.is(":animated")||(k?(R.slideDown(200,c),n.addClass(M)):(n.removeClass(M),R.show().slideUp(200,c)),X&&((X=n.siblings("."+M)).removeClass(M),X.children(P).show().slideUp(200,c)),layui.event.call(this,K,"collapse("+S+")",{title:f,content:R,show:k}))}},u=(d.prototype.render=d.prototype.init=function(f,S){var P=typeof S=="string"&&S?'[lay-filter="'+S+'"]':"",n={tab:function(R){R=R||x(".layui-tab"+P),p.tabAuto.call({},null,R)},nav:function(R){var k={},X={},c={},o="layui-nav-title";(R||x(A+P)).each(function(r){var g=x(this),w=x(''),F=g.find("."+I),O=g.find("."+T);O[0]&&O.remove(),g.append(w),(g.hasClass(_)?F.find("dd,>."+o):F).off("mouseenter.lay_nav").on("mouseenter.lay_nav",function(){(function(z,ne,te){var re,D=x(this),v=D.find("."+ee);ne.hasClass(_)?v[0]||(re=D.children("."+o),z.css({top:D.offset().top-ne.offset().top,height:(re[0]?re:D).outerHeight(),opacity:1})):(v.addClass(a),v.hasClass("layui-nav-child-c")&&v.css({left:-(v.outerWidth()-D.width())/2}),v[0]?z.css({left:z.position().left+z.width()/2,width:0,opacity:0}):z.css({left:D.position().left+parseFloat(D.css("marginLeft")),top:D.position().top+D.height()-z.height()}),k[te]=setTimeout(function(){z.css({width:v[0]?0:D.width(),opacity:v[0]?0:1})},Q.ie&&Q.ie<10?0:200),clearTimeout(c[te]),v.css("display")==="block"&&clearTimeout(X[te]),X[te]=setTimeout(function(){v.addClass(M),D.find("."+C).addClass(C+"d")},300))}).call(this,w,g,r)}).off("mouseleave.lay_nav").on("mouseleave.lay_nav",function(){g.hasClass(_)?w.css({height:0,opacity:0}):(clearTimeout(X[r]),X[r]=setTimeout(function(){g.find("."+ee).removeClass(M),g.find("."+C).removeClass(C+"d")},300))}),g.off("mouseleave.lay_nav").on("mouseleave.lay_nav",function(){clearTimeout(k[r]),c[r]=setTimeout(function(){g.hasClass(_)||w.css({width:0,left:w.position().left+w.width()/2,opacity:0})},200)}),F.find("a").each(function(){var z=x(this);z.parent(),z.siblings("."+ee)[0]&&!z.children("."+C)[0]&&z.append(''),z.off("click",p.clickThis).on("click",p.clickThis)})})},breadcrumb:function(R){(R||x(".layui-breadcrumb"+P)).each(function(){var k=x(this),X="lay-separator",c=k.attr(X)||"/",o=k.find("a");o.next("span["+X+"]")[0]||(o.each(function(r){r!==o.length-1&&x(this).after(""+c+"")}),k.css("visibility","visible"))})},progress:function(R){var k="layui-progress";(R||x("."+k+P)).each(function(){var X=x(this),c=X.find(".layui-progress-bar"),o=c.attr("lay-percent");c.css("width",function(){return/^.+\/.+$/.test(o)?100*new Function("return "+o)()+"%":o}),X.attr("lay-showpercent")&&setTimeout(function(){c.html(''+o+"")},350)})},collapse:function(R){(R||x(".layui-collapse"+P)).each(function(){x(this).find(".layui-colla-item").each(function(){var k=x(this),X=k.find(".layui-colla-title"),c=k.find(".layui-colla-content"),o=c.css("display")==="none";X.find(".layui-colla-icon").remove(),X.append(''),k[o?"removeClass":"addClass"](M),c.hasClass(M)&&c.removeClass(M),X.off("click",p.collapse).on("click",p.collapse)})})}};return f&&typeof S=="object"&&S instanceof x?n[f](S):n[f]?n[f]():layui.each(n,function(R,k){k()})},new d),s=x(document);x(function(){u.render()}),s.on("click",".layui-tab-title li",p.tabClick),x(window).on("resize",p.tabAuto),he(K,u)}),layui.define(["lay","layer"],function(he){"use strict";var x=layui.$,Q=layui.lay,K=layui.layer,Y=layui.device(),M="upload",y="layui_"+M+"_index",d={config:{},index:layui[M]?layui[M].index+1e4:0,set:function(p){var u=this;return u.config=x.extend({},u.config,p),u},on:function(p,u){return layui.onevent.call(this,M,p,u)}},A=function(){var p=this,u=p.config.id;return{upload:function(s){p.upload.call(p,s)},reload:function(s){p.reload.call(p,s)},config:(A.that[u]=p).config}},I="layui-upload-file",T="layui-upload-form",_="layui-upload-iframe",ee="layui-upload-choose",C="UPLOADING",a=function(p){var u=this;u.index=++d.index,u.config=x.extend({},u.config,d.config,p),u.render()};a.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}},a.prototype.reload=function(p){var u=this;u.config=x.extend({},u.config,p),u.render(!0)},a.prototype.render=function(p){var u=this,s=u.config,f=x(s.elem);return 1"].join("")),f=u.elem.next();(f.hasClass(I)||f.hasClass(T))&&f.remove(),Y.ie&&Y.ie<10&&u.elem.wrap('
        '),p.isFile()?(p.elemFile=u.elem,u.field=u.elem[0].name):u.elem.after(s),Y.ie&&Y.ie<10&&p.initIE()},a.prototype.initIE=function(){var p,u=this.config,s=x(''),f=x(['
        ',"
        "].join(""));x("#"+_)[0]||x("body").append(s),u.elem.next().hasClass(T)||(this.elemFile.wrap(f),u.elem.next("."+T).append((p=[],layui.each(u.data,function(S,P){P=typeof P=="function"?P():P,p.push('')}),p.join(""))))},a.prototype.msg=function(p){return K.msg(p,{icon:2,shift:6})},a.prototype.isFile=function(){var p=this.config.elem[0];if(p)return p.tagName.toLocaleLowerCase()==="input"&&p.type==="file"},a.prototype.preview=function(p){window.FileReader&&layui.each(this.chooseFiles,function(u,s){var f=new FileReader;f.readAsDataURL(s),f.onload=function(){p&&p(u,s,this.result)}})},a.prototype.upload=function(p,u){var s,f,S,P,n,R=this,k=R.config,X=k.text||{},c=R.elemFile[0],o=function(){return p||R.files||R.chooseFiles||c.files},r=function(){var D=0,v=0,L=o(),j=function(){k.multiple&&D+v===R.fileLength&&typeof k.allDone=="function"&&k.allDone({total:R.fileLength,successful:D,failed:v})},J=function($){var oe=new FormData,m=function(E){$.unified?layui.each(L,function(W,G){delete G[C]}):delete E[C]};if(layui.each(k.data,function(E,W){W=typeof W=="function"?$.unified?W():W($.index,$.file):W,oe.append(E,W)}),$.unified)layui.each(L,function(E,W){W[C]||(W[C]=!0,oe.append(k.field,W))});else{if($.file[C])return;oe.append(k.field,$.file),$.file[C]=!0}var h={url:k.url,type:"post",data:oe,dataType:k.dataType||"json",contentType:!1,processData:!1,headers:k.headers||{},success:function(E){k.unified?D+=R.fileLength:D++,F($.index,E),j($.index),m($.file)},error:function(E){k.unified?v+=R.fileLength:v++,R.msg(X.error||["Upload failed, please try again.","status: "+(E.status||"")+" - "+(E.statusText||"error")].join("
        ")),O($.index,E.responseText,E),j($.index),m($.file)}};typeof k.progress=="function"&&(h.xhr=function(){var E=x.ajaxSettings.xhr();return E.upload.addEventListener("progress",function(W){var G;W.lengthComputable&&(G=Math.floor(W.loaded/W.total*100),k.progress(G,(k.item||k.elem)[0],W,$.index))}),E}),x.ajax(h)};k.unified?J({unified:!0,index:0}):layui.each(L,function($,oe){J({index:$,file:oe})})},g=function(){var D=x("#"+_);R.elemFile.parent().submit(),clearInterval(a.timer),a.timer=setInterval(function(){var v,L=D.contents().find("body");try{v=L.text()}catch(j){R.msg(X["cross-domain"]),clearInterval(a.timer),O()}v&&(clearInterval(a.timer),L.html(""),F(0,v))},30)},w=function(D){if(k.force==="json"&&typeof D!="object")try{return{status:"CONVERTED",data:JSON.parse(D)}}catch(v){return R.msg(X["data-format-error"]),{status:"FORMAT_ERROR",data:{}}}return{status:"DO_NOTHING",data:{}}},F=function(D,v){R.elemFile.next("."+ee).remove(),c.value="";var L=w(v);switch(L.status){case"CONVERTED":v=L.data;break;case"FORMAT_ERROR":return}typeof k.done=="function"&&k.done(v,D||0,function(j){R.upload(j)})},O=function(D,v,L){k.auto&&(c.value="");var j=w(v);switch(j.status){case"CONVERTED":v=j.data;break;case"FORMAT_ERROR":return}typeof k.error=="function"&&k.error(D||0,function(J){R.upload(J)},v,L)},z=k.exts,re=(f=[],layui.each(p||R.chooseFiles,function(D,v){f.push(v.name)}),f),ne={preview:function(D){R.preview(D)},upload:function(D,v){var L={};L[D]=v,R.upload(L)},pushFile:function(){return R.files=R.files||{},layui.each(R.chooseFiles,function(D,v){R.files[D]=v}),R.files},resetFile:function(D,v,L){v=new File([v],L),R.files=R.files||{},R.files[D]=v},getChooseFiles:function(){return R.chooseFiles}},te={file:"文件",images:"图片",video:"视频",audio:"音频"}[k.accept]||"文件",re=re.length===0?c.value.match(/[^\/\\]+\..+/g)||[]:re;if(re.length!==0){switch(k.accept){case"file":layui.each(re,function(D,v){if(z&&!RegExp(".\\.("+z+")$","i").test(escape(v)))return s=!0});break;case"video":layui.each(re,function(D,v){if(!RegExp(".\\.("+(z||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return s=!0});break;case"audio":layui.each(re,function(D,v){if(!RegExp(".\\.("+(z||"mp3|wav|mid")+")$","i").test(escape(v)))return s=!0});break;default:layui.each(re,function(D,v){if(!RegExp(".\\.("+(z||"jpg|png|gif|bmp|jpeg|svg|webp")+")$","i").test(escape(v)))return s=!0})}if(s)return R.msg(X["check-error"]||"选择的"+te+"中包含不支持的格式"),c.value="";if(u!=="choose"&&!k.auto||(k.choose&&k.choose(ne),u!=="choose")){if(R.fileLength=(S=0,te=o(),layui.each(te,function(){S++}),S),k.number&&R.fileLength>k.number)return R.msg(typeof X["limit-number"]=="function"?X["limit-number"](k,R.fileLength):"同时最多只能上传: "+k.number+" 个文件
        您当前已经选择了: "+R.fileLength+" 个文件");if(01024*k.size&&(v=1<=(v=k.size/1024)?v.toFixed(2)+"MB":k.size+"KB",c.value="",P=v)}),P))return R.msg(typeof X["limit-size"]=="function"?X["limit-size"](k,P):"文件大小不能超过 "+P);n=function(){if(Y.ie)return(9'+c+"")},S=function(R){var k=!0;return layui.each(p.files,function(X,c){if(!(k=c.name!==R.name))return!0}),k},P=function(R){var k=function(X){X.ext=X.name.substr(X.name.lastIndexOf(".")+1).toLowerCase(),X.sizes=d.util.parseSize(X.size)};return R instanceof FileList?layui.each(R,function(X,c){k(c)}):k(R),R},n=function(R){var k;return(R=R||[]).length?p.files?(k=[],layui.each(R,function(X,c){S(c)&&k.push(P(c))}),k):P(R):[]};u.elem.off("upload.start").on("upload.start",function(){var R=x(this);p.config.item=R,p.elemFile[0].click()}),Y.ie&&Y.ie<10||u.elem.off("upload.over").on("upload.over",function(){x(this).attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){x(this).removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(R,c){var X=x(this),c=n(c.originalEvent.dataTransfer.files);X.removeAttr("lay-over"),s(c),u.auto?p.upload():f(c)}),p.elemFile.on("change",function(){var R=n(this.files);R.length!==0&&(s(R),u.auto?p.upload():f(R))}),u.bindAction.off("upload.action").on("upload.action",function(){p.upload()}),u.elem.data(y)||(u.elem.on("click",function(){p.isFile()||x(this).trigger("upload.start")}),u.drag&&u.elem.on("dragover",function(R){R.preventDefault(),x(this).trigger("upload.over")}).on("dragleave",function(R){x(this).trigger("upload.leave")}).on("drop",function(R){R.preventDefault(),x(this).trigger("upload.drop",R)}),u.bindAction.on("click",function(){x(this).trigger("upload.action")}),u.elem.data(y,u.id))},d.util={parseSize:function(p,u){var s,f;return u=u||2,p!=null&&p?(s=typeof p=="string"?parseFloat(p):p,f=Math.floor(Math.log(s)/Math.log(1024)),(p=(p=s/Math.pow(1024,f))%1==0?p:parseFloat(p.toFixed(u)))+["Bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"][f]):"0"},promiseLikeResolve:function(p){var u=x.Deferred();return p&&typeof p.then=="function"?p.then(u.resolve,u.reject):u.resolve(p),u.promise()}},A.that={},A.getThis=function(p){var u=A.that[p];return u||hint.error(p?M+" instance with ID '"+p+"' not found":"ID argument required"),u},d.render=function(p){return p=new a(p),A.call(p)},he(M,d)}),layui.define(["lay","layer","util"],function(he){"use strict";var x=layui.$,Q=layui.layer,K=layui.util,Y=layui.hint(),M=(layui.device(),"form"),y=".layui-form",d="layui-this",A="layui-hide",I="layui-disabled",T="layui-input-number-invalid",_=lay.ie&&parseFloat(lay.ie)===8||Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"checked")===void 0,u=function(){this.config={verify:{required:function(f){if(!/[\S]+/.test(f)||f===void 0||f===null)return"必填项不能为空"},phone:function(f){if(f&&!/^1\d{10}$/.test(f))return"手机号格式不正确"},email:function(f){if(f&&!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(f))return"邮箱格式不正确"},url:function(f){if(f&&!/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/.test(f))return"链接格式不正确"},number:function(f){if(f&&isNaN(f))return"只能填写数字"},date:function(f){if(f&&!/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(f))return"日期格式不正确"},identity:function(f){if(f&&!/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(f))return"身份证号格式不正确"}},autocomplete:null}},ee=(u.prototype.set=function(f){return x.extend(!0,this.config,f),this},u.prototype.verify=function(f){return x.extend(!0,this.config.verify,f),this},u.prototype.getFormElem=function(f){return x(y+(f?'[lay-filter="'+f+'"]':""))},u.prototype.on=function(f,S){return layui.onevent.call(this,M,f,S)},u.prototype.val=function(f,S){return this.getFormElem(f).each(function(P,n){var R,k,X,c,o=x(this);for(R in S)lay.hasOwn(S,R)&&(X=S[R],(c=o.find('[name="'+R+'"]'))[0])&&((k=c[0].type)==="checkbox"?c[0].checked=X:k==="radio"?c.each(function(){this.checked=this.value==X+""}):c.val(X))}),p.render(null,f),this.getValue(f)},u.prototype.getValue=function(R,S){S=S||this.getFormElem(R);var P={},n={},R=S.find("input,select,textarea");return layui.each(R,function(k,X){var c,o=x(this);X.name=(X.name||"").replace(/^\s*|\s*&/,""),X.name&&(/^.*\[\]$/.test(X.name)&&(c=X.name.match(/^(.*)\[\]$/g)[0],P[c]=0|P[c],c=X.name.replace(/^(.*)\[\]$/,"$1["+P[c]+++"]")),/^(checkbox|radio)$/.test(X.type)&&!X.checked||(n[c||X.name]=this.tagName==="SELECT"&&typeof this.getAttribute("multiple")=="string"?o.val()||[]:this.value))}),n},u.prototype.render=function(f,X){var P=this,n=P.config,R=x(y+(X?'[lay-filter="'+X+'"]':"")),k={input:function(o){var o=o||R.find("input,textarea"),r=(n.autocomplete&&o.attr("autocomplete",n.autocomplete),function(g,w){var F=g.val(),O=Number(F),z=Number(g.attr("step"))||1,ne=Number(g.attr("min")),te=Number(g.attr("max")),re=Number(g.attr("lay-precision")),D=w!=="click"&&F==="",v=w==="init",L=isNaN(O),j=typeof g.attr("lay-step-strictly")=="string";if(g.toggleClass(T,L),!L){if(w==="click"){if(g[0].type==="text"&&typeof g.attr("readonly")=="string")return;O=x(this).index()?O-z:O+z}L=function(J){return((J.toString().match(/\.(\d+$)/)||[])[1]||"").length},re=0<=re?re:Math.max(L(z),L(F)),D||(v||te<=(O=(O=j?Math.round(O/z)*z:O)<=ne?ne:O)&&(O=te),re===0?O=parseInt(O):0'),J=layui.isArray(v.value)?v.value:[v.value],J=x((L=[],layui.each(J,function(m,h){L.push('')}),L.join(""))),$=(j.append(J),v.split&&j.addClass("layui-input-split"),v.className&&j.addClass(v.className),g.next("."+z)),oe=($[0]&&$.remove(),g.parent().hasClass(F)||g.wrap('
        '),g.next("."+O));oe[0]?(($=oe.find("."+z))[0]&&$.remove(),oe.prepend(j),g.css("padding-right",function(){return(g.closest(".layui-input-group")[0]?0:oe.outerWidth())+j.outerWidth()})):(j.addClass(O),g.after(j)),v.show==="auto"&&te(j,g.val()),typeof v.init=="function"&&v.init.call(this,g,v),g.on("input propertychange",function(){var m=this.value;v.show==="auto"&&te(j,m)}),g.on("blur",function(){typeof v.blur=="function"&&v.blur.call(this,g,v)}),J.on("click",function(){var m=g.attr("lay-filter");x(this).hasClass(I)||(typeof v.click=="function"&&v.click.call(this,g,v),layui.event.call(this,M,"input-affix("+m+")",{elem:g[0],affix:w,options:v}))})},D={eye:{value:"eye-invisible",click:function(v,L){var j="LAY_FORM_INPUT_AFFIX_SHOW",J=v.data(j);v.attr("type",J?"password":"text").data(j,!J),re({value:J?"eye-invisible":"eye"})}},clear:{value:"clear",click:function(v){v.val("").focus(),te(x(this).parent(),null)},show:"auto",disabled:ne},number:{value:["up","down"],split:!0,className:"layui-input-number",disabled:g.is("[disabled]"),init:function(v){var L,j,J,$,oe,m;v.attr("type")!=="text"&&v[0].type!=="text"||(J=j=!(L=".lay_input_number"),$=typeof v.attr("readonly")=="string",oe=typeof v.attr("lay-wheel")=="string",m=v.next(".layui-input-number").children("i"),v.attr("lay-input-mirror",v.val()),v.off(L),v.on("keydown"+L,function(h){j=!1,h.keyCode!==8&&h.keyCode!==46||(j=!0),$||m.length!==2||h.keyCode!==38&&h.keyCode!==40||(h.preventDefault(),m.eq(h.keyCode===38?0:1).click())}),v.on("input"+L+" propertychange"+L,function(h){var E,W;J||h.type==="propertychange"&&h.originalEvent.propertyName!=="value"||(j||(h=this.value)===""||h.slice(0,2)!=="00"&&!h.match(/\s/g)&&!((E=h.match(/\./g))&&1=Math.abs(h.deltaY)?h.deltaX:h.deltaY):h.type==="mousewheel"?E=-h.originalEvent.wheelDelta:h.type==="DOMMouseScroll"&&(E=h.originalEvent.detail),m.eq(0s.height()&&we<=ye&&ne.addClass(r+"up"),W(),m&&ae.off("mousedown.lay_select_ieph").on("mousedown.lay_select_ieph",function(){q[0].__ieph=!0,setTimeout(function(){q[0].__ieph=!1},60)}),j=lay.onClickOutside((L?ne:ae)[0],function(){E(),ce&&q.val(ce)},{ignore:U,detectIframe:!0,capture:!1})},E=function(ye){U.parent().removeClass(r+"ed "+r+"up"),q.blur(),v&&ae.children("."+w).remove(),typeof j=="function"&&(j(),j=null),L&&(ne.detach(),x(window).off("resize.lay_select_resize")),ye||G(q.val(),function(we){var ve=B[0].selectedIndex;we&&(ce=x(B[0].options[ve]).prop("text"),ve===0&&ce===q.attr("placeholder")&&(ce=""),q.val(ce||""))})},W=function(){var ye,we,ve=ae.children("dd."+d);ve[0]&&(ye=ve.position().top,we=ae.height(),ve=ve.height(),we").addClass(w).attr("lay-value",we).text(we),Ce=(fe=ae.children().eq(0)).hasClass("layui-select-tips"),fe[Ce?"after":"before"](ue)):pe?ae.find("."+g)[0]||ae.append('

        无匹配项

        '):ae.find("."+g).remove()},"keyup"),we===""&&(B.val(""),ae.find("."+d).removeClass(d),(B[0].options[0]||{}).value||ae.children("dd:eq(0)").addClass(d),ae.find("."+g).remove(),v)&&ae.children("."+w).remove(),void W()))},50)).on("blur",function(ye){var we=B[0].selectedIndex;ce=x(B[0].options[we]).prop("text"),we===0&&ce===q.attr("placeholder")&&(ce=""),setTimeout(function(){G(q.val(),function(ve){ce||q.val("")},"blur")},200)}),ae.on("click","dd",function(){var ye,we,ve=x(this),pe=ve.attr("lay-value"),ue=B.attr("lay-filter");return ve.hasClass(I)||(v&&ve.hasClass(w)&&(we=(ye=x("
        "].join("")),F.after(ne),function(v,L){var j=x(this),$=j.attr("lay-skin")||"primary",J=$==="switch",$=$==="primary";v.on("click",function(){var oe=j.attr("lay-filter");j[0].disabled||(j[0].indeterminate&&(j[0].indeterminate=!1),j[0].checked=!j[0].checked,layui.event.call(j[0],M,L[2]+"("+oe+")",{elem:j[0],value:j[0].value,othis:v}))}),P.syncAppearanceOnPropChanged(this,"checked",function(){var oe;J&&(oe=(v.next("*[lay-checkbox]")[0]?v.next().html():j.attr("title")||"").split("|"),v.children("div").html(!this.checked&&oe[1]||oe[0])),v.toggleClass(L[1],this.checked)}),$&&P.syncAppearanceOnPropChanged(this,"indeterminate",function(){this.indeterminate?v.children(".layui-icon-ok").removeClass("layui-icon-ok").addClass(o.SUBTRA):v.children("."+o.SUBTRA).removeClass(o.SUBTRA).addClass("layui-icon-ok")})}.call(this,ne,te)})},radio:function(g){var o="layui-form-radio",r=["layui-icon-radio","layui-icon-circle"],g=g||R.find("input[type=radio]");g.each(function(w,F){var O=x(this),te=O.next("."+o),z=this.disabled,ne=O.attr("lay-skin");if(O.closest("[lay-ignore]").length)return O.show();_&&C.call(F,"lay-form-sync-checked",F.checked),te[0]&&te.remove();var te=K.escape(F.title||""),re=[],D=(O.next("[lay-radio]")[0]&&(te=(D=O.next()).html()||"",1",'',"
        "+te+"
        ","
        "].join("")));O.after(D),function(v){var L=x(this),j="layui-anim-scaleSpring";v.on("click",function(){var J=L.attr("lay-filter");L[0].disabled||(L[0].checked=!0,layui.event.call(L[0],M,"radio("+J+")",{elem:L[0],value:L[0].value,othis:v}))}),P.syncAppearanceOnPropChanged(this,"checked",function(){var J,$=this;$.checked?(v.addClass(o+"ed"),v.children(".layui-icon").addClass(j+" "+r[0]),J=L.parents(y).find("input[name="+$.name.replace(/(\.|#|\[|\])/g,"\\$1")+"]"),layui.each(J,function(){$!==this&&(this.checked=!1)})):(v.removeClass(o+"ed"),v.children(".layui-icon").removeClass(j+" "+r[0]).addClass(r[1]))})}.call(this,D)})}},X=function(){layui.each(k,function(c,o){o()})};return layui.type(f)==="object"?x(f).is(y)?(R=x(f),X()):f.each(function(c,o){var r=x(o);r.closest(y).length&&(o.tagName==="SELECT"?k.select(r):o.tagName==="INPUT"&&((o=o.type)==="checkbox"||o==="radio"?k[o](r):k.input(r)))}):f?k[f]?k[f]():Y.error('不支持的 "'+f+'" 表单渲染'):X(),P},u.prototype.syncAppearanceOnPropChanged=_?function(f,S,P){var n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,S);Object.defineProperty(f,S,lay.extend({},n,{get:function(){return typeof this.getAttribute("lay-form-sync-"+S)=="string"},set:function(R){C.call(this,"lay-form-sync-"+S,R),P.call(this)}}))}:function(f,S,P){var n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,S);Object.defineProperty(f,S,lay.extend({},n,{get:function(){return n.get.call(this)},set:function(R){n.set.call(this,R),P.call(this)}}))},u.prototype.validate=function(f){var S,P=this.config.verify,n="layui-form-danger";return!(f=x(f))[0]||(f.attr("lay-verify")!==void 0||this.validate(f.find("*[lay-verify]"))!==!1)&&(layui.each(f,function(R,k){var X=x(this),c=(X.attr("lay-verify")||"").split("|"),o=X.attr("lay-vertype"),r=typeof(r=X.val())=="string"?x.trim(r):r;if(X.removeClass(n),layui.each(c,function(g,w){var F="",O=P[w];if(O){var z=typeof O=="function"?F=O(r,k):!O[0].test(r),ne=k.tagName.toLowerCase()==="select"||/^(checkbox|radio)$/.test(k.type),F=F||O[1];if(w==="required"&&(F=X.attr("lay-reqtext")||F),z)return o==="tips"?Q.tips(F,!X.closest("[lay-ignore]").length&&ne?X.next():X,{tips:1}):o==="alert"?Q.alert(F,{title:"提示",shadeClose:!0}):/\b(string|number)\b/.test(typeof F)&&Q.msg(F,{icon:5,shift:6}),setTimeout(function(){(ne?X.next().find("input"):k).focus()},7),X.addClass(n),S=!0}}),S)return S}),!S)},u.prototype.submit=function(R,S){var P={},n=x(this),R=typeof R=="string"?R:n.attr("lay-filter"),k=this.getFormElem?this.getFormElem(R):n.parents(y).eq(0),X=k.find("*[lay-verify]");return!!p.validate(X)&&(P=p.getValue(null,k),X={elem:this.getFormElem?window.event&&window.event.target:this,form:(this.getFormElem?k:n.parents("form"))[0],field:P},typeof S=="function"&&S(X),layui.event.call(this,M,"submit("+R+")",X))});function C(f,n){var P=!!n,n=arguments.length===2&&!n;return this.getAttribute(f)!==null?P||(this.removeAttribute(f),!1):!n&&(this.setAttribute(f,""),!0)}var a=["-",".","e","E","+"],p=new u,u=x(document),s=x(window);x(function(){p.render()}),u.on("reset",y,function(){var f=x(this).attr("lay-filter");setTimeout(function(){p.render(null,f)},50)}),u.on("submit",y,ee).on("click","*[lay-submit]",ee),he(M,p)}),layui.define(["lay","laytpl","laypage","form","util"],function(he){"use strict";var x=layui.$,Q=layui.lay,K=layui.laytpl,Y=layui.laypage,M=layui.layer,y=layui.form,d=layui.util,A=layui.hint(),I=layui.device(),T={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(m){return this.config=x.extend({},this.config,m),this},on:function(m,h){return layui.onevent.call(this,p,m,h)}},_=function(){var m=this,h=m.config,E=h.id||h.index;return{config:h,reload:function(W,G){m.reload.call(m,W,G)},reloadData:function(W,G){T.reloadData(E,W,G)},setColsWidth:function(){m.setColsWidth.call(m)},resize:function(){m.resize.call(m)}}},ee=function(m){var h=_.that[m];return h||A.error(m?"The table instance with ID '"+m+"' not found":"ID argument required"),h||null},C=function(m){var h=_.config[m];return h||A.error(m?"The table instance with ID '"+m+"' not found":"ID argument required"),h||null},a=function(m){var h=this.config||{},E=(m=m||{}).item3,W=m.content;return E.type==="numbers"&&(W=m.tplData[T.config.numbersName]),("escape"in E?E:h).escape&&(W=d.escape(W)),h=m.text&&E.exportTemplet||E.templet||E.toolbar,h&&(W=typeof h=="function"?h.call(E,m.tplData,m.obj):K((function(G){try{return Q(G).html()}catch(B){return G}})(h)||String(W)).render(x.extend({LAY_COL:E},m.tplData))),m.text?x("
        "+W+"
        ").text():W},p="table",u="lay-"+p+"-id",s=".layui-table",f="layui-hide",S="layui-hide-v",P="layui-none",n="layui-table-view",R=".layui-table-header",k=".layui-table-body",X=".layui-table-fixed-r",c=".layui-table-pageview",o=".layui-table-sort",r="layui-table-checked",g="layui-table-edit",w="layui-table-hover",F="laytable-cell-group",O="layui-table-col-special",z="layui-table-tool-panel",ne="layui-table-expanded",te="layui-table-disabled-transition",re="LAY_TABLE_MOVE_DICT",D=function(m){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; } }}',(m=m||{}).fixed&&m.fixed!=="right"?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':m.fixed==="right"?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",`",m.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
        `,'
        ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{-item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
        ","
        "].join("")},v=['',"","
        "].join(""),L=[,"{{# if(d.data.toolbar){ }}",'
        ','
        ','
        ',"
        ","{{# } }}",'
        ',"{{# if(d.data.loading){ }}",'
        ','
        ','{{# if(typeof d.data.loading === "string"){ }}',"{{- d.data.loading}}","{{# } else{ }}",'',"{{# } }}","
        ","
        ","{{# } }}","{{# var left, right; }}",'
        ',D(),"
        ",'
        ',v,"
        ","{{# if(left){ }}",'
        ','
        ',D({fixed:!0}),"
        ",'
        ',v,"
        ","
        ","{{# }; }}","{{# if(right){ }}",'
        ','
        ',D({fixed:"right"}),'
        ',"
        ",'
        ',v,"
        ","
        ","{{# }; }}","
        ","{{# if(d.data.totalRow){ }}",'
        ','','',"
        ","
        ","{{# } }}",'
        ','
        ',"
        "].join(""),j=x(window),J=x(document),$=function(m){this.index=++T.index,this.config=x.extend({},this.config,T.config,m),this.render()},oe=($.prototype.config={limit:10,loading:!0,escape:!0,cellMinWidth:60,cellMaxWidth:Number.MAX_VALUE,editTrigger:"click",defaultToolbar:["filter","exports","print"],defaultContextmenu:!0,autoSort:!0,text:{none:"无数据"},cols:[]},$.prototype.render=function(G){var h=this,E=h.config,B=(E.elem=x(E.elem),E.where=E.where||{},E.id="id"in E?E.id:E.elem.attr("id")||h.index);if(_.that[B]=h,(_.config[B]=E).request=x.extend({pageName:"page",limitName:"limit"},E.request),E.response=x.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},E.response),E.page!==null&&typeof E.page=="object"&&(E.limit=E.page.limit||E.limit,E.limits=E.page.limits||E.limits,h.page=E.page.curr=E.page.curr||1,delete E.page.elem,delete E.page.jump),!E.elem[0])return h;if(E.elem.attr("lay-filter")||E.elem.attr("lay-filter",E.id),G==="reloadData")return h.pullData(h.page,{type:"reloadData"});E.index=h.index,h.key=E.id||E.index,h.setInit(),E.height&&/^full-.+$/.test(E.height)?(h.fullHeightGap=E.height.split("-")[1],E.height=j.height()-(parseFloat(h.fullHeightGap)||0)):E.height&&/^#\w+\S*-.+$/.test(E.height)?(B=E.height.split("-"),h.parentHeightGap=B.pop(),h.parentDiv=B.join("-"),E.height=x(h.parentDiv).height()-(parseFloat(h.parentHeightGap)||0)):typeof E.height=="function"&&(h.customHeightFunc=E.height,E.height=h.customHeightFunc());var W,G=E.elem,B=G.next("."+n),U=h.elem=x("
        ");U.addClass((W=[n,n+"-"+h.index,"layui-form","layui-border-box"],E.className&&W.push(E.className),W.join(" "))).attr(((W={"lay-filter":"LAY-TABLE-FORM-DF-"+h.index,style:(W=[],E.width&&W.push("width:"+E.width+"px;"),W.join(""))})[u]=E.id,W)).html(K(L,{open:"{{",close:"}}",tagStyle:"legacy"}).render({data:E,index:h.index})),h.renderStyle(),B[0]&&B.remove(),G.after(U),h.layTool=U.find(".layui-table-tool"),h.layBox=U.find(".layui-table-box"),h.layHeader=U.find(R),h.layMain=U.find(".layui-table-main"),h.layBody=U.find(k),h.layFixed=U.find(".layui-table-fixed"),h.layFixLeft=U.find(".layui-table-fixed-l"),h.layFixRight=U.find(X),h.layTotal=U.find(".layui-table-total"),h.layPage=U.find(".layui-table-page"),h.renderToolbar(),h.renderPagebar(),h.fullSize(),h.setColsWidth({isInit:!0}),h.pullData(h.page),h.events()},$.prototype.initOpts=function(m){this.config,m.checkbox&&(m.type="checkbox"),m.space&&(m.type="space"),m.type||(m.type="normal"),m.type!=="normal"&&(m.unresize=!0,m.width=m.width||{checkbox:50,radio:50,space:30,numbers:60}[m.type])},$.prototype.setInit=function(m){var h,E,W=this,G=W.config;if(G.clientWidth=G.width||(h=function(U){var q,ae;U=U||G.elem.parent(),q=W.getContentWidth(U);try{ae=U.css("display")==="none"}catch(de){}var le=U.parent();return U[0]&&le&&le[0]&&(!q||ae)?h(le):q})(),m==="width")return G.clientWidth;G.height=G.maxHeight||G.height,G.css&&G.css.indexOf(n)===-1&&(E=G.css.split("}"),layui.each(E,function(U,q){q&&(E[U]="."+n+"-"+W.index+" "+q)}),G.css=E.join("}"));var B=function(U,q,ae,le){var de,ce;le?(le.key=[G.index,U,ae].join("-"),le.colspan=le.colspan||0,le.rowspan=le.rowspan||0,W.initOpts(le),(de=U+(parseInt(le.rowspan)||1)) td:hover > .layui-table-cell{overflow: auto;}"].concat(I.ie?[".layui-table-edit{height: "+W+";}","td[data-edit]:hover:after{height: "+W+";}"]:[]),function(q,ae){ae&&U.push(h+" "+ae)})),G.css&&U.push(G.css),Q.style({target:this.elem[0],text:U.join(""),id:"DF-table-"+B})},$.prototype.renderToolbar=function(){var m,h=this,E=h.config,W=E.elem.attr("lay-filter"),G=['
        ','
        ','
        '].join(""),B=h.layTool.find(".layui-table-tool-temp"),U=(E.toolbar==="default"?B.html(G):typeof E.toolbar=="string"&&(G=x(E.toolbar).html()||"")&&B.html(K(G).render(E)),{filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols",onClick:function(q){var ae,le=q.config;(0,q.openPanel)({list:(ae=[],h.eachCols(function(de,ce){ce.field&&ce.type=="normal"&&ae.push('
      • "+(ce.fieldTitle||ce.title||ce.field)+"").text())+'" lay-filter="LAY_TABLE_TOOL_COLS">
      • ')}),ae.join("")),done:function(){y.on("checkbox(LAY_TABLE_TOOL_COLS)",function(pe){var pe=x(pe.elem),ce=this.checked,ye=pe.data("key"),we=h.col(ye),ve=we.hide,pe=pe.data("parentkey");we.key&&(we.hide=!ce,h.elem.find('*[data-key="'+ye+'"]')[ce?"removeClass":"addClass"](f),ve!=we.hide&&h.setParentCol(!ce,pe),h.resize(),layui.event.call(this,p,"colToggled("+W+")",{col:we,config:le}))})}})}},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export",onClick:function(ce){var ae=ce.data,le=ce.config,de=ce.openPanel,ce=ce.elem;if(!ae.length)return M.tips("当前表格无数据",ce,{tips:3});I.ie?M.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",ce,{tips:3}):de({list:['
      • 导出 CSV 文件
      • '].join(""),done:function(ye,we){we.on("click",function(){var ve=x(this).data("type");T.exportFile.call(h,le.id,null,ve)})}})}},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print",onClick:function(le){var ae=le.data,le=(le.config,le.elem);if(!ae.length)return M.tips("当前表格无数据",le,{tips:3});var ae=window.open("about:blank","_blank"),le=[""].join(""),de=x(h.layHeader.html());de.append(h.layMain.find("table").html()),de.append(h.layTotal.find("table").html()),de.find("th.layui-table-patch").remove(),de.find("thead>tr>th."+O).filter(function(ce,ye){return!x(ye).children("."+F).length}).remove(),de.find("tbody>tr>td."+O).remove(),ae.document.write(le+de.prop("outerHTML")),ae.document.close(),layui.device("edg").edg?(ae.onafterprint=ae.close,ae.print()):(ae.print(),ae.close())}}});typeof E.defaultToolbar=="object"&&(m=[],E.defaultToolbar=x.map(E.defaultToolbar,function(q,ae){var le=typeof q=="string",de=le?U[q]:q;return de&&(!(de=de.name&&U[de.name]?x.extend({},U[de.name],de):de).name&&le&&(de.name=q),m.push('
        ')),de}),h.layTool.find(".layui-table-tool-self").html(m.join("")))},$.prototype.renderPagebar=function(){var m,h=this.config,E=this.layPagebar=x('
        ');h.pagebar&&((m=x(h.pagebar).html()||"")&&E.append(K(m).render(h)),this.layPage.append(E))},$.prototype.setParentCol=function(m,h){var E=this.config,W=this.layHeader.find('th[data-key="'+h+'"]'),G=parseInt(W.attr("colspan"))||0;W[0]&&(h=h.split("-"),h=E.cols[h[1]][h[2]],m?G--:G++,W.attr("colspan",G),W[G?"removeClass":"addClass"](f),h.colspan2=G,h.hide=G<1,E=W.data("parentkey"))&&this.setParentCol(m,E)},$.prototype.setColsPatch=function(){var m=this,h=m.config;layui.each(h.cols,function(E,W){layui.each(W,function(G,B){B.hide&&m.setParentCol(B.hide,B.parentKey)})})},$.prototype.setGroupWidth=function(m){var h,E=this;E.config.cols.length<=1||((h=E.layHeader.find((m?"th[data-key="+m.data("parentkey")+"]>":"")+"."+F)).css("width",0),layui.each(h.get().reverse(),function(){var W=x(this),G=W.parent().data("key"),B=0;E.layHeader.eq(0).find("th[data-parentkey="+G+"]").width(function(U,q){x(this).hasClass(f)||0E.layMain.prop("clientHeight")&&(ue.style.width=parseFloat(ue.style.width)-le+"px")}),!we&&ye?ce.width(E.getContentWidth(de)):ce.width("auto"),E.setGroupWidth()},$.prototype.resize=function(){var m=this;m.layMain&&("isConnected"in m.layMain[0]?m.layMain[0].isConnected:x.contains(document.body,m.layMain[0]))&&(m.fullSize(),m.setColsWidth(),m.scrollPatch())},$.prototype.reload=function(m,h,E){var W=this;m=m||{},delete W.haveInit,layui.each(m,function(G,B){layui.type(B)==="array"&&delete W.config[G]}),W.config=x.extend(h,{},W.config,m),E!=="reloadData"&&(layui.each(W.config.cols,function(G,B){layui.each(B,function(U,q){delete q.colspan2})}),delete W.config.HAS_SET_COLS_PATCH),W.render(E)},$.prototype.errorView=function(W){var h=this,E=h.layMain.find("."+P),W=x('
        '+(W||"Error")+"
        ");E[0]&&(h.layNone.remove(),E.remove()),h.layFixed.addClass(f),h.layMain.find("tbody").html(""),h.layMain.append(h.layNone=W),h.layTotal.addClass(S),h.layPage.find(c).addClass(S),T.cache[h.key]=[],h.syncCheckAll(),h.renderForm(),h.setColsWidth(),h.loading(!1)},$.prototype.page=1,$.prototype.pullData=function(m,h){var E,W,G=this,B=G.config,U=(B.HAS_SET_COLS_PATCH||G.setColsPatch(),B.HAS_SET_COLS_PATCH=!0,B.request),q=B.response,ae=function(){typeof B.initSort=="object"&&G.sort({field:B.initSort.field,type:B.initSort.type,reloadType:h.type})},le=function(de,ce){G.setColsWidth(),G.loading(!1),typeof B.done=="function"&&B.done(de,m,de[q.countName],ce)};h=h||{},typeof B.before=="function"&&B.before(B),G.startTime=new Date().getTime(),h.renderData?((E={})[q.dataName]=T.cache[G.key],E[q.countName]=B.url?layui.type(B.page)==="object"?B.page.count:E[q.dataName].length:B.data.length,typeof B.totalRow=="object"&&(E[q.totalRowName]=x.extend({},G.totalRow)),G.renderData({res:E,curr:m,count:E[q.countName],type:h.type,sort:!0}),le(E,"renderData")):B.url?(W={},B.page&&(W[U.pageName]=m,W[U.limitName]=B.limit),U=x.extend(W,B.where),B.contentType&&B.contentType.indexOf("application/json")==0&&(U=JSON.stringify(U)),G.loading(!0),G._xhr&&G._xhr.readyState!==4&&(G._xhrAbort=!0,G._xhr.abort()),G._xhr=x.ajax({type:B.method||"get",url:B.url,contentType:B.contentType,data:U,dataType:B.dataType||"json",jsonpCallback:B.jsonpCallback,headers:B.headers||{},complete:typeof B.complete=="function"?B.complete:void 0,success:function(de){var ce,ye;(de=typeof B.parseData=="function"&&B.parseData(de)||de)[q.statusName]!=q.statusCode?G.errorView(de[q.msgName]||'返回的数据不符合规范,正确的成功状态码应为:"'+q.statusName+'": '+q.statusCode):(ce=de[q.countName],(ye=Math.ceil(ce/B.limit)||1)','
        "+(function(){var ke,Le=x.extend(!0,{LAY_COL:ue},de),Ie=T.config.checkName,Re=T.config.disabledName;switch(ue.type){case"checkbox":return'';case"radio":return'';case"numbers":return ve}return ue.toolbar?K(x(ue.toolbar).html()||"").render(Le):a.call(G,{item3:ue,content:Se,tplData:Le})})(),"
        "].join(""),ce.push(Ce),ue.fixed&&ue.fixed!=="right"&&ye.push(Ce),ue.fixed==="right"&&we.push(Ce))}),le=['data-index="'+le+'"'],de[T.config.checkName]&&le.push('class="'+r+'"'),le=le.join(" "),U.push(""+ce.join("")+""),q.push(""+ye.join("")+""),ae.push(""+we.join("")+""))}),{trs:U,trs_fixed:q,trs_fixed_r:ae}},T.getTrHtml=function(m,h){return m=ee(m),m.getTrHtml(h,null,m.page)},$.prototype.renderData=function(m){var h=this,E=h.config,q=m.res,W=m.curr,G=h.count=m.count,B=m.sort,U=q[E.response.dataName]||[],q=q[E.response.totalRowName],ae=[],le=[],de=[],ce=function(){if(!B&&h.sortKey)return h.sort({field:h.sortKey.field,type:h.sortKey.sort,pull:!0,reloadType:m.type});h.getTrHtml(U,B,W,{trs:ae,trs_fixed:le,trs_fixed_r:de}),E.scrollPos==="fixed"&&m.type==="reloadData"||h.layBody.scrollTop(0),E.scrollPos==="reset"&&h.layBody.scrollLeft(0),h.layMain.find("."+P).remove(),h.layMain.find("tbody").html(ae.join("")),h.layFixLeft.find("tbody").html(le.join("")),h.layFixRight.find("tbody").html(de.join("")),h.syncCheckAll(),h.renderForm(),h.fullSize(),h.haveInit?h.scrollPatch():setTimeout(function(){h.scrollPatch()},50),h.haveInit=!0,M.close(h.tipsIndex)};return T.cache[h.key]=U,h.layTotal[U.length==0?"addClass":"removeClass"](S),h.layPage[E.page||E.pagebar?"removeClass":"addClass"](f),h.layPage.find(c)[!E.page||G==0||U.length===0&&W==1?"addClass":"removeClass"](S),U.length===0?h.errorView(E.text.none):(h.layFixLeft.removeClass(f),B?ce():(ce(),h.renderTotal(U,q),h.layTotal&&h.layTotal.removeClass(f),void(E.page&&(E.page=x.extend({elem:"layui-table-page"+E.index,count:G,limit:E.limit,limits:E.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(ye,we){we||(h.page=ye.curr,E.limit=ye.limit,h.pullData(ye.curr))}},E.page),E.page.count=G,Y.render(E.page)))))},T.renderData=function(m){m=ee(m),m&&m.pullData(m.page,{renderData:!0,type:"reloadData"})},$.prototype.renderTotal=function(m,h){var E,W=this,G=W.config,B={};G.totalRow&&(layui.each(m,function(U,q){layui.type(q)==="array"&&q.length===0||W.eachCols(function(de,le){var de=le.field||de,ce=q[de];le.totalRow&&(B[de]=(B[de]||0)+(parseFloat(ce)||0))})}),W.dataTotal=[],E=[],W.eachCols(function(ae,q){var ae=q.field||ae,le=h&&h[q.field],de="totalRowDecimals"in q?q.totalRowDecimals:2,de=B[ae]?parseFloat(B[ae]||0).toFixed(de):"",de=(ye=q.totalRowText||"",(ce={LAY_COL:q})[ae]=de,ce=q.totalRow&&a.call(W,{item3:q,content:de,tplData:ce})||ye,le||ce),ce=typeof(ye=q.totalRow||G.totalRow)=="string"?K(ye).render(x.extend({TOTAL_NUMS:le||B[ae],TOTAL_ROW:h||{},LAY_COL:q},q)):de,ye=(q.field&&W.dataTotal.push({field:q.field,total:x("
        "+ce+"
        ").text()}),['','
        "+ce,"
        "].join(""));E.push(ye)}),m=W.layTotal.find(".layui-table-patch"),W.layTotal.find("tbody").html(""+E.join("")+(m.length?m.get(0).outerHTML:"")+""))},$.prototype.getColElem=function(m,h){return m.eq(0).find(".laytable-cell-"+h+":eq(0)")},$.prototype.renderForm=function(m){this.config;var h=this.elem.attr("lay-filter");y.render(m,h)},$.prototype.renderFormByElem=function(m){layui.each(["input","select"],function(h,E){y.render(m.find(E))})},$.prototype.syncCheckAll=function(){var m,h=this,E=h.config,W=h.layHeader.find('input[name="layTableCheckbox"]'),G=T.checkStatus(h.key);W[0]&&(m=G.isAll,h.eachCols(function(B,U){U.type==="checkbox"&&(U[E.checkName]=m)}),W.prop({checked:G.isAll,indeterminate:!G.isAll&&G.data.length}))},$.prototype.setRowActive=function(m,h,E){if(this.config,m=this.layBody.find('tr[data-index="'+m+'"]'),h=h||"layui-table-click",E)return m.removeClass(h);m.addClass(h),m.siblings("tr").removeClass(h)},$.prototype.setRowChecked=function(m){var h,E,W,G,B,U,q,ae=this,le=ae.config,de=m.index==="all",ce=layui.type(m.index)==="array",ye=de||ce;le.tree&&le.tree.view||ye&&(ae.layBox.addClass(te),m.type==="radio")||(ce&&(h={},layui.each(m.index,function(we,ve){h[ve]=!0}),m.index=h),E=ae.layBody.children(".layui-table").children("tbody"),q=ye?"tr":'tr[data-index="'+m.index+'"]',q=E.children(q),E=de?q:q.filter(ce?function(){var we=x(this).data("index");return m.index[we]}:'[data-index="'+m.index+'"]'),m=x.extend({type:"checkbox"},m),W=T.cache[ae.key],G="checked"in m,B=function(we){return m.type==="radio"||(G?m.checked:!we)},E.each(function(){var we=x(this),ve=we.attr("data-index"),pe=W[ve];ve&&layui.type(pe)!=="array"&&!pe[le.disabledName]&&(pe=pe[le.checkName]=B(we.hasClass(r)),we.toggleClass(r,!!pe),m.type==="radio")&&(U=ve,we.siblings().removeClass(r))}),U&&layui.each(W,function(we,ve){Number(U)!==Number(we)&&delete ve[le.checkName]}),q=(ce=(de=E.children("td").children(".layui-table-cell").children('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[m.type]||"checkbox")+'"]:not(:disabled)')).last()).closest(X),(m.type==="radio"&&q.hasClass(f)?de.first():de).prop("checked",B(ce.prop("checked"))),ae.syncCheckAll(),ye&&setTimeout(function(){ae.layBox.removeClass(te)},100))},$.prototype.sort=function(m){var h,E=this,W={},G=E.config,B=G.elem.attr("lay-filter"),U=T.cache[E.key];typeof(m=m||{}).field=="string"&&(q=m.field,E.layHeader.find("th").each(function(de,ce){var ye=x(this),we=ye.data("field");if(we===m.field)return m.field=ye,q=we,!1}));try{var q=q||m.field.data("field"),ae=m.field.data("key");if(E.sortKey&&!m.pull&&q===E.sortKey.field&&m.type===E.sortKey.sort)return;var le=E.layHeader.find("th .laytable-cell-"+ae).find(o);E.layHeader.find("th").find(o).removeAttr("lay-sort"),le.attr("lay-sort",m.type||null),E.layFixed.find("th")}catch(de){A.error("Table modules: sort field '"+q+"' not matched")}E.sortKey={field:q,sort:m.type},G.autoSort&&(m.type==="asc"?h=layui.sort(U,q,null,!0):m.type==="desc"?h=layui.sort(U,q,!0,!0):(h=layui.sort(U,T.config.initIndexName,null,!0),delete E.sortKey,delete G.initSort)),W[G.response.dataName]=h||U,E.renderData({res:W,curr:E.page,count:E.count,sort:!0,type:m.reloadType}),m.fromEvent&&(G.initSort={field:q,type:m.type},layui.event.call(m.field,p,"sort("+B+")",x.extend({config:G},G.initSort)))},$.prototype.loading=function(m){this.config.loading&&this.layBox.find(".layui-table-init").toggleClass(f,!m)},$.prototype.cssRules=function(m,h){var E=this.elem.children("style")[0];Q.getStyleRules(E,function(W){if(W.selectorText===".laytable-cell-"+m)return h(W),!0})},$.prototype.fullSize=function(){var m,h,E=this,W=E.config,G=W.height;E.fullHeightGap?(G=j.height()-E.fullHeightGap)<135&&(G=135):E.parentDiv&&E.parentHeightGap?(G=x(E.parentDiv).height()-E.parentHeightGap)<135&&(G=135):E.customHeightFunc&&(G=E.customHeightFunc())<135&&(G=135),1
        ')).find("div").css({width:E}),U.find("tr").append(q)):U.find(".layui-table-patch").remove()};B(m.layHeader),B(m.layTotal),B=m.layMain.height()-W,m.layFixed.find(k).css("height",h.height()>=B?B:"auto").scrollTop(m.layMain.scrollTop()),m.layFixRight[T.cache[m.key]&&T.cache[m.key].length&&0');Le.html(ke),h.height&&Le.css("max-height",h.height-(m.layTool.outerHeight()||50)),ue.find("."+z)[0]||ue.append(Le),m.renderForm(),Le.on("click",function(Ie){layui.stope(Ie)}),Se.done&&Se.done(Le,ke)};layui.stope(pe),J.trigger("table.tool.panel.remove"),M.close(m.tipsIndex),layui.each(h.defaultToolbar,function(Se,ke){if(ke.layEvent===fe)return typeof ke.onClick=="function"&&ke.onClick({data:Ce,config:h,openPanel:De,elem:ue}),!0}),layui.event.call(this,p,"toolbar("+E+")",x.extend({event:fe,config:h},{}))}),m.layHeader.on("click","*[lay-event]",function(pe){var fe=x(this),ue=fe.attr("lay-event"),fe=fe.closest("th").data("key"),fe=m.col(fe);layui.event.call(this,p,"colTool("+E+")",x.extend({event:ue,config:h,col:fe},{}))}),m.layPagebar.on("click","*[lay-event]",function(pe){var ue=x(this).attr("lay-event");layui.event.call(this,p,"pagebar("+E+")",x.extend({event:ue,config:h},{}))}),W.on("mousemove",function(Ce){var ue=x(this),fe=ue.offset().left,Ce=Ce.clientX-fe;ue.data("unresize")||_.eventMoveElem||(U.allowResize=ue.width()-Ce<=10,B.css("cursor",U.allowResize?"col-resize":""))}).on("mouseleave",function(){x(this),_.eventMoveElem||(U.allowResize=!1,B.css("cursor",""))}).on("mousedown",function(pe){var ue,fe=x(this);U.allowResize&&(ue=fe.data("key"),pe.preventDefault(),U.offset=[pe.clientX,pe.clientY],m.cssRules(ue,function(Ce){var De=Ce.style.width||fe.outerWidth();U.rule=Ce,U.ruleWidth=parseFloat(De),U.minWidth=fe.data("minwidth")||h.cellMinWidth,U.maxWidth=fe.data("maxwidth")||h.cellMaxWidth}),fe.data(re,U),_.eventMoveElem=fe)}),_.docEvent||J.on("mousemove",function(pe){var ue,fe;_.eventMoveElem&&(ue=_.eventMoveElem.data(re)||{},_.eventMoveElem.data("resizing",1),pe.preventDefault(),ue.rule)&&(pe=ue.ruleWidth+pe.clientX-ue.offset[0],fe=_.eventMoveElem.closest("."+n).attr(u),fe=ee(fe))&&((pe=peue.maxWidth&&(pe=ue.maxWidth),ue.rule.style.width=pe+"px",fe.setGroupWidth(_.eventMoveElem),M.close(m.tipsIndex))}).on("mouseup",function(pe){var ue,fe,Ce,De,Se;_.eventMoveElem&&(Ce=(ue=_.eventMoveElem).closest("."+n).attr(u),fe=ee(Ce))&&(Ce=ue.data("key"),De=fe.col(Ce),Se=fe.config.elem.attr("lay-filter"),U={},B.css("cursor",""),fe.scrollPatch(),ue.removeData(re),delete _.eventMoveElem,fe.cssRules(Ce,function(ke){De.width=parseFloat(ke.style.width),layui.event.call(ue[0],p,"colResized("+Se+")",{col:De,config:fe.config})}))}),_.docEvent=!0,W.on("click",function(pe){var ue=x(this),fe=ue.find(o),Ce=fe.attr("lay-sort");if(!fe[0]||ue.data("resizing")===1)return ue.removeData("resizing");m.sort({field:ue,type:Ce==="asc"?"desc":Ce==="desc"?null:"asc",fromEvent:!0})}).find(o+" .layui-edge ").on("click",function(pe){var fe=x(this),ue=fe.index(),fe=fe.parents("th").eq(0).data("field");layui.stope(pe),ue===0?m.sort({field:fe,type:"asc",fromEvent:!0}):m.sort({field:fe,type:"desc",fromEvent:!0})}),m.commonMember=function(pe){var ue=x(this).parents("tr").eq(0).data("index"),fe=m.layBody.find('tr[data-index="'+ue+'"]'),Ce=(T.cache[m.key]||[])[ue]||{},De={tr:fe,config:h,data:T.clearCacheKey(Ce),dataCache:Ce,index:ue,del:function(){T.cache[m.key][ue]=[],fe.remove(),m.scrollPatch()},update:function(Se,ke){m.updateRow({index:ue,data:Se=Se||{},related:ke},function(Le,Ie){De.data[Le]=Ie})},setRowChecked:function(Se){m.setRowChecked(x.extend({index:ue},Se))}};return x.extend(De,pe)}),ae=(m.elem.on("click",'input[name="layTableCheckbox"]+',function(pe){var fe=x(this),ue=fe.closest("td"),fe=fe.prev(),Ce=(m.layBody.find('input[name="layTableCheckbox"]'),fe.parents("tr").eq(0).data("index")),De=fe[0].checked,Se=fe.attr("lay-filter")==="layTableAllChoose";fe[0].disabled||(Se?m.setRowChecked({index:"all",checked:De}):m.setRowChecked({index:Ce,checked:De}),layui.stope(pe),layui.event.call(fe[0],p,"checkbox("+E+")",q.call(fe[0],{checked:De,type:Se?"all":"one",getCol:function(){return m.col(ue.data("key"))}})))}),m.elem.on("click",'input[lay-type="layTableRadio"]+',function(pe){var fe=x(this),ue=fe.closest("td"),fe=fe.prev(),Ce=fe[0].checked,De=fe.parents("tr").eq(0).data("index");if(layui.stope(pe),fe[0].disabled)return!1;m.setRowChecked({type:"radio",index:De}),layui.event.call(fe[0],p,"radio("+E+")",q.call(fe[0],{checked:Ce,getCol:function(){return m.col(ue.data("key"))}}))}),m.layBody.on("mouseenter","tr",function(){var pe=x(this),ue=pe.index();pe.data("off")||m.layBody.find("tr:eq("+ue+")").addClass(w)}).on("mouseleave","tr",function(){var pe=x(this),ue=pe.index();pe.data("off")||m.layBody.find("tr:eq("+ue+")").removeClass(w)}).on("click","tr",function(pe){ae.call(this,"row",pe)}).on("dblclick","tr",function(pe){ae.call(this,"rowDouble",pe)}).on("contextmenu","tr",function(pe){h.defaultContextmenu||pe.preventDefault(),ae.call(this,"rowContextmenu",pe)}),function(pe,ue){var fe=x(this);if(!fe.data("off")){if(pe!=="rowContextmenu"){var Ce=[".layui-form-checkbox",".layui-form-switch",".layui-form-radio","[lay-unrow]"].join(",");if(x(ue.target).is(Ce)||x(ue.target).closest(Ce)[0])return}layui.event.call(this,p,pe+"("+E+")",q.call(fe.children("td")[0],{e:ue}))}}),le=function(pe,ue){var fe,Ce,De;(pe=x(pe)).data("off")||(De=pe.data("field"),Ce=pe.data("key"),Ce=m.col(Ce),fe=pe.closest("tr").data("index"),fe=T.cache[m.key][fe],pe.children(G),(Ce=typeof Ce.edit=="function"?Ce.edit(fe):Ce.edit)&&((Ce=x(Ce==="textarea"?'':''))[0].value=(De=pe.data("content")||fe[De])===void 0||De===null?"":De,pe.find("."+g)[0]||pe.append(Ce),Ce.focus(),ue)&&layui.stope(ue))},de=(m.layBody.on("change","."+g,function(){var De=x(this),pe=De.parent(),ue=this.value,fe=De.parent().data("field"),De=De.closest("tr").data("index"),De=T.cache[m.key][De],Ce=q.call(pe[0],{value:ue,field:fe,oldValue:De[fe],td:pe,reedit:function(){setTimeout(function(){le(Ce.td);var Se={};Se[fe]=Ce.oldValue,Ce.update(Se)})},getCol:function(){return m.col(pe.data("key"))}}),De={};De[fe]=ue,Ce.update(De),layui.event.call(pe[0],p,"edit("+E+")",Ce)}).on("blur","."+g,function(){x(this).remove()}),m.layBody.on(h.editTrigger,"td",function(pe){le(this,pe)}).on("mouseenter","td",function(){ce.call(this)}).on("mouseleave","td",function(){ce.call(this,"hide")}),m.layTotal.on("mouseenter","td",function(){ce.call(this)}).on("mouseleave","td",function(){ce.call(this,"hide")}),"layui-table-grid-down"),ce=function(pe){var ue=x(this),fe=ue.children(G);ue.data("off")||ue.parent().hasClass(ne)||(pe?ue.find(".layui-table-grid-down").remove():!(fe.prop("scrollWidth")>fe.prop("clientWidth")||0'))},ye=function(pe,ue){var fe=x(this),Le=fe.parent(),Ce=Le.data("key"),De=m.col(Ce),Se=Le.parent().data("index"),ke=Le.children(G),Le="layui-table-cell-c",Ie=x('');(ue=ue||De.expandedMode||h.cellExpandedMode)==="tips"?m.tipsIndex=M.tips(['
        ',ke.html(),"
        ",''].join(""),ke[0],{tips:[3,""],time:-1,anim:-1,maxWidth:I.ios||I.android?300:m.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(Re,qe){Re.find(".layui-table-tips-c").on("click",function(){M.close(qe)})}}):(m.elem.find("."+Le).trigger("click"),m.cssRules(Ce,function(Re){var qe=Re.style.width,We=De.expandedWidth||h.cellExpandedWidth;Wetr").each(function(le){U.cols[le]=[],x(this).children().each(function(de){var ye=x(this),ce=ye.attr("lay-data"),ce=Q.options(this,{attr:ce?"lay-data":null,errorText:W+(ce||ye.attr("lay-options"))}),ye=x.extend({title:ye.text(),colspan:parseInt(ye.attr("colspan"))||1,rowspan:parseInt(ye.attr("rowspan"))||1},ce);U.cols[le].push(ye)})}),B.find("tbody>tr")),ae=T.render(U);!q.length||h.data||ae.config.url||(G=0,T.eachCols(ae.config.id,function(le,de){q.each(function(ce){U.data[ce]=U.data[ce]||{};var ye=x(this),we=de.field;U.data[ce][we]=ye.children("td").eq(G).html()}),G++}),ae.reloadData({data:U.data}))}),this},_.that={},_.config={},function(m,h,E,W){var G,B;W.colGroup&&(G=0,m++,W.CHILD_COLS=[],B=E+(parseInt(W.rowspan)||1),layui.each(h[B],function(U,q){q.parentKey?q.parentKey===W.key&&(q.PARENT_COL_INDEX=m,W.CHILD_COLS.push(q),oe(m,h,B,q)):q.PARENT_COL_INDEX||1<=G&&G==(W.colspan||1)||(q.PARENT_COL_INDEX=m,W.CHILD_COLS.push(q),G+=parseInt(1td').filter('[data-field="'+De+'"]')}}})).replace(/"/g,'""'),pe.push(Ce='"'+Ce+'"')):fe.field&&fe.type!=="normal"&&we==0&&(ce[fe.field]=!0)}),le.push(pe.join(","))}),G&&layui.each(G.dataTotal,function(we,ve){ce[ve.field]||de.push('"'+(ve.total||"")+'"')}),ae.join(",")+`\r `+le.join(`\r `)+`\r `+de.join(","))),q.download=(E.title||B.title||"table_"+(B.index||""))+"."+W,document.body.appendChild(q),q.click(),document.body.removeChild(q)},T.getOptions=C,T.hideCol=function(m,h){var E=ee(m);E&&(layui.type(h)==="boolean"?E.eachCols(function(W,q){var B=q.key,U=E.col(B),q=q.parentKey;U.hide!=h&&(U=U.hide=h,E.elem.find('*[data-key="'+B+'"]')[U?"addClass":"removeClass"](f),E.setParentCol(U,q))}):(h=layui.isArray(h)?h:[h],layui.each(h,function(W,G){E.eachCols(function(B,U){var q,ae;G.field===U.field&&(q=U.key,ae=E.col(q),U=U.parentKey,"hide"in G)&&ae.hide!=G.hide&&(ae=ae.hide=!!G.hide,E.elem.find('*[data-key="'+q+'"]')[ae?"addClass":"removeClass"](f),E.setParentCol(ae,U))})})),x("."+z).remove(),E.resize())},T.reload=function(m,h,E,W){if(C(m))return(m=ee(m)).reload(h,E,W),_.call(m)},T.reloadData=function(){var m=x.extend([],arguments),h=(m[3]="reloadData",new RegExp("^("+["elem","id","cols","width","height","maxHeight","toolbar","defaultToolbar","className","css","pagebar"].join("|")+")$"));return layui.each(m[1],function(E,W){h.test(E)&&delete m[1][E]}),T.reload.apply(null,m)},T.render=function(m){return m=new $(m),_.call(m)},T.clearCacheKey=function(m){return delete(m=x.extend({},m))[T.config.checkName],delete m[T.config.indexName],delete m[T.config.initIndexName],delete m[T.config.numbersName],delete m[T.config.disabledName],m},x(function(){T.init()}),he(p,T)}),layui.define(["table"],function(he){"use strict";var x=layui.$,Q=layui.form,K=layui.table,Y=layui.hint(),M={config:{},on:K.on,eachCols:K.eachCols,index:K.index,set:function(D){var v=this;return v.config=x.extend({},v.config,D),v},resize:K.resize,getOptions:K.getOptions,hideCol:K.hideCol,renderData:K.renderData},y=function(){var D=this,v=D.config,L=v.id||v.index;return{config:v,reload:function(j,J){D.reload.call(D,j,J)},reloadData:function(j,J){M.reloadData(L,j,J)}}},d=function(D){var v=y.that[D];return v||Y.error(D?"The treeTable instance with ID '"+D+"' not found":"ID argument required"),v||null},A="lay-table-id",I="layui-hide",T=".layui-table-body",_=".layui-table-main",ee=".layui-table-fixed-l",C=".layui-table-fixed-r",a="layui-table-checked",p="layui-table-tree",u="LAY_DATA_INDEX",s="LAY_DATA_INDEX_HISTORY",f="LAY_PARENT_INDEX",S="LAY_CHECKBOX_HALF",P="LAY_EXPAND",n="LAY_HAS_EXPANDED",R="LAY_ASYNC_STATUS",k=["all","parent","children","none"],X=/<[^>]+?>/,c=["flexIconClose","flexIconOpen","iconClose","iconOpen","iconLeaf","icon"],o=function(D){var v=this;v.index=++M.index,v.config=x.extend(!0,{},v.config,M.config,D),v.init(),v.render()},r=function(D,v,L){var j=K.cache[D];layui.each(L||j,function(J,$){var oe=$[u]||"";oe.indexOf("-")!==-1&&(j[oe]=$),$[v]&&r(D,v,$[v])})},g=function(D,v,L){var j=d(D),J=(L!=="reloadData"&&(j.status={expand:{}}),x.extend(!0,{},j.getOptions(),v)),$=J.tree,oe=$.customName.children,m=$.customName.id,h=(delete v.hasNumberCol,delete v.hasChecboxCol,delete v.hasRadioCol,K.eachCols(null,function(W,G){G.type==="numbers"?v.hasNumberCol=!0:G.type==="checkbox"?v.hasChecboxCol=!0:G.type==="radio"&&(v.hasRadioCol=!0)},J.cols),v.parseData),E=v.done;L==="reloadData"&&J.scrollPos==="fixed"&&(j.scrollTopCache=j.config.elem.next().find(T).scrollTop()),J.url?L&&(!h||h.mod)||(v.parseData=function(){var W=this,B=arguments,G=B[0],B=(layui.type(h)==="function"&&(G=h.apply(W,B)||B[0]),W.response.dataName);return $.data.isSimpleData&&!$.async.enable&&(G[B]=j.flatToTree(G[B])),ne(G[B],function(U){U[P]=P in U?U[P]:U[m]!==void 0&&j.status.expand[U[m]]},oe),W.autoSort&&W.initSort&&W.initSort.type&&layui.sort(G[B],W.initSort.field,W.initSort.type==="desc",!0),j.initData(G[B]),G},v.parseData.mod=!0):v.data!==void 0&&(v.data=v.data||[],$.data.isSimpleData&&(v.data=j.flatToTree(v.data)),j.initData(v.data)),L&&(!E||E.mod)||(v.done=function(){var W,G=arguments,B=G[3],U=B==="renderData",q=(U||delete j.isExpandAll,this.elem.next()),ae=(j.updateStatus(null,{LAY_HAS_EXPANDED:!1}),r(D,oe),q.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));if(ae.length&&(W=M.checkStatus(D),ae.prop({checked:W.isAll&&W.data.length,indeterminate:!W.isAll&&W.data.length})),!U&&J.autoSort&&J.initSort&&J.initSort.type&&M.sort(D),j.renderTreeTable(q),B==="reloadData"&&this.scrollPos==="fixed"&&q.find(T).scrollTop(j.scrollTopCache),layui.type(E)==="function")return E.apply(this,G)},v.done.mod=!0),v&&v.tree&&v.tree.view&&layui.each(c,function(W,G){v.tree.view[G]!==void 0&&(v.tree.view[G]=j.normalizedIcon(v.tree.view[G]))})};o.prototype.init=function(){var D=this.config,v=D.tree.data.cascade,v=(k.indexOf(v)===-1&&(D.tree.data.cascade="all"),K.render(x.extend({},D,{data:[],url:"",done:null}))),L=v.config.id;(y.that[L]=this).tableIns=v,g(L,D)},o.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}}},o.prototype.normalizedIcon=function(D){return D?X.test(D)?D:'':""},o.prototype.getOptions=function(){return this.tableIns?K.getOptions(this.tableIns.config.id):this.config},o.prototype.flatToTree=function(D){var v,L,j,J,$,oe,m,h,G=this.getOptions(),E=G.tree,W=E.customName,G=G.id;return D=D||K.cache[G],G=D,v=W.id,L=W.pid,j=W.children,J=E.data.rootPid,v=v||"id",L=L||"parentId",j=j||"children",m={},h=[],layui.each(G,function(B,U){$=v+U[v],oe=v+U[L],m[$]||(m[$]={},m[$][j]=[]);var q={};q[j]=m[$][j],m[$]=x.extend({},U,q),((J?m[$][L]===J:!m[$][L])?h:(m[oe]||(m[oe]={},m[oe][j]=[]),m[oe][j])).push(m[$])}),h},o.prototype.treeToFlat=function(D,v,L){var j=this,J=j.getOptions().tree.customName,$=J.children,oe=J.pid,m=[];return layui.each(D,function(W,E){var W=(L?L+"-":"")+W,G=x.extend({},E);G[oe]=typeof E[oe]!="undefined"?E[oe]:v,m.push(G),m=m.concat(j.treeToFlat(E[$],E[J.id],W))}),m},o.prototype.getTreeNode=function(D){var v,L,j=this;return D?(L=(v=j.getOptions()).tree,v.id,L.customName,{data:D,dataIndex:D[u],getParentNode:function(){return j.getNodeByIndex(D[f])}}):Y.error("找不到节点数据")},o.prototype.getNodeByIndex=function(D){var v,L,j=this,J=j.getNodeDataByIndex(D);return J?((L=j.getOptions()).tree.customName.parent,v=L.id,(L={data:J,dataIndex:J[u],getParentNode:function(){return j.getNodeByIndex(J[f])},update:function($){return M.updateNode(v,D,$)},remove:function(){return M.removeNode(v,D)},expand:function($){return M.expandNode(v,x.extend({},$,{index:D}))},setChecked:function($){return M.setRowChecked(v,x.extend({},$,{index:D}))}}).dataIndex=D,L):Y.error("找不到节点数据")},o.prototype.getNodeById=function(D){var j=this.getOptions(),v=j.tree.customName.id,L="",j=M.getData(j.id,!0);if(layui.each(j,function(J,$){if($[v]===D)return L=$[u],!0}),L)return this.getNodeByIndex(L)},o.prototype.getNodeDataByIndex=function(D,v,L){var J=this.getOptions(),j=J.tree,J=J.id,J=K.cache[J],$=J[D];if(L!=="delete"&&$)return x.extend($,L),v?x.extend({},$):$;for(var oe=J,m=String(D).split("-"),h=0,E=j.customName.children;h
        '),pe=function(Be){q[R]="success",q[B.children]=Be,W.initData(q[B.children],q[u]),O(D,!0,!ae&&L,j,J,$)},fe=ce.format,layui.type(fe)==="function"?fe(q,h,pe):(ue=x.extend({},ce.where||h.where),fe=ce.autoParam,layui.each(fe,function(Be,Fe){Fe=Fe.split("="),ue[Fe[0].trim()]=q[(Fe[1]||Fe[0]).trim()]}),(fe=ce.contentType||h.contentType)&&fe.indexOf("application/json")==0&&(ue=JSON.stringify(ue)),Ie=ce.method||h.method,Ce=ce.dataType||h.dataType,De=ce.jsonpCallback||h.jsonpCallback,Se=ce.headers||h.headers,ke=ce.parseData||h.parseData,Le=ce.response||h.response,x.ajax({type:Ie||"get",url:ye,contentType:fe,data:ue,dataType:Ce||"json",jsonpCallback:De,headers:Se||{},success:function(Be){(Be=typeof ke=="function"&&ke.call(h,Be)||Be)[Le.statusName]!=Le.statusCode?(q[R]="error",q[P]=!1,we.html('')):pe(Be[Le.dataName])},error:function(Be,Fe){q[R]="error",q[P]=!1,typeof h.error=="function"&&h.error(Be,Fe)}})),de;q[n]=!0,ve.length&&(!h.initSort||h.url&&!h.autoSort||((ce=h.initSort).type?layui.sort(ve,ce.field,ce.type==="desc",!0):layui.sort(ve,K.config.indexName,null,!0)),W.initData(q[B.children],q[u]),Ie=K.getTrHtml(m,ve,null,null,E),Re={trs:x(Ie.trs.join("")),trs_fixed:x(Ie.trs_fixed.join("")),trs_fixed_r:x(Ie.trs_fixed_r.join(""))},qe=(E.split("-").length-1||0)+1,layui.each(ve,function(Be,Fe){Re.trs.eq(Be).attr({"data-index":Fe[u],"lay-data-index":Fe[u],"data-level":qe}).data("index",Fe[u]),Re.trs_fixed.eq(Be).attr({"data-index":Fe[u],"lay-data-index":Fe[u],"data-level":qe}).data("index",Fe[u]),Re.trs_fixed_r.eq(Be).attr({"data-index":Fe[u],"lay-data-index":Fe[u],"data-level":qe}).data("index",Fe[u])}),oe.find(_).find('tbody tr[lay-data-index="'+E+'"]').after(Re.trs),oe.find(ee).find('tbody tr[lay-data-index="'+E+'"]').after(Re.trs_fixed),oe.find(C).find('tbody tr[lay-data-index="'+E+'"]').after(Re.trs_fixed_r),W.renderTreeTable(Re.trs,qe),L)&&!ae&&layui.each(ve,function(Be,Fe){O({dataIndex:Fe[u],trElem:oe.find('tr[lay-data-index="'+Fe[u]+'"]').first(),tableViewElem:oe,tableId:m,options:h},v,L,j,J,$)})}else W.isExpandAll=!1,(L&&!ae?(layui.each(ve,function(We,je){O({dataIndex:je[u],trElem:oe.find('tr[lay-data-index="'+je[u]+'"]').first(),tableViewElem:oe,tableId:m,options:h},v,L,j,J,$)}),oe.find(ve.map(function(We,je,Be){return'tr[lay-data-index="'+We[u]+'"]'}).join(","))):(ye=W.treeToFlat(ve,q[B.id],E),oe.find(ye.map(function(We,je,Be){return'tr[lay-data-index="'+We[u]+'"]'}).join(",")))).addClass(I);F("resize-"+m,function(){M.resize(m)},0)(),J&&q[R]!=="loading"&&(fe=G.callback.onExpand,layui.type(fe)==="function")&&fe(m,q,le),layui.type($)==="function"&&q[R]!=="loading"&&$(m,q,le)}return de},z=(M.expandNode=function(oe,v){var L,j,J,$,oe=d(oe);if(oe)return L=(v=v||{}).index,j=v.expandFlag,J=v.inherit,$=v.callbackFlag,oe=oe.getOptions().elem.next(),O({trElem:oe.find('tr[lay-data-index="'+L+'"]').first()},j,J,null,$,v.done)},M.expandAll=function(D,v){if(layui.type(v)!=="boolean")return Y.error("expandAll 的展开状态参数只接收true/false");var L=d(D);if(L){L.isExpandAll=v;var j=L.getOptions(),J=j.tree,$=j.elem.next(),oe=J.customName.isParent,m=J.customName.id,h=J.view.showFlexIconIfNotParent;if(v){if(v=M.getData(D,!0),J.async.enable){var E=!0;if(layui.each(v,function(U,q){if(q[oe]&&!q[R])return!(E=!1)}),!E)return void layui.each(M.getData(D),function(U,q){M.expandNode(D,{index:q[u],expandFlag:!0,inherit:!0})})}var W=!0;if(layui.each(v,function(U,q){if(q[oe]&&!q[n])return!(W=!1)}),W)L.updateStatus(null,function(U){(U[oe]||h)&&(U[P]=!0,U[m]!==void 0)&&(L.status.expand[U[m]]=!0)}),$.find('tbody tr[data-level!="0"]').removeClass(I),$.find(".layui-table-tree-flexIcon").html(J.view.flexIconOpen),J.view.showIcon&&$.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(J.view.iconOpen);else{if(L.updateStatus(null,function(q){(q[oe]||h)&&(q[P]=!0,q[n]=!0,q[m]!==void 0)&&(L.status.expand[q[m]]=!0)}),j.initSort&&j.initSort.type&&j.autoSort)return M.sort(D);var G,j=K.getTrHtml(D,v),B={trs:x(j.trs.join("")),trs_fixed:x(j.trs_fixed.join("")),trs_fixed_r:x(j.trs_fixed_r.join(""))};layui.each(v,function(q,ae){var le=ae[u].split("-").length-1;G={"data-index":ae[u],"lay-data-index":ae[u],"data-level":le},B.trs.eq(q).attr(G).data("index",ae[u]),B.trs_fixed.eq(q).attr(G).data("index",ae[u]),B.trs_fixed_r.eq(q).attr(G).data("index",ae[u])}),layui.each(["main","fixed-l","fixed-r"],function(q,ae){$.find(".layui-table-"+ae+" tbody").html(B[["trs","trs_fixed","trs_fixed_r"][q]])}),L.renderTreeTable($,0,!1)}}else L.updateStatus(null,function(U){(U[oe]||h)&&(U[P]=!1,U[m]!==void 0)&&(L.status.expand[U[m]]=!1)}),$.find('.layui-table-box tbody tr[data-level!="0"]').addClass(I),$.find(".layui-table-tree-flexIcon").html(J.view.flexIconClose),J.view.showIcon&&$.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(J.view.iconClose);M.resize(D)}},o.prototype.updateNodeIcon=function(J){var v=this.getOptions().tree||{},L=J.scopeEl,j=J.isExpand,J=J.isParent;L.find(".layui-table-tree-flexIcon").css("visibility",J||v.view.showFlexIconIfNotParent?"visible":"hidden").html(j?v.view.flexIconOpen:v.view.flexIconClose),v.view.showIcon&&(L=L.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom)"),j=J?j?v.view.iconOpen:v.view.iconClose:v.view.iconLeaf,L.toggleClass("layui-table-tree-iconLeaf",!J).html(j))},o.prototype.renderTreeTable=function(D,v,L){var j=this,J=j.getOptions(),$=J.elem.next(),oe=($.hasClass(p)||$.addClass(p),J.id),m=J.tree||{},h=(m.data,m.view||{}),E=m.customName||{},W=E.isParent,G=($.attr("lay-filter"),j),B=J.data.length,U=((v=v||0)||($.find(".layui-table-body tr:not([data-level])").attr("data-level",v),layui.each(K.cache[oe],function(le,de){B&&(de[u]=String(le)),de=de[u],$.find('.layui-table-main tbody tr[data-level="0"]:eq('+le+")").attr("lay-data-index",de),$.find('.layui-table-fixed-l tbody tr[data-level="0"]:eq('+le+")").attr("lay-data-index",de),$.find('.layui-table-fixed-r tbody tr[data-level="0"]:eq('+le+")").attr("lay-data-index",de)})),null),q=E.name,ae=h.indent||20;if(layui.each(D.find('td[data-field="'+q+'"]'),function(le,ve){var ce,ye,we=(ve=x(ve)).closest("tr"),ve=ve.children(".layui-table-cell");ve.hasClass("layui-table-tree-item")||(ye=we.attr("lay-data-index"))&&(we=$.find('tr[lay-data-index="'+ye+'"]'),(ce=G.getNodeDataByIndex(ye))[P]&&ce[W]&&((U=U||{})[ye]=!0),ce[S]&&we.find('input[type="checkbox"][name="layTableCheckbox"]').prop("indeterminate",!0),ye=ve.html(),(ve=we.find('td[data-field="'+q+'"]>div.layui-table-cell')).addClass("layui-table-tree-item"),ve.html(['
        ',ce[P]?h.flexIconOpen:h.flexIconClose,"
        ",h.showIcon?'
        '+(j.normalizedIcon(ce[E.icon])||h.icon||(ce[W]?ce[P]?h.iconOpen:h.iconClose:h.iconLeaf)||"")+"
        ":"",ye].join("")).find(".layui-table-tree-flexIcon").on("click",function(pe){layui.stope(pe),O({trElem:we},null,null,null,!0)}))}),!v&&m.view.expandAllDefault&&j.isExpandAll===void 0)return M.expandAll(oe,!0);(L!==!1&&U?(layui.each(U,function(le,de){le=$.find('tr[lay-data-index="'+le+'"]'),le.find(".layui-table-tree-flexIcon").html(h.flexIconOpen),O({trElem:le.first()},!0)}),F("renderTreeTable2-"+oe,function(){Q.render(x(".layui-table-tree["+A+'="'+oe+'"]'))},0)):F("renderTreeTable-"+oe,function(){J.hasNumberCol&&z(j),Q.render(x(".layui-table-tree["+A+'="'+oe+'"]'))},0))()},function(D){var v=D.getOptions(),L=v.elem.next(),j=0,J=L.find(".layui-table-main tbody tr"),$=L.find(".layui-table-fixed-l tbody tr"),oe=L.find(".layui-table-fixed-r tbody tr");layui.each(D.treeToFlat(K.cache[v.id]),function(m,h){h.LAY_HIDE||(D.getNodeDataByIndex(h[u]).LAY_NUM=++j,J.eq(m).find(".laytable-cell-numbers").html(j),$.eq(m).find(".laytable-cell-numbers").html(j),oe.eq(m).find(".laytable-cell-numbers").html(j))})}),ne=(o.prototype.render=function(D){var v=this;v.tableIns=K[D==="reloadData"?"reloadData":"reload"](v.tableIns.config.id,x.extend(!0,{},v.config)),v.config=v.tableIns.config},o.prototype.reload=function(D,v,L){var j=this;D=D||{},delete j.haveInit,layui.each(D,function(J,$){layui.type($)==="array"&&delete j.config[J]}),g(j.getOptions().id,D,L||!0),j.config=x.extend(v,{},j.config,D),j.render(L)},M.reloadData=function(){var D=x.extend(!0,[],arguments);return D[3]="reloadData",M.reload.apply(null,D)},function(D,v,L,j){var J=[];return layui.each(D,function($,oe){layui.type(v)==="function"?v(oe):x.extend(oe,v),J.push(x.extend({},oe)),j||(J=J.concat(ne(oe[L],v,L,j)))}),J}),te=(o.prototype.updateStatus=function(D,v,L){var j=this.getOptions(),J=j.tree;return D=D||K.cache[j.id],ne(D,v,J.customName.children,L)},o.prototype.getTableData=function(){var D=this.getOptions();return K.cache[D.id]},M.updateStatus=function(j,v,L){var j=d(j),J=j.getOptions();return L=L||(J.url?K.cache[J.id]:J.data),j.updateStatus(L,v)},M.sort=function(D){var v,L,j,J,$,oe=d(D);oe&&($=(v=oe.getOptions()).tree,L=M.getData(D),j=$.customName.children,J=function(m,h,E){layui.sort(m,h,E,!0),layui.each(m,function(W,G){J(G[j]||[],h,E)})},v.autoSort)&&(($=v.initSort).type?J(L,$.field,$.type==="desc"):J(L,K.config.indexName,null),K.cache[D]=L,oe.initData(L),M.renderData(D))},function(D){var v=D.config.id,L=d(v),j=D.data=M.getNodeDataByIndex(v,D.index),J=j[u],$=(D.dataIndex=J,D.update);D.update=function(){var oe=arguments,m=(x.extend(L.getNodeDataByIndex(J),oe[0]),$.apply(this,oe)),h=D.config.tree.customName.name;return h in oe[0]&&D.tr.find('td[data-field="'+h+'"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"),L.renderTreeTable(D.tr,D.tr.attr("data-level"),!1),m},D.del=function(){M.removeNode(v,j)},D.setRowChecked=function(oe){M.setRowChecked(v,{index:j,checked:oe})}}),re=(M.updateNode=function(D,v,L){var j,J,$,oe,m,h=d(D);h&&((oe=h.getOptions()).tree,oe=(j=oe.elem.next()).find('tr[lay-data-index="'+v+'"]'),J=oe.attr("data-index"),$=oe.attr("data-level"),L)&&(oe=h.getNodeDataByIndex(v,!1,L),m=K.getTrHtml(D,[oe]),layui.each(["main","fixed-l","fixed-r"],function(E,W){j.find(".layui-table-"+W+' tbody tr[lay-data-index="'+v+'"]').replaceWith(x(m[["trs","trs_fixed","trs_fixed_r"][E]].join("")).attr({"data-index":J,"lay-data-index":v,"data-level":$}).data("index",J))}),h.renderTreeTable(j.find('tr[lay-data-index="'+v+'"]'),$))},M.removeNode=function(D,v,L){var j=d(D);if(j){var J,$=j.getOptions(),B=$.tree,oe=B.customName.isParent,m=B.customName.children,h=$.elem.next(),E=[],W=K.cache[D],v=j.getNodeDataByIndex(layui.type(v)==="string"?v:v[u],!1,"delete"),G=j.getNodeDataByIndex(v[f]),B=(j.updateCheckStatus(G),j.treeToFlat([v],v[B.customName.pid],v[f])),v=(layui.each(B,function(q,ae){ae=ae[u],E.push('tr[lay-data-index="'+ae+'"]'),ae.indexOf("-")!==-1&&delete W[ae]}),h.find(E.join(",")).remove(),j.initData());for(J in W)J.indexOf("-")!==-1&&J!==W[J][u]&&delete W[J];layui.each(j.treeToFlat(v),function(q,ae){ae[s]&&ae[s]!==ae[u]&&h.find('tr[lay-data-index="'+ae[s]+'"]').attr({"data-index":ae[u],"lay-data-index":ae[u]}).data("index",ae[u])}),layui.each(W,function(q,ae){h.find('tr[data-level="0"][lay-data-index="'+ae[u]+'"]').attr("data-index",q).data("index",q)}),$.hasNumberCol&&z(j),G&&(B=h.find('tr[lay-data-index="'+G[u]+'"]'),L||(G[oe]=!(!G[m]||!G[m].length)),j.updateNodeIcon({scopeEl:B,isExpand:G[P],isParent:G[oe]})),M.resize(D)}},M.addNodes=function(D,v){var L=d(D);if(L){var j=L.getOptions(),J=j.tree,$=j.elem.next(),oe=K.config.checkName,m=(v=v||{}).parentIndex,E=v.index,W=v.data,v=v.focus,h=(m=layui.type(m)==="number"?m.toString():m)?L.getNodeDataByIndex(m):null,E=layui.type(E)==="number"?E:-1,W=x.extend(!0,[],layui.isArray(W)?W:[W]);if(layui.each(W,function(ce,ye){oe in ye||!h||(ye[oe]=h[oe])}),L.getTableData(),h){var G=J.customName.isParent,U=J.customName.children;h[G]=!0;var B=(B=h[U])?(q=B.splice(E===-1?B.length:E),h[U]=B.concat(W,q)):h[U]=W,U=(L.updateStatus(B,function(ce){(ce[G]||J.view.showFlexIconIfNotParent)&&(ce[n]=!1)}),L.treeToFlat(B));$.find(U.map(function(ce){return'tr[lay-data-index="'+ce[u]+'"]'}).join(",")).remove(),L.initData(),h[n]=!1,h[R]="local",O({trElem:$.find('tr[lay-data-index="'+m+'"]')},!0)}else{var q=K.cache[D].splice(E===-1?K.cache[D].length:E);if(K.cache[D]=K.cache[D].concat(W,q),j.url||(j.page?(B=j.page,j.data.splice.apply(j.data,[B.limit*(B.curr-1),B.limit].concat(K.cache[D]))):j.data=K.cache[D]),L.initData(),$.find(".layui-none").length)return K.renderData(D),W;var ae,U=K.getTrHtml(D,W),le={trs:x(U.trs.join("")),trs_fixed:x(U.trs_fixed.join("")),trs_fixed_r:x(U.trs_fixed_r.join(""))},m=(layui.each(W,function(pe,ue){ae={"data-index":ue[u],"lay-data-index":ue[u],"data-level":"0"},le.trs.eq(pe).attr(ae).data("index",ue[u]),le.trs_fixed.eq(pe).attr(ae).data("index",ue[u]),le.trs_fixed_r.eq(pe).attr(ae).data("index",ue[u])}),parseInt(W[0][u])-1),B=$.find(_),j=$.find(ee),U=$.find(C);m==-1?B.find('tr[data-level="0"][data-index="0"]')[0]?(B.find('tr[data-level="0"][data-index="0"]').before(le.trs),j.find('tr[data-level="0"][data-index="0"]').before(le.trs_fixed),U.find('tr[data-level="0"][data-index="0"]').before(le.trs_fixed_r)):(B.find("tbody").prepend(le.trs),j.find("tbody").prepend(le.trs_fixed),U.find("tbody").prepend(le.trs_fixed_r)):E===-1?(B.find("tbody").append(le.trs),j.find("tbody").append(le.trs_fixed),U.find("tbody").append(le.trs_fixed_r)):(m=q[0][s],B.find('tr[data-level="0"][data-index="'+m+'"]').before(le.trs),j.find('tr[data-level="0"][data-index="'+m+'"]').before(le.trs_fixed),U.find('tr[data-level="0"][data-index="'+m+'"]').before(le.trs_fixed_r)),layui.each(K.cache[D],function(pe,ue){$.find('tr[data-level="0"][lay-data-index="'+ue[u]+'"]').attr("data-index",pe).data("index",pe)}),L.renderTreeTable($.find(W.map(function(pe,ue,fe){return'tr[lay-data-index="'+pe[u]+'"]'}).join(",")))}return L.updateCheckStatus(h),h&&(E=$.find('tr[lay-data-index="'+h[u]+'"]'),L.updateNodeIcon({scopeEl:E,isExpand:h[P],isParent:h[G]})),M.resize(D),v&&$.find(_).find('tr[lay-data-index="'+W[0][u]+'"]').get(0).scrollIntoViewIfNeeded(),W}},M.checkStatus=function(D,v){var L,j,J,$=d(D);if($)return $=$.getOptions().tree,L=K.config.checkName,j=M.getData(D,!0).filter(function(oe,m,h){return oe[L]||v&&oe[S]}),J=!0,layui.each($.data.cascade==="all"?K.cache[D]:M.getData(D,!0),function(oe,m){if(!m[L])return!(J=!1)}),{data:j,isAll:J}},M.on("sort",function(L){var L=L.config,v=L.elem.next(),L=L.id;v.hasClass(p)&&M.sort(L)}),M.on("row",function(D){D.config.elem.next().hasClass(p)&&te(D)}),M.on("rowDouble",function(D){var v=D.config,L=v.elem.next();v.id,L.hasClass(p)&&(te(D),(v.tree||{}).view.dblClickExpand)&&O({trElem:D.tr.first()},null,null,null,!0)}),M.on("rowContextmenu",function(D){var v=D.config,L=v.elem.next();v.id,L.hasClass(p)&&te(D)}),M.on("tool",function(D){var v=D.config,L=v.elem.next();v.id,L.hasClass(p)&&te(D)}),M.on("edit",function(D){var v=D.config,L=v.elem.next();v.id,L.hasClass(p)&&(te(D),D.field===v.tree.customName.name)&&((L={})[D.field]=D.value,D.update(L))}),M.on("radio",function(D){var L=D.config,v=L.elem.next(),L=L.id;v.hasClass(p)&&(v=d(L),te(D),re.call(v,D.tr,D.checked))}),o.prototype.setRowCheckedClass=function(D,v){var L=this.getOptions(),j=(D.data("index"),L.elem.next());D[v?"addClass":"removeClass"](a),D.each(function(){var J=x(this).data("index");j.find('.layui-table-fixed-r tbody tr[data-index="'+J+'"]')[v?"addClass":"removeClass"](a)})},o.prototype.updateCheckStatus=function(D,v){var L,j,J,$,oe,m,h,E=this,W=E.getOptions();return!!W.hasChecboxCol&&(L=W.tree,j=W.id,J=W.elem.next(),$=K.config.checkName,(oe=L.data.cascade)!=="all"&&oe!=="parent"||!D||(oe=E.updateParentCheckStatus(D,layui.type(v)==="boolean"?v:null),layui.each(oe,function(G,B){var U=J.find('tr[lay-data-index="'+B[u]+'"] input[name="layTableCheckbox"]:not(:disabled)'),q=B[$];E.setRowCheckedClass(U.closest("tr"),q),U.prop({checked:q,indeterminate:B[S]})})),h=!(m=!0),0<(D=(D=L.data.cascade==="all"?K.cache[j]:M.getData(j,!0)).filter(function(G){return!G[W.disabledName]})).length?layui.each(D,function(G,B){if((B[$]||B[S])&&(h=!0),B[$]||(m=!1),h&&!m)return!0}):m=!1,h=h&&!m,J.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({checked:m,indeterminate:h}),m)},o.prototype.updateParentCheckStatus=function(D,v){var L,j=this.getOptions(),$=j.tree,j=j.id,J=K.config.checkName,$=$.customName.children,oe=[];return!(D[S]=!1)===v?D[$].length?layui.each(D[$],function(m,h){if(!h[J])return v=!1,D[S]=!0}):v=!1:v===!1?layui.each(D[$],function(m,h){if(h[J]||h[S])return D[S]=!0}):(v=!1,L=0,layui.each(D[$],function(m,h){h[J]&&L++}),v=D[$].length?D[$].length===L:D[J],D[S]=!v&&0li"],d.bodyElem=["."+Q.CONST.BODY+":eq(0)",">."+Q.CONST.ITEM],d.getContainer=function(){var T=d.documentElem||A.elem;return{header:{elem:T.find(d.headerElem[0]),items:T.find(d.headerElem.join(""))},body:{elem:T.find(d.bodyElem[0]),items:T.find(d.bodyElem.join(""))}}},layui.type(A.header)==="array"?typeof A.header[0]=="string"?(d.headerElem=A.header.concat(),d.documentElem=x(document)):(d.elemView=x('
        '),A.className&&d.elemView.addClass(A.className),M=x('
          '),y=x('
          '),layui.each(A.header,function(T,_){_=d.renderHeaderItem(_),M.append(_)}),layui.each(A.body,function(T,_){_=d.renderBodyItem(_),y.append(_)}),d.elemView.append(M).append(y),A.elem.html(d.elemView)):d.renderClose(),layui.type(A.body)==="array"&&typeof A.body[0]=="string"&&(d.documentElem=x(document),d.bodyElem=A.body.concat()),d.data());"index"in A&&I.index!=A.index?d.change(d.findHeaderItem(A.index),!0):I.index===-1&&d.change(d.findHeaderItem(0),!0),d.roll("auto"),A.elem.hasClass(Q.CONST.CLASS_HIDEV)&&A.elem.removeClass(Q.CONST.CLASS_HIDEV),typeof A.afterRender=="function"&&A.afterRender(I),layui.event.call(A.elem[0],Q.CONST.MOD_NAME,"afterRender("+A.id+")",I)},events:function(){var M,y=this,A=y.config,d=y.getContainer(),I=Q.CONST.MOD_NAME,d=(y.documentElem?d.header:A).elem,A=A.trigger+(".lay_"+I+"_trigger"),I=y.documentElem?y.headerElem[1]:y.headerElem.join("");d.off(A).on(A,I,function(){y.change(x(this))}),K.onresize||(x(window).on("resize",function(){clearTimeout(M),M=setTimeout(function(){layui.each(Q.cache.id,function(T){T=Q.getInst(T),T&&T.roll("init")})},50)}),K.onresize=!0)}}),K={},Y=Q.Class;Y.prototype.add=function(M){var y,d,A=this,I=(A.config,A.getContainer()),T=A.renderHeaderItem(M),_=A.renderBodyItem(M),ee=A.data();M=x.extend({active:!0},M),/(before|after)/.test(M.mode)?(d=(y=M.hasOwnProperty("index"))?A.findHeaderItem(M.index):ee.thisHeaderItem,y=y?A.findBodyItem(M.index):ee.thisHeaderItem,d[M.mode](T),y[M.mode](_)):(d={prepend:"prepend",append:"append"}[M.mode||"append"]||"append",I.header.elem[d](T),I.body.elem[d](_)),M.active?A.change(T,!0):A.roll("auto"),typeof M.done=="function"&&M.done(x.extend(ee,{headerItem:T,bodyItem:_}))},Y.prototype.close=function(M,y){if(M&&M[0]){var d=this,A=d.config,I=M.attr("lay-id"),T=M.index();if(M.attr("lay-closable")!=="false"){var _=d.data();if(!y&&layui.event.call(M[0],Q.CONST.MOD_NAME,"beforeClose("+A.id+")",x.extend(_,{index:T}))===!1)return;M.hasClass(Q.CONST.CLASS_THIS)&&(M.next()[0]?d.change(M.next(),!0):M.prev()[0]&&d.change(M.prev(),!0)),d.findBodyItem(I||T).remove(),M.remove(),d.roll("auto",T),_=d.data(),layui.event.call(_.thisHeaderItem[0],Q.CONST.MOD_NAME,"afterClose("+A.id+")",_)}}},Y.prototype.closeMult=function(M,y){var d=this,A=d.config,T=d.getContainer(),C=d.data(),I=T.header.items,T=(T.body.items,'[lay-closable="false"]'),_=(y=y===void 0?C.index:y,d.findHeaderItem(y)),ee=(d.findBodyItem(y),_.index()),C=(C.thisHeaderItem.attr("lay-closable")!=="false"&&(M!=="all"&&M?y!==C.index&&d.change(_,!0):(y=I.filter(":gt("+C.index+")"+T).eq(0),_=x(I.filter(":lt("+C.index+")"+T).get().reverse()).eq(0),y[0]?d.change(y,!0):_[0]&&d.change(_,!0))),I.each(function(a){var p=x(this),u=p.attr("lay-id"),u=d.findBodyItem(u||a);p.attr("lay-closable")!=="false"&&(M==="other"&&a!==ee||M==="right"&&ee");return y.html(M.title||"New Tab").attr("lay-id",M.id),this.appendClose(y,M),y},Y.prototype.renderBodyItem=function(M){var y=this.config,y=x(M.bodyItem||y.bodyItem||'
          ');return y.html(M.content||"").attr("lay-id",M.id),y},Y.prototype.appendClose=function(M,y){var d=this;d.config.closable&&((y=y||{}).closable==0&&M.attr("lay-closable","false"),M.attr("lay-closable")==="false"||M.find("."+Q.CONST.CLOSE)[0]||((y=x('')).on("click",function(){return d.close(x(this).parent()),!1}),M.append(y)))},Y.prototype.renderClose=function(){var M=this,y=M.config;M.getContainer().header.items.each(function(){var d=x(this);y.closable?M.appendClose(d):d.find("."+Q.CONST.CLOSE).remove()})},Y.prototype.roll=function(M,y){var d=this,A=d.config,_=d.getContainer(),I=_.header.elem,T=_.header.items,_=I.prop("scrollWidth"),ee=Math.ceil(I.outerWidth()),C=I.data("left")||0,a=A.headerMode==="scroll",p="layui-tabs-scroll",u="layui-tabs-bar",s=["layui-icon-prev","layui-icon-next"],f={elem:x('
          '),bar:x(['
          ','','',"
          "].join(""))};if(A.headerMode!=="normal"){var S,P=I.parent("."+p);if(a||!a&&ee<_)P[0]||(A.elem.hasClass(Q.CONST.CARD)&&f.elem.addClass(Q.CONST.CARD),I.wrap(f.elem),I.after(f.bar),f.bar.children().on("click",function(){var n=x(this).attr("lay-mode");x(this).hasClass(Q.CONST.CLASS_DISABLED)||n&&d.roll(n)}));else if(!a){if(!P[0])return;P.find("."+u).remove(),I.unwrap().css("left",0).data("left",0)}M!=="init"&&(_=I.prop("scrollWidth"),ee=I.outerWidth(),P=I.parent("."+p),M==="prev"?((S=-C-ee)<0&&(S=0),T.each(function(n,R){if(R=x(R),R=Math.ceil(R.position().left),S<=R)return I.css("left",-R).data("left",-R),!1})):M==="auto"?(function(){y=isNaN(y)?d.data().index:y;var n=T.eq(y);if(n[0]){var R=Math.ceil(n.position().left);if(0<(k=R-(n.prev().outerWidth()||0))&&(k-=1),C+k<0)return C=0<=k?k:0,I.css("left",-C).data("left",-C);var k=R+n.outerWidth()+(n.next().outerWidth()||0)+1;0=ee-C)return I.css("left",-X).data("left",-X),!1}),C=I.data("left")||0,P.find("."+s[0])[C<0?"removeClass":"addClass"](Q.CONST.CLASS_DISABLED),P.find("."+s[1])[0')),o=(k.tree(c),X.elem=x(X.elem));if(o[0]){if(k.key=X.id||k.index,k.elem=c,k.elemNone=x('
          '+X.text.none+"
          "),o.html(k.elem),k.elem.find(".layui-tree-set").length==0)return k.elem.append(k.elemNone);X.showCheckbox&&k.renderForm("checkbox"),k.elem.find(".layui-tree-set").each(function(){var r=x(this);r.parent(".layui-tree-pack")[0]||r.addClass("layui-tree-setHide"),!r.next()[0]&&r.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&r.addClass(S),r.next()[0]||r.parents(".layui-tree-set").eq(0).next()[0]||r.addClass(S)}),k.events()}},R.prototype.renderForm=function(k){Q.render(k,"LAY-tree-"+this.index)},R.prototype.tree=function(k,g){var c=this,o=c.config,r=o.customName,g=g||o.data;layui.each(g,function(w,F){var O,z,ne=F[r.children]&&0"),re=x(['
          ','
          ','
          ',o.showLine?ne?'':'':'',o.showCheckbox?'':"",o.isJump&&F.href?''+(F[r.title]||F.label||o.text.defaultNodeName)+"":''+(F[r.title]||F.label||o.text.defaultNodeName)+"","
          ",o.edit?(O={add:'',update:'',del:''},z=['
          '],o.edit===!0&&(o.edit=["update","del"]),typeof o.edit=="object"?(layui.each(o.edit,function(D,v){z.push(O[v]||"")}),z.join("")+"
          "):void 0):"","
          "].join(""));ne&&(re.append(te),c.tree(te,F[r.children])),k.append(re),re.prev("."+T)[0]&&re.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),ne||re.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),c.spread(re,F),o.showCheckbox&&(F.checked&&c.checkids.push(F[r.id]),c.checkClick(re,F)),o.edit&&c.operate(re,F)})},R.prototype.spread=function(k,X){var c=this,o=c.config,F=k.children("."+a),r=F.children("."+p),g=r.find('input[same="layuiTreeCheck"]'),w=F.find("."+_),F=F.find("."+u),O=o.onlyIconControl?w:r,z="";O.on("click",function(ne){var te=k.children("."+s),re=(O.children(".layui-icon")[0]?O:O.find(".layui-tree-icon")).children(".layui-icon");te[0]?k.hasClass(f)?(k.removeClass(f),te.slideUp(200),re.removeClass(C).addClass(ee),c.updateFieldValue(X,"spread",!1)):(k.addClass(f),te.slideDown(200),re.addClass(C).removeClass(ee),c.updateFieldValue(X,"spread",!0),o.accordion&&((te=k.siblings("."+T)).removeClass(f),te.children("."+s).slideUp(200),te.find(".layui-tree-icon").children(".layui-icon").removeClass(C).addClass(ee))):z="normal"}),F.on("click",function(){x(this).hasClass(I)||(z=k.hasClass(f)?o.onlyIconControl?"open":"close":o.onlyIconControl?"close":"open",g[0]&&c.updateFieldValue(X,"checked",g.prop("checked")),o.click&&o.click({elem:k,state:z,data:X}))})},R.prototype.updateFieldValue=function(k,X,c){X in k&&(k[X]=c)},R.prototype.setCheckbox=function(k,X,c){var o,r=this,g=r.config.customName,w=c.prop("checked");c.prop("disabled")||(typeof X[g.children]!="object"&&!k.find("."+s)[0]||k.find("."+s).find('input[same="layuiTreeCheck"]').each(function(F){this.disabled||((F=X[g.children][F])&&r.updateFieldValue(F,"checked",w),r.updateFieldValue(this,"checked",w))}),(o=function(F){var O,z,ne;F.parents("."+T)[0]&&(z=(F=F.parent("."+s)).parent(),ne=F.prev().find('input[same="layuiTreeCheck"]'),w?ne.prop("checked",w):(F.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(O=!0)}),O||ne.prop("checked",!1)),o(z))})(k),r.renderForm("checkbox"))},R.prototype.checkClick=function(k,X){var c=this,o=c.config;k.children("."+a).children("."+p).on("click",'input[same="layuiTreeCheck"]+',function(g){layui.stope(g);var g=x(this).prev(),w=g.prop("checked");g.prop("disabled")||(c.setCheckbox(k,X,g),c.updateFieldValue(X,"checked",w),o.oncheck&&o.oncheck({elem:k,checked:w,data:X}))})},R.prototype.operate=function(k,X){var c=this,o=c.config,r=o.customName,g=k.children("."+a),w=g.children("."+p);g.children(".layui-tree-btnGroup").on("click",".layui-icon",function(z){layui.stope(z);var O,z=x(this).data("type"),ne=k.children("."+s),te={data:X,type:z,elem:k};if(z=="add"){ne[0]||(o.showLine?(w.find("."+_).addClass("layui-tree-icon"),w.find("."+_).children(".layui-icon").addClass(ee).removeClass("layui-icon-file")):w.find(".layui-tree-iconArrow").removeClass(A),k.append('
          '));var re,D=o.operate&&o.operate(te),v={};if(v[r.title]=o.text.defaultNodeName,v[r.id]=D,c.tree(k.children("."+s),[v]),o.showLine&&(ne[0]?(ne.hasClass(n)||ne.addClass(n),k.find("."+s).each(function(){x(this).children("."+T).last().addClass(S)}),(ne.children("."+T).last().prev().hasClass(S)?ne.children("."+T).last().prev():ne.children("."+T).last()).removeClass(S),!k.parent("."+s)[0]&&k.next()[0]&&ne.children("."+T).last().removeClass(S)):(D=k.siblings("."+T),re=1,v=k.parent("."+s),layui.each(D,function(L,j){x(j).children("."+s)[0]||(re=0)}),(re==1?(D.children("."+s).addClass(P),D.children("."+s).children("."+T).removeClass(S),k.children("."+s).addClass(P),v.removeClass(n),v.children("."+T).last().children("."+s).children("."+T).last()):k.children("."+s).children("."+T)).addClass(S))),!o.showCheckbox)return;w.find('input[same="layuiTreeCheck"]')[0].checked&&(k.children("."+s).children("."+T).last().find('input[same="layuiTreeCheck"]')[0].checked=!0),c.renderForm("checkbox")}else z=="update"?(D=w.children("."+u).html(),w.children("."+u).html(""),w.append(''),w.children(".layui-tree-editInput").val(Y.unescape(D)).focus(),O=function(L){var j=Y.escape(L.val().trim())||o.text.defaultNodeName;L.remove(),w.children("."+u).html(j),te.data[r.title]=j,o.operate&&o.operate(te)},w.children(".layui-tree-editInput").blur(function(){O(x(this))}),w.children(".layui-tree-editInput").on("keydown",function(L){L.keyCode===13&&(L.preventDefault(),O(x(this)))})):K.confirm('确认删除该节点 "'+(X[r.title]||"")+'" 吗?',function(L){var j,J,$;o.operate&&o.operate(te),te.status="remove",K.close(L),k.prev("."+T)[0]||k.next("."+T)[0]||k.parent("."+s)[0]?(k.siblings("."+T).children("."+a)[0]?(o.showCheckbox&&(j=function(oe){var m,h,E,W;oe.parents("."+T)[0]&&(m=oe.siblings("."+T).children("."+a),h=(oe=oe.parent("."+s).prev()).find('input[same="layuiTreeCheck"]')[0],E=1,(W=0)==h.checked)&&(m.each(function(G,B){B=x(B).find('input[same="layuiTreeCheck"]')[0],B.checked!=0||B.disabled||(E=0),B.disabled||(W=1)}),E==1)&&W==1&&(h.checked=!0,c.renderForm("checkbox"),j(oe.parent("."+T)))})(k),o.showLine&&(L=k.siblings("."+T),J=1,$=k.parent("."+s),layui.each(L,function(oe,m){x(m).children("."+s)[0]||(J=0)}),J==1?(ne[0]||($.removeClass(n),L.children("."+s).addClass(P),L.children("."+s).children("."+T).removeClass(S)),(k.next()[0]?$.children("."+T).last():k.prev()).children("."+s).children("."+T).last().addClass(S),k.next()[0]||k.parents("."+T)[1]||k.parents("."+T).eq(0).next()[0]||k.prev("."+T).addClass(S)):!k.next()[0]&&k.hasClass(S)&&k.prev().addClass(S))):(L=k.parent("."+s).prev(),o.showLine?(L.find("."+_).removeClass("layui-tree-icon"),L.find("."+_).children(".layui-icon").removeClass(C).addClass("layui-icon-file"),($=L.parents("."+s).eq(0)).addClass(n),$.children("."+T).each(function(){x(this).children("."+s).children("."+T).last().addClass(S)})):L.find(".layui-tree-iconArrow").addClass(A),k.parents("."+T).eq(0).removeClass(f),k.parent("."+s).remove()),k.remove()):(k.remove(),c.elem.append(c.elemNone))})})},R.prototype.events=function(){var k=this,X=k.config;k.elem.find(".layui-tree-checkedFirst"),k.setChecked(k.checkids),k.elem.find(".layui-tree-search").on("keyup",function(){var o=x(this),c=o.val(),o=o.nextAll(),r=[];o.find("."+u).each(function(){var g,w=x(this).parents("."+a);x(this).html().indexOf(c)!=-1&&(r.push(x(this).parent()),(g=function(F){F.addClass("layui-tree-searchShow"),F.parent("."+s)[0]&&g(F.parent("."+s).parent("."+T))})(w.parent("."+T)))}),o.find("."+a).each(function(){var g=x(this).parent("."+T);g.hasClass("layui-tree-searchShow")||g.addClass(A)}),o.find(".layui-tree-searchShow").length==0&&k.elem.append(k.elemNone),X.onsearch&&X.onsearch({elem:r})}),k.elem.find(".layui-tree-search").on("keydown",function(){x(this).nextAll().find("."+a).each(function(){x(this).parent("."+T).removeClass("layui-tree-searchShow "+A)}),x(".layui-tree-emptyText")[0]&&x(".layui-tree-emptyText").remove()})},R.prototype.getChecked=function(){var k=this,X=k.config,c=X.customName,o=[],r=[],g=(k.elem.find(".layui-form-checked").each(function(){o.push(x(this).prev()[0].value)}),function(w,F){layui.each(w,function(O,z){layui.each(o,function(ne,te){if(z[c.id]==te)return k.updateFieldValue(z,"checked",!0),delete(te=x.extend({},z))[c.children],F.push(te),z[c.children]&&(te[c.children]=[],g(z[c.children],te[c.children])),!0})})});return g(x.extend({},X.data),r),r},R.prototype.setChecked=function(k){this.config,this.elem.find("."+T).each(function(X,c){var o=x(this).data("id"),r=x(c).children("."+a).find('input[same="layuiTreeCheck"]'),g=r.next();if(typeof k=="number"){if(o.toString()==k.toString())return r[0].checked||g.click(),!1}else typeof k=="object"&&layui.each(k,function(w,F){if(F.toString()==o.toString()&&!r[0].checked)return g.click(),!0})})},d.that={},d.config={},y.reload=function(k,X){return k=d.that[k],k.reload(X),d.call(k)},y.getChecked=function(k){return d.that[k].getChecked()},y.setChecked=function(k,X){return d.that[k].setChecked(X)},y.render=function(k){return k=new R(k),d.call(k)},he(M,y)}),layui.define(["laytpl","form"],function(he){"use strict";var x=layui.$,Q=layui.laytpl,K=layui.form,Y="transfer",M={config:{},index:layui[Y]?layui[Y].index+1e4:0,set:function(s){var f=this;return f.config=x.extend({},f.config,s),f},on:function(s,f){return layui.onevent.call(this,Y,s,f)}},y=function(){var s=this,f=s.config,S=f.id||s.index;return y.that[S]=s,{config:y.config[S]=f,reload:function(P){s.reload.call(s,P)},getData:function(){return s.getData.call(s)}}},d="layui-hide",A="layui-btn-disabled",I="layui-none",T="layui-transfer-box",_="layui-transfer-header",ee="layui-transfer-search",C="layui-transfer-data",a=function(s){return['
          ','
          ','`,"
          ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
            ',"
            "].join("")},p=['
            ',a({index:0,checkAllName:"layTransferLeftCheckAll"}),'
            ','",'","
            ",a({index:1,checkAllName:"layTransferRightCheckAll"}),"
            "].join(""),u=function(s){var f=this;f.index=++M.index,f.config=x.extend({},f.config,M.config,s),f.render()};u.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},u.prototype.reload=function(s){var f=this;f.config=x.extend({},f.config,s),f.render()},u.prototype.render=function(){var s=this,f=s.config,S=s.elem=x(Q(p,{open:"{{",close:"}}",tagStyle:"legacy"}).render({data:f,index:s.index})),P=f.elem=x(f.elem);P[0]&&(f.data=f.data||[],f.value=f.value||[],f.id="id"in f?f.id:elem.attr("id")||s.index,s.key=f.id,P.html(s.elem),s.layBox=s.elem.find("."+T),s.layHeader=s.elem.find("."+_),s.laySearch=s.elem.find("."+ee),s.layData=S.find("."+C),s.layBtn=S.find(".layui-transfer-active .layui-btn"),s.layBox.css({width:f.width,height:f.height}),s.layData.css({height:(P=f.height-s.layHeader.outerHeight(),f.showSearch&&(P-=s.laySearch.outerHeight()),P-2)}),s.renderData(),s.events())},u.prototype.renderData=function(){var s=this,f=s.config,S=[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}];s.parseData(function(P){var n=P.selected?1:0,R=["
          • ",'',"
          • "].join("");n?layui.each(f.value,function(k,X){X==P.value&&P.selected&&(S[n].views[k]=R)}):S[n].views.push(R),delete P.selected}),s.layData.eq(0).html(S[0].views.join("")),s.layData.eq(1).html(S[1].views.join("")),s.renderCheckBtn()},u.prototype.renderForm=function(s){K.render(s,"LAY-transfer-"+this.index)},u.prototype.renderCheckBtn=function(s){var f=this,S=f.config;s=s||{},f.layBox.each(function(P){var R=x(this),n=R.find("."+C),R=R.find("."+_).find('input[type="checkbox"]'),k=n.find('input[type="checkbox"]'),X=0,c=!1;k.each(function(){var o=x(this).data("hide");(this.checked||this.disabled||o)&&X++,this.checked&&!o&&(c=!0)}),R.prop("checked",c&&X===k.length),f.layBtn.eq(P)[c?"removeClass":"addClass"](A),s.stopNone||(k=n.children("li:not(."+d+")").length,f.noneView(n,k?"":S.text.none))}),f.renderForm("checkbox")},u.prototype.noneView=function(s,f){var S=x('

            '+(f||"")+"

            ");s.find("."+I)[0]&&s.find("."+I).remove(),f.replace(/\s/g,"")&&s.append(S)},u.prototype.setValue=function(){var s=this.config,f=[];return this.layBox.eq(1).find("."+C+' input[type="checkbox"]').each(function(){x(this).data("hide")||f.push(this.value)}),s.value=f,this},u.prototype.parseData=function(s){var f=this.config,S=[];return layui.each(f.data,function(P,n){n=(typeof f.parseData=="function"?f.parseData(n):n)||n,S.push(n=x.extend({},n)),layui.each(f.value,function(R,k){k==n.value&&(n.selected=!0)}),s&&s(n)}),f.data=S,this},u.prototype.getData=function(s){var f=this.config,S=[];return this.setValue(),layui.each(s||f.value,function(P,n){layui.each(f.data,function(R,k){delete k.selected,n==k.value&&S.push(k)})}),S},u.prototype.transfer=function(s,X){var S,P=this,n=P.config,R=P.layBox.eq(s),k=[],X=(X?((S=(X=X).find('input[type="checkbox"]'))[0].checked=!1,R.siblings("."+T).find("."+C).append(X.clone()),X.remove(),k.push(S[0].value),P.setValue()):R.each(function(c){x(this).find("."+C).children("li").each(function(){var o=x(this),r=o.find('input[type="checkbox"]'),g=r.data("hide");r[0].checked&&!g&&(r[0].checked=!1,R.siblings("."+T).find("."+C).append(o.clone()),o.remove(),k.push(r[0].value)),P.setValue()})}),P.renderCheckBtn(),R.siblings("."+T).find("."+ee+" input"));X.val()!==""&&X.trigger("keyup"),n.onchange&&n.onchange(P.getData(k),s)},u.prototype.events=function(){var s=this,f=s.config;s.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var S=x(this).prev(),P=S[0].checked,n=S.parents("."+T).eq(0).find("."+C);S[0].disabled||(S.attr("lay-type")==="all"&&n.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=P)}),setTimeout(function(){s.renderCheckBtn({stopNone:!0})},0))}),s.elem.on("dblclick","."+C+">li",function(S){var P=x(this),n=P.children('input[type="checkbox"]'),R=P.parent().parent().data("index");n[0].disabled||(typeof f.dblclick=="function"?f.dblclick({elem:P,data:s.getData([n[0].value])[0],index:R}):null)!==!1&&s.transfer(R,P)}),s.layBtn.on("click",function(){var S=x(this),P=S.data("index");S.hasClass(A)||s.transfer(P)}),s.laySearch.find("input").on("keyup",function(){var S=this.value,P=x(this).parents("."+ee).eq(0).siblings("."+C),n=P.children("li"),n=(n.each(function(){var R=x(this),k=R.find('input[type="checkbox"]'),X=k[0].title,X=(f.showSearch!=="cs"&&(X=X.toLowerCase(),S=S.toLowerCase()),X.indexOf(S)!==-1);R[X?"removeClass":"addClass"](d),k.data("hide",!X)}),s.renderCheckBtn(),n.length===P.children("li."+d).length);s.noneView(P,n?f.text.searchNone:"")})},y.that={},y.config={},M.reload=function(s,f){return s=y.that[s],s.reload(f),y.call(s)},M.getData=function(s){return y.that[s].getData()},M.render=function(s){return s=new u(s),y.call(s)},he(Y,M)}),layui.define(["jquery","lay"],function(he){"use strict";var x=layui.$,Q=layui.lay,K=(layui.hint(),layui.device(),{config:{},set:function(C){var a=this;return a.config=x.extend({},a.config,C),a},on:function(C,a){return layui.onevent.call(this,Y,C,a)}}),Y="carousel",M="layui-this",y="layui-carousel-left",d="layui-carousel-right",A="layui-carousel-prev",I="layui-carousel-next",T="layui-carousel-arrow",_="layui-carousel-ind",ee=function(C){var a=this;a.config=x.extend({},a.config,K.config,C),a.render()};ee.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},ee.prototype.render=function(){var C=this,a=C.config,p=x(a.elem);if(1*[carousel-item]>*"),a.index<0&&(a.index=0),a.index>=C.elemItem.length&&(a.index=C.elemItem.length-1),a.interval<800&&(a.interval=800),a.full?a.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):a.elem.css({width:a.width,height:a.height}),a.elem.attr("lay-anim",a.anim),C.elemItem.eq(a.index).addClass(M),C.indicator(),C.arrow(),C.autoplay(),1=this.elemItem.length?0:C},ee.prototype.addIndex=function(C){var a=this.config;a.index=a.index+(C=C||1),a.index>=this.elemItem.length&&(a.index=0)},ee.prototype.subIndex=function(C){var a=this.config;a.index=a.index-(C=C||1),a.index<0&&(a.index=this.elemItem.length-1)},ee.prototype.autoplay=function(){var C=this,a=C.config,p=C.elemItem.length;a.autoplay&&(clearInterval(C.timer),1',''].join(""));a.elem.attr("lay-arrow",a.arrow),a.elem.find("."+T)[0]&&a.elem.find("."+T).remove(),1p.index?a.slide("add",C-p.index):C
              ',(C=[],layui.each(a.elemItem,function(f){C.push("")}),C.join("")),"
            "].join(""));p.elem.attr("lay-indicator",p.indicator),p.elem.find("."+_)[0]&&p.elem.find("."+_).remove(),1C[a?"height":"width"]()/3)&&p.slide(0y.length&&(y.value=y.length),parseInt(y.value)===y.value||y.half||(y.value=Math.ceil(y.value)-y.value<.5?Math.ceil(y.value):Math.floor(y.value)),'
              "),I=1;I<=y.length;I++){var T='
            • ";y.half&&parseInt(y.value)!==y.value&&I==Math.ceil(y.value)?A=A+'
            • ":A+=T}A+="
            ",y.text&&(A+=''+y.value+"");var _=y.elem,ee=_.next("."+Y.ELEM);ee[0]&&ee.remove(),M.elemTemplate=x(A),y.span=M.elemTemplate.next("span"),y.setText&&y.setText(y.value),_.html(M.elemTemplate),_.addClass("layui-inline"),y.readonly||M.action()},extendsInstance:function(){var M=this,y=M.config;return{setvalue:function(d){y.value=d,M.render()}}}}),Y=K.CONST;K.Class.prototype.action=function(){var M=this.config,y=this.elemTemplate,d=y.find("i").width(),A=y.children("li");A.each(function(I){var T=I+1,_=x(this);_.on("click",function(ee){M.value=T,M.half&&ee.pageX-x(this).offset().left<=d/2&&(M.value=M.value-.5),M.text&&y.next("span").text(M.value),M.choose&&M.choose(M.value),M.setText&&M.setText(M.value)}),_.on("mousemove",function(ee){y.find("i").each(function(){x(this).addClass(Y.ICON_RATE).removeClass(Y.ICON_SOLID_HALF)}),y.find("i:lt("+T+")").each(function(){x(this).addClass(Y.ICON_RATE_SOLID).removeClass(Y.ICON_HALF_RATE)}),M.half&&ee.pageX-x(this).offset().left<=d/2&&_.children("i").addClass(Y.ICON_RATE_HALF).removeClass(Y.ICON_RATE_SOLID)}),_.on("mouseleave",function(){y.find("i").each(function(){x(this).addClass(Y.ICON_RATE).removeClass(Y.ICON_SOLID_HALF)}),y.find("i:lt("+Math.floor(M.value)+")").each(function(){x(this).addClass(Y.ICON_RATE_SOLID).removeClass(Y.ICON_HALF_RATE)}),M.half&&parseInt(M.value)!==M.value&&y.children("li:eq("+Math.floor(M.value)+")").children("i").addClass(Y.ICON_RATE_HALF).removeClass(Y.ICON_SOLID_RATE)})}),Q.touchSwipe(y,{onTouchMove:function(I,T){var _;Date.now()-T.timeStart<=200||(T=I.touches[0].pageX,I=y.width()/M.length,T=(T-y.offset().left)/I,(_=(_=(I=T%1)<=.5&&M.half?.5+(T-I):Math.ceil(T))>M.length?M.length:_)<0&&(_=0),A.each(function(u){var C=x(this).children("i"),a=Math.ceil(_)-u==1,p=Math.ceil(_)>u,u=_-u==.5;p?(C.addClass(Y.ICON_RATE_SOLID).removeClass(Y.ICON_HALF_RATE),M.half&&u&&C.addClass(Y.ICON_RATE_HALF).removeClass(Y.ICON_RATE_SOLID)):C.addClass(Y.ICON_RATE).removeClass(Y.ICON_SOLID_HALF),C.toggleClass("layui-rate-hover",a)}),M.value=_,M.text&&y.next("span").text(M.value),M.setText&&M.setText(M.value))},onTouchEnd:function(I,T){Date.now()-T.timeStart<=200||(y.find("i").removeClass("layui-rate-hover"),M.choose&&M.choose(M.value),M.setText&&M.setText(M.value))}})},he(Y.MOD_NAME,K)}),layui.define("jquery",function(he){"use strict";var x=layui.$,Q=function(K){};Q.prototype.load=function(K){var Y,M,y,d,A,I,T,_,ee,C,a,p,u,s,f,S=this,P=0,n=x((K=K||{}).elem);if(n[0])return A=x(K.scrollElem||document),I="mb"in K?K.mb:50,T=!("isAuto"in K)||K.isAuto,_=K.moreText||"加载更多",ee=K.end||"没有更多了",C=(K.direction||"bottom")==="top",S._cleanup(n,A),a=K.scrollElem&&K.scrollElem!==document,u=x('"),n.find(".layui-flow-more")[0]||n[C?"prepend":"append"](u),s=function(R,k){var X=a?A.prop("scrollHeight"):document.documentElement.scrollHeight,c=A.scrollTop();R=x(R),u[C?"after":"before"](R),(k=k==0||null)?u.html(ee):u.find("a").html(p),M=k,Y=null,y&&y(),C&&(R=a?A.prop("scrollHeight"):document.documentElement.scrollHeight,P===1?A.scrollTop(R):1'),typeof K.done=="function"&&K.done(++P,s)})(),u.find("a").on("click.flow",function(){x(this),M||Y||f()}),K.isLazyimg&&(y=S.lazyimg({elem:K.elem+" img",scrollElem:K.scrollElem,direction:K.direction})),T&&A.on("scroll.flow",function(){var R=x(this),k=R.scrollTop();d&&clearTimeout(d),!M&&n.width()&&(d=setTimeout(function(){var X=(a?R:x(window)).height(),c=a?R.prop("scrollHeight"):document.documentElement.scrollHeight;(C?k<=I:c-k-X<=I)&&!Y&&f()},100))}),S},Q.prototype.lazyimg=function(K){var Y,M=this,y=0,d=x((K=K||{}).scrollElem||document),A=K.elem||"img",I=(K.direction||"bottom")==="top",T=K.scrollElem&&K.scrollElem!==document,_=function(C,s){var p,u=d.scrollTop(),s=u+s,f=T?C.offset().top-d.offset().top+u:C.offset().top;(I?f+C.height():f)>=u&&f<=s&&C.attr("lay-src")&&(p=C.attr("lay-src"),layui.img(p,function(){var S=M.lazyimg.elem.eq(y);C.attr("src",p).removeAttr("lay-src"),S[0]&&ee(S),y++},function(){M.lazyimg.elem.eq(y),C.removeAttr("lay-src")}))},ee=function(C,a){var p=(T?a||d:x(window)).height(),u=d.scrollTop(),s=u+p;if(M.lazyimg.elem=x(A),C)_(C,p);else for(var f=0;f"),preview:"Preview"},wordWrap:!0,lang:"text",highlighter:!1,langMarker:!1},I=layui.code?layui.code.index+1e4:0,T=function(_){return String(_).replace(/\s+$/,"").replace(/^\n|\n$/,"")};he("code",function(_,ee){var C,a,p,u,s,f,S,P,n,R,k,X,c,o,r,g,w,F,O,z,ne,te={config:_=x.extend(!0,{},A,_),reload:function(D){layui.code(this.updateOptions(D))},updateOptions:function(D){return delete(D=D||{}).elem,x.extend(!0,_,D)},reloadCode:function(D){layui.code(this.updateOptions(D),"reloadCode")}},re=x(_.elem);return 1',_.ln?['
            ',Q.digit(j+1)+".","
            "].join(""):"",'
            ',L||" ","
            ",""].join("")})}},u=_.code,s=function(D){return typeof _.codeParse=="function"?_.codeParse(D,_):D},ee==="reloadCode"?C.children(".layui-code-wrap").html(re(s(u)).html):(f=layui.code.index=++I,C.attr("lay-code-index",f),(z=d.CDDE_DATA_CLASS in C.data())&&C.attr("class",C.data(d.CDDE_DATA_CLASS)||""),z||C.data(d.CDDE_DATA_CLASS,C.attr("class")),S={copy:{className:"file-b",title:["复制代码"],event:function(D){var v=Q.unescape(s(_.code)),L=typeof _.onCopy=="function";lay.clipboard.writeText({text:v,done:function(){L&&_.onCopy(v,!0)===!1||y.msg("已复制",{icon:1})},error:function(){L&&_.onCopy(v,!1)===!1||y.msg("复制失败",{icon:2})}})}}},(function D(){var v=C.parent("."+d.ELEM_PREVIEW),L=v.children("."+d.ELEM_TAB),j=v.children("."+d.ELEM_ITEM+"-preview");return L.remove(),j.remove(),v[0]&&C.unwrap(),D})(),_.preview&&(z="LAY-CODE-DF-"+f,o=_.layout||["code","preview"],P=_.preview==="iframe",c=x('
            '),ne=x('
            '),n=x('
            '),O=x('
            '),R=x('
            '),_.id&&c.attr("id",_.id),c.addClass(_.className),ne.attr("lay-filter",z),layui.each(o,function(D,v){var L=x('
          • ');D===0&&L.addClass("layui-this"),L.html(_.text[v]),n.append(L)}),x.extend(S,{full:{className:"screen-full",title:["最大化显示","还原显示"],event:function(v){var v=v.elem,L=v.closest("."+d.ELEM_PREVIEW),j="layui-icon-"+this.className,J="layui-icon-screen-restore",$=this.title,oe=x("html,body"),m="layui-scrollbar-hide";v.hasClass(j)?(L.addClass(d.ELEM_FULL),v.removeClass(j).addClass(J),v.attr("title",$[1]),oe.addClass(m)):(L.removeClass(d.ELEM_FULL),v.removeClass(J).addClass(j),v.attr("title",$[0]),oe.removeClass(m))}},window:{className:"release",title:["在新窗口预览"],event:function(D){Q.openWin({content:s(_.code)})}}}),_.copy&&(layui.type(_.tools)==="array"?_.tools.indexOf("copy")===-1&&_.tools.unshift("copy"):_.tools=["copy"]),R.on("click",">i",function(){var v=x(this),D=v.data("type"),v={elem:v,type:D,options:_,rawCode:_.code,finalCode:Q.unescape(s(_.code))};S[D]&&typeof S[D].event=="function"&&S[D].event(v),typeof _.toolsEvent=="function"&&_.toolsEvent(v)}),_.addTools&&_.tools&&(_.tools=[].concat(_.tools,_.addTools)),layui.each(_.tools,function(D,v){var $=typeof v=="object",L=$?v:S[v]||{className:v,title:[v]},j=L.className||L.type,J=L.title||[""],$=$?L.type||j:v;$&&(S[$]||((v={})[$]=L,x.extend(S,v)),R.append(''))}),C.addClass(d.ELEM_ITEM).wrap(c),ne.append(n),_.tools&&ne.append(R),C.before(ne),P&&O.html(''),k=function(D){var v=D.children("iframe")[0];P&&v?v.srcdoc=s(_.code):D.html(_.code),setTimeout(function(){typeof _.done=="function"&&_.done({container:D,options:_,render:function(){M.render(D.find(".layui-form")),K.render(),Y.render({elem:["."+d.ELEM_PREVIEW,".layui-tabs"].join(" ")})}})},3)},o[0]==="preview"?(O.addClass(d.ELEM_SHOW),C.before(O),k(O)):C.addClass(d.ELEM_SHOW).after(O),_.previewStyle=[_.style,_.previewStyle].join(""),O.attr("style",_.previewStyle),K.on("tab("+z+")",function(j){var v=x(this),L=x(j.elem).closest("."+d.ELEM_PREVIEW).find("."+d.ELEM_ITEM),j=L.eq(j.index);L.removeClass(d.ELEM_SHOW),j.addClass(d.ELEM_SHOW),v.attr("lay-id")==="preview"&&k(j),F()})),X=x(''),C.addClass((c=["layui-code-view layui-border-box"],_.wordWrap||c.push("layui-code-nowrap"),c.join(" "))),(ne=_.theme||_.skin)&&(C.removeClass("layui-code-theme-dark layui-code-theme-light"),C.addClass("layui-code-theme-"+ne)),_.highlighter&&C.addClass([_.highlighter,"language-"+_.lang,"layui-code-hl"].join(" ")),o=re(_.encode?Q.escape(s(u)):u),r=o.lines,C.html(X.html(o.html)),_.ln&&C.append('
            '),_.height&&X.css("max-height",_.height),_.codeStyle=[_.style,_.codeStyle].join(""),_.codeStyle&&X.attr("style",function(D,v){return(v||"")+_.codeStyle}),g=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(D,v){D.style["padding-left"]=v+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(D,v){D.style.width=v+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(D,v){D.style.width=v+"px"}}],w=lay.style({target:C[0],id:"DF-code-"+f,text:x.map(x.map(g,function(D){return D.selector}),function(D,v){return['.layui-code-view[lay-code-index="'+f+'"]',D].join(" ")}).join("")}),F=(function D(){var v,L;return _.ln&&(v=Math.floor(r.length/100),L=X.children("."+d.ELEM_LINE).last().children("."+d.ELEM_LINE_NUM).outerWidth(),C.addClass(d.ELEM_LN_MODE),v)&&d.LINE_RAW_WIDTH
          • ')).html(_.title||_.text.code),C.prepend(O)),z=x('
            '),_.copy&&!_.preview&&((ne=x(['','',""].join(""))).on("click",function(){S.copy.event()}),z.append(ne)),_.langMarker&&z.append(''+_.lang+""),_.about&&z.append(_.about),C.append(z),_.preview||setTimeout(function(){typeof _.done=="function"&&_.done({})},3),_.elem.length===1+f&&typeof _.allDone=="function"&&_.allDone())),te})}),layui["layui.all"]||layui.addcss("modules/code.css?v=6","skincodecss");